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

tencentcloud.KmsWhiteBoxKey

Explore with Pulumi AI

Provides a resource to create a kms white_box_key

Example Usage

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

const example = new tencentcloud.KmsWhiteBoxKey("example", {
    algorithm: "SM4",
    alias: "tf_example",
    description: "test desc.",
    status: "Enabled",
    tags: {
        createdBy: "terraform",
    },
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.KmsWhiteBoxKey("example",
    algorithm="SM4",
    alias="tf_example",
    description="test desc.",
    status="Enabled",
    tags={
        "createdBy": "terraform",
    })
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.NewKmsWhiteBoxKey(ctx, "example", &tencentcloud.KmsWhiteBoxKeyArgs{
			Algorithm:   pulumi.String("SM4"),
			Alias:       pulumi.String("tf_example"),
			Description: pulumi.String("test desc."),
			Status:      pulumi.String("Enabled"),
			Tags: pulumi.StringMap{
				"createdBy": pulumi.String("terraform"),
			},
		})
		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.KmsWhiteBoxKey("example", new()
    {
        Algorithm = "SM4",
        Alias = "tf_example",
        Description = "test desc.",
        Status = "Enabled",
        Tags = 
        {
            { "createdBy", "terraform" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.KmsWhiteBoxKey;
import com.pulumi.tencentcloud.KmsWhiteBoxKeyArgs;
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 KmsWhiteBoxKey("example", KmsWhiteBoxKeyArgs.builder()
            .algorithm("SM4")
            .alias("tf_example")
            .description("test desc.")
            .status("Enabled")
            .tags(Map.of("createdBy", "terraform"))
            .build());

    }
}
Copy
resources:
  example:
    type: tencentcloud:KmsWhiteBoxKey
    properties:
      algorithm: SM4
      alias: tf_example
      description: test desc.
      status: Enabled
      tags:
        createdBy: terraform
Copy

Create KmsWhiteBoxKey Resource

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

Constructor syntax

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

@overload
def KmsWhiteBoxKey(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   algorithm: Optional[str] = None,
                   alias: Optional[str] = None,
                   description: Optional[str] = None,
                   kms_white_box_key_id: Optional[str] = None,
                   status: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None)
func NewKmsWhiteBoxKey(ctx *Context, name string, args KmsWhiteBoxKeyArgs, opts ...ResourceOption) (*KmsWhiteBoxKey, error)
public KmsWhiteBoxKey(string name, KmsWhiteBoxKeyArgs args, CustomResourceOptions? opts = null)
public KmsWhiteBoxKey(String name, KmsWhiteBoxKeyArgs args)
public KmsWhiteBoxKey(String name, KmsWhiteBoxKeyArgs args, CustomResourceOptions options)
type: tencentcloud:KmsWhiteBoxKey
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. KmsWhiteBoxKeyArgs
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. KmsWhiteBoxKeyArgs
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. KmsWhiteBoxKeyArgs
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. KmsWhiteBoxKeyArgs
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. KmsWhiteBoxKeyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

KmsWhiteBoxKey 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 KmsWhiteBoxKey resource accepts the following input properties:

Algorithm This property is required. string
All algorithm types for creating keys, supported values: AES_256, SM4.
Alias This property is required. string
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
Description string
Description of the key, up to 1024 bytes.
KmsWhiteBoxKeyId string
ID of the resource.
Status string
Whether to enable the key. Enabled or Disabled. Default is Enabled.
Tags Dictionary<string, string>
The tags of Key.
Algorithm This property is required. string
All algorithm types for creating keys, supported values: AES_256, SM4.
Alias This property is required. string
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
Description string
Description of the key, up to 1024 bytes.
KmsWhiteBoxKeyId string
ID of the resource.
Status string
Whether to enable the key. Enabled or Disabled. Default is Enabled.
Tags map[string]string
The tags of Key.
algorithm This property is required. String
All algorithm types for creating keys, supported values: AES_256, SM4.
alias This property is required. String
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
description String
Description of the key, up to 1024 bytes.
kmsWhiteBoxKeyId String
ID of the resource.
status String
Whether to enable the key. Enabled or Disabled. Default is Enabled.
tags Map<String,String>
The tags of Key.
algorithm This property is required. string
All algorithm types for creating keys, supported values: AES_256, SM4.
alias This property is required. string
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
description string
Description of the key, up to 1024 bytes.
kmsWhiteBoxKeyId string
ID of the resource.
status string
Whether to enable the key. Enabled or Disabled. Default is Enabled.
tags {[key: string]: string}
The tags of Key.
algorithm This property is required. str
All algorithm types for creating keys, supported values: AES_256, SM4.
alias This property is required. str
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
description str
Description of the key, up to 1024 bytes.
kms_white_box_key_id str
ID of the resource.
status str
Whether to enable the key. Enabled or Disabled. Default is Enabled.
tags Mapping[str, str]
The tags of Key.
algorithm This property is required. String
All algorithm types for creating keys, supported values: AES_256, SM4.
alias This property is required. String
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
description String
Description of the key, up to 1024 bytes.
kmsWhiteBoxKeyId String
ID of the resource.
status String
Whether to enable the key. Enabled or Disabled. Default is Enabled.
tags Map<String>
The tags of Key.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing KmsWhiteBoxKey Resource

Get an existing KmsWhiteBoxKey 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?: KmsWhiteBoxKeyState, opts?: CustomResourceOptions): KmsWhiteBoxKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        algorithm: Optional[str] = None,
        alias: Optional[str] = None,
        description: Optional[str] = None,
        kms_white_box_key_id: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None) -> KmsWhiteBoxKey
func GetKmsWhiteBoxKey(ctx *Context, name string, id IDInput, state *KmsWhiteBoxKeyState, opts ...ResourceOption) (*KmsWhiteBoxKey, error)
public static KmsWhiteBoxKey Get(string name, Input<string> id, KmsWhiteBoxKeyState? state, CustomResourceOptions? opts = null)
public static KmsWhiteBoxKey get(String name, Output<String> id, KmsWhiteBoxKeyState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:KmsWhiteBoxKey    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:
Algorithm string
All algorithm types for creating keys, supported values: AES_256, SM4.
Alias string
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
Description string
Description of the key, up to 1024 bytes.
KmsWhiteBoxKeyId string
ID of the resource.
Status string
Whether to enable the key. Enabled or Disabled. Default is Enabled.
Tags Dictionary<string, string>
The tags of Key.
Algorithm string
All algorithm types for creating keys, supported values: AES_256, SM4.
Alias string
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
Description string
Description of the key, up to 1024 bytes.
KmsWhiteBoxKeyId string
ID of the resource.
Status string
Whether to enable the key. Enabled or Disabled. Default is Enabled.
Tags map[string]string
The tags of Key.
algorithm String
All algorithm types for creating keys, supported values: AES_256, SM4.
alias String
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
description String
Description of the key, up to 1024 bytes.
kmsWhiteBoxKeyId String
ID of the resource.
status String
Whether to enable the key. Enabled or Disabled. Default is Enabled.
tags Map<String,String>
The tags of Key.
algorithm string
All algorithm types for creating keys, supported values: AES_256, SM4.
alias string
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
description string
Description of the key, up to 1024 bytes.
kmsWhiteBoxKeyId string
ID of the resource.
status string
Whether to enable the key. Enabled or Disabled. Default is Enabled.
tags {[key: string]: string}
The tags of Key.
algorithm str
All algorithm types for creating keys, supported values: AES_256, SM4.
alias str
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
description str
Description of the key, up to 1024 bytes.
kms_white_box_key_id str
ID of the resource.
status str
Whether to enable the key. Enabled or Disabled. Default is Enabled.
tags Mapping[str, str]
The tags of Key.
algorithm String
All algorithm types for creating keys, supported values: AES_256, SM4.
alias String
As an alias for the key to be easier to identify and easier to understand, it cannot be empty and is a combination of 1-60 alphanumeric characters - _. The first character must be a letter or number. Alias are not repeatable.
description String
Description of the key, up to 1024 bytes.
kmsWhiteBoxKeyId String
ID of the resource.
status String
Whether to enable the key. Enabled or Disabled. Default is Enabled.
tags Map<String>
The tags of Key.

Import

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

$ pulumi import tencentcloud:index/kmsWhiteBoxKey:KmsWhiteBoxKey example 244dab8c-6dad-11ea-80c6-5254006d0810
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.