@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
115 lines • 4.24 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.KxUser = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS FinSpace Kx User.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.kms.Key("example", {
* description: "Example KMS Key",
* deletionWindowInDays: 7,
* });
* const exampleKxEnvironment = new aws.finspace.KxEnvironment("example", {
* name: "my-tf-kx-environment",
* kmsKeyId: example.arn,
* });
* const exampleRole = new aws.iam.Role("example", {
* name: "example-role",
* assumeRolePolicy: JSON.stringify({
* Version: "2012-10-17",
* Statement: [{
* Action: "sts:AssumeRole",
* Effect: "Allow",
* Sid: "",
* Principal: {
* Service: "ec2.amazonaws.com",
* },
* }],
* }),
* });
* const exampleKxUser = new aws.finspace.KxUser("example", {
* name: "my-tf-kx-user",
* environmentId: exampleKxEnvironment.id,
* iamRole: exampleRole.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import an AWS FinSpace Kx User using the `id` (environment ID and user name, comma-delimited). For example:
*
* ```sh
* $ pulumi import aws:finspace/kxUser:KxUser example n3ceo7wqxoxcti5tujqwzs,my-tf-kx-user
* ```
*/
class KxUser extends pulumi.CustomResource {
/**
* Get an existing KxUser 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 state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new KxUser(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of KxUser. 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'] === KxUser.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["environmentId"] = state?.environmentId;
resourceInputs["iamRole"] = state?.iamRole;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.environmentId === undefined && !opts.urn) {
throw new Error("Missing required property 'environmentId'");
}
if (args?.iamRole === undefined && !opts.urn) {
throw new Error("Missing required property 'iamRole'");
}
resourceInputs["environmentId"] = args?.environmentId;
resourceInputs["iamRole"] = args?.iamRole;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(KxUser.__pulumiType, name, resourceInputs, opts);
}
}
exports.KxUser = KxUser;
/** @internal */
KxUser.__pulumiType = 'aws:finspace/kxUser:KxUser';
//# sourceMappingURL=kxUser.js.map
;