UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

101 lines 4.39 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.EventApiDestination = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an EventBridge event API Destination resource. * * > **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.cloudwatch.EventApiDestination("test", { * name: "api-destination", * description: "An API Destination", * invocationEndpoint: "https://api.destination.com/endpoint", * httpMethod: "POST", * invocationRateLimitPerSecond: 20, * connectionArn: testAwsCloudwatchEventConnection.arn, * }); * ``` * * ## Import * * Using `pulumi import`, import EventBridge API Destinations using the `name`. For example: * * ```sh * $ pulumi import aws:cloudwatch/eventApiDestination:EventApiDestination test api-destination * ``` */ class EventApiDestination extends pulumi.CustomResource { /** * Get an existing EventApiDestination resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new EventApiDestination(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of EventApiDestination. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === EventApiDestination.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["connectionArn"] = state?.connectionArn; resourceInputs["description"] = state?.description; resourceInputs["httpMethod"] = state?.httpMethod; resourceInputs["invocationEndpoint"] = state?.invocationEndpoint; resourceInputs["invocationRateLimitPerSecond"] = state?.invocationRateLimitPerSecond; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.connectionArn === undefined && !opts.urn) { throw new Error("Missing required property 'connectionArn'"); } if (args?.httpMethod === undefined && !opts.urn) { throw new Error("Missing required property 'httpMethod'"); } if (args?.invocationEndpoint === undefined && !opts.urn) { throw new Error("Missing required property 'invocationEndpoint'"); } resourceInputs["connectionArn"] = args?.connectionArn; resourceInputs["description"] = args?.description; resourceInputs["httpMethod"] = args?.httpMethod; resourceInputs["invocationEndpoint"] = args?.invocationEndpoint; resourceInputs["invocationRateLimitPerSecond"] = args?.invocationRateLimitPerSecond; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["arn"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EventApiDestination.__pulumiType, name, resourceInputs, opts); } } exports.EventApiDestination = EventApiDestination; /** @internal */ EventApiDestination.__pulumiType = 'aws:cloudwatch/eventApiDestination:EventApiDestination'; //# sourceMappingURL=eventApiDestination.js.map