@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
93 lines (92 loc) • 3.19 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this data source to query the tag list of a specifies resource within HuaweiCloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const config = new pulumi.Config();
* const instanceId = config.requireObject("instanceId");
* const test = huaweicloud.Er.getResourceTags({
* resourceType: "instance",
* resourceId: instanceId,
* });
* ```
*/
export declare function getResourceTags(args: GetResourceTagsArgs, opts?: pulumi.InvokeOptions): Promise<GetResourceTagsResult>;
/**
* A collection of arguments for invoking getResourceTags.
*/
export interface GetResourceTagsArgs {
/**
* Specifies the region in which to query the resource tags.
* If omitted, the provider-level region will be used.
*/
region?: string;
/**
* Specifies the resource ID to which the tags belong that to be queried.
*/
resourceId: string;
/**
* Specifies the resource type to which the tags belong that to be queried.
* The valid values are as follows:
* + **instance**: enterprise router instance.
* + **route-table**: route table.
* + **vpc-attachment**: VPC connection.
* + **vgw-attachment**: virtual gateway connection.
* + **peering-attachment**: peering connection.
* + **vpn-attachment**: VPN gateway connection.
* + **ecn-attachment**: enterprise network connection.
* + **cfw-attachment**: cloud firewall connection.
*/
resourceType: string;
}
/**
* A collection of values returned by getResourceTags.
*/
export interface GetResourceTagsResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly region: string;
readonly resourceId: string;
readonly resourceType: string;
/**
* The tags of a specified resource.
*/
readonly tags: {
[key: string]: string;
};
}
export declare function getResourceTagsOutput(args: GetResourceTagsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetResourceTagsResult>;
/**
* A collection of arguments for invoking getResourceTags.
*/
export interface GetResourceTagsOutputArgs {
/**
* Specifies the region in which to query the resource tags.
* If omitted, the provider-level region will be used.
*/
region?: pulumi.Input<string>;
/**
* Specifies the resource ID to which the tags belong that to be queried.
*/
resourceId: pulumi.Input<string>;
/**
* Specifies the resource type to which the tags belong that to be queried.
* The valid values are as follows:
* + **instance**: enterprise router instance.
* + **route-table**: route table.
* + **vpc-attachment**: VPC connection.
* + **vgw-attachment**: virtual gateway connection.
* + **peering-attachment**: peering connection.
* + **vpn-attachment**: VPN gateway connection.
* + **ecn-attachment**: enterprise network connection.
* + **cfw-attachment**: cloud firewall connection.
*/
resourceType: pulumi.Input<string>;
}