UNPKG

@pulumi/aws

Version:

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

134 lines 6.71 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.Studio = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an Elastic MapReduce Studio. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.emr.Studio("example", { * authMode: "SSO", * defaultS3Location: `s3://${test.bucket}/test`, * engineSecurityGroupId: testAwsSecurityGroup.id, * name: "example", * serviceRole: testAwsIamRole.arn, * subnetIds: [testAwsSubnet.id], * userRole: testAwsIamRole.arn, * vpcId: testAwsVpc.id, * workspaceSecurityGroupId: testAwsSecurityGroup.id, * }); * ``` * * ## Import * * Using `pulumi import`, import EMR studios using the `id`. For example: * * ```sh * $ pulumi import aws:emr/studio:Studio studio es-123456ABCDEF * ``` */ class Studio extends pulumi.CustomResource { /** * Get an existing Studio 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 Studio(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Studio. 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'] === Studio.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["authMode"] = state ? state.authMode : undefined; resourceInputs["defaultS3Location"] = state ? state.defaultS3Location : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["encryptionKeyArn"] = state ? state.encryptionKeyArn : undefined; resourceInputs["engineSecurityGroupId"] = state ? state.engineSecurityGroupId : undefined; resourceInputs["idpAuthUrl"] = state ? state.idpAuthUrl : undefined; resourceInputs["idpRelayStateParameterName"] = state ? state.idpRelayStateParameterName : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["serviceRole"] = state ? state.serviceRole : undefined; resourceInputs["subnetIds"] = state ? state.subnetIds : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["url"] = state ? state.url : undefined; resourceInputs["userRole"] = state ? state.userRole : undefined; resourceInputs["vpcId"] = state ? state.vpcId : undefined; resourceInputs["workspaceSecurityGroupId"] = state ? state.workspaceSecurityGroupId : undefined; } else { const args = argsOrState; if ((!args || args.authMode === undefined) && !opts.urn) { throw new Error("Missing required property 'authMode'"); } if ((!args || args.defaultS3Location === undefined) && !opts.urn) { throw new Error("Missing required property 'defaultS3Location'"); } if ((!args || args.engineSecurityGroupId === undefined) && !opts.urn) { throw new Error("Missing required property 'engineSecurityGroupId'"); } if ((!args || args.serviceRole === undefined) && !opts.urn) { throw new Error("Missing required property 'serviceRole'"); } if ((!args || args.subnetIds === undefined) && !opts.urn) { throw new Error("Missing required property 'subnetIds'"); } if ((!args || args.vpcId === undefined) && !opts.urn) { throw new Error("Missing required property 'vpcId'"); } if ((!args || args.workspaceSecurityGroupId === undefined) && !opts.urn) { throw new Error("Missing required property 'workspaceSecurityGroupId'"); } resourceInputs["authMode"] = args ? args.authMode : undefined; resourceInputs["defaultS3Location"] = args ? args.defaultS3Location : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["encryptionKeyArn"] = args ? args.encryptionKeyArn : undefined; resourceInputs["engineSecurityGroupId"] = args ? args.engineSecurityGroupId : undefined; resourceInputs["idpAuthUrl"] = args ? args.idpAuthUrl : undefined; resourceInputs["idpRelayStateParameterName"] = args ? args.idpRelayStateParameterName : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["serviceRole"] = args ? args.serviceRole : undefined; resourceInputs["subnetIds"] = args ? args.subnetIds : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["userRole"] = args ? args.userRole : undefined; resourceInputs["vpcId"] = args ? args.vpcId : undefined; resourceInputs["workspaceSecurityGroupId"] = args ? args.workspaceSecurityGroupId : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["url"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Studio.__pulumiType, name, resourceInputs, opts); } } exports.Studio = Studio; /** @internal */ Studio.__pulumiType = 'aws:emr/studio:Studio'; //# sourceMappingURL=studio.js.map