CreateEndpoint - Amazon EventBridge

CreateEndpoint

Creates a global endpoint. Global endpoints improve your application's availability by making it regional-fault tolerant. To do this, you define a primary and secondary Region with event buses in each Region. You also create a Amazon RouteĀ 53 health check that will tell EventBridge to route events to the secondary Region when an "unhealthy" state is encountered and events will be routed back to the primary Region when the health check reports a "healthy" state.

Request Syntax

{ "Description": "string", "EventBuses": [ { "EventBusArn": "string" } ], "Name": "string", "ReplicationConfig": { "State": "string" }, "RoleArn": "string", "RoutingConfig": { "FailoverConfig": { "Primary": { "HealthCheck": "string" }, "Secondary": { "Route": "string" } } } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Description

A description of the global endpoint.

Type: String

Length Constraints: Maximum length of 512.

Pattern: .*

Required: No

EventBuses

Define the event buses used.

Important

The names of the event buses must be identical in each Region.

Type: Array of EndpointEventBus objects

Array Members: Fixed number of 2 items.

Required: Yes

Name

The name of the global endpoint. For example, "Name":"us-east-2-custom_bus_A-endpoint".

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\.\-_A-Za-z0-9]+

Required: Yes

ReplicationConfig

Enable or disable event replication. The default state is ENABLED which means you must supply a RoleArn. If you don't have a RoleArn or you don't want event replication enabled, set the state to DISABLED.

Type: ReplicationConfig object

Required: No

RoleArn

The ARN of the role used for replication.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^arn:aws[a-z-]*:iam::\d{12}:role\/[\w+=,.@/-]+$

Required: No

RoutingConfig

Configure the routing policy, including the health check and secondary Region..

Type: RoutingConfig object

Required: Yes

Response Syntax

{ "Arn": "string", "EventBuses": [ { "EventBusArn": "string" } ], "Name": "string", "ReplicationConfig": { "State": "string" }, "RoleArn": "string", "RoutingConfig": { "FailoverConfig": { "Primary": { "HealthCheck": "string" }, "Secondary": { "Route": "string" } } }, "State": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Arn

The ARN of the endpoint that was created by this request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: ^arn:aws([a-z]|\-)*:events:([a-z]|\d|\-)*:([0-9]{12})?:endpoint\/[/\.\-_A-Za-z0-9]+$

EventBuses

The event buses used by this request.

Type: Array of EndpointEventBus objects

Array Members: Fixed number of 2 items.

Name

The name of the endpoint that was created by this request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\.\-_A-Za-z0-9]+

ReplicationConfig

Whether event replication was enabled or disabled by this request.

Type: ReplicationConfig object

RoleArn

The ARN of the role used by event replication for this request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^arn:aws[a-z-]*:iam::\d{12}:role\/[\w+=,.@/-]+$

RoutingConfig

The routing configuration defined by this request.

Type: RoutingConfig object

State

The state of the endpoint that was created by this request.

Type: String

Valid Values: ACTIVE | CREATING | UPDATING | DELETING | CREATE_FAILED | UPDATE_FAILED | DELETE_FAILED

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalException

This exception occurs due to unexpected causes.

HTTP Status Code: 500

LimitExceededException

The request failed because it attempted to create resource beyond the allowed service quota.

HTTP Status Code: 400

ResourceAlreadyExistsException

The resource you are trying to create already exists.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: