@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
106 lines • 5.27 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.Namespace = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.redshiftserverless.Namespace("example", {namespaceName: "concurrency-scaling"});
* ```
*
* ## Import
*
* Using `pulumi import`, import Redshift Serverless Namespaces using the `namespace_name`. For example:
*
* ```sh
* $ pulumi import aws:redshiftserverless/namespace:Namespace example example
* ```
*/
class Namespace extends pulumi.CustomResource {
/**
* Get an existing Namespace 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 Namespace(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Namespace. 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'] === Namespace.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["adminPasswordSecretArn"] = state?.adminPasswordSecretArn;
resourceInputs["adminPasswordSecretKmsKeyId"] = state?.adminPasswordSecretKmsKeyId;
resourceInputs["adminUserPassword"] = state?.adminUserPassword;
resourceInputs["adminUserPasswordWo"] = state?.adminUserPasswordWo;
resourceInputs["adminUserPasswordWoVersion"] = state?.adminUserPasswordWoVersion;
resourceInputs["adminUsername"] = state?.adminUsername;
resourceInputs["arn"] = state?.arn;
resourceInputs["dbName"] = state?.dbName;
resourceInputs["defaultIamRoleArn"] = state?.defaultIamRoleArn;
resourceInputs["iamRoles"] = state?.iamRoles;
resourceInputs["kmsKeyId"] = state?.kmsKeyId;
resourceInputs["logExports"] = state?.logExports;
resourceInputs["manageAdminPassword"] = state?.manageAdminPassword;
resourceInputs["namespaceId"] = state?.namespaceId;
resourceInputs["namespaceName"] = state?.namespaceName;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.namespaceName === undefined && !opts.urn) {
throw new Error("Missing required property 'namespaceName'");
}
resourceInputs["adminPasswordSecretKmsKeyId"] = args?.adminPasswordSecretKmsKeyId;
resourceInputs["adminUserPassword"] = args?.adminUserPassword ? pulumi.secret(args.adminUserPassword) : undefined;
resourceInputs["adminUserPasswordWo"] = args?.adminUserPasswordWo ? pulumi.secret(args.adminUserPasswordWo) : undefined;
resourceInputs["adminUserPasswordWoVersion"] = args?.adminUserPasswordWoVersion;
resourceInputs["adminUsername"] = args?.adminUsername ? pulumi.secret(args.adminUsername) : undefined;
resourceInputs["dbName"] = args?.dbName;
resourceInputs["defaultIamRoleArn"] = args?.defaultIamRoleArn;
resourceInputs["iamRoles"] = args?.iamRoles;
resourceInputs["kmsKeyId"] = args?.kmsKeyId;
resourceInputs["logExports"] = args?.logExports;
resourceInputs["manageAdminPassword"] = args?.manageAdminPassword;
resourceInputs["namespaceName"] = args?.namespaceName;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["adminPasswordSecretArn"] = undefined /*out*/;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["namespaceId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["adminUserPassword", "adminUserPasswordWo", "adminUsername"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Namespace.__pulumiType, name, resourceInputs, opts);
}
}
exports.Namespace = Namespace;
/** @internal */
Namespace.__pulumiType = 'aws:redshiftserverless/namespace:Namespace';
//# sourceMappingURL=namespace.js.map