> **Experimental**
>
> `@aws-cdk/aws-iot-actions-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# HttpsAction

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

Implements: [IAction](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-iot-alpha.IAction.html)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/https-action.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-iot-actions-alpha/lib/https-action.ts#L99)

## Example

TypeScript:

```ts
const topicRule = new iot.TopicRule(this, 'TopicRule', {
  sql: iot.IotSql.fromStringAsVer20160323(
    "SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'",
  ),
});

topicRule.addAction(
  new actions.HttpsAction('https://example.com/endpoint', {
    confirmationUrl: 'https://example.com',
    headers: [
      { key: 'key0', value: 'value0' },
      { key: 'key1', value: 'value1' },
    ],
    auth: { serviceName: 'serviceName', signingRegion: 'us-east-1' },
  }),
);
```

Python:

```python
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")
    ))
```

Java:

```java
TopicRule topicRule = TopicRule.Builder.create(this, "TopicRule")
        .sql(IotSql.fromStringAsVer20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'"))
        .build();

topicRule.addAction(
HttpsAction.Builder.create("https://example.com/endpoint")
        .confirmationUrl("https://example.com")
        .headers(List.of(HttpActionHeader.builder().key("key0").value("value0").build(), HttpActionHeader.builder().key("key1").value("value1").build()))
        .auth(HttpActionSigV4Auth.builder().serviceName("serviceName").signingRegion("us-east-1").build())
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.IoT.Actions.Alpha
var topicRule = new TopicRule(this, "TopicRule", new TopicRuleProps {
    Sql = IotSql.FromStringAsVer20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'")
});

topicRule.AddAction(
new HttpsAction("https://example.com/endpoint", new HttpsActionProps {
    ConfirmationUrl = "https://example.com",
    Headers = new [] { new HttpActionHeader { Key = "key0", Value = "value0" }, new HttpActionHeader { Key = "key1", Value = "value1" } },
    Auth = new HttpActionSigV4Auth { ServiceName = "serviceName", SigningRegion = "us-east-1" }
}));
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkiotactionsalpha/v2
topicRule := iot.NewTopicRule(this, jsii.String("TopicRule"), &TopicRuleProps{
	Sql: iot.IotSql_FromStringAsVer20160323(jsii.String("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'")),
})

topicRule.AddAction(
actions.NewHttpsAction(jsii.String("https://example.com/endpoint"), &HttpsActionProps{
	ConfirmationUrl: jsii.String("https://example.com"),
	Headers: []HttpActionHeader{
		&HttpActionHeader{
			Key: jsii.String("key0"),
			Value: jsii.String("value0"),
		},
		&HttpActionHeader{
			Key: jsii.String("key1"),
			Value: jsii.String("value1"),
		},
	},
	Auth: &HttpActionSigV4Auth{
		ServiceName: jsii.String("serviceName"),
		SigningRegion: jsii.String("us-east-1"),
	},
}))
```

## Initializer

TypeScript:

```ts
new HttpsAction(url: string, props?: HttpsActionProps)
```

Python:

```python
HttpsAction(url: str, props: typing.Optional[HttpsActionProps] = None)
```

Java:

```java
new HttpsAction(String url, HttpsActionProps props)
```

C# / .NET:

```csharp
new HttpsAction(string url, HttpsActionProps? props = null)
```

Golang:

```go
NewHttpsAction(Url *string, Props HttpsActionProps)
```
