opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud
opentelekomcloud.getKmsDataKeyV1
Explore with Pulumi AI
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud
Use this data source to get the plaintext and the ciphertext of an available OpenTelekomCloud KMS DEK (data encryption key).
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const key1 = new opentelekomcloud.KmsKeyV1("key1", {
    keyAlias: "key_1",
    pendingDays: "7",
    keyDescription: "first test key",
});
const kmsDatakey1 = opentelekomcloud.getKmsDataKeyV1Output({
    keyId: key1.kmsKeyV1Id,
    datakeyLength: "512",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
key1 = opentelekomcloud.KmsKeyV1("key1",
    key_alias="key_1",
    pending_days="7",
    key_description="first test key")
kms_datakey1 = opentelekomcloud.get_kms_data_key_v1_output(key_id=key1.kms_key_v1_id,
    datakey_length="512")
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		key1, err := opentelekomcloud.NewKmsKeyV1(ctx, "key1", &opentelekomcloud.KmsKeyV1Args{
			KeyAlias:       pulumi.String("key_1"),
			PendingDays:    pulumi.String("7"),
			KeyDescription: pulumi.String("first test key"),
		})
		if err != nil {
			return err
		}
		_ = opentelekomcloud.GetKmsDataKeyV1Output(ctx, opentelekomcloud.GetKmsDataKeyV1OutputArgs{
			KeyId:         key1.KmsKeyV1Id,
			DatakeyLength: pulumi.String("512"),
		}, nil)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() => 
{
    var key1 = new Opentelekomcloud.KmsKeyV1("key1", new()
    {
        KeyAlias = "key_1",
        PendingDays = "7",
        KeyDescription = "first test key",
    });
    var kmsDatakey1 = Opentelekomcloud.GetKmsDataKeyV1.Invoke(new()
    {
        KeyId = key1.KmsKeyV1Id,
        DatakeyLength = "512",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.KmsKeyV1;
import com.pulumi.opentelekomcloud.KmsKeyV1Args;
import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
import com.pulumi.opentelekomcloud.inputs.GetKmsDataKeyV1Args;
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 key1 = new KmsKeyV1("key1", KmsKeyV1Args.builder()
            .keyAlias("key_1")
            .pendingDays("7")
            .keyDescription("first test key")
            .build());
        final var kmsDatakey1 = OpentelekomcloudFunctions.getKmsDataKeyV1(GetKmsDataKeyV1Args.builder()
            .keyId(key1.kmsKeyV1Id())
            .datakeyLength("512")
            .build());
    }
}
resources:
  key1:
    type: opentelekomcloud:KmsKeyV1
    properties:
      keyAlias: key_1
      pendingDays: '7'
      keyDescription: first test key
variables:
  kmsDatakey1:
    fn::invoke:
      function: opentelekomcloud:getKmsDataKeyV1
      arguments:
        keyId: ${key1.kmsKeyV1Id}
        datakeyLength: '512'
Using getKmsDataKeyV1
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 getKmsDataKeyV1(args: GetKmsDataKeyV1Args, opts?: InvokeOptions): Promise<GetKmsDataKeyV1Result>
function getKmsDataKeyV1Output(args: GetKmsDataKeyV1OutputArgs, opts?: InvokeOptions): Output<GetKmsDataKeyV1Result>def get_kms_data_key_v1(datakey_length: Optional[str] = None,
                        encryption_context: Optional[str] = None,
                        id: Optional[str] = None,
                        key_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetKmsDataKeyV1Result
def get_kms_data_key_v1_output(datakey_length: Optional[pulumi.Input[str]] = None,
                        encryption_context: Optional[pulumi.Input[str]] = None,
                        id: Optional[pulumi.Input[str]] = None,
                        key_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetKmsDataKeyV1Result]func GetKmsDataKeyV1(ctx *Context, args *GetKmsDataKeyV1Args, opts ...InvokeOption) (*GetKmsDataKeyV1Result, error)
func GetKmsDataKeyV1Output(ctx *Context, args *GetKmsDataKeyV1OutputArgs, opts ...InvokeOption) GetKmsDataKeyV1ResultOutput> Note: This function is named GetKmsDataKeyV1 in the Go SDK.
public static class GetKmsDataKeyV1 
{
    public static Task<GetKmsDataKeyV1Result> InvokeAsync(GetKmsDataKeyV1Args args, InvokeOptions? opts = null)
    public static Output<GetKmsDataKeyV1Result> Invoke(GetKmsDataKeyV1InvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetKmsDataKeyV1Result> getKmsDataKeyV1(GetKmsDataKeyV1Args args, InvokeOptions options)
public static Output<GetKmsDataKeyV1Result> getKmsDataKeyV1(GetKmsDataKeyV1Args args, InvokeOptions options)
fn::invoke:
  function: opentelekomcloud:index/getKmsDataKeyV1:getKmsDataKeyV1
  arguments:
    # arguments dictionaryThe following arguments are supported:
- DatakeyLength string
- Number of bits in the length of a DEK (data encryption keys). The maximum number is 512. Changing this gets the new data encryption key.
- KeyId string
- The globally unique identifier for the key. Changing this gets the new data encryption key.
- EncryptionContext string
- The value of this parameter must be a series of "key:value" pairs used to record resource context information. The value of this parameter must not contain sensitive information and must be within 8192 characters in length. Example: {"Key1":"Value1","Key2":"Value2"}
- Id string
- DatakeyLength string
- Number of bits in the length of a DEK (data encryption keys). The maximum number is 512. Changing this gets the new data encryption key.
- KeyId string
- The globally unique identifier for the key. Changing this gets the new data encryption key.
- EncryptionContext string
- The value of this parameter must be a series of "key:value" pairs used to record resource context information. The value of this parameter must not contain sensitive information and must be within 8192 characters in length. Example: {"Key1":"Value1","Key2":"Value2"}
- Id string
- datakeyLength String
- Number of bits in the length of a DEK (data encryption keys). The maximum number is 512. Changing this gets the new data encryption key.
- keyId String
- The globally unique identifier for the key. Changing this gets the new data encryption key.
- encryptionContext String
- The value of this parameter must be a series of "key:value" pairs used to record resource context information. The value of this parameter must not contain sensitive information and must be within 8192 characters in length. Example: {"Key1":"Value1","Key2":"Value2"}
- id String
- datakeyLength string
- Number of bits in the length of a DEK (data encryption keys). The maximum number is 512. Changing this gets the new data encryption key.
- keyId string
- The globally unique identifier for the key. Changing this gets the new data encryption key.
- encryptionContext string
- The value of this parameter must be a series of "key:value" pairs used to record resource context information. The value of this parameter must not contain sensitive information and must be within 8192 characters in length. Example: {"Key1":"Value1","Key2":"Value2"}
- id string
- datakey_length str
- Number of bits in the length of a DEK (data encryption keys). The maximum number is 512. Changing this gets the new data encryption key.
- key_id str
- The globally unique identifier for the key. Changing this gets the new data encryption key.
- encryption_context str
- The value of this parameter must be a series of "key:value" pairs used to record resource context information. The value of this parameter must not contain sensitive information and must be within 8192 characters in length. Example: {"Key1":"Value1","Key2":"Value2"}
- id str
- datakeyLength String
- Number of bits in the length of a DEK (data encryption keys). The maximum number is 512. Changing this gets the new data encryption key.
- keyId String
- The globally unique identifier for the key. Changing this gets the new data encryption key.
- encryptionContext String
- The value of this parameter must be a series of "key:value" pairs used to record resource context information. The value of this parameter must not contain sensitive information and must be within 8192 characters in length. Example: {"Key1":"Value1","Key2":"Value2"}
- id String
getKmsDataKeyV1 Result
The following output properties are available:
- CipherText string
- The ciphertext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- DatakeyLength string
- Id string
- KeyId string
- PlainText string
- The plaintext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- EncryptionContext string
- CipherText string
- The ciphertext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- DatakeyLength string
- Id string
- KeyId string
- PlainText string
- The plaintext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- EncryptionContext string
- cipherText String
- The ciphertext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- datakeyLength String
- id String
- keyId String
- plainText String
- The plaintext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- encryptionContext String
- cipherText string
- The ciphertext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- datakeyLength string
- id string
- keyId string
- plainText string
- The plaintext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- encryptionContext string
- cipher_text str
- The ciphertext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- datakey_length str
- id str
- key_id str
- plain_text str
- The plaintext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- encryption_context str
- cipherText String
- The ciphertext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- datakeyLength String
- id String
- keyId String
- plainText String
- The plaintext of a DEK is expressed in hexadecimal format, and two characters indicate one byte.
- encryptionContext String
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the opentelekomcloudTerraform Provider.
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud