1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getTmsResourceInstancesV1
opentelekomcloud 1.36.47 published on Thursday, Sep 4, 2025 by opentelekomcloud

opentelekomcloud.getTmsResourceInstancesV1

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.47 published on Thursday, Sep 4, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for TMS resource instances you can get at documentation portal

    Use this data source to get the list of resource instances filtered by tag within OpenTelekomCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const projectId = config.requireObject("projectId");
    const tagsDs1 = opentelekomcloud.getTmsResourceInstancesV1({
        resourceTypes: [
            "disk",
            "ecs",
        ],
        tags: [{
            key: "test",
            values: ["test-tf-acc"],
        }],
        projectId: projectId,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    project_id = config.require_object("projectId")
    tags_ds1 = opentelekomcloud.get_tms_resource_instances_v1(resource_types=[
            "disk",
            "ecs",
        ],
        tags=[{
            "key": "test",
            "values": ["test-tf-acc"],
        }],
        project_id=project_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		projectId := cfg.RequireObject("projectId")
    		_, err := opentelekomcloud.GetTmsResourceInstancesV1(ctx, &opentelekomcloud.GetTmsResourceInstancesV1Args{
    			ResourceTypes: []string{
    				"disk",
    				"ecs",
    			},
    			Tags: []opentelekomcloud.GetTmsResourceInstancesV1Tag{
    				{
    					Key: "test",
    					Values: []string{
    						"test-tf-acc",
    					},
    				},
    			},
    			ProjectId: pulumi.StringRef(projectId),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var projectId = config.RequireObject<dynamic>("projectId");
        var tagsDs1 = Opentelekomcloud.GetTmsResourceInstancesV1.Invoke(new()
        {
            ResourceTypes = new[]
            {
                "disk",
                "ecs",
            },
            Tags = new[]
            {
                new Opentelekomcloud.Inputs.GetTmsResourceInstancesV1TagInputArgs
                {
                    Key = "test",
                    Values = new[]
                    {
                        "test-tf-acc",
                    },
                },
            },
            ProjectId = projectId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.inputs.GetTmsResourceInstancesV1Args;
    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 config = ctx.config();
            final var projectId = config.get("projectId");
            final var tagsDs1 = OpentelekomcloudFunctions.getTmsResourceInstancesV1(GetTmsResourceInstancesV1Args.builder()
                .resourceTypes(            
                    "disk",
                    "ecs")
                .tags(GetTmsResourceInstancesV1TagArgs.builder()
                    .key("test")
                    .values("test-tf-acc")
                    .build())
                .projectId(projectId)
                .build());
    
        }
    }
    
    configuration:
      projectId:
        type: dynamic
    variables:
      tagsDs1:
        fn::invoke:
          function: opentelekomcloud:getTmsResourceInstancesV1
          arguments:
            resourceTypes:
              - disk
              - ecs
            tags:
              - key: test
                values:
                  - test-tf-acc
            projectId: ${projectId}
    

    Using getTmsResourceInstancesV1

    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 getTmsResourceInstancesV1(args: GetTmsResourceInstancesV1Args, opts?: InvokeOptions): Promise<GetTmsResourceInstancesV1Result>
    function getTmsResourceInstancesV1Output(args: GetTmsResourceInstancesV1OutputArgs, opts?: InvokeOptions): Output<GetTmsResourceInstancesV1Result>
    def get_tms_resource_instances_v1(id: Optional[str] = None,
                                      project_id: Optional[str] = None,
                                      resource_types: Optional[Sequence[str]] = None,
                                      tags: Optional[Sequence[GetTmsResourceInstancesV1Tag]] = None,
                                      without_any_tag: Optional[bool] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetTmsResourceInstancesV1Result
    def get_tms_resource_instances_v1_output(id: Optional[pulumi.Input[str]] = None,
                                      project_id: Optional[pulumi.Input[str]] = None,
                                      resource_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                      tags: Optional[pulumi.Input[Sequence[pulumi.Input[GetTmsResourceInstancesV1TagArgs]]]] = None,
                                      without_any_tag: Optional[pulumi.Input[bool]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetTmsResourceInstancesV1Result]
    func GetTmsResourceInstancesV1(ctx *Context, args *GetTmsResourceInstancesV1Args, opts ...InvokeOption) (*GetTmsResourceInstancesV1Result, error)
    func GetTmsResourceInstancesV1Output(ctx *Context, args *GetTmsResourceInstancesV1OutputArgs, opts ...InvokeOption) GetTmsResourceInstancesV1ResultOutput

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

    public static class GetTmsResourceInstancesV1 
    {
        public static Task<GetTmsResourceInstancesV1Result> InvokeAsync(GetTmsResourceInstancesV1Args args, InvokeOptions? opts = null)
        public static Output<GetTmsResourceInstancesV1Result> Invoke(GetTmsResourceInstancesV1InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTmsResourceInstancesV1Result> getTmsResourceInstancesV1(GetTmsResourceInstancesV1Args args, InvokeOptions options)
    public static Output<GetTmsResourceInstancesV1Result> getTmsResourceInstancesV1(GetTmsResourceInstancesV1Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getTmsResourceInstancesV1:getTmsResourceInstancesV1
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ResourceTypes List<string>
    Specifies the resource type. This parameter is case-sensitive. Supported resource types can be provided as ecs,scaling_group, images, disk,vpcs,security-groups, shared_bandwidth,eip, cdn.
    Tags List<GetTmsResourceInstancesV1Tag>
    Specifies the list of tags. The structure is documented below.
    Id string
    The data source ID.
    ProjectId string
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    WithoutAnyTag bool
    Specifies whether to query only untagged resources. If this parameter is set to true, only untagged resources are queried.
    ResourceTypes []string
    Specifies the resource type. This parameter is case-sensitive. Supported resource types can be provided as ecs,scaling_group, images, disk,vpcs,security-groups, shared_bandwidth,eip, cdn.
    Tags []GetTmsResourceInstancesV1Tag
    Specifies the list of tags. The structure is documented below.
    Id string
    The data source ID.
    ProjectId string
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    WithoutAnyTag bool
    Specifies whether to query only untagged resources. If this parameter is set to true, only untagged resources are queried.
    resourceTypes List<String>
    Specifies the resource type. This parameter is case-sensitive. Supported resource types can be provided as ecs,scaling_group, images, disk,vpcs,security-groups, shared_bandwidth,eip, cdn.
    tags List<GetTmsResourceInstancesV1Tag>
    Specifies the list of tags. The structure is documented below.
    id String
    The data source ID.
    projectId String
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    withoutAnyTag Boolean
    Specifies whether to query only untagged resources. If this parameter is set to true, only untagged resources are queried.
    resourceTypes string[]
    Specifies the resource type. This parameter is case-sensitive. Supported resource types can be provided as ecs,scaling_group, images, disk,vpcs,security-groups, shared_bandwidth,eip, cdn.
    tags GetTmsResourceInstancesV1Tag[]
    Specifies the list of tags. The structure is documented below.
    id string
    The data source ID.
    projectId string
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    withoutAnyTag boolean
    Specifies whether to query only untagged resources. If this parameter is set to true, only untagged resources are queried.
    resource_types Sequence[str]
    Specifies the resource type. This parameter is case-sensitive. Supported resource types can be provided as ecs,scaling_group, images, disk,vpcs,security-groups, shared_bandwidth,eip, cdn.
    tags Sequence[GetTmsResourceInstancesV1Tag]
    Specifies the list of tags. The structure is documented below.
    id str
    The data source ID.
    project_id str
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    without_any_tag bool
    Specifies whether to query only untagged resources. If this parameter is set to true, only untagged resources are queried.
    resourceTypes List<String>
    Specifies the resource type. This parameter is case-sensitive. Supported resource types can be provided as ecs,scaling_group, images, disk,vpcs,security-groups, shared_bandwidth,eip, cdn.
    tags List<Property Map>
    Specifies the list of tags. The structure is documented below.
    id String
    The data source ID.
    projectId String
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    withoutAnyTag Boolean
    Specifies whether to query only untagged resources. If this parameter is set to true, only untagged resources are queried.

    getTmsResourceInstancesV1 Result

    The following output properties are available:

    Id string
    The data source ID.
    ResourceTypes List<string>
    Resources List<GetTmsResourceInstancesV1Resource>
    Indicates the list of resources. The structure is documented below.
    Tags List<GetTmsResourceInstancesV1Tag>
    Indicates the resource tags.
    ProjectId string
    Indicates the project ID.
    WithoutAnyTag bool
    Id string
    The data source ID.
    ResourceTypes []string
    Resources []GetTmsResourceInstancesV1Resource
    Indicates the list of resources. The structure is documented below.
    Tags []GetTmsResourceInstancesV1Tag
    Indicates the resource tags.
    ProjectId string
    Indicates the project ID.
    WithoutAnyTag bool
    id String
    The data source ID.
    resourceTypes List<String>
    resources List<GetTmsResourceInstancesV1Resource>
    Indicates the list of resources. The structure is documented below.
    tags List<GetTmsResourceInstancesV1Tag>
    Indicates the resource tags.
    projectId String
    Indicates the project ID.
    withoutAnyTag Boolean
    id string
    The data source ID.
    resourceTypes string[]
    resources GetTmsResourceInstancesV1Resource[]
    Indicates the list of resources. The structure is documented below.
    tags GetTmsResourceInstancesV1Tag[]
    Indicates the resource tags.
    projectId string
    Indicates the project ID.
    withoutAnyTag boolean
    id str
    The data source ID.
    resource_types Sequence[str]
    resources Sequence[GetTmsResourceInstancesV1Resource]
    Indicates the list of resources. The structure is documented below.
    tags Sequence[GetTmsResourceInstancesV1Tag]
    Indicates the resource tags.
    project_id str
    Indicates the project ID.
    without_any_tag bool
    id String
    The data source ID.
    resourceTypes List<String>
    resources List<Property Map>
    Indicates the list of resources. The structure is documented below.
    tags List<Property Map>
    Indicates the resource tags.
    projectId String
    Indicates the project ID.
    withoutAnyTag Boolean

    Supporting Types

    GetTmsResourceInstancesV1Resource

    ProjectId string
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    ProjectName string
    Indicates the project name.
    ResourceId string
    Indicates the resource ID.
    ResourceName string
    Indicates the resource name.
    ResourceType string
    Indicates the resource type.
    Tags Dictionary<string, string>
    Specifies the list of tags. The structure is documented below.
    ProjectId string
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    ProjectName string
    Indicates the project name.
    ResourceId string
    Indicates the resource ID.
    ResourceName string
    Indicates the resource name.
    ResourceType string
    Indicates the resource type.
    Tags map[string]string
    Specifies the list of tags. The structure is documented below.
    projectId String
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    projectName String
    Indicates the project name.
    resourceId String
    Indicates the resource ID.
    resourceName String
    Indicates the resource name.
    resourceType String
    Indicates the resource type.
    tags Map<String,String>
    Specifies the list of tags. The structure is documented below.
    projectId string
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    projectName string
    Indicates the project name.
    resourceId string
    Indicates the resource ID.
    resourceName string
    Indicates the resource name.
    resourceType string
    Indicates the resource type.
    tags {[key: string]: string}
    Specifies the list of tags. The structure is documented below.
    project_id str
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    project_name str
    Indicates the project name.
    resource_id str
    Indicates the resource ID.
    resource_name str
    Indicates the resource name.
    resource_type str
    Indicates the resource type.
    tags Mapping[str, str]
    Specifies the list of tags. The structure is documented below.
    projectId String
    Specifies the Project ID. This parameter is mandatory when resource_type is a region-specific service.
    projectName String
    Indicates the project name.
    resourceId String
    Indicates the resource ID.
    resourceName String
    Indicates the resource name.
    resourceType String
    Indicates the resource type.
    tags Map<String>
    Specifies the list of tags. The structure is documented below.

    GetTmsResourceInstancesV1Tag

    Key string
    Specifies the key. It can contain up to 36 characters. The key cannot be empty. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.
    Values List<string>
    Specifies tag values. Each value contains a maximum of 43 Unicode characters and can be an empty string. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.
    Key string
    Specifies the key. It can contain up to 36 characters. The key cannot be empty. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.
    Values []string
    Specifies tag values. Each value contains a maximum of 43 Unicode characters and can be an empty string. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.
    key String
    Specifies the key. It can contain up to 36 characters. The key cannot be empty. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.
    values List<String>
    Specifies tag values. Each value contains a maximum of 43 Unicode characters and can be an empty string. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.
    key string
    Specifies the key. It can contain up to 36 characters. The key cannot be empty. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.
    values string[]
    Specifies tag values. Each value contains a maximum of 43 Unicode characters and can be an empty string. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.
    key str
    Specifies the key. It can contain up to 36 characters. The key cannot be empty. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.
    values Sequence[str]
    Specifies tag values. Each value contains a maximum of 43 Unicode characters and can be an empty string. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.
    key String
    Specifies the key. It can contain up to 36 characters. The key cannot be empty. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.
    values List<String>
    Specifies tag values. Each value contains a maximum of 43 Unicode characters and can be an empty string. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.47 published on Thursday, Sep 4, 2025 by opentelekomcloud