RoleAlias class

Provides an IoT role alias.

Example Usage

pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_iam_getpolicydocument" "assumeRole" {
  principals = [{
    "type"        = "Service"
    "identifiers" = ["credentials.iot.amazonaws.com"]
  }]
  effect  = "Allow"
  actions = ["sts:AssumeRole"]
}

resource "aws_iam_role" "role" {
  name               = "dynamodb-access-role"
  assume_role_policy = data.aws_iam_getpolicydocument.assumeRole.json
}
resource "aws_iot_rolealias" "alias" {
  alias    = "Thermostat-dynamodb-access-role-alias"
  role_arn = aws_iam_role.role.arn
}
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:
        principals:
          - type: Service
            identifiers:
              - credentials.iot.amazonaws.com
        effect: Allow
        actions:
          - sts:AssumeRole

Import

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

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

Constructors

RoleAlias(String name, {RoleAliasArgs? args, CustomResourceOptions? options})
Creates a new RoleAlias. name The Pulumi resource name. args Arguments used to configure this RoleAlias. The set of arguments for RoleAlias. options Resource options controlling this resource's behavior.
RoleAlias.reference(String urn)
Creates a typed reference to an existing RoleAlias resource.

Properties

alias ↔ Output<String>
The name of the role alias.
latefinal
arn ↔ Output<String>
The ARN assigned by AWS to this role alias.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
credentialDuration ↔ Output<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).
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
roleArn ↔ Output<String>
The identity of the role to which the alias refers.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tags ↔ Output<Map<String, String>?>
Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {RoleAliasState? state, CustomResourceOptions? options}) → RoleAlias
Gets an existing RoleAlias resource's state with the given name and id.