@pulumi/aws-native
Version:
The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)
82 lines • 3.36 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.SecurityKey = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource Type definition for AWS::Connect::SecurityKey
*
* ## Example Usage
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const securityKey = new aws_native.connect.SecurityKey("securityKey", {
* instanceId: "arn:aws:connect:region-name:aws-account-id:instance/instance-arn",
* key: "valid-pem-key",
* });
*
* ```
*/
class SecurityKey extends pulumi.CustomResource {
/**
* Get an existing SecurityKey resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, opts) {
return new SecurityKey(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SecurityKey. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === SecurityKey.__pulumiType;
}
/**
* Create a SecurityKey resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name, args, opts) {
let resourceInputs = {};
opts = opts || {};
if (!opts.id) {
if ((!args || args.instanceId === undefined) && !opts.urn) {
throw new Error("Missing required property 'instanceId'");
}
if ((!args || args.key === undefined) && !opts.urn) {
throw new Error("Missing required property 'key'");
}
resourceInputs["instanceId"] = args ? args.instanceId : undefined;
resourceInputs["key"] = args ? args.key : undefined;
resourceInputs["associationId"] = undefined /*out*/;
}
else {
resourceInputs["associationId"] = undefined /*out*/;
resourceInputs["instanceId"] = undefined /*out*/;
resourceInputs["key"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const replaceOnChanges = { replaceOnChanges: ["instanceId", "key"] };
opts = pulumi.mergeOptions(opts, replaceOnChanges);
super(SecurityKey.__pulumiType, name, resourceInputs, opts);
}
}
exports.SecurityKey = SecurityKey;
/** @internal */
SecurityKey.__pulumiType = 'aws-native:connect:SecurityKey';
//# sourceMappingURL=securityKey.js.map