Class ApiDestination
Define an EventBridge Api Destination.
Inherited Members
Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ApiDestination : Resource, IApiDestination, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class ApiDestination Inherits Resource Implements IApiDestination, IResource, IConstruct, IDependable, IEnvironmentAware
Remarks
Resource: AWS::Events::ApiDestination
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
| ApiDestination(Construct, string, IApiDestinationProps) | Define an EventBridge Api Destination. |
Properties
| ApiDestinationArn | The ARN of the Api Destination created. |
| ApiDestinationArnForPolicy | The Amazon Resource Name (ARN) of an API destination in resource format. |
| ApiDestinationName | The Name of the Api Destination created. |
| Connection | The Connection to associate with Api Destination. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Methods
| FromApiDestinationAttributes(Construct, string, IApiDestinationAttributes) | Create an Api Destination construct from an existing Api Destination ARN. |
Constructors
ApiDestination(Construct, string, IApiDestinationProps)
Define an EventBridge Api Destination.
public ApiDestination(Construct scope, string id, IApiDestinationProps props)
Parameters
- scope Construct
- id string
- props IApiDestinationProps
Remarks
Resource: AWS::Events::ApiDestination
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) }
});
Properties
ApiDestinationArn
The ARN of the Api Destination created.
public virtual string ApiDestinationArn { get; }
Property Value
Remarks
Attribute: true
ApiDestinationArnForPolicy
The Amazon Resource Name (ARN) of an API destination in resource format.
public virtual string? ApiDestinationArnForPolicy { get; }
Property Value
Remarks
Attribute: true
ApiDestinationName
The Name of the Api Destination created.
public virtual string ApiDestinationName { get; }
Property Value
Remarks
Attribute: true
Connection
The Connection to associate with Api Destination.
public virtual IConnection Connection { get; }
Property Value
Remarks
Resource: AWS::Events::ApiDestination
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Resource: AWS::Events::ApiDestination
ExampleMetadata: infused
Methods
FromApiDestinationAttributes(Construct, string, IApiDestinationAttributes)
Create an Api Destination construct from an existing Api Destination ARN.
public static ApiDestination FromApiDestinationAttributes(Construct scope, string id, IApiDestinationAttributes attrs)
Parameters
- scope Construct
The scope creating construct (usually
this).- id string
The construct's id.
- attrs IApiDestinationAttributes
The Api Destination import attributes.
Returns
Remarks
Resource: AWS::Events::ApiDestination
ExampleMetadata: infused