We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.EventBridge

Inherits:
AWS.Service show all
Identifier:
eventbridge
API Version:
2015-10-07
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Amazon EventBridge helps you to respond to state changes in your Amazon Web Services resources. When your resources change state, they automatically send events to an event stream. You can create rules that match selected events in the stream and route them to targets to take action. You can also use rules to take action on a predetermined schedule. For example, you can configure rules to:

  • Automatically invoke an Lambda function to update DNS entries when an event notifies you that Amazon EC2 instance enters the running state.

  • Direct specific API records from CloudTrail to an Amazon Kinesis data stream for detailed analysis of potential security or availability risks.

  • Periodically invoke a built-in target to create a snapshot of an Amazon EBS volume.

For more information about the features of Amazon EventBridge, see the Amazon EventBridge User Guide.

Sending a Request Using EventBridge

var eventbridge = new AWS.EventBridge();
eventbridge.listRuleNamesByTarget(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the EventBridge object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var eventbridge = new AWS.EventBridge({apiVersion: '2015-10-07'});

You can also set the API version globally in AWS.config.apiVersions using the eventbridge service identifier:

AWS.config.apiVersions = {
  eventbridge: '2015-10-07',
  // other service API versions
};

var eventbridge = new AWS.EventBridge();

Version:

  • 2015-10-07

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, defineService

Constructor Details

new AWS.EventBridge(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a EventBridge object

var eventbridge = new AWS.EventBridge({apiVersion: '2015-10-07'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.EventBridge.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.EventBridge.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.EventBridge.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

activateEventSource(params = {}, callback) ⇒ AWS.Request

Activates a partner event source that has been deactivated. Once activated, your matching event bus will start receiving events from the event source.

Service Reference:

Examples:

Calling the activateEventSource operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
eventbridge.activateEventSource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the partner event source to activate.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelReplay(params = {}, callback) ⇒ AWS.Request

Cancels the specified replay.

Service Reference:

Examples:

Calling the cancelReplay operation

var params = {
  ReplayName: 'STRING_VALUE' /* required */
};
eventbridge.cancelReplay(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ReplayName — (String)

      The name of the replay to cancel.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ReplayArn — (String)

        The ARN of the replay to cancel.

      • State — (String)

        The current state of the replay.

        Possible values include:
        • "STARTING"
        • "RUNNING"
        • "CANCELLING"
        • "COMPLETED"
        • "CANCELLED"
        • "FAILED"
      • StateReason — (String)

        The reason that the replay is in the current state.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createApiDestination(params = {}, callback) ⇒ AWS.Request

Creates an API destination, which is an HTTP invocation endpoint configured as a target for events.

API destinations do not support private destinations, such as interface VPC endpoints.

For more information, see API destinations in the EventBridge User Guide.

Service Reference:

Examples:

Calling the createApiDestination operation

var params = {
  ConnectionArn: 'STRING_VALUE', /* required */
  HttpMethod: POST | GET | HEAD | OPTIONS | PUT | PATCH | DELETE, /* required */
  InvocationEndpoint: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  InvocationRateLimitPerSecond: 'NUMBER_VALUE'
};
eventbridge.createApiDestination(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name for the API destination to create.

    • Description — (String)

      A description for the API destination to create.

    • ConnectionArn — (String)

      The ARN of the connection to use for the API destination. The destination endpoint must support the authorization type specified for the connection.

    • InvocationEndpoint — (String)

      The URL to the HTTP invocation endpoint for the API destination.

    • HttpMethod — (String)

      The method to use for the request to the HTTP invocation endpoint.

      Possible values include:
      • "POST"
      • "GET"
      • "HEAD"
      • "OPTIONS"
      • "PUT"
      • "PATCH"
      • "DELETE"
    • InvocationRateLimitPerSecond — (Integer)

      The maximum number of requests per second to send to the HTTP invocation endpoint.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiDestinationArn — (String)

        The ARN of the API destination that was created by the request.

      • ApiDestinationState — (String)

        The state of the API destination that was created by the request.

        Possible values include:
        • "ACTIVE"
        • "INACTIVE"
      • CreationTime — (Date)

        A time stamp indicating the time that the API destination was created.

      • LastModifiedTime — (Date)

        A time stamp indicating the time that the API destination was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createArchive(params = {}, callback) ⇒ AWS.Request

Creates an archive of events with the specified settings. When you create an archive, incoming events might not immediately start being sent to the archive. Allow a short period of time for changes to take effect. If you do not specify a pattern to filter events sent to the archive, all events are sent to the archive except replayed events. Replayed events are not sent to an archive.

Note: Archives and schema discovery are not supported for event buses encrypted using a customer managed key. EventBridge returns an error if:
  • You call CreateArchive on an event bus set to use a customer managed key for encryption.
  • You call CreateDiscoverer on an event bus set to use a customer managed key for encryption.
  • You call UpdatedEventBus to set a customer managed key on an event bus with an archives or schema discovery enabled.
To enable archives or schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see Data encryption in EventBridge in the Amazon EventBridge User Guide.

Service Reference:

Examples:

Calling the createArchive operation

var params = {
  ArchiveName: 'STRING_VALUE', /* required */
  EventSourceArn: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  EventPattern: 'STRING_VALUE',
  RetentionDays: 'NUMBER_VALUE'
};
eventbridge.createArchive(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ArchiveName — (String)

      The name for the archive to create.

    • EventSourceArn — (String)

      The ARN of the event bus that sends events to the archive.

    • Description — (String)

      A description for the archive.

    • EventPattern — (String)

      An event pattern to use to filter events sent to the archive.

    • RetentionDays — (Integer)

      The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ArchiveArn — (String)

        The ARN of the archive that was created.

      • State — (String)

        The state of the archive that was created.

        Possible values include:
        • "ENABLED"
        • "DISABLED"
        • "CREATING"
        • "UPDATING"
        • "CREATE_FAILED"
        • "UPDATE_FAILED"
      • StateReason — (String)

        The reason that the archive is in the state.

      • CreationTime — (Date)

        The time at which the archive was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createConnection(params = {}, callback) ⇒ AWS.Request

Creates a connection. A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.

Service Reference:

Examples:

Calling the createConnection operation

var params = {
  AuthParameters: { /* required */
    ApiKeyAuthParameters: {
      ApiKeyName: 'STRING_VALUE', /* required */
      ApiKeyValue: 'STRING_VALUE' /* required */
    },
    BasicAuthParameters: {
      Password: 'STRING_VALUE', /* required */
      Username: 'STRING_VALUE' /* required */
    },
    InvocationHttpParameters: {
      BodyParameters: [
        {
          IsValueSecret: true || false,
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ],
      HeaderParameters: [
        {
          IsValueSecret: true || false,
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ],
      QueryStringParameters: [
        {
          IsValueSecret: true || false,
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    OAuthParameters: {
      AuthorizationEndpoint: 'STRING_VALUE', /* required */
      ClientParameters: { /* required */
        ClientID: 'STRING_VALUE', /* required */
        ClientSecret: 'STRING_VALUE' /* required */
      },
      HttpMethod: GET | POST | PUT, /* required */
      OAuthHttpParameters: {
        BodyParameters: [
          {
            IsValueSecret: true || false,
            Key: 'STRING_VALUE',
            Value: 'STRING_VALUE'
          },
          /* more items */
        ],
        HeaderParameters: [
          {
            IsValueSecret: true || false,
            Key: 'STRING_VALUE',
            Value: 'STRING_VALUE'
          },
          /* more items */
        ],
        QueryStringParameters: [
          {
            IsValueSecret: true || false,
            Key: 'STRING_VALUE',
            Value: 'STRING_VALUE'
          },
          /* more items */
        ]
      }
    }
  },
  AuthorizationType: BASIC | OAUTH_CLIENT_CREDENTIALS | API_KEY, /* required */
  Name: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE'
};
eventbridge.createConnection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name for the connection to create.

    • Description — (String)

      A description for the connection to create.

    • AuthorizationType — (String)

      The type of authorization to use for the connection.

      Note: OAUTH tokens are refreshed when a 401 or 407 response is returned.
      Possible values include:
      • "BASIC"
      • "OAUTH_CLIENT_CREDENTIALS"
      • "API_KEY"
    • AuthParameters — (map)

      A CreateConnectionAuthRequestParameters object that contains the authorization parameters to use to authorize with the endpoint.

      • BasicAuthParameters — (map)

        A CreateConnectionBasicAuthRequestParameters object that contains the Basic authorization parameters to use for the connection.

        • Usernamerequired — (String)

          The user name to use for Basic authorization.

        • Passwordrequired — (String)

          The password associated with the user name to use for Basic authorization.

      • OAuthParameters — (map)

        A CreateConnectionOAuthRequestParameters object that contains the OAuth authorization parameters to use for the connection.

        • ClientParametersrequired — (map)

          A CreateConnectionOAuthClientRequestParameters object that contains the client parameters for OAuth authorization.

          • ClientIDrequired — (String)

            The client ID to use for OAuth authorization for the connection.

          • ClientSecretrequired — (String)

            The client secret associated with the client ID to use for OAuth authorization for the connection.

        • AuthorizationEndpointrequired — (String)

          The URL to the authorization endpoint when OAuth is specified as the authorization type.

        • HttpMethodrequired — (String)

          The method to use for the authorization request.

          Possible values include:
          • "GET"
          • "POST"
          • "PUT"
        • OAuthHttpParameters — (map)

          A ConnectionHttpParameters object that contains details about the additional parameters to use for the connection.

          • HeaderParameters — (Array<map>)

            Contains additional header parameters for the connection.

            • Key — (String)

              The key for the parameter.

            • Value — (String)

              The value associated with the key.

            • IsValueSecret — (Boolean)

              Specified whether the value is a secret.

          • QueryStringParameters — (Array<map>)

            Contains additional query string parameters for the connection.

            • Key — (String)

              The key for a query string parameter.

            • Value — (String)

              The value associated with the key for the query string parameter.

            • IsValueSecret — (Boolean)

              Specifies whether the value is secret.

          • BodyParameters — (Array<map>)

            Contains additional body string parameters for the connection.

            • Key — (String)

              The key for the parameter.

            • Value — (String)

              The value associated with the key.

            • IsValueSecret — (Boolean)

              Specified whether the value is secret.

      • ApiKeyAuthParameters — (map)

        A CreateConnectionApiKeyAuthRequestParameters object that contains the API key authorization parameters to use for the connection.

        • ApiKeyNamerequired — (String)

          The name of the API key to use for authorization.

        • ApiKeyValuerequired — (String)

          The value for the API key to use for authorization.

      • InvocationHttpParameters — (map)

        A ConnectionHttpParameters object that contains the API key authorization parameters to use for the connection. Note that if you include additional parameters for the target of a rule via HttpParameters, including query strings, the parameters added for the connection take precedence.

        • HeaderParameters — (Array<map>)

          Contains additional header parameters for the connection.

          • Key — (String)

            The key for the parameter.

          • Value — (String)

            The value associated with the key.

          • IsValueSecret — (Boolean)

            Specified whether the value is a secret.

        • QueryStringParameters — (Array<map>)

          Contains additional query string parameters for the connection.

          • Key — (String)

            The key for a query string parameter.

          • Value — (String)

            The value associated with the key for the query string parameter.

          • IsValueSecret — (Boolean)

            Specifies whether the value is secret.

        • BodyParameters — (Array<map>)

          Contains additional body string parameters for the connection.

          • Key — (String)

            The key for the parameter.

          • Value — (String)

            The value associated with the key.

          • IsValueSecret — (Boolean)

            Specified whether the value is secret.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ConnectionArn — (String)

        The ARN of the connection that was created by the request.

      • ConnectionState — (String)

        The state of the connection that was created by the request.

        Possible values include:
        • "CREATING"
        • "UPDATING"
        • "DELETING"
        • "AUTHORIZED"
        • "DEAUTHORIZED"
        • "AUTHORIZING"
        • "DEAUTHORIZING"
      • CreationTime — (Date)

        A time stamp for the time that the connection was created.

      • LastModifiedTime — (Date)

        A time stamp for the time that the connection was last updated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createEndpoint(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createEndpoint operation

var params = {
  EventBuses: [ /* required */
    {
      EventBusArn: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  Name: 'STRING_VALUE', /* required */
  RoutingConfig: { /* required */
    FailoverConfig: { /* required */
      Primary: { /* required */
        HealthCheck: 'STRING_VALUE' /* required */
      },
      Secondary: { /* required */
        Route: 'STRING_VALUE' /* required */
      }
    }
  },
  Description: 'STRING_VALUE',
  ReplicationConfig: {
    State: ENABLED | DISABLED
  },
  RoleArn: 'STRING_VALUE'
};
eventbridge.createEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

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

    • Description — (String)

      A description of the global endpoint.

    • RoutingConfig — (map)

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

      • FailoverConfigrequired — (map)

        The failover configuration for an endpoint. This includes what triggers failover and what happens when it's triggered.

        • Primaryrequired — (map)

          The main Region of the endpoint.

          • HealthCheckrequired — (String)

            The ARN of the health check used by the endpoint to determine whether failover is triggered.

        • Secondaryrequired — (map)

          The Region that events are routed to when failover is triggered or event replication is enabled.

          • Routerequired — (String)

            Defines the secondary Region.

    • ReplicationConfig — (map)

      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.

      • State — (String)

        The state of event replication.

        Possible values include:
        • "ENABLED"
        • "DISABLED"
    • EventBuses — (Array<map>)

      Define the event buses used.

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

      • EventBusArnrequired — (String)

        The ARN of the event bus the endpoint is associated with.

    • RoleArn — (String)

      The ARN of the role used for replication.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Name — (String)

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

      • Arn — (String)

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

      • RoutingConfig — (map)

        The routing configuration defined by this request.

        • FailoverConfigrequired — (map)

          The failover configuration for an endpoint. This includes what triggers failover and what happens when it's triggered.

          • Primaryrequired — (map)

            The main Region of the endpoint.

            • HealthCheckrequired — (String)

              The ARN of the health check used by the endpoint to determine whether failover is triggered.

          • Secondaryrequired — (map)

            The Region that events are routed to when failover is triggered or event replication is enabled.

            • Routerequired — (String)

              Defines the secondary Region.

      • ReplicationConfig — (map)

        Whether event replication was enabled or disabled by this request.

        • State — (String)

          The state of event replication.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
      • EventBuses — (Array<map>)

        The event buses used by this request.

        • EventBusArnrequired — (String)

          The ARN of the event bus the endpoint is associated with.

      • RoleArn — (String)

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

      • State — (String)

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

        Possible values include:
        • "ACTIVE"
        • "CREATING"
        • "UPDATING"
        • "DELETING"
        • "CREATE_FAILED"
        • "UPDATE_FAILED"
        • "DELETE_FAILED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createEventBus(params = {}, callback) ⇒ AWS.Request

Creates a new event bus within your account. This can be a custom event bus which you can use to receive events from your custom applications and services, or it can be a partner event bus which can be matched to a partner event source.

Service Reference:

Examples:

Calling the createEventBus operation

var params = {
  Name: 'STRING_VALUE', /* required */
  DeadLetterConfig: {
    Arn: 'STRING_VALUE'
  },
  Description: 'STRING_VALUE',
  EventSourceName: 'STRING_VALUE',
  KmsKeyIdentifier: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
eventbridge.createEventBus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the new event bus.

      Custom event bus names can't contain the / character, but you can use the / character in partner event bus names. In addition, for partner event buses, the name must exactly match the name of the partner event source that this event bus is matched to.

      You can't use the name default for a custom event bus, as this name is already used for your account's default event bus.

    • EventSourceName — (String)

      If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.

    • Description — (String)

      The event bus description.

    • KmsKeyIdentifier — (String)

      The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.

      If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt events on the event bus.

      For more information, see Managing keys in the Key Management Service Developer Guide.

      Note: Archives and schema discovery are not supported for event buses encrypted using a customer managed key. EventBridge returns an error if:
      • You call CreateArchive on an event bus set to use a customer managed key for encryption.
      • You call CreateDiscoverer on an event bus set to use a customer managed key for encryption.
      • You call UpdatedEventBus to set a customer managed key on an event bus with an archives or schema discovery enabled.
      To enable archives or schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see Data encryption in EventBridge in the Amazon EventBridge User Guide.
    • DeadLetterConfig — (map)

      Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).

      For more information, see Event retry policy and using dead-letter queues in the EventBridge User Guide.

      • Arn — (String)

        The ARN of the SQS queue specified as the target for the dead-letter queue.

    • Tags — (Array<map>)

      Tags to associate with the event bus.

      • Keyrequired — (String)

        A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.

      • Valuerequired — (String)

        The value for the specified tag key.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EventBusArn — (String)

        The ARN of the new event bus.

      • Description — (String)

        The event bus description.

      • KmsKeyIdentifier — (String)

        The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.

        For more information, see Data encryption in EventBridge in the Amazon EventBridge User Guide.

      • DeadLetterConfig — (map)

        Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).

        For more information, see Event retry policy and using dead-letter queues in the EventBridge User Guide.

        • Arn — (String)

          The ARN of the SQS queue specified as the target for the dead-letter queue.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createPartnerEventSource(params = {}, callback) ⇒ AWS.Request

Called by an SaaS partner to create a partner event source. This operation is not used by Amazon Web Services customers.

Each partner event source can be used by one Amazon Web Services account to create a matching partner event bus in that Amazon Web Services account. A SaaS partner must create one partner event source for each Amazon Web Services account that wants to receive those event types.

A partner event source creates events based on resources within the SaaS partner's service or application.

An Amazon Web Services account that creates a partner event bus that matches the partner event source can use that event bus to receive events from the partner, and then process them using Amazon Web Services Events rules and targets.

Partner event source names follow this format:

partner_name/event_namespace/event_name

  • partner_name is determined during partner registration, and identifies the partner to Amazon Web Services customers.

  • event_namespace is determined by the partner, and is a way for the partner to categorize their events.

  • event_name is determined by the partner, and should uniquely identify an event-generating resource within the partner system.

    The event_name must be unique across all Amazon Web Services customers. This is because the event source is a shared resource between the partner and customer accounts, and each partner event source unique in the partner account.

The combination of event_namespace and event_name should help Amazon Web Services customers decide whether to create an event bus to receive these events.

Service Reference:

Examples:

Calling the createPartnerEventSource operation

var params = {
  Account: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE' /* required */
};
eventbridge.createPartnerEventSource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the partner event source. This name must be unique and must be in the format partner_name/event_namespace/event_name . The Amazon Web Services account that wants to use this partner event source must create a partner event bus with a name that matches the name of the partner event source.

    • Account — (String)

      The Amazon Web Services account ID that is permitted to create a matching partner event bus for this partner event source.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EventSourceArn — (String)

        The ARN of the partner event source.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deactivateEventSource(params = {}, callback) ⇒ AWS.Request

You can use this operation to temporarily stop receiving events from the specified partner event source. The matching event bus is not deleted.

When you deactivate a partner event source, the source goes into PENDING state. If it remains in PENDING state for more than two weeks, it is deleted.

To activate a deactivated partner event source, use ActivateEventSource.

Service Reference:

Examples:

Calling the deactivateEventSource operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
eventbridge.deactivateEventSource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the partner event source to deactivate.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deauthorizeConnection(params = {}, callback) ⇒ AWS.Request

Removes all authorization parameters from the connection. This lets you remove the secret from the connection so you can reuse it without having to create a new connection.

Service Reference:

Examples:

Calling the deauthorizeConnection operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
eventbridge.deauthorizeConnection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the connection to remove authorization from.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ConnectionArn — (String)

        The ARN of the connection that authorization was removed from.

      • ConnectionState — (String)

        The state of the connection.

        Possible values include:
        • "CREATING"
        • "UPDATING"
        • "DELETING"
        • "AUTHORIZED"
        • "DEAUTHORIZED"
        • "AUTHORIZING"
        • "DEAUTHORIZING"
      • CreationTime — (Date)

        A time stamp for the time that the connection was created.

      • LastModifiedTime — (Date)

        A time stamp for the time that the connection was last updated.

      • LastAuthorizedTime — (Date)

        A time stamp for the time that the connection was last authorized.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteApiDestination(params = {}, callback) ⇒ AWS.Request

Deletes the specified API destination.

Service Reference:

Examples:

Calling the deleteApiDestination operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
eventbridge.deleteApiDestination(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the destination to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteArchive(params = {}, callback) ⇒ AWS.Request

Deletes the specified archive.

Service Reference:

Examples:

Calling the deleteArchive operation

var params = {
  ArchiveName: 'STRING_VALUE' /* required */
};
eventbridge.deleteArchive(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ArchiveName — (String)

      The name of the archive to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteConnection(params = {}, callback) ⇒ AWS.Request

Deletes a connection.

Service Reference:

Examples:

Calling the deleteConnection operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
eventbridge.deleteConnection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the connection to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ConnectionArn — (String)

        The ARN of the connection that was deleted.

      • ConnectionState — (String)

        The state of the connection before it was deleted.

        Possible values include:
        • "CREATING"
        • "UPDATING"
        • "DELETING"
        • "AUTHORIZED"
        • "DEAUTHORIZED"
        • "AUTHORIZING"
        • "DEAUTHORIZING"
      • CreationTime — (Date)

        A time stamp for the time that the connection was created.

      • LastModifiedTime — (Date)

        A time stamp for the time that the connection was last modified before it was deleted.

      • LastAuthorizedTime — (Date)

        A time stamp for the time that the connection was last authorized before it wa deleted.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteEndpoint(params = {}, callback) ⇒ AWS.Request

Delete an existing global endpoint. For more information about global endpoints, see Making applications Regional-fault tolerant with global endpoints and event replication in the Amazon EventBridge User Guide .

Service Reference:

Examples:

Calling the deleteEndpoint operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
eventbridge.deleteEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the endpoint you want to delete. For example, "Name":"us-east-2-custom_bus_A-endpoint"..

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteEventBus(params = {}, callback) ⇒ AWS.Request

Deletes the specified custom event bus or partner event bus. All rules associated with this event bus need to be deleted. You can't delete your account's default event bus.

Service Reference:

Examples:

Calling the deleteEventBus operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
eventbridge.deleteEventBus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the event bus to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deletePartnerEventSource(params = {}, callback) ⇒ AWS.Request

This operation is used by SaaS partners to delete a partner event source. This operation is not used by Amazon Web Services customers.

When you delete an event source, the status of the corresponding partner event bus in the Amazon Web Services customer account becomes DELETED.

Service Reference:

Examples:

Calling the deletePartnerEventSource operation

var params = {
  Account: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE' /* required */
};
eventbridge.deletePartnerEventSource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the event source to delete.

    • Account — (String)

      The Amazon Web Services account ID of the Amazon Web Services customer that the event source was created for.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRule(params = {}, callback) ⇒ AWS.Request

Deletes the specified rule.

Before you can delete the rule, you must remove all targets, using RemoveTargets.

When you delete a rule, incoming events might continue to match to the deleted rule. Allow a short period of time for changes to take effect.

If you call delete rule multiple times for the same rule, all calls will succeed. When you call delete rule for a non-existent custom eventbus, ResourceNotFoundException is returned.

Managed rules are rules created and managed by another Amazon Web Services service on your behalf. These rules are created by those other Amazon Web Services services to support functionality in those services. You can delete these rules using the Force option, but you should do so only if you are sure the other service is not still using that rule.

Service Reference:

Examples:

Calling the deleteRule operation

var params = {
  Name: 'STRING_VALUE', /* required */
  EventBusName: 'STRING_VALUE',
  Force: true || false
};
eventbridge.deleteRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the rule.

    • EventBusName — (String)

      The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

    • Force — (Boolean)

      If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify Force as True to delete the rule. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeApiDestination(params = {}, callback) ⇒ AWS.Request

Retrieves details about an API destination.

Service Reference:

Examples:

Calling the describeApiDestination operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
eventbridge.describeApiDestination(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the API destination to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiDestinationArn — (String)

        The ARN of the API destination retrieved.

      • Name — (String)

        The name of the API destination retrieved.

      • Description — (String)

        The description for the API destination retrieved.

      • ApiDestinationState — (String)

        The state of the API destination retrieved.

        Possible values include:
        • "ACTIVE"
        • "INACTIVE"
      • ConnectionArn — (String)

        The ARN of the connection specified for the API destination retrieved.

      • InvocationEndpoint — (String)

        The URL to use to connect to the HTTP endpoint.

      • HttpMethod — (String)

        The method to use to connect to the HTTP endpoint.

        Possible values include:
        • "POST"
        • "GET"
        • "HEAD"
        • "OPTIONS"
        • "PUT"
        • "PATCH"
        • "DELETE"
      • InvocationRateLimitPerSecond — (Integer)

        The maximum number of invocations per second to specified for the API destination. Note that if you set the invocation rate maximum to a value lower the rate necessary to send all events received on to the destination HTTP endpoint, some events may not be delivered within the 24-hour retry window. If you plan to set the rate lower than the rate necessary to deliver all events, consider using a dead-letter queue to catch events that are not delivered within 24 hours.

      • CreationTime — (Date)

        A time stamp for the time that the API destination was created.

      • LastModifiedTime — (Date)

        A time stamp for the time that the API destination was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeArchive(params = {}, callback) ⇒ AWS.Request

Retrieves details about an archive.

Service Reference:

Examples:

Calling the describeArchive operation

var params = {
  ArchiveName: 'STRING_VALUE' /* required */
};
eventbridge.describeArchive(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ArchiveName — (String)

      The name of the archive to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ArchiveArn — (String)

        The ARN of the archive.

      • ArchiveName — (String)

        The name of the archive.

      • EventSourceArn — (String)

        The ARN of the event source associated with the archive.

      • Description — (String)

        The description of the archive.

      • EventPattern — (String)

        The event pattern used to filter events sent to the archive.

      • State — (String)

        The state of the archive.

        Possible values include:
        • "ENABLED"
        • "DISABLED"
        • "CREATING"
        • "UPDATING"
        • "CREATE_FAILED"
        • "UPDATE_FAILED"
      • StateReason — (String)

        The reason that the archive is in the state.

      • RetentionDays — (Integer)

        The number of days to retain events for in the archive.

      • SizeBytes — (Integer)

        The size of the archive in bytes.

      • EventCount — (Integer)

        The number of events in the archive.

      • CreationTime — (Date)

        The time at which the archive was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeConnection(params = {}, callback) ⇒ AWS.Request

Retrieves details about a connection.

Service Reference:

Examples:

Calling the describeConnection operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
eventbridge.describeConnection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the connection to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ConnectionArn — (String)

        The ARN of the connection retrieved.

      • Name — (String)

        The name of the connection retrieved.

      • Description — (String)

        The description for the connection retrieved.

      • ConnectionState — (String)

        The state of the connection retrieved.

        Possible values include:
        • "CREATING"
        • "UPDATING"
        • "DELETING"
        • "AUTHORIZED"
        • "DEAUTHORIZED"
        • "AUTHORIZING"
        • "DEAUTHORIZING"
      • StateReason — (String)

        The reason that the connection is in the current connection state.

      • AuthorizationType — (String)

        The type of authorization specified for the connection.

        Possible values include:
        • "BASIC"
        • "OAUTH_CLIENT_CREDENTIALS"
        • "API_KEY"
      • SecretArn — (String)

        The ARN of the secret created from the authorization parameters specified for the connection.

      • AuthParameters — (map)

        The parameters to use for authorization for the connection.

        • BasicAuthParameters — (map)

          The authorization parameters for Basic authorization.

          • Username — (String)

            The user name to use for Basic authorization.

        • OAuthParameters — (map)

          The OAuth parameters to use for authorization.

          • ClientParameters — (map)

            A ConnectionOAuthClientResponseParameters object that contains details about the client parameters returned when OAuth is specified as the authorization type.

            • ClientID — (String)

              The client ID associated with the response to the connection request.

          • AuthorizationEndpoint — (String)

            The URL to the HTTP endpoint that authorized the request.

          • HttpMethod — (String)

            The method used to connect to the HTTP endpoint.

            Possible values include:
            • "GET"
            • "POST"
            • "PUT"
          • OAuthHttpParameters — (map)

            The additional HTTP parameters used for the OAuth authorization request.

            • HeaderParameters — (Array<map>)

              Contains additional header parameters for the connection.

              • Key — (String)

                The key for the parameter.

              • Value — (String)

                The value associated with the key.

              • IsValueSecret — (Boolean)

                Specified whether the value is a secret.

            • QueryStringParameters — (Array<map>)

              Contains additional query string parameters for the connection.

              • Key — (String)

                The key for a query string parameter.

              • Value — (String)

                The value associated with the key for the query string parameter.

              • IsValueSecret — (Boolean)

                Specifies whether the value is secret.

            • BodyParameters — (Array<map>)

              Contains additional body string parameters for the connection.

              • Key — (String)

                The key for the parameter.

              • Value — (String)

                The value associated with the key.

              • IsValueSecret — (Boolean)

                Specified whether the value is secret.

        • ApiKeyAuthParameters — (map)

          The API Key parameters to use for authorization.

          • ApiKeyName — (String)

            The name of the header to use for the APIKeyValue used for authorization.

        • InvocationHttpParameters — (map)

          Additional parameters for the connection that are passed through with every invocation to the HTTP endpoint.

          • HeaderParameters — (Array<map>)

            Contains additional header parameters for the connection.

            • Key — (String)

              The key for the parameter.

            • Value — (String)

              The value associated with the key.

            • IsValueSecret — (Boolean)

              Specified whether the value is a secret.

          • QueryStringParameters — (Array<map>)

            Contains additional query string parameters for the connection.

            • Key — (String)

              The key for a query string parameter.

            • Value — (String)

              The value associated with the key for the query string parameter.

            • IsValueSecret — (Boolean)

              Specifies whether the value is secret.

          • BodyParameters — (Array<map>)

            Contains additional body string parameters for the connection.

            • Key — (String)

              The key for the parameter.

            • Value — (String)

              The value associated with the key.

            • IsValueSecret — (Boolean)

              Specified whether the value is secret.

      • CreationTime — (Date)

        A time stamp for the time that the connection was created.

      • LastModifiedTime — (Date)

        A time stamp for the time that the connection was last modified.

      • LastAuthorizedTime — (Date)

        A time stamp for the time that the connection was last authorized.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeEndpoint(params = {}, callback) ⇒ AWS.Request

Get the information about an existing global endpoint. For more information about global endpoints, see Making applications Regional-fault tolerant with global endpoints and event replication in the Amazon EventBridge User Guide .

Service Reference:

Examples:

Calling the describeEndpoint operation

var params = {
  Name: 'STRING_VALUE', /* required */
  HomeRegion: 'STRING_VALUE'
};
eventbridge.describeEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the endpoint you want to get information about. For example, "Name":"us-east-2-custom_bus_A-endpoint".

    • HomeRegion — (String)

      The primary Region of the endpoint you want to get information about. For example "HomeRegion": "us-east-1".

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Name — (String)

        The name of the endpoint you asked for information about.

      • Description — (String)

        The description of the endpoint you asked for information about.

      • Arn — (String)

        The ARN of the endpoint you asked for information about.

      • RoutingConfig — (map)

        The routing configuration of the endpoint you asked for information about.

        • FailoverConfigrequired — (map)

          The failover configuration for an endpoint. This includes what triggers failover and what happens when it's triggered.

          • Primaryrequired — (map)

            The main Region of the endpoint.

            • HealthCheckrequired — (String)

              The ARN of the health check used by the endpoint to determine whether failover is triggered.

          • Secondaryrequired — (map)

            The Region that events are routed to when failover is triggered or event replication is enabled.

            • Routerequired — (String)

              Defines the secondary Region.

      • ReplicationConfig — (map)

        Whether replication is enabled or disabled for the endpoint you asked for information about.

        • State — (String)

          The state of event replication.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
      • EventBuses — (Array<map>)

        The event buses being used by the endpoint you asked for information about.

        • EventBusArnrequired — (String)

          The ARN of the event bus the endpoint is associated with.

      • RoleArn — (String)

        The ARN of the role used by the endpoint you asked for information about.

      • EndpointId — (String)

        The ID of the endpoint you asked for information about.

      • EndpointUrl — (String)

        The URL of the endpoint you asked for information about.

      • State — (String)

        The current state of the endpoint you asked for information about.

        Possible values include:
        • "ACTIVE"
        • "CREATING"
        • "UPDATING"
        • "DELETING"
        • "CREATE_FAILED"
        • "UPDATE_FAILED"
        • "DELETE_FAILED"
      • StateReason — (String)

        The reason the endpoint you asked for information about is in its current state.

      • CreationTime — (Date)

        The time the endpoint you asked for information about was created.

      • LastModifiedTime — (Date)

        The last time the endpoint you asked for information about was modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeEventBus(params = {}, callback) ⇒ AWS.Request

Displays details about an event bus in your account. This can include the external Amazon Web Services accounts that are permitted to write events to your default event bus, and the associated policy. For custom event buses and partner event buses, it displays the name, ARN, policy, state, and creation time.

To enable your account to receive events from other accounts on its default event bus, use PutPermission.

For more information about partner event buses, see CreateEventBus.

Service Reference:

Examples:

Calling the describeEventBus operation

var params = {
  Name: 'STRING_VALUE'
};
eventbridge.describeEventBus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name or ARN of the event bus to show details for. If you omit this, the default event bus is displayed.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Name — (String)

        The name of the event bus. Currently, this is always default.

      • Arn — (String)

        The Amazon Resource Name (ARN) of the account permitted to write events to the current account.

      • Description — (String)

        The event bus description.

      • KmsKeyIdentifier — (String)

        The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.

        For more information, see Data encryption in EventBridge in the Amazon EventBridge User Guide.

      • DeadLetterConfig — (map)

        Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).

        For more information, see Event retry policy and using dead-letter queues in the EventBridge User Guide.

        • Arn — (String)

          The ARN of the SQS queue specified as the target for the dead-letter queue.

      • Policy — (String)

        The policy that enables the external account to send events to your account.

      • CreationTime — (Date)

        The time the event bus was created.

      • LastModifiedTime — (Date)

        The time the event bus was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeEventSource(params = {}, callback) ⇒ AWS.Request

This operation lists details about a partner event source that is shared with your account.

Service Reference:

Examples:

Calling the describeEventSource operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
eventbridge.describeEventSource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the partner event source to display the details of.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String)

        The ARN of the partner event source.

      • CreatedBy — (String)

        The name of the SaaS partner that created the event source.

      • CreationTime — (Date)

        The date and time that the event source was created.

      • ExpirationTime — (Date)

        The date and time that the event source will expire if you do not create a matching event bus.

      • Name — (String)

        The name of the partner event source.

      • State — (String)

        The state of the event source. If it is ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it is PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it is DELETED, you have created a matching event bus, but the event source has since been deleted.

        Possible values include:
        • "PENDING"
        • "ACTIVE"
        • "DELETED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describePartnerEventSource(params = {}, callback) ⇒ AWS.Request

An SaaS partner can use this operation to list details about a partner event source that they have created. Amazon Web Services customers do not use this operation. Instead, Amazon Web Services customers can use DescribeEventSource to see details about a partner event source that is shared with them.

Service Reference:

Examples:

Calling the describePartnerEventSource operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
eventbridge.describePartnerEventSource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the event source to display.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String)

        The ARN of the event source.

      • Name — (String)

        The name of the event source.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeReplay(params = {}, callback) ⇒ AWS.Request

Retrieves details about a replay. Use DescribeReplay to determine the progress of a running replay. A replay processes events to replay based on the time in the event, and replays them using 1 minute intervals. If you use StartReplay and specify an EventStartTime and an EventEndTime that covers a 20 minute time range, the events are replayed from the first minute of that 20 minute range first. Then the events from the second minute are replayed. You can use DescribeReplay to determine the progress of a replay. The value returned for EventLastReplayedTime indicates the time within the specified time range associated with the last event replayed.

Service Reference:

Examples:

Calling the describeReplay operation

var params = {
  ReplayName: 'STRING_VALUE' /* required */
};
eventbridge.describeReplay(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ReplayName — (String)

      The name of the replay to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ReplayName — (String)

        The name of the replay.

      • ReplayArn — (String)

        The ARN of the replay.

      • Description — (String)

        The description of the replay.

      • State — (String)

        The current state of the replay.

        Possible values include:
        • "STARTING"
        • "RUNNING"
        • "CANCELLING"
        • "COMPLETED"
        • "CANCELLED"
        • "FAILED"
      • StateReason — (String)

        The reason that the replay is in the current state.

      • EventSourceArn — (String)

        The ARN of the archive events were replayed from.

      • Destination — (map)

        A ReplayDestination object that contains details about the replay.

        • Arnrequired — (String)

          The ARN of the event bus to replay event to. You can replay events only to the event bus specified to create the archive.

        • FilterArns — (Array<String>)

          A list of ARNs for rules to replay events to.

      • EventStartTime — (Date)

        The time stamp of the first event that was last replayed from the archive.

      • EventEndTime — (Date)

        The time stamp for the last event that was replayed from the archive.

      • EventLastReplayedTime — (Date)

        The time that the event was last replayed.

      • ReplayStartTime — (Date)

        A time stamp for the time that the replay started.

      • ReplayEndTime — (Date)

        A time stamp for the time that the replay stopped.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeRule(params = {}, callback) ⇒ AWS.Request

Describes the specified rule.

DescribeRule does not list the targets of a rule. To see the targets associated with a rule, use ListTargetsByRule.

Service Reference:

Examples:

Calling the describeRule operation

var params = {
  Name: 'STRING_VALUE', /* required */
  EventBusName: 'STRING_VALUE'
};
eventbridge.describeRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the rule.

    • EventBusName — (String)

      The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Name — (String)

        The name of the rule.

      • Arn — (String)

        The Amazon Resource Name (ARN) of the rule.

      • EventPattern — (String)

        The event pattern. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide .

      • ScheduleExpression — (String)

        The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".

      • State — (String)

        Specifies whether the rule is enabled or disabled.

        Possible values include:
        • "ENABLED"
        • "DISABLED"
        • "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS"
      • Description — (String)

        The description of the rule.

      • RoleArn — (String)

        The Amazon Resource Name (ARN) of the IAM role associated with the rule.

      • ManagedBy — (String)

        If this is a managed rule, created by an Amazon Web Services service on your behalf, this field displays the principal name of the Amazon Web Services service that created the rule.

      • EventBusName — (String)

        The name of the event bus associated with the rule.

      • CreatedBy — (String)

        The account ID of the user that created the rule. If you use PutRule to put a rule on an event bus in another account, the other account is the owner of the rule, and the rule ARN includes the account ID for that account. However, the value for CreatedBy is the account ID as the account that created the rule in the other account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disableRule(params = {}, callback) ⇒ AWS.Request

Disables the specified rule. A disabled rule won't match any events, and won't self-trigger if it has a schedule expression.

When you disable a rule, incoming events might continue to match to the disabled rule. Allow a short period of time for changes to take effect.

Service Reference:

Examples:

Calling the disableRule operation

var params = {
  Name: 'STRING_VALUE', /* required */
  EventBusName: 'STRING_VALUE'
};
eventbridge.disableRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the rule.

    • EventBusName — (String)

      The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

enableRule(params = {}, callback) ⇒ AWS.Request

Enables the specified rule. If the rule does not exist, the operation fails.

When you enable a rule, incoming events might not immediately start matching to a newly enabled rule. Allow a short period of time for changes to take effect.

Service Reference:

Examples:

Calling the enableRule operation

var params = {
  Name: 'STRING_VALUE', /* required */
  EventBusName: 'STRING_VALUE'
};
eventbridge.enableRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the rule.

    • EventBusName — (String)

      The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listApiDestinations(params = {}, callback) ⇒ AWS.Request

Retrieves a list of API destination in the account in the current Region.

Service Reference:

Examples:

Calling the listApiDestinations operation

var params = {
  ConnectionArn: 'STRING_VALUE',
  Limit: 'NUMBER_VALUE',
  NamePrefix: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
eventbridge.listApiDestinations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NamePrefix — (String)

      A name prefix to filter results returned. Only API destinations with a name that starts with the prefix are returned.

    • ConnectionArn — (String)

      The ARN of the connection specified for the API destination.

    • NextToken — (String)

      The token returned by a previous call to retrieve the next set of results.

    • Limit — (Integer)

      The maximum number of API destinations to include in the response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiDestinations — (Array<map>)

        An array of ApiDestination objects that include information about an API destination.

        • ApiDestinationArn — (String)

          The ARN of the API destination.

        • Name — (String)

          The name of the API destination.

        • ApiDestinationState — (String)

          The state of the API destination.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
        • ConnectionArn — (String)

          The ARN of the connection specified for the API destination.

        • InvocationEndpoint — (String)

          The URL to the endpoint for the API destination.

        • HttpMethod — (String)

          The method to use to connect to the HTTP endpoint.

          Possible values include:
          • "POST"
          • "GET"
          • "HEAD"
          • "OPTIONS"
          • "PUT"
          • "PATCH"
          • "DELETE"
        • InvocationRateLimitPerSecond — (Integer)

          The maximum number of invocations per second to send to the HTTP endpoint.

        • CreationTime — (Date)

          A time stamp for the time that the API destination was created.

        • LastModifiedTime — (Date)

          A time stamp for the time that the API destination was last modified.

      • NextToken — (String)

        A token you can use in a subsequent request to retrieve the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listArchives(params = {}, callback) ⇒ AWS.Request

Lists your archives. You can either list all the archives or you can provide a prefix to match to the archive names. Filter parameters are exclusive.

Service Reference:

Examples:

Calling the listArchives operation

var params = {
  EventSourceArn: 'STRING_VALUE',
  Limit: 'NUMBER_VALUE',
  NamePrefix: 'STRING_VALUE',
  NextToken: 'STRING_VALUE',
  State: ENABLED | DISABLED | CREATING | UPDATING | CREATE_FAILED | UPDATE_FAILED
};
eventbridge.listArchives(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NamePrefix — (String)

      A name prefix to filter the archives returned. Only archives with name that match the prefix are returned.

    • EventSourceArn — (String)

      The ARN of the event source associated with the archive.

    • State — (String)

      The state of the archive.

      Possible values include:
      • "ENABLED"
      • "DISABLED"
      • "CREATING"
      • "UPDATING"
      • "CREATE_FAILED"
      • "UPDATE_FAILED"
    • NextToken — (String)

      The token returned by a previous call to retrieve the next set of results.

    • Limit — (Integer)

      The maximum number of results to return.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Archives — (Array<map>)

        An array of Archive objects that include details about an archive.

        • ArchiveName — (String)

          The name of the archive.

        • EventSourceArn — (String)

          The ARN of the event bus associated with the archive. Only events from this event bus are sent to the archive.

        • State — (String)

          The current state of the archive.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
          • "CREATING"
          • "UPDATING"
          • "CREATE_FAILED"
          • "UPDATE_FAILED"
        • StateReason — (String)

          A description for the reason that the archive is in the current state.

        • RetentionDays — (Integer)

          The number of days to retain events in the archive before they are deleted.

        • SizeBytes — (Integer)

          The size of the archive, in bytes.

        • EventCount — (Integer)

          The number of events in the archive.

        • CreationTime — (Date)

          The time stamp for the time that the archive was created.

      • NextToken — (String)

        The token returned by a previous call to retrieve the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listConnections(params = {}, callback) ⇒ AWS.Request

Retrieves a list of connections from the account.

Service Reference:

Examples:

Calling the listConnections operation

var params = {
  ConnectionState: CREATING | UPDATING | DELETING | AUTHORIZED | DEAUTHORIZED | AUTHORIZING | DEAUTHORIZING,
  Limit: 'NUMBER_VALUE',
  NamePrefix: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
eventbridge.listConnections(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NamePrefix — (String)

      A name prefix to filter results returned. Only connections with a name that starts with the prefix are returned.

    • ConnectionState — (String)

      The state of the connection.

      Possible values include:
      • "CREATING"
      • "UPDATING"
      • "DELETING"
      • "AUTHORIZED"
      • "DEAUTHORIZED"
      • "AUTHORIZING"
      • "DEAUTHORIZING"
    • NextToken — (String)

      The token returned by a previous call to retrieve the next set of results.

    • Limit — (Integer)

      The maximum number of connections to return.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Connections — (Array<map>)

        An array of connections objects that include details about the connections.

        • ConnectionArn — (String)

          The ARN of the connection.

        • Name — (String)

          The name of the connection.

        • ConnectionState — (String)

          The state of the connection.

          Possible values include:
          • "CREATING"
          • "UPDATING"
          • "DELETING"
          • "AUTHORIZED"
          • "DEAUTHORIZED"
          • "AUTHORIZING"
          • "DEAUTHORIZING"
        • StateReason — (String)

          The reason that the connection is in the connection state.

        • AuthorizationType — (String)

          The authorization type specified for the connection.

          Note: OAUTH tokens are refreshed when a 401 or 407 response is returned.
          Possible values include:
          • "BASIC"
          • "OAUTH_CLIENT_CREDENTIALS"
          • "API_KEY"
        • CreationTime — (Date)

          A time stamp for the time that the connection was created.

        • LastModifiedTime — (Date)

          A time stamp for the time that the connection was last modified.

        • LastAuthorizedTime — (Date)

          A time stamp for the time that the connection was last authorized.

      • NextToken — (String)

        A token you can use in a subsequent request to retrieve the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listEndpoints(params = {}, callback) ⇒ AWS.Request

List the global endpoints associated with this account. For more information about global endpoints, see Making applications Regional-fault tolerant with global endpoints and event replication in the Amazon EventBridge User Guide .

Service Reference:

Examples:

Calling the listEndpoints operation

var params = {
  HomeRegion: 'STRING_VALUE',
  MaxResults: 'NUMBER_VALUE',
  NamePrefix: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
eventbridge.listEndpoints(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NamePrefix — (String)

      A value that will return a subset of the endpoints associated with this account. For example, "NamePrefix": "ABC" will return all endpoints with "ABC" in the name.

    • HomeRegion — (String)

      The primary Region of the endpoints associated with this account. For example "HomeRegion": "us-east-1".

    • NextToken — (String)

      If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

    • MaxResults — (Integer)

      The maximum number of results returned by the call.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Endpoints — (Array<map>)

        The endpoints returned by the call.

        • Name — (String)

          The name of the endpoint.

        • Description — (String)

          A description for the endpoint.

        • Arn — (String)

          The ARN of the endpoint.

        • RoutingConfig — (map)

          The routing configuration of the endpoint.

          • FailoverConfigrequired — (map)

            The failover configuration for an endpoint. This includes what triggers failover and what happens when it's triggered.

            • Primaryrequired — (map)

              The main Region of the endpoint.

              • HealthCheckrequired — (String)

                The ARN of the health check used by the endpoint to determine whether failover is triggered.

            • Secondaryrequired — (map)

              The Region that events are routed to when failover is triggered or event replication is enabled.

              • Routerequired — (String)

                Defines the secondary Region.

        • ReplicationConfig — (map)

          Whether event replication was enabled or disabled for this endpoint. 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.

          • State — (String)

            The state of event replication.

            Possible values include:
            • "ENABLED"
            • "DISABLED"
        • EventBuses — (Array<map>)

          The event buses being used by the endpoint.

          • EventBusArnrequired — (String)

            The ARN of the event bus the endpoint is associated with.

        • RoleArn — (String)

          The ARN of the role used by event replication for the endpoint.

        • EndpointId — (String)

          The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is abcde.veo.

        • EndpointUrl — (String)

          The URL of the endpoint.

        • State — (String)

          The current state of the endpoint.

          Possible values include:
          • "ACTIVE"
          • "CREATING"
          • "UPDATING"
          • "DELETING"
          • "CREATE_FAILED"
          • "UPDATE_FAILED"
          • "DELETE_FAILED"
        • StateReason — (String)

          The reason the endpoint is in its current state.

        • CreationTime — (Date)

          The time the endpoint was created.

        • LastModifiedTime — (Date)

          The last time the endpoint was modified.

      • NextToken — (String)

        If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listEventBuses(params = {}, callback) ⇒ AWS.Request

Lists all the event buses in your account, including the default event bus, custom event buses, and partner event buses.

Service Reference:

Examples:

Calling the listEventBuses operation

var params = {
  Limit: 'NUMBER_VALUE',
  NamePrefix: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
eventbridge.listEventBuses(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NamePrefix — (String)

      Specifying this limits the results to only those event buses with names that start with the specified prefix.

    • NextToken — (String)

      The token returned by a previous call to retrieve the next set of results.

    • Limit — (Integer)

      Specifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EventBuses — (Array<map>)

        This list of event buses.

        • Name — (String)

          The name of the event bus.

        • Arn — (String)

          The ARN of the event bus.

        • Description — (String)

          The event bus description.

        • Policy — (String)

          The permissions policy of the event bus, describing which other Amazon Web Services accounts can write events to this event bus.

        • CreationTime — (Date)

          The time the event bus was created.

        • LastModifiedTime — (Date)

          The time the event bus was last modified.

      • NextToken — (String)

        A token you can use in a subsequent operation to retrieve the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listEventSources(params = {}, callback) ⇒ AWS.Request

You can use this to see all the partner event sources that have been shared with your Amazon Web Services account. For more information about partner event sources, see CreateEventBus.

Service Reference:

Examples:

Calling the listEventSources operation

var params = {
  Limit: 'NUMBER_VALUE',
  NamePrefix: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
eventbridge.listEventSources(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NamePrefix — (String)

      Specifying this limits the results to only those partner event sources with names that start with the specified prefix.

    • NextToken — (String)

      The token returned by a previous call to retrieve the next set of results.

    • Limit — (Integer)

      Specifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EventSources — (Array<map>)

        The list of event sources.

        • Arn — (String)

          The ARN of the event source.

        • CreatedBy — (String)

          The name of the partner that created the event source.

        • CreationTime — (Date)

          The date and time the event source was created.

        • ExpirationTime — (Date)

          The date and time that the event source will expire, if the Amazon Web Services account doesn't create a matching event bus for it.

        • Name — (String)

          The name of the event source.

        • State — (String)

          The state of the event source. If it is ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it is PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it is DELETED, you have created a matching event bus, but the event source has since been deleted.

          Possible values include:
          • "PENDING"
          • "ACTIVE"
          • "DELETED"
      • NextToken — (String)

        A token you can use in a subsequent operation to retrieve the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPartnerEventSourceAccounts(params = {}, callback) ⇒ AWS.Request

An SaaS partner can use this operation to display the Amazon Web Services account ID that a particular partner event source name is associated with. This operation is not used by Amazon Web Services customers.

Service Reference:

Examples:

Calling the listPartnerEventSourceAccounts operation

var params = {
  EventSourceName: 'STRING_VALUE', /* required */
  Limit: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
eventbridge.listPartnerEventSourceAccounts(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EventSourceName — (String)

      The name of the partner event source to display account information about.

    • NextToken — (String)

      The token returned by a previous call to this operation. Specifying this retrieves the next set of results.

    • Limit — (Integer)

      Specifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • PartnerEventSourceAccounts — (Array<map>)

        The list of partner event sources returned by the operation.

        • Account — (String)

          The Amazon Web Services account ID that the partner event source was offered to.

        • CreationTime — (Date)

          The date and time the event source was created.

        • ExpirationTime — (Date)

          The date and time that the event source will expire, if the Amazon Web Services account doesn't create a matching event bus for it.

        • State — (String)

          The state of the event source. If it is ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it is PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it is DELETED, you have created a matching event bus, but the event source has since been deleted.

          Possible values include:
          • "PENDING"
          • "ACTIVE"
          • "DELETED"
      • NextToken — (String)

        A token you can use in a subsequent operation to retrieve the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPartnerEventSources(params = {}, callback) ⇒ AWS.Request

An SaaS partner can use this operation to list all the partner event source names that they have created. This operation is not used by Amazon Web Services customers.

Service Reference:

Examples:

Calling the listPartnerEventSources operation

var params = {
  NamePrefix: 'STRING_VALUE', /* required */
  Limit: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
eventbridge.listPartnerEventSources(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NamePrefix — (String)

      If you specify this, the results are limited to only those partner event sources that start with the string you specify.

    • NextToken — (String)

      The token returned by a previous call to this operation. Specifying this retrieves the next set of results.

    • Limit — (Integer)

      pecifying this limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • PartnerEventSources — (Array<map>)

        The list of partner event sources returned by the operation.

        • Arn — (String)

          The ARN of the partner event source.

        • Name — (String)

          The name of the partner event source.

      • NextToken — (String)

        A token you can use in a subsequent operation to retrieve the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listReplays(params = {}, callback) ⇒ AWS.Request

Lists your replays. You can either list all the replays or you can provide a prefix to match to the replay names. Filter parameters are exclusive.

Service Reference:

Examples:

Calling the listReplays operation

var params = {
  EventSourceArn: 'STRING_VALUE',
  Limit: 'NUMBER_VALUE',
  NamePrefix: 'STRING_VALUE',
  NextToken: 'STRING_VALUE',
  State: STARTING | RUNNING | CANCELLING | COMPLETED | CANCELLED | FAILED
};
eventbridge.listReplays(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NamePrefix — (String)

      A name prefix to filter the replays returned. Only replays with name that match the prefix are returned.

    • State — (String)

      The state of the replay.

      Possible values include:
      • "STARTING"
      • "RUNNING"
      • "CANCELLING"
      • "COMPLETED"
      • "CANCELLED"
      • "FAILED"
    • EventSourceArn — (String)

      The ARN of the archive from which the events are replayed.

    • NextToken — (String)

      The token returned by a previous call to retrieve the next set of results.

    • Limit — (Integer)

      The maximum number of replays to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Replays — (Array<map>)

        An array of Replay objects that contain information about the replay.

        • ReplayName — (String)

          The name of the replay.

        • EventSourceArn — (String)

          The ARN of the archive to replay event from.

        • State — (String)

          The current state of the replay.

          Possible values include:
          • "STARTING"
          • "RUNNING"
          • "CANCELLING"
          • "COMPLETED"
          • "CANCELLED"
          • "FAILED"
        • StateReason — (String)

          A description of why the replay is in the current state.

        • EventStartTime — (Date)

          A time stamp for the time to start replaying events. This is determined by the time in the event as described in Time.

        • EventEndTime — (Date)

          A time stamp for the time to start replaying events. Any event with a creation time prior to the EventEndTime specified is replayed.

        • EventLastReplayedTime — (Date)

          A time stamp for the time that the last event was replayed.

        • ReplayStartTime — (Date)

          A time stamp for the time that the replay started.

        • ReplayEndTime — (Date)

          A time stamp for the time that the replay completed.

      • NextToken — (String)

        The token returned by a previous call to retrieve the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listRuleNamesByTarget(params = {}, callback) ⇒ AWS.Request

Lists the rules for the specified target. You can see which of the rules in Amazon EventBridge can invoke a specific target in your account.

The maximum number of results per page for requests is 100.

Service Reference:

Examples:

Calling the listRuleNamesByTarget operation

var params = {
  TargetArn: 'STRING_VALUE', /* required */
  EventBusName: 'STRING_VALUE',
  Limit: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
eventbridge.listRuleNamesByTarget(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • TargetArn — (String)

      The Amazon Resource Name (ARN) of the target resource.

    • EventBusName — (String)

      The name or ARN of the event bus to list rules for. If you omit this, the default event bus is used.

    • NextToken — (String)

      The token returned by a previous call to retrieve the next set of results.

    • Limit — (Integer)

      The maximum number of results to return.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • RuleNames — (Array<String>)

        The names of the rules that can invoke the given target.

      • NextToken — (String)

        Indicates whether there are additional results to retrieve. If there are no more results, the value is null.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listRules(params = {}, callback) ⇒ AWS.Request

Lists your Amazon EventBridge rules. You can either list all the rules or you can provide a prefix to match to the rule names.

The maximum number of results per page for requests is 100.

ListRules does not list the targets of a rule. To see the targets associated with a rule, use ListTargetsByRule.

Service Reference:

Examples:

Calling the listRules operation

var params = {
  EventBusName: 'STRING_VALUE',
  Limit: 'NUMBER_VALUE',
  NamePrefix: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
eventbridge.listRules(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NamePrefix — (String)

      The prefix matching the rule name.

    • EventBusName — (String)

      The name or ARN of the event bus to list the rules for. If you omit this, the default event bus is used.

    • NextToken — (String)

      The token returned by a previous call to retrieve the next set of results.

    • Limit — (Integer)

      The maximum number of results to return.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Rules — (Array<map>)

        The rules that match the specified criteria.

        • Name — (String)

          The name of the rule.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the rule.

        • EventPattern — (String)

          The event pattern of the rule. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide .

        • State — (String)

          The state of the rule.

          Valid values include:

          • DISABLED: The rule is disabled. EventBridge does not match any events against the rule.

          • ENABLED: The rule is enabled. EventBridge matches events against the rule, except for Amazon Web Services management events delivered through CloudTrail.

          • ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS: The rule is enabled for all events, including Amazon Web Services management events delivered through CloudTrail.

            Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the Amazon EventBridge User Guide .

            This value is only valid for rules on the default event bus or custom event buses. It does not apply to partner event buses.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
          • "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS"
        • Description — (String)

          The description of the rule.

        • ScheduleExpression — (String)

          The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see Creating an Amazon EventBridge rule that runs on a schedule.

        • RoleArn — (String)

          The Amazon Resource Name (ARN) of the role that is used for target invocation.

          If you're setting an event bus in another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a RoleArn with proper permissions in the Target structure, instead of here in this parameter.

        • ManagedBy — (String)

          If the rule was created on behalf of your account by an Amazon Web Services service, this field displays the principal name of the service that created the rule.

        • EventBusName — (String)

          The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

      • NextToken — (String)

        Indicates whether there are additional results to retrieve. If there are no more results, the value is null.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Displays the tags associated with an EventBridge resource. In EventBridge, rules and event buses can be tagged.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  ResourceARN: 'STRING_VALUE' /* required */
};
eventbridge.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceARN — (String)

      The ARN of the EventBridge resource for which you want to view tags.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Tags — (Array<map>)

        The list of tag keys and values associated with the resource you specified

        • Keyrequired — (String)

          A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.

        • Valuerequired — (String)

          The value for the specified tag key.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTargetsByRule(params = {}, callback) ⇒ AWS.Request

Lists the targets assigned to the specified rule.

The maximum number of results per page for requests is 100.

Service Reference:

Examples:

Calling the listTargetsByRule operation

var params = {
  Rule: 'STRING_VALUE', /* required */
  EventBusName: 'STRING_VALUE',
  Limit: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
eventbridge.listTargetsByRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Rule — (String)

      The name of the rule.

    • EventBusName — (String)

      The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

    • NextToken — (String)

      The token returned by a previous call to retrieve the next set of results.

    • Limit — (Integer)

      The maximum number of results to return.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Targets — (Array<map>)

        The targets assigned to the rule.

        • Idrequired — (String)

          The ID of the target within the specified rule. Use this ID to reference the target when updating the rule. We recommend using a memorable and unique string.

        • Arnrequired — (String)

          The Amazon Resource Name (ARN) of the target.

        • RoleArn — (String)

          The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.

        • Input — (String)

          Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see The JavaScript Object Notation (JSON) Data Interchange Format.

        • InputPath — (String)

          The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You may use JSON dot notation or bracket notation. For more information about JSON paths, see JSONPath.

        • InputTransformer — (map)

          Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.

          • InputPathsMap — (map<String>)

            Map of JSON paths to be extracted from the event. You can then insert these in the template in InputTemplate to produce the output you want to be sent to the target.

            InputPathsMap is an array key-value pairs, where each value is a valid JSON path. You can have as many as 100 key-value pairs. You must use JSON dot notation, not bracket notation.

            The keys cannot start with "Amazon Web Services."

          • InputTemplaterequired — (String)

            Input template where you specify placeholders that will be filled with the values of the keys from InputPathsMap to customize the data sent to the target. Enclose each InputPathsMaps value in brackets: <value>

            If InputTemplate is a JSON object (surrounded by curly braces), the following restrictions apply:

            • The placeholder cannot be used as an object key.

            The following example shows the syntax for using InputPathsMap and InputTemplate.

            "InputTransformer":

            {

            "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},

            "InputTemplate": "<instance> is in state <status>"

            }

            To have the InputTemplate include quote marks within a JSON string, escape each quote marks with a slash, as in the following example:

            "InputTransformer":

            {

            "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},

            "InputTemplate": "<instance> is in state \"<status>\""

            }

            The InputTemplate can also be valid JSON with varibles in quotes or out, as in the following example:

            "InputTransformer":

            {

            "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},

            "InputTemplate": '{"myInstance": <instance>,"myStatus": "<instance> is in state \"<status>\""}'

            }

        • KinesisParameters — (map)

          The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream. If you do not include this parameter, the default is to use the eventId as the partition key.

          • PartitionKeyPathrequired — (String)

            The JSON path to be extracted from the event and used as the partition key. For more information, see Amazon Kinesis Streams Key Concepts in the Amazon Kinesis Streams Developer Guide.

        • RunCommandParameters — (map)

          Parameters used when you are using the rule to invoke Amazon EC2 Run Command.

          • RunCommandTargetsrequired — (Array<map>)

            Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.

            • Keyrequired — (String)

              Can be either tag: tag-key or InstanceIds.

            • Valuesrequired — (Array<String>)

              If Key is tag: tag-key, Values is a list of tag values. If Key is InstanceIds, Values is a list of Amazon EC2 instance IDs.

        • EcsParameters — (map)

          Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see Task Definitions in the Amazon EC2 Container Service Developer Guide.

          • TaskDefinitionArnrequired — (String)

            The ARN of the task definition to use if the event target is an Amazon ECS task.

          • TaskCount — (Integer)

            The number of tasks to create based on TaskDefinition. The default is 1.

          • LaunchType — (String)

            Specifies the launch type on which your task is running. The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The FARGATE value is supported only in the Regions where Fargate with Amazon ECS is supported. For more information, see Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide.

            Possible values include:
            • "EC2"
            • "FARGATE"
            • "EXTERNAL"
          • NetworkConfiguration — (map)

            Use this structure if the Amazon ECS task uses the awsvpc network mode. This structure specifies the VPC subnets and security groups associated with the task, and whether a public IP address is to be used. This structure is required if LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks.

            If you specify NetworkConfiguration when the target ECS task does not use the awsvpc network mode, the task fails.

            • awsvpcConfiguration — (map)

              Use this structure to specify the VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.

              • Subnetsrequired — (Array<String>)

                Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.

              • SecurityGroups — (Array<String>)

                Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.

              • AssignPublicIp — (String)

                Specifies whether the task's elastic network interface receives a public IP address. You can specify ENABLED only when LaunchType in EcsParameters is set to FARGATE.

                Possible values include:
                • "ENABLED"
                • "DISABLED"
          • PlatformVersion — (String)

            Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as 1.1.0.

            This structure is used only if LaunchType is FARGATE. For more information about valid platform versions, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.

          • Group — (String)

            Specifies an ECS task group for the task. The maximum length is 255 characters.

          • CapacityProviderStrategy — (Array<map>)

            The capacity provider strategy to use for the task.

            If a capacityProviderStrategy is specified, the launchType parameter must be omitted. If no capacityProviderStrategy or launchType is specified, the defaultCapacityProviderStrategy for the cluster is used.

            • capacityProviderrequired — (String)

              The short name of the capacity provider.

            • weight — (Integer)

              The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight value is taken into consideration after the base value, if defined, is satisfied.

            • base — (Integer)

              The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.

          • EnableECSManagedTags — (Boolean)

            Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.

          • EnableExecuteCommand — (Boolean)

            Whether or not to enable the execute command functionality for the containers in this task. If true, this enables execute command functionality on all containers in the task.

          • PlacementConstraints — (Array<map>)

            An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).

            • type — (String)

              The type of constraint. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf to restrict the selection to a group of valid candidates.

              Possible values include:
              • "distinctInstance"
              • "memberOf"
            • expression — (String)

              A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is distinctInstance. To learn more, see Cluster Query Language in the Amazon Elastic Container Service Developer Guide.

          • PlacementStrategy — (Array<map>)

            The placement strategy objects to use for the task. You can specify a maximum of five strategy rules per task.

            • type — (String)

              The type of placement strategy. The random placement strategy randomly places tasks on available candidates. The spread placement strategy spreads placement across available candidates evenly based on the field parameter. The binpack strategy places tasks on available candidates that have the least available amount of the resource that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task).

              Possible values include:
              • "random"
              • "spread"
              • "binpack"
            • field — (String)

              The field to apply the placement strategy against. For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance, such as attribute:ecs.availability-zone. For the binpack placement strategy, valid values are cpu and memory. For the random placement strategy, this field is not used.

          • PropagateTags — (String)

            Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.

            Possible values include:
            • "TASK_DEFINITION"
          • ReferenceId — (String)

            The reference ID to use for the task.

          • Tags — (Array<map>)

            The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.

            • Keyrequired — (String)

              A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.

            • Valuerequired — (String)

              The value for the specified tag key.

        • BatchParameters — (map)

          If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see Jobs in the Batch User Guide.

          • JobDefinitionrequired — (String)

            The ARN or name of the job definition to use if the event target is an Batch job. This job definition must already exist.

          • JobNamerequired — (String)

            The name to use for this execution of the job, if the target is an Batch job.

          • ArrayProperties — (map)

            The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an Batch job.

            • Size — (Integer)

              The size of the array, if this is an array batch job. Valid values are integers between 2 and 10,000.

          • RetryStrategy — (map)

            The retry strategy to use for failed jobs, if the target is an Batch job. The retry strategy is the number of times to retry the failed job execution. Valid values are 1–10. When you specify a retry strategy here, it overrides the retry strategy defined in the job definition.

            • Attempts — (Integer)

              The number of times to attempt to retry, if the job fails. Valid values are 1–10.

        • SqsParameters — (map)

          Contains the message group ID to use when the target is a FIFO queue.

          If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.

          • MessageGroupId — (String)

            The FIFO message group ID to use as the target.

        • HttpParameters — (map)

          Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.

          If you specify an API Gateway API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence.

          • PathParameterValues — (Array<String>)

            The path parameter values to be used to populate API Gateway API or EventBridge ApiDestination path wildcards ("*").

          • HeaderParameters — (map<String>)

            The headers that need to be sent as part of request invoking the API Gateway API or EventBridge ApiDestination.

          • QueryStringParameters — (map<String>)

            The query string keys/values that need to be sent as part of request invoking the API Gateway API or EventBridge ApiDestination.

        • RedshiftDataParameters — (map)

          Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.

          If you specify a Amazon Redshift Cluster as a Target, you can use this to specify parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.

          • SecretManagerArn — (String)

            The name or ARN of the secret that enables access to the database. Required when authenticating using Amazon Web Services Secrets Manager.

          • Databaserequired — (String)

            The name of the database. Required when authenticating using temporary credentials.

          • DbUser — (String)

            The database user name. Required when authenticating using temporary credentials.

          • Sql — (String)

            The SQL statement text to run.

          • StatementName — (String)

            The name of the SQL statement. You can name the SQL statement when you create it to identify the query.

          • WithEvent — (Boolean)

            Indicates whether to send an event back to EventBridge after the SQL statement runs.

          • Sqls — (Array<String>)

            One or more SQL statements to run. The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.

        • SageMakerPipelineParameters — (map)

          Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building Pipeline.

          If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.

          • PipelineParameterList — (Array<map>)

            List of Parameter names and values for SageMaker Model Building Pipeline execution.

            • Namerequired — (String)

              Name of parameter to start execution of a SageMaker Model Building Pipeline.

            • Valuerequired — (String)

              Value of parameter to start execution of a SageMaker Model Building Pipeline.

        • DeadLetterConfig — (map)

          The DeadLetterConfig that defines the target queue to send dead-letter queue events to.

          • Arn — (String)

            The ARN of the SQS queue specified as the target for the dead-letter queue.

        • RetryPolicy — (map)

          The RetryPolicy object that contains the retry policy configuration to use for the dead-letter queue.

          • MaximumRetryAttempts — (Integer)

            The maximum number of retry attempts to make before the request fails. Retry attempts continue until either the maximum number of attempts is made or until the duration of the MaximumEventAgeInSeconds is met.

          • MaximumEventAgeInSeconds — (Integer)

            The maximum amount of time, in seconds, to continue to make retry attempts.

        • AppSyncParameters — (map)

          Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.

          • GraphQLOperation — (String)

            The GraphQL operation; that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service.

            For more information, see Operations in the AppSync User Guide.

      • NextToken — (String)

        Indicates whether there are additional results to retrieve. If there are no more results, the value is null.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putEvents(params = {}, callback) ⇒ AWS.Request

Sends custom events to Amazon EventBridge so that they can be matched to rules.

The maximum size for a PutEvents event entry is 256 KB. Entry size is calculated including the event and any necessary characters and keys of the JSON representation of the event. To learn more, see Calculating PutEvents event entry size in the Amazon EventBridge User Guide

PutEvents accepts the data in JSON format. For the JSON number (integer) data type, the constraints are: a minimum value of -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807.

Note: PutEvents will only process nested JSON up to 1100 levels deep.

Service Reference:

Examples:

Calling the putEvents operation

var params = {
  Entries: [ /* required */
    {
      Detail: 'STRING_VALUE',
      DetailType: 'STRING_VALUE',
      EventBusName: 'STRING_VALUE',
      Resources: [
        'STRING_VALUE',
        /* more items */
      ],
      Source: 'STRING_VALUE',
      Time: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
      TraceHeader: 'STRING_VALUE'
    },
    /* more items */
  ],
  EndpointId: 'STRING_VALUE'
};
eventbridge.putEvents(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Entries — (Array<map>)

      The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on.

      • Time — (Date)

        The time stamp of the event, per RFC3339. If no time stamp is provided, the time stamp of the PutEvents call is used.

      • Source — (String)

        The source of the event.

        Note: Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.
      • Resources — (Array<String>)

        Amazon Web Services resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.

      • DetailType — (String)

        Free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.

        Note: Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.
      • Detail — (String)

        A valid JSON object. There is no other schema imposed. The JSON object may contain fields and nested sub-objects.

        Note: Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.
      • EventBusName — (String)

        The name or ARN of the event bus to receive the event. Only the rules that are associated with this event bus are used to match the event. If you omit this, the default event bus is used.

        Note: If you're using a global endpoint with a custom bus, you can enter either the name or Amazon Resource Name (ARN) of the event bus in either the primary or secondary Region here. EventBridge then determines the corresponding event bus in the other Region based on the endpoint referenced by the EndpointId. Specifying the event bus ARN is preferred.
      • TraceHeader — (String)

        An X-Ray trace header, which is an http header (X-Amzn-Trace-Id) that contains the trace-id associated with the event.

        To learn more about X-Ray trace headers, see Tracing header in the X-Ray Developer Guide.

    • EndpointId — (String)

      The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is abcde.veo.

      When using Java, you must include auth-crt on the class path.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • FailedEntryCount — (Integer)

        The number of failed entries.

      • Entries — (Array<map>)

        The successfully and unsuccessfully ingested events results. If the ingestion was successful, the entry has the event ID in it. Otherwise, you can use the error code and error message to identify the problem with the entry.

        For each record, the index of the response element is the same as the index in the request array.

        • EventId — (String)

          The ID of the event.

        • ErrorCode — (String)

          The error code that indicates why the event submission failed.

          Retryable errors include:

          • InternalFailure

            The request processing has failed because of an unknown error, exception or failure.

          • ThrottlingException

            The request was denied due to request throttling.

          Non-retryable errors include:

          • AccessDeniedException

            You do not have sufficient access to perform this action.

          • InvalidAccountIdException

            The account ID provided is not valid.

          • InvalidArgument

            A specified parameter is not valid.

          • MalformedDetail

            The JSON provided is not valid.

          • RedactionFailure

            Redacting the CloudTrail event failed.

          • NotAuthorizedForSourceException

            You do not have permissions to publish events with this source onto this event bus.

          • NotAuthorizedForDetailTypeException

            You do not have permissions to publish events with this detail type onto this event bus.

        • ErrorMessage — (String)

          The error message that explains why the event submission failed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putPartnerEvents(params = {}, callback) ⇒ AWS.Request

This is used by SaaS partners to write events to a customer's partner event bus. Amazon Web Services customers do not use this operation.

For information on calculating event batch size, see Calculating EventBridge PutEvents event entry size in the EventBridge User Guide.

Service Reference:

Examples:

Calling the putPartnerEvents operation

var params = {
  Entries: [ /* required */
    {
      Detail: 'STRING_VALUE',
      DetailType: 'STRING_VALUE',
      Resources: [
        'STRING_VALUE',
        /* more items */
      ],
      Source: 'STRING_VALUE',
      Time: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
    },
    /* more items */
  ]
};
eventbridge.putPartnerEvents(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Entries — (Array<map>)

      The list of events to write to the event bus.

      • Time — (Date)

        The date and time of the event.

      • Source — (String)

        The event source that is generating the entry.

        Note: Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.
      • Resources — (Array<String>)

        Amazon Web Services resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.

      • DetailType — (String)

        A free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.

        Note: Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.
      • Detail — (String)

        A valid JSON string. There is no other schema imposed. The JSON string may contain fields and nested sub-objects.

        Note: Detail, DetailType, and Source are required for EventBridge to successfully send an event to an event bus. If you include event entries in a request that do not include each of those properties, EventBridge fails that entry. If you submit a request in which none of the entries have each of these properties, EventBridge fails the entire request.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • FailedEntryCount — (Integer)

        The number of events from this operation that could not be written to the partner event bus.

      • Entries — (Array<map>)

        The results for each event entry the partner submitted in this request. If the event was successfully submitted, the entry has the event ID in it. Otherwise, you can use the error code and error message to identify the problem with the entry.

        For each record, the index of the response element is the same as the index in the request array.

        • EventId — (String)

          The ID of the event.

        • ErrorCode — (String)

          The error code that indicates why the event submission failed.

        • ErrorMessage — (String)

          The error message that explains why the event submission failed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putPermission(params = {}, callback) ⇒ AWS.Request

Running PutPermission permits the specified Amazon Web Services account or Amazon Web Services organization to put events to the specified event bus. Amazon EventBridge (CloudWatch Events) rules in your account are triggered by these events arriving to an event bus in your account.

For another account to send events to your account, that external account must have an EventBridge rule with your account's event bus as a target.

To enable multiple Amazon Web Services accounts to put events to your event bus, run PutPermission once for each of these accounts. Or, if all the accounts are members of the same Amazon Web Services organization, you can run PutPermission once specifying Principal as "*" and specifying the Amazon Web Services organization ID in Condition, to grant permissions to all accounts in that organization.

If you grant permissions using an organization, then accounts in that organization must specify a RoleArn with proper permissions when they use PutTarget to add your account's event bus as a target. For more information, see Sending and Receiving Events Between Amazon Web Services Accounts in the Amazon EventBridge User Guide.

The permission policy on the event bus cannot exceed 10 KB in size.

Service Reference:

Examples:

Calling the putPermission operation

var params = {
  Action: 'STRING_VALUE',
  Condition: {
    Key: 'STRING_VALUE', /* required */
    Type: 'STRING_VALUE', /* required */
    Value: 'STRING_VALUE' /* required */
  },
  EventBusName: 'STRING_VALUE',
  Policy: 'STRING_VALUE',
  Principal: 'STRING_VALUE',
  StatementId: 'STRING_VALUE'
};
eventbridge.putPermission(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EventBusName — (String)

      The name of the event bus associated with the rule. If you omit this, the default event bus is used.

    • Action — (String)

      The action that you are enabling the other account to perform.

    • Principal — (String)

      The 12-digit Amazon Web Services account ID that you are permitting to put events to your default event bus. Specify "" to permit any account to put events to your default event bus.

      If you specify "" without specifying Condition, avoid creating rules that may match undesirable events. To create more secure rules, make sure that the event pattern for each rule contains an account field with a specific account ID from which to receive events. Rules with an account field do not match any events sent from other accounts.

    • StatementId — (String)

      An identifier string for the external account that you are granting permissions to. If you later want to revoke the permission for this external account, specify this StatementId when you run RemovePermission.

      Note: Each StatementId must be unique.
    • Condition — (map)

      This parameter enables you to limit the permission to accounts that fulfill a certain condition, such as being a member of a certain Amazon Web Services organization. For more information about Amazon Web Services Organizations, see What Is Amazon Web Services Organizations in the Amazon Web Services Organizations User Guide.

      If you specify Condition with an Amazon Web Services organization ID, and specify "*" as the value for Principal, you grant permission to all the accounts in the named organization.

      The Condition is a JSON string which must contain Type, Key, and Value fields.

      • Typerequired — (String)

        Specifies the type of condition. Currently the only supported value is StringEquals.

      • Keyrequired — (String)

        Specifies the key for the condition. Currently the only supported key is aws:PrincipalOrgID.

      • Valuerequired — (String)

        Specifies the value for the key. Currently, this must be the ID of the organization.

    • Policy — (String)

      A JSON string that describes the permission policy statement. You can include a Policy parameter in the request instead of using the StatementId, Action, Principal, or Condition parameters.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putRule(params = {}, callback) ⇒ AWS.Request

Creates or updates the specified rule. Rules are enabled by default, or based on value of the state. You can disable a rule using DisableRule.

A single rule watches for events from a single event bus. Events generated by Amazon Web Services services go to your account's default event bus. Events generated by SaaS partner services or applications go to the matching partner event bus. If you have custom applications or services, you can specify whether their events go to your default event bus or a custom event bus that you have created. For more information, see CreateEventBus.

If you are updating an existing rule, the rule is replaced with what you specify in this PutRule command. If you omit arguments in PutRule, the old values for those arguments are not kept. Instead, they are replaced with null values.

When you create or update a rule, incoming events might not immediately start matching to new or updated rules. Allow a short period of time for changes to take effect.

A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can have both an EventPattern and a ScheduleExpression, in which case the rule triggers on matching events as well as on a schedule.

When you initially create a rule, you can optionally assign one or more tags to the rule. Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only rules with certain tag values. To use the PutRule operation and assign tags, you must have both the events:PutRule and events:TagResource permissions.

If you are updating an existing rule, any tags you specify in the PutRule operation are ignored. To update the tags of an existing rule, use TagResource and UntagResource.

Most services in Amazon Web Services treat : or / as the same character in Amazon Resource Names (ARNs). However, EventBridge uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.

In EventBridge, it is possible to create rules that lead to infinite loops, where a rule is fired repeatedly. For example, a rule might detect that ACLs have changed on an S3 bucket, and trigger software to change them to the desired state. If the rule is not written carefully, the subsequent change to the ACLs fires the rule again, creating an infinite loop.

To prevent this, write the rules so that the triggered actions do not re-fire the same rule. For example, your rule could fire only if ACLs are found to be in a bad state, instead of after any change.

An infinite loop can quickly cause higher than expected charges. We recommend that you use budgeting, which alerts you when charges exceed your specified limit. For more information, see Managing Your Costs with Budgets.

Service Reference:

Examples:

Calling the putRule operation

var params = {
  Name: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  EventBusName: 'STRING_VALUE',
  EventPattern: 'STRING_VALUE',
  RoleArn: 'STRING_VALUE',
  ScheduleExpression: 'STRING_VALUE',
  State: ENABLED | DISABLED | ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS,
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
eventbridge.putRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the rule that you are creating or updating.

    • ScheduleExpression — (String)

      The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 minutes)".

    • EventPattern — (String)

      The event pattern. For more information, see Amazon EventBridge event patterns in the Amazon EventBridge User Guide .

    • State — (String)

      The state of the rule.

      Valid values include:

      • DISABLED: The rule is disabled. EventBridge does not match any events against the rule.

      • ENABLED: The rule is enabled. EventBridge matches events against the rule, except for Amazon Web Services management events delivered through CloudTrail.

      • ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS: The rule is enabled for all events, including Amazon Web Services management events delivered through CloudTrail.

        Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the Amazon EventBridge User Guide .

        This value is only valid for rules on the default event bus or custom event buses. It does not apply to partner event buses.

      Possible values include:
      • "ENABLED"
      • "DISABLED"
      • "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS"
    • Description — (String)

      A description of the rule.

    • RoleArn — (String)

      The Amazon Resource Name (ARN) of the IAM role associated with the rule.

      If you're setting an event bus in another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a RoleArn with proper permissions in the Target structure, instead of here in this parameter.

    • Tags — (Array<map>)

      The list of key-value pairs to associate with the rule.

      • Keyrequired — (String)

        A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.

      • Valuerequired — (String)

        The value for the specified tag key.

    • EventBusName — (String)

      The name or ARN of the event bus to associate with this rule. If you omit this, the default event bus is used.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • RuleArn — (String)

        The Amazon Resource Name (ARN) of the rule.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putTargets(params = {}, callback) ⇒ AWS.Request

Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule.

Targets are the resources that are invoked when a rule is triggered.

The maximum number of entries per request is 10.

Note: Each rule can have up to five (5) targets associated with it at one time.

For a list of services you can configure as targets for events, see EventBridge targets in the Amazon EventBridge User Guide .

Creating rules with built-in targets is supported only in the Amazon Web Services Management Console. The built-in targets are:

  • Amazon EBS CreateSnapshot API call

  • Amazon EC2 RebootInstances API call

  • Amazon EC2 StopInstances API call

  • Amazon EC2 TerminateInstances API call

For some target types, PutTargets provides target-specific parameters. If the target is a Kinesis data stream, you can optionally specify which shard the event goes to by using the KinesisParameters argument. To invoke a command on multiple EC2 instances with one rule, you can use the RunCommandParameters field.

To be able to make API calls against the resources that you own, Amazon EventBridge needs the appropriate permissions:

  • For Lambda and Amazon SNS resources, EventBridge relies on resource-based policies.

  • For EC2 instances, Kinesis Data Streams, Step Functions state machines and API Gateway APIs, EventBridge relies on IAM roles that you specify in the RoleARN argument in PutTargets.

For more information, see Authentication and Access Control in the Amazon EventBridge User Guide .

If another Amazon Web Services account is in the same region and has granted you permission (using PutPermission), you can send events to that account. Set that account's event bus as a target of the rules in your account. To send the matched events to the other account, specify that account's event bus as the Arn value when you run PutTargets. If your account sends events to another account, your account is charged for each sent event. Each event sent to another account is charged as a custom event. The account receiving the event is not charged. For more information, see Amazon EventBridge Pricing.

Note: Input, InputPath, and InputTransformer are not available with PutTarget if the target is an event bus of a different Amazon Web Services account.

If you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a RoleArn with proper permissions in the Target structure. For more information, see Sending and Receiving Events Between Amazon Web Services Accounts in the Amazon EventBridge User Guide.

Note: If you have an IAM role on a cross-account event bus target, a PutTargets call without a role on the same target (same Id and Arn) will not remove the role.

For more information about enabling cross-account events, see PutPermission.

Input, InputPath, and InputTransformer are mutually exclusive and optional parameters of a target. When a rule is triggered due to a matched event:

  • If none of the following arguments are specified for a target, then the entire event is passed to the target in JSON format (unless the target is Amazon EC2 Run Command or Amazon ECS task, in which case nothing from the event is passed to the target).

  • If Input is specified in the form of valid JSON, then the matched event is overridden with this constant.

  • If InputPath is specified in the form of JSONPath (for example, $.detail), then only the part of the event specified in the path is passed to the target (for example, only the detail part of the event is passed).

  • If InputTransformer is specified, then one or more specified JSONPaths are extracted from the event and used as values in a template that you specify as the input to the target.

When you specify InputPath or InputTransformer, you must use JSON dot notation, not bracket notation.

When you add targets to a rule and the associated rule triggers soon after, new or updated targets might not be immediately invoked. Allow a short period of time for changes to take effect.

This action can partially fail if too many requests are made at the same time. If that happens, FailedEntryCount is non-zero in the response and each entry in FailedEntries provides the ID of the failed target and the error code.

Service Reference:

Examples:

Calling the putTargets operation

var params = {
  Rule: 'STRING_VALUE', /* required */
  Targets: [ /* required */
    {
      Arn: 'STRING_VALUE', /* required */
      Id: 'STRING_VALUE', /* required */
      AppSyncParameters: {
        GraphQLOperation: 'STRING_VALUE'
      },
      BatchParameters: {
        JobDefinition: 'STRING_VALUE', /* required */
        JobName: 'STRING_VALUE', /* required */
        ArrayProperties: {
          Size: 'NUMBER_VALUE'
        },
        RetryStrategy: {
          Attempts: 'NUMBER_VALUE'
        }
      },
      DeadLetterConfig: {
        Arn: 'STRING_VALUE'
      },
      EcsParameters: {
        TaskDefinitionArn: 'STRING_VALUE', /* required */
        CapacityProviderStrategy: [
          {
            capacityProvider: 'STRING_VALUE', /* required */
            base: 'NUMBER_VALUE',
            weight: 'NUMBER_VALUE'
          },
          /* more items */
        ],
        EnableECSManagedTags: true || false,
        EnableExecuteCommand: true || false,
        Group: 'STRING_VALUE',
        LaunchType: EC2 | FARGATE | EXTERNAL,
        NetworkConfiguration: {
          awsvpcConfiguration: {
            Subnets: [ /* required */
              'STRING_VALUE',
              /* more items */
            ],
            AssignPublicIp: ENABLED | DISABLED,
            SecurityGroups: [
              'STRING_VALUE',
              /* more items */
            ]
          }
        },
        PlacementConstraints: [
          {
            expression: 'STRING_VALUE',
            type: distinctInstance | memberOf
          },
          /* more items */
        ],
        PlacementStrategy: [
          {
            field: 'STRING_VALUE',
            type: random | spread | binpack
          },
          /* more items */
        ],
        PlatformVersion: 'STRING_VALUE',
        PropagateTags: TASK_DEFINITION,
        ReferenceId: 'STRING_VALUE',
        Tags: [
          {
            Key: 'STRING_VALUE', /* required */
            Value: 'STRING_VALUE' /* required */
          },
          /* more items */
        ],
        TaskCount: 'NUMBER_VALUE'
      },
      HttpParameters: {
        HeaderParameters: {
          '<HeaderKey>': 'STRING_VALUE',
          /* '<HeaderKey>': ... */
        },
        PathParameterValues: [
          'STRING_VALUE',
          /* more items */
        ],
        QueryStringParameters: {
          '<QueryStringKey>': 'STRING_VALUE',
          /* '<QueryStringKey>': ... */
        }
      },
      Input: 'STRING_VALUE',
      InputPath: 'STRING_VALUE',
      InputTransformer: {
        InputTemplate: 'STRING_VALUE', /* required */
        InputPathsMap: {
          '<InputTransformerPathKey>': 'STRING_VALUE',
          /* '<InputTransformerPathKey>': ... */
        }
      },
      KinesisParameters: {
        PartitionKeyPath: 'STRING_VALUE' /* required */
      },
      RedshiftDataParameters: {
        Database: 'STRING_VALUE', /* required */
        DbUser: 'STRING_VALUE',
        SecretManagerArn: 'STRING_VALUE',
        Sql: 'STRING_VALUE',
        Sqls: [
          'STRING_VALUE',
          /* more items */
        ],
        StatementName: 'STRING_VALUE',
        WithEvent: true || false
      },
      RetryPolicy: {
        MaximumEventAgeInSeconds: 'NUMBER_VALUE',
        MaximumRetryAttempts: 'NUMBER_VALUE'
      },
      RoleArn: 'STRING_VALUE',
      RunCommandParameters: {
        RunCommandTargets: [ /* required */
          {
            Key: 'STRING_VALUE', /* required */
            Values: [ /* required */
              'STRING_VALUE',
              /* more items */
            ]
          },
          /* more items */
        ]
      },
      SageMakerPipelineParameters: {
        PipelineParameterList: [
          {
            Name: 'STRING_VALUE', /* required */
            Value: 'STRING_VALUE' /* required */
          },
          /* more items */
        ]
      },
      SqsParameters: {
        MessageGroupId: 'STRING_VALUE'
      }
    },
    /* more items */
  ],
  EventBusName: 'STRING_VALUE'
};
eventbridge.putTargets(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Rule — (String)

      The name of the rule.

    • EventBusName — (String)

      The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

    • Targets — (Array<map>)

      The targets to update or add to the rule.

      • Idrequired — (String)

        The ID of the target within the specified rule. Use this ID to reference the target when updating the rule. We recommend using a memorable and unique string.

      • Arnrequired — (String)

        The Amazon Resource Name (ARN) of the target.

      • RoleArn — (String)

        The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.

      • Input — (String)

        Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see The JavaScript Object Notation (JSON) Data Interchange Format.

      • InputPath — (String)

        The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You may use JSON dot notation or bracket notation. For more information about JSON paths, see JSONPath.

      • InputTransformer — (map)

        Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.

        • InputPathsMap — (map<String>)

          Map of JSON paths to be extracted from the event. You can then insert these in the template in InputTemplate to produce the output you want to be sent to the target.

          InputPathsMap is an array key-value pairs, where each value is a valid JSON path. You can have as many as 100 key-value pairs. You must use JSON dot notation, not bracket notation.

          The keys cannot start with "Amazon Web Services."

        • InputTemplaterequired — (String)

          Input template where you specify placeholders that will be filled with the values of the keys from InputPathsMap to customize the data sent to the target. Enclose each InputPathsMaps value in brackets: <value>

          If InputTemplate is a JSON object (surrounded by curly braces), the following restrictions apply:

          • The placeholder cannot be used as an object key.

          The following example shows the syntax for using InputPathsMap and InputTemplate.

          "InputTransformer":

          {

          "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},

          "InputTemplate": "<instance> is in state <status>"

          }

          To have the InputTemplate include quote marks within a JSON string, escape each quote marks with a slash, as in the following example:

          "InputTransformer":

          {

          "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},

          "InputTemplate": "<instance> is in state \"<status>\""

          }

          The InputTemplate can also be valid JSON with varibles in quotes or out, as in the following example:

          "InputTransformer":

          {

          "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"},

          "InputTemplate": '{"myInstance": <instance>,"myStatus": "<instance> is in state \"<status>\""}'

          }

      • KinesisParameters — (map)

        The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream. If you do not include this parameter, the default is to use the eventId as the partition key.

        • PartitionKeyPathrequired — (String)

          The JSON path to be extracted from the event and used as the partition key. For more information, see Amazon Kinesis Streams Key Concepts in the Amazon Kinesis Streams Developer Guide.

      • RunCommandParameters — (map)

        Parameters used when you are using the rule to invoke Amazon EC2 Run Command.

        • RunCommandTargetsrequired — (Array<map>)

          Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.

          • Keyrequired — (String)

            Can be either tag: tag-key or InstanceIds.

          • Valuesrequired — (Array<String>)

            If Key is tag: tag-key, Values is a list of tag values. If Key is InstanceIds, Values is a list of Amazon EC2 instance IDs.

      • EcsParameters — (map)

        Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see Task Definitions in the Amazon EC2 Container Service Developer Guide.

        • TaskDefinitionArnrequired — (String)

          The ARN of the task definition to use if the event target is an Amazon ECS task.

        • TaskCount — (Integer)

          The number of tasks to create based on TaskDefinition. The default is 1.

        • LaunchType — (String)

          Specifies the launch type on which your task is running. The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The FARGATE value is supported only in the Regions where Fargate with Amazon ECS is supported. For more information, see Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide.

          Possible values include:
          • "EC2"
          • "FARGATE"
          • "EXTERNAL"
        • NetworkConfiguration — (map)

          Use this structure if the Amazon ECS task uses the awsvpc network mode. This structure specifies the VPC subnets and security groups associated with the task, and whether a public IP address is to be used. This structure is required if LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks.

          If you specify NetworkConfiguration when the target ECS task does not use the awsvpc network mode, the task fails.

          • awsvpcConfiguration — (map)

            Use this structure to specify the VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.

            • Subnetsrequired — (Array<String>)

              Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.

            • SecurityGroups — (Array<String>)

              Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.

            • AssignPublicIp — (String)

              Specifies whether the task's elastic network interface receives a public IP address. You can specify ENABLED only when LaunchType in EcsParameters is set to FARGATE.

              Possible values include:
              • "ENABLED"
              • "DISABLED"
        • PlatformVersion — (String)

          Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as 1.1.0.

          This structure is used only if LaunchType is FARGATE. For more information about valid platform versions, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.

        • Group — (String)

          Specifies an ECS task group for the task. The maximum length is 255 characters.

        • CapacityProviderStrategy — (Array<map>)

          The capacity provider strategy to use for the task.

          If a capacityProviderStrategy is specified, the launchType parameter must be omitted. If no capacityProviderStrategy or launchType is specified, the defaultCapacityProviderStrategy for the cluster is used.

          • capacityProviderrequired — (String)

            The short name of the capacity provider.

          • weight — (Integer)

            The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight value is taken into consideration after the base value, if defined, is satisfied.

          • base — (Integer)

            The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.

        • EnableECSManagedTags — (Boolean)

          Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.

        • EnableExecuteCommand — (Boolean)

          Whether or not to enable the execute command functionality for the containers in this task. If true, this enables execute command functionality on all containers in the task.

        • PlacementConstraints — (Array<map>)

          An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).

          • type — (String)

            The type of constraint. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf to restrict the selection to a group of valid candidates.

            Possible values include:
            • "distinctInstance"
            • "memberOf"
          • expression — (String)

            A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is distinctInstance. To learn more, see Cluster Query Language in the Amazon Elastic Container Service Developer Guide.

        • PlacementStrategy — (Array<map>)

          The placement strategy objects to use for the task. You can specify a maximum of five strategy rules per task.

          • type — (String)

            The type of placement strategy. The random placement strategy randomly places tasks on available candidates. The spread placement strategy spreads placement across available candidates evenly based on the field parameter. The binpack strategy places tasks on available candidates that have the least available amount of the resource that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task).

            Possible values include:
            • "random"
            • "spread"
            • "binpack"
          • field — (String)

            The field to apply the placement strategy against. For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance, such as attribute:ecs.availability-zone. For the binpack placement strategy, valid values are cpu and memory. For the random placement strategy, this field is not used.

        • PropagateTags — (String)

          Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.

          Possible values include:
          • "TASK_DEFINITION"
        • ReferenceId — (String)

          The reference ID to use for the task.

        • Tags — (Array<map>)

          The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.

          • Keyrequired — (String)

            A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.

          • Valuerequired — (String)

            The value for the specified tag key.

      • BatchParameters — (map)

        If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see Jobs in the Batch User Guide.

        • JobDefinitionrequired — (String)

          The ARN or name of the job definition to use if the event target is an Batch job. This job definition must already exist.

        • JobNamerequired — (String)

          The name to use for this execution of the job, if the target is an Batch job.

        • ArrayProperties — (map)

          The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an Batch job.

          • Size — (Integer)

            The size of the array, if this is an array batch job. Valid values are integers between 2 and 10,000.

        • RetryStrategy — (map)

          The retry strategy to use for failed jobs, if the target is an Batch job. The retry strategy is the number of times to retry the failed job execution. Valid values are 1–10. When you specify a retry strategy here, it overrides the retry strategy defined in the job definition.

          • Attempts — (Integer)

            The number of times to attempt to retry, if the job fails. Valid values are 1–10.

      • SqsParameters — (map)

        Contains the message group ID to use when the target is a FIFO queue.

        If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.

        • MessageGroupId — (String)

          The FIFO message group ID to use as the target.

      • HttpParameters — (map)

        Contains the HTTP parameters to use when the target is a API Gateway endpoint or EventBridge ApiDestination.

        If you specify an API Gateway API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence.

        • PathParameterValues — (Array<String>)

          The path parameter values to be used to populate API Gateway API or EventBridge ApiDestination path wildcards ("*").

        • HeaderParameters — (map<String>)

          The headers that need to be sent as part of request invoking the API Gateway API or EventBridge ApiDestination.

        • QueryStringParameters — (map<String>)

          The query string keys/values that need to be sent as part of request invoking the API Gateway API or EventBridge ApiDestination.

      • RedshiftDataParameters — (map)

        Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.

        If you specify a Amazon Redshift Cluster as a Target, you can use this to specify parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.

        • SecretManagerArn — (String)

          The name or ARN of the secret that enables access to the database. Required when authenticating using Amazon Web Services Secrets Manager.

        • Databaserequired — (String)

          The name of the database. Required when authenticating using temporary credentials.

        • DbUser — (String)

          The database user name. Required when authenticating using temporary credentials.

        • Sql — (String)

          The SQL statement text to run.

        • StatementName — (String)

          The name of the SQL statement. You can name the SQL statement when you create it to identify the query.

        • WithEvent — (Boolean)

          Indicates whether to send an event back to EventBridge after the SQL statement runs.

        • Sqls — (Array<String>)

          One or more SQL statements to run. The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.

      • SageMakerPipelineParameters — (map)

        Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building Pipeline.

        If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.

        • PipelineParameterList — (Array<map>)

          List of Parameter names and values for SageMaker Model Building Pipeline execution.

          • Namerequired — (String)

            Name of parameter to start execution of a SageMaker Model Building Pipeline.

          • Valuerequired — (String)

            Value of parameter to start execution of a SageMaker Model Building Pipeline.

      • DeadLetterConfig — (map)

        The DeadLetterConfig that defines the target queue to send dead-letter queue events to.

        • Arn — (String)

          The ARN of the SQS queue specified as the target for the dead-letter queue.

      • RetryPolicy — (map)

        The RetryPolicy object that contains the retry policy configuration to use for the dead-letter queue.

        • MaximumRetryAttempts — (Integer)

          The maximum number of retry attempts to make before the request fails. Retry attempts continue until either the maximum number of attempts is made or until the duration of the MaximumEventAgeInSeconds is met.

        • MaximumEventAgeInSeconds — (Integer)

          The maximum amount of time, in seconds, to continue to make retry attempts.

      • AppSyncParameters — (map)

        Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.

        • GraphQLOperation — (String)

          The GraphQL operation; that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service.

          For more information, see Operations in the AppSync User Guide.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • FailedEntryCount — (Integer)

        The number of failed entries.

      • FailedEntries — (Array<map>)

        The failed target entries.

        • TargetId — (String)

          The ID of the target.

        • ErrorCode — (String)

          The error code that indicates why the target addition failed. If the value is ConcurrentModificationException, too many requests were made at the same time.

        • ErrorMessage — (String)

          The error message that explains why the target addition failed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

removePermission(params = {}, callback) ⇒ AWS.Request

Revokes the permission of another Amazon Web Services account to be able to put events to the specified event bus. Specify the account to revoke by the StatementId value that you associated with the account when you granted it permission with PutPermission. You can find the StatementId by using DescribeEventBus.

Service Reference:

Examples:

Calling the removePermission operation

var params = {
  EventBusName: 'STRING_VALUE',
  RemoveAllPermissions: true || false,
  StatementId: 'STRING_VALUE'
};
eventbridge.removePermission(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StatementId — (String)

      The statement ID corresponding to the account that is no longer allowed to put events to the default event bus.

    • RemoveAllPermissions — (Boolean)

      Specifies whether to remove all permissions.

    • EventBusName — (String)

      The name of the event bus to revoke permissions for. If you omit this, the default event bus is used.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

removeTargets(params = {}, callback) ⇒ AWS.Request

Removes the specified targets from the specified rule. When the rule is triggered, those targets are no longer be invoked.

Note: A successful execution of RemoveTargets doesn't guarantee all targets are removed from the rule, it means that the target(s) listed in the request are removed.

When you remove a target, when the associated rule triggers, removed targets might continue to be invoked. Allow a short period of time for changes to take effect.

This action can partially fail if too many requests are made at the same time. If that happens, FailedEntryCount is non-zero in the response and each entry in FailedEntries provides the ID of the failed target and the error code.

The maximum number of entries per request is 10.

Service Reference:

Examples:

Calling the removeTargets operation

var params = {
  Ids: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  Rule: 'STRING_VALUE', /* required */
  EventBusName: 'STRING_VALUE',
  Force: true || false
};
eventbridge.removeTargets(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Rule — (String)

      The name of the rule.

    • EventBusName — (String)

      The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.

    • Ids — (Array<String>)

      The IDs of the targets to remove from the rule.

    • Force — (Boolean)

      If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify Force as True to remove targets. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • FailedEntryCount — (Integer)

        The number of failed entries.

      • FailedEntries — (Array<map>)

        The failed target entries.

        • TargetId — (String)

          The ID of the target.

        • ErrorCode — (String)

          The error code that indicates why the target removal failed. If the value is ConcurrentModificationException, too many requests were made at the same time.

        • ErrorMessage — (String)

          The error message that explains why the target removal failed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startReplay(params = {}, callback) ⇒ AWS.Request

Starts the specified replay. Events are not necessarily replayed in the exact same order that they were added to the archive. A replay processes events to replay based on the time in the event, and replays them using 1 minute intervals. If you specify an EventStartTime and an EventEndTime that covers a 20 minute time range, the events are replayed from the first minute of that 20 minute range first. Then the events from the second minute are replayed. You can use DescribeReplay to determine the progress of a replay. The value returned for EventLastReplayedTime indicates the time within the specified time range associated with the last event replayed.

Service Reference:

Examples:

Calling the startReplay operation

var params = {
  Destination: { /* required */
    Arn: 'STRING_VALUE', /* required */
    FilterArns: [
      'STRING_VALUE',
      /* more items */
    ]
  },
  EventEndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  EventSourceArn: 'STRING_VALUE', /* required */
  EventStartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  ReplayName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE'
};
eventbridge.startReplay(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ReplayName — (String)

      The name of the replay to start.

    • Description — (String)

      A description for the replay to start.

    • EventSourceArn — (String)

      The ARN of the archive to replay events from.

    • EventStartTime — (Date)

      A time stamp for the time to start replaying events. Only events that occurred between the EventStartTime and EventEndTime are replayed.

    • EventEndTime — (Date)

      A time stamp for the time to stop replaying events. Only events that occurred between the EventStartTime and EventEndTime are replayed.

    • Destination — (map)

      A ReplayDestination object that includes details about the destination for the replay.

      • Arnrequired — (String)

        The ARN of the event bus to replay event to. You can replay events only to the event bus specified to create the archive.

      • FilterArns — (Array<String>)

        A list of ARNs for rules to replay events to.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ReplayArn — (String)

        The ARN of the replay.

      • State — (String)

        The state of the replay.

        Possible values include:
        • "STARTING"
        • "RUNNING"
        • "CANCELLING"
        • "COMPLETED"
        • "CANCELLED"
        • "FAILED"
      • StateReason — (String)

        The reason that the replay is in the state.

      • ReplayStartTime — (Date)

        The time at which the replay started.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Assigns one or more tags (key-value pairs) to the specified EventBridge resource. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. In EventBridge, rules and event buses can be tagged.

Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.

You can use the TagResource action with a resource that already has tags. If you specify a new tag key, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag.

You can associate as many as 50 tags with a resource.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  Tags: [ /* required */
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
eventbridge.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceARN — (String)

      The ARN of the EventBridge resource that you're adding tags to.

    • Tags — (Array<map>)

      The list of key-value pairs to associate with the resource.

      • Keyrequired — (String)

        A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.

      • Valuerequired — (String)

        The value for the specified tag key.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

testEventPattern(params = {}, callback) ⇒ AWS.Request

Tests whether the specified event pattern matches the provided event.

Most services in Amazon Web Services treat : or / as the same character in Amazon Resource Names (ARNs). However, EventBridge uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.

Service Reference:

Examples:

Calling the testEventPattern operation

var params = {
  Event: 'STRING_VALUE', /* required */
  EventPattern: 'STRING_VALUE' /* required */
};
eventbridge.testEventPattern(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EventPattern — (String)

      The event pattern. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide .

    • Event — (String)

      The event, in JSON format, to test against the event pattern. The JSON must follow the format specified in Amazon Web Services Events, and the following fields are mandatory:

      • id

      • account

      • source

      • time

      • region

      • resources

      • detail-type

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Result — (Boolean)

        Indicates whether the event matches the event pattern.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes one or more tags from the specified EventBridge resource. In Amazon EventBridge (CloudWatch Events), rules and event buses can be tagged.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
eventbridge.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceARN — (String)

      The ARN of the EventBridge resource from which you are removing tags.

    • TagKeys — (Array<String>)

      The list of tag keys to remove from the resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateApiDestination(params = {}, callback) ⇒ AWS.Request

Updates an API destination.

Service Reference:

Examples:

Calling the updateApiDestination operation

var params = {
  Name: 'STRING_VALUE', /* required */
  ConnectionArn: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  HttpMethod: POST | GET | HEAD | OPTIONS | PUT | PATCH | DELETE,
  InvocationEndpoint: 'STRING_VALUE',
  InvocationRateLimitPerSecond: 'NUMBER_VALUE'
};
eventbridge.updateApiDestination(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the API destination to update.

    • Description — (String)

      The name of the API destination to update.

    • ConnectionArn — (String)

      The ARN of the connection to use for the API destination.

    • InvocationEndpoint — (String)

      The URL to the endpoint to use for the API destination.

    • HttpMethod — (String)

      The method to use for the API destination.

      Possible values include:
      • "POST"
      • "GET"
      • "HEAD"
      • "OPTIONS"
      • "PUT"
      • "PATCH"
      • "DELETE"
    • InvocationRateLimitPerSecond — (Integer)

      The maximum number of invocations per second to send to the API destination.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiDestinationArn — (String)

        The ARN of the API destination that was updated.

      • ApiDestinationState — (String)

        The state of the API destination that was updated.

        Possible values include:
        • "ACTIVE"
        • "INACTIVE"
      • CreationTime — (Date)

        A time stamp for the time that the API destination was created.

      • LastModifiedTime — (Date)

        A time stamp for the time that the API destination was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateArchive(params = {}, callback) ⇒ AWS.Request

Updates the specified archive.

Service Reference:

Examples:

Calling the updateArchive operation

var params = {
  ArchiveName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  EventPattern: 'STRING_VALUE',
  RetentionDays: 'NUMBER_VALUE'
};
eventbridge.updateArchive(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ArchiveName — (String)

      The name of the archive to update.

    • Description — (String)

      The description for the archive.

    • EventPattern — (String)

      The event pattern to use to filter events sent to the archive.

    • RetentionDays — (Integer)

      The number of days to retain events in the archive.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ArchiveArn — (String)

        The ARN of the archive.

      • State — (String)

        The state of the archive.

        Possible values include:
        • "ENABLED"
        • "DISABLED"
        • "CREATING"
        • "UPDATING"
        • "CREATE_FAILED"
        • "UPDATE_FAILED"
      • StateReason — (String)

        The reason that the archive is in the current state.

      • CreationTime — (Date)

        The time at which the archive was updated.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateConnection(params = {}, callback) ⇒ AWS.Request

Updates settings for a connection.

Service Reference:

Examples:

Calling the updateConnection operation

var params = {
  Name: 'STRING_VALUE', /* required */
  AuthParameters: {
    ApiKeyAuthParameters: {
      ApiKeyName: 'STRING_VALUE',
      ApiKeyValue: 'STRING_VALUE'
    },
    BasicAuthParameters: {
      Password: 'STRING_VALUE',
      Username: 'STRING_VALUE'
    },
    InvocationHttpParameters: {
      BodyParameters: [
        {
          IsValueSecret: true || false,
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ],
      HeaderParameters: [
        {
          IsValueSecret: true || false,
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ],
      QueryStringParameters: [
        {
          IsValueSecret: true || false,
          Key: 'STRING_VALUE',
          Value: 'STRING_VALUE'
        },
        /* more items */
      ]
    },
    OAuthParameters: {
      AuthorizationEndpoint: 'STRING_VALUE',
      ClientParameters: {
        ClientID: 'STRING_VALUE',
        ClientSecret: 'STRING_VALUE'
      },
      HttpMethod: GET | POST | PUT,
      OAuthHttpParameters: {
        BodyParameters: [
          {
            IsValueSecret: true || false,
            Key: 'STRING_VALUE',
            Value: 'STRING_VALUE'
          },
          /* more items */
        ],
        HeaderParameters: [
          {
            IsValueSecret: true || false,
            Key: 'STRING_VALUE',
            Value: 'STRING_VALUE'
          },
          /* more items */
        ],
        QueryStringParameters: [
          {
            IsValueSecret: true || false,
            Key: 'STRING_VALUE',
            Value: 'STRING_VALUE'
          },
          /* more items */
        ]
      }
    }
  },
  AuthorizationType: BASIC | OAUTH_CLIENT_CREDENTIALS | API_KEY,
  Description: 'STRING_VALUE'
};
eventbridge.updateConnection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the connection to update.

    • Description — (String)

      A description for the connection.

    • AuthorizationType — (String)

      The type of authorization to use for the connection.

      Possible values include:
      • "BASIC"
      • "OAUTH_CLIENT_CREDENTIALS"
      • "API_KEY"
    • AuthParameters — (map)

      The authorization parameters to use for the connection.

      • BasicAuthParameters — (map)

        A UpdateConnectionBasicAuthRequestParameters object that contains the authorization parameters for Basic authorization.

        • Username — (String)

          The user name to use for Basic authorization.

        • Password — (String)

          The password associated with the user name to use for Basic authorization.

      • OAuthParameters — (map)

        A UpdateConnectionOAuthRequestParameters object that contains the authorization parameters for OAuth authorization.

        • ClientParameters — (map)

          A UpdateConnectionOAuthClientRequestParameters object that contains the client parameters to use for the connection when OAuth is specified as the authorization type.

          • ClientID — (String)

            The client ID to use for OAuth authorization.

          • ClientSecret — (String)

            The client secret assciated with the client ID to use for OAuth authorization.

        • AuthorizationEndpoint — (String)

          The URL to the authorization endpoint when OAuth is specified as the authorization type.

        • HttpMethod — (String)

          The method used to connect to the HTTP endpoint.

          Possible values include:
          • "GET"
          • "POST"
          • "PUT"
        • OAuthHttpParameters — (map)

          The additional HTTP parameters used for the OAuth authorization request.

          • HeaderParameters — (Array<map>)

            Contains additional header parameters for the connection.

            • Key — (String)

              The key for the parameter.

            • Value — (String)

              The value associated with the key.

            • IsValueSecret — (Boolean)

              Specified whether the value is a secret.

          • QueryStringParameters — (Array<map>)

            Contains additional query string parameters for the connection.

            • Key — (String)

              The key for a query string parameter.

            • Value — (String)

              The value associated with the key for the query string parameter.

            • IsValueSecret — (Boolean)

              Specifies whether the value is secret.

          • BodyParameters — (Array<map>)

            Contains additional body string parameters for the connection.

            • Key — (String)

              The key for the parameter.

            • Value — (String)

              The value associated with the key.

            • IsValueSecret — (Boolean)

              Specified whether the value is secret.

      • ApiKeyAuthParameters — (map)

        A UpdateConnectionApiKeyAuthRequestParameters object that contains the authorization parameters for API key authorization.

        • ApiKeyName — (String)

          The name of the API key to use for authorization.

        • ApiKeyValue — (String)

          The value associated with teh API key to use for authorization.

      • InvocationHttpParameters — (map)

        A ConnectionHttpParameters object that contains the additional parameters to use for the connection.

        • HeaderParameters — (Array<map>)

          Contains additional header parameters for the connection.

          • Key — (String)

            The key for the parameter.

          • Value — (String)

            The value associated with the key.

          • IsValueSecret — (Boolean)

            Specified whether the value is a secret.

        • QueryStringParameters — (Array<map>)

          Contains additional query string parameters for the connection.

          • Key — (String)

            The key for a query string parameter.

          • Value — (String)

            The value associated with the key for the query string parameter.

          • IsValueSecret — (Boolean)

            Specifies whether the value is secret.

        • BodyParameters — (Array<map>)

          Contains additional body string parameters for the connection.

          • Key — (String)

            The key for the parameter.

          • Value — (String)

            The value associated with the key.

          • IsValueSecret — (Boolean)

            Specified whether the value is secret.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ConnectionArn — (String)

        The ARN of the connection that was updated.

      • ConnectionState — (String)

        The state of the connection that was updated.

        Possible values include:
        • "CREATING"
        • "UPDATING"
        • "DELETING"
        • "AUTHORIZED"
        • "DEAUTHORIZED"
        • "AUTHORIZING"
        • "DEAUTHORIZING"
      • CreationTime — (Date)

        A time stamp for the time that the connection was created.

      • LastModifiedTime — (Date)

        A time stamp for the time that the connection was last modified.

      • LastAuthorizedTime — (Date)

        A time stamp for the time that the connection was last authorized.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateEndpoint(params = {}, callback) ⇒ AWS.Request

Update an existing endpoint. For more information about global endpoints, see Making applications Regional-fault tolerant with global endpoints and event replication in the Amazon EventBridge User Guide .

Service Reference:

Examples:

Calling the updateEndpoint operation

var params = {
  Name: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  EventBuses: [
    {
      EventBusArn: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  ReplicationConfig: {
    State: ENABLED | DISABLED
  },
  RoleArn: 'STRING_VALUE',
  RoutingConfig: {
    FailoverConfig: { /* required */
      Primary: { /* required */
        HealthCheck: 'STRING_VALUE' /* required */
      },
      Secondary: { /* required */
        Route: 'STRING_VALUE' /* required */
      }
    }
  }
};
eventbridge.updateEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the endpoint you want to update.

    • Description — (String)

      A description for the endpoint.

    • RoutingConfig — (map)

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

      • FailoverConfigrequired — (map)

        The failover configuration for an endpoint. This includes what triggers failover and what happens when it's triggered.

        • Primaryrequired — (map)

          The main Region of the endpoint.

          • HealthCheckrequired — (String)

            The ARN of the health check used by the endpoint to determine whether failover is triggered.

        • Secondaryrequired — (map)

          The Region that events are routed to when failover is triggered or event replication is enabled.

          • Routerequired — (String)

            Defines the secondary Region.

    • ReplicationConfig — (map)

      Whether event replication was enabled or disabled by this request.

      • State — (String)

        The state of event replication.

        Possible values include:
        • "ENABLED"
        • "DISABLED"
    • EventBuses — (Array<map>)

      Define event buses used for replication.

      • EventBusArnrequired — (String)

        The ARN of the event bus the endpoint is associated with.

    • RoleArn — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Name — (String)

        The name of the endpoint you updated in this request.

      • Arn — (String)

        The ARN of the endpoint you updated in this request.

      • RoutingConfig — (map)

        The routing configuration you updated in this request.

        • FailoverConfigrequired — (map)

          The failover configuration for an endpoint. This includes what triggers failover and what happens when it's triggered.

          • Primaryrequired — (map)

            The main Region of the endpoint.

            • HealthCheckrequired — (String)

              The ARN of the health check used by the endpoint to determine whether failover is triggered.

          • Secondaryrequired — (map)

            The Region that events are routed to when failover is triggered or event replication is enabled.

            • Routerequired — (String)

              Defines the secondary Region.

      • ReplicationConfig — (map)

        Whether event replication was enabled or disabled for the endpoint you updated in this request.

        • State — (String)

          The state of event replication.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
      • EventBuses — (Array<map>)

        The event buses used for replication for the endpoint you updated in this request.

        • EventBusArnrequired — (String)

          The ARN of the event bus the endpoint is associated with.

      • RoleArn — (String)

        The ARN of the role used by event replication for the endpoint you updated in this request.

      • EndpointId — (String)

        The ID of the endpoint you updated in this request.

      • EndpointUrl — (String)

        The URL of the endpoint you updated in this request.

      • State — (String)

        The state of the endpoint you updated in this request.

        Possible values include:
        • "ACTIVE"
        • "CREATING"
        • "UPDATING"
        • "DELETING"
        • "CREATE_FAILED"
        • "UPDATE_FAILED"
        • "DELETE_FAILED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateEventBus(params = {}, callback) ⇒ AWS.Request

Updates the specified event bus.

Service Reference:

Examples:

Calling the updateEventBus operation

var params = {
  DeadLetterConfig: {
    Arn: 'STRING_VALUE'
  },
  Description: 'STRING_VALUE',
  KmsKeyIdentifier: 'STRING_VALUE',
  Name: 'STRING_VALUE'
};
eventbridge.updateEventBus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the event bus.

    • KmsKeyIdentifier — (String)

      The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.

      If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt events on the event bus.

      For more information, see Managing keys in the Key Management Service Developer Guide.

      Note: Archives and schema discovery are not supported for event buses encrypted using a customer managed key. EventBridge returns an error if:
      • You call CreateArchive on an event bus set to use a customer managed key for encryption.
      • You call CreateDiscoverer on an event bus set to use a customer managed key for encryption.
      • You call UpdatedEventBus to set a customer managed key on an event bus with an archives or schema discovery enabled.
      To enable archives or schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see Data encryption in EventBridge in the Amazon EventBridge User Guide.
    • Description — (String)

      The event bus description.

    • DeadLetterConfig — (map)

      Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).

      For more information, see Event retry policy and using dead-letter queues in the EventBridge User Guide.

      • Arn — (String)

        The ARN of the SQS queue specified as the target for the dead-letter queue.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String)

        The event bus Amazon Resource Name (ARN).

      • Name — (String)

        The event bus name.

      • KmsKeyIdentifier — (String)

        The identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified.

        For more information, see Data encryption in EventBridge in the Amazon EventBridge User Guide.

      • Description — (String)

        The event bus description.

      • DeadLetterConfig — (map)

        Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).

        For more information, see Event retry policy and using dead-letter queues in the EventBridge User Guide.

        • Arn — (String)

          The ARN of the SQS queue specified as the target for the dead-letter queue.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.