Skip to content
v2.277.0

HttpActionProperty Struct ​

Send data to an HTTPS endpoint.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
const httpActionProperty: iot.CfnTopicRule.HttpActionProperty = {
  url: 'url',

  // the properties below are optional
  auth: {
    sigv4: {
      roleArn: 'roleArn',
      serviceName: 'serviceName',
      signingRegion: 'signingRegion',
    },
  },
  batchConfig: {
    batchAcrossTopics: false,
    maxBatchOpenMs: 123,
    maxBatchSize: 123,
    maxBatchSizeBytes: 123,
  },
  confirmationUrl: 'confirmationUrl',
  enableBatching: false,
  headers: [{
    key: 'key',
    value: 'value',
  }],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

http_action_property = iot.CfnTopicRule.HttpActionProperty(
    url="url",

    # the properties below are optional
    auth=iot.CfnTopicRule.HttpAuthorizationProperty(
        sigv4=iot.CfnTopicRule.SigV4AuthorizationProperty(
            role_arn="roleArn",
            service_name="serviceName",
            signing_region="signingRegion"
        )
    ),
    batch_config=iot.CfnTopicRule.BatchConfigProperty(
        batch_across_topics=False,
        max_batch_open_ms=123,
        max_batch_size=123,
        max_batch_size_bytes=123
    ),
    confirmation_url="confirmationUrl",
    enable_batching=False,
    headers=[iot.CfnTopicRule.HttpActionHeaderProperty(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;

HttpActionProperty httpActionProperty = HttpActionProperty.builder()
        .url("url")

        // the properties below are optional
        .auth(HttpAuthorizationProperty.builder()
                .sigv4(SigV4AuthorizationProperty.builder()
                        .roleArn("roleArn")
                        .serviceName("serviceName")
                        .signingRegion("signingRegion")
                        .build())
                .build())
        .batchConfig(BatchConfigProperty.builder()
                .batchAcrossTopics(false)
                .maxBatchOpenMs(123)
                .maxBatchSize(123)
                .maxBatchSizeBytes(123)
                .build())
        .confirmationUrl("confirmationUrl")
        .enableBatching(false)
        .headers(List.of(HttpActionHeaderProperty.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoT;

var httpActionProperty = new HttpActionProperty {
    Url = "url",

    // the properties below are optional
    Auth = new HttpAuthorizationProperty {
        Sigv4 = new SigV4AuthorizationProperty {
            RoleArn = "roleArn",
            ServiceName = "serviceName",
            SigningRegion = "signingRegion"
        }
    },
    BatchConfig = new BatchConfigProperty {
        BatchAcrossTopics = false,
        MaxBatchOpenMs = 123,
        MaxBatchSize = 123,
        MaxBatchSizeBytes = 123
    },
    ConfirmationUrl = "confirmationUrl",
    EnableBatching = false,
    Headers = new [] { new HttpActionHeaderProperty {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

httpActionProperty := &HttpActionProperty{
	Url: jsii.String("url"),

	// the properties below are optional
	Auth: &HttpAuthorizationProperty{
		Sigv4: &SigV4AuthorizationProperty{
			RoleArn: jsii.String("roleArn"),
			ServiceName: jsii.String("serviceName"),
			SigningRegion: jsii.String("signingRegion"),
		},
	},
	BatchConfig: &BatchConfigProperty{
		BatchAcrossTopics: jsii.Boolean(false),
		MaxBatchOpenMs: jsii.Number(123),
		MaxBatchSize: jsii.Number(123),
		MaxBatchSizeBytes: jsii.Number(123),
	},
	ConfirmationUrl: jsii.String("confirmationUrl"),
	EnableBatching: jsii.Boolean(false),
	Headers: []interface{}{
		&HttpActionHeaderProperty{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

authoptionalIResolvable | CfnTopicRule.HttpAuthorizationPropertyauthoptionaltyping.Union[IResolvable, HttpAuthorizationProperty]authoptionalIResolvableAuthoptionalIResolvableAuthoptionalinterface{}#
The authentication method to use when sending data to an HTTPS endpoint.
batchConfigoptionalIResolvable | CfnTopicRule.BatchConfigPropertybatch_configoptionaltyping.Union[IResolvable, BatchConfigProperty]batchConfigoptionalIResolvableBatchConfigoptionalIResolvableBatchConfigoptionalinterface{}#
confirmationUrloptionalstringconfirmation_urloptionalstrconfirmationUrloptionalStringConfirmationUrloptionalstringConfirmationUrloptional*string#
The URL to which AWS IoT sends a confirmation message.
notes

The value of the confirmation URL must be a prefix of the endpoint URL. If you do not specify a confirmation URL AWS IoT uses the endpoint URL as the confirmation URL. If you use substitution templates in the confirmationUrl, you must create and enable topic rule destinations that match each possible value of the substitution template before traffic is allowed to your endpoint URL.

enableBatchingoptionalboolean | IResolvableenable_batchingoptionaltyping.Union[bool, IResolvable]enableBatchingoptionalBooleanEnableBatchingoptionalboolEnableBatchingoptionalinterface{}#
headersoptionalIResolvable | IResolvable | CfnTopicRule.HttpActionHeaderProperty[]headersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HttpActionHeaderProperty]]]headersoptionalIResolvableHeadersoptionalIResolvableHeadersoptionalinterface{}#
The HTTP headers to send with the message data.
urlstringurlstrurlStringUrlstringUrl*stringrequired#
The endpoint URL.

If substitution templates are used in the URL, you must also specify a confirmationUrl . If this is a new destination, a new TopicRuleDestination is created if possible.