All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.iot.actions.alpha.HttpsAction Maven / Gradle / Ivy

There is a newer version: 2.167.1-alpha.0
Show newest version
package software.amazon.awscdk.services.iot.actions.alpha;

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

* Example: *

*

 * 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());
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-04T00:39:42.240Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.iot.actions.alpha.$Module.class, fqn = "@aws-cdk/aws-iot-actions-alpha.HttpsAction") public class HttpsAction extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.iot.alpha.IAction { protected HttpsAction(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected HttpsAction(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param url The url to which to send post request. This parameter is required. * @param props Optional properties to not use default. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public HttpsAction(final @org.jetbrains.annotations.NotNull java.lang.String url, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.iot.actions.alpha.HttpsActionProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(url, "url is required"), props }); } /** * @param url The url to which to send post request. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public HttpsAction(final @org.jetbrains.annotations.NotNull java.lang.String url) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(url, "url is required") }); } /** * (experimental) A fluent builder for {@link software.amazon.awscdk.services.iot.actions.alpha.HttpsAction}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param url The url to which to send post request. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create(final java.lang.String url) { return new Builder(url); } private final java.lang.String url; private software.amazon.awscdk.services.iot.actions.alpha.HttpsActionProps.Builder props; private Builder(final java.lang.String url) { this.url = url; } /** * (experimental) The IAM role that allows access to AWS service. *

* Default: a new role will be created *

* @return {@code this} * @param role The IAM role that allows access to AWS service. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder role(final software.amazon.awscdk.services.iam.IRole role) { this.props().role(role); return this; } /** * (experimental) Use Sigv4 authorization. *

* @return {@code this} * @param auth Use Sigv4 authorization. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder auth(final software.amazon.awscdk.services.iot.actions.alpha.HttpActionSigV4Auth auth) { this.props().auth(auth); return this; } /** * (experimental) If specified, AWS IoT uses the confirmation URL to create a matching topic rule destination. *

* @return {@code this} * @param confirmationUrl If specified, AWS IoT uses the confirmation URL to create a matching topic rule destination. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder confirmationUrl(final java.lang.String confirmationUrl) { this.props().confirmationUrl(confirmationUrl); return this; } /** * (experimental) The headers to include in the HTTPS request to the endpoint. *

* @return {@code this} * @param headers The headers to include in the HTTPS request to the endpoint. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder headers(final java.util.List headers) { this.props().headers(headers); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.services.iot.actions.alpha.HttpsAction}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.services.iot.actions.alpha.HttpsAction build() { return new software.amazon.awscdk.services.iot.actions.alpha.HttpsAction( this.url, this.props != null ? this.props.build() : null ); } private software.amazon.awscdk.services.iot.actions.alpha.HttpsActionProps.Builder props() { if (this.props == null) { this.props = new software.amazon.awscdk.services.iot.actions.alpha.HttpsActionProps.Builder(); } return this.props; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy