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

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);
Copy
import pulumi
import pulumi_ucloud as ucloud

example = ucloud.get_ufs_volumes()
pulumi.export("first", example.ufs_volumes[0].id)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: ucloud:getUfsVolumes
      arguments: {}
outputs:
  first: ${example.ufsVolumes[0].id}
Copy

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>
Copy
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]
Copy
func GetUfsVolumes(ctx *Context, args *GetUfsVolumesArgs, opts ...InvokeOption) (*GetUfsVolumesResult, error)
func GetUfsVolumesOutput(ctx *Context, args *GetUfsVolumesOutputArgs, opts ...InvokeOption) GetUfsVolumesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetUfsVolumesResult> getUfsVolumes(GetUfsVolumesArgs args, InvokeOptions options)
public static Output<GetUfsVolumesResult> getUfsVolumes(GetUfsVolumesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ucloud:index/getUfsVolumes:getUfsVolumes
  arguments:
    # arguments dictionary
Copy

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