create_destination

IoTWireless.Client.create_destination(**kwargs)

Creates a new destination that maps a device message to an AWS IoT rule.

See also: AWS API Documentation

Request Syntax

response = client.create_destination(
    Name='string',
    ExpressionType='RuleName'|'MqttTopic',
    Expression='string',
    Description='string',
    RoleArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ClientRequestToken='string'
)
Parameters
  • Name (string) --

    [REQUIRED]

    The name of the new resource.

  • ExpressionType (string) --

    [REQUIRED]

    The type of value in Expression .

  • Expression (string) --

    [REQUIRED]

    The rule name or topic rule to send messages to.

  • Description (string) -- The description of the new resource.
  • RoleArn (string) --

    [REQUIRED]

    The ARN of the IAM Role that authorizes the destination.

  • Tags (list) --

    The tags to attach to the new destination. Tags are metadata that you can use to manage a resource.

    • (dict) --

      A simple label consisting of a customer-defined key-value pair

      • Key (string) -- [REQUIRED]

        The tag's key value.

      • Value (string) -- [REQUIRED]

        The tag's value.

  • ClientRequestToken (string) --

    Each resource must have a unique client request token. If you try to create a new resource with the same token as a resource that already exists, an exception occurs. If you omit this value, AWS SDKs will automatically generate a unique client request.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'Arn': 'string',
    'Name': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name of the new resource.

    • Name (string) --

      The name of the new resource.

Exceptions

  • IoTWireless.Client.exceptions.ValidationException
  • IoTWireless.Client.exceptions.ResourceNotFoundException
  • IoTWireless.Client.exceptions.AccessDeniedException
  • IoTWireless.Client.exceptions.ConflictException
  • IoTWireless.Client.exceptions.InternalServerException
  • IoTWireless.Client.exceptions.ThrottlingException