1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getVolumes
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

ovh.CloudProject.getVolumes

Explore with Pulumi AI

ovh logo
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

    Get all the volume from a region of 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",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    volume = ovh.CloudProject.get_volume(region_name="xxx",
        service_name="yyy")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/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",
    		}, 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",
        });
    
    });
    
    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")
                .build());
    
        }
    }
    
    variables:
      volume:
        fn::invoke:
          Function: ovh:CloudProject:getVolume
          Arguments:
            regionName: xxx
            serviceName: yyy
    

    Using getVolumes

    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 getVolumes(args: GetVolumesArgs, opts?: InvokeOptions): Promise<GetVolumesResult>
    function getVolumesOutput(args: GetVolumesOutputArgs, opts?: InvokeOptions): Output<GetVolumesResult>
    def get_volumes(region_name: Optional[str] = None,
                    service_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetVolumesResult
    def get_volumes_output(region_name: Optional[pulumi.Input[str]] = None,
                    service_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetVolumesResult]
    func GetVolumes(ctx *Context, args *GetVolumesArgs, opts ...InvokeOption) (*GetVolumesResult, error)
    func GetVolumesOutput(ctx *Context, args *GetVolumesOutputArgs, opts ...InvokeOption) GetVolumesResultOutput

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

    public static class GetVolumes 
    {
        public static Task<GetVolumesResult> InvokeAsync(GetVolumesArgs args, InvokeOptions? opts = null)
        public static Output<GetVolumesResult> Invoke(GetVolumesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVolumesResult> getVolumes(GetVolumesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ovh:CloudProject/getVolumes:getVolumes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    RegionName string
    A valid OVHcloud public cloud region name in which the volumes are available. Ex.: "GRA11".
    ServiceName string
    The id of the public cloud project.
    RegionName string
    A valid OVHcloud public cloud region name in which the volumes are available. Ex.: "GRA11".
    ServiceName string
    The id of the public cloud project.
    regionName String
    A valid OVHcloud public cloud region name in which the volumes are available. Ex.: "GRA11".
    serviceName String
    The id of the public cloud project.
    regionName string
    A valid OVHcloud public cloud region name in which the volumes are available. Ex.: "GRA11".
    serviceName string
    The id of the public cloud project.
    region_name str
    A valid OVHcloud public cloud region name in which the volumes are available. Ex.: "GRA11".
    service_name str
    The id of the public cloud project.
    regionName String
    A valid OVHcloud public cloud region name in which the volumes are available. Ex.: "GRA11".
    serviceName String
    The id of the public cloud project.

    getVolumes Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    RegionName string
    The region name where volumes are available
    ServiceName string
    The id of the public cloud project.
    Volumes List<GetVolumesVolume>
    Id string
    The provider-assigned unique ID for this managed resource.
    RegionName string
    The region name where volumes are available
    ServiceName string
    The id of the public cloud project.
    Volumes []GetVolumesVolume
    id String
    The provider-assigned unique ID for this managed resource.
    regionName String
    The region name where volumes are available
    serviceName String
    The id of the public cloud project.
    volumes List<GetVolumesVolume>
    id string
    The provider-assigned unique ID for this managed resource.
    regionName string
    The region name where volumes are available
    serviceName string
    The id of the public cloud project.
    volumes GetVolumesVolume[]
    id str
    The provider-assigned unique ID for this managed resource.
    region_name str
    The region name where volumes are available
    service_name str
    The id of the public cloud project.
    volumes Sequence[cloudproject.GetVolumesVolume]
    id String
    The provider-assigned unique ID for this managed resource.
    regionName String
    The region name where volumes are available
    serviceName String
    The id of the public cloud project.
    volumes List<Property Map>

    Supporting Types

    GetVolumesVolume

    Id string
    The id of the volume
    Name string
    The name of the volume
    Size double
    The size of the volume
    Id string
    The id of the volume
    Name string
    The name of the volume
    Size float64
    The size of the volume
    id String
    The id of the volume
    name String
    The name of the volume
    size Double
    The size of the volume
    id string
    The id of the volume
    name string
    The name of the volume
    size number
    The size of the volume
    id str
    The id of the volume
    name str
    The name of the volume
    size float
    The size of the volume
    id String
    The id of the volume
    name String
    The name of the volume
    size Number
    The size 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.
    ovh logo
    OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud