create_topic_rule_destination

create_topic_rule_destination(**kwargs)

Creates a topic rule destination. The destination must be confirmed prior to use.

Requires permission to access the CreateTopicRuleDestination action.

See also: AWS API Documentation

Request Syntax

response = client.create_topic_rule_destination(
    destinationConfiguration={
        'httpUrlConfiguration': {
            'confirmationUrl': 'string'
        },
        'vpcConfiguration': {
            'subnetIds': [
                'string',
            ],
            'securityGroups': [
                'string',
            ],
            'vpcId': 'string',
            'roleArn': 'string'
        }
    }
)
Parameters
destinationConfiguration (dict) --

[REQUIRED]

The topic rule destination configuration.

  • httpUrlConfiguration (dict) --

    Configuration of the HTTP URL.

    • confirmationUrl (string) -- [REQUIRED]

      The URL IoT uses to confirm ownership of or access to the topic rule destination URL.

  • vpcConfiguration (dict) --

    Configuration of the virtual private cloud (VPC) connection.

    • subnetIds (list) -- [REQUIRED]

      The subnet IDs of the VPC destination.

      • (string) --
    • securityGroups (list) --

      The security groups of the VPC destination.

      • (string) --
    • vpcId (string) -- [REQUIRED]

      The ID of the VPC.

    • roleArn (string) -- [REQUIRED]

      The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).

Return type
dict
Returns
Response Syntax
{
    'topicRuleDestination': {
        'arn': 'string',
        'status': 'ENABLED'|'IN_PROGRESS'|'DISABLED'|'ERROR'|'DELETING',
        'createdAt': datetime(2015, 1, 1),
        'lastUpdatedAt': datetime(2015, 1, 1),
        'statusReason': 'string',
        'httpUrlProperties': {
            'confirmationUrl': 'string'
        },
        'vpcProperties': {
            'subnetIds': [
                'string',
            ],
            'securityGroups': [
                'string',
            ],
            'vpcId': 'string',
            'roleArn': 'string'
        }
    }
}

Response Structure

  • (dict) --
    • topicRuleDestination (dict) --

      The topic rule destination.

      • arn (string) --

        The topic rule destination URL.

      • status (string) --

        The status of the topic rule destination. Valid values are:

        IN_PROGRESS

        A topic rule destination was created but has not been confirmed. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination . Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.

        ENABLED

        Confirmation was completed, and traffic to this destination is allowed. You can set status to DISABLED by calling UpdateTopicRuleDestination .

        DISABLED

        Confirmation was completed, and traffic to this destination is not allowed. You can set status to ENABLED by calling UpdateTopicRuleDestination .

        ERROR

        Confirmation could not be completed, for example if the confirmation timed out. You can call GetTopicRuleDestination for details about the error. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination . Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.

      • createdAt (datetime) --

        The date and time when the topic rule destination was created.

      • lastUpdatedAt (datetime) --

        The date and time when the topic rule destination was last updated.

      • statusReason (string) --

        Additional details or reason why the topic rule destination is in the current status.

      • httpUrlProperties (dict) --

        Properties of the HTTP URL.

        • confirmationUrl (string) --

          The URL used to confirm the HTTP topic rule destination URL.

      • vpcProperties (dict) --

        Properties of the virtual private cloud (VPC) connection.

        • subnetIds (list) --

          The subnet IDs of the VPC destination.

          • (string) --
        • securityGroups (list) --

          The security groups of the VPC destination.

          • (string) --
        • vpcId (string) --

          The ID of the VPC.

        • roleArn (string) --

          The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).

Exceptions

  • IoT.Client.exceptions.InternalException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ResourceAlreadyExistsException
  • IoT.Client.exceptions.ServiceUnavailableException
  • IoT.Client.exceptions.ConflictingResourceUpdateException