@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
134 lines • 6 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.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, { ...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?.arn;
resourceInputs["authMode"] = state?.authMode;
resourceInputs["defaultS3Location"] = state?.defaultS3Location;
resourceInputs["description"] = state?.description;
resourceInputs["encryptionKeyArn"] = state?.encryptionKeyArn;
resourceInputs["engineSecurityGroupId"] = state?.engineSecurityGroupId;
resourceInputs["idpAuthUrl"] = state?.idpAuthUrl;
resourceInputs["idpRelayStateParameterName"] = state?.idpRelayStateParameterName;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["serviceRole"] = state?.serviceRole;
resourceInputs["subnetIds"] = state?.subnetIds;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["url"] = state?.url;
resourceInputs["userRole"] = state?.userRole;
resourceInputs["vpcId"] = state?.vpcId;
resourceInputs["workspaceSecurityGroupId"] = state?.workspaceSecurityGroupId;
}
else {
const args = argsOrState;
if (args?.authMode === undefined && !opts.urn) {
throw new Error("Missing required property 'authMode'");
}
if (args?.defaultS3Location === undefined && !opts.urn) {
throw new Error("Missing required property 'defaultS3Location'");
}
if (args?.engineSecurityGroupId === undefined && !opts.urn) {
throw new Error("Missing required property 'engineSecurityGroupId'");
}
if (args?.serviceRole === undefined && !opts.urn) {
throw new Error("Missing required property 'serviceRole'");
}
if (args?.subnetIds === undefined && !opts.urn) {
throw new Error("Missing required property 'subnetIds'");
}
if (args?.vpcId === undefined && !opts.urn) {
throw new Error("Missing required property 'vpcId'");
}
if (args?.workspaceSecurityGroupId === undefined && !opts.urn) {
throw new Error("Missing required property 'workspaceSecurityGroupId'");
}
resourceInputs["authMode"] = args?.authMode;
resourceInputs["defaultS3Location"] = args?.defaultS3Location;
resourceInputs["description"] = args?.description;
resourceInputs["encryptionKeyArn"] = args?.encryptionKeyArn;
resourceInputs["engineSecurityGroupId"] = args?.engineSecurityGroupId;
resourceInputs["idpAuthUrl"] = args?.idpAuthUrl;
resourceInputs["idpRelayStateParameterName"] = args?.idpRelayStateParameterName;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["serviceRole"] = args?.serviceRole;
resourceInputs["subnetIds"] = args?.subnetIds;
resourceInputs["tags"] = args?.tags;
resourceInputs["userRole"] = args?.userRole;
resourceInputs["vpcId"] = args?.vpcId;
resourceInputs["workspaceSecurityGroupId"] = args?.workspaceSecurityGroupId;
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
;