OVHCloud v2.0.7 published on Wednesday, Mar 19, 2025 by OVHcloud
ovh.CloudProject.getVolume
Explore with Pulumi AI
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",
});
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")
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
	})
}
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",
    });
});
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());
    }
}
variables:
  volume:
    fn::invoke:
      function: ovh:CloudProject:getVolume
      arguments:
        regionName: xxx
        serviceName: yyy
        volumeId: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
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>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]func GetVolume(ctx *Context, args *GetVolumeArgs, opts ...InvokeOption) (*GetVolumeResult, error)
func GetVolumeOutput(ctx *Context, args *GetVolumeOutputArgs, opts ...InvokeOption) GetVolumeResultOutput> 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)
}public static CompletableFuture<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
public static Output<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
fn::invoke:
  function: ovh:CloudProject/getVolume:getVolume
  arguments:
    # arguments dictionaryThe following arguments are supported:
- RegionName string
- A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
- ServiceName string
- The id of the public cloud project.
- VolumeId string
- Volume id to get the informations
- RegionName string
- A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
- ServiceName string
- The id of the public cloud project.
- VolumeId string
- Volume id to get the informations
- regionName String
- A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
- serviceName String
- The id of the public cloud project.
- volumeId String
- Volume id to get the informations
- regionName string
- A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
- serviceName string
- The id of the public cloud project.
- volumeId string
- Volume id to get the informations
- region_name str
- A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
- service_name str
- The id of the public cloud project.
- volume_id str
- Volume id to get the informations
- regionName String
- A valid OVHcloud public cloud region name in which the volume is available. Ex.: "GRA11".
- serviceName String
- The id of the public cloud project.
- volumeId 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 ovhTerraform Provider.