1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getVolume
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

ovh.CloudProject.getVolume

Explore with Pulumi AI

OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

Get information about a volume in a public cloud project

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const volume = ovh.CloudProject.getVolume({
    regionName: "xxx",
    serviceName: "yyy",
    volumeId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});
Copy
import pulumi
import pulumi_ovh as ovh

volume = ovh.CloudProject.get_volume(region_name="xxx",
    service_name="yyy",
    volume_id="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
Copy
package main

import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudproject.GetVolume(ctx, &cloudproject.GetVolumeArgs{
			RegionName:  "xxx",
			ServiceName: "yyy",
			VolumeId:    "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var volume = Ovh.CloudProject.GetVolume.Invoke(new()
    {
        RegionName = "xxx",
        ServiceName = "yyy",
        VolumeId = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
import com.pulumi.ovh.CloudProject.inputs.GetVolumeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var volume = CloudProjectFunctions.getVolume(GetVolumeArgs.builder()
            .regionName("xxx")
            .serviceName("yyy")
            .volumeId("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
            .build());

    }
}
Copy
variables:
  volume:
    fn::invoke:
      function: ovh:CloudProject:getVolume
      arguments:
        regionName: xxx
        serviceName: yyy
        volumeId: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
Copy

Using getVolume

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getVolume(args: GetVolumeArgs, opts?: InvokeOptions): Promise<GetVolumeResult>
function getVolumeOutput(args: GetVolumeOutputArgs, opts?: InvokeOptions): Output<GetVolumeResult>
Copy
def get_volume(region_name: Optional[str] = None,
               service_name: Optional[str] = None,
               volume_id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetVolumeResult
def get_volume_output(region_name: Optional[pulumi.Input[str]] = None,
               service_name: Optional[pulumi.Input[str]] = None,
               volume_id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetVolumeResult]
Copy
func GetVolume(ctx *Context, args *GetVolumeArgs, opts ...InvokeOption) (*GetVolumeResult, error)
func GetVolumeOutput(ctx *Context, args *GetVolumeOutputArgs, opts ...InvokeOption) GetVolumeResultOutput
Copy

> Note: This function is named GetVolume in the Go SDK.

public static class GetVolume 
{
    public static Task<GetVolumeResult> InvokeAsync(GetVolumeArgs args, InvokeOptions? opts = null)
    public static Output<GetVolumeResult> Invoke(GetVolumeInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
public static Output<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ovh:CloudProject/getVolume:getVolume
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

RegionName This property is required. string
A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
ServiceName This property is required. string
The id of the public cloud project.
VolumeId This property is required. string
Volume id to get the informations
RegionName This property is required. string
A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
ServiceName This property is required. string
The id of the public cloud project.
VolumeId This property is required. string
Volume id to get the informations
regionName This property is required. String
A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
serviceName This property is required. String
The id of the public cloud project.
volumeId This property is required. String
Volume id to get the informations
regionName This property is required. string
A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
serviceName This property is required. string
The id of the public cloud project.
volumeId This property is required. string
Volume id to get the informations
region_name This property is required. str
A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
service_name This property is required. str
The id of the public cloud project.
volume_id This property is required. str
Volume id to get the informations
regionName This property is required. String
A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
serviceName This property is required. String
The id of the public cloud project.
volumeId This property is required. String
Volume id to get the informations

getVolume Result

The following output properties are available:

Id string
Name string
The name of the volume (E.g.: "GRA", meaning Gravelines, for region "GRA1")
RegionName string
The region name where volume is available
ServiceName string
The id of the public cloud project.
Size double
The size of the volume
VolumeId string
The id of the volume
Id string
Name string
The name of the volume (E.g.: "GRA", meaning Gravelines, for region "GRA1")
RegionName string
The region name where volume is available
ServiceName string
The id of the public cloud project.
Size float64
The size of the volume
VolumeId string
The id of the volume
id String
name String
The name of the volume (E.g.: "GRA", meaning Gravelines, for region "GRA1")
regionName String
The region name where volume is available
serviceName String
The id of the public cloud project.
size Double
The size of the volume
volumeId String
The id of the volume
id string
name string
The name of the volume (E.g.: "GRA", meaning Gravelines, for region "GRA1")
regionName string
The region name where volume is available
serviceName string
The id of the public cloud project.
size number
The size of the volume
volumeId string
The id of the volume
id str
name str
The name of the volume (E.g.: "GRA", meaning Gravelines, for region "GRA1")
region_name str
The region name where volume is available
service_name str
The id of the public cloud project.
size float
The size of the volume
volume_id str
The id of the volume
id String
name String
The name of the volume (E.g.: "GRA", meaning Gravelines, for region "GRA1")
regionName String
The region name where volume is available
serviceName String
The id of the public cloud project.
size Number
The size of the volume
volumeId String
The id of the volume

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud