EventEndpoint class

Provides a resource to create an EventBridge Global Endpoint.

> Note: EventBridge was formerly known as CloudWatch Events. The functionality is identical.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const _this = new aws.cloudwatch.EventEndpoint("this", {
    replicationConfig: {
        state: "DISABLED",
    },
    routingConfig: {
        failoverConfig: {
            primary: {
                healthCheck: primaryAwsRoute53HealthCheck.arn,
            },
            secondary: {
                route: "us-east-2",
            },
        },
    },
    eventBuses: [
        {
            eventBusArn: primary.arn,
        },
        {
            eventBusArn: secondary.arn,
        },
    ],
    name: "global-endpoint",
    roleArn: replication.arn,
});
import pulumi
import pulumi_aws as aws

this = aws.cloudwatch.EventEndpoint("this",
    replication_config={
        "state": "DISABLED",
    },
    routing_config={
        "failover_config": {
            "primary": {
                "health_check": primary_aws_route53_health_check["arn"],
            },
            "secondary": {
                "route": "us-east-2",
            },
        },
    },
    event_buses=[
        {
            "event_bus_arn": primary["arn"],
        },
        {
            "event_bus_arn": secondary["arn"],
        },
    ],
    name="global-endpoint",
    role_arn=replication["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var @this = new Aws.CloudWatch.EventEndpoint("this", new()
    {
        ReplicationConfig = new Aws.CloudWatch.Inputs.EventEndpointReplicationConfigArgs
        {
            State = "DISABLED",
        },
        RoutingConfig = new Aws.CloudWatch.Inputs.EventEndpointRoutingConfigArgs
        {
            FailoverConfig = new Aws.CloudWatch.Inputs.EventEndpointRoutingConfigFailoverConfigArgs
            {
                Primary = new Aws.CloudWatch.Inputs.EventEndpointRoutingConfigFailoverConfigPrimaryArgs
                {
                    HealthCheck = primaryAwsRoute53HealthCheck.Arn,
                },
                Secondary = new Aws.CloudWatch.Inputs.EventEndpointRoutingConfigFailoverConfigSecondaryArgs
                {
                    Route = "us-east-2",
                },
            },
        },
        EventBuses = new[]
        {
            new Aws.CloudWatch.Inputs.EventEndpointEventBusArgs
            {
                EventBusArn = primary.Arn,
            },
            new Aws.CloudWatch.Inputs.EventEndpointEventBusArgs
            {
                EventBusArn = secondary.Arn,
            },
        },
        Name = "global-endpoint",
        RoleArn = replication.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cloudwatch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudwatch.NewEventEndpoint(ctx, "this", &cloudwatch.EventEndpointArgs{
			ReplicationConfig: &cloudwatch.EventEndpointReplicationConfigArgs{
				State: pulumi.String("DISABLED"),
			},
			RoutingConfig: &cloudwatch.EventEndpointRoutingConfigArgs{
				FailoverConfig: &cloudwatch.EventEndpointRoutingConfigFailoverConfigArgs{
					Primary: &cloudwatch.EventEndpointRoutingConfigFailoverConfigPrimaryArgs{
						HealthCheck: pulumi.Any(primaryAwsRoute53HealthCheck.Arn),
					},
					Secondary: &cloudwatch.EventEndpointRoutingConfigFailoverConfigSecondaryArgs{
						Route: pulumi.String("us-east-2"),
					},
				},
			},
			EventBuses: cloudwatch.EventEndpointEventBusArray{
				&cloudwatch.EventEndpointEventBusArgs{
					EventBusArn: pulumi.Any(primary.Arn),
				},
				&cloudwatch.EventEndpointEventBusArgs{
					EventBusArn: pulumi.Any(secondary.Arn),
				},
			},
			Name:    pulumi.String("global-endpoint"),
			RoleArn: pulumi.Any(replication.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_cloudwatch_eventendpoint" "this" {
  replication_config = {
    state = "DISABLED"
  }
  routing_config = {
    failover_config = {
      primary = {
        health_check = primaryAwsRoute53HealthCheck.arn
      }
      secondary = {
        route = "us-east-2"
      }
    }
  }
  event_buses {
    event_bus_arn = primary.arn
  }
  event_buses {
    event_bus_arn = secondary.arn
  }
  name     = "global-endpoint"
  role_arn = replication.arn
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.EventEndpoint;
import com.pulumi.aws.cloudwatch.EventEndpointArgs;
import com.pulumi.aws.cloudwatch.inputs.EventEndpointReplicationConfigArgs;
import com.pulumi.aws.cloudwatch.inputs.EventEndpointRoutingConfigArgs;
import com.pulumi.aws.cloudwatch.inputs.EventEndpointRoutingConfigFailoverConfigArgs;
import com.pulumi.aws.cloudwatch.inputs.EventEndpointRoutingConfigFailoverConfigPrimaryArgs;
import com.pulumi.aws.cloudwatch.inputs.EventEndpointRoutingConfigFailoverConfigSecondaryArgs;
import com.pulumi.aws.cloudwatch.inputs.EventEndpointEventBusArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var this_ = new EventEndpoint("this", EventEndpointArgs.builder()
            .replicationConfig(EventEndpointReplicationConfigArgs.builder()
                .state("DISABLED")
                .build())
            .routingConfig(EventEndpointRoutingConfigArgs.builder()
                .failoverConfig(EventEndpointRoutingConfigFailoverConfigArgs.builder()
                    .primary(EventEndpointRoutingConfigFailoverConfigPrimaryArgs.builder()
                        .healthCheck(primaryAwsRoute53HealthCheck.arn())
                        .build())
                    .secondary(EventEndpointRoutingConfigFailoverConfigSecondaryArgs.builder()
                        .route("us-east-2")
                        .build())
                    .build())
                .build())
            .eventBuses(
                EventEndpointEventBusArgs.builder()
                    .eventBusArn(primary.arn())
                    .build(),
                EventEndpointEventBusArgs.builder()
                    .eventBusArn(secondary.arn())
                    .build())
            .name("global-endpoint")
            .roleArn(replication.arn())
            .build());

    }
}
resources:
  this:
    type: aws:cloudwatch:EventEndpoint
    properties:
      replicationConfig:
        state: DISABLED
      routingConfig:
        failoverConfig:
          primary:
            healthCheck: ${primaryAwsRoute53HealthCheck.arn}
          secondary:
            route: us-east-2
      eventBuses:
        - eventBusArn: ${primary.arn}
        - eventBusArn: ${secondary.arn}
      name: global-endpoint
      roleArn: ${replication.arn}

Import

Identity Schema

Required

  • name (String) Name of the global endpoint.

Optional

  • accountId (String) AWS Account where this resource is managed.
  • region (String) Region where this resource is managed.

Using pulumi import, import Global Endpoints using name. For example:

$ pulumi import aws:cloudwatch/eventEndpoint:EventEndpoint example example-endpoint

Constructors

EventEndpoint(String name, {EventEndpointArgs? args, CustomResourceOptions? options})
Creates a new EventEndpoint. name The Pulumi resource name. args Arguments used to configure this EventEndpoint. The set of arguments for EventEndpoint. options Resource options controlling this resource's behavior.
EventEndpoint.reference(String urn)
Creates a typed reference to an existing EventEndpoint resource.

Properties

arn ↔ Output<String>
The ARN of the endpoint that was created.
latefinal
childResources Set<Resource>
finalinherited
completionSources Map<String, IOutputCompletionSource>
latefinalinherited
description ↔ Output<String?>
A description of the global endpoint.
latefinal
endpointUrl ↔ Output<String>
The URL of the endpoint that was created.
latefinal
eventBuses ↔ Output<List<EventEndpointEventBus>>
The event buses to use. The names of the event buses must be identical in each Region. Exactly two event buses are required. Documented below.
latefinal
hashCode int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference bool
Whether this instance represents a resource value returned over RPC.
finalinherited
name ↔ Output<String>
The name of the global endpoint.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
replicationConfig ↔ Output<EventEndpointReplicationConfig?>
Parameters used for replication. Documented below.
latefinal
resourceTransforms List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
roleArn ↔ Output<String?>
The ARN of the IAM role used for replication between event buses.
latefinal
routingConfig ↔ Output<EventEndpointRoutingConfig>
Parameters used for routing, including the health check and secondary Region. Documented below.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transformations List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() String
Returns this resource's logical name.
inherited
getResourceType() String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {EventEndpointState? state, CustomResourceOptions? options}) EventEndpoint
Gets an existing EventEndpoint resource's state with the given name and id.