1. Packages
  2. AWS Classic
  3. API Docs
  4. emr
  5. StudioSessionMapping

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

aws.emr.StudioSessionMapping

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

    Provides an Elastic MapReduce Studio Session Mapping.

    Example Usage

    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 pulumi
    import pulumi_aws as aws
    
    example = aws.emr.StudioSessionMapping("example",
        studio_id=example_aws_emr_studio["id"],
        identity_type="USER",
        identity_id="example",
        session_policy_arn=example_aws_iam_policy["arn"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := emr.NewStudioSessionMapping(ctx, "example", &emr.StudioSessionMappingArgs{
    			StudioId:         pulumi.Any(exampleAwsEmrStudio.Id),
    			IdentityType:     pulumi.String("USER"),
    			IdentityId:       pulumi.String("example"),
    			SessionPolicyArn: pulumi.Any(exampleAwsIamPolicy.Arn),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Emr.StudioSessionMapping("example", new()
        {
            StudioId = exampleAwsEmrStudio.Id,
            IdentityType = "USER",
            IdentityId = "example",
            SessionPolicyArn = exampleAwsIamPolicy.Arn,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.emr.StudioSessionMapping;
    import com.pulumi.aws.emr.StudioSessionMappingArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new StudioSessionMapping("example", StudioSessionMappingArgs.builder()        
                .studioId(exampleAwsEmrStudio.id())
                .identityType("USER")
                .identityId("example")
                .sessionPolicyArn(exampleAwsIamPolicy.arn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:emr:StudioSessionMapping
        properties:
          studioId: ${exampleAwsEmrStudio.id}
          identityType: USER
          identityId: example
          sessionPolicyArn: ${exampleAwsIamPolicy.arn}
    

    Create StudioSessionMapping Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new StudioSessionMapping(name: string, args: StudioSessionMappingArgs, opts?: CustomResourceOptions);
    @overload
    def StudioSessionMapping(resource_name: str,
                             args: StudioSessionMappingArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def StudioSessionMapping(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             identity_type: Optional[str] = None,
                             session_policy_arn: Optional[str] = None,
                             studio_id: Optional[str] = None,
                             identity_id: Optional[str] = None,
                             identity_name: Optional[str] = None)
    func NewStudioSessionMapping(ctx *Context, name string, args StudioSessionMappingArgs, opts ...ResourceOption) (*StudioSessionMapping, error)
    public StudioSessionMapping(string name, StudioSessionMappingArgs args, CustomResourceOptions? opts = null)
    public StudioSessionMapping(String name, StudioSessionMappingArgs args)
    public StudioSessionMapping(String name, StudioSessionMappingArgs args, CustomResourceOptions options)
    
    type: aws:emr:StudioSessionMapping
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args StudioSessionMappingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args StudioSessionMappingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args StudioSessionMappingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StudioSessionMappingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StudioSessionMappingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var studioSessionMappingResource = new Aws.Emr.StudioSessionMapping("studioSessionMappingResource", new()
    {
        IdentityType = "string",
        SessionPolicyArn = "string",
        StudioId = "string",
        IdentityId = "string",
        IdentityName = "string",
    });
    
    example, err := emr.NewStudioSessionMapping(ctx, "studioSessionMappingResource", &emr.StudioSessionMappingArgs{
    	IdentityType:     pulumi.String("string"),
    	SessionPolicyArn: pulumi.String("string"),
    	StudioId:         pulumi.String("string"),
    	IdentityId:       pulumi.String("string"),
    	IdentityName:     pulumi.String("string"),
    })
    
    var studioSessionMappingResource = new StudioSessionMapping("studioSessionMappingResource", StudioSessionMappingArgs.builder()        
        .identityType("string")
        .sessionPolicyArn("string")
        .studioId("string")
        .identityId("string")
        .identityName("string")
        .build());
    
    studio_session_mapping_resource = aws.emr.StudioSessionMapping("studioSessionMappingResource",
        identity_type="string",
        session_policy_arn="string",
        studio_id="string",
        identity_id="string",
        identity_name="string")
    
    const studioSessionMappingResource = new aws.emr.StudioSessionMapping("studioSessionMappingResource", {
        identityType: "string",
        sessionPolicyArn: "string",
        studioId: "string",
        identityId: "string",
        identityName: "string",
    });
    
    type: aws:emr:StudioSessionMapping
    properties:
        identityId: string
        identityName: string
        identityType: string
        sessionPolicyArn: string
        studioId: string
    

    StudioSessionMapping Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The StudioSessionMapping resource accepts the following input properties:

    IdentityType string
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    SessionPolicyArn string
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    StudioId string
    The ID of the Amazon EMR Studio to which the user or group will be mapped.
    IdentityId string
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    IdentityName string
    The name of the user or group from the Amazon Web Services SSO Identity Store.
    IdentityType string
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    SessionPolicyArn string
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    StudioId string
    The ID of the Amazon EMR Studio to which the user or group will be mapped.
    IdentityId string
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    IdentityName string
    The name of the user or group from the Amazon Web Services SSO Identity Store.
    identityType String
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    sessionPolicyArn String
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    studioId String
    The ID of the Amazon EMR Studio to which the user or group will be mapped.
    identityId String
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    identityName String
    The name of the user or group from the Amazon Web Services SSO Identity Store.
    identityType string
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    sessionPolicyArn string
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    studioId string
    The ID of the Amazon EMR Studio to which the user or group will be mapped.
    identityId string
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    identityName string
    The name of the user or group from the Amazon Web Services SSO Identity Store.
    identity_type str
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    session_policy_arn str
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    studio_id str
    The ID of the Amazon EMR Studio to which the user or group will be mapped.
    identity_id str
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    identity_name str
    The name of the user or group from the Amazon Web Services SSO Identity Store.
    identityType String
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    sessionPolicyArn String
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    studioId String
    The ID of the Amazon EMR Studio to which the user or group will be mapped.
    identityId String
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    identityName String
    The name of the user or group from the Amazon Web Services SSO Identity Store.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the StudioSessionMapping resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing StudioSessionMapping Resource

    Get an existing StudioSessionMapping resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: StudioSessionMappingState, opts?: CustomResourceOptions): StudioSessionMapping
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            identity_id: Optional[str] = None,
            identity_name: Optional[str] = None,
            identity_type: Optional[str] = None,
            session_policy_arn: Optional[str] = None,
            studio_id: Optional[str] = None) -> StudioSessionMapping
    func GetStudioSessionMapping(ctx *Context, name string, id IDInput, state *StudioSessionMappingState, opts ...ResourceOption) (*StudioSessionMapping, error)
    public static StudioSessionMapping Get(string name, Input<string> id, StudioSessionMappingState? state, CustomResourceOptions? opts = null)
    public static StudioSessionMapping get(String name, Output<String> id, StudioSessionMappingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    IdentityId string
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    IdentityName string
    The name of the user or group from the Amazon Web Services SSO Identity Store.
    IdentityType string
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    SessionPolicyArn string
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    StudioId string
    The ID of the Amazon EMR Studio to which the user or group will be mapped.
    IdentityId string
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    IdentityName string
    The name of the user or group from the Amazon Web Services SSO Identity Store.
    IdentityType string
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    SessionPolicyArn string
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    StudioId string
    The ID of the Amazon EMR Studio to which the user or group will be mapped.
    identityId String
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    identityName String
    The name of the user or group from the Amazon Web Services SSO Identity Store.
    identityType String
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    sessionPolicyArn String
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    studioId String
    The ID of the Amazon EMR Studio to which the user or group will be mapped.
    identityId string
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    identityName string
    The name of the user or group from the Amazon Web Services SSO Identity Store.
    identityType string
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    sessionPolicyArn string
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    studioId string
    The ID of the Amazon EMR Studio to which the user or group will be mapped.
    identity_id str
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    identity_name str
    The name of the user or group from the Amazon Web Services SSO Identity Store.
    identity_type str
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    session_policy_arn str
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    studio_id str
    The ID of the Amazon EMR Studio to which the user or group will be mapped.
    identityId String
    The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.
    identityName String
    The name of the user or group from the Amazon Web Services SSO Identity Store.
    identityType String
    Specifies whether the identity to map to the Amazon EMR Studio is a USER or a GROUP.
    sessionPolicyArn String
    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role.
    studioId String
    The ID of the Amazon EMR Studio to which the user or group will be mapped.

    Import

    Using pulumi import, import EMR studio session mappings using studio-id:identity-type:identity-id. For example:

    $ pulumi import aws:emr/studioSessionMapping:StudioSessionMapping example es-xxxxx:USER:xxxxx-xxx-xxx
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi