create_role_alias

IoT.Client.create_role_alias(**kwargs)

Creates a role alias.

Requires permission to access the CreateRoleAlias action.

See also: AWS API Documentation

Request Syntax

response = client.create_role_alias(
    roleAlias='string',
    roleArn='string',
    credentialDurationSeconds=123,
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • roleAlias (string) --

    [REQUIRED]

    The role alias that points to a role ARN. This allows you to change the role without having to update the device.

  • roleArn (string) --

    [REQUIRED]

    The role ARN.

  • credentialDurationSeconds (integer) --

    How long (in seconds) the credentials will be valid. The default value is 3,600 seconds.

    This value must be less than or equal to the maximum session duration of the IAM role that the role alias references.

  • tags (list) --

    Metadata which can be used to manage the role alias.

    Note

    For URI Request parameters use format: ...key1=value1&key2=value2...

    For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."

    For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."

    • (dict) --

      A set of key/value pairs that are used to manage the resource.

      • Key (string) -- [REQUIRED]

        The tag's key.

      • Value (string) --

        The tag's value.

Return type

dict

Returns

Response Syntax

{
    'roleAlias': 'string',
    'roleAliasArn': 'string'
}

Response Structure

  • (dict) --

    • roleAlias (string) --

      The role alias.

    • roleAliasArn (string) --

      The role alias ARN.

Exceptions

  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.LimitExceededException
  • IoT.Client.exceptions.ThrottlingException
  • IoT.Client.exceptions.UnauthorizedException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.InternalFailureException