1. Packages
  2. AWS
  3. API Docs
  4. iot
  5. RoleAlias
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.iot.RoleAlias

Explore with Pulumi AI

Provides an IoT role alias.

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  role:
    type: aws:iam:Role
    properties:
      name: dynamodb-access-role
      assumeRolePolicy: ${assumeRole.json}
  alias:
    type: aws:iot:RoleAlias
    properties:
      alias: Thermostat-dynamodb-access-role-alias
      roleArn: ${role.arn}
variables:
  assumeRole:
    fn::invoke:
      function: aws:iam:getPolicyDocument
      arguments:
        effect: Allow
        principals:
          - type: Service
            identifiers:
              - credentials.iot.amazonaws.com
        actions:
          - sts:AssumeRole
Copy

Create RoleAlias Resource

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

Constructor syntax

new RoleAlias(name: string, args: RoleAliasArgs, opts?: CustomResourceOptions);
@overload
def RoleAlias(resource_name: str,
              args: RoleAliasArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def RoleAlias(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              alias: Optional[str] = None,
              role_arn: Optional[str] = None,
              credential_duration: Optional[int] = None,
              tags: Optional[Mapping[str, str]] = None)
func NewRoleAlias(ctx *Context, name string, args RoleAliasArgs, opts ...ResourceOption) (*RoleAlias, error)
public RoleAlias(string name, RoleAliasArgs args, CustomResourceOptions? opts = null)
public RoleAlias(String name, RoleAliasArgs args)
public RoleAlias(String name, RoleAliasArgs args, CustomResourceOptions options)
type: aws:iot:RoleAlias
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Constructor example

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

var roleAliasResource = new Aws.Iot.RoleAlias("roleAliasResource", new()
{
    Alias = "string",
    RoleArn = "string",
    CredentialDuration = 0,
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := iot.NewRoleAlias(ctx, "roleAliasResource", &iot.RoleAliasArgs{
	Alias:              pulumi.String("string"),
	RoleArn:            pulumi.String("string"),
	CredentialDuration: pulumi.Int(0),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var roleAliasResource = new RoleAlias("roleAliasResource", RoleAliasArgs.builder()
    .alias("string")
    .roleArn("string")
    .credentialDuration(0)
    .tags(Map.of("string", "string"))
    .build());
Copy
role_alias_resource = aws.iot.RoleAlias("roleAliasResource",
    alias="string",
    role_arn="string",
    credential_duration=0,
    tags={
        "string": "string",
    })
Copy
const roleAliasResource = new aws.iot.RoleAlias("roleAliasResource", {
    alias: "string",
    roleArn: "string",
    credentialDuration: 0,
    tags: {
        string: "string",
    },
});
Copy
type: aws:iot:RoleAlias
properties:
    alias: string
    credentialDuration: 0
    roleArn: string
    tags:
        string: string
Copy

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

Alias
This property is required.
Changes to this property will trigger replacement.
string
The name of the role alias.
RoleArn This property is required. string
The identity of the role to which the alias refers.
CredentialDuration int
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
Tags Dictionary<string, string>
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Alias
This property is required.
Changes to this property will trigger replacement.
string
The name of the role alias.
RoleArn This property is required. string
The identity of the role to which the alias refers.
CredentialDuration int
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
Tags map[string]string
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
alias
This property is required.
Changes to this property will trigger replacement.
String
The name of the role alias.
roleArn This property is required. String
The identity of the role to which the alias refers.
credentialDuration Integer
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
tags Map<String,String>
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
alias
This property is required.
Changes to this property will trigger replacement.
string
The name of the role alias.
roleArn This property is required. string
The identity of the role to which the alias refers.
credentialDuration number
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
tags {[key: string]: string}
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
alias
This property is required.
Changes to this property will trigger replacement.
str
The name of the role alias.
role_arn This property is required. str
The identity of the role to which the alias refers.
credential_duration int
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
tags Mapping[str, str]
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
alias
This property is required.
Changes to this property will trigger replacement.
String
The name of the role alias.
roleArn This property is required. String
The identity of the role to which the alias refers.
credentialDuration Number
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
tags Map<String>
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

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

Arn string
The ARN assigned by AWS to this role alias.
Id string
The provider-assigned unique ID for this managed resource.
TagsAll Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
The ARN assigned by AWS to this role alias.
Id string
The provider-assigned unique ID for this managed resource.
TagsAll map[string]string
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The ARN assigned by AWS to this role alias.
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
The ARN assigned by AWS to this role alias.
id string
The provider-assigned unique ID for this managed resource.
tagsAll {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
The ARN assigned by AWS to this role alias.
id str
The provider-assigned unique ID for this managed resource.
tags_all Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The ARN assigned by AWS to this role alias.
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing RoleAlias Resource

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

public static get(name: string, id: Input<ID>, state?: RoleAliasState, opts?: CustomResourceOptions): RoleAlias
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        alias: Optional[str] = None,
        arn: Optional[str] = None,
        credential_duration: Optional[int] = None,
        role_arn: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> RoleAlias
func GetRoleAlias(ctx *Context, name string, id IDInput, state *RoleAliasState, opts ...ResourceOption) (*RoleAlias, error)
public static RoleAlias Get(string name, Input<string> id, RoleAliasState? state, CustomResourceOptions? opts = null)
public static RoleAlias get(String name, Output<String> id, RoleAliasState state, CustomResourceOptions options)
resources:  _:    type: aws:iot:RoleAlias    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Alias Changes to this property will trigger replacement. string
The name of the role alias.
Arn string
The ARN assigned by AWS to this role alias.
CredentialDuration int
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
RoleArn string
The identity of the role to which the alias refers.
Tags Dictionary<string, string>
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Alias Changes to this property will trigger replacement. string
The name of the role alias.
Arn string
The ARN assigned by AWS to this role alias.
CredentialDuration int
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
RoleArn string
The identity of the role to which the alias refers.
Tags map[string]string
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

alias Changes to this property will trigger replacement. String
The name of the role alias.
arn String
The ARN assigned by AWS to this role alias.
credentialDuration Integer
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
roleArn String
The identity of the role to which the alias refers.
tags Map<String,String>
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

alias Changes to this property will trigger replacement. string
The name of the role alias.
arn string
The ARN assigned by AWS to this role alias.
credentialDuration number
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
roleArn string
The identity of the role to which the alias refers.
tags {[key: string]: string}
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

alias Changes to this property will trigger replacement. str
The name of the role alias.
arn str
The ARN assigned by AWS to this role alias.
credential_duration int
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
role_arn str
The identity of the role to which the alias refers.
tags Mapping[str, str]
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

alias Changes to this property will trigger replacement. String
The name of the role alias.
arn String
The ARN assigned by AWS to this role alias.
credentialDuration Number
The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
roleArn String
The identity of the role to which the alias refers.
tags Map<String>
Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Import

Using pulumi import, import IOT Role Alias using the alias. For example:

$ pulumi import aws:iot/roleAlias:RoleAlias example myalias
Copy

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

Package Details

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