@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
93 lines • 4.19 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.StudioSessionMapping = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an Elastic MapReduce Studio Session Mapping.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.emr.StudioSessionMapping("example", {
* studioId: exampleAwsEmrStudio.id,
* identityType: "USER",
* identityId: "example",
* sessionPolicyArn: exampleAwsIamPolicy.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import EMR studio session mappings using `studio-id:identity-type:identity-id`. For example:
*
* ```sh
* $ pulumi import aws:emr/studioSessionMapping:StudioSessionMapping example es-xxxxx:USER:xxxxx-xxx-xxx
* ```
*/
class StudioSessionMapping extends pulumi.CustomResource {
/**
* Get an existing StudioSessionMapping 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 StudioSessionMapping(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of StudioSessionMapping. 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'] === StudioSessionMapping.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["identityId"] = state ? state.identityId : undefined;
resourceInputs["identityName"] = state ? state.identityName : undefined;
resourceInputs["identityType"] = state ? state.identityType : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["sessionPolicyArn"] = state ? state.sessionPolicyArn : undefined;
resourceInputs["studioId"] = state ? state.studioId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.identityType === undefined) && !opts.urn) {
throw new Error("Missing required property 'identityType'");
}
if ((!args || args.sessionPolicyArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'sessionPolicyArn'");
}
if ((!args || args.studioId === undefined) && !opts.urn) {
throw new Error("Missing required property 'studioId'");
}
resourceInputs["identityId"] = args ? args.identityId : undefined;
resourceInputs["identityName"] = args ? args.identityName : undefined;
resourceInputs["identityType"] = args ? args.identityType : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["sessionPolicyArn"] = args ? args.sessionPolicyArn : undefined;
resourceInputs["studioId"] = args ? args.studioId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(StudioSessionMapping.__pulumiType, name, resourceInputs, opts);
}
}
exports.StudioSessionMapping = StudioSessionMapping;
/** @internal */
StudioSessionMapping.__pulumiType = 'aws:emr/studioSessionMapping:StudioSessionMapping';
//# sourceMappingURL=studioSessionMapping.js.map