UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

46 lines 1.61 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getDataKeyOutput = exports.getDataKey = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use this data source to get the plaintext and the ciphertext of an available HuaweiCloud KMS DEK (data encryption key). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as huaweicloud from "@pulumi/huaweicloud"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const key1 = new huaweicloud.dew.Key("key1", { * keyAlias: "key_1", * pendingDays: "7", * keyDescription: "first test key", * }); * const kmsDatakey1 = huaweicloud.Dew.getDataKeyOutput({ * keyId: key1.id, * datakeyLength: "512", * }); * ``` */ function getDataKey(args, opts) { if (!opts) { opts = {}; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); return pulumi.runtime.invoke("huaweicloud:Dew/getDataKey:getDataKey", { "datakeyLength": args.datakeyLength, "encryptionContext": args.encryptionContext, "keyId": args.keyId, "region": args.region, }, opts); } exports.getDataKey = getDataKey; function getDataKeyOutput(args, opts) { return pulumi.output(args).apply(a => getDataKey(a, opts)); } exports.getDataKeyOutput = getDataKeyOutput; //# sourceMappingURL=getDataKey.js.map