OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud
ovh.CloudProject.getVolumes
Explore with Pulumi AI
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:
- Region
Name string - A valid OVHcloud public cloud region name in which the volumes are available. Ex.: "GRA11".
- Service
Name string - The id of the public cloud project.
- Region
Name string - A valid OVHcloud public cloud region name in which the volumes are available. Ex.: "GRA11".
- Service
Name string - The id of the public cloud project.
- region
Name String - A valid OVHcloud public cloud region name in which the volumes are available. Ex.: "GRA11".
- service
Name String - The id of the public cloud project.
- region
Name string - A valid OVHcloud public cloud region name in which the volumes are available. Ex.: "GRA11".
- service
Name 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.
- region
Name String - A valid OVHcloud public cloud region name in which the volumes are available. Ex.: "GRA11".
- service
Name 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.
- Region
Name string - The region name where volumes are available
- Service
Name string - The id of the public cloud project.
- Volumes
List<Get
Volumes Volume>
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Name string - The region name where volumes are available
- Service
Name string - The id of the public cloud project.
- Volumes
[]Get
Volumes Volume
- id String
- The provider-assigned unique ID for this managed resource.
- region
Name String - The region name where volumes are available
- service
Name String - The id of the public cloud project.
- volumes
List<Get
Volumes Volume>
- id string
- The provider-assigned unique ID for this managed resource.
- region
Name string - The region name where volumes are available
- service
Name string - The id of the public cloud project.
- volumes
Get
Volumes Volume[]
- 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.
Get Volumes Volume]
- id String
- The provider-assigned unique ID for this managed resource.
- region
Name String - The region name where volumes are available
- service
Name String - The id of the public cloud project.
- volumes List<Property Map>
Supporting Types
GetVolumesVolume
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.