@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
117 lines • 4.49 kB
JavaScript
// *** 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.EventEndpoint = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to create an EventBridge Global Endpoint.
*
* > **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 _this = new aws.cloudwatch.EventEndpoint("this", {
* name: "global-endpoint",
* roleArn: replication.arn,
* eventBuses: [
* {
* eventBusArn: primary.arn,
* },
* {
* eventBusArn: secondary.arn,
* },
* ],
* replicationConfig: {
* state: "DISABLED",
* },
* routingConfig: {
* failoverConfig: {
* primary: {
* healthCheck: primaryAwsRoute53HealthCheck.arn,
* },
* secondary: {
* route: "us-east-2",
* },
* },
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import EventBridge Global Endpoints using the `name`. For example:
*
* ```sh
* $ pulumi import aws:cloudwatch/eventEndpoint:EventEndpoint imported_endpoint example-endpoint
* ```
*/
class EventEndpoint extends pulumi.CustomResource {
/**
* Get an existing EventEndpoint 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 EventEndpoint(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of EventEndpoint. 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'] === EventEndpoint.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["description"] = state?.description;
resourceInputs["endpointUrl"] = state?.endpointUrl;
resourceInputs["eventBuses"] = state?.eventBuses;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["replicationConfig"] = state?.replicationConfig;
resourceInputs["roleArn"] = state?.roleArn;
resourceInputs["routingConfig"] = state?.routingConfig;
}
else {
const args = argsOrState;
if (args?.eventBuses === undefined && !opts.urn) {
throw new Error("Missing required property 'eventBuses'");
}
if (args?.routingConfig === undefined && !opts.urn) {
throw new Error("Missing required property 'routingConfig'");
}
resourceInputs["description"] = args?.description;
resourceInputs["eventBuses"] = args?.eventBuses;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["replicationConfig"] = args?.replicationConfig;
resourceInputs["roleArn"] = args?.roleArn;
resourceInputs["routingConfig"] = args?.routingConfig;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["endpointUrl"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(EventEndpoint.__pulumiType, name, resourceInputs, opts);
}
}
exports.EventEndpoint = EventEndpoint;
/** @internal */
EventEndpoint.__pulumiType = 'aws:cloudwatch/eventEndpoint:EventEndpoint';
//# sourceMappingURL=eventEndpoint.js.map
;