Class Connection
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.events.Connection
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,IConnection
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:37.037Z")
@Stability(Stable)
public class Connection
extends Resource
implements IConnection
Define an EventBridge Connection.
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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.events.IConnection
IConnection.Jsii$Default, IConnection.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
Connection
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Connection
(software.amazon.jsii.JsiiObjectRef objRef) Connection
(software.constructs.Construct scope, String id, ConnectionProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IConnection
fromConnectionAttributes
(software.constructs.Construct scope, String id, ConnectionAttributes attrs) Import an existing connection resource.static IConnection
fromEventBusArn
(software.constructs.Construct scope, String id, String connectionArn, String connectionSecretArn) Import an existing connection resource.The ARN of the connection created.The Name for the connection.The ARN for the secret created for the connection.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Connection
protected Connection(software.amazon.jsii.JsiiObjectRef objRef) -
Connection
protected Connection(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Connection
@Stability(Stable) public Connection(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ConnectionProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
fromConnectionAttributes
@Stability(Stable) @NotNull public static IConnection fromConnectionAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ConnectionAttributes attrs) Import an existing connection resource.- Parameters:
scope
- Parent construct. This parameter is required.id
- Construct ID. This parameter is required.attrs
- Imported connection properties. This parameter is required.
-
fromEventBusArn
@Stability(Stable) @NotNull public static IConnection fromEventBusArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String connectionArn, @NotNull String connectionSecretArn) Import an existing connection resource.- Parameters:
scope
- Parent construct. This parameter is required.id
- Construct ID. This parameter is required.connectionArn
- ARN of imported connection. This parameter is required.connectionSecretArn
- This parameter is required.
-
getConnectionArn
The ARN of the connection created.- Specified by:
getConnectionArn
in interfaceIConnection
-
getConnectionName
The Name for the connection.- Specified by:
getConnectionName
in interfaceIConnection
-
getConnectionSecretArn
The ARN for the secret created for the connection.- Specified by:
getConnectionSecretArn
in interfaceIConnection
-