HttpsAction

class aws_cdk.aws_iot_actions_alpha.HttpsAction(url, *, auth=None, confirmation_url=None, headers=None, role=None)

Bases: object

(experimental) The action to send data from an MQTT message to a web application or service.

Stability:

experimental

ExampleMetadata:

infused

Example:

topic_rule = iot.TopicRule(self, "TopicRule",
    sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'")
)

topic_rule.add_action(
    actions.HttpsAction("https://example.com/endpoint",
        confirmation_url="https://example.com",
        headers=[actions.HttpActionHeader(key="key0", value="value0"), actions.HttpActionHeader(key="key1", value="value1")
        ],
        auth=actions.HttpActionSigV4Auth(service_name="serviceName", signing_region="us-east-1")
    ))
Parameters:
  • url (str) – The url to which to send post request.

  • auth (Union[HttpActionSigV4Auth, Dict[str, Any], None]) – (experimental) Use Sigv4 authorization.

  • confirmation_url (Optional[str]) – (experimental) If specified, AWS IoT uses the confirmation URL to create a matching topic rule destination.

  • headers (Optional[Sequence[Union[HttpActionHeader, Dict[str, Any]]]]) – (experimental) The headers to include in the HTTPS request to the endpoint.

  • role (Optional[IRole]) – (experimental) The IAM role that allows access to AWS service. Default: a new role will be created

Stability:

experimental