1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. iam
  5. Role

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

aws-native.iam.Role

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

    Creates a new role for your AWS-account. For more information about roles, see IAM roles in the IAM User Guide. For information about quotas for role names and the number of roles you can create, see IAM and quotas in the IAM User Guide.

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var iamRole = new AwsNative.Iam.Role("iamRole", new()
        {
            AssumeRolePolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = new[]
                            {
                                "cloudformation.amazonaws.com",
                                "gamelift.amazonaws.com",
                            },
                        },
                        ["action"] = "sts:AssumeRole",
                    },
                },
            },
            RoleName = "ScriptIAMRole",
            Policies = new[]
            {
                new AwsNative.Iam.Inputs.RolePolicyArgs
                {
                    PolicyName = "ScriptResourceIAMPolicy",
                    PolicyDocument = new Dictionary<string, object?>
                    {
                        ["version"] = "2012-10-17",
                        ["statement"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["effect"] = "Allow",
                                ["action"] = new[]
                                {
                                    "s3:GetObject",
                                    "s3:GetObjectVersion",
                                    "s3:GetObjectMetadata",
                                    "s3:*Object*",
                                },
                                ["resource"] = new[]
                                {
                                    "*",
                                },
                            },
                        },
                    },
                },
            },
        });
    
        var scriptResource = new AwsNative.GameLift.Script("scriptResource", new()
        {
            Name = "MyRealtimeScript",
            Version = "v1.0",
            StorageLocation = new AwsNative.GameLift.Inputs.ScriptS3LocationArgs
            {
                Bucket = "MyBucketName",
                Key = "MyScriptFiles.zip",
                RoleArn = iamRole.Arn,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/gamelift"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		iamRole, err := iam.NewRole(ctx, "iamRole", &iam.RoleArgs{
    			AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"service": []string{
    								"cloudformation.amazonaws.com",
    								"gamelift.amazonaws.com",
    							},
    						},
    						"action": "sts:AssumeRole",
    					},
    				},
    			}),
    			RoleName: pulumi.String("ScriptIAMRole"),
    			Policies: iam.RolePolicyTypeArray{
    				&iam.RolePolicyTypeArgs{
    					PolicyName: pulumi.String("ScriptResourceIAMPolicy"),
    					PolicyDocument: pulumi.Any(map[string]interface{}{
    						"version": "2012-10-17",
    						"statement": []map[string]interface{}{
    							map[string]interface{}{
    								"effect": "Allow",
    								"action": []string{
    									"s3:GetObject",
    									"s3:GetObjectVersion",
    									"s3:GetObjectMetadata",
    									"s3:*Object*",
    								},
    								"resource": []string{
    									"*",
    								},
    							},
    						},
    					}),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gamelift.NewScript(ctx, "scriptResource", &gamelift.ScriptArgs{
    			Name:    pulumi.String("MyRealtimeScript"),
    			Version: pulumi.String("v1.0"),
    			StorageLocation: &gamelift.ScriptS3LocationArgs{
    				Bucket:  pulumi.String("MyBucketName"),
    				Key:     pulumi.String("MyScriptFiles.zip"),
    				RoleArn: iamRole.Arn,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    iam_role = aws_native.iam.Role("iamRole",
        assume_role_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "effect": "Allow",
                "principal": {
                    "service": [
                        "cloudformation.amazonaws.com",
                        "gamelift.amazonaws.com",
                    ],
                },
                "action": "sts:AssumeRole",
            }],
        },
        role_name="ScriptIAMRole",
        policies=[{
            "policy_name": "ScriptResourceIAMPolicy",
            "policy_document": {
                "version": "2012-10-17",
                "statement": [{
                    "effect": "Allow",
                    "action": [
                        "s3:GetObject",
                        "s3:GetObjectVersion",
                        "s3:GetObjectMetadata",
                        "s3:*Object*",
                    ],
                    "resource": ["*"],
                }],
            },
        }])
    script_resource = aws_native.gamelift.Script("scriptResource",
        name="MyRealtimeScript",
        version="v1.0",
        storage_location={
            "bucket": "MyBucketName",
            "key": "MyScriptFiles.zip",
            "role_arn": iam_role.arn,
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const iamRole = new aws_native.iam.Role("iamRole", {
        assumeRolePolicyDocument: {
            version: "2012-10-17",
            statement: [{
                effect: "Allow",
                principal: {
                    service: [
                        "cloudformation.amazonaws.com",
                        "gamelift.amazonaws.com",
                    ],
                },
                action: "sts:AssumeRole",
            }],
        },
        roleName: "ScriptIAMRole",
        policies: [{
            policyName: "ScriptResourceIAMPolicy",
            policyDocument: {
                version: "2012-10-17",
                statement: [{
                    effect: "Allow",
                    action: [
                        "s3:GetObject",
                        "s3:GetObjectVersion",
                        "s3:GetObjectMetadata",
                        "s3:*Object*",
                    ],
                    resource: ["*"],
                }],
            },
        }],
    });
    const scriptResource = new aws_native.gamelift.Script("scriptResource", {
        name: "MyRealtimeScript",
        version: "v1.0",
        storageLocation: {
            bucket: "MyBucketName",
            key: "MyScriptFiles.zip",
            roleArn: iamRole.arn,
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var iamRole = new AwsNative.Iam.Role("iamRole", new()
        {
            AssumeRolePolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = new[]
                            {
                                "cloudformation.amazonaws.com",
                                "gamelift.amazonaws.com",
                            },
                        },
                        ["action"] = "sts:AssumeRole",
                    },
                },
            },
            RoleName = "ScriptIAMRole",
            Policies = new[]
            {
                new AwsNative.Iam.Inputs.RolePolicyArgs
                {
                    PolicyName = "ScriptResourceIAMPolicy",
                    PolicyDocument = new Dictionary<string, object?>
                    {
                        ["version"] = "2012-10-17",
                        ["statement"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["effect"] = "Allow",
                                ["action"] = new[]
                                {
                                    "s3:GetObject",
                                    "s3:GetObjectVersion",
                                    "s3:GetObjectMetadata",
                                    "s3:*Object*",
                                },
                                ["resource"] = new[]
                                {
                                    "*",
                                },
                            },
                        },
                    },
                },
            },
        });
    
        var scriptResource = new AwsNative.GameLift.Script("scriptResource", new()
        {
            Name = "MyRealtimeScript",
            Version = "v1.0",
            StorageLocation = new AwsNative.GameLift.Inputs.ScriptS3LocationArgs
            {
                Bucket = "MyBucketName",
                Key = "MyScriptFiles.zip",
                RoleArn = iamRole.Arn,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/gamelift"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		iamRole, err := iam.NewRole(ctx, "iamRole", &iam.RoleArgs{
    			AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"service": []string{
    								"cloudformation.amazonaws.com",
    								"gamelift.amazonaws.com",
    							},
    						},
    						"action": "sts:AssumeRole",
    					},
    				},
    			}),
    			RoleName: pulumi.String("ScriptIAMRole"),
    			Policies: iam.RolePolicyTypeArray{
    				&iam.RolePolicyTypeArgs{
    					PolicyName: pulumi.String("ScriptResourceIAMPolicy"),
    					PolicyDocument: pulumi.Any(map[string]interface{}{
    						"version": "2012-10-17",
    						"statement": []map[string]interface{}{
    							map[string]interface{}{
    								"effect": "Allow",
    								"action": []string{
    									"s3:GetObject",
    									"s3:GetObjectVersion",
    									"s3:GetObjectMetadata",
    									"s3:*Object*",
    								},
    								"resource": []string{
    									"*",
    								},
    							},
    						},
    					}),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gamelift.NewScript(ctx, "scriptResource", &gamelift.ScriptArgs{
    			Name:    pulumi.String("MyRealtimeScript"),
    			Version: pulumi.String("v1.0"),
    			StorageLocation: &gamelift.ScriptS3LocationArgs{
    				Bucket:  pulumi.String("MyBucketName"),
    				Key:     pulumi.String("MyScriptFiles.zip"),
    				RoleArn: iamRole.Arn,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    iam_role = aws_native.iam.Role("iamRole",
        assume_role_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "effect": "Allow",
                "principal": {
                    "service": [
                        "cloudformation.amazonaws.com",
                        "gamelift.amazonaws.com",
                    ],
                },
                "action": "sts:AssumeRole",
            }],
        },
        role_name="ScriptIAMRole",
        policies=[{
            "policy_name": "ScriptResourceIAMPolicy",
            "policy_document": {
                "version": "2012-10-17",
                "statement": [{
                    "effect": "Allow",
                    "action": [
                        "s3:GetObject",
                        "s3:GetObjectVersion",
                        "s3:GetObjectMetadata",
                        "s3:*Object*",
                    ],
                    "resource": ["*"],
                }],
            },
        }])
    script_resource = aws_native.gamelift.Script("scriptResource",
        name="MyRealtimeScript",
        version="v1.0",
        storage_location={
            "bucket": "MyBucketName",
            "key": "MyScriptFiles.zip",
            "role_arn": iam_role.arn,
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const iamRole = new aws_native.iam.Role("iamRole", {
        assumeRolePolicyDocument: {
            version: "2012-10-17",
            statement: [{
                effect: "Allow",
                principal: {
                    service: [
                        "cloudformation.amazonaws.com",
                        "gamelift.amazonaws.com",
                    ],
                },
                action: "sts:AssumeRole",
            }],
        },
        roleName: "ScriptIAMRole",
        policies: [{
            policyName: "ScriptResourceIAMPolicy",
            policyDocument: {
                version: "2012-10-17",
                statement: [{
                    effect: "Allow",
                    action: [
                        "s3:GetObject",
                        "s3:GetObjectVersion",
                        "s3:GetObjectMetadata",
                        "s3:*Object*",
                    ],
                    resource: ["*"],
                }],
            },
        }],
    });
    const scriptResource = new aws_native.gamelift.Script("scriptResource", {
        name: "MyRealtimeScript",
        version: "v1.0",
        storageLocation: {
            bucket: "MyBucketName",
            key: "MyScriptFiles.zip",
            roleArn: iamRole.arn,
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myJobRole = new AwsNative.Iam.Role("myJobRole", new()
        {
            AssumeRolePolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = new[]
                            {
                                "glue.amazonaws.com",
                            },
                        },
                        ["action"] = new[]
                        {
                            "sts:AssumeRole",
                        },
                    },
                },
            },
            Path = "/",
            Policies = new[]
            {
                new AwsNative.Iam.Inputs.RolePolicyArgs
                {
                    PolicyName = "root",
                    PolicyDocument = new Dictionary<string, object?>
                    {
                        ["version"] = "2012-10-17",
                        ["statement"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["effect"] = "Allow",
                                ["action"] = "*",
                                ["resource"] = "*",
                            },
                        },
                    },
                },
            },
        });
    
        var myJob = new AwsNative.Glue.Job("myJob", new()
        {
            Command = new AwsNative.Glue.Inputs.JobCommandArgs
            {
                Name = "glueetl",
                ScriptLocation = "s3://<your-S3-script-uri>",
            },
            DefaultArguments = new Dictionary<string, object?>
            {
                ["--job-bookmark-option"] = "job-bookmark-enable",
            },
            ExecutionProperty = new AwsNative.Glue.Inputs.JobExecutionPropertyArgs
            {
                MaxConcurrentRuns = 2,
            },
            MaxRetries = 0,
            Name = "cf-job1",
            Role = myJobRole.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/glue"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myJobRole, err := iam.NewRole(ctx, "myJobRole", &iam.RoleArgs{
    			AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"service": []string{
    								"glue.amazonaws.com",
    							},
    						},
    						"action": []string{
    							"sts:AssumeRole",
    						},
    					},
    				},
    			}),
    			Path: pulumi.String("/"),
    			Policies: iam.RolePolicyTypeArray{
    				&iam.RolePolicyTypeArgs{
    					PolicyName: pulumi.String("root"),
    					PolicyDocument: pulumi.Any(map[string]interface{}{
    						"version": "2012-10-17",
    						"statement": []map[string]interface{}{
    							map[string]interface{}{
    								"effect":   "Allow",
    								"action":   "*",
    								"resource": "*",
    							},
    						},
    					}),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = glue.NewJob(ctx, "myJob", &glue.JobArgs{
    			Command: &glue.JobCommandArgs{
    				Name:           pulumi.String("glueetl"),
    				ScriptLocation: pulumi.String("s3://<your-S3-script-uri>"),
    			},
    			DefaultArguments: pulumi.Any(map[string]interface{}{
    				"--job-bookmark-option": "job-bookmark-enable",
    			}),
    			ExecutionProperty: &glue.JobExecutionPropertyArgs{
    				MaxConcurrentRuns: pulumi.Float64(2),
    			},
    			MaxRetries: pulumi.Float64(0),
    			Name:       pulumi.String("cf-job1"),
    			Role:       myJobRole.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_job_role = aws_native.iam.Role("myJobRole",
        assume_role_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "effect": "Allow",
                "principal": {
                    "service": ["glue.amazonaws.com"],
                },
                "action": ["sts:AssumeRole"],
            }],
        },
        path="/",
        policies=[{
            "policy_name": "root",
            "policy_document": {
                "version": "2012-10-17",
                "statement": [{
                    "effect": "Allow",
                    "action": "*",
                    "resource": "*",
                }],
            },
        }])
    my_job = aws_native.glue.Job("myJob",
        command={
            "name": "glueetl",
            "script_location": "s3://<your-S3-script-uri>",
        },
        default_arguments={
            "--job-bookmark-option": "job-bookmark-enable",
        },
        execution_property={
            "max_concurrent_runs": 2,
        },
        max_retries=0,
        name="cf-job1",
        role=my_job_role.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myJobRole = new aws_native.iam.Role("myJobRole", {
        assumeRolePolicyDocument: {
            version: "2012-10-17",
            statement: [{
                effect: "Allow",
                principal: {
                    service: ["glue.amazonaws.com"],
                },
                action: ["sts:AssumeRole"],
            }],
        },
        path: "/",
        policies: [{
            policyName: "root",
            policyDocument: {
                version: "2012-10-17",
                statement: [{
                    effect: "Allow",
                    action: "*",
                    resource: "*",
                }],
            },
        }],
    });
    const myJob = new aws_native.glue.Job("myJob", {
        command: {
            name: "glueetl",
            scriptLocation: "s3://<your-S3-script-uri>",
        },
        defaultArguments: {
            "--job-bookmark-option": "job-bookmark-enable",
        },
        executionProperty: {
            maxConcurrentRuns: 2,
        },
        maxRetries: 0,
        name: "cf-job1",
        role: myJobRole.id,
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myJobRole = new AwsNative.Iam.Role("myJobRole", new()
        {
            AssumeRolePolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = new[]
                            {
                                "glue.amazonaws.com",
                            },
                        },
                        ["action"] = new[]
                        {
                            "sts:AssumeRole",
                        },
                    },
                },
            },
            Path = "/",
            Policies = new[]
            {
                new AwsNative.Iam.Inputs.RolePolicyArgs
                {
                    PolicyName = "root",
                    PolicyDocument = new Dictionary<string, object?>
                    {
                        ["version"] = "2012-10-17",
                        ["statement"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["effect"] = "Allow",
                                ["action"] = "*",
                                ["resource"] = "*",
                            },
                        },
                    },
                },
            },
        });
    
        var myJob = new AwsNative.Glue.Job("myJob", new()
        {
            Command = new AwsNative.Glue.Inputs.JobCommandArgs
            {
                Name = "glueetl",
                ScriptLocation = "s3://<your-S3-script-uri>",
            },
            DefaultArguments = new Dictionary<string, object?>
            {
                ["--job-bookmark-option"] = "job-bookmark-enable",
            },
            ExecutionProperty = new AwsNative.Glue.Inputs.JobExecutionPropertyArgs
            {
                MaxConcurrentRuns = 2,
            },
            MaxRetries = 0,
            Name = "cf-job1",
            Role = myJobRole.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/glue"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myJobRole, err := iam.NewRole(ctx, "myJobRole", &iam.RoleArgs{
    			AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"service": []string{
    								"glue.amazonaws.com",
    							},
    						},
    						"action": []string{
    							"sts:AssumeRole",
    						},
    					},
    				},
    			}),
    			Path: pulumi.String("/"),
    			Policies: iam.RolePolicyTypeArray{
    				&iam.RolePolicyTypeArgs{
    					PolicyName: pulumi.String("root"),
    					PolicyDocument: pulumi.Any(map[string]interface{}{
    						"version": "2012-10-17",
    						"statement": []map[string]interface{}{
    							map[string]interface{}{
    								"effect":   "Allow",
    								"action":   "*",
    								"resource": "*",
    							},
    						},
    					}),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = glue.NewJob(ctx, "myJob", &glue.JobArgs{
    			Command: &glue.JobCommandArgs{
    				Name:           pulumi.String("glueetl"),
    				ScriptLocation: pulumi.String("s3://<your-S3-script-uri>"),
    			},
    			DefaultArguments: pulumi.Any(map[string]interface{}{
    				"--job-bookmark-option": "job-bookmark-enable",
    			}),
    			ExecutionProperty: &glue.JobExecutionPropertyArgs{
    				MaxConcurrentRuns: pulumi.Float64(2),
    			},
    			MaxRetries: pulumi.Float64(0),
    			Name:       pulumi.String("cf-job1"),
    			Role:       myJobRole.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_job_role = aws_native.iam.Role("myJobRole",
        assume_role_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "effect": "Allow",
                "principal": {
                    "service": ["glue.amazonaws.com"],
                },
                "action": ["sts:AssumeRole"],
            }],
        },
        path="/",
        policies=[{
            "policy_name": "root",
            "policy_document": {
                "version": "2012-10-17",
                "statement": [{
                    "effect": "Allow",
                    "action": "*",
                    "resource": "*",
                }],
            },
        }])
    my_job = aws_native.glue.Job("myJob",
        command={
            "name": "glueetl",
            "script_location": "s3://<your-S3-script-uri>",
        },
        default_arguments={
            "--job-bookmark-option": "job-bookmark-enable",
        },
        execution_property={
            "max_concurrent_runs": 2,
        },
        max_retries=0,
        name="cf-job1",
        role=my_job_role.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myJobRole = new aws_native.iam.Role("myJobRole", {
        assumeRolePolicyDocument: {
            version: "2012-10-17",
            statement: [{
                effect: "Allow",
                principal: {
                    service: ["glue.amazonaws.com"],
                },
                action: ["sts:AssumeRole"],
            }],
        },
        path: "/",
        policies: [{
            policyName: "root",
            policyDocument: {
                version: "2012-10-17",
                statement: [{
                    effect: "Allow",
                    action: "*",
                    resource: "*",
                }],
            },
        }],
    });
    const myJob = new aws_native.glue.Job("myJob", {
        command: {
            name: "glueetl",
            scriptLocation: "s3://<your-S3-script-uri>",
        },
        defaultArguments: {
            "--job-bookmark-option": "job-bookmark-enable",
        },
        executionProperty: {
            maxConcurrentRuns: 2,
        },
        maxRetries: 0,
        name: "cf-job1",
        role: myJobRole.id,
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myJobTriggerRole = new AwsNative.Iam.Role("myJobTriggerRole", new()
        {
            AssumeRolePolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = new[]
                            {
                                "glue.amazonaws.com",
                            },
                        },
                        ["action"] = new[]
                        {
                            "sts:AssumeRole",
                        },
                    },
                },
            },
            Path = "/",
            Policies = new[]
            {
                new AwsNative.Iam.Inputs.RolePolicyArgs
                {
                    PolicyName = "root",
                    PolicyDocument = new Dictionary<string, object?>
                    {
                        ["version"] = "2012-10-17",
                        ["statement"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["effect"] = "Allow",
                                ["action"] = "*",
                                ["resource"] = "*",
                            },
                        },
                    },
                },
            },
        });
    
        var myJob = new AwsNative.Glue.Job("myJob", new()
        {
            Name = "MyJobTriggerJob",
            LogUri = "wikiData",
            Role = myJobTriggerRole.Id,
            Command = new AwsNative.Glue.Inputs.JobCommandArgs
            {
                Name = "glueetl",
                ScriptLocation = "s3://testdata-bucket/s3-target/create-delete-job-xtf-ETL-s3-json-to-csv.py",
            },
            DefaultArguments = new Dictionary<string, object?>
            {
                ["--job-bookmark-option"] = "job-bookmark-enable",
            },
            MaxRetries = 0,
        });
    
        var myJobTrigger = new AwsNative.Glue.Trigger("myJobTrigger", new()
        {
            Name = "MyJobTrigger",
            Type = "CONDITIONAL",
            Description = "Description for a conditional job trigger",
            Actions = new[]
            {
                new AwsNative.Glue.Inputs.TriggerActionArgs
                {
                    JobName = myJob.Id,
                    Arguments = new Dictionary<string, object?>
                    {
                        ["--job-bookmark-option"] = "job-bookmark-enable",
                    },
                },
            },
            Predicate = new AwsNative.Glue.Inputs.TriggerPredicateArgs
            {
                Conditions = new[]
                {
                    new AwsNative.Glue.Inputs.TriggerConditionArgs
                    {
                        LogicalOperator = "EQUALS",
                        JobName = myJob.Id,
                        State = "SUCCEEDED",
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/glue"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myJobTriggerRole, err := iam.NewRole(ctx, "myJobTriggerRole", &iam.RoleArgs{
    			AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"service": []string{
    								"glue.amazonaws.com",
    							},
    						},
    						"action": []string{
    							"sts:AssumeRole",
    						},
    					},
    				},
    			}),
    			Path: pulumi.String("/"),
    			Policies: iam.RolePolicyTypeArray{
    				&iam.RolePolicyTypeArgs{
    					PolicyName: pulumi.String("root"),
    					PolicyDocument: pulumi.Any(map[string]interface{}{
    						"version": "2012-10-17",
    						"statement": []map[string]interface{}{
    							map[string]interface{}{
    								"effect":   "Allow",
    								"action":   "*",
    								"resource": "*",
    							},
    						},
    					}),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		myJob, err := glue.NewJob(ctx, "myJob", &glue.JobArgs{
    			Name:   pulumi.String("MyJobTriggerJob"),
    			LogUri: pulumi.String("wikiData"),
    			Role:   myJobTriggerRole.ID(),
    			Command: &glue.JobCommandArgs{
    				Name:           pulumi.String("glueetl"),
    				ScriptLocation: pulumi.String("s3://testdata-bucket/s3-target/create-delete-job-xtf-ETL-s3-json-to-csv.py"),
    			},
    			DefaultArguments: pulumi.Any(map[string]interface{}{
    				"--job-bookmark-option": "job-bookmark-enable",
    			}),
    			MaxRetries: pulumi.Float64(0),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = glue.NewTrigger(ctx, "myJobTrigger", &glue.TriggerArgs{
    			Name:        pulumi.String("MyJobTrigger"),
    			Type:        pulumi.String("CONDITIONAL"),
    			Description: pulumi.String("Description for a conditional job trigger"),
    			Actions: glue.TriggerActionArray{
    				&glue.TriggerActionArgs{
    					JobName: myJob.ID(),
    					Arguments: pulumi.Any(map[string]interface{}{
    						"--job-bookmark-option": "job-bookmark-enable",
    					}),
    				},
    			},
    			Predicate: &glue.TriggerPredicateArgs{
    				Conditions: glue.TriggerConditionArray{
    					&glue.TriggerConditionArgs{
    						LogicalOperator: pulumi.String("EQUALS"),
    						JobName:         myJob.ID(),
    						State:           pulumi.String("SUCCEEDED"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_job_trigger_role = aws_native.iam.Role("myJobTriggerRole",
        assume_role_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "effect": "Allow",
                "principal": {
                    "service": ["glue.amazonaws.com"],
                },
                "action": ["sts:AssumeRole"],
            }],
        },
        path="/",
        policies=[{
            "policy_name": "root",
            "policy_document": {
                "version": "2012-10-17",
                "statement": [{
                    "effect": "Allow",
                    "action": "*",
                    "resource": "*",
                }],
            },
        }])
    my_job = aws_native.glue.Job("myJob",
        name="MyJobTriggerJob",
        log_uri="wikiData",
        role=my_job_trigger_role.id,
        command={
            "name": "glueetl",
            "script_location": "s3://testdata-bucket/s3-target/create-delete-job-xtf-ETL-s3-json-to-csv.py",
        },
        default_arguments={
            "--job-bookmark-option": "job-bookmark-enable",
        },
        max_retries=0)
    my_job_trigger = aws_native.glue.Trigger("myJobTrigger",
        name="MyJobTrigger",
        type="CONDITIONAL",
        description="Description for a conditional job trigger",
        actions=[{
            "job_name": my_job.id,
            "arguments": {
                "--job-bookmark-option": "job-bookmark-enable",
            },
        }],
        predicate={
            "conditions": [{
                "logical_operator": "EQUALS",
                "job_name": my_job.id,
                "state": "SUCCEEDED",
            }],
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myJobTriggerRole = new aws_native.iam.Role("myJobTriggerRole", {
        assumeRolePolicyDocument: {
            version: "2012-10-17",
            statement: [{
                effect: "Allow",
                principal: {
                    service: ["glue.amazonaws.com"],
                },
                action: ["sts:AssumeRole"],
            }],
        },
        path: "/",
        policies: [{
            policyName: "root",
            policyDocument: {
                version: "2012-10-17",
                statement: [{
                    effect: "Allow",
                    action: "*",
                    resource: "*",
                }],
            },
        }],
    });
    const myJob = new aws_native.glue.Job("myJob", {
        name: "MyJobTriggerJob",
        logUri: "wikiData",
        role: myJobTriggerRole.id,
        command: {
            name: "glueetl",
            scriptLocation: "s3://testdata-bucket/s3-target/create-delete-job-xtf-ETL-s3-json-to-csv.py",
        },
        defaultArguments: {
            "--job-bookmark-option": "job-bookmark-enable",
        },
        maxRetries: 0,
    });
    const myJobTrigger = new aws_native.glue.Trigger("myJobTrigger", {
        name: "MyJobTrigger",
        type: "CONDITIONAL",
        description: "Description for a conditional job trigger",
        actions: [{
            jobName: myJob.id,
            arguments: {
                "--job-bookmark-option": "job-bookmark-enable",
            },
        }],
        predicate: {
            conditions: [{
                logicalOperator: "EQUALS",
                jobName: myJob.id,
                state: "SUCCEEDED",
            }],
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myJobTriggerRole = new AwsNative.Iam.Role("myJobTriggerRole", new()
        {
            AssumeRolePolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = new[]
                            {
                                "glue.amazonaws.com",
                            },
                        },
                        ["action"] = new[]
                        {
                            "sts:AssumeRole",
                        },
                    },
                },
            },
            Path = "/",
            Policies = new[]
            {
                new AwsNative.Iam.Inputs.RolePolicyArgs
                {
                    PolicyName = "root",
                    PolicyDocument = new Dictionary<string, object?>
                    {
                        ["version"] = "2012-10-17",
                        ["statement"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["effect"] = "Allow",
                                ["action"] = "*",
                                ["resource"] = "*",
                            },
                        },
                    },
                },
            },
        });
    
        var myJob = new AwsNative.Glue.Job("myJob", new()
        {
            Name = "MyJobTriggerJob",
            LogUri = "wikiData",
            Role = myJobTriggerRole.Id,
            Command = new AwsNative.Glue.Inputs.JobCommandArgs
            {
                Name = "glueetl",
                ScriptLocation = "s3://testdata-bucket/s3-target/create-delete-job-xtf-ETL-s3-json-to-csv.py",
            },
            DefaultArguments = new Dictionary<string, object?>
            {
                ["--job-bookmark-option"] = "job-bookmark-enable",
            },
            MaxRetries = 0,
        });
    
        var myJobTrigger = new AwsNative.Glue.Trigger("myJobTrigger", new()
        {
            Name = "MyJobTrigger",
            Type = "CONDITIONAL",
            Description = "Description for a conditional job trigger",
            Actions = new[]
            {
                new AwsNative.Glue.Inputs.TriggerActionArgs
                {
                    JobName = myJob.Id,
                    Arguments = new Dictionary<string, object?>
                    {
                        ["--job-bookmark-option"] = "job-bookmark-enable",
                    },
                },
            },
            Predicate = new AwsNative.Glue.Inputs.TriggerPredicateArgs
            {
                Conditions = new[]
                {
                    new AwsNative.Glue.Inputs.TriggerConditionArgs
                    {
                        LogicalOperator = "EQUALS",
                        JobName = myJob.Id,
                        State = "SUCCEEDED",
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/glue"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myJobTriggerRole, err := iam.NewRole(ctx, "myJobTriggerRole", &iam.RoleArgs{
    			AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"service": []string{
    								"glue.amazonaws.com",
    							},
    						},
    						"action": []string{
    							"sts:AssumeRole",
    						},
    					},
    				},
    			}),
    			Path: pulumi.String("/"),
    			Policies: iam.RolePolicyTypeArray{
    				&iam.RolePolicyTypeArgs{
    					PolicyName: pulumi.String("root"),
    					PolicyDocument: pulumi.Any(map[string]interface{}{
    						"version": "2012-10-17",
    						"statement": []map[string]interface{}{
    							map[string]interface{}{
    								"effect":   "Allow",
    								"action":   "*",
    								"resource": "*",
    							},
    						},
    					}),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		myJob, err := glue.NewJob(ctx, "myJob", &glue.JobArgs{
    			Name:   pulumi.String("MyJobTriggerJob"),
    			LogUri: pulumi.String("wikiData"),
    			Role:   myJobTriggerRole.ID(),
    			Command: &glue.JobCommandArgs{
    				Name:           pulumi.String("glueetl"),
    				ScriptLocation: pulumi.String("s3://testdata-bucket/s3-target/create-delete-job-xtf-ETL-s3-json-to-csv.py"),
    			},
    			DefaultArguments: pulumi.Any(map[string]interface{}{
    				"--job-bookmark-option": "job-bookmark-enable",
    			}),
    			MaxRetries: pulumi.Float64(0),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = glue.NewTrigger(ctx, "myJobTrigger", &glue.TriggerArgs{
    			Name:        pulumi.String("MyJobTrigger"),
    			Type:        pulumi.String("CONDITIONAL"),
    			Description: pulumi.String("Description for a conditional job trigger"),
    			Actions: glue.TriggerActionArray{
    				&glue.TriggerActionArgs{
    					JobName: myJob.ID(),
    					Arguments: pulumi.Any(map[string]interface{}{
    						"--job-bookmark-option": "job-bookmark-enable",
    					}),
    				},
    			},
    			Predicate: &glue.TriggerPredicateArgs{
    				Conditions: glue.TriggerConditionArray{
    					&glue.TriggerConditionArgs{
    						LogicalOperator: pulumi.String("EQUALS"),
    						JobName:         myJob.ID(),
    						State:           pulumi.String("SUCCEEDED"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_job_trigger_role = aws_native.iam.Role("myJobTriggerRole",
        assume_role_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "effect": "Allow",
                "principal": {
                    "service": ["glue.amazonaws.com"],
                },
                "action": ["sts:AssumeRole"],
            }],
        },
        path="/",
        policies=[{
            "policy_name": "root",
            "policy_document": {
                "version": "2012-10-17",
                "statement": [{
                    "effect": "Allow",
                    "action": "*",
                    "resource": "*",
                }],
            },
        }])
    my_job = aws_native.glue.Job("myJob",
        name="MyJobTriggerJob",
        log_uri="wikiData",
        role=my_job_trigger_role.id,
        command={
            "name": "glueetl",
            "script_location": "s3://testdata-bucket/s3-target/create-delete-job-xtf-ETL-s3-json-to-csv.py",
        },
        default_arguments={
            "--job-bookmark-option": "job-bookmark-enable",
        },
        max_retries=0)
    my_job_trigger = aws_native.glue.Trigger("myJobTrigger",
        name="MyJobTrigger",
        type="CONDITIONAL",
        description="Description for a conditional job trigger",
        actions=[{
            "job_name": my_job.id,
            "arguments": {
                "--job-bookmark-option": "job-bookmark-enable",
            },
        }],
        predicate={
            "conditions": [{
                "logical_operator": "EQUALS",
                "job_name": my_job.id,
                "state": "SUCCEEDED",
            }],
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myJobTriggerRole = new aws_native.iam.Role("myJobTriggerRole", {
        assumeRolePolicyDocument: {
            version: "2012-10-17",
            statement: [{
                effect: "Allow",
                principal: {
                    service: ["glue.amazonaws.com"],
                },
                action: ["sts:AssumeRole"],
            }],
        },
        path: "/",
        policies: [{
            policyName: "root",
            policyDocument: {
                version: "2012-10-17",
                statement: [{
                    effect: "Allow",
                    action: "*",
                    resource: "*",
                }],
            },
        }],
    });
    const myJob = new aws_native.glue.Job("myJob", {
        name: "MyJobTriggerJob",
        logUri: "wikiData",
        role: myJobTriggerRole.id,
        command: {
            name: "glueetl",
            scriptLocation: "s3://testdata-bucket/s3-target/create-delete-job-xtf-ETL-s3-json-to-csv.py",
        },
        defaultArguments: {
            "--job-bookmark-option": "job-bookmark-enable",
        },
        maxRetries: 0,
    });
    const myJobTrigger = new aws_native.glue.Trigger("myJobTrigger", {
        name: "MyJobTrigger",
        type: "CONDITIONAL",
        description: "Description for a conditional job trigger",
        actions: [{
            jobName: myJob.id,
            arguments: {
                "--job-bookmark-option": "job-bookmark-enable",
            },
        }],
        predicate: {
            conditions: [{
                logicalOperator: "EQUALS",
                jobName: myJob.id,
                state: "SUCCEEDED",
            }],
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var amazonGrafanaWorkspaceIAMRole = new AwsNative.Iam.Role("amazonGrafanaWorkspaceIAMRole", new()
        {
            ManagedPolicyArns = new[]
            {
                "arn:aws:iam::aws:policy/service-role/AmazonGrafanaAthenaAccess",
            },
            AssumeRolePolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = new[]
                            {
                                "grafana.amazonaws.com",
                            },
                        },
                        ["action"] = new[]
                        {
                            "sts:AssumeRole",
                        },
                    },
                },
            },
        });
    
        var amazonGrafanaWorkspace = new AwsNative.Grafana.Workspace("amazonGrafanaWorkspace", new()
        {
            AccountAccessType = AwsNative.Grafana.WorkspaceAccountAccessType.CurrentAccount,
            Name = "AmazonGrafanaWorkspace",
            Description = "Amazon Grafana Workspace",
            AuthenticationProviders = new[]
            {
                AwsNative.Grafana.WorkspaceAuthenticationProviderTypes.Saml,
            },
            PermissionType = AwsNative.Grafana.WorkspacePermissionType.CustomerManaged,
            GrafanaVersion = "9.4",
            RoleArn = amazonGrafanaWorkspaceIAMRole.Arn,
            SamlConfiguration = new AwsNative.Grafana.Inputs.WorkspaceSamlConfigurationArgs
            {
                IdpMetadata = new AwsNative.Grafana.Inputs.WorkspaceIdpMetadataArgs
                {
                    Xml = "<md:EntityDescriptor xmlns:md='urn:oasis:names:tc:SAML:2.0:metadata' entityID='entityId'>DATA</md:EntityDescriptor>",
                },
                AssertionAttributes = new AwsNative.Grafana.Inputs.WorkspaceAssertionAttributesArgs
                {
                    Name = "displayName",
                    Login = "login",
                    Email = "email",
                    Groups = "group",
                    Role = "role",
                    Org = "org",
                },
                RoleValues = new AwsNative.Grafana.Inputs.WorkspaceRoleValuesArgs
                {
                    Editor = new[]
                    {
                        "editor1",
                    },
                    Admin = new[]
                    {
                        "admin1",
                    },
                },
                AllowedOrganizations = new[]
                {
                    "org1",
                },
                LoginValidityDuration = 60,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["workspaceEndpoint"] = amazonGrafanaWorkspace.Endpoint,
            ["workspaceStatus"] = amazonGrafanaWorkspace.Status,
            ["workspaceId"] = amazonGrafanaWorkspace.Id,
            ["grafanaVersion"] = amazonGrafanaWorkspace.GrafanaVersion,
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/grafana"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		amazonGrafanaWorkspaceIAMRole, err := iam.NewRole(ctx, "amazonGrafanaWorkspaceIAMRole", &iam.RoleArgs{
    			ManagedPolicyArns: pulumi.StringArray{
    				pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonGrafanaAthenaAccess"),
    			},
    			AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"service": []string{
    								"grafana.amazonaws.com",
    							},
    						},
    						"action": []string{
    							"sts:AssumeRole",
    						},
    					},
    				},
    			}),
    		})
    		if err != nil {
    			return err
    		}
    		amazonGrafanaWorkspace, err := grafana.NewWorkspace(ctx, "amazonGrafanaWorkspace", &grafana.WorkspaceArgs{
    			AccountAccessType: grafana.WorkspaceAccountAccessTypeCurrentAccount,
    			Name:              pulumi.String("AmazonGrafanaWorkspace"),
    			Description:       pulumi.String("Amazon Grafana Workspace"),
    			AuthenticationProviders: grafana.WorkspaceAuthenticationProviderTypesArray{
    				grafana.WorkspaceAuthenticationProviderTypesSaml,
    			},
    			PermissionType: grafana.WorkspacePermissionTypeCustomerManaged,
    			GrafanaVersion: pulumi.String("9.4"),
    			RoleArn:        amazonGrafanaWorkspaceIAMRole.Arn,
    			SamlConfiguration: &grafana.WorkspaceSamlConfigurationArgs{
    				IdpMetadata: &grafana.WorkspaceIdpMetadataArgs{
    					Xml: pulumi.String("<md:EntityDescriptor xmlns:md='urn:oasis:names:tc:SAML:2.0:metadata' entityID='entityId'>DATA</md:EntityDescriptor>"),
    				},
    				AssertionAttributes: &grafana.WorkspaceAssertionAttributesArgs{
    					Name:   pulumi.String("displayName"),
    					Login:  pulumi.String("login"),
    					Email:  pulumi.String("email"),
    					Groups: pulumi.String("group"),
    					Role:   pulumi.String("role"),
    					Org:    pulumi.String("org"),
    				},
    				RoleValues: &grafana.WorkspaceRoleValuesArgs{
    					Editor: pulumi.StringArray{
    						pulumi.String("editor1"),
    					},
    					Admin: pulumi.StringArray{
    						pulumi.String("admin1"),
    					},
    				},
    				AllowedOrganizations: pulumi.StringArray{
    					pulumi.String("org1"),
    				},
    				LoginValidityDuration: pulumi.Float64(60),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("workspaceEndpoint", amazonGrafanaWorkspace.Endpoint)
    		ctx.Export("workspaceStatus", amazonGrafanaWorkspace.Status.ApplyT(func(x *string) grafana.WorkspaceStatus { return grafana.WorkspaceStatus(*x) }).(grafana.WorkspaceStatusOutput))
    		ctx.Export("workspaceId", amazonGrafanaWorkspace.ID())
    		ctx.Export("grafanaVersion", amazonGrafanaWorkspace.GrafanaVersion)
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    amazon_grafana_workspace_iam_role = aws_native.iam.Role("amazonGrafanaWorkspaceIAMRole",
        managed_policy_arns=["arn:aws:iam::aws:policy/service-role/AmazonGrafanaAthenaAccess"],
        assume_role_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "effect": "Allow",
                "principal": {
                    "service": ["grafana.amazonaws.com"],
                },
                "action": ["sts:AssumeRole"],
            }],
        })
    amazon_grafana_workspace = aws_native.grafana.Workspace("amazonGrafanaWorkspace",
        account_access_type=aws_native.grafana.WorkspaceAccountAccessType.CURRENT_ACCOUNT,
        name="AmazonGrafanaWorkspace",
        description="Amazon Grafana Workspace",
        authentication_providers=[aws_native.grafana.WorkspaceAuthenticationProviderTypes.SAML],
        permission_type=aws_native.grafana.WorkspacePermissionType.CUSTOMER_MANAGED,
        grafana_version="9.4",
        role_arn=amazon_grafana_workspace_iam_role.arn,
        saml_configuration={
            "idp_metadata": {
                "xml": "<md:EntityDescriptor xmlns:md='urn:oasis:names:tc:SAML:2.0:metadata' entityID='entityId'>DATA</md:EntityDescriptor>",
            },
            "assertion_attributes": {
                "name": "displayName",
                "login": "login",
                "email": "email",
                "groups": "group",
                "role": "role",
                "org": "org",
            },
            "role_values": {
                "editor": ["editor1"],
                "admin": ["admin1"],
            },
            "allowed_organizations": ["org1"],
            "login_validity_duration": 60,
        })
    pulumi.export("workspaceEndpoint", amazon_grafana_workspace.endpoint)
    pulumi.export("workspaceStatus", amazon_grafana_workspace.status)
    pulumi.export("workspaceId", amazon_grafana_workspace.id)
    pulumi.export("grafanaVersion", amazon_grafana_workspace.grafana_version)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const amazonGrafanaWorkspaceIAMRole = new aws_native.iam.Role("amazonGrafanaWorkspaceIAMRole", {
        managedPolicyArns: ["arn:aws:iam::aws:policy/service-role/AmazonGrafanaAthenaAccess"],
        assumeRolePolicyDocument: {
            version: "2012-10-17",
            statement: [{
                effect: "Allow",
                principal: {
                    service: ["grafana.amazonaws.com"],
                },
                action: ["sts:AssumeRole"],
            }],
        },
    });
    const amazonGrafanaWorkspace = new aws_native.grafana.Workspace("amazonGrafanaWorkspace", {
        accountAccessType: aws_native.grafana.WorkspaceAccountAccessType.CurrentAccount,
        name: "AmazonGrafanaWorkspace",
        description: "Amazon Grafana Workspace",
        authenticationProviders: [aws_native.grafana.WorkspaceAuthenticationProviderTypes.Saml],
        permissionType: aws_native.grafana.WorkspacePermissionType.CustomerManaged,
        grafanaVersion: "9.4",
        roleArn: amazonGrafanaWorkspaceIAMRole.arn,
        samlConfiguration: {
            idpMetadata: {
                xml: "<md:EntityDescriptor xmlns:md='urn:oasis:names:tc:SAML:2.0:metadata' entityID='entityId'>DATA</md:EntityDescriptor>",
            },
            assertionAttributes: {
                name: "displayName",
                login: "login",
                email: "email",
                groups: "group",
                role: "role",
                org: "org",
            },
            roleValues: {
                editor: ["editor1"],
                admin: ["admin1"],
            },
            allowedOrganizations: ["org1"],
            loginValidityDuration: 60,
        },
    });
    export const workspaceEndpoint = amazonGrafanaWorkspace.endpoint;
    export const workspaceStatus = amazonGrafanaWorkspace.status;
    export const workspaceId = amazonGrafanaWorkspace.id;
    export const grafanaVersion = amazonGrafanaWorkspace.grafanaVersion;
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var amazonGrafanaWorkspaceIAMRole = new AwsNative.Iam.Role("amazonGrafanaWorkspaceIAMRole", new()
        {
            ManagedPolicyArns = new[]
            {
                "arn:aws:iam::aws:policy/service-role/AmazonGrafanaAthenaAccess",
            },
            AssumeRolePolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = new[]
                            {
                                "grafana.amazonaws.com",
                            },
                        },
                        ["action"] = new[]
                        {
                            "sts:AssumeRole",
                        },
                    },
                },
            },
        });
    
        var amazonGrafanaWorkspace = new AwsNative.Grafana.Workspace("amazonGrafanaWorkspace", new()
        {
            AccountAccessType = AwsNative.Grafana.WorkspaceAccountAccessType.CurrentAccount,
            Name = "AmazonGrafanaWorkspace",
            Description = "Amazon Grafana Workspace",
            AuthenticationProviders = new[]
            {
                AwsNative.Grafana.WorkspaceAuthenticationProviderTypes.Saml,
            },
            PermissionType = AwsNative.Grafana.WorkspacePermissionType.CustomerManaged,
            GrafanaVersion = "9.4",
            RoleArn = amazonGrafanaWorkspaceIAMRole.Arn,
            SamlConfiguration = new AwsNative.Grafana.Inputs.WorkspaceSamlConfigurationArgs
            {
                IdpMetadata = new AwsNative.Grafana.Inputs.WorkspaceIdpMetadataArgs
                {
                    Xml = "<md:EntityDescriptor xmlns:md='urn:oasis:names:tc:SAML:2.0:metadata' entityID='entityId'>DATA</md:EntityDescriptor>",
                },
                AssertionAttributes = new AwsNative.Grafana.Inputs.WorkspaceAssertionAttributesArgs
                {
                    Name = "displayName",
                    Login = "login",
                    Email = "email",
                    Groups = "group",
                    Role = "role",
                    Org = "org",
                },
                RoleValues = new AwsNative.Grafana.Inputs.WorkspaceRoleValuesArgs
                {
                    Editor = new[]
                    {
                        "editor1",
                    },
                    Admin = new[]
                    {
                        "admin1",
                    },
                },
                AllowedOrganizations = new[]
                {
                    "org1",
                },
                LoginValidityDuration = 60,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["workspaceEndpoint"] = amazonGrafanaWorkspace.Endpoint,
            ["workspaceStatus"] = amazonGrafanaWorkspace.Status,
            ["workspaceId"] = amazonGrafanaWorkspace.Id,
            ["grafanaVersion"] = amazonGrafanaWorkspace.GrafanaVersion,
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/grafana"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		amazonGrafanaWorkspaceIAMRole, err := iam.NewRole(ctx, "amazonGrafanaWorkspaceIAMRole", &iam.RoleArgs{
    			ManagedPolicyArns: pulumi.StringArray{
    				pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonGrafanaAthenaAccess"),
    			},
    			AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"service": []string{
    								"grafana.amazonaws.com",
    							},
    						},
    						"action": []string{
    							"sts:AssumeRole",
    						},
    					},
    				},
    			}),
    		})
    		if err != nil {
    			return err
    		}
    		amazonGrafanaWorkspace, err := grafana.NewWorkspace(ctx, "amazonGrafanaWorkspace", &grafana.WorkspaceArgs{
    			AccountAccessType: grafana.WorkspaceAccountAccessTypeCurrentAccount,
    			Name:              pulumi.String("AmazonGrafanaWorkspace"),
    			Description:       pulumi.String("Amazon Grafana Workspace"),
    			AuthenticationProviders: grafana.WorkspaceAuthenticationProviderTypesArray{
    				grafana.WorkspaceAuthenticationProviderTypesSaml,
    			},
    			PermissionType: grafana.WorkspacePermissionTypeCustomerManaged,
    			GrafanaVersion: pulumi.String("9.4"),
    			RoleArn:        amazonGrafanaWorkspaceIAMRole.Arn,
    			SamlConfiguration: &grafana.WorkspaceSamlConfigurationArgs{
    				IdpMetadata: &grafana.WorkspaceIdpMetadataArgs{
    					Xml: pulumi.String("<md:EntityDescriptor xmlns:md='urn:oasis:names:tc:SAML:2.0:metadata' entityID='entityId'>DATA</md:EntityDescriptor>"),
    				},
    				AssertionAttributes: &grafana.WorkspaceAssertionAttributesArgs{
    					Name:   pulumi.String("displayName"),
    					Login:  pulumi.String("login"),
    					Email:  pulumi.String("email"),
    					Groups: pulumi.String("group"),
    					Role:   pulumi.String("role"),
    					Org:    pulumi.String("org"),
    				},
    				RoleValues: &grafana.WorkspaceRoleValuesArgs{
    					Editor: pulumi.StringArray{
    						pulumi.String("editor1"),
    					},
    					Admin: pulumi.StringArray{
    						pulumi.String("admin1"),
    					},
    				},
    				AllowedOrganizations: pulumi.StringArray{
    					pulumi.String("org1"),
    				},
    				LoginValidityDuration: pulumi.Float64(60),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("workspaceEndpoint", amazonGrafanaWorkspace.Endpoint)
    		ctx.Export("workspaceStatus", amazonGrafanaWorkspace.Status.ApplyT(func(x *string) grafana.WorkspaceStatus { return grafana.WorkspaceStatus(*x) }).(grafana.WorkspaceStatusOutput))
    		ctx.Export("workspaceId", amazonGrafanaWorkspace.ID())
    		ctx.Export("grafanaVersion", amazonGrafanaWorkspace.GrafanaVersion)
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    amazon_grafana_workspace_iam_role = aws_native.iam.Role("amazonGrafanaWorkspaceIAMRole",
        managed_policy_arns=["arn:aws:iam::aws:policy/service-role/AmazonGrafanaAthenaAccess"],
        assume_role_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "effect": "Allow",
                "principal": {
                    "service": ["grafana.amazonaws.com"],
                },
                "action": ["sts:AssumeRole"],
            }],
        })
    amazon_grafana_workspace = aws_native.grafana.Workspace("amazonGrafanaWorkspace",
        account_access_type=aws_native.grafana.WorkspaceAccountAccessType.CURRENT_ACCOUNT,
        name="AmazonGrafanaWorkspace",
        description="Amazon Grafana Workspace",
        authentication_providers=[aws_native.grafana.WorkspaceAuthenticationProviderTypes.SAML],
        permission_type=aws_native.grafana.WorkspacePermissionType.CUSTOMER_MANAGED,
        grafana_version="9.4",
        role_arn=amazon_grafana_workspace_iam_role.arn,
        saml_configuration={
            "idp_metadata": {
                "xml": "<md:EntityDescriptor xmlns:md='urn:oasis:names:tc:SAML:2.0:metadata' entityID='entityId'>DATA</md:EntityDescriptor>",
            },
            "assertion_attributes": {
                "name": "displayName",
                "login": "login",
                "email": "email",
                "groups": "group",
                "role": "role",
                "org": "org",
            },
            "role_values": {
                "editor": ["editor1"],
                "admin": ["admin1"],
            },
            "allowed_organizations": ["org1"],
            "login_validity_duration": 60,
        })
    pulumi.export("workspaceEndpoint", amazon_grafana_workspace.endpoint)
    pulumi.export("workspaceStatus", amazon_grafana_workspace.status)
    pulumi.export("workspaceId", amazon_grafana_workspace.id)
    pulumi.export("grafanaVersion", amazon_grafana_workspace.grafana_version)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const amazonGrafanaWorkspaceIAMRole = new aws_native.iam.Role("amazonGrafanaWorkspaceIAMRole", {
        managedPolicyArns: ["arn:aws:iam::aws:policy/service-role/AmazonGrafanaAthenaAccess"],
        assumeRolePolicyDocument: {
            version: "2012-10-17",
            statement: [{
                effect: "Allow",
                principal: {
                    service: ["grafana.amazonaws.com"],
                },
                action: ["sts:AssumeRole"],
            }],
        },
    });
    const amazonGrafanaWorkspace = new aws_native.grafana.Workspace("amazonGrafanaWorkspace", {
        accountAccessType: aws_native.grafana.WorkspaceAccountAccessType.CurrentAccount,
        name: "AmazonGrafanaWorkspace",
        description: "Amazon Grafana Workspace",
        authenticationProviders: [aws_native.grafana.WorkspaceAuthenticationProviderTypes.Saml],
        permissionType: aws_native.grafana.WorkspacePermissionType.CustomerManaged,
        grafanaVersion: "9.4",
        roleArn: amazonGrafanaWorkspaceIAMRole.arn,
        samlConfiguration: {
            idpMetadata: {
                xml: "<md:EntityDescriptor xmlns:md='urn:oasis:names:tc:SAML:2.0:metadata' entityID='entityId'>DATA</md:EntityDescriptor>",
            },
            assertionAttributes: {
                name: "displayName",
                login: "login",
                email: "email",
                groups: "group",
                role: "role",
                org: "org",
            },
            roleValues: {
                editor: ["editor1"],
                admin: ["admin1"],
            },
            allowedOrganizations: ["org1"],
            loginValidityDuration: 60,
        },
    });
    export const workspaceEndpoint = amazonGrafanaWorkspace.endpoint;
    export const workspaceStatus = amazonGrafanaWorkspace.status;
    export const workspaceId = amazonGrafanaWorkspace.id;
    export const grafanaVersion = amazonGrafanaWorkspace.grafanaVersion;
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var rootRole = new AwsNative.Iam.Role("rootRole", new()
        {
            AssumeRolePolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = new[]
                            {
                                "ec2.amazonaws.com",
                            },
                        },
                        ["action"] = new[]
                        {
                            "sts:AssumeRole",
                        },
                    },
                },
            },
            Path = "/",
            Policies = new[]
            {
                new AwsNative.Iam.Inputs.RolePolicyArgs
                {
                    PolicyName = "root",
                    PolicyDocument = new Dictionary<string, object?>
                    {
                        ["version"] = "2012-10-17",
                        ["statement"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["effect"] = "Allow",
                                ["action"] = "*",
                                ["resource"] = "*",
                            },
                        },
                    },
                },
            },
        });
    
        var rootInstanceProfile = new AwsNative.Iam.InstanceProfile("rootInstanceProfile", new()
        {
            Path = "/",
            Roles = new[]
            {
                rootRole.Id,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		rootRole, err := iam.NewRole(ctx, "rootRole", &iam.RoleArgs{
    			AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"service": []string{
    								"ec2.amazonaws.com",
    							},
    						},
    						"action": []string{
    							"sts:AssumeRole",
    						},
    					},
    				},
    			}),
    			Path: pulumi.String("/"),
    			Policies: iam.RolePolicyTypeArray{
    				&iam.RolePolicyTypeArgs{
    					PolicyName: pulumi.String("root"),
    					PolicyDocument: pulumi.Any(map[string]interface{}{
    						"version": "2012-10-17",
    						"statement": []map[string]interface{}{
    							map[string]interface{}{
    								"effect":   "Allow",
    								"action":   "*",
    								"resource": "*",
    							},
    						},
    					}),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = iam.NewInstanceProfile(ctx, "rootInstanceProfile", &iam.InstanceProfileArgs{
    			Path: pulumi.String("/"),
    			Roles: pulumi.StringArray{
    				rootRole.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    root_role = aws_native.iam.Role("rootRole",
        assume_role_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "effect": "Allow",
                "principal": {
                    "service": ["ec2.amazonaws.com"],
                },
                "action": ["sts:AssumeRole"],
            }],
        },
        path="/",
        policies=[{
            "policy_name": "root",
            "policy_document": {
                "version": "2012-10-17",
                "statement": [{
                    "effect": "Allow",
                    "action": "*",
                    "resource": "*",
                }],
            },
        }])
    root_instance_profile = aws_native.iam.InstanceProfile("rootInstanceProfile",
        path="/",
        roles=[root_role.id])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const rootRole = new aws_native.iam.Role("rootRole", {
        assumeRolePolicyDocument: {
            version: "2012-10-17",
            statement: [{
                effect: "Allow",
                principal: {
                    service: ["ec2.amazonaws.com"],
                },
                action: ["sts:AssumeRole"],
            }],
        },
        path: "/",
        policies: [{
            policyName: "root",
            policyDocument: {
                version: "2012-10-17",
                statement: [{
                    effect: "Allow",
                    action: "*",
                    resource: "*",
                }],
            },
        }],
    });
    const rootInstanceProfile = new aws_native.iam.InstanceProfile("rootInstanceProfile", {
        path: "/",
        roles: [rootRole.id],
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var rootRole = new AwsNative.Iam.Role("rootRole", new()
        {
            AssumeRolePolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = new[]
                            {
                                "ec2.amazonaws.com",
                            },
                        },
                        ["action"] = new[]
                        {
                            "sts:AssumeRole",
                        },
                    },
                },
            },
            Path = "/",
            Policies = new[]
            {
                new AwsNative.Iam.Inputs.RolePolicyArgs
                {
                    PolicyName = "root",
                    PolicyDocument = new Dictionary<string, object?>
                    {
                        ["version"] = "2012-10-17",
                        ["statement"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["effect"] = "Allow",
                                ["action"] = "*",
                                ["resource"] = "*",
                            },
                        },
                    },
                },
            },
        });
    
        var rootInstanceProfile = new AwsNative.Iam.InstanceProfile("rootInstanceProfile", new()
        {
            Path = "/",
            Roles = new[]
            {
                rootRole.Id,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		rootRole, err := iam.NewRole(ctx, "rootRole", &iam.RoleArgs{
    			AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"service": []string{
    								"ec2.amazonaws.com",
    							},
    						},
    						"action": []string{
    							"sts:AssumeRole",
    						},
    					},
    				},
    			}),
    			Path: pulumi.String("/"),
    			Policies: iam.RolePolicyTypeArray{
    				&iam.RolePolicyTypeArgs{
    					PolicyName: pulumi.String("root"),
    					PolicyDocument: pulumi.Any(map[string]interface{}{
    						"version": "2012-10-17",
    						"statement": []map[string]interface{}{
    							map[string]interface{}{
    								"effect":   "Allow",
    								"action":   "*",
    								"resource": "*",
    							},
    						},
    					}),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = iam.NewInstanceProfile(ctx, "rootInstanceProfile", &iam.InstanceProfileArgs{
    			Path: pulumi.String("/"),
    			Roles: pulumi.StringArray{
    				rootRole.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    root_role = aws_native.iam.Role("rootRole",
        assume_role_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "effect": "Allow",
                "principal": {
                    "service": ["ec2.amazonaws.com"],
                },
                "action": ["sts:AssumeRole"],
            }],
        },
        path="/",
        policies=[{
            "policy_name": "root",
            "policy_document": {
                "version": "2012-10-17",
                "statement": [{
                    "effect": "Allow",
                    "action": "*",
                    "resource": "*",
                }],
            },
        }])
    root_instance_profile = aws_native.iam.InstanceProfile("rootInstanceProfile",
        path="/",
        roles=[root_role.id])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const rootRole = new aws_native.iam.Role("rootRole", {
        assumeRolePolicyDocument: {
            version: "2012-10-17",
            statement: [{
                effect: "Allow",
                principal: {
                    service: ["ec2.amazonaws.com"],
                },
                action: ["sts:AssumeRole"],
            }],
        },
        path: "/",
        policies: [{
            policyName: "root",
            policyDocument: {
                version: "2012-10-17",
                statement: [{
                    effect: "Allow",
                    action: "*",
                    resource: "*",
                }],
            },
        }],
    });
    const rootInstanceProfile = new aws_native.iam.InstanceProfile("rootInstanceProfile", {
        path: "/",
        roles: [rootRole.id],
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var automationExecutionRole = new AwsNative.Iam.Role("automationExecutionRole", new()
        {
            AssumeRolePolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["service"] = "ssm.amazonaws.com",
                        },
                        ["action"] = new[]
                        {
                            "sts:AssumeRole",
                        },
                    },
                },
            },
            Path = "/",
            ManagedPolicyArns = new[]
            {
                "arn:${AWS::Partition}:iam::aws:policy/AmazonEC2FullAccess",
            },
        });
    
        var automationAssociation = new AwsNative.Ssm.Association("automationAssociation", new()
        {
            Name = "AWS-StopEC2Instance",
            Parameters = 
            {
                { "automationAssumeRole", new[]
                {
                    "AutomationExecutionRole.Arn",
                } },
            },
            Targets = new[]
            {
                new AwsNative.Ssm.Inputs.AssociationTargetArgs
                {
                    Key = "ParameterValues",
                    Values = new[]
                    {
                        "i-1234567890abcdef0",
                    },
                },
            },
            AutomationTargetParameterName = "InstanceId",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/iam"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ssm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iam.NewRole(ctx, "automationExecutionRole", &iam.RoleArgs{
    			AssumeRolePolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"service": "ssm.amazonaws.com",
    						},
    						"action": []string{
    							"sts:AssumeRole",
    						},
    					},
    				},
    			}),
    			Path: pulumi.String("/"),
    			ManagedPolicyArns: pulumi.StringArray{
    				pulumi.String("arn:${AWS::Partition}:iam::aws:policy/AmazonEC2FullAccess"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ssm.NewAssociation(ctx, "automationAssociation", &ssm.AssociationArgs{
    			Name: pulumi.String("AWS-StopEC2Instance"),
    			Parameters: pulumi.StringArrayMap{
    				"automationAssumeRole": pulumi.StringArray{
    					pulumi.String("AutomationExecutionRole.Arn"),
    				},
    			},
    			Targets: ssm.AssociationTargetArray{
    				&ssm.AssociationTargetArgs{
    					Key: pulumi.String("ParameterValues"),
    					Values: pulumi.StringArray{
    						pulumi.String("i-1234567890abcdef0"),
    					},
    				},
    			},
    			AutomationTargetParameterName: pulumi.String("InstanceId"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    automation_execution_role = aws_native.iam.Role("automationExecutionRole",
        assume_role_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "effect": "Allow",
                "principal": {
                    "service": "ssm.amazonaws.com",
                },
                "action": ["sts:AssumeRole"],
            }],
        },
        path="/",
        managed_policy_arns=["arn:${AWS::Partition}:iam::aws:policy/AmazonEC2FullAccess"])
    automation_association = aws_native.ssm.Association("automationAssociation",
        name="AWS-StopEC2Instance",
        parameters={
            "automationAssumeRole": ["AutomationExecutionRole.Arn"],
        },
        targets=[{
            "key": "ParameterValues",
            "values": ["i-1234567890abcdef0"],
        }],
        automation_target_parameter_name="InstanceId")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const automationExecutionRole = new aws_native.iam.Role("automationExecutionRole", {
        assumeRolePolicyDocument: {
            version: "2012-10-17",
            statement: [{
                effect: "Allow",
                principal: {
                    service: "ssm.amazonaws.com",
                },
                action: ["sts:AssumeRole"],
            }],
        },
        path: "/",
        managedPolicyArns: ["arn:${AWS::Partition}:iam::aws:policy/AmazonEC2FullAccess"],
    });
    const automationAssociation = new aws_native.ssm.Association("automationAssociation", {
        name: "AWS-StopEC2Instance",
        parameters: {
            automationAssumeRole: ["AutomationExecutionRole.Arn"],
        },
        targets: [{
            key: "ParameterValues",
            values: ["i-1234567890abcdef0"],
        }],
        automationTargetParameterName: "InstanceId",
    });
    

    Coming soon!

    Create Role Resource

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

    Constructor syntax

    new Role(name: string, args: RoleArgs, opts?: CustomResourceOptions);
    @overload
    def Role(resource_name: str,
             args: RoleArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Role(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             assume_role_policy_document: Optional[Any] = None,
             description: Optional[str] = None,
             managed_policy_arns: Optional[Sequence[str]] = None,
             max_session_duration: Optional[int] = None,
             path: Optional[str] = None,
             permissions_boundary: Optional[str] = None,
             policies: Optional[Sequence[RolePolicyArgs]] = None,
             role_name: Optional[str] = None,
             tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
    func NewRole(ctx *Context, name string, args RoleArgs, opts ...ResourceOption) (*Role, error)
    public Role(string name, RoleArgs args, CustomResourceOptions? opts = null)
    public Role(String name, RoleArgs args)
    public Role(String name, RoleArgs args, CustomResourceOptions options)
    
    type: aws-native:iam:Role
    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 RoleArgs
    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 RoleArgs
    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 RoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RoleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    AssumeRolePolicyDocument object

    The trust policy that is associated with this role. Trust policies define which entities can assume the role. You can associate only one trust policy with a role. For an example of a policy that can be used to assume a role, see Template Examples. For more information about the elements that you can use in an IAM policy, see Policy Elements Reference in the User Guide.

    Search the CloudFormation User Guide for AWS::IAM::Role for more information about the expected schema for this property.

    Description string
    A description of the role that you provide.
    ManagedPolicyArns List<string>
    A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the role. For more information about ARNs, see Amazon Resource Names (ARNs) and Service Namespaces in the General Reference.
    MaxSessionDuration int
    The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours. Anyone who assumes the role from the CLI or API can use the DurationSeconds API parameter or the duration-seconds CLI parameter to request a longer session. The MaxSessionDuration setting determines the maximum duration that can be requested using the DurationSeconds parameter. If users don't specify a value for the DurationSeconds parameter, their security credentials are valid for one hour by default. This applies when you use the AssumeRole* API operations or the assume-role* CLI operations but does not apply when you use those operations to create a console URL. For more information, see Using IAM roles in the IAM User Guide.
    Path string
    The path to the role. For more information about paths, see IAM Identifiers in the IAM User Guide. This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its regex pattern) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters.
    PermissionsBoundary string
    The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide.
    Policies List<Pulumi.AwsNative.Iam.Inputs.RolePolicy>

    Adds or updates an inline policy document that is embedded in the specified IAM role.

    When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role. You can update a role's trust policy later. For more information about IAM roles, go to Using Roles to Delegate Permissions and Federate Identities .

    A role can also have an attached managed policy. For information about policies, see Managed Policies and Inline Policies in the IAM User Guide .

    For information about limits on the number of inline policies that you can embed with a role, see Limitations on IAM Entities in the IAM User Guide .

    If an external policy (such as AWS::IAM::Policy or AWS::IAM::ManagedPolicy ) has a Ref to a role and if a resource (such as AWS::ECS::Service ) also has a Ref to the same role, add a DependsOn attribute to the resource to make the resource depend on the external policy. This dependency ensures that the role's policy is available throughout the resource's lifecycle. For example, when you delete a stack with an AWS::ECS::Service resource, the DependsOn attribute ensures that AWS CloudFormation deletes the AWS::ECS::Service resource before deleting its role's policy.

    RoleName string

    A name for the IAM role, up to 64 characters in length. For valid values, see the RoleName parameter for the CreateRole action in the IAM User Guide .

    This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The role name must be unique within the account. Role names are not distinguished by case. For example, you cannot create roles named both "Role1" and "role1".

    If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the role name.

    If you specify a name, you must specify the CAPABILITY_NAMED_IAM value to acknowledge your template's capabilities. For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .

    Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using Fn::Join and AWS::Region to create a Region-specific name, as in the following example: {"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]} .

    Tags List<Pulumi.AwsNative.Inputs.Tag>
    A list of tags that are attached to the role. For more information about tagging, see Tagging IAM resources in the IAM User Guide.
    AssumeRolePolicyDocument interface{}

    The trust policy that is associated with this role. Trust policies define which entities can assume the role. You can associate only one trust policy with a role. For an example of a policy that can be used to assume a role, see Template Examples. For more information about the elements that you can use in an IAM policy, see Policy Elements Reference in the User Guide.

    Search the CloudFormation User Guide for AWS::IAM::Role for more information about the expected schema for this property.

    Description string
    A description of the role that you provide.
    ManagedPolicyArns []string
    A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the role. For more information about ARNs, see Amazon Resource Names (ARNs) and Service Namespaces in the General Reference.
    MaxSessionDuration int
    The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours. Anyone who assumes the role from the CLI or API can use the DurationSeconds API parameter or the duration-seconds CLI parameter to request a longer session. The MaxSessionDuration setting determines the maximum duration that can be requested using the DurationSeconds parameter. If users don't specify a value for the DurationSeconds parameter, their security credentials are valid for one hour by default. This applies when you use the AssumeRole* API operations or the assume-role* CLI operations but does not apply when you use those operations to create a console URL. For more information, see Using IAM roles in the IAM User Guide.
    Path string
    The path to the role. For more information about paths, see IAM Identifiers in the IAM User Guide. This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its regex pattern) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters.
    PermissionsBoundary string
    The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide.
    Policies []RolePolicyTypeArgs

    Adds or updates an inline policy document that is embedded in the specified IAM role.

    When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role. You can update a role's trust policy later. For more information about IAM roles, go to Using Roles to Delegate Permissions and Federate Identities .

    A role can also have an attached managed policy. For information about policies, see Managed Policies and Inline Policies in the IAM User Guide .

    For information about limits on the number of inline policies that you can embed with a role, see Limitations on IAM Entities in the IAM User Guide .

    If an external policy (such as AWS::IAM::Policy or AWS::IAM::ManagedPolicy ) has a Ref to a role and if a resource (such as AWS::ECS::Service ) also has a Ref to the same role, add a DependsOn attribute to the resource to make the resource depend on the external policy. This dependency ensures that the role's policy is available throughout the resource's lifecycle. For example, when you delete a stack with an AWS::ECS::Service resource, the DependsOn attribute ensures that AWS CloudFormation deletes the AWS::ECS::Service resource before deleting its role's policy.

    RoleName string

    A name for the IAM role, up to 64 characters in length. For valid values, see the RoleName parameter for the CreateRole action in the IAM User Guide .

    This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The role name must be unique within the account. Role names are not distinguished by case. For example, you cannot create roles named both "Role1" and "role1".

    If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the role name.

    If you specify a name, you must specify the CAPABILITY_NAMED_IAM value to acknowledge your template's capabilities. For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .

    Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using Fn::Join and AWS::Region to create a Region-specific name, as in the following example: {"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]} .

    Tags TagArgs
    A list of tags that are attached to the role. For more information about tagging, see Tagging IAM resources in the IAM User Guide.
    assumeRolePolicyDocument Object

    The trust policy that is associated with this role. Trust policies define which entities can assume the role. You can associate only one trust policy with a role. For an example of a policy that can be used to assume a role, see Template Examples. For more information about the elements that you can use in an IAM policy, see Policy Elements Reference in the User Guide.

    Search the CloudFormation User Guide for AWS::IAM::Role for more information about the expected schema for this property.

    description String
    A description of the role that you provide.
    managedPolicyArns List<String>
    A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the role. For more information about ARNs, see Amazon Resource Names (ARNs) and Service Namespaces in the General Reference.
    maxSessionDuration Integer
    The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours. Anyone who assumes the role from the CLI or API can use the DurationSeconds API parameter or the duration-seconds CLI parameter to request a longer session. The MaxSessionDuration setting determines the maximum duration that can be requested using the DurationSeconds parameter. If users don't specify a value for the DurationSeconds parameter, their security credentials are valid for one hour by default. This applies when you use the AssumeRole* API operations or the assume-role* CLI operations but does not apply when you use those operations to create a console URL. For more information, see Using IAM roles in the IAM User Guide.
    path String
    The path to the role. For more information about paths, see IAM Identifiers in the IAM User Guide. This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its regex pattern) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters.
    permissionsBoundary String
    The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide.
    policies List<RolePolicy>

    Adds or updates an inline policy document that is embedded in the specified IAM role.

    When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role. You can update a role's trust policy later. For more information about IAM roles, go to Using Roles to Delegate Permissions and Federate Identities .

    A role can also have an attached managed policy. For information about policies, see Managed Policies and Inline Policies in the IAM User Guide .

    For information about limits on the number of inline policies that you can embed with a role, see Limitations on IAM Entities in the IAM User Guide .

    If an external policy (such as AWS::IAM::Policy or AWS::IAM::ManagedPolicy ) has a Ref to a role and if a resource (such as AWS::ECS::Service ) also has a Ref to the same role, add a DependsOn attribute to the resource to make the resource depend on the external policy. This dependency ensures that the role's policy is available throughout the resource's lifecycle. For example, when you delete a stack with an AWS::ECS::Service resource, the DependsOn attribute ensures that AWS CloudFormation deletes the AWS::ECS::Service resource before deleting its role's policy.

    roleName String

    A name for the IAM role, up to 64 characters in length. For valid values, see the RoleName parameter for the CreateRole action in the IAM User Guide .

    This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The role name must be unique within the account. Role names are not distinguished by case. For example, you cannot create roles named both "Role1" and "role1".

    If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the role name.

    If you specify a name, you must specify the CAPABILITY_NAMED_IAM value to acknowledge your template's capabilities. For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .

    Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using Fn::Join and AWS::Region to create a Region-specific name, as in the following example: {"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]} .

    tags List<Tag>
    A list of tags that are attached to the role. For more information about tagging, see Tagging IAM resources in the IAM User Guide.
    assumeRolePolicyDocument any

    The trust policy that is associated with this role. Trust policies define which entities can assume the role. You can associate only one trust policy with a role. For an example of a policy that can be used to assume a role, see Template Examples. For more information about the elements that you can use in an IAM policy, see Policy Elements Reference in the User Guide.

    Search the CloudFormation User Guide for AWS::IAM::Role for more information about the expected schema for this property.

    description string
    A description of the role that you provide.
    managedPolicyArns string[]
    A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the role. For more information about ARNs, see Amazon Resource Names (ARNs) and Service Namespaces in the General Reference.
    maxSessionDuration number
    The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours. Anyone who assumes the role from the CLI or API can use the DurationSeconds API parameter or the duration-seconds CLI parameter to request a longer session. The MaxSessionDuration setting determines the maximum duration that can be requested using the DurationSeconds parameter. If users don't specify a value for the DurationSeconds parameter, their security credentials are valid for one hour by default. This applies when you use the AssumeRole* API operations or the assume-role* CLI operations but does not apply when you use those operations to create a console URL. For more information, see Using IAM roles in the IAM User Guide.
    path string
    The path to the role. For more information about paths, see IAM Identifiers in the IAM User Guide. This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its regex pattern) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters.
    permissionsBoundary string
    The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide.
    policies RolePolicy[]

    Adds or updates an inline policy document that is embedded in the specified IAM role.

    When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role. You can update a role's trust policy later. For more information about IAM roles, go to Using Roles to Delegate Permissions and Federate Identities .

    A role can also have an attached managed policy. For information about policies, see Managed Policies and Inline Policies in the IAM User Guide .

    For information about limits on the number of inline policies that you can embed with a role, see Limitations on IAM Entities in the IAM User Guide .

    If an external policy (such as AWS::IAM::Policy or AWS::IAM::ManagedPolicy ) has a Ref to a role and if a resource (such as AWS::ECS::Service ) also has a Ref to the same role, add a DependsOn attribute to the resource to make the resource depend on the external policy. This dependency ensures that the role's policy is available throughout the resource's lifecycle. For example, when you delete a stack with an AWS::ECS::Service resource, the DependsOn attribute ensures that AWS CloudFormation deletes the AWS::ECS::Service resource before deleting its role's policy.

    roleName string

    A name for the IAM role, up to 64 characters in length. For valid values, see the RoleName parameter for the CreateRole action in the IAM User Guide .

    This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The role name must be unique within the account. Role names are not distinguished by case. For example, you cannot create roles named both "Role1" and "role1".

    If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the role name.

    If you specify a name, you must specify the CAPABILITY_NAMED_IAM value to acknowledge your template's capabilities. For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .

    Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using Fn::Join and AWS::Region to create a Region-specific name, as in the following example: {"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]} .

    tags Tag[]
    A list of tags that are attached to the role. For more information about tagging, see Tagging IAM resources in the IAM User Guide.
    assume_role_policy_document Any

    The trust policy that is associated with this role. Trust policies define which entities can assume the role. You can associate only one trust policy with a role. For an example of a policy that can be used to assume a role, see Template Examples. For more information about the elements that you can use in an IAM policy, see Policy Elements Reference in the User Guide.

    Search the CloudFormation User Guide for AWS::IAM::Role for more information about the expected schema for this property.

    description str
    A description of the role that you provide.
    managed_policy_arns Sequence[str]
    A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the role. For more information about ARNs, see Amazon Resource Names (ARNs) and Service Namespaces in the General Reference.
    max_session_duration int
    The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours. Anyone who assumes the role from the CLI or API can use the DurationSeconds API parameter or the duration-seconds CLI parameter to request a longer session. The MaxSessionDuration setting determines the maximum duration that can be requested using the DurationSeconds parameter. If users don't specify a value for the DurationSeconds parameter, their security credentials are valid for one hour by default. This applies when you use the AssumeRole* API operations or the assume-role* CLI operations but does not apply when you use those operations to create a console URL. For more information, see Using IAM roles in the IAM User Guide.
    path str
    The path to the role. For more information about paths, see IAM Identifiers in the IAM User Guide. This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its regex pattern) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters.
    permissions_boundary str
    The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide.
    policies Sequence[RolePolicyArgs]

    Adds or updates an inline policy document that is embedded in the specified IAM role.

    When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role. You can update a role's trust policy later. For more information about IAM roles, go to Using Roles to Delegate Permissions and Federate Identities .

    A role can also have an attached managed policy. For information about policies, see Managed Policies and Inline Policies in the IAM User Guide .

    For information about limits on the number of inline policies that you can embed with a role, see Limitations on IAM Entities in the IAM User Guide .

    If an external policy (such as AWS::IAM::Policy or AWS::IAM::ManagedPolicy ) has a Ref to a role and if a resource (such as AWS::ECS::Service ) also has a Ref to the same role, add a DependsOn attribute to the resource to make the resource depend on the external policy. This dependency ensures that the role's policy is available throughout the resource's lifecycle. For example, when you delete a stack with an AWS::ECS::Service resource, the DependsOn attribute ensures that AWS CloudFormation deletes the AWS::ECS::Service resource before deleting its role's policy.

    role_name str

    A name for the IAM role, up to 64 characters in length. For valid values, see the RoleName parameter for the CreateRole action in the IAM User Guide .

    This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The role name must be unique within the account. Role names are not distinguished by case. For example, you cannot create roles named both "Role1" and "role1".

    If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the role name.

    If you specify a name, you must specify the CAPABILITY_NAMED_IAM value to acknowledge your template's capabilities. For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .

    Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using Fn::Join and AWS::Region to create a Region-specific name, as in the following example: {"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]} .

    tags Sequence[TagArgs]
    A list of tags that are attached to the role. For more information about tagging, see Tagging IAM resources in the IAM User Guide.
    assumeRolePolicyDocument Any

    The trust policy that is associated with this role. Trust policies define which entities can assume the role. You can associate only one trust policy with a role. For an example of a policy that can be used to assume a role, see Template Examples. For more information about the elements that you can use in an IAM policy, see Policy Elements Reference in the User Guide.

    Search the CloudFormation User Guide for AWS::IAM::Role for more information about the expected schema for this property.

    description String
    A description of the role that you provide.
    managedPolicyArns List<String>
    A list of Amazon Resource Names (ARNs) of the IAM managed policies that you want to attach to the role. For more information about ARNs, see Amazon Resource Names (ARNs) and Service Namespaces in the General Reference.
    maxSessionDuration Number
    The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours. Anyone who assumes the role from the CLI or API can use the DurationSeconds API parameter or the duration-seconds CLI parameter to request a longer session. The MaxSessionDuration setting determines the maximum duration that can be requested using the DurationSeconds parameter. If users don't specify a value for the DurationSeconds parameter, their security credentials are valid for one hour by default. This applies when you use the AssumeRole* API operations or the assume-role* CLI operations but does not apply when you use those operations to create a console URL. For more information, see Using IAM roles in the IAM User Guide.
    path String
    The path to the role. For more information about paths, see IAM Identifiers in the IAM User Guide. This parameter is optional. If it is not included, it defaults to a slash (/). This parameter allows (through its regex pattern) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters.
    permissionsBoundary String
    The ARN of the policy used to set the permissions boundary for the role. For more information about permissions boundaries, see Permissions boundaries for IAM identities in the IAM User Guide.
    policies List<Property Map>

    Adds or updates an inline policy document that is embedded in the specified IAM role.

    When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role. You can update a role's trust policy later. For more information about IAM roles, go to Using Roles to Delegate Permissions and Federate Identities .

    A role can also have an attached managed policy. For information about policies, see Managed Policies and Inline Policies in the IAM User Guide .

    For information about limits on the number of inline policies that you can embed with a role, see Limitations on IAM Entities in the IAM User Guide .

    If an external policy (such as AWS::IAM::Policy or AWS::IAM::ManagedPolicy ) has a Ref to a role and if a resource (such as AWS::ECS::Service ) also has a Ref to the same role, add a DependsOn attribute to the resource to make the resource depend on the external policy. This dependency ensures that the role's policy is available throughout the resource's lifecycle. For example, when you delete a stack with an AWS::ECS::Service resource, the DependsOn attribute ensures that AWS CloudFormation deletes the AWS::ECS::Service resource before deleting its role's policy.

    roleName String

    A name for the IAM role, up to 64 characters in length. For valid values, see the RoleName parameter for the CreateRole action in the IAM User Guide .

    This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The role name must be unique within the account. Role names are not distinguished by case. For example, you cannot create roles named both "Role1" and "role1".

    If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the role name.

    If you specify a name, you must specify the CAPABILITY_NAMED_IAM value to acknowledge your template's capabilities. For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates .

    Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using Fn::Join and AWS::Region to create a Region-specific name, as in the following example: {"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]} .

    tags List<Property Map>
    A list of tags that are attached to the role. For more information about tagging, see Tagging IAM resources in the IAM User Guide.

    Outputs

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

    Arn string

    Returns the Amazon Resource Name (ARN) for the role. For example:

    {"Fn::GetAtt" : ["MyRole", "Arn"] }

    This will return a value such as arn:aws:iam::1234567890:role/MyRole-AJJHDSKSDF .

    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId string

    Returns the stable and unique string identifying the role. For example, AIDAJQABLZS4A3QDU576Q .

    For more information about IDs, see IAM Identifiers in the IAM User Guide .

    Arn string

    Returns the Amazon Resource Name (ARN) for the role. For example:

    {"Fn::GetAtt" : ["MyRole", "Arn"] }

    This will return a value such as arn:aws:iam::1234567890:role/MyRole-AJJHDSKSDF .

    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId string

    Returns the stable and unique string identifying the role. For example, AIDAJQABLZS4A3QDU576Q .

    For more information about IDs, see IAM Identifiers in the IAM User Guide .

    arn String

    Returns the Amazon Resource Name (ARN) for the role. For example:

    {"Fn::GetAtt" : ["MyRole", "Arn"] }

    This will return a value such as arn:aws:iam::1234567890:role/MyRole-AJJHDSKSDF .

    id String
    The provider-assigned unique ID for this managed resource.
    roleId String

    Returns the stable and unique string identifying the role. For example, AIDAJQABLZS4A3QDU576Q .

    For more information about IDs, see IAM Identifiers in the IAM User Guide .

    arn string

    Returns the Amazon Resource Name (ARN) for the role. For example:

    {"Fn::GetAtt" : ["MyRole", "Arn"] }

    This will return a value such as arn:aws:iam::1234567890:role/MyRole-AJJHDSKSDF .

    id string
    The provider-assigned unique ID for this managed resource.
    roleId string

    Returns the stable and unique string identifying the role. For example, AIDAJQABLZS4A3QDU576Q .

    For more information about IDs, see IAM Identifiers in the IAM User Guide .

    arn str

    Returns the Amazon Resource Name (ARN) for the role. For example:

    {"Fn::GetAtt" : ["MyRole", "Arn"] }

    This will return a value such as arn:aws:iam::1234567890:role/MyRole-AJJHDSKSDF .

    id str
    The provider-assigned unique ID for this managed resource.
    role_id str

    Returns the stable and unique string identifying the role. For example, AIDAJQABLZS4A3QDU576Q .

    For more information about IDs, see IAM Identifiers in the IAM User Guide .

    arn String

    Returns the Amazon Resource Name (ARN) for the role. For example:

    {"Fn::GetAtt" : ["MyRole", "Arn"] }

    This will return a value such as arn:aws:iam::1234567890:role/MyRole-AJJHDSKSDF .

    id String
    The provider-assigned unique ID for this managed resource.
    roleId String

    Returns the stable and unique string identifying the role. For example, AIDAJQABLZS4A3QDU576Q .

    For more information about IDs, see IAM Identifiers in the IAM User Guide .

    Supporting Types

    RolePolicy, RolePolicyArgs

    PolicyDocument object
    The entire contents of the policy that defines permissions. For more information, see Overview of JSON policies.
    PolicyName string
    The friendly name (not ARN) identifying the policy.
    PolicyDocument interface{}
    The entire contents of the policy that defines permissions. For more information, see Overview of JSON policies.
    PolicyName string
    The friendly name (not ARN) identifying the policy.
    policyDocument Object
    The entire contents of the policy that defines permissions. For more information, see Overview of JSON policies.
    policyName String
    The friendly name (not ARN) identifying the policy.
    policyDocument any
    The entire contents of the policy that defines permissions. For more information, see Overview of JSON policies.
    policyName string
    The friendly name (not ARN) identifying the policy.
    policy_document Any
    The entire contents of the policy that defines permissions. For more information, see Overview of JSON policies.
    policy_name str
    The friendly name (not ARN) identifying the policy.
    policyDocument Any
    The entire contents of the policy that defines permissions. For more information, see Overview of JSON policies.
    policyName String
    The friendly name (not ARN) identifying the policy.

    Tag, TagArgs

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi