Class: Aws::EventBridgeV2::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb

Overview

An API client for EventBridgeV2. To construct a client, you need to configure a :region and :credentials.

client = Aws::EventBridgeV2::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []] —

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider) —

    Your AWS credentials used for authentication. This can be any class that includes and implements Aws::CredentialProvider, or instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]

    • The :access_key_id, :secret_access_key, :session_token, and :account_id options.

    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID'].

    • ~/.aws/credentials

    • ~/.aws/config

    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentials or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.

  • :region (required, String) —

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false —

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true —

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :auth_scheme_preference (Array<String>) —

    A list of preferred authentication schemes to use when making a request. Supported values are: sigv4, sigv4a, httpBearerAuth, and noAuth. When set using ENV['AWS_AUTH_SCHEME_PREFERENCE'] or in shared config as auth_scheme_preference, the value should be a comma-separated list.

  • :client_side_monitoring (Boolean) — default: false —

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: "" —

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1" —

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000 —

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher —

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true —

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true —

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy" —

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false —

    When true, the SDK will not prepend the modeled host prefix to the endpoint.

  • :disable_request_compression (Boolean) — default: false —

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP) —

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000 —

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10 —

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60 —

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false —

    When set to true, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean) —

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default —

    The log formatter.

  • :log_level (Symbol) — default: :info —

    The log level to send messages to the :logger at.

  • :logger (Logger) —

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3 —

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default" —

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :request_checksum_calculation (String) — default: "when_supported" —

    Determines when a checksum will be calculated for request payloads. Values are:

    • when_supported - (default) When set, a checksum will be calculated for all request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true and/or a requestAlgorithmMember is modeled.
    • when_required - When set, a checksum will only be calculated for request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true or where a requestAlgorithmMember is modeled and supplied.
  • :request_min_compression_size_bytes (Integer) — default: 10240 —

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :response_checksum_validation (String) — default: "when_supported" —

    Determines when checksum validation will be performed on response payloads. Values are:

    • when_supported - (default) When set, checksum validation is performed on all response payloads of operations modeled with the httpChecksum trait where responseAlgorithms is modeled, except when no modeled checksum algorithms are supported.
    • when_required - When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and the requestValidationModeMember member is set to ENABLED.
  • :retry_backoff (Proc) —

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3 —

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none —

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3 —

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0 —

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy" —

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is the default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - A retry mode that includes all the functionality of standard mode along with automatic client side throttling.

  • :sdk_ua_app_id (String) —

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array) —

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :stub_responses (Boolean) — default: false —

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider —

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider) —

    Your Bearer token used for authentication. This can be any class that includes and implements Aws::TokenProvider, or instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean) —

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean) —

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true —

    When true, request parameters are validated before sending the request.

  • :account_id_endpoint_mode (String) —

    The account ID endpoint mode to use. This can be one of the following values: * preferred - The default behavior. Use the account ID endpoint if available, otherwise use the standard endpoint. * disabled - Never use the account ID endpoint. Only use the standard endpoint. * required - Always use the account ID endpoint. If the account ID cannot be retrieved from credentials, an error is raised.

  • :endpoint_provider (Aws::EventBridgeV2::EndpointProvider) —

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::EventBridgeV2::EndpointParameters.

  • :http_continue_timeout (Float) — default: 1 —

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5 —

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15 —

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String) —

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_read_timeout (Float) — default: 60 —

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false —

    When true, HTTP debug output will be sent to the :logger.

  • :on_chunk_received (Proc) —

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc) —

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true —

    When true, response errors are raised.

  • :ssl_ca_bundle (String) —

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String) —

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_store (String) —

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate) —

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey) —

    Sets a client key when creating http connections.

  • :ssl_timeout (Float) —

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true —

    When true, SSL peer certificates are verified when establishing a connection.



480
481
482
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 480

def initialize(*args)
  super
end

Instance Method Details

#create_event_bus(params = {}) ⇒ Types::CreateEventBusResponse

Creates an event bus. Provisioning is asynchronous: the bus is returned in the CREATING state and transitions to ACTIVE when ready (see the EventBusActive waiter). Retries carrying the same ClientToken are idempotent.

Examples:

Request syntax with placeholder values


