Class Connection
Define an EventBridge Connection.
Inherited Members
Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.AWS.Events.dll
Syntax (csharp)
public class Connection : Resource, IConnection, IResource, IConstruct, IDependable
Syntax (vb)
Public Class Connection
Inherits Resource
Implements IConnection, IResource, IConstruct, IDependable
Remarks
Resource: AWS::Events::Connection
ExampleMetadata: infused
Examples
var connection = new Connection(this, "Connection", new ConnectionProps {
Authorization = Authorization.ApiKey("x-api-key", SecretValue.SecretsManager("ApiSecretName")),
Description = "Connection with API Key x-api-key"
});
var destination = new ApiDestination(this, "Destination", new ApiDestinationProps {
Connection = connection,
Endpoint = "https://example.com",
Description = "Calling example.com with API key x-api-key"
});
var rule = new Rule(this, "Rule", new RuleProps {
Schedule = Schedule.Rate(Duration.Minutes(1)),
Targets = new [] { new ApiDestination(destination) }
});
Synopsis
Constructors
Connection(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Connection(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Connection(Construct, String, IConnectionProps) |
Properties
ConnectionArn | The ARN of the connection created. |
ConnectionName | The Name for the connection. |
ConnectionSecretArn | The ARN for the secret created for the connection. |
Methods
FromConnectionAttributes(Construct, String, IConnectionAttributes) | Import an existing connection resource. |
FromEventBusArn(Construct, String, String, String) | Import an existing connection resource. |
Constructors
Connection(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Connection(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Connection(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Connection(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Connection(Construct, String, IConnectionProps)
public Connection(Construct scope, string id, IConnectionProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IConnectionProps
Properties
ConnectionArn
The ARN of the connection created.
public virtual string ConnectionArn { get; }
Property Value
System.String
Remarks
Attribute: true
ConnectionName
The Name for the connection.
public virtual string ConnectionName { get; }
Property Value
System.String
Remarks
Attribute: true
ConnectionSecretArn
The ARN for the secret created for the connection.
public virtual string ConnectionSecretArn { get; }
Property Value
System.String
Remarks
Attribute: true
Methods
FromConnectionAttributes(Construct, String, IConnectionAttributes)
Import an existing connection resource.
public static IConnection FromConnectionAttributes(Construct scope, string id, IConnectionAttributes attrs)
Parameters
- scope Constructs.Construct
Parent construct.
- id System.String
Construct ID.
- attrs IConnectionAttributes
Imported connection properties.
Returns
FromEventBusArn(Construct, String, String, String)
Import an existing connection resource.
public static IConnection FromEventBusArn(Construct scope, string id, string connectionArn, string connectionSecretArn)
Parameters
- scope Constructs.Construct
Parent construct.
- id System.String
Construct ID.
- connectionArn System.String
ARN of imported connection.
- connectionSecretArn System.String
Parent construct.
Returns