Class ApiDestination
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.events.targets.ApiDestination
- All Implemented Interfaces:
IRuleTarget,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:47.699Z")
@Stability(Stable)
public class ApiDestination
extends software.amazon.jsii.JsiiObject
implements IRuleTarget
Use an API Destination rule target.
Example:
Connection connection = Connection.Builder.create(this, "Connection")
.authorization(Authorization.apiKey("x-api-key", SecretValue.secretsManager("ApiSecretName")))
.description("Connection with API Key x-api-key")
.build();
ApiDestination destination = ApiDestination.Builder.create(this, "Destination")
.connection(connection)
.endpoint("https://example.com")
.description("Calling example.com with API key x-api-key")
.build();
Rule rule = Rule.Builder.create(this, "Rule")
.schedule(Schedule.rate(Duration.minutes(1)))
.targets(List.of(new ApiDestination(destination)))
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.events.IRuleTarget
IRuleTarget.Jsii$Default, IRuleTarget.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionApiDestination(IApiDestination apiDestination) ApiDestination(IApiDestination apiDestination, ApiDestinationProps props) protectedApiDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedApiDestination(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionReturns a RuleTarget that can be used to trigger API destinations from an EventBridge event.Returns a RuleTarget that can be used to trigger API destinations from an EventBridge event.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ApiDestination
protected ApiDestination(software.amazon.jsii.JsiiObjectRef objRef) -
ApiDestination
protected ApiDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ApiDestination
@Stability(Stable) public ApiDestination(@NotNull IApiDestination apiDestination, @Nullable ApiDestinationProps props) - Parameters:
apiDestination- This parameter is required.props-
-
ApiDestination
- Parameters:
apiDestination- This parameter is required.
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public RuleTargetConfig bind(@NotNull IRule _rule, @Nullable String _id) Returns a RuleTarget that can be used to trigger API destinations from an EventBridge event.- Specified by:
bindin interfaceIRuleTarget- Parameters:
_rule- This parameter is required._id-
-
bind
Returns a RuleTarget that can be used to trigger API destinations from an EventBridge event.- Specified by:
bindin interfaceIRuleTarget- Parameters:
_rule- This parameter is required.
-