UNPKG

@pulumi/aws

Version:

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

93 lines 3.91 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.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, { ...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?.identityId; resourceInputs["identityName"] = state?.identityName; resourceInputs["identityType"] = state?.identityType; resourceInputs["region"] = state?.region; resourceInputs["sessionPolicyArn"] = state?.sessionPolicyArn; resourceInputs["studioId"] = state?.studioId; } else { const args = argsOrState; if (args?.identityType === undefined && !opts.urn) { throw new Error("Missing required property 'identityType'"); } if (args?.sessionPolicyArn === undefined && !opts.urn) { throw new Error("Missing required property 'sessionPolicyArn'"); } if (args?.studioId === undefined && !opts.urn) { throw new Error("Missing required property 'studioId'"); } resourceInputs["identityId"] = args?.identityId; resourceInputs["identityName"] = args?.identityName; resourceInputs["identityType"] = args?.identityType; resourceInputs["region"] = args?.region; resourceInputs["sessionPolicyArn"] = args?.sessionPolicyArn; resourceInputs["studioId"] = args?.studioId; } 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