@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-06-22T23:27:53.582Z") public class CfnApiDestination extends CfnResource implements IInspectable
Creates an API destination, which is an HTTP invocation endpoint configured as a target for events.
When using ApiDesinations with OAuth authentication we recommend these best practices:
AWS::Events::Connection
using CloudFormation dynamic reference syntax. For more information, see Secrets Manager secrets .When the Connection resource is created the secret will be passed to EventBridge and stored in the customer account using “Service Linked Secrets,” effectively creating two secrets. This will minimize the cost because the original secret is only accessed when a CloudFormation template is created or updated, not every time an event is sent to the ApiDestination. The secret stored in the customer account by EventBridge is the one used for each event sent to the ApiDestination and AWS is responsible for the fees.
The secret stored in the customer account by EventBridge can’t be updated directly, only when a CloudFormation template is updated.
For examples of CloudFormation templates that use secrets, see Examples .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.events.*; CfnApiDestination cfnApiDestination = CfnApiDestination.Builder.create(this, "MyCfnApiDestination") .connectionArn("connectionArn") .httpMethod("httpMethod") .invocationEndpoint("invocationEndpoint") // the properties below are optional .description("description") .invocationRateLimitPerSecond(123) .name("name") .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnApiDestination.Builder
A fluent builder for
CfnApiDestination . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnApiDestination(Construct scope,
java.lang.String id,
CfnApiDestinationProps props)
Create a new `AWS::Events::ApiDestination`.
|
protected |
CfnApiDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnApiDestination(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The ARN of the API destination that was created by the request.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getConnectionArn()
The ARN of the connection to use for the API destination.
|
java.lang.String |
getDescription()
A description for the API destination to create.
|
java.lang.String |
getHttpMethod()
The method to use for the request to the HTTP invocation endpoint.
|
java.lang.String |
getInvocationEndpoint()
The URL to the HTTP invocation endpoint for the API destination.
|
java.lang.Number |
getInvocationRateLimitPerSecond()
The maximum number of requests per second to send to the HTTP invocation endpoint.
|
java.lang.String |
getName()
The name for the API destination to create.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setConnectionArn(java.lang.String value)
The ARN of the connection to use for the API destination.
|
void |
setDescription(java.lang.String value)
A description for the API destination to create.
|
void |
setHttpMethod(java.lang.String value)
The method to use for the request to the HTTP invocation endpoint.
|
void |
setInvocationEndpoint(java.lang.String value)
The URL to the HTTP invocation endpoint for the API destination.
|
void |
setInvocationRateLimitPerSecond(java.lang.Number value)
The maximum number of requests per second to send to the HTTP invocation endpoint.
|
void |
setName(java.lang.String value)
The name for the API destination to create.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnApiDestination(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnApiDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnApiDestination(Construct scope, java.lang.String id, CfnApiDestinationProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getConnectionArn()
The destination endpoint must support the authorization type specified for the connection.
public void setConnectionArn(java.lang.String value)
The destination endpoint must support the authorization type specified for the connection.
public java.lang.String getHttpMethod()
public void setHttpMethod(java.lang.String value)
public java.lang.String getInvocationEndpoint()
public void setInvocationEndpoint(java.lang.String value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.Number getInvocationRateLimitPerSecond()
public void setInvocationRateLimitPerSecond(java.lang.Number value)
public java.lang.String getName()
public void setName(java.lang.String value)