1 | ;
|
2 | var _a;
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | exports.ApiDestination = void 0;
|
5 | const jsiiDeprecationWarnings = require("../.warnings.jsii.js");
|
6 | const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
7 | const core_1 = require("@aws-cdk/core");
|
8 | const connection_1 = require("./connection");
|
9 | const events_generated_1 = require("./events.generated");
|
10 | /**
|
11 | * Define an EventBridge Api Destination
|
12 | *
|
13 | * @resource AWS::Events::ApiDestination
|
14 | */
|
15 | class ApiDestination extends core_1.Resource {
|
16 | constructor(scope, id, props) {
|
17 | super(scope, id, {
|
18 | physicalName: props.apiDestinationName,
|
19 | });
|
20 | try {
|
21 | jsiiDeprecationWarnings._aws_cdk_aws_events_ApiDestinationProps(props);
|
22 | }
|
23 | catch (error) {
|
24 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
25 | Error.captureStackTrace(error, ApiDestination);
|
26 | }
|
27 | throw error;
|
28 | }
|
29 | this.connection = props.connection;
|
30 | let apiDestination = new events_generated_1.CfnApiDestination(this, 'ApiDestination', {
|
31 | connectionArn: this.connection.connectionArn,
|
32 | description: props.description,
|
33 | httpMethod: props.httpMethod ?? connection_1.HttpMethod.POST,
|
34 | invocationEndpoint: props.endpoint,
|
35 | invocationRateLimitPerSecond: props.rateLimitPerSecond,
|
36 | name: this.physicalName,
|
37 | });
|
38 | this.apiDestinationName = this.getResourceNameAttribute(apiDestination.ref);
|
39 | this.apiDestinationArn = apiDestination.attrArn;
|
40 | }
|
41 | }
|
42 | exports.ApiDestination = ApiDestination;
|
43 | _a = JSII_RTTI_SYMBOL_1;
|
44 | ApiDestination[_a] = { fqn: "@aws-cdk/aws-events.ApiDestination", version: "1.204.0" };
|
45 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLWRlc3RpbmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXBp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