Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
Provides a list of labels.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const foo = ucloud.getLabelResources({
key: "key",
value: "value",
resourceTypes: ["vip"],
projectIds: ["org-xxx"],
});
import pulumi
import pulumi_ucloud as ucloud
foo = ucloud.get_label_resources(key="key",
value="value",
resource_types=["vip"],
project_ids=["org-xxx"])
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 {
_, err := ucloud.GetLabelResources(ctx, &ucloud.GetLabelResourcesArgs{
Key: "key",
Value: "value",
ResourceTypes: []string{
"vip",
},
ProjectIds: []string{
"org-xxx",
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var foo = Ucloud.GetLabelResources.Invoke(new()
{
Key = "key",
Value = "value",
ResourceTypes = new[]
{
"vip",
},
ProjectIds = new[]
{
"org-xxx",
},
});
});
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.GetLabelResourcesArgs;
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 foo = UcloudFunctions.getLabelResources(GetLabelResourcesArgs.builder()
.key("key")
.value("value")
.resourceTypes("vip")
.projectIds("org-xxx")
.build());
}
}
variables:
foo:
fn::invoke:
function: ucloud:getLabelResources
arguments:
key: key
value: value
resourceTypes:
- vip
projectIds:
- org-xxx
Using getLabelResources
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 getLabelResources(args: GetLabelResourcesArgs, opts?: InvokeOptions): Promise<GetLabelResourcesResult>
function getLabelResourcesOutput(args: GetLabelResourcesOutputArgs, opts?: InvokeOptions): Output<GetLabelResourcesResult>def get_label_resources(id: Optional[str] = None,
key: Optional[str] = None,
output_file: Optional[str] = None,
project_ids: Optional[Sequence[str]] = None,
resource_types: Optional[Sequence[str]] = None,
value: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLabelResourcesResult
def get_label_resources_output(id: Optional[pulumi.Input[str]] = None,
key: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
project_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
resource_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
value: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLabelResourcesResult]func GetLabelResources(ctx *Context, args *GetLabelResourcesArgs, opts ...InvokeOption) (*GetLabelResourcesResult, error)
func GetLabelResourcesOutput(ctx *Context, args *GetLabelResourcesOutputArgs, opts ...InvokeOption) GetLabelResourcesResultOutput> Note: This function is named GetLabelResources in the Go SDK.
public static class GetLabelResources
{
public static Task<GetLabelResourcesResult> InvokeAsync(GetLabelResourcesArgs args, InvokeOptions? opts = null)
public static Output<GetLabelResourcesResult> Invoke(GetLabelResourcesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLabelResourcesResult> getLabelResources(GetLabelResourcesArgs args, InvokeOptions options)
public static Output<GetLabelResourcesResult> getLabelResources(GetLabelResourcesArgs args, InvokeOptions options)
fn::invoke:
function: ucloud:index/getLabelResources:getLabelResources
arguments:
# arguments dictionaryThe following arguments are supported:
- Key string
- key of the label.s
- Project
Ids List<string> - projects that own the attached resources, for example org-xxx.*
- Resource
Types List<string> - types of the attached resources, for example uhost.
- Value string
- value of the label
- Id string
- ID of the resource
- Output
File string - File name where to save data source results (after running
pulumi preview).
- Key string
- key of the label.s
- Project
Ids []string - projects that own the attached resources, for example org-xxx.*
- Resource
Types []string - types of the attached resources, for example uhost.
- Value string
- value of the label
- Id string
- ID of the resource
- Output
File string - File name where to save data source results (after running
pulumi preview).
- key String
- key of the label.s
- project
Ids List<String> - projects that own the attached resources, for example org-xxx.*
- resource
Types List<String> - types of the attached resources, for example uhost.
- value String
- value of the label
- id String
- ID of the resource
- output
File String - File name where to save data source results (after running
pulumi preview).
- key string
- key of the label.s
- project
Ids string[] - projects that own the attached resources, for example org-xxx.*
- resource
Types string[] - types of the attached resources, for example uhost.
- value string
- value of the label
- id string
- ID of the resource
- output
File string - File name where to save data source results (after running
pulumi preview).
- key str
- key of the label.s
- project_
ids Sequence[str] - projects that own the attached resources, for example org-xxx.*
- resource_
types Sequence[str] - types of the attached resources, for example uhost.
- value str
- value of the label
- id str
- ID of the resource
- output_
file str - File name where to save data source results (after running
pulumi preview).
- key String
- key of the label.s
- project
Ids List<String> - projects that own the attached resources, for example org-xxx.*
- resource
Types List<String> - types of the attached resources, for example uhost.
- value String
- value of the label
- id String
- ID of the resource
- output
File String - File name where to save data source results (after running
pulumi preview).
getLabelResources Result
The following output properties are available:
- Id string
- ID of the resource
- Key string
- Project
Ids List<string> - Resource
Types List<string> - Resources
List<Get
Label Resources Resource> - Resources with specific label and consists of following attribute
- Total
Count double - Value string
- Output
File string
- Id string
- ID of the resource
- Key string
- Project
Ids []string - Resource
Types []string - Resources
[]Get
Label Resources Resource - Resources with specific label and consists of following attribute
- Total
Count float64 - Value string
- Output
File string
- id String
- ID of the resource
- key String
- project
Ids List<String> - resource
Types List<String> - resources
List<Get
Label Resources Resource> - Resources with specific label and consists of following attribute
- total
Count Double - value String
- output
File String
- id string
- ID of the resource
- key string
- project
Ids string[] - resource
Types string[] - resources
Get
Label Resources Resource[] - Resources with specific label and consists of following attribute
- total
Count number - value string
- output
File string
- id str
- ID of the resource
- key str
- project_
ids Sequence[str] - resource_
types Sequence[str] - resources
Sequence[Get
Label Resources Resource] - Resources with specific label and consists of following attribute
- total_
count float - value str
- output_
file str
- id String
- ID of the resource
- key String
- project
Ids List<String> - resource
Types List<String> - resources List<Property Map>
- Resources with specific label and consists of following attribute
- total
Count Number - value String
- output
File String
Supporting Types
GetLabelResourcesResource
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloudTerraform Provider.
Viewing docs for ucloud 1.39.3
published on Wednesday, Mar 11, 2026 by ucloud
published on Wednesday, Mar 11, 2026 by ucloud
