1. Packages
  2. AWS Classic
  3. API Docs
  4. ssoadmin
  5. PermissionSet

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

AWS Classic v6.36.0 published on Wednesday, May 15, 2024 by Pulumi

aws.ssoadmin.PermissionSet

Explore with Pulumi AI

aws logo

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

AWS Classic v6.36.0 published on Wednesday, May 15, 2024 by Pulumi

    Provides a Single Sign-On (SSO) Permission Set resource

    NOTE: Updating this resource will automatically Provision the Permission Set to apply the corresponding updates to all assigned accounts.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ssoadmin.getInstances({});
    const examplePermissionSet = new aws.ssoadmin.PermissionSet("example", {
        name: "Example",
        description: "An example",
        instanceArn: example.then(example => example.arns?.[0]),
        relayState: "https://s3.console.aws.amazon.com/s3/home?region=us-east-1#",
        sessionDuration: "PT2H",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssoadmin.get_instances()
    example_permission_set = aws.ssoadmin.PermissionSet("example",
        name="Example",
        description="An example",
        instance_arn=example.arns[0],
        relay_state="https://s3.console.aws.amazon.com/s3/home?region=us-east-1#",
        session_duration="PT2H")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ssoadmin.GetInstances(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ssoadmin.NewPermissionSet(ctx, "example", &ssoadmin.PermissionSetArgs{
    			Name:            pulumi.String("Example"),
    			Description:     pulumi.String("An example"),
    			InstanceArn:     pulumi.String(example.Arns[0]),
    			RelayState:      pulumi.String("https://s3.console.aws.amazon.com/s3/home?region=us-east-1#"),
    			SessionDuration: pulumi.String("PT2H"),
    		})
    		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 = Aws.SsoAdmin.GetInstances.Invoke();
    
        var examplePermissionSet = new Aws.SsoAdmin.PermissionSet("example", new()
        {
            Name = "Example",
            Description = "An example",
            InstanceArn = example.Apply(getInstancesResult => getInstancesResult.Arns[0]),
            RelayState = "https://s3.console.aws.amazon.com/s3/home?region=us-east-1#",
            SessionDuration = "PT2H",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssoadmin.SsoadminFunctions;
    import com.pulumi.aws.ssoadmin.PermissionSet;
    import com.pulumi.aws.ssoadmin.PermissionSetArgs;
    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) {
            final var example = SsoadminFunctions.getInstances();
    
            var examplePermissionSet = new PermissionSet("examplePermissionSet", PermissionSetArgs.builder()        
                .name("Example")
                .description("An example")
                .instanceArn(example.applyValue(getInstancesResult -> getInstancesResult.arns()[0]))
                .relayState("https://s3.console.aws.amazon.com/s3/home?region=us-east-1#")
                .sessionDuration("PT2H")
                .build());
    
        }
    }
    
    resources:
      examplePermissionSet:
        type: aws:ssoadmin:PermissionSet
        name: example
        properties:
          name: Example
          description: An example
          instanceArn: ${example.arns[0]}
          relayState: https://s3.console.aws.amazon.com/s3/home?region=us-east-1#
          sessionDuration: PT2H
    variables:
      example:
        fn::invoke:
          Function: aws:ssoadmin:getInstances
          Arguments: {}
    

    Create PermissionSet Resource

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

    Constructor syntax

    new PermissionSet(name: string, args: PermissionSetArgs, opts?: CustomResourceOptions);
    @overload
    def PermissionSet(resource_name: str,
                      args: PermissionSetArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def PermissionSet(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      instance_arn: Optional[str] = None,
                      description: Optional[str] = None,
                      name: Optional[str] = None,
                      relay_state: Optional[str] = None,
                      session_duration: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None)
    func NewPermissionSet(ctx *Context, name string, args PermissionSetArgs, opts ...ResourceOption) (*PermissionSet, error)
    public PermissionSet(string name, PermissionSetArgs args, CustomResourceOptions? opts = null)
    public PermissionSet(String name, PermissionSetArgs args)
    public PermissionSet(String name, PermissionSetArgs args, CustomResourceOptions options)
    
    type: aws:ssoadmin:PermissionSet
    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 PermissionSetArgs
    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 PermissionSetArgs
    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 PermissionSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PermissionSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PermissionSetArgs
    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 permissionSetResource = new Aws.SsoAdmin.PermissionSet("permissionSetResource", new()
    {
        InstanceArn = "string",
        Description = "string",
        Name = "string",
        RelayState = "string",
        SessionDuration = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := ssoadmin.NewPermissionSet(ctx, "permissionSetResource", &ssoadmin.PermissionSetArgs{
    	InstanceArn:     pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	RelayState:      pulumi.String("string"),
    	SessionDuration: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var permissionSetResource = new PermissionSet("permissionSetResource", PermissionSetArgs.builder()        
        .instanceArn("string")
        .description("string")
        .name("string")
        .relayState("string")
        .sessionDuration("string")
        .tags(Map.of("string", "string"))
        .build());
    
    permission_set_resource = aws.ssoadmin.PermissionSet("permissionSetResource",
        instance_arn="string",
        description="string",
        name="string",
        relay_state="string",
        session_duration="string",
        tags={
            "string": "string",
        })
    
    const permissionSetResource = new aws.ssoadmin.PermissionSet("permissionSetResource", {
        instanceArn: "string",
        description: "string",
        name: "string",
        relayState: "string",
        sessionDuration: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:ssoadmin:PermissionSet
    properties:
        description: string
        instanceArn: string
        name: string
        relayState: string
        sessionDuration: string
        tags:
            string: string
    

    PermissionSet 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 PermissionSet resource accepts the following input properties:

    InstanceArn string
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    Description string
    The description of the Permission Set.
    Name string
    The name of the Permission Set.
    RelayState string
    The relay state URL used to redirect users within the application during the federation authentication process.
    SessionDuration string
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    InstanceArn string
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    Description string
    The description of the Permission Set.
    Name string
    The name of the Permission Set.
    RelayState string
    The relay state URL used to redirect users within the application during the federation authentication process.
    SessionDuration string
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    instanceArn String
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    description String
    The description of the Permission Set.
    name String
    The name of the Permission Set.
    relayState String
    The relay state URL used to redirect users within the application during the federation authentication process.
    sessionDuration String
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    instanceArn string
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    description string
    The description of the Permission Set.
    name string
    The name of the Permission Set.
    relayState string
    The relay state URL used to redirect users within the application during the federation authentication process.
    sessionDuration string
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    instance_arn str
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    description str
    The description of the Permission Set.
    name str
    The name of the Permission Set.
    relay_state str
    The relay state URL used to redirect users within the application during the federation authentication process.
    session_duration str
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    instanceArn String
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    description String
    The description of the Permission Set.
    name String
    The name of the Permission Set.
    relayState String
    The relay state URL used to redirect users within the application during the federation authentication process.
    sessionDuration String
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    The Amazon Resource Name (ARN) of the Permission Set.
    CreatedDate string
    The date the Permission Set was created in RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The Amazon Resource Name (ARN) of the Permission Set.
    CreatedDate string
    The date the Permission Set was created in RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the Permission Set.
    createdDate String
    The date the Permission Set was created in RFC3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The Amazon Resource Name (ARN) of the Permission Set.
    createdDate string
    The date the Permission Set was created in RFC3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The Amazon Resource Name (ARN) of the Permission Set.
    created_date str
    The date the Permission Set was created in RFC3339 format.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the Permission Set.
    createdDate String
    The date the Permission Set was created in RFC3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing PermissionSet Resource

    Get an existing PermissionSet 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?: PermissionSetState, opts?: CustomResourceOptions): PermissionSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            created_date: Optional[str] = None,
            description: Optional[str] = None,
            instance_arn: Optional[str] = None,
            name: Optional[str] = None,
            relay_state: Optional[str] = None,
            session_duration: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> PermissionSet
    func GetPermissionSet(ctx *Context, name string, id IDInput, state *PermissionSetState, opts ...ResourceOption) (*PermissionSet, error)
    public static PermissionSet Get(string name, Input<string> id, PermissionSetState? state, CustomResourceOptions? opts = null)
    public static PermissionSet get(String name, Output<String> id, PermissionSetState 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:
    Arn string
    The Amazon Resource Name (ARN) of the Permission Set.
    CreatedDate string
    The date the Permission Set was created in RFC3339 format.
    Description string
    The description of the Permission Set.
    InstanceArn string
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    Name string
    The name of the Permission Set.
    RelayState string
    The relay state URL used to redirect users within the application during the federation authentication process.
    SessionDuration string
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The Amazon Resource Name (ARN) of the Permission Set.
    CreatedDate string
    The date the Permission Set was created in RFC3339 format.
    Description string
    The description of the Permission Set.
    InstanceArn string
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    Name string
    The name of the Permission Set.
    RelayState string
    The relay state URL used to redirect users within the application during the federation authentication process.
    SessionDuration string
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the Permission Set.
    createdDate String
    The date the Permission Set was created in RFC3339 format.
    description String
    The description of the Permission Set.
    instanceArn String
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    name String
    The name of the Permission Set.
    relayState String
    The relay state URL used to redirect users within the application during the federation authentication process.
    sessionDuration String
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The Amazon Resource Name (ARN) of the Permission Set.
    createdDate string
    The date the Permission Set was created in RFC3339 format.
    description string
    The description of the Permission Set.
    instanceArn string
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    name string
    The name of the Permission Set.
    relayState string
    The relay state URL used to redirect users within the application during the federation authentication process.
    sessionDuration string
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The Amazon Resource Name (ARN) of the Permission Set.
    created_date str
    The date the Permission Set was created in RFC3339 format.
    description str
    The description of the Permission Set.
    instance_arn str
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    name str
    The name of the Permission Set.
    relay_state str
    The relay state URL used to redirect users within the application during the federation authentication process.
    session_duration str
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the Permission Set.
    createdDate String
    The date the Permission Set was created in RFC3339 format.
    description String
    The description of the Permission Set.
    instanceArn String
    The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed.
    name String
    The name of the Permission Set.
    relayState String
    The relay state URL used to redirect users within the application during the federation authentication process.
    sessionDuration String
    The length of time that the application user sessions are valid in the ISO-8601 standard. Default: PT1H.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Import

    Using pulumi import, import SSO Permission Sets using the arn and instance_arn separated by a comma (,). For example:

    $ pulumi import aws:ssoadmin/permissionSet:PermissionSet example arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72
    

    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.36.0 published on Wednesday, May 15, 2024 by Pulumi