UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

118 lines (117 loc) 3.66 kB
import { Construct } from 'constructs'; import { HttpMethod, IConnection } from './connection'; import { IResource, Resource } from '../../core'; /** * The event API Destination properties */ export interface ApiDestinationProps { /** * The name for the API destination. * @default - A unique name will be generated */ readonly apiDestinationName?: string; /** * A description for the API destination. * * @default - none */ readonly description?: string; /** * The ARN of the connection to use for the API destination */ readonly connection: IConnection; /** * The URL to the HTTP invocation endpoint for the API destination.. */ readonly endpoint: string; /** * The method to use for the request to the HTTP invocation endpoint. * * @default HttpMethod.POST */ readonly httpMethod?: HttpMethod; /** * The maximum number of requests per second to send to the HTTP invocation endpoint. * * @default - Not rate limited */ readonly rateLimitPerSecond?: number; } /** * Interface for API Destinations */ export interface IApiDestination extends IResource { /** * The Name of the Api Destination created. * @attribute */ readonly apiDestinationName: string; /** * The ARN of the Api Destination created. * @attribute */ readonly apiDestinationArn: string; /** * The Amazon Resource Name (ARN) of an API destination in resource format, * so it can be used in the Resource element of IAM permission policy statements. * @see https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazoneventbridge.html#amazoneventbridge-resources-for-iam-policies * @attribute */ readonly apiDestinationArnForPolicy?: string; } /** * The properties to import an existing Api Destination */ export interface ApiDestinationAttributes { /** * The ARN of the Api Destination */ readonly apiDestinationArn: string; /** * The Connection to associate with the Api Destination */ readonly connection: IConnection; /** * The Amazon Resource Name (ARN) of an API destination in resource format. * * @default undefined - Imported API destination does not have ARN in resource format */ readonly apiDestinationArnForPolicy?: string; } /** * Define an EventBridge Api Destination * * @resource AWS::Events::ApiDestination */ export declare class ApiDestination extends Resource implements IApiDestination { /** Uniquely identifies this class. */ static readonly PROPERTY_INJECTION_ID: string; /** * Create an Api Destination construct from an existing Api Destination ARN. * * @param scope The scope creating construct (usually `this`). * @param id The construct's id. * @param attrs The Api Destination import attributes. */ static fromApiDestinationAttributes(scope: Construct, id: string, attrs: ApiDestinationAttributes): ApiDestination; /** * The Connection to associate with Api Destination */ readonly connection: IConnection; /** * The Name of the Api Destination created. * @attribute */ readonly apiDestinationName: string; /** * The ARN of the Api Destination created. * @attribute */ readonly apiDestinationArn: string; /** * The Amazon Resource Name (ARN) of an API destination in resource format. * @attribute */ readonly apiDestinationArnForPolicy?: string; constructor(scope: Construct, id: string, props: ApiDestinationProps); }