resp = client.create_event_bus({
  name: "EventBusName", # required
  description: "Description",
  encryption_configuration: {
    kms_key_identifier: "KmsKeyIdentifier",
  },
  storage_configuration: {
    retention_period_in_days: 1,
  },
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.event_bus_arn #=> String
resp.name #=> String
resp.description #=> String
resp.encryption_configuration.kms_key_identifier #=> String
resp.storage_configuration.retention_period_in_days #=> Integer
resp.storage_configuration.retention_window_start_time #=> Time
resp.state #=> String, one of "CREATING", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "DELETING", "ACTIVE", "DELETE_FAILED"
resp.state_reason #=> String
resp.creation_time #=> Time

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :name (required, String) —

    Name of an event bus. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'. The grammar matches the name segment of EventBusArn (event-busv2//), so every valid name can be represented in the bus's ARN. The same type is used everywhere a bus name appears.

  • :description (String) —

    Free-text description. Used by every resource type that has one: event buses, subscribers, and event sources.

  • :encryption_configuration (Types::EncryptionConfiguration) —

    Encryption configuration for an event bus.

  • :storage_configuration (Types::StorageConfiguration) —

    Event storage configuration for an event bus.

  • :tags (Hash<String,String>) —

    Tags attached to a resource, as key-value pairs.

  • :client_token (String) —

    Unique, case-sensitive identifier that ensures the idempotency of the request. The SDK generates one automatically when the field is omitted.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



564
565
566
567
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 564

def create_event_bus(params = {}, options = {})
  req = build_request(:create_event_bus, params)
  req.send_request(options)
end

#create_event_source(params = {}) ⇒ Types::CreateEventSourceResponse

Creates an EventSource, which forwards events from an origin (an AWS service or another account) onto an event bus. The bus must be ACTIVE. Retries carrying the same ClientToken are idempotent.

Examples:

Request syntax with placeholder values


resp = client.create_event_source({
  name: "EventSourceName", # required
  event_bus_arn: "EventBusArn", # required
  configuration: { # required
    aws_service_events_configuration: {
      aws_service: "AwsServiceSource", # required
      pattern: "AwsServiceEventsSourceConfigurationPatternString",
      on_failure_configuration: {
        arn: "DeadLetterQueueArn",
      },
    },
    partner_events_configuration: {
      partner_event_source_arn: "PartnerEventSourceArn", # required
      pattern: "PartnerEventsSourceConfigurationPatternString",
      partner_bus_kms_key_identifier: "KmsKeyIdentifier",
      on_failure_configuration: {
        arn: "DeadLetterQueueArn",
      },
    },
  },
  description: "Description",
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.event_source_arn #=> String
resp.name #=> String
resp.event_bus_arn #=> String
resp.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "CREATE_FAILED", "UPDATE_FAILED", "DELETING", "DELETE_FAILED"
resp.creation_time #=> Time

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :name (required, String) —

    EventSource name. First character alphanumeric; the rest may add '.', '-', '_'. Names may not begin with the reserved "aws." prefix. The grammar matches the ARN local-name segment in EventSourceArn (event-sourcev2///), mirroring EventBusName, so a name the ARN cannot represent cannot be created.

  • :event_bus_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • :configuration (required, Types::EventSourceConfiguration) —

    Discriminated EventSource configuration. Exactly one variant must be set.

  • :description (String) —

    Free-text description. Used by every resource type that has one: event buses, subscribers, and event sources.

  • :tags (Hash<String,String>) —

    Tags attached to a resource, as key-value pairs.

  • :client_token (String) —

    Unique, case-sensitive identifier that ensures the idempotency of the request. The SDK generates one automatically when the field is omitted.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



652
653
654
655
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 652

def create_event_source(params = {}, options = {})
  req = build_request(:create_event_source, params)
  req.send_request(options)
end

#create_subscriber(params = {}) ⇒ Types::CreateSubscriberResponse

Creates a subscriber on an event bus, which delivers matching events to the configured target. The bus must be ACTIVE. Retries carrying the same ClientToken are idempotent.

Examples:

Request syntax with placeholder values


resp = client.create_subscriber({
  name: "SubscriberName", # required
  event_bus_arn: "EventBusArn", # required
  invoke_configuration: { # required
    role_arn: "RoleArn", # required
    lambda_parameters: {
      invocation_type: "EVENT", # accepts EVENT, REQUEST_RESPONSE
      qualifier: "LambdaParametersQualifierString",
      durable_execution_name: "LambdaParametersDurableExecutionNameString",
      tenant_id: "LambdaParametersTenantIdString",
      invocation_timeout_seconds: "LambdaParametersInvocationTimeoutSecondsString",
    },
    sqs_parameters: {
      message_group_id: "SqsParametersMessageGroupIdString",
      message_deduplication_id: "SqsParametersMessageDeduplicationIdString",
      delay_seconds: "SqsParametersDelaySecondsString",
      message_attributes: {
        "MessageAttributeName" => {
          data_type: "SqsMessageAttributeValueDataTypeString",
          string_value: "String",
          binary_value: "String",
        },
      },
      message_system_attributes: {
        "MessageAttributeName" => {
          data_type: "SqsMessageAttributeValueDataTypeString",
          string_value: "String",
          binary_value: "String",
        },
      },
    },
    sns_parameters: {
      message_group_id: "SnsParametersMessageGroupIdString",
      message_deduplication_id: "SnsParametersMessageDeduplicationIdString",
      subject: "SnsParametersSubjectString",
      message_structure: "SnsParametersMessageStructureString",
      message_attributes: {
        "MessageAttributeName" => {
          data_type: "SnsMessageAttributeValueDataTypeString",
          string_value: "String",
          binary_value: "String",
        },
      },
    },
    kinesis_parameters: {
      partition_key: "KinesisParametersPartitionKeyString",
      explicit_hash_key: "KinesisParametersExplicitHashKeyString",
    },
    step_functions_parameters: {
      invocation_type: "EVENT", # accepts EVENT, REQUEST_RESPONSE
      name: "StepFunctionsParametersNameString",
      trace_header: "StepFunctionsParametersTraceHeaderString",
      invocation_timeout_seconds: "StepFunctionsParametersInvocationTimeoutSecondsString",
    },
    http_parameters: {
      path_parameter_values: ["PathParameter"],
      header_parameters: {
        "HeaderKey" => "HeaderValue",
      },
      query_string_parameters: {
        "QueryStringKey" => "QueryStringValue",
      },
      invocation_timeout_seconds: "String",
    },
    universal_target_parameters: {
      input: "UniversalTargetInput", # required
      invocation_timeout_seconds: "String",
    },
    event_bus_v2_parameters: {
      metadata: {
        "String" => "String",
      },
      system_metadata: {
        event_group_id: "String",
        deduplication_id: "String",
      },
      deduplication_configuration: {
        deduplication_type: "CONTENT_BASED", # required, accepts CONTENT_BASED
      },
    },
    target_arn: "TargetResourceArn", # required
  },
  description: "Description",
  filter_configuration: {
    language: "EVENT_BRIDGE_PATTERN", # accepts EVENT_BRIDGE_PATTERN
    filters: [
      {
        pattern: "EventPattern", # required
        scope: "DATA", # required, accepts DATA, METADATA, SYSTEM_METADATA
      },
    ],
  },
  type: "FIFO", # accepts FIFO, UNORDERED
  starting_position: "LATEST", # accepts LATEST, POINT_IN_TIME
  point_in_time_configuration: {
    point_type: "HORIZON", # required, accepts HORIZON, TIMESTAMP
    starting_point: Time.now,
    end_point: Time.now,
  },
  batch_configuration: {
    max_batch_size: 1,
    max_batch_window_in_seconds: 1,
  },
  transformer: {
    type: "RAW", # accepts RAW, WITH_METADATA, JSONATA
    jsonata_configuration: {
      expression: "JsonataConfigurationExpressionString", # required
    },
  },
  retry_policy: {
    max_retry_attempts: 1,
    max_event_age_in_seconds: 1,
    retry_strategy: "ALL", # accepts ALL
  },
  on_failure_configuration: {
    arn: "DeadLetterQueueArn",
  },
  log_configuration: {
    level: "OFF", # accepts OFF, ERROR, INFO
    include_payload: "FULL", # accepts FULL, ON_ERROR_ONLY
  },
  state: "RUNNING", # accepts RUNNING, STOPPED
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.subscriber_arn #=> String
resp.name #=> String
resp.event_bus_arn #=> String
resp.type #=> String, one of "FIFO", "UNORDERED"
resp.starting_position #=> String, one of "LATEST", "POINT_IN_TIME"
resp.point_in_time_configuration.point_type #=> String, one of "HORIZON", "TIMESTAMP"
resp.point_in_time_configuration.starting_point #=> Time
resp.point_in_time_configuration.end_point #=> Time
resp.state #=> String, one of "RUNNING", "STOPPED"
resp.creation_time #=> Time

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :name (required, String) —

    Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.

  • :event_bus_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • :invoke_configuration (required, Types::InvokeConfiguration) —

    Configuration for how the subscriber invokes its target.

  • :description (String) —

    Free-text description. Used by every resource type that has one: event buses, subscribers, and event sources.

  • :filter_configuration (Types::FilterConfiguration) —

    Configuration for filtering events delivered to a subscriber. On CreateSubscriber, Filters is required and must contain at least one Filter with a non-empty Pattern. On UpdateSubscriber, an empty FilterConfiguration:{} clears the existing filter. Any non-empty shape (including {Language:X} without Filters) must contain a valid Filters list — same contract as CreateSubscriber. A non-empty Filters list overwrites; an omitted FilterConfiguration preserves existing state. All Filters are implicitly ANDed — an event must match every Filter to be delivered.

  • :type (String) —

    Delivery ordering mode of a subscriber: FIFO delivers events in order within an event group; UNORDERED delivers without an ordering guarantee.

  • :starting_position (String) —

    Starting position for a subscriber.

  • :point_in_time_configuration (Types::PointInTimeConfiguration) —

    Point-in-time configuration for a subscriber. Only applicable when StartingPosition is POINT_IN_TIME.

  • :batch_configuration (Types::BatchConfiguration) —

    Batching configuration for a subscriber.

  • :transformer (Types::Transformer) —

    Not applicable to universal (aws-sdk) targets, whose input transformation is UniversalTargetParameters.Input; a Transformer on such a target is rejected.

  • :retry_policy (Types::RetryPolicy) —

    Retry policy for a subscriber.

  • :on_failure_configuration (Types::OnFailureConfiguration) —

    On-failure configuration: where a failed delivery is sent. Shared by the subscriber and the EventSource.

  • :log_configuration (Types::LogConfiguration) —

    Log configuration for a subscriber.

  • :state (String) —

    Customer-controlled run state of a subscriber, set on create or update. Distinct from the bus lifecycle vocabulary, where ACTIVE means "provisioned and healthy". Delivery requires State RUNNING on a subscriber that is not revoked.

  • :tags (Hash<String,String>) —

    Tags attached to a resource, as key-value pairs.

  • :client_token (String) —

    Unique, case-sensitive identifier that ensures the idempotency of the request. The SDK generates one automatically when the field is omitted.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



891
892
893
894
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 891

def create_subscriber(params = {}, options = {})
  req = build_request(:create_subscriber, params)
  req.send_request(options)
end

#delete_event_bus(params = {}) ⇒ Struct

Deletes an event bus. Deletion is asynchronous: the bus moves to DELETING and disappears when complete (see the EventBusDeleted waiter). A bus with subscribers or event sources cannot be deleted.

Examples:

Request syntax with placeholder values


resp = client.delete_event_bus({
  event_bus_arn: "EventBusArn", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :event_bus_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



915
916
917
918
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 915

def delete_event_bus(params = {}, options = {})
  req = build_request(:delete_event_bus, params)
  req.send_request(options)
end

#delete_event_source(params = {}) ⇒ Struct

Deletes an EventSource. Forwarding from its origin stops.

Examples:

Request syntax with placeholder values


resp = client.delete_event_source({
  event_source_arn: "EventSourceArn", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :event_source_arn (required, String) —

    EventSource ARN: event-sourcev2///. The type segment is set by the service (aws.service for AWS service events, aws.partner for partner events) and is not part of the resource's name. The id segment is a 25-character identifier generated by the service.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



941
942
943
944
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 941

def delete_event_source(params = {}, options = {})
  req = build_request(:delete_event_source, params)
  req.send_request(options)
end

#delete_resource_policy(params = {}) ⇒ Types::DeleteResourcePolicyResponse

Deletes the named resource policy attached to an event bus.

Examples:

Request syntax with placeholder values


resp = client.delete_resource_policy({
  resource_arn: "EventBusArn", # required
  policy_name: "PolicyName",
  expected_revision_id: "PolicyRevisionId",
})

Response structure


resp.revision_id #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • :policy_name (String) —

    Which named policy to delete. Defaults to "default" when omitted (a delete AWS Resource Access Manager makes on the owner's behalf resolves to "AWS_RAM" instead). The two writers are exclusive in both directions — only Resource Access Manager can delete "AWS_RAM", and only the bus owner can delete "default" — so naming the other party's policy fails with AccessDeniedException. A well-formed name that is neither of the two fails with InvalidInputException.

  • :expected_revision_id (String) —

    The delete succeeds only if the named policy's current revision ID matches this value; if it differs or the policy does not exist, the operation fails with ConflictException. The "NO_POLICY" sentinel is not valid here. When omitted, deleting an absent policy is an idempotent success. Supplying this value makes the delete non-idempotent: once it succeeds the expected revision no longer exists, so retrying an unanswered request fails with ConflictException even though the policy was deleted. To establish the outcome, read the policy back: ResourceNotFoundException means the delete took effect.

Returns:

See Also:



991
992
993
994
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 991

def delete_resource_policy(params = {}, options = {})
  req = build_request(:delete_resource_policy, params)
  req.send_request(options)
end

#delete_subscriber(params = {}) ⇒ Struct

Deletes a subscriber. Events are no longer delivered to its target.

Examples:

Request syntax with placeholder values


resp = client.delete_subscriber({
  subscriber_arn: "SubscriberArn", # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :subscriber_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies a subscriber.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



1013
1014
1015
1016
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1013

def delete_subscriber(params = {}, options = {})
  req = build_request(:delete_subscriber, params)
  req.send_request(options)
end

#describe_event_bus(params = {}) ⇒ Types::DescribeEventBusResponse

Returns the full configuration and lifecycle state of an event bus.

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • event_bus_active
  • event_bus_deleted

Examples:

Request syntax with placeholder values


resp = client.describe_event_bus({
  event_bus_arn: "EventBusArn", # required
})

Response structure


resp.event_bus_arn #=> String
resp.name #=> String
resp.description #=> String
resp.encryption_configuration.kms_key_identifier #=> String
resp.storage_configuration.retention_period_in_days #=> Integer
resp.storage_configuration.retention_window_start_time #=> Time
resp.creation_time #=> Time
resp.last_modified_time #=> Time
resp.state #=> String, one of "CREATING", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "DELETING", "ACTIVE", "DELETE_FAILED"
resp.state_reason #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :event_bus_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

Returns:

See Also:



1064
1065
1066
1067
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1064

def describe_event_bus(params = {}, options = {})
  req = build_request(:describe_event_bus, params)
  req.send_request(options)
end

#describe_event_source(params = {}) ⇒ Types::DescribeEventSourceResponse

Returns the full configuration and lifecycle state of an EventSource.

Examples:

Request syntax with placeholder values


resp = client.describe_event_source({
  event_source_arn: "EventSourceArn", # required
})

Response structure


resp.event_source_arn #=> String
resp.name #=> String
resp.event_bus_arn #=> String
resp.configuration.aws_service_events_configuration.aws_service #=> String
resp.configuration.aws_service_events_configuration.pattern #=> String
resp.configuration.aws_service_events_configuration.on_failure_configuration.arn #=> String
resp.configuration.partner_events_configuration.partner_event_source_arn #=> String
resp.configuration.partner_events_configuration.pattern #=> String
resp.configuration.partner_events_configuration.partner_bus_kms_key_identifier #=> String
resp.configuration.partner_events_configuration.on_failure_configuration.arn #=> String
resp.description #=> String
resp.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "CREATE_FAILED", "UPDATE_FAILED", "DELETING", "DELETE_FAILED"
resp.revoked #=> Boolean
resp.creation_time #=> Time
resp.last_modified_time #=> Time

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :event_source_arn (required, String) —

    EventSource ARN: event-sourcev2///. The type segment is set by the service (aws.service for AWS service events, aws.partner for partner events) and is not part of the resource's name. The id segment is a 25-character identifier generated by the service.

Returns:

See Also:



1118
1119
1120
1121
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1118

def describe_event_source(params = {}, options = {})
  req = build_request(:describe_event_source, params)
  req.send_request(options)
end

#describe_subscriber(params = {}) ⇒ Types::DescribeSubscriberResponse

Returns the full configuration and state of a subscriber.

Examples:

Request syntax with placeholder values


resp = client.describe_subscriber({
  subscriber_arn: "SubscriberArn", # required
})

Response structure


resp.subscriber_arn #=> String
resp.name #=> String
resp.event_bus_arn #=> String
resp.invoke_configuration.role_arn #=> String
resp.invoke_configuration.lambda_parameters.invocation_type #=> String, one of "EVENT", "REQUEST_RESPONSE"
resp.invoke_configuration.lambda_parameters.qualifier #=> String
resp.invoke_configuration.lambda_parameters.durable_execution_name #=> String
resp.invoke_configuration.lambda_parameters.tenant_id #=> String
resp.invoke_configuration.lambda_parameters.invocation_timeout_seconds #=> String
resp.invoke_configuration.sqs_parameters.message_group_id #=> String
resp.invoke_configuration.sqs_parameters.message_deduplication_id #=> String
resp.invoke_configuration.sqs_parameters.delay_seconds #=> String
resp.invoke_configuration.sqs_parameters.message_attributes #=> Hash
resp.invoke_configuration.sqs_parameters.message_attributes["MessageAttributeName"].data_type #=> String
resp.invoke_configuration.sqs_parameters.message_attributes["MessageAttributeName"].string_value #=> String
resp.invoke_configuration.sqs_parameters.message_attributes["MessageAttributeName"].binary_value #=> String
resp.invoke_configuration.sqs_parameters.message_system_attributes #=> Hash
resp.invoke_configuration.sqs_parameters.message_system_attributes["MessageAttributeName"].data_type #=> String
resp.invoke_configuration.sqs_parameters.message_system_attributes["MessageAttributeName"].string_value #=> String
resp.invoke_configuration.sqs_parameters.message_system_attributes["MessageAttributeName"].binary_value #=> String
resp.invoke_configuration.sns_parameters.message_group_id #=> String
resp.invoke_configuration.sns_parameters.message_deduplication_id #=> String
resp.invoke_configuration.sns_parameters.subject #=> String
resp.invoke_configuration.sns_parameters.message_structure #=> String
resp.invoke_configuration.sns_parameters.message_attributes #=> Hash
resp.invoke_configuration.sns_parameters.message_attributes["MessageAttributeName"].data_type #=> String
resp.invoke_configuration.sns_parameters.message_attributes["MessageAttributeName"].string_value #=> String
resp.invoke_configuration.sns_parameters.message_attributes["MessageAttributeName"].binary_value #=> String
resp.invoke_configuration.kinesis_parameters.partition_key #=> String
resp.invoke_configuration.kinesis_parameters.explicit_hash_key #=> String
resp.invoke_configuration.step_functions_parameters.invocation_type #=> String, one of "EVENT", "REQUEST_RESPONSE"
resp.invoke_configuration.step_functions_parameters.name #=> String
resp.invoke_configuration.step_functions_parameters.trace_header #=> String
resp.invoke_configuration.step_functions_parameters.invocation_timeout_seconds #=> String
resp.invoke_configuration.http_parameters.path_parameter_values #=> Array
resp.invoke_configuration.http_parameters.path_parameter_values[0] #=> String
resp.invoke_configuration.http_parameters.header_parameters #=> Hash
resp.invoke_configuration.http_parameters.header_parameters["HeaderKey"] #=> String
resp.invoke_configuration.http_parameters.query_string_parameters #=> Hash
resp.invoke_configuration.http_parameters.query_string_parameters["QueryStringKey"] #=> String
resp.invoke_configuration.http_parameters.invocation_timeout_seconds #=> String
resp.invoke_configuration.universal_target_parameters.input #=> String
resp.invoke_configuration.universal_target_parameters.invocation_timeout_seconds #=> String
resp.invoke_configuration.event_bus_v2_parameters. #=> Hash
resp.invoke_configuration.event_bus_v2_parameters.["String"] #=> String
resp.invoke_configuration.event_bus_v2_parameters..event_group_id #=> String
resp.invoke_configuration.event_bus_v2_parameters..deduplication_id #=> String
resp.invoke_configuration.event_bus_v2_parameters.deduplication_configuration.deduplication_type #=> String, one of "CONTENT_BASED"
resp.invoke_configuration.target_arn #=> String
resp.description #=> String
resp.filter_configuration.language #=> String, one of "EVENT_BRIDGE_PATTERN"
resp.filter_configuration.filters #=> Array
resp.filter_configuration.filters[0].pattern #=> String
resp.filter_configuration.filters[0].scope #=> String, one of "DATA", "METADATA", "SYSTEM_METADATA"
resp.type #=> String, one of "FIFO", "UNORDERED"
resp.starting_position #=> String, one of "LATEST", "POINT_IN_TIME"
resp.point_in_time_configuration.point_type #=> String, one of "HORIZON", "TIMESTAMP"
resp.point_in_time_configuration.starting_point #=> Time
resp.point_in_time_configuration.end_point #=> Time
resp.batch_configuration.max_batch_size #=> Integer
resp.batch_configuration.max_batch_window_in_seconds #=> Integer
resp.transformer.type #=> String, one of "RAW", "WITH_METADATA", "JSONATA"
resp.transformer.jsonata_configuration.expression #=> String
resp.retry_policy.max_retry_attempts #=> Integer
resp.retry_policy.max_event_age_in_seconds #=> Integer
resp.retry_policy.retry_strategy #=> String, one of "ALL"
resp.on_failure_configuration.arn #=> String
resp.log_configuration.level #=> String, one of "OFF", "ERROR", "INFO"
resp.log_configuration.include_payload #=> String, one of "FULL", "ON_ERROR_ONLY"
resp.state #=> String, one of "RUNNING", "STOPPED"
resp.revoked #=> Boolean
resp.creation_time #=> Time
resp.last_modified_time #=> Time

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :subscriber_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies a subscriber.

Returns:

See Also:



1235
1236
1237
1238
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1235

def describe_subscriber(params = {}, options = {})
  req = build_request(:describe_subscriber, params)
  req.send_request(options)
end

#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse

Returns the named resource policy attached to an event bus. Fails with ResourceNotFoundException when the event bus or the named policy does not exist.

Examples:

Request syntax with placeholder values


resp = client.get_resource_policy({
  resource_arn: "EventBusArn", # required
  policy_name: "PolicyName",
})

Response structure


resp.resource_arn #=> String
resp.policy_document #=> String
resp.policy_name #=> String
resp.revision_id #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • :policy_name (String) —

    Which named policy to read. Defaults to "default" when omitted (a read AWS Resource Access Manager makes on the owner's behalf resolves to "AWS_RAM" instead). Unlike writing, neither name is reserved on a read: the bus owner can read both. There is no fallback between the two, so a bus shared only through Resource Access Manager fails with ResourceNotFoundException until "AWS_RAM" is named explicitly. A well-formed name that is neither of the two fails with InvalidInputException.

Returns:

See Also:



1282
1283
1284
1285
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1282

def get_resource_policy(params = {}, options = {})
  req = build_request(:get_resource_policy, params)
  req.send_request(options)
end

#list_event_buses(params = {}) ⇒ Types::ListEventBusesResponse

Lists the event buses visible to the caller: buses the account owns and buses shared with it through AWS RAM. Shared entries carry identity fields only (Name, EventBusArn, EventBusAccountId); owned entries carry every summary field. Set EventBusAccountId to scope the list to one owner account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_event_buses({
  name_prefix: "EventBusName",
  event_bus_account_id: "AccountId",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.event_buses #=> Array
resp.event_buses[0].name #=> String
resp.event_buses[0].event_bus_arn #=> String
resp.event_buses[0].description #=> String
resp.event_buses[0].creation_time #=> Time
resp.event_buses[0].last_modified_time #=> Time
resp.event_buses[0].state #=> String, one of "CREATING", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "DELETING", "ACTIVE", "DELETE_FAILED"
resp.event_buses[0].state_reason #=> String
resp.event_buses[0]. #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :name_prefix (String) —

    Name of an event bus. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'. The grammar matches the name segment of EventBusArn (event-busv2//), so every valid name can be represented in the bus's ARN. The same type is used everywhere a bus name appears.

  • :event_bus_account_id (String) —

    AWS Account Id.

  • :next_token (String) —

    Opaque pagination token returned by a List operation. Pass it back in the next request to retrieve the next page of results.

  • :max_results (Integer) —

    Maximum number of results to return in one page of a List operation.

Returns:

See Also:



1344
1345
1346
1347
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1344

def list_event_buses(params = {}, options = {})
  req = build_request(:list_event_buses, params)
  req.send_request(options)
end

#list_event_sources(params = {}) ⇒ Types::ListEventSourcesResponse

Lists EventSources as summaries. By default the list spans the EventSources the caller account owns; set EventBusArn to scope it to one bus. Use DescribeEventSource to retrieve full configuration.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_event_sources({
  event_bus_arn: "EventBusArn",
  name_prefix: "EventSourceName",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.event_sources #=> Array
resp.event_sources[0].event_source_arn #=> String
resp.event_sources[0].name #=> String
resp.event_sources[0].event_bus_arn #=> String
resp.event_sources[0].type #=> String, one of "AWS_SERVICE_EVENTS", "PARTNER_EVENTS"
resp.event_sources[0].state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "CREATE_FAILED", "UPDATE_FAILED", "DELETING", "DELETE_FAILED"
resp.event_sources[0].revoked #=> Boolean
resp.event_sources[0].creation_time #=> Time
resp.event_sources[0].last_modified_time #=> Time
resp.event_sources[0]. #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :event_bus_arn (String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • :name_prefix (String) —

    EventSource name. First character alphanumeric; the rest may add '.', '-', '_'. Names may not begin with the reserved "aws." prefix. The grammar matches the ARN local-name segment in EventSourceArn (event-sourcev2///), mirroring EventBusName, so a name the ARN cannot represent cannot be created.

  • :next_token (String) —

    Opaque pagination token returned by a List operation. Pass it back in the next request to retrieve the next page of results.

  • :max_results (Integer) —

    Maximum number of results to return in one page of a List operation.

Returns:

See Also:



1405
1406
1407
1408
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1405

def list_event_sources(params = {}, options = {})
  req = build_request(:list_event_sources, params)
  req.send_request(options)
end

#list_resource_policies(params = {}) ⇒ Types::ListResourcePoliciesResponse

Lists the resource policies attached to an event bus as summaries (policy name and revision ID). Use GetResourcePolicy to retrieve a policy document.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_resource_policies({
  resource_arn: "EventBusArn", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.policy_summaries #=> Array
resp.policy_summaries[0].policy_name #=> String
resp.policy_summaries[0].revision_id #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • :next_token (String) —

    Opaque pagination token returned by a List operation. Pass it back in the next request to retrieve the next page of results.

  • :max_results (Integer) —

    Maximum number of results to return in one page of a List operation.

Returns:

See Also:



1450
1451
1452
1453
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1450

def list_resource_policies(params = {}, options = {})
  req = build_request(:list_resource_policies, params)
  req.send_request(options)
end

#list_subscribers(params = {}) ⇒ Types::ListSubscribersResponse

Lists subscribers as summaries. By default the list spans the subscribers the caller account owns across all buses; set EventBusArn to scope it to one bus. Use DescribeSubscriber to retrieve full configuration.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_subscribers({
  event_bus_arn: "EventBusArn",
  name_prefix: "SubscriberName",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.subscribers #=> Array
resp.subscribers[0].subscriber_arn #=> String
resp.subscribers[0].name #=> String
resp.subscribers[0].event_bus_arn #=> String
resp.subscribers[0].target_arn #=> String
resp.subscribers[0].type #=> String, one of "FIFO", "UNORDERED"
resp.subscribers[0].revoked #=> Boolean
resp.subscribers[0].state #=> String, one of "RUNNING", "STOPPED"
resp.subscribers[0].creation_time #=> Time
resp.subscribers[0].last_modified_time #=> Time
resp.subscribers[0]. #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :event_bus_arn (String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • :name_prefix (String) —

    Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.

  • :next_token (String) —

    Opaque pagination token returned by a List operation. Pass it back in the next request to retrieve the next page of results.

  • :max_results (Integer) —

    Maximum number of results to return in one page of a List operation.

Returns:

See Also:



1509
1510
1511
1512
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1509

def list_subscribers(params = {}, options = {})
  req = build_request(:list_subscribers, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Lists the tags on an event bus, subscriber, or event source.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "TaggableResourceArn", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    ARN for an EventBridge resource that supports tagging: event buses, subscribers, and event sources.

Returns:

See Also:



1539
1540
1541
1542
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1539

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#put_events(params = {}) ⇒ Types::PutEventsResponse

Publishes events to an event bus.

Examples:

Request syntax with placeholder values


resp = client.put_events({
  event_bus_arn: "EventBusArn", # required
  entries: [ # required
    {
      source: "Source", # required
      detail_type: "DetailType", # required
      detail: "EventDetail",
      resources: ["EventResource"],
      time: Time.now,
      system_metadata: {
        event_group_id: "EventGroupId",
        deduplication_id: "EventDeduplicationId",
      },
    },
  ],
  deduplication_configuration: {
    deduplication_type: "CONTENT_BASED", # required, accepts CONTENT_BASED
  },
})

Response structure


resp.failed_entry_count #=> Integer
resp.data.entries #=> Array
resp.data.entries[0].event_id #=> String
resp.data.entries[0].sequence_number #=> String
resp.data.entries[0].success_code #=> String, one of "PUBLISHED", "DEDUPLICATED"
resp.data.entries[0].error_code #=> String
resp.data.entries[0].error_message #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :event_bus_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • :entries (required, Array<Types::PutEventsRequestEntry>) —

    List of event entries to publish. Must contain at least one entry.

  • :deduplication_configuration (Types::DeduplicationConfiguration) —

    Request-level deduplication settings, applied to every entry in the batch.

Returns:

See Also:



1597
1598
1599
1600
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1597

def put_events(params = {}, options = {})
  req = build_request(:put_events, params)
  req.send_request(options)
end

#put_raw_events(params = {}) ⇒ Types::PutRawEventsResponse

Publishes pre-shaped events to an event bus.

Examples:

Request syntax with placeholder values


resp = client.put_raw_events({
  event_bus_arn: "EventBusArn", # required
  entries: [ # required
    {
      data: "data", # required
      metadata: {
        "EventMetadataKey" => "EventMetadataValue",
      },
      system_metadata: { # required
        content_type: "ContentType", # required
        deduplication_id: "EventDeduplicationId",
        event_group_id: "EventGroupId",
      },
    },
  ],
  schema_registry_configuration: {
    registry_uri: "SchemaRegistryUri", # required
    confluent_public_registry_configuration: {
      connection_arn: "ConnectionArn", # required
    },
  },
  deduplication_configuration: {
    deduplication_type: "CONTENT_BASED", # required, accepts CONTENT_BASED
  },
})

Response structure


resp.failed_entry_count #=> Integer
resp.data.entries #=> Array
resp.data.entries[0].event_id #=> String
resp.data.entries[0].sequence_number #=> String
resp.data.entries[0].success_code #=> String, one of "PUBLISHED", "DEDUPLICATED"
resp.data.entries[0].error_code #=> String
resp.data.entries[0].error_message #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :event_bus_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • :entries (required, Array<Types::PutRawEventsRequestEntry>) —

    List of event entries to publish. Must contain at least one entry.

  • :schema_registry_configuration (Types::SchemaRegistryConfiguration) —

    Schema-registry settings for encoding open-format (Avro/Protobuf) events. Required for open-format entries; ignored for JSON entries. The registry is read with the caller's credentials, so the caller needs read access to the registry it references.

  • :deduplication_configuration (Types::DeduplicationConfiguration) —

    Request-level deduplication settings, applied to every entry in the batch.

Returns:

See Also:



1667
1668
1669
1670
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1667

def put_raw_events(params = {}, options = {})
  req = build_request(:put_raw_events, params)
  req.send_request(options)
end

#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyResponse

Attaches a named resource policy to an event bus — the only resource type that supports policies; other resource ARNs are rejected. Each bus holds two named policies: "default" (customer-managed, full IAM policy language including Deny) and "AWS_RAM" (written exclusively by AWS Resource Access Manager to reflect resource shares). Both policies are evaluated on cross-account authorization; an explicit Deny in either overrides an Allow in the other. Operations that omit PolicyName target "default". A "default" policy that would grant public access is rejected with PublicPolicyException and is not attached; this check is always on and cannot be disabled.

Examples:

Request syntax with placeholder values


resp = client.put_resource_policy({
  resource_arn: "EventBusArn", # required
  policy_document: "PolicyDocument", # required
  policy_name: "PolicyName",
  expected_revision_id: "PolicyRevisionId",
})

Response structure


resp.resource_arn #=> String
resp.policy_name #=> String
resp.revision_id #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • :policy_document (required, String) —

    A resource policy document, as a JSON string. The "default" policy can be up to 20 KB (20,480 bytes of UTF-8) by default. This quota is adjustable in Service Quotas. A "default" policy that exceeds the quota is rejected with PolicyLengthExceededException. No policy document can exceed 389,120 bytes of UTF-8, regardless of the quota.

  • :policy_name (String) —

    Which named policy to write. Defaults to "default", the customer-managed policy, when omitted (a write AWS Resource Access Manager makes on the owner's behalf resolves to "AWS_RAM" instead). The two writers are exclusive in both directions — only Resource Access Manager can write "AWS_RAM", and only the bus owner can write "default" — so naming the other party's policy fails with AccessDeniedException. A well-formed name that is neither of the two fails with InvalidInputException.

  • :expected_revision_id (String) —

    The write succeeds only if the named policy's current revision ID matches this value; a policy that does not exist yet matches only the sentinel "NO_POLICY" (create-only). On mismatch the operation fails with ConflictException. When omitted, the write is unconditional. Every attempt stores a newly generated revision ID, so retrying an unanswered request can conflict with the caller's own earlier attempt; read the policy back and compare it with the one you intended before treating a conflict as another writer's change.

Returns:

See Also:



1738
1739
1740
1741
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1738

def put_resource_policy(params = {}, options = {})
  req = build_request(:put_resource_policy, params)
  req.send_request(options)
end

#revoke_resource(params = {}) ⇒ Types::RevokeResourceResponse

Revokes a subscriber or an EventSource. The bus owner calls this to withdraw a misbehaving resource attached to their bus. Revocation is terminal: there is no operation that clears it. A revoked resource refuses mutating operations with InvalidStateException; delete stays available for cleanup.

Examples:

Request syntax with placeholder values


resp = client.revoke_resource({
  arn: "RevocableResourceArn", # required
})

Response structure


resp.arn #=> String

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :arn (required, String) —

    ARN of a resource a bus owner can revoke: a subscriber or an EventSource. The pattern is the revocable subset of TaggableResourceArn; buses are not revocable.

Returns:

See Also:



1772
1773
1774
1775
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1772

def revoke_resource(params = {}, options = {})
  req = build_request(:revoke_resource, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Adds or replaces tags on an event bus, subscriber, or event source.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "TaggableResourceArn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    ARN for an EventBridge resource that supports tagging: event buses, subscribers, and event sources.

  • :tags (required, Hash<String,String>) —

    Tags attached to a resource, as key-value pairs.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



1801
1802
1803
1804
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1801

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes tags from an event bus, subscriber, or event source.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "TaggableResourceArn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    ARN for an EventBridge resource that supports tagging: event buses, subscribers, and event sources.

  • :tag_keys (required, Array<String>) —

    List of tag keys.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



1828
1829
1830
1831
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1828

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_event_bus(params = {}) ⇒ Types::UpdateEventBusResponse

Updates an event bus. The update is asynchronous: the bus moves to UPDATING and returns to ACTIVE when the change is applied. Fields omitted from the request are left unchanged.

Examples:

Request syntax with placeholder values


resp = client.update_event_bus({
  event_bus_arn: "EventBusArn", # required
  description: "Description",
  encryption_configuration: {
    kms_key_identifier: "KmsKeyIdentifier",
  },
  storage_configuration: {
    retention_period_in_days: 1,
  },
})

Response structure


resp.event_bus_arn #=> String
resp.name #=> String
resp.description #=> String
resp.encryption_configuration.kms_key_identifier #=> String
resp.storage_configuration.retention_period_in_days #=> Integer
resp.storage_configuration.retention_window_start_time #=> Time
resp.state #=> String, one of "CREATING", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "DELETING", "ACTIVE", "DELETE_FAILED"
resp.state_reason #=> String
resp.last_modified_time #=> Time

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :event_bus_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • :description (String) —

    Free-text description. Used by every resource type that has one: event buses, subscribers, and event sources.

  • :encryption_configuration (Types::EncryptionConfiguration) —

    Encryption configuration for an event bus.

  • :storage_configuration (Types::StorageConfiguration) —

    Event storage configuration for an event bus.

Returns:

See Also:



1890
1891
1892
1893
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1890

def update_event_bus(params = {}, options = {})
  req = build_request(:update_event_bus, params)
  req.send_request(options)
end

#update_event_source(params = {}) ⇒ Types::UpdateEventSourceResponse

Updates an EventSource. Fields omitted from the request are left unchanged.

Examples:

Request syntax with placeholder values


resp = client.update_event_source({
  event_source_arn: "EventSourceArn", # required
  configuration: {
    aws_service_events_configuration: {
      aws_service: "AwsServiceSource", # required
      pattern: "AwsServiceEventsSourceConfigurationPatternString",
      on_failure_configuration: {
        arn: "DeadLetterQueueArn",
      },
    },
    partner_events_configuration: {
      partner_event_source_arn: "PartnerEventSourceArn", # required
      pattern: "PartnerEventsSourceConfigurationPatternString",
      partner_bus_kms_key_identifier: "KmsKeyIdentifier",
      on_failure_configuration: {
        arn: "DeadLetterQueueArn",
      },
    },
  },
  description: "Description",
})

Response structure


resp.event_source_arn #=> String
resp.name #=> String
resp.event_bus_arn #=> String
resp.state #=> String, one of "CREATING", "ACTIVE", "UPDATING", "CREATE_FAILED", "UPDATE_FAILED", "DELETING", "DELETE_FAILED"
resp.last_modified_time #=> Time

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :event_source_arn (required, String) —

    EventSource ARN: event-sourcev2///. The type segment is set by the service (aws.service for AWS service events, aws.partner for partner events) and is not part of the resource's name. The id segment is a 25-character identifier generated by the service.

  • :configuration (Types::EventSourceConfiguration) —

    Discriminated EventSource configuration. Exactly one variant must be set.

  • :description (String) —

    Free-text description. Used by every resource type that has one: event buses, subscribers, and event sources.

Returns:

See Also:



1957
1958
1959
1960
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 1957

def update_event_source(params = {}, options = {})
  req = build_request(:update_event_source, params)
  req.send_request(options)
end

#update_subscriber(params = {}) ⇒ Types::UpdateSubscriberResponse

Updates a subscriber. Fields omitted from the request are left unchanged.

Examples:

Request syntax with placeholder values


resp = client.update_subscriber({
  subscriber_arn: "SubscriberArn", # required
  description: "Description",
  state: "RUNNING", # accepts RUNNING, STOPPED
  resume_position: "LAST_PROCESSED", # accepts LAST_PROCESSED, LATEST
  invoke_configuration: {
    role_arn: "RoleArn", # required
    lambda_parameters: {
      invocation_type: "EVENT", # accepts EVENT, REQUEST_RESPONSE
      qualifier: "LambdaParametersQualifierString",
      durable_execution_name: "LambdaParametersDurableExecutionNameString",
      tenant_id: "LambdaParametersTenantIdString",
      invocation_timeout_seconds: "LambdaParametersInvocationTimeoutSecondsString",
    },
    sqs_parameters: {
      message_group_id: "SqsParametersMessageGroupIdString",
      message_deduplication_id: "SqsParametersMessageDeduplicationIdString",
      delay_seconds: "SqsParametersDelaySecondsString",
      message_attributes: {
        "MessageAttributeName" => {
          data_type: "SqsMessageAttributeValueDataTypeString",
          string_value: "String",
          binary_value: "String",
        },
      },
      message_system_attributes: {
        "MessageAttributeName" => {
          data_type: "SqsMessageAttributeValueDataTypeString",
          string_value: "String",
          binary_value: "String",
        },
      },
    },
    sns_parameters: {
      message_group_id: "SnsParametersMessageGroupIdString",
      message_deduplication_id: "SnsParametersMessageDeduplicationIdString",
      subject: "SnsParametersSubjectString",
      message_structure: "SnsParametersMessageStructureString",
      message_attributes: {
        "MessageAttributeName" => {
          data_type: "SnsMessageAttributeValueDataTypeString",
          string_value: "String",
          binary_value: "String",
        },
      },
    },
    kinesis_parameters: {
      partition_key: "KinesisParametersPartitionKeyString",
      explicit_hash_key: "KinesisParametersExplicitHashKeyString",
    },
    step_functions_parameters: {
      invocation_type: "EVENT", # accepts EVENT, REQUEST_RESPONSE
      name: "StepFunctionsParametersNameString",
      trace_header: "StepFunctionsParametersTraceHeaderString",
      invocation_timeout_seconds: "StepFunctionsParametersInvocationTimeoutSecondsString",
    },
    http_parameters: {
      path_parameter_values: ["PathParameter"],
      header_parameters: {
        "HeaderKey" => "HeaderValue",
      },
      query_string_parameters: {
        "QueryStringKey" => "QueryStringValue",
      },
      invocation_timeout_seconds: "String",
    },
    universal_target_parameters: {
      input: "UniversalTargetInput", # required
      invocation_timeout_seconds: "String",
    },
    event_bus_v2_parameters: {
      metadata: {
        "String" => "String",
      },
      system_metadata: {
        event_group_id: "String",
        deduplication_id: "String",
      },
      deduplication_configuration: {
        deduplication_type: "CONTENT_BASED", # required, accepts CONTENT_BASED
      },
    },
  },
  filter_configuration: {
    language: "EVENT_BRIDGE_PATTERN", # accepts EVENT_BRIDGE_PATTERN
    filters: [
      {
        pattern: "EventPattern", # required
        scope: "DATA", # required, accepts DATA, METADATA, SYSTEM_METADATA
      },
    ],
  },
  batch_configuration: {
    max_batch_size: 1,
    max_batch_window_in_seconds: 1,
  },
  transformer: {
    type: "RAW", # accepts RAW, WITH_METADATA, JSONATA
    jsonata_configuration: {
      expression: "JsonataConfigurationExpressionString", # required
    },
  },
  retry_policy: {
    max_retry_attempts: 1,
    max_event_age_in_seconds: 1,
    retry_strategy: "ALL", # accepts ALL
  },
  on_failure_configuration: {
    arn: "DeadLetterQueueArn",
  },
  log_configuration: {
    level: "OFF", # accepts OFF, ERROR, INFO
    include_payload: "FULL", # accepts FULL, ON_ERROR_ONLY
  },
})

Response structure


resp.subscriber_arn #=> String
resp.name #=> String
resp.event_bus_arn #=> String
resp.type #=> String, one of "FIFO", "UNORDERED"
resp.starting_position #=> String, one of "LATEST", "POINT_IN_TIME"
resp.point_in_time_configuration.point_type #=> String, one of "HORIZON", "TIMESTAMP"
resp.point_in_time_configuration.starting_point #=> Time
resp.point_in_time_configuration.end_point #=> Time
resp.state #=> String, one of "RUNNING", "STOPPED"
resp.last_modified_time #=> Time

Parameters:

  • params (Hash) (defaults to: {}) —

    ({})

Options Hash (params):

  • :subscriber_arn (required, String) —

    The Amazon Resource Name (ARN) that uniquely identifies a subscriber.

  • :description (String) —

    Free-text description. Used by every resource type that has one: event buses, subscribers, and event sources.

  • :state (String) —

    Customer-controlled run state of a subscriber, set on create or update. Distinct from the bus lifecycle vocabulary, where ACTIVE means "provisioned and healthy". Delivery requires State RUNNING on a subscriber that is not revoked.

  • :resume_position (String) —

    Position from which delivery resumes when a subscriber is unpaused. Honored only on an UpdateSubscriber call that transitions State from STOPPED to RUNNING (unpause); ignored on any other call and not accepted on Create. Defaults to LAST_PROCESSED when omitted.

  • :invoke_configuration (Types::UpdateInvokeConfiguration) —

    Update-able configuration for how the subscriber invokes its target.

  • :filter_configuration (Types::FilterConfiguration) —

    Configuration for filtering events delivered to a subscriber. On CreateSubscriber, Filters is required and must contain at least one Filter with a non-empty Pattern. On UpdateSubscriber, an empty FilterConfiguration:{} clears the existing filter. Any non-empty shape (including {Language:X} without Filters) must contain a valid Filters list — same contract as CreateSubscriber. A non-empty Filters list overwrites; an omitted FilterConfiguration preserves existing state. All Filters are implicitly ANDed — an event must match every Filter to be delivered.

  • :batch_configuration (Types::BatchConfiguration) —

    Batching configuration for a subscriber.

  • :transformer (Types::Transformer) —

    Not applicable to universal (aws-sdk) targets, whose input transformation is UniversalTargetParameters.Input; a Transformer on such a target is rejected.

  • :retry_policy (Types::RetryPolicy) —

    Retry policy for a subscriber.

  • :on_failure_configuration (Types::OnFailureConfiguration) —

    On-failure configuration: where a failed delivery is sent. Shared by the subscriber and the EventSource.

  • :log_configuration (Types::LogConfiguration) —

    Log configuration for a subscriber.

Returns:

See Also:



2162
2163
2164
2165
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 2162

def update_subscriber(params = {}, options = {})
  req = build_request(:update_subscriber, params)
  req.send_request(options)
end

#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean

Polls an API operation until a resource enters a desired state.

Basic Usage

A waiter will call an API operation until:

  • It is successful
  • It enters a terminal state
  • It makes the maximum number of attempts

In between attempts, the waiter will sleep.

# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

  # poll for 1 hour, instead of a number of attempts
  before_wait: -> (attempts, response) do
    throw :failure if Time.now - started_at > 3600
  end
})

Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default :delay and :max_attempts values.

waiter_name params :delay :max_attempts
event_bus_active #describe_event_bus 2 60
event_bus_deleted #describe_event_bus 2 60

Parameters:

  • waiter_name (Symbol)
  • params (Hash) (defaults to: {}) —

    ({})

  • options (Hash) (defaults to: {}) —

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

Returns:

  • (Boolean) —

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError) —

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError) —

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError) —

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError) —

    Raised when you request to wait for an unknown state.



2278
2279
2280
2281
2282
# File 'gems/aws-sdk-eventbridgev2/lib/aws-sdk-eventbridgev2/client.rb', line 2278

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end