1. Packages
  2. Ucloud Provider
  3. API Docs
  4. getUfsVolumes
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

ucloud.getUfsVolumes

Explore with Pulumi AI

ucloud logo
ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud

    This data source provides a list of UFS Volume resources according to their UFS Volume ID and ufs volume name.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ucloud from "@pulumi/ucloud";
    
    const example = ucloud.getUfsVolumes({});
    export const first = example.then(example => example.ufsVolumes?.[0]?.id);
    
    import pulumi
    import pulumi_ucloud as ucloud
    
    example = ucloud.get_ufs_volumes()
    pulumi.export("first", example.ufs_volumes[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ucloud.GetUfsVolumes(ctx, &ucloud.GetUfsVolumesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("first", example.UfsVolumes[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ucloud = Pulumi.Ucloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ucloud.GetUfsVolumes.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["first"] = example.Apply(getUfsVolumesResult => getUfsVolumesResult.UfsVolumes[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ucloud.UcloudFunctions;
    import com.pulumi.ucloud.inputs.GetUfsVolumesArgs;
    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 example = UcloudFunctions.getUfsVolumes();
    
            ctx.export("first", example.applyValue(getUfsVolumesResult -> getUfsVolumesResult.ufsVolumes()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ucloud:getUfsVolumes
          arguments: {}
    outputs:
      first: ${example.ufsVolumes[0].id}
    

    Using getUfsVolumes

    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 getUfsVolumes(args: GetUfsVolumesArgs, opts?: InvokeOptions): Promise<GetUfsVolumesResult>
    function getUfsVolumesOutput(args: GetUfsVolumesOutputArgs, opts?: InvokeOptions): Output<GetUfsVolumesResult>
    def get_ufs_volumes(id: Optional[str] = None,
                        ids: Optional[Sequence[str]] = None,
                        name_regex: Optional[str] = None,
                        output_file: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetUfsVolumesResult
    def get_ufs_volumes_output(id: Optional[pulumi.Input[str]] = None,
                        ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        name_regex: Optional[pulumi.Input[str]] = None,
                        output_file: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetUfsVolumesResult]
    func GetUfsVolumes(ctx *Context, args *GetUfsVolumesArgs, opts ...InvokeOption) (*GetUfsVolumesResult, error)
    func GetUfsVolumesOutput(ctx *Context, args *GetUfsVolumesOutputArgs, opts ...InvokeOption) GetUfsVolumesResultOutput

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

    public static class GetUfsVolumes 
    {
        public static Task<GetUfsVolumesResult> InvokeAsync(GetUfsVolumesArgs args, InvokeOptions? opts = null)
        public static Output<GetUfsVolumesResult> Invoke(GetUfsVolumesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUfsVolumesResult> getUfsVolumes(GetUfsVolumesArgs args, InvokeOptions options)
    public static Output<GetUfsVolumesResult> getUfsVolumes(GetUfsVolumesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ucloud:index/getUfsVolumes:getUfsVolumes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of UFS Volume.
    Ids List<string>
    A list of UFS Volume IDs, all the UFS Volumes belong to this region will be retrieved if the ID is [].
    NameRegex string
    A regex string to filter resulting UFS Volumes by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Id string
    The ID of UFS Volume.
    Ids []string
    A list of UFS Volume IDs, all the UFS Volumes belong to this region will be retrieved if the ID is [].
    NameRegex string
    A regex string to filter resulting UFS Volumes by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    id String
    The ID of UFS Volume.
    ids List<String>
    A list of UFS Volume IDs, all the UFS Volumes belong to this region will be retrieved if the ID is [].
    nameRegex String
    A regex string to filter resulting UFS Volumes by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    id string
    The ID of UFS Volume.
    ids string[]
    A list of UFS Volume IDs, all the UFS Volumes belong to this region will be retrieved if the ID is [].
    nameRegex string
    A regex string to filter resulting UFS Volumes by name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    id str
    The ID of UFS Volume.
    ids Sequence[str]
    A list of UFS Volume IDs, all the UFS Volumes belong to this region will be retrieved if the ID is [].
    name_regex str
    A regex string to filter resulting UFS Volumes by name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    id String
    The ID of UFS Volume.
    ids List<String>
    A list of UFS Volume IDs, all the UFS Volumes belong to this region will be retrieved if the ID is [].
    nameRegex String
    A regex string to filter resulting UFS Volumes by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getUfsVolumes Result

    The following output properties are available:

    Id string
    The ID of UFS Volume.
    Ids List<string>
    TotalCount double
    Total number of UFS Volumes that satisfy the condition.
    UfsVolumes List<GetUfsVolumesUfsVolume>
    It is a nested type which documented below.
    NameRegex string
    OutputFile string
    Id string
    The ID of UFS Volume.
    Ids []string
    TotalCount float64
    Total number of UFS Volumes that satisfy the condition.
    UfsVolumes []GetUfsVolumesUfsVolume
    It is a nested type which documented below.
    NameRegex string
    OutputFile string
    id String
    The ID of UFS Volume.
    ids List<String>
    totalCount Double
    Total number of UFS Volumes that satisfy the condition.
    ufsVolumes List<GetUfsVolumesUfsVolume>
    It is a nested type which documented below.
    nameRegex String
    outputFile String
    id string
    The ID of UFS Volume.
    ids string[]
    totalCount number
    Total number of UFS Volumes that satisfy the condition.
    ufsVolumes GetUfsVolumesUfsVolume[]
    It is a nested type which documented below.
    nameRegex string
    outputFile string
    id str
    The ID of UFS Volume.
    ids Sequence[str]
    total_count float
    Total number of UFS Volumes that satisfy the condition.
    ufs_volumes Sequence[GetUfsVolumesUfsVolume]
    It is a nested type which documented below.
    name_regex str
    output_file str
    id String
    The ID of UFS Volume.
    ids List<String>
    totalCount Number
    Total number of UFS Volumes that satisfy the condition.
    ufsVolumes List<Property Map>
    It is a nested type which documented below.
    nameRegex String
    outputFile String

    Supporting Types

    GetUfsVolumesUfsVolume

    CreateTime string
    The creation time of UFS Volume, formatted in RFC3339 time string.
    ExpireTime string
    The expiration time of ufs volume, formatted in RFC3339 time string.
    Id string
    The ID of UFS Volume.
    Name string
    The name of UFS Volume.
    ProtocolType string
    The protocol type of ufs volume.
    Remark string
    A remark assigned to UFS Volume.
    Size double
    The size of ufs volume. Purchase the size of ufs volume in GB.
    StorageType string
    The storage type of ufs volume.
    Tag string
    A tag assigned to UFS Volume.
    CreateTime string
    The creation time of UFS Volume, formatted in RFC3339 time string.
    ExpireTime string
    The expiration time of ufs volume, formatted in RFC3339 time string.
    Id string
    The ID of UFS Volume.
    Name string
    The name of UFS Volume.
    ProtocolType string
    The protocol type of ufs volume.
    Remark string
    A remark assigned to UFS Volume.
    Size float64
    The size of ufs volume. Purchase the size of ufs volume in GB.
    StorageType string
    The storage type of ufs volume.
    Tag string
    A tag assigned to UFS Volume.
    createTime String
    The creation time of UFS Volume, formatted in RFC3339 time string.
    expireTime String
    The expiration time of ufs volume, formatted in RFC3339 time string.
    id String
    The ID of UFS Volume.
    name String
    The name of UFS Volume.
    protocolType String
    The protocol type of ufs volume.
    remark String
    A remark assigned to UFS Volume.
    size Double
    The size of ufs volume. Purchase the size of ufs volume in GB.
    storageType String
    The storage type of ufs volume.
    tag String
    A tag assigned to UFS Volume.
    createTime string
    The creation time of UFS Volume, formatted in RFC3339 time string.
    expireTime string
    The expiration time of ufs volume, formatted in RFC3339 time string.
    id string
    The ID of UFS Volume.
    name string
    The name of UFS Volume.
    protocolType string
    The protocol type of ufs volume.
    remark string
    A remark assigned to UFS Volume.
    size number
    The size of ufs volume. Purchase the size of ufs volume in GB.
    storageType string
    The storage type of ufs volume.
    tag string
    A tag assigned to UFS Volume.
    create_time str
    The creation time of UFS Volume, formatted in RFC3339 time string.
    expire_time str
    The expiration time of ufs volume, formatted in RFC3339 time string.
    id str
    The ID of UFS Volume.
    name str
    The name of UFS Volume.
    protocol_type str
    The protocol type of ufs volume.
    remark str
    A remark assigned to UFS Volume.
    size float
    The size of ufs volume. Purchase the size of ufs volume in GB.
    storage_type str
    The storage type of ufs volume.
    tag str
    A tag assigned to UFS Volume.
    createTime String
    The creation time of UFS Volume, formatted in RFC3339 time string.
    expireTime String
    The expiration time of ufs volume, formatted in RFC3339 time string.
    id String
    The ID of UFS Volume.
    name String
    The name of UFS Volume.
    protocolType String
    The protocol type of ufs volume.
    remark String
    A remark assigned to UFS Volume.
    size Number
    The size of ufs volume. Purchase the size of ufs volume in GB.
    storageType String
    The storage type of ufs volume.
    tag String
    A tag assigned to UFS Volume.

    Package Details

    Repository
    ucloud ucloud/terraform-provider-ucloud
    License
    Notes
    This Pulumi package is based on the ucloud Terraform Provider.
    ucloud logo
    ucloud 1.39.1 published on Monday, Apr 14, 2025 by ucloud