UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

112 lines 5.09 kB
"use strict"; // *** 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.Workgroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Creates a new Amazon Redshift Serverless Workgroup. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.redshiftserverless.Workgroup("example", { * namespaceName: "concurrency-scaling", * workgroupName: "concurrency-scaling", * }); * ``` * * ## Import * * Using `pulumi import`, import Redshift Serverless Workgroups using the `workgroup_name`. For example: * * ```sh * $ pulumi import aws:redshiftserverless/workgroup:Workgroup example example * ``` */ class Workgroup extends pulumi.CustomResource { /** * Get an existing Workgroup 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 Workgroup(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Workgroup. 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'] === Workgroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["baseCapacity"] = state?.baseCapacity; resourceInputs["configParameters"] = state?.configParameters; resourceInputs["endpoints"] = state?.endpoints; resourceInputs["enhancedVpcRouting"] = state?.enhancedVpcRouting; resourceInputs["maxCapacity"] = state?.maxCapacity; resourceInputs["namespaceName"] = state?.namespaceName; resourceInputs["port"] = state?.port; resourceInputs["pricePerformanceTarget"] = state?.pricePerformanceTarget; resourceInputs["publiclyAccessible"] = state?.publiclyAccessible; resourceInputs["region"] = state?.region; resourceInputs["securityGroupIds"] = state?.securityGroupIds; resourceInputs["subnetIds"] = state?.subnetIds; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["trackName"] = state?.trackName; resourceInputs["workgroupId"] = state?.workgroupId; resourceInputs["workgroupName"] = state?.workgroupName; } else { const args = argsOrState; if (args?.namespaceName === undefined && !opts.urn) { throw new Error("Missing required property 'namespaceName'"); } if (args?.workgroupName === undefined && !opts.urn) { throw new Error("Missing required property 'workgroupName'"); } resourceInputs["baseCapacity"] = args?.baseCapacity; resourceInputs["configParameters"] = args?.configParameters; resourceInputs["enhancedVpcRouting"] = args?.enhancedVpcRouting; resourceInputs["maxCapacity"] = args?.maxCapacity; resourceInputs["namespaceName"] = args?.namespaceName; resourceInputs["port"] = args?.port; resourceInputs["pricePerformanceTarget"] = args?.pricePerformanceTarget; resourceInputs["publiclyAccessible"] = args?.publiclyAccessible; resourceInputs["region"] = args?.region; resourceInputs["securityGroupIds"] = args?.securityGroupIds; resourceInputs["subnetIds"] = args?.subnetIds; resourceInputs["tags"] = args?.tags; resourceInputs["trackName"] = args?.trackName; resourceInputs["workgroupName"] = args?.workgroupName; resourceInputs["arn"] = undefined /*out*/; resourceInputs["endpoints"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["workgroupId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Workgroup.__pulumiType, name, resourceInputs, opts); } } exports.Workgroup = Workgroup; /** @internal */ Workgroup.__pulumiType = 'aws:redshiftserverless/workgroup:Workgroup'; //# sourceMappingURL=workgroup.js.map