Class ApiDestination
Use an API Destination rule target.
Inheritance
System.Object
ApiDestination
Implements
Namespace: Amazon.CDK.AWS.Events.Targets
Assembly: Amazon.CDK.AWS.Events.Targets.dll
Syntax (csharp)
public class ApiDestination : DeputyBase, IRuleTarget
Syntax (vb)
Public Class ApiDestination
Inherits DeputyBase
Implements IRuleTarget
Remarks
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(IApiDestination, IApiDestinationProps) | |
ApiDestination(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ApiDestination(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(IRule, String) | Returns a RuleTarget that can be used to trigger API destinations from an EventBridge event. |
Constructors
ApiDestination(IApiDestination, IApiDestinationProps)
public ApiDestination(IApiDestination apiDestination, IApiDestinationProps props = null)
Parameters
- apiDestination IApiDestination
- props IApiDestinationProps
ApiDestination(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ApiDestination(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ApiDestination(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ApiDestination(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(IRule, String)
Returns a RuleTarget that can be used to trigger API destinations from an EventBridge event.
public virtual IRuleTargetConfig Bind(IRule rule, string id = null)
Parameters
- rule IRule
- id System.String
Returns