aws.ssoadmin.PermissionSet
Explore with Pulumi AI
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, map[string]interface{}{}, 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.
Constructor 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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.
- Dictionary<string, string>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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.
- map[string]string
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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.
- Map<String,String>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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.
- {[key: string]: string}
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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.
- Mapping[str, str]
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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.
- Map<String>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
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) -> PermissionSetfunc 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)resources:  _:    type: aws:ssoadmin:PermissionSet    get:      id: ${id}- 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.
- 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.
- Dictionary<string, string>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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.
- map[string]string
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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.
- Map<String,String>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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.
- {[key: string]: string}
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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.
- Mapping[str, str]
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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.
- Map<String>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
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 awsTerraform Provider.