1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. KmsCloudResourceAttachment
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.KmsCloudResourceAttachment

Explore with Pulumi AI

Provides a resource to create a kms cloud_resource_attachment

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const example = new tencentcloud.KmsCloudResourceAttachment("example", {
    keyId: "72688f39-1fe8-11ee-9f1a-525400cf25a4",
    productId: "mysql",
    resourceId: "cdb-fitq5t9h",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.KmsCloudResourceAttachment("example",
    key_id="72688f39-1fe8-11ee-9f1a-525400cf25a4",
    product_id="mysql",
    resource_id="cdb-fitq5t9h")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tencentcloud.NewKmsCloudResourceAttachment(ctx, "example", &tencentcloud.KmsCloudResourceAttachmentArgs{
			KeyId:      pulumi.String("72688f39-1fe8-11ee-9f1a-525400cf25a4"),
			ProductId:  pulumi.String("mysql"),
			ResourceId: pulumi.String("cdb-fitq5t9h"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var example = new Tencentcloud.KmsCloudResourceAttachment("example", new()
    {
        KeyId = "72688f39-1fe8-11ee-9f1a-525400cf25a4",
        ProductId = "mysql",
        ResourceId = "cdb-fitq5t9h",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.KmsCloudResourceAttachment;
import com.pulumi.tencentcloud.KmsCloudResourceAttachmentArgs;
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) {
        var example = new KmsCloudResourceAttachment("example", KmsCloudResourceAttachmentArgs.builder()
            .keyId("72688f39-1fe8-11ee-9f1a-525400cf25a4")
            .productId("mysql")
            .resourceId("cdb-fitq5t9h")
            .build());

    }
}
Copy
resources:
  example:
    type: tencentcloud:KmsCloudResourceAttachment
    properties:
      keyId: 72688f39-1fe8-11ee-9f1a-525400cf25a4
      productId: mysql
      resourceId: cdb-fitq5t9h
Copy

Create KmsCloudResourceAttachment Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new KmsCloudResourceAttachment(name: string, args: KmsCloudResourceAttachmentArgs, opts?: CustomResourceOptions);
@overload
def KmsCloudResourceAttachment(resource_name: str,
                               args: KmsCloudResourceAttachmentArgs,
                               opts: Optional[ResourceOptions] = None)

@overload
def KmsCloudResourceAttachment(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               key_id: Optional[str] = None,
                               product_id: Optional[str] = None,
                               resource_id: Optional[str] = None,
                               kms_cloud_resource_attachment_id: Optional[str] = None)
func NewKmsCloudResourceAttachment(ctx *Context, name string, args KmsCloudResourceAttachmentArgs, opts ...ResourceOption) (*KmsCloudResourceAttachment, error)
public KmsCloudResourceAttachment(string name, KmsCloudResourceAttachmentArgs args, CustomResourceOptions? opts = null)
public KmsCloudResourceAttachment(String name, KmsCloudResourceAttachmentArgs args)
public KmsCloudResourceAttachment(String name, KmsCloudResourceAttachmentArgs args, CustomResourceOptions options)
type: tencentcloud:KmsCloudResourceAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. KmsCloudResourceAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. KmsCloudResourceAttachmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. KmsCloudResourceAttachmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. KmsCloudResourceAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. KmsCloudResourceAttachmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

KmsCloudResourceAttachment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The KmsCloudResourceAttachment resource accepts the following input properties:

KeyId This property is required. string
CMK unique identifier.
ProductId This property is required. string
A unique identifier for the cloud product.
ResourceId This property is required. string
The resource/instance ID of the cloud product.
KmsCloudResourceAttachmentId string
ID of the resource.
KeyId This property is required. string
CMK unique identifier.
ProductId This property is required. string
A unique identifier for the cloud product.
ResourceId This property is required. string
The resource/instance ID of the cloud product.
KmsCloudResourceAttachmentId string
ID of the resource.
keyId This property is required. String
CMK unique identifier.
productId This property is required. String
A unique identifier for the cloud product.
resourceId This property is required. String
The resource/instance ID of the cloud product.
kmsCloudResourceAttachmentId String
ID of the resource.
keyId This property is required. string
CMK unique identifier.
productId This property is required. string
A unique identifier for the cloud product.
resourceId This property is required. string
The resource/instance ID of the cloud product.
kmsCloudResourceAttachmentId string
ID of the resource.
key_id This property is required. str
CMK unique identifier.
product_id This property is required. str
A unique identifier for the cloud product.
resource_id This property is required. str
The resource/instance ID of the cloud product.
kms_cloud_resource_attachment_id str
ID of the resource.
keyId This property is required. String
CMK unique identifier.
productId This property is required. String
A unique identifier for the cloud product.
resourceId This property is required. String
The resource/instance ID of the cloud product.
kmsCloudResourceAttachmentId String
ID of the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the KmsCloudResourceAttachment resource produces the following output properties:

Alias string
Alias.
Description string
Description.
Id string
The provider-assigned unique ID for this managed resource.
KeyState string
Key state.
KeyUsage string
Key usage.
Owner string
owner.
Alias string
Alias.
Description string
Description.
Id string
The provider-assigned unique ID for this managed resource.
KeyState string
Key state.
KeyUsage string
Key usage.
Owner string
owner.
alias String
Alias.
description String
Description.
id String
The provider-assigned unique ID for this managed resource.
keyState String
Key state.
keyUsage String
Key usage.
owner String
owner.
alias string
Alias.
description string
Description.
id string
The provider-assigned unique ID for this managed resource.
keyState string
Key state.
keyUsage string
Key usage.
owner string
owner.
alias str
Alias.
description str
Description.
id str
The provider-assigned unique ID for this managed resource.
key_state str
Key state.
key_usage str
Key usage.
owner str
owner.
alias String
Alias.
description String
Description.
id String
The provider-assigned unique ID for this managed resource.
keyState String
Key state.
keyUsage String
Key usage.
owner String
owner.

Look up Existing KmsCloudResourceAttachment Resource

Get an existing KmsCloudResourceAttachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: KmsCloudResourceAttachmentState, opts?: CustomResourceOptions): KmsCloudResourceAttachment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        alias: Optional[str] = None,
        description: Optional[str] = None,
        key_id: Optional[str] = None,
        key_state: Optional[str] = None,
        key_usage: Optional[str] = None,
        kms_cloud_resource_attachment_id: Optional[str] = None,
        owner: Optional[str] = None,
        product_id: Optional[str] = None,
        resource_id: Optional[str] = None) -> KmsCloudResourceAttachment
func GetKmsCloudResourceAttachment(ctx *Context, name string, id IDInput, state *KmsCloudResourceAttachmentState, opts ...ResourceOption) (*KmsCloudResourceAttachment, error)
public static KmsCloudResourceAttachment Get(string name, Input<string> id, KmsCloudResourceAttachmentState? state, CustomResourceOptions? opts = null)
public static KmsCloudResourceAttachment get(String name, Output<String> id, KmsCloudResourceAttachmentState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:KmsCloudResourceAttachment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Alias string
Alias.
Description string
Description.
KeyId string
CMK unique identifier.
KeyState string
Key state.
KeyUsage string
Key usage.
KmsCloudResourceAttachmentId string
ID of the resource.
Owner string
owner.
ProductId string
A unique identifier for the cloud product.
ResourceId string
The resource/instance ID of the cloud product.
Alias string
Alias.
Description string
Description.
KeyId string
CMK unique identifier.
KeyState string
Key state.
KeyUsage string
Key usage.
KmsCloudResourceAttachmentId string
ID of the resource.
Owner string
owner.
ProductId string
A unique identifier for the cloud product.
ResourceId string
The resource/instance ID of the cloud product.
alias String
Alias.
description String
Description.
keyId String
CMK unique identifier.
keyState String
Key state.
keyUsage String
Key usage.
kmsCloudResourceAttachmentId String
ID of the resource.
owner String
owner.
productId String
A unique identifier for the cloud product.
resourceId String
The resource/instance ID of the cloud product.
alias string
Alias.
description string
Description.
keyId string
CMK unique identifier.
keyState string
Key state.
keyUsage string
Key usage.
kmsCloudResourceAttachmentId string
ID of the resource.
owner string
owner.
productId string
A unique identifier for the cloud product.
resourceId string
The resource/instance ID of the cloud product.
alias str
Alias.
description str
Description.
key_id str
CMK unique identifier.
key_state str
Key state.
key_usage str
Key usage.
kms_cloud_resource_attachment_id str
ID of the resource.
owner str
owner.
product_id str
A unique identifier for the cloud product.
resource_id str
The resource/instance ID of the cloud product.
alias String
Alias.
description String
Description.
keyId String
CMK unique identifier.
keyState String
Key state.
keyUsage String
Key usage.
kmsCloudResourceAttachmentId String
ID of the resource.
owner String
owner.
productId String
A unique identifier for the cloud product.
resourceId String
The resource/instance ID of the cloud product.

Import

kms cloud_resource_attachment can be imported using the id, e.g.

$ pulumi import tencentcloud:index/kmsCloudResourceAttachment:KmsCloudResourceAttachment example 72688f39-1fe8-11ee-9f1a-525400cf25a4#mysql#cdb-fitq5t9h
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.