Class: Aws::CloudWatchOmni::Client

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

Overview

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

client = Aws::CloudWatchOmni::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 Aws::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. Takes effect only when disable_clock_skew_correction is not set.

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

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

  • :disable_clock_skew_correction (Boolean) —

    Used only in standard and adaptive retry modes. When true, the SDK does not apply a clock skew correction, does not update its stored skew from responses, and does not retry clock skew errors. Clock skew correction is enabled by default.

  • :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. Defaults to 3, except for DynamoDB and DynamoDB Streams, which default to 4.

  • :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: "standard" —

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior.

    • 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. This is the default value if no retry mode is provided.

    • 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 Aws::ClientStubs#stub_responses. See Aws::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.

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

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::CloudWatchOmni::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.



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

def initialize(*args)
  super
end

Instance Method Details

#batch_get_omni_slo_report(params = {}) ⇒ Types::BatchGetOmniSloReportOutput

Returns the current measurements of up to 50 SLOs in one space: state, attainment, error budget consumed, burn rate over one recent window, and the estimated time the budget runs out.

GetOmniSlo and ListOmniSlos report the measurement taken when the state last changed; this operation reports it as of now. Each requested SLO appears exactly once, in reports or in errors. An SLO that does not exist in the space is a NOT_FOUND entry in errors, not a failure of the call.

Examples:

Example: Report on several SLOs


# The following example reports on three SLOs with a 60-minute burn-rate window. Every report carries the same measuredAt.
# The first SLO is spending its error budget 2.4 times faster than the pace that would use it up over its 30-day window,
# and estimatedExhaustionTime is when the remaining budget runs out at that rate. The second is in the NODATA state, so
# its report has the state and measuredAt but no figures. The third does not exist in the space, so it appears in errors
# instead of failing the request. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.batch_get_omni_slo_report({
  burn_rate: {
    window_minutes: 60, 
  }, 
  slo_ids: [
    "9f8e7d6c5b4a49382716051a2b3c4d5e", 
    "5e4d3c2b1a0f49e8d7c6b5a4f3e2d1c0", 
    "0123456789abcdef0123456789abcdef", 
  ], 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  errors: [
    {
      error_code: "NOT_FOUND", 
      message: "The SLO does not exist in this space.", 
      slo_id: "0123456789abcdef0123456789abcdef", 
    }, 
  ], 
  reports: [
    {
      attainment: 99.922, 
      burn_rate: {
        value: 2.4, 
        estimated_exhaustion_time: Time.parse("2026-11-19T04:00:00Z"), 
        window_minutes: 60, 
      }, 
      error_budget_consumed_ratio: 0.78, 
      measured_at: Time.parse("2026-11-16T10:00:00Z"), 
      slo_id: "9f8e7d6c5b4a49382716051a2b3c4d5e", 
      state: {
        value: "WARNING", 
        transitioned_at: Time.parse("2026-11-15T21:04:00Z"), 
      }, 
    }, 
    {
      measured_at: Time.parse("2026-11-16T10:00:00Z"), 
      slo_id: "5e4d3c2b1a0f49e8d7c6b5a4f3e2d1c0", 
      state: {
        value: "NODATA", 
        no_data_reason: "NO_SLI_DATA", 
        transitioned_at: Time.parse("2026-11-16T00:12:00Z"), 
      }, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.batch_get_omni_slo_report({
  space_id: "SpaceId", # required
  slo_ids: ["SloId"], # required
  burn_rate: {
    window_minutes: 1,
  },
})

Response structure


resp.reports #=> Array
resp.reports[0].slo_id #=> String
resp.reports[0].state.value #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.reports[0].state.no_data_reason #=> String
resp.reports[0].state.transitioned_at #=> Time
resp.reports[0].measured_at #=> Time
resp.reports[0].attainment #=> Float
resp.reports[0].error_budget_consumed_ratio #=> Float
resp.reports[0].burn_rate.window_minutes #=> Integer
resp.reports[0].burn_rate.value #=> Float
resp.reports[0].burn_rate.estimated_exhaustion_time #=> Time
resp.errors #=> Array
resp.errors[0].slo_id #=> String
resp.errors[0].error_code #=> String, one of "NOT_FOUND"
resp.errors[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space that owns the SLOs.

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

    The SLOs to report on: 1 to 50 identifiers, each at most once.

  • :burn_rate (Types::SloReportBurnRateInput) —

    The burn-rate window. Omitted means a 60-minute window.

Returns:

See Also:



599
600
601
602
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 599

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

#complete_experiment_run(params = {}) ⇒ Types::CompleteExperimentRunOutput

Completes a run that is reported from the caller's code.

Call this after reporting the run's cases with PutExperimentRunResults. The run's status becomes COMPLETED, and the service computes its summary and, when it has a rule, its verdict. Cases that were never reported count as not run. The run record is written to the run's log stream in the experiment's results log group.

After the run ends, PutExperimentRunResults calls for it fail with a ConflictException (RUN_TERMINAL).

Examples:

Example: Complete a reported run


# The following example completes a run reported from the caller's code whose 50 cases were all reported. The run has a
# rule, so it gets a verdict. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.complete_experiment_run({
  experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
  run_id: "ci-build-4821", 
})

resp.to_h outputs the following:
{
  run: {
    case_records_written: 50, 
    checks: [
      {
        bound: {
          min: 0.9, 
        }, 
        decisive: false, 
        metric: {
          pass_rate: {
          }, 
        }, 
        observed: 0.94, 
        passed: true, 
      }, 
      {
        bound: {
          max: 0.05, 
        }, 
        decisive: false, 
        metric: {
          not_scored_rate: {
          }, 
        }, 
        observed: 0.0, 
        passed: true, 
      }, 
    ], 
    completed_at: Time.parse("2026-11-10T15:18:37Z"), 
    created_at: Time.parse("2026-11-10T15:02:10Z"), 
    dataset: {
      name: "support-faq.jsonl", 
      case_count: 50, 
      source: "FILE", 
    }, 
    evaluators: [
      {
        evaluator_id: "Builtin.Helpfulness", 
        rating_scale: "NUMERIC", 
      }, 
    ], 
    experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
    metrics: [
      {
        average: 0.86, 
        evaluator_id: "Builtin.Helpfulness", 
        max: 1.0, 
        min: 0.52, 
        passed_count: 47, 
        scored_count: 50, 
      }, 
    ], 
    producer: {
      version: "1.4.0", 
      name: "release-eval-harness", 
      external_id: "4821", 
      kind: "CUSTOM", 
    }, 
    producer_principal: "arn:aws:iam::123456789012:role/ReleaseAutomation", 
    role: "TARGET", 
    rule: {
      name: "release-gate", 
      case_criteria: [
        {
          evaluator: {
            evaluator_id: "Builtin.Helpfulness", 
            threshold: {
              min_score: 0.7, 
            }, 
          }, 
        }, 
      ], 
      content_hash: "sha256:9a8b7c6d5e4f30211203f4e5d6c7b8a99a8b7c6d5e4f30211203f4e5d6c7b8a9", 
      gates: [
        {
          bound: {
            min: 0.9, 
          }, 
          metric: {
            pass_rate: {
            }, 
          }, 
        }, 
      ], 
      source: "FILE", 
    }, 
    run_id: "ci-build-4821", 
    source: "REPORTED", 
    started_at: Time.parse("2026-11-10T15:02:10Z"), 
    status: "COMPLETED", 
    summary: {
      cases_done: 50, 
      cases_reported: 50, 
      cases_total: 50, 
      completed: 0, 
      failed: 3, 
      not_run: 0, 
      not_scored: 0, 
      not_scored_rate: 0.0, 
      pass_rate: 0.94, 
      passed: 47, 
      target_error: 0, 
      timed_out: 0, 
    }, 
    target: {
      agent_core_runtime: {
        version: "7", 
        endpoint_arn: "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/support_agent-a1B2c3D4e5/runtime-endpoint/production", 
      }, 
    }, 
    updated_at: Time.parse("2026-11-10T15:18:37Z"), 
    verdict: "PASSED", 
    verdict_reason: "pass rate 94% (required 90%)", 
    verdict_reason_code: "PASSED", 
  }, 
}

Request syntax with placeholder values


resp = client.complete_experiment_run({
  experiment_id: "ExperimentId", # required
  run_id: "ExperimentRunId", # required
})

Response structure


resp.run.experiment_id #=> String
resp.run.run_id #=> String
resp.run.source #=> String, one of "REPORTED", "HOSTED"
resp.run.status #=> String, one of "RUNNING", "STOPPING", "COMPLETED", "DID_NOT_FINISH"
resp.run.status_reason #=> String, one of "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "RESULTS_WRITE_FAILED"
resp.run.status_detail #=> String
resp.run.producer.kind #=> String, one of "SDK", "CUSTOM"
resp.run.producer.name #=> String
resp.run.producer.version #=> String
resp.run.producer.external_id #=> String
resp.run.producer_principal #=> String
resp.run.target.agent_core_runtime.endpoint_arn #=> String
resp.run.target.agent_core_runtime.request_template #=> String
resp.run.target.agent_core_runtime.version #=> String
resp.run.target.https_endpoint.url #=> String
resp.run.target.https_endpoint.version #=> String
resp.run.target.custom.version #=> String
resp.run.target.custom.endpoint #=> String
resp.run.control.target.agent_core_runtime.endpoint_arn #=> String
resp.run.control.target.agent_core_runtime.request_template #=> String
resp.run.control.target.agent_core_runtime.version #=> String
resp.run.control.target.https_endpoint.url #=> String
resp.run.control.target.https_endpoint.version #=> String
resp.run.control.target.custom.version #=> String
resp.run.control.target.custom.endpoint #=> String
resp.run.control.run_id #=> String
resp.run.control.latest_passed.endpoint_arn #=> String
resp.run.control_run_id #=> String
resp.run.role #=> String, one of "TARGET", "CONTROL"
resp.run.target_run_id #=> String
resp.run.dataset.source #=> String, one of "AGENTCORE", "FILE", "OTHER"
resp.run.dataset.id #=> String
resp.run.dataset.name #=> String
resp.run.dataset.version #=> String
resp.run.dataset.case_count #=> Integer
resp.run.dataset.content_hash #=> String
resp.run.evaluators #=> Array
resp.run.evaluators[0].evaluator_id #=> String
resp.run.evaluators[0].rating_scale #=> String, one of "NUMERIC", "CATEGORICAL"
resp.run.evaluators[0].score_direction #=> String, one of "HIGHER_IS_BETTER", "LOWER_IS_BETTER"
resp.run.rule.source #=> String, one of "FILE", "INLINE"
resp.run.rule.name #=> String
resp.run.rule.case_criteria #=> Array
resp.run.rule.case_criteria[0].evaluator.evaluator_id #=> String
resp.run.rule.case_criteria[0].evaluator.threshold.min_score #=> Float
resp.run.rule.case_criteria[0].evaluator.threshold.max_score #=> Float
resp.run.rule.case_criteria[0].evaluator.threshold.pass_labels #=> Array
resp.run.rule.case_criteria[0].evaluator.threshold.pass_labels[0] #=> String
resp.run.rule.gates #=> Array
resp.run.rule.gates[0].metric.evaluator_average.evaluator_id #=> String
resp.run.rule.gates[0].bound.min #=> Float
resp.run.rule.gates[0].bound.max #=> Float
resp.run.rule.gates[0].bound.vs_control.min_delta #=> Float
resp.run.rule.gates[0].bound.vs_control.mode #=> String, one of "ABSOLUTE", "RATIO"
resp.run.rule.content_hash #=> String
resp.run. #=> Hash
resp.run.["RunMetadataMapKeyString"] #=> String
resp.run.description #=> String
resp.run.trace_stats.status #=> String, one of "PENDING", "AVAILABLE", "UNAVAILABLE"
resp.run.trace_stats.status_reason #=> String, one of "NO_TRACES", "SPANS_NOT_FOUND", "ACCESS_DENIED", "SCAN_LIMIT", "QUERY_FAILED", "INTERNAL_ERROR"
resp.run.trace_stats.cases_read #=> Integer
resp.run.trace_stats.sampled #=> Boolean
resp.run.trace_stats.cases_with_spans #=> Integer
resp.run.trace_stats.attributes #=> Array
resp.run.trace_stats.attributes[0].name #=> String, one of "MODEL", "TOOL_NAME", "SYSTEM_INSTRUCTIONS"
resp.run.trace_stats.attributes[0].version #=> Integer
resp.run.trace_stats.attributes[0].distinct #=> Integer
resp.run.trace_stats.attributes[0].values_hash #=> String
resp.run.trace_stats.attributes[0].values #=> Array
resp.run.trace_stats.attributes[0].values[0].value #=> String
resp.run.trace_stats.attributes[0].values[0].cases #=> Integer
resp.run.trace_stats.metrics #=> Array
resp.run.trace_stats.metrics[0].name #=> String, one of "MODEL_CALLS", "TOOL_CALLS", "INPUT_TOKENS", "OUTPUT_TOKENS", "TURN_LATENCY_MS", "FAILED"
resp.run.trace_stats.metrics[0].version #=> Integer
resp.run.trace_stats.metrics[0].count #=> Integer
resp.run.trace_stats.metrics[0].mean #=> Float
resp.run.trace_stats.metrics[0].p50 #=> Float
resp.run.trace_stats.metrics[0].p90 #=> Float
resp.run.trace_stats.computed_at #=> Time
resp.run.batch_evaluation.batch_evaluation_arn #=> String
resp.run.batch_evaluation.total_sessions #=> Integer
resp.run.batch_evaluation.sessions_completed #=> Integer
resp.run.batch_evaluation.sessions_in_progress #=> Integer
resp.run.batch_evaluation.sessions_failed #=> Integer
resp.run.batch_evaluation.sessions_ignored #=> Integer
resp.run.summary.cases_total #=> Integer
resp.run.summary.cases_reported #=> Integer
resp.run.summary.cases_done #=> Integer
resp.run.summary.passed #=> Integer
resp.run.summary.failed #=> Integer
resp.run.summary.completed #=> Integer
resp.run.summary.target_error #=> Integer
resp.run.summary.timed_out #=> Integer
resp.run.summary.not_scored #=> Integer
resp.run.summary.not_run #=> Integer
resp.run.summary.pass_rate #=> Float
resp.run.summary.not_scored_rate #=> Float
resp.run.metrics #=> Array
resp.run.metrics[0].evaluator_id #=> String
resp.run.metrics[0].average #=> Float
resp.run.metrics[0].min #=> Float
resp.run.metrics[0].max #=> Float
resp.run.metrics[0].label_counts #=> Hash
resp.run.metrics[0].label_counts["LabelCountMapKeyString"] #=> Integer
resp.run.metrics[0].scored_count #=> Integer
resp.run.metrics[0].passed_count #=> Integer
resp.run.case_records_written #=> Integer
resp.run.verdict #=> String, one of "PASSED", "FAILED", "DID_NOT_FINISH"
resp.run.verdict_reason_code #=> String, one of "PASSED", "NOT_SCORED_RATE_ABOVE_MAX", "PASS_RATE_BELOW_MIN", "AVERAGE_BELOW_MIN", "AVERAGE_ABOVE_MAX", "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "BELOW_CONTROL", "REGRESSED_CASES_ABOVE_MAX", "FIXED_CASES_BELOW_MIN", "UNPAIRED_CASE_RATE_ABOVE_MAX", "SCORE_REGRESSED", "CONTROL_DID_NOT_FINISH", "RESULTS_WRITE_FAILED"
resp.run.verdict_reason #=> String
resp.run.checks #=> Array
resp.run.checks[0].metric.evaluator_average.evaluator_id #=> String
resp.run.checks[0].bound.min #=> Float
resp.run.checks[0].bound.max #=> Float
resp.run.checks[0].bound.vs_control.min_delta #=> Float
resp.run.checks[0].bound.vs_control.mode #=> String, one of "ABSOLUTE", "RATIO"
resp.run.checks[0].observed #=> Float
resp.run.checks[0].control_observed #=> Float
resp.run.checks[0].delta #=> Float
resp.run.checks[0].passed #=> Boolean
resp.run.checks[0].decisive #=> Boolean
resp.run.checks[0].observed_by_evaluator #=> Array
resp.run.checks[0].observed_by_evaluator[0].evaluator_id #=> String
resp.run.checks[0].observed_by_evaluator[0].count #=> Integer
resp.run.created_at #=> Time
resp.run.started_at #=> Time
resp.run.completed_at #=> Time
resp.run.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :experiment_id (required, String) —

    The ID of the experiment the run belongs to.

  • :run_id (required, String) —

    The ID of the run to complete.

Returns:

See Also:



898
899
900
901
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 898

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

#create_access_grant(params = {}) ⇒ Types::CreateAccessGrantOutput

Creates an AccessGrant that authorizes a principal to perform a set of actions on resources in a space.

Optionally narrow the grant with scoped actions that limit it to specific resources and fields. Use ListAccessGrants and GetAccessGrant to retrieve grants, and DeleteAccessGrant to remove them.

Examples:

Example: Create an access grant


# The following example creates a custom access grant that authorizes an Identity Center user to read and update a
# specific dashboard in a space. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.create_access_grant({
  name: "analyst-read-access", 
  client_token: "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73", 
  domain_id: "d-1a2b3c4d5e", 
  permission: "CUSTOM", 
  principal: {
    principal_id: "94b6c7d8-1a2b-4c3d-9e4f-5a6b7c8d9e0f", 
    principal_type: "IDC_USER", 
  }, 
  scoped_actions: [
    {
      actions: [
        "cloudwatch:GetOmniDashboard", 
        "cloudwatch:UpdateOmniDashboard", 
      ], 
      resources: [
        {
          resource_arns: [
            "arn:aws:cloudwatch:us-east-1:123456789012:omni-dashboard/c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
          ], 
          resource_type: "OmniDashboard", 
        }, 
      ], 
    }, 
  ], 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  tags: {
    "Team" => "observability", 
  }, 
})

resp.to_h outputs the following:
{
  access_grant: {
    name: "analyst-read-access", 
    account_id: "123456789012", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    created_by: "arn:aws:iam::123456789012:role/ObservabilityAdmin", 
    domain_id: "d-1a2b3c4d5e", 
    grant_arn: "arn:aws:cloudwatch:us-east-1:123456789012:access-grant/7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
    grant_id: "7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
    grant_type: "CUSTOMER_MANAGED", 
    permission: "CUSTOM", 
    principal: {
      principal_id: "94b6c7d8-1a2b-4c3d-9e4f-5a6b7c8d9e0f", 
      principal_type: "IDC_USER", 
    }, 
    scoped_actions: [
      {
        actions: [
          "cloudwatch:GetOmniDashboard", 
          "cloudwatch:UpdateOmniDashboard", 
        ], 
        resources: [
          {
            resource_arns: [
              "arn:aws:cloudwatch:us-east-1:123456789012:omni-dashboard/c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
            ], 
            resource_type: "OmniDashboard", 
          }, 
        ], 
      }, 
    ], 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.create_access_grant({
  domain_id: "DomainId", # required
  space_id: "SpaceId", # required
  name: "CreateAccessGrantInputNameString", # required
  principal: { # required
    principal_type: "IDC_USER", # required, accepts IDC_USER, IDC_GROUP, IAM_USER, IAM_ROLE, IAM_ROOT, ACCESS_PROFILE, ALERT, AGENT, SLO
    principal_id: "PrincipalId",
    principal_attributes: [
      {
        key: "AccessGrantPrincipalAttributeKeyString", # required
        value: "AccessGrantPrincipalAttributeValueString", # required
      },
    ],
  },
  permission: "SPACE_ADMIN", # required, accepts SPACE_ADMIN, READ, READ_WRITE_DELETE, CUSTOM
  scoped_actions: [
    {
      actions: ["ScopedActionName"], # required
      resources: [
        {
          resource_type: "String", # required
          resource_arns: ["String"],
          tags: {
            "String" => "String",
          },
          signal_types: ["LOGS"], # accepts LOGS, TRACES
          row_scope_groups: [
            [
              {
                field: "RowScopeFieldString", # required
                operator: "IN", # required, accepts IN
                values: ["RowScopeValue"], # required
              },
            ],
          ],
        },
      ],
      context_conditions: {
        "String" => ["String"],
      },
    },
  ],
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.access_grant.grant_id #=> String
resp.access_grant.grant_arn #=> String
resp.access_grant.name #=> String
resp.access_grant. #=> String
resp.access_grant.domain_id #=> String
resp.access_grant.principal.principal_type #=> String, one of "IDC_USER", "IDC_GROUP", "IAM_USER", "IAM_ROLE", "IAM_ROOT", "ACCESS_PROFILE", "ALERT", "AGENT", "SLO"
resp.access_grant.principal.principal_id #=> String
resp.access_grant.principal.principal_attributes #=> Array
resp.access_grant.principal.principal_attributes[0].key #=> String
resp.access_grant.principal.principal_attributes[0].value #=> String
resp.access_grant.permission #=> String, one of "SPACE_ADMIN", "READ", "READ_WRITE_DELETE", "CUSTOM"
resp.access_grant.grant_type #=> String, one of "SERVICE_MANAGED", "CUSTOMER_MANAGED"
resp.access_grant.created_by #=> String
resp.access_grant.created_at #=> Time
resp.access_grant.updated_at #=> Time
resp.access_grant.space_id #=> String
resp.access_grant.scoped_actions #=> Array
resp.access_grant.scoped_actions[0].actions #=> Array
resp.access_grant.scoped_actions[0].actions[0] #=> String
resp.access_grant.scoped_actions[0].resources #=> Array
resp.access_grant.scoped_actions[0].resources[0].resource_type #=> String
resp.access_grant.scoped_actions[0].resources[0].resource_arns #=> Array
resp.access_grant.scoped_actions[0].resources[0].resource_arns[0] #=> String
resp.access_grant.scoped_actions[0].resources[0].tags #=> Hash
resp.access_grant.scoped_actions[0].resources[0].tags["String"] #=> String
resp.access_grant.scoped_actions[0].resources[0].signal_types #=> Array
resp.access_grant.scoped_actions[0].resources[0].signal_types[0] #=> String, one of "LOGS", "TRACES"
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups #=> Array
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups[0] #=> Array
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups[0][0].field #=> String
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups[0][0].operator #=> String, one of "IN"
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups[0][0].values #=> Array
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups[0][0].values[0] #=> String
resp.access_grant.scoped_actions[0].context_conditions #=> Hash
resp.access_grant.scoped_actions[0].context_conditions["String"] #=> Array
resp.access_grant.scoped_actions[0].context_conditions["String"][0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String) —

    The ID of the domain that contains the space.

  • :space_id (required, String) —

    The ID of the space to scope the grant to.

  • :name (required, String) —

    A name that identifies the access grant.

  • :principal (required, Types::AccessGrantPrincipal) —

    The principal receiving the grant.

  • :permission (required, String) —

    The permission to grant. Exactly one permission is granted per request.

  • :scoped_actions (Array<Types::ScopedActions>) —

    Groups of actions to allow, each with the resource scopes and conditions that limit those actions.

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

    The tags to associate with the access grant.

  • :client_token (String) —

    Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.

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

Returns:

See Also:



1111
1112
1113
1114
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 1111

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

#create_access_profile(params = {}) ⇒ Types::CreateAccessProfileOutput

Creates an access profile in a space.

Use GetAccessProfile and ListAccessProfiles to retrieve profiles, and UpdateAccessProfile to modify one.

Examples:

Example: Create an access profile


# The following example creates a customer-managed access profile in a space. Payloads are shown as JSON; on the wire they
# are CBOR-encoded.

resp = client.create_access_profile({
  name: "Analyst read-only profile", 
  client_token: "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73", 
  description: "Read-only access for analysts.", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  tags: {
    "Team" => "observability", 
  }, 
})

resp.to_h outputs the following:
{
  access_profile: {
    name: "Analyst read-only profile", 
    arn: "arn:aws:cloudwatch:us-east-1:123456789012:access-profile/analyst-readonly", 
    assume_status: "ALLOWED", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    description: "Read-only access for analysts.", 
    profile_id: "analyst-readonly", 
    profile_type: "CUSTOMER_MANAGED", 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.create_access_profile({
  space_id: "SpaceId", # required
  name: "AccessProfileName", # required
  description: "CreateAccessProfileInputDescriptionString",
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.access_profile.profile_id #=> String
resp.access_profile.space_id #=> String
resp.access_profile.arn #=> String
resp.access_profile.name #=> String
resp.access_profile.description #=> String
resp.access_profile.created_at #=> Time
resp.access_profile.updated_at #=> Time
resp.access_profile.assume_status #=> String, one of "ALLOWED", "DENIED"
resp.access_profile.profile_type #=> String, one of "SERVICE_MANAGED", "CUSTOMER_MANAGED"

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space to create the profile in.

  • :name (required, String) —

    A name that identifies the access profile.

  • :description (String) —

    An optional description of the access profile.

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

    The tags to associate with the access profile.

  • :client_token (String) —

    Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.

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

Returns:

See Also:



1203
1204
1205
1206
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 1203

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

#create_alert(params = {}) ⇒ Types::CreateAlertOutput

Creates a new alert within a space.

Use GetAlert and ListAlerts to retrieve alerts, UpdateAlert to modify one, and DeleteAlert to remove it.

Examples:

Example: Create an alert on a field value


# The following example creates an alert whose threshold is compared against a named field of each result row, so every
# service the query groups by is tracked as its own contributor. FIELD_VALUE requires thresholdField. Payloads are shown
# as JSON; on the wire they are CBOR-encoded.

resp = client.create_alert({
  name: "service-error-count-elevated", 
  client_token: "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73", 
  description: "Alerts when a service logs more errors than its accepted rate.", 
  notification_rules: [
    {
      target: {
        metadata: {
          "channel" => "oncall-alerts", 
        }, 
        type: "slack", 
        arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      }, 
      trigger: {
        state_values: [
          "CRITICAL", 
        ], 
      }, 
    }, 
  ], 
  notifications_enabled: true, 
  profile_id: "analyst-readonly", 
  rule: {
    telemetry_rule: {
      condition: {
        comparator: "GT", 
        critical_threshold: 200.0, 
        threshold_field: "error_count", 
        threshold_mode: "FIELD_VALUE", 
        warning_threshold: 50.0, 
      }, 
      evaluation: {
        interval_seconds: 300, 
        pending_duration_seconds: 600, 
        recovery_duration_seconds: 300, 
      }, 
      no_data: {
        treat_as: "NODATA", 
      }, 
      query: {
        expression: "SELECT resource['attributes']['service.name'] AS service, COUNT(*) AS error_count FROM \"logs.default\" WHERE severityText = 'ERROR' GROUP BY service", 
        language: "SQL", 
      }, 
    }, 
  }, 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  tags: {
    "Team" => "observability", 
  }, 
})

resp.to_h outputs the following:
{
  alert: {
    name: "service-error-count-elevated", 
    account_id: "123456789012", 
    alert_arn: "arn:aws:cloudwatch:us-east-1:123456789012:alert/c3d4e5f67a8b4c9d8e0f1a2b3c4d5e6f", 
    alert_id: "c3d4e5f67a8b4c9d8e0f1a2b3c4d5e6f", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    description: "Alerts when a service logs more errors than its accepted rate.", 
    notification_rules: [
      {
        target: {
          metadata: {
            "channel" => "oncall-alerts", 
          }, 
          type: "slack", 
          arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
        }, 
        trigger: {
          state_values: [
            "CRITICAL", 
          ], 
        }, 
      }, 
    ], 
    notification_status: "ENABLED", 
    profile_id: "analyst-readonly", 
    rule: {
      telemetry_rule: {
        condition: {
          comparator: "GT", 
          critical_threshold: 200.0, 
          threshold_field: "error_count", 
          threshold_mode: "FIELD_VALUE", 
          warning_threshold: 50.0, 
        }, 
        evaluation: {
          interval_seconds: 300, 
          pending_duration_seconds: 600, 
          recovery_duration_seconds: 300, 
        }, 
        no_data: {
          treat_as: "NODATA", 
        }, 
        query: {
          expression: "SELECT resource['attributes']['service.name'] AS service, COUNT(*) AS error_count FROM \"logs.default\" WHERE severityText = 'ERROR' GROUP BY service", 
          language: "SQL", 
        }, 
      }, 
    }, 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Example: Create an alert on the number of matching rows


# The following example creates an alert whose threshold is compared against how many rows the query returns, rather than
# a value within them. COUNT_OF_RESULTS takes no thresholdField. Notifications are created disabled, so the alert
# evaluates and records state without sending anything, and an empty result set is treated as OK rather than as missing
# data. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.create_alert({
  name: "service-checkout-5xx-responses", 
  description: "Counts checkout responses that returned a server error.", 
  notifications_enabled: false, 
  profile_id: "analyst-readonly", 
  rule: {
    telemetry_rule: {
      condition: {
        comparator: "GT", 
        critical_threshold: 50.0, 
        threshold_mode: "COUNT_OF_RESULTS", 
        warning_threshold: 10.0, 
      }, 
      evaluation: {
        interval_seconds: 60, 
        pending_duration_seconds: 120, 
      }, 
      no_data: {
        treat_as: "OK", 
      }, 
      query: {
        expression: "SELECT * FROM \"logs.default\" WHERE resource['attributes']['service.name'] = 'checkout' AND attributes['http.response.status_code'] >= 500", 
        language: "SQL", 
      }, 
    }, 
  }, 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  alert: {
    name: "service-checkout-5xx-responses", 
    account_id: "123456789012", 
    alert_arn: "arn:aws:cloudwatch:us-east-1:123456789012:alert/d4e5f6a78b9c4d0e9f1a2b3c4d5e6f70", 
    alert_id: "d4e5f6a78b9c4d0e9f1a2b3c4d5e6f70", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    description: "Counts checkout responses that returned a server error.", 
    notification_status: "DISABLED", 
    profile_id: "analyst-readonly", 
    rule: {
      telemetry_rule: {
        condition: {
          comparator: "GT", 
          critical_threshold: 50.0, 
          threshold_mode: "COUNT_OF_RESULTS", 
          warning_threshold: 10.0, 
        }, 
        evaluation: {
          interval_seconds: 60, 
          pending_duration_seconds: 120, 
        }, 
        no_data: {
          treat_as: "OK", 
        }, 
        query: {
          expression: "SELECT * FROM \"logs.default\" WHERE resource['attributes']['service.name'] = 'checkout' AND attributes['http.response.status_code'] >= 500", 
          language: "SQL", 
        }, 
      }, 
    }, 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Example: Create an alert from a PromQL query


# The following example creates an alert from a PromQL expression instead of SQL. A PromQL rule compares against the
# series value, which is carried as the `value` field, so the condition is FIELD_VALUE with thresholdField set to `value`.
# Notifications go to an Amazon SNS topic, whose ARN is the topic itself rather than an integration. Payloads are shown as
# JSON; on the wire they are CBOR-encoded.

resp = client.create_alert({
  name: "checkout-error-rate-promql", 
  description: "Alerts on the checkout server error rate over a five-minute window.", 
  notification_rules: [
    {
      target: {
        type: "sns", 
        arn: "arn:aws:sns:us-east-1:123456789012:checkout-oncall", 
      }, 
      trigger: {
        state_values: [
          "WARNING", 
          "CRITICAL", 
        ], 
      }, 
    }, 
  ], 
  profile_id: "analyst-readonly", 
  rule: {
    telemetry_rule: {
      condition: {
        comparator: "GT", 
        critical_threshold: 0.1, 
        threshold_field: "value", 
        threshold_mode: "FIELD_VALUE", 
        warning_threshold: 0.05, 
      }, 
      evaluation: {
        interval_seconds: 300, 
        pending_duration_seconds: 300, 
      }, 
      no_data: {
        treat_as: "NODATA", 
      }, 
      query: {
        expression: "sum by (service_name) (rate(http_server_errors_total{service_name=\"checkout\"}[5m]))", 
        language: "PROMQL", 
      }, 
    }, 
  }, 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  alert: {
    name: "checkout-error-rate-promql", 
    account_id: "123456789012", 
    alert_arn: "arn:aws:cloudwatch:us-east-1:123456789012:alert/e5f6a78b9c0d4e1f8a2b3c4d5e6f7081", 
    alert_id: "e5f6a78b9c0d4e1f8a2b3c4d5e6f7081", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    description: "Alerts on the checkout server error rate over a five-minute window.", 
    notification_rules: [
      {
        target: {
          type: "sns", 
          arn: "arn:aws:sns:us-east-1:123456789012:checkout-oncall", 
        }, 
        trigger: {
          state_values: [
            "WARNING", 
            "CRITICAL", 
          ], 
        }, 
      }, 
    ], 
    notification_status: "ENABLED", 
    profile_id: "analyst-readonly", 
    rule: {
      telemetry_rule: {
        condition: {
          comparator: "GT", 
          critical_threshold: 0.1, 
          threshold_field: "value", 
          threshold_mode: "FIELD_VALUE", 
          warning_threshold: 0.05, 
        }, 
        evaluation: {
          interval_seconds: 300, 
          pending_duration_seconds: 300, 
        }, 
        no_data: {
          treat_as: "NODATA", 
        }, 
        query: {
          expression: "sum by (service_name) (rate(http_server_errors_total{service_name=\"checkout\"}[5m]))", 
          language: "PROMQL", 
        }, 
      }, 
    }, 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.create_alert({
  space_id: "SpaceId", # required
  profile_id: "ProfileId", # required
  name: "CreateAlertInputNameString", # required
  description: "CreateAlertInputDescriptionString",
  rule: { # required
    telemetry_rule: {
      query: {
        language: "SQL", # required, accepts SQL, PROMQL
        expression: "AlertRuleQueryExpressionString", # required
      },
      condition: {
        threshold_mode: "COUNT_OF_RESULTS", # accepts COUNT_OF_RESULTS, FIELD_VALUE
        threshold_field: "AlertConditionThresholdFieldString",
        comparator: "GT", # accepts GT, LT, GTE, LTE
        warning_threshold: 1.0,
        critical_threshold: 1.0,
      },
      evaluation: {
        interval_seconds: 1, # required
        pending_duration_seconds: 1,
        recovery_duration_seconds: 1,
      },
      no_data: {
        treat_as: "OK", # required, accepts OK, WARNING, CRITICAL, NODATA
      },
    },
    slo_rule: {
      slo_id: "SloId",
      condition: {
        burn_rate: {
          window_minutes: 1, # required
          short_window_minutes: 1,
          warning_threshold: 1.0,
          critical_threshold: 1.0,
        },
        error_budget: {
          warning_threshold: 1.0,
          critical_threshold: 1.0,
        },
      },
      evaluation: {
        interval_seconds: 1, # required
        pending_duration_seconds: 1,
        recovery_duration_seconds: 1,
      },
      no_data: {
        treat_as: "OK", # required, accepts OK, WARNING, CRITICAL, NODATA
      },
    },
  },
  notifications_enabled: false,
  tags: {
    "TagKey" => "TagValue",
  },
  notification_rules: [
    {
      trigger: { # required
        state_values: ["OK"], # accepts OK, WARNING, CRITICAL, NODATA
      },
      target: { # required
        type: "sns", # required, accepts sns, slack, pagerduty, investigation
        arn: "NotificationTargetArnString", # required
        metadata: {
          "NotificationTargetMetadataMapKeyString" => "NotificationTargetMetadataMapValueString",
        },
      },
    },
  ],
  client_token: "CreateAlertInputClientTokenString",
})

Response structure


resp.alert_arn #=> String
resp.alert.name #=> String
resp.alert.alert_id #=> String
resp.alert.description #=> String
resp.alert. #=> String
resp.alert.space_id #=> String
resp.alert.profile_id #=> String
resp.alert.rule.telemetry_rule.query.language #=> String, one of "SQL", "PROMQL"
resp.alert.rule.telemetry_rule.query.expression #=> String
resp.alert.rule.telemetry_rule.condition.threshold_mode #=> String, one of "COUNT_OF_RESULTS", "FIELD_VALUE"
resp.alert.rule.telemetry_rule.condition.threshold_field #=> String
resp.alert.rule.telemetry_rule.condition.comparator #=> String, one of "GT", "LT", "GTE", "LTE"
resp.alert.rule.telemetry_rule.condition.warning_threshold #=> Float
resp.alert.rule.telemetry_rule.condition.critical_threshold #=> Float
resp.alert.rule.telemetry_rule.evaluation.interval_seconds #=> Integer
resp.alert.rule.telemetry_rule.evaluation.pending_duration_seconds #=> Integer
resp.alert.rule.telemetry_rule.evaluation.recovery_duration_seconds #=> Integer
resp.alert.rule.telemetry_rule.no_data.treat_as #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.alert.rule.slo_rule.slo_id #=> String
resp.alert.rule.slo_rule.condition.burn_rate.window_minutes #=> Integer
resp.alert.rule.slo_rule.condition.burn_rate.short_window_minutes #=> Integer
resp.alert.rule.slo_rule.condition.burn_rate.warning_threshold #=> Float
resp.alert.rule.slo_rule.condition.burn_rate.critical_threshold #=> Float
resp.alert.rule.slo_rule.condition.error_budget.warning_threshold #=> Float
resp.alert.rule.slo_rule.condition.error_budget.critical_threshold #=> Float
resp.alert.rule.slo_rule.evaluation.interval_seconds #=> Integer
resp.alert.rule.slo_rule.evaluation.pending_duration_seconds #=> Integer
resp.alert.rule.slo_rule.evaluation.recovery_duration_seconds #=> Integer
resp.alert.rule.slo_rule.no_data.treat_as #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.alert.notification_status #=> String, one of "ENABLED", "DISABLED"
resp.alert.state.value #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.alert.state.transitioned_at #=> Time
resp.alert.state.contributor_summary.warning_count #=> Integer
resp.alert.state.contributor_summary.critical_count #=> Integer
resp.alert.state.data.threshold_breached #=> Float
resp.alert.notification_rules #=> Array
resp.alert.notification_rules[0].trigger.state_values #=> Array
resp.alert.notification_rules[0].trigger.state_values[0] #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.alert.notification_rules[0].target.type #=> String, one of "sns", "slack", "pagerduty", "investigation"
resp.alert.notification_rules[0].target.arn #=> String
resp.alert.notification_rules[0].target. #=> Hash
resp.alert.notification_rules[0].target.["NotificationTargetMetadataMapKeyString"] #=> String
resp.alert.created_at #=> Time
resp.alert.updated_at #=> Time
resp.alert.alert_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space to create the alert in.

  • :profile_id (required, String) —

    The ID of the access profile the alert uses to evaluate its query and execute notifications. The caller supplies it: there is no managed alert profile, and the service does not pick one on the caller's behalf.

  • :name (required, String) —

    Alert name, for display. Max 256 (the AlarmName budget). Not the alert's identity: the backend mints a separate uuid as the AlertId, so the name need not be unique within a space and addressing an alert never depends on it. UpdateAlert accepts a new name to rename the alert.

  • :description (String) —

    An optional description of the alert.

  • :rule (required, Types::Rule) —

    The rule that defines how the alert is evaluated.

  • :notifications_enabled (Boolean) —

    Whether actions (notifications) are enabled for this alert. Defaults to true when omitted.

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

    The tags to associate with the alert.

  • :notification_rules (Array<Types::NotificationRule>) —

    The notification rules that determine when and where notifications are sent.

  • :client_token (String) —

    Idempotency token for safe retries. Retrying with the same token within the idempotency window returns the original alert instead of creating a duplicate.

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

Returns:

See Also:



1673
1674
1675
1676
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 1673

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

#create_domain(params = {}) ⇒ Types::CreateDomainOutput

Creates a domain with identity provider configuration.

Use GetDomain to retrieve the domain, UpdateDomain to change its configuration, and CreateSpace to add spaces within it.

Examples:

Example: Create a domain


# The following example creates an Identity Center domain and configures it with an Identity Center instance. The name
# must be 3-63 characters of lowercase letters, numbers, and hyphens, and the endpoint URLs are derived from it. Payloads
# are shown as JSON; on the wire they are CBOR-encoded.

resp = client.create_domain({
  name: "prod-observability", 
  client_token: "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73", 
  identity_provider_configuration: {
    identity_center_configuration: {
      identity_center_instance_arn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", 
    }, 
  }, 
  identity_providers: [
    "IDC", 
  ], 
  tags: {
    "Team" => "observability", 
  }, 
})

resp.to_h outputs the following:
{
  domain: {
    name: "prod-observability", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    custom_endpoint_urls: [
      "https://prod-observability.cloudwatch-omni.global.app.aws", 
    ], 
    domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:domain/d-1a2b3c4d5e", 
    domain_endpoint_url: "https://d-1a2b3c4d5e.cloudwatch-omni.global.app.aws", 
    domain_id: "d-1a2b3c4d5e", 
    identity_center_application_arn: "arn:aws:sso::123456789012:application/ssoins-1234567890abcdef/apl-0f9e8d7c6b5a4938", 
    identity_provider_configuration: {
      identity_center_configuration: {
        identity_center_instance_arn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", 
      }, 
    }, 
    identity_providers: [
      "IDC", 
    ], 
    region: "us-east-1", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.create_domain({
  name: "CreateDomainInputNameString", # required
  identity_providers: ["IAM"], # required, accepts IAM, IDC
  identity_provider_configuration: {
    identity_center_configuration: {
      identity_center_instance_arn: "IdentityCenterInstanceArn",
      cross_region_configuration: {
        enabled: false, # required
      },
    },
  },
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.domain.domain_id #=> String
resp.domain.domain_arn #=> String
resp.domain.name #=> String
resp.domain.identity_providers #=> Array
resp.domain.identity_providers[0] #=> String, one of "IAM", "IDC"
resp.domain.identity_provider_configuration.identity_center_configuration.identity_center_instance_arn #=> String
resp.domain.identity_provider_configuration.identity_center_configuration.cross_region_configuration.enabled #=> Boolean
resp.domain.domain_endpoint_url #=> String
resp.domain.custom_endpoint_urls #=> Array
resp.domain.custom_endpoint_urls[0] #=> String
resp.domain.identity_center_application_arn #=> String
resp.domain.region #=> String
resp.domain.created_at #=> Time
resp.domain.updated_at #=> Time
resp.domain.status #=> String, one of "ACTIVE"

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String) —

    A name that identifies the domain. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.

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

    The identity providers to configure for the domain.

  • :identity_provider_configuration (Types::IdentityProviderConfiguration) —

    Identity provider configuration for the domain.

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

    The tags to associate with the domain.

  • :client_token (String) —

    Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.

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

Returns:

See Also:



1798
1799
1800
1801
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 1798

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

#create_domain_access_grant_for_organization(params = {}) ⇒ Types::CreateDomainAccessGrantForOrganizationOutput

Creates an AccessGrant that authorizes a principal to administer an organization domain.

Examples:

Example: Create an organization domain access grant


# The following example grants an Identity Center user administrative access to an organization domain. Payloads are shown
# as JSON; on the wire they are CBOR-encoded.

resp = client.create_domain_access_grant_for_organization({
  name: "org-domain-admin", 
  client_token: "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73", 
  domain_id: "d-1a2b3c4d5e", 
  permission: "ADMIN", 
  principal: {
    principal_id: "94b6c7d8-1a2b-4c3d-9e4f-5a6b7c8d9e0f", 
    principal_type: "IDC_USER", 
  }, 
  tags: {
    "Team" => "observability", 
  }, 
})

resp.to_h outputs the following:
{
  access_grant: {
    name: "org-domain-admin", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    created_by: "arn:aws:iam::123456789012:role/ObservabilityAdmin", 
    domain_id: "d-1a2b3c4d5e", 
    grant_arn: "arn:aws:cloudwatch:us-east-1:123456789012:organization-access-grant/7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
    grant_id: "7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
    grant_type: "CUSTOMER_MANAGED", 
    permission: "ADMIN", 
    principal: {
      principal_id: "94b6c7d8-1a2b-4c3d-9e4f-5a6b7c8d9e0f", 
      principal_type: "IDC_USER", 
    }, 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.create_domain_access_grant_for_organization({
  domain_id: "DomainId", # required
  name: "CreateDomainAccessGrantForOrganizationInputNameString", # required
  principal: { # required
    principal_type: "IDC_USER", # required, accepts IDC_USER, IDC_GROUP, IAM_USER, IAM_ROLE, IAM_ROOT
    principal_id: "OrganizationPrincipalId",
    principal_attributes: [
      {
        key: "AccessGrantPrincipalAttributeKeyString", # required
        value: "AccessGrantPrincipalAttributeValueString", # required
      },
    ],
  },
  permission: "ADMIN", # required, accepts ADMIN
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.access_grant.grant_id #=> String
resp.access_grant.grant_arn #=> String
resp.access_grant.name #=> String
resp.access_grant.domain_id #=> String
resp.access_grant.principal.principal_type #=> String, one of "IDC_USER", "IDC_GROUP", "IAM_USER", "IAM_ROLE", "IAM_ROOT"
resp.access_grant.principal.principal_id #=> String
resp.access_grant.principal.principal_attributes #=> Array
resp.access_grant.principal.principal_attributes[0].key #=> String
resp.access_grant.principal.principal_attributes[0].value #=> String
resp.access_grant.permission #=> String, one of "ADMIN"
resp.access_grant.grant_type #=> String, one of "SERVICE_MANAGED", "CUSTOMER_MANAGED"
resp.access_grant.created_by #=> String
resp.access_grant.created_at #=> Time
resp.access_grant.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String) —

    The ID of the organization domain to create the grant on.

  • :name (required, String) —

    A name that identifies the access grant.

  • :principal (required, Types::OrganizationAccessGrantPrincipal) —

    The principal receiving the grant.

  • :permission (required, String) —

    The permission to grant.

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

    The tags to associate with the access grant.

  • :client_token (String) —

    Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.

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

Returns:

See Also:



1914
1915
1916
1917
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 1914

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

#create_domain_for_organization(params = {}) ⇒ Types::CreateDomainForOrganizationOutput

Creates an organization-scoped domain for the caller's AWS Organization. Only the organization's management account can call this operation.

Examples:

Example: Create an organization domain


# The following example creates an organization-scoped domain from the organization's management account, configures it
# with an Identity Center instance, and supplies an IAM role in the management account for domain access. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.create_domain_for_organization({
  name: "prod-observability-org", 
  client_token: "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73", 
  domain_access_role_arn: "arn:aws:iam::123456789012:role/CloudWatchOrganizationDomainAccessRole", 
  identity_provider_configuration: {
    identity_center_configuration: {
      identity_center_instance_arn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", 
    }, 
  }, 
  identity_providers: [
    "IDC", 
  ], 
  tags: {
    "Team" => "observability", 
  }, 
})

resp.to_h outputs the following:
{
  organization_domain: {
    name: "prod-observability-org", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    custom_endpoint_urls: [
      "https://prod-observability-org.cloudwatch-omni.global.app.aws", 
    ], 
    domain_access_role_arn: "arn:aws:iam::123456789012:role/CloudWatchOrganizationDomainAccessRole", 
    domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:organization-domain/d-9z8y7x6w5v", 
    domain_endpoint_url: "https://d-9z8y7x6w5v.cloudwatch-omni.global.app.aws", 
    domain_id: "d-9z8y7x6w5v", 
    identity_center_application_arn: "arn:aws:sso::123456789012:application/ssoins-1234567890abcdef/apl-0f9e8d7c6b5a4938", 
    identity_provider_configuration: {
      identity_center_configuration: {
        identity_center_instance_arn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", 
      }, 
    }, 
    identity_providers: [
      "IDC", 
    ], 
    organization_id: "o-a1b2c3d4e5", 
    owner_account_id: "123456789012", 
    region: "us-east-1", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.create_domain_for_organization({
  name: "CreateDomainForOrganizationInputNameString", # required
  identity_providers: ["IAM"], # required, accepts IAM, IDC
  identity_provider_configuration: {
    identity_center_configuration: {
      identity_center_instance_arn: "IdentityCenterInstanceArn",
      cross_region_configuration: {
        enabled: false, # required
      },
    },
  },
  domain_access_role_arn: "IamRoleArn", # required
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.organization_domain.domain_id #=> String
resp.organization_domain.domain_arn #=> String
resp.organization_domain.name #=> String
resp.organization_domain.domain_endpoint_url #=> String
resp.organization_domain.custom_endpoint_urls #=> Array
resp.organization_domain.custom_endpoint_urls[0] #=> String
resp.organization_domain.organization_id #=> String
resp.organization_domain. #=> String
resp.organization_domain.identity_providers #=> Array
resp.organization_domain.identity_providers[0] #=> String, one of "IAM", "IDC"
resp.organization_domain.identity_provider_configuration.identity_center_configuration.identity_center_instance_arn #=> String
resp.organization_domain.identity_provider_configuration.identity_center_configuration.cross_region_configuration.enabled #=> Boolean
resp.organization_domain.identity_center_application_arn #=> String
resp.organization_domain.region #=> String
resp.organization_domain.status #=> String, one of "ACTIVE"
resp.organization_domain.domain_access_role_arn #=> String
resp.organization_domain.created_at #=> Time
resp.organization_domain.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String) —

    A name that identifies the organization domain. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.

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

    The identity providers to configure for the domain.

  • :identity_provider_configuration (Types::IdentityProviderConfiguration) —

    Identity provider configuration for the domain.

  • :domain_access_role_arn (required, String) —

    The ARN of an IAM role in the management account used for domain access. You must create this role, and its trust policy must allow the service principal to assume it.

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

    The tags to associate with the domain.

  • :client_token (String) —

    Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.

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

Returns:

See Also:



2051
2052
2053
2054
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 2051

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

#create_experiment(params = {}) ⇒ Types::CreateExperimentOutput

Creates an experiment.

An experiment defines the target its runs are tested against and the configuration for its type; each run specifies the dataset it tests and the evaluators it is scored with. The name, description, and configuration can be changed later, but the target and type cannot.

Use GetExperiment to retrieve the experiment, ListExperiments to enumerate experiments, UpdateExperiment to modify it, and DeleteExperiment to remove it.

Examples:

Example: Create a DATASET experiment for an AgentCore Runtime agent


# The following example creates a DATASET experiment that tests an AgentCore Runtime agent. Its runs write their records
# to the results log group using the execution role. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.create_experiment({
  name: "Travel agent regression suite", 
  client_token: "3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d", 
  description: "Checks booking accuracy before each release.", 
  experiment_config: {
    dataset: {
      execution_role_arn: "arn:aws:iam::123456789012:role/ExperimentExecutionRole", 
      results_log_group: "/experiments/travel-agent/results", 
    }, 
  }, 
  experiment_type: "DATASET", 
  tags: {
    "team" => "travel", 
  }, 
  target: {
    name: "Travel agent", 
    definition: {
      agent_core_runtime: {
        runtime_arn: "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/travel_agent-a1B2c3D4e5", 
      }, 
    }, 
    environment: "staging", 
    service_name: "travel-agent", 
  }, 
})

resp.to_h outputs the following:
{
  experiment: {
    name: "Travel agent regression suite", 
    created_at: Time.parse("2026-11-10T14:22:31Z"), 
    description: "Checks booking accuracy before each release.", 
    experiment_arn: "arn:aws:cloudwatch:us-east-1:123456789012:experiment/exp-01JC8Z5V7Q3M9K2T4R6W8Y0ABC", 
    experiment_config: {
      dataset: {
        execution_role_arn: "arn:aws:iam::123456789012:role/ExperimentExecutionRole", 
        results_log_group: "/experiments/travel-agent/results", 
      }, 
    }, 
    experiment_id: "exp-01JC8Z5V7Q3M9K2T4R6W8Y0ABC", 
    experiment_type: "DATASET", 
    run_count: 0, 
    target: {
      name: "Travel agent", 
      definition: {
        agent_core_runtime: {
          runtime_arn: "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/travel_agent-a1B2c3D4e5", 
        }, 
      }, 
      environment: "staging", 
      service_name: "travel-agent", 
    }, 
    target_run_count: 0, 
    updated_at: Time.parse("2026-11-10T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.create_experiment({
  client_token: "ClientToken",
  name: "ExperimentName",
  description: "Description",
  target: { # required
    name: "ExperimentTargetNameString",
    service_name: "ExperimentTargetServiceNameString", # required
    environment: "ExperimentTargetEnvironmentString", # required
    definition: { # required
      agent_core_runtime: {
        runtime_arn: "AgentCoreRuntimeDefinitionRuntimeArnString", # required
      },
      https_endpoint: {
        base_url: "HttpsEndpointDefinitionBaseUrlString", # required
      },
      custom: {
      },
    },
  },
  experiment_type: "DATASET", # required, accepts DATASET
  experiment_config: { # required
    dataset: {
      execution_role_arn: "ExecutionRoleArn", # required
      results_log_group: "LogGroupName", # required
      trace_log_groups: ["LogGroupName"],
      collect_trace_stats: false,
    },
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.experiment.experiment_id #=> String
resp.experiment.experiment_arn #=> String
resp.experiment.name #=> String
resp.experiment.description #=> String
resp.experiment.target.name #=> String
resp.experiment.target.service_name #=> String
resp.experiment.target.environment #=> String
resp.experiment.target.definition.agent_core_runtime.runtime_arn #=> String
resp.experiment.target.definition.https_endpoint.base_url #=> String
resp.experiment.experiment_type #=> String, one of "DATASET"
resp.experiment.experiment_config.dataset.execution_role_arn #=> String
resp.experiment.experiment_config.dataset.results_log_group #=> String
resp.experiment.experiment_config.dataset.trace_log_groups #=> Array
resp.experiment.experiment_config.dataset.trace_log_groups[0] #=> String
resp.experiment.experiment_config.dataset.collect_trace_stats #=> Boolean
resp.experiment.run_count #=> Integer
resp.experiment.target_run_count #=> Integer
resp.experiment.latest_run.run_id #=> String
resp.experiment.latest_run.source #=> String, one of "REPORTED", "HOSTED"
resp.experiment.latest_run.status #=> String, one of "RUNNING", "STOPPING", "COMPLETED", "DID_NOT_FINISH"
resp.experiment.latest_run.status_reason #=> String, one of "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "RESULTS_WRITE_FAILED"
resp.experiment.latest_run.producer_kind #=> String, one of "SDK", "CUSTOM"
resp.experiment.latest_run.target_version #=> String
resp.experiment.latest_run.dataset_source #=> String, one of "AGENTCORE", "FILE", "OTHER"
resp.experiment.latest_run.dataset_id #=> String
resp.experiment.latest_run.dataset_name #=> String
resp.experiment.latest_run.dataset_version #=> String
resp.experiment.latest_run.rule_name #=> String
resp.experiment.latest_run.rule_content_hash #=> String
resp.experiment.latest_run. #=> Hash
resp.experiment.latest_run.["RunMetadataMapKeyString"] #=> String
resp.experiment.latest_run.description #=> String
resp.experiment.latest_run.trace_stats.status #=> String, one of "PENDING", "AVAILABLE", "UNAVAILABLE"
resp.experiment.latest_run.trace_stats.status_reason #=> String, one of "NO_TRACES", "SPANS_NOT_FOUND", "ACCESS_DENIED", "SCAN_LIMIT", "QUERY_FAILED", "INTERNAL_ERROR"
resp.experiment.latest_run.trace_stats.cases_read #=> Integer
resp.experiment.latest_run.trace_stats.sampled #=> Boolean
resp.experiment.latest_run.trace_stats.cases_with_spans #=> Integer
resp.experiment.latest_run.trace_stats.attributes #=> Array
resp.experiment.latest_run.trace_stats.attributes[0].name #=> String, one of "MODEL", "TOOL_NAME", "SYSTEM_INSTRUCTIONS"
resp.experiment.latest_run.trace_stats.attributes[0].version #=> Integer
resp.experiment.latest_run.trace_stats.attributes[0].distinct #=> Integer
resp.experiment.latest_run.trace_stats.attributes[0].values_hash #=> String
resp.experiment.latest_run.trace_stats.attributes[0].values #=> Array
resp.experiment.latest_run.trace_stats.attributes[0].values[0].value #=> String
resp.experiment.latest_run.trace_stats.attributes[0].values[0].cases #=> Integer
resp.experiment.latest_run.trace_stats.metrics #=> Array
resp.experiment.latest_run.trace_stats.metrics[0].name #=> String, one of "MODEL_CALLS", "TOOL_CALLS", "INPUT_TOKENS", "OUTPUT_TOKENS", "TURN_LATENCY_MS", "FAILED"
resp.experiment.latest_run.trace_stats.metrics[0].version #=> Integer
resp.experiment.latest_run.trace_stats.metrics[0].count #=> Integer
resp.experiment.latest_run.trace_stats.metrics[0].mean #=> Float
resp.experiment.latest_run.trace_stats.metrics[0].p50 #=> Float
resp.experiment.latest_run.trace_stats.metrics[0].p90 #=> Float
resp.experiment.latest_run.trace_stats.computed_at #=> Time
resp.experiment.latest_run.verdict #=> String, one of "PASSED", "FAILED", "DID_NOT_FINISH"
resp.experiment.latest_run.verdict_reason_code #=> String, one of "PASSED", "NOT_SCORED_RATE_ABOVE_MAX", "PASS_RATE_BELOW_MIN", "AVERAGE_BELOW_MIN", "AVERAGE_ABOVE_MAX", "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "BELOW_CONTROL", "REGRESSED_CASES_ABOVE_MAX", "FIXED_CASES_BELOW_MIN", "UNPAIRED_CASE_RATE_ABOVE_MAX", "SCORE_REGRESSED", "CONTROL_DID_NOT_FINISH", "RESULTS_WRITE_FAILED"
resp.experiment.latest_run.verdict_reason #=> String
resp.experiment.latest_run.pass_rate #=> Float
resp.experiment.latest_run.control_pass_rate #=> Float
resp.experiment.latest_run.role #=> String, one of "TARGET", "CONTROL"
resp.experiment.latest_run.control_run_id #=> String
resp.experiment.latest_run.cases_total #=> Integer
resp.experiment.latest_run.passed #=> Integer
resp.experiment.latest_run.created_at #=> Time
resp.experiment.latest_run.completed_at #=> Time
resp.experiment.baseline_run_id #=> String
resp.experiment.created_at #=> Time
resp.experiment.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String) —

    Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a second experiment.

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

  • :name (String) —

    The name of the experiment.

  • :description (String) —

    An optional description of the experiment. Up to 1,024 characters, with no control characters.

  • :target (required, Types::ExperimentTarget) —

    The target that the experiment tests, including its service name, environment, and definition. Cannot be changed after the experiment is created.

  • :experiment_type (required, String) —

    The type of the experiment. Cannot be changed after the experiment is created.

  • :experiment_config (required, Types::ExperimentConfig) —

    The configuration for the experiment's type. Its member must match experimentType: a DATASET experiment takes experimentConfig.dataset. The caller must have iam:PassRole on the execution role, the role must be assumable, and the results log group must exist and use the Standard log class.

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

    The tags to associate with the experiment. Tag keys that begin with the reserved aws: prefix are rejected with a ValidationException.

Returns:

See Also:



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

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

#create_integration(params = {}) ⇒ Types::CreateIntegrationOutput

Creates an integration with a third-party provider. Returns the integration identifier and its initial status; when the provider requires interactive consent, an authorization URL is returned for the user to complete setup.

Examples:

Example: Create an AWS integration


# The following example creates an AWS_INTEGRATION named my-aws-integration, authorized by an IAM role. Payloads are shown
# as JSON; on the wire they are CBOR-encoded.

resp = client.create_integration({
  name: "my-aws-integration", 
  client_token: "b3f8c7d6-5b4a-4c3d-9e2f-1a0b2c3d4e5f", 
  integration_type: "AWS_INTEGRATION", 
  role_arn: "arn:aws:iam::123456789012:role/service-role/CloudWatchIntegrationRole", 
})

resp.to_h outputs the following:
{
  integration: {
    name: "my-aws-integration", 
    created_at: Time.parse("2026-09-16T00:03:00Z"), 
    integration_arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    integration_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    integration_type: "AWS_INTEGRATION", 
    role_arn: "arn:aws:iam::123456789012:role/service-role/CloudWatchIntegrationRole", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-16T00:03:00Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.create_integration({
  integration_type: "AWS_CONFIG_SLREC", # required, accepts AWS_CONFIG_SLREC, AWS_CONFIG_AZURE_SLREC, GITHUB, SLACK, EXTERNAL_AGENT, AWS_INTEGRATION, PAGERDUTY, GITHUB_ENTERPRISE
  name: "CreateIntegrationInputNameString", # required
  credential: {
    oauth_code_credential: {
      auth_code: "OAuthCodeCredentialAuthCodeString", # required
    },
    oauth_client_credential: {
      client_id: "String", # required
      client_secret: "SensitiveString", # required
      provider_id: "String",
    },
    api_key_credential: {
      api_key_value: "ApiKeyCredentialApiKeyValueString", # required
    },
  },
  integration_attributes: {
    "CreateIntegrationInputIntegrationAttributesMapKeyString" => "CreateIntegrationInputIntegrationAttributesMapValueString",
  },
  role_arn: "String",
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "CreateIntegrationInputClientTokenString",
})

Response structure


resp.integration.integration_id #=> String
resp.integration.integration_arn #=> String
resp.integration.integration_type #=> String, one of "AWS_CONFIG_SLREC", "AWS_CONFIG_AZURE_SLREC", "GITHUB", "SLACK", "EXTERNAL_AGENT", "AWS_INTEGRATION", "PAGERDUTY", "GITHUB_ENTERPRISE"
resp.integration.name #=> String
resp.integration.status #=> String, one of "ACTIVE", "DELETED", "PENDING", "PENDING_OAUTH", "ERROR", "FAILED"
resp.integration.auth_type #=> String, one of "NONE", "OAUTH2", "API_KEY"
resp.integration.credential_arn #=> String
resp.integration.role_arn #=> String
resp.integration.integration_attributes #=> Hash
resp.integration.integration_attributes["StringMapKeyString"] #=> String
resp.integration.authorization_url #=> String
resp.integration.error_message #=> String
resp.integration.created_at #=> Time
resp.integration.updated_at #=> Time
resp.integration.scope #=> String, one of "ACCOUNT", "ORGANIZATION"

Parameters:

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

    ({})

Options Hash (params):

  • :integration_type (required, String) —

    The type of third-party provider to integrate with.

  • :name (required, String) —

    The name for the new integration; unique within the account.

  • :credential (Types::IntegrationCredential) —

    The credential used to authenticate with the third-party provider.

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

    Provider-specific attributes to associate with the integration.

  • :role_arn (String) —

    The Amazon Resource Name of the IAM role assumed to access the integration.

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

    Tags to apply to the integration at creation time (Tagris tag-on-create).

  • :client_token (String) —

    Idempotency token for safe retries. Retrying with the same token returns the original integration instead of creating a duplicate.

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

Returns:

See Also:



2396
2397
2398
2399
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 2396

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

#create_lookup(params = {}) ⇒ Types::CreateLookupResponse

Creates a lookup table from CSV content.

A lookup table is a named set of rows that telemetry queries can join against. Every column is stored as a string. Lookup table names must be unique within the account and Region.

Examples:

Example: Create a lookup table


# The following example creates a lookup table from CSV content. The first CSV record is the header and supplies the
# column names. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.create_lookup({
  name: "service_owners", 
  body: "service,team\ncheckout,payments\nsearch,discovery\n", 
  client_token: "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73", 
  description: "Owning team per service", 
  tags: {
    "Team" => "observability", 
  }, 
})

resp.to_h outputs the following:
{
  arn: "arn:aws:cloudwatch:us-east-1:123456789012:lookup/service_owners/3k7f2m9qx4pd8w1n6v0b5j2tz", 
  created_at: Time.parse("2026-10-20T14:22:31Z"), 
}

Request syntax with placeholder values


resp = client.create_lookup({
  name: "LookupName", # required
  description: "LookupDescription",
  body: "LookupBody",
  query_id: "LookupQueryId",
  kms_key_arn: "KmsKeyArn",
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.arn #=> String
resp.created_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String) —

    The name of the lookup table. Lookup table names must be unique within the account and Region.

  • :description (String) —

    A description of the lookup table. An empty string is equivalent to omitting this field: the table is created with no description.

  • :body (String) —

    The CSV content of the lookup table. Exactly one of body and queryId must be specified.

  • :query_id (String) —

    The identifier of a query whose results become the lookup table's content.

  • :kms_key_arn (String) —

    The ARN of a customer managed KMS key used to encrypt the lookup table's content.

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

    Resource tags.

  • :client_token (String) —

    Idempotency token for safe retries. Retrying with the same token returns the original lookup table instead of creating a duplicate.

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

Returns:

See Also:



2487
2488
2489
2490
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 2487

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

#create_omni_dashboard(params = {}) ⇒ Types::CreateOmniDashboardOutput

Creates a new dashboard within a space.

Use GetOmniDashboard and ListOmniDashboards to retrieve dashboards, UpdateOmniDashboard to modify one, and DeleteOmniDashboard to remove it.

Examples:

Example: Create a dashboard


# The following example creates a dashboard in a space from a JSON dashboard definition. Payloads are shown as JSON; on
# the wire they are CBOR-encoded.

resp = client.create_omni_dashboard({
  name: "service-health-overview", 
  body: "{\"panels\":[{\"type\":\"markdown\",\"title\":\"Overview\",\"layout\":{\"x\":0,\"y\":0,\"w\":60,\"h\":120},\"config\":{\"content\":\"Service health for OrderProcessor.\"}},{\"type\":\"explore\",\"title\":\"Lambda errors\",\"layout\":{\"x\":0,\"y\":120,\"w\":60,\"h\":400},\"config\":{\"queries\":[{\"queryId\":\"A\",\"queryLanguage\":\"promql\",\"queryString\":\"sum(rate(aws_lambda_errors_sum{function_name=\\\"OrderProcessor\\\"}[5m]))\"}],\"visualization\":\"line\"}}]}", 
  client_token: "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73", 
  description: "Overview of service health metrics.", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  tags: {
    "Team" => "observability", 
  }, 
})

resp.to_h outputs the following:
{
  omni_dashboard: {
    name: "service-health-overview", 
    arn: "arn:aws:cloudwatch:us-east-1:123456789012:omni-dashboard/c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
    body: "{\"panels\":[{\"type\":\"markdown\",\"title\":\"Overview\",\"layout\":{\"x\":0,\"y\":0,\"w\":60,\"h\":120},\"config\":{\"content\":\"Service health for OrderProcessor.\"}},{\"type\":\"explore\",\"title\":\"Lambda errors\",\"layout\":{\"x\":0,\"y\":120,\"w\":60,\"h\":400},\"config\":{\"queries\":[{\"queryId\":\"A\",\"queryLanguage\":\"promql\",\"queryString\":\"sum(rate(aws_lambda_errors_sum{function_name=\\\"OrderProcessor\\\"}[5m]))\"}],\"visualization\":\"line\"}}]}", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    created_by: "arn:aws:iam::123456789012:role/ObservabilityAdmin", 
    dashboard_id: "c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
    description: "Overview of service health metrics.", 
    tags: {
      "Team" => "observability", 
    }, 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.create_omni_dashboard({
  space_id: "SpaceId", # required
  name: "CreateOmniDashboardInputNameString", # required
  body: "CreateOmniDashboardInputBodyString", # required
  description: "CreateOmniDashboardInputDescriptionString",
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.omni_dashboard.dashboard_id #=> String
resp.omni_dashboard.arn #=> String
resp.omni_dashboard.name #=> String
resp.omni_dashboard.body #=> String
resp.omni_dashboard.created_by #=> String
resp.omni_dashboard.description #=> String
resp.omni_dashboard.tags #=> Hash
resp.omni_dashboard.tags["TagKey"] #=> String
resp.omni_dashboard.created_at #=> Time
resp.omni_dashboard.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space to create the dashboard in.

  • :name (required, String) —

    A name that identifies the dashboard.

  • :body (required, String) —

    The dashboard definition, as a JSON document. Maximum 1 MiB.

  • :description (String) —

    An optional description of the dashboard.

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

    The tags to associate with the dashboard.

  • :client_token (String) —

    Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.

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

Returns:

See Also:



2588
2589
2590
2591
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 2588

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

#create_omni_slo(params = {}) ⇒ Types::CreateOmniSloOutput

Creates a service level objective (SLO) within a space.

The SLO measures a service against a reliability target over a time window.

Examples:

Example: Create a request-based SLO


# The following example creates an SLO that 99.9 percent of checkout API requests succeed over a rolling 30 days, and
# enters the WARNING state once 75 percent of the error budget is consumed. The good and total queries count events over
# the range the service substitutes for $__interval. The client token makes a retry return this SLO instead of creating a
# second one. A new SLO has not been evaluated yet, so the response has no state. Payloads are shown as JSON; on the wire
# they are CBOR-encoded.

resp = client.create_omni_slo({
  name: "checkout-api-availability", 
  client_token: "3f1c9a2e-7b4d-4e8a-9c6f-1d2e3f4a5b6c", 
  description: "99.9 percent of checkout API requests succeed over a rolling 30 days.", 
  objective: {
    target: 99.9, 
    time_window: {
      rolling: {
        days: 30, 
      }, 
    }, 
    warning_budget_consumed_ratio: 0.75, 
  }, 
  service_attributes: {
    cloud_account_id: "123456789012", 
    cloud_provider: "aws", 
    cloud_region: "us-east-1", 
    deployment_environment_name: "prod", 
    service_name: "checkout-api", 
    service_namespace: "retail", 
  }, 
  sli: {
    events: {
      good: {
        expression: "sum(increase({\"http.server.request.duration_count\", \"service.name\"=\"checkout-api\", \"http.response.status_code\"!~\"5..\"}[$__interval]))", 
        language: "PROMQL", 
      }, 
      total: {
        expression: "sum(increase({\"http.server.request.duration_count\", \"service.name\"=\"checkout-api\"}[$__interval]))", 
        language: "PROMQL", 
      }, 
    }, 
  }, 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  tags: {
    "team" => "payments", 
  }, 
})

resp.to_h outputs the following:
{
  slo: {
    name: "checkout-api-availability", 
    account_id: "123456789012", 
    description: "99.9 percent of checkout API requests succeed over a rolling 30 days.", 
    objective: {
      target: 99.9, 
      time_window: {
        rolling: {
          days: 30, 
        }, 
      }, 
      warning_budget_consumed_ratio: 0.75, 
    }, 
    revision: 1, 
    service_attributes: {
      cloud_account_id: "123456789012", 
      cloud_provider: "aws", 
      cloud_region: "us-east-1", 
      deployment_environment_name: "prod", 
      service_name: "checkout-api", 
      service_namespace: "retail", 
    }, 
    sli: {
      events: {
        good: {
          expression: "sum(increase({\"http.server.request.duration_count\", \"service.name\"=\"checkout-api\", \"http.response.status_code\"!~\"5..\"}[$__interval]))", 
          language: "PROMQL", 
        }, 
        total: {
          expression: "sum(increase({\"http.server.request.duration_count\", \"service.name\"=\"checkout-api\"}[$__interval]))", 
          language: "PROMQL", 
        }, 
      }, 
    }, 
    slo_arn: "arn:aws:cloudwatch:us-east-1:123456789012:omni-slo/9f8e7d6c5b4a49382716051a2b3c4d5e", 
    slo_id: "9f8e7d6c5b4a49382716051a2b3c4d5e", 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    updated_at: Time.parse("2026-11-02T09:15:42Z"), 
  }, 
}

Example: Create a time-slice SLO over a calendar week


# The following example creates an SLO that judges each 1-minute period good when its p99 latency is at most 300
# milliseconds, with a target of 99.9 percent of periods in each calendar week, starting on Monday in the America/New_York
# time zone. The error budget is counted in periods and restarts at each week boundary. No warning ratio is set, so the
# SLO is never in the WARNING state. A new SLO has not been evaluated yet, so the response has no state. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.create_omni_slo({
  name: "checkout-api-latency-p99", 
  objective: {
    target: 99.9, 
    time_window: {
      calendar: {
        time_zone: "America/New_York", 
        unit: "WEEK", 
        week_start_day: "MONDAY", 
      }, 
    }, 
  }, 
  service_attributes: {
    deployment_environment_name: "prod", 
    service_name: "checkout-api", 
  }, 
  sli: {
    periods: {
      good: {
        comparator: "LTE", 
        threshold: 0.3, 
      }, 
      period_minutes: 1, 
      query: {
        expression: "histogram_quantile(0.99, sum by (le) (rate({\"http.server.request.duration_bucket\", \"service.name\"=\"checkout-api\"}[$__interval])))", 
        language: "PROMQL", 
      }, 
    }, 
  }, 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  slo: {
    name: "checkout-api-latency-p99", 
    account_id: "123456789012", 
    objective: {
      target: 99.9, 
      time_window: {
        calendar: {
          time_zone: "America/New_York", 
          unit: "WEEK", 
          week_start_day: "MONDAY", 
        }, 
      }, 
    }, 
    revision: 1, 
    service_attributes: {
      deployment_environment_name: "prod", 
      service_name: "checkout-api", 
    }, 
    sli: {
      periods: {
        good: {
          comparator: "LTE", 
          threshold: 0.3, 
        }, 
        period_minutes: 1, 
        query: {
          expression: "histogram_quantile(0.99, sum by (le) (rate({\"http.server.request.duration_bucket\", \"service.name\"=\"checkout-api\"}[$__interval])))", 
          language: "PROMQL", 
        }, 
      }, 
    }, 
    slo_arn: "arn:aws:cloudwatch:us-east-1:123456789012:omni-slo/7a6b5c4d3e2f41a0b9c8d7e6f5a4b3c2", 
    slo_id: "7a6b5c4d3e2f41a0b9c8d7e6f5a4b3c2", 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    updated_at: Time.parse("2026-11-02T09:20:05Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.create_omni_slo({
  space_id: "SpaceId", # required
  name: "SloName", # required
  description: "SloDescription",
  service_attributes: { # required
    service_name: "SloServiceAttributeValue", # required
    service_namespace: "SloServiceAttributeValue",
    cloud_provider: "SloServiceAttributeValue",
    cloud_account_id: "SloServiceAttributeValue",
    cloud_region: "SloServiceAttributeValue",
    deployment_environment_name: "SloServiceAttributeValue",
  },
  sli: { # required
    events: {
      bad: {
        language: "SQL", # required, accepts SQL, PROMQL
        expression: "AlertRuleQueryExpressionString", # required
      },
      good: {
        language: "SQL", # required, accepts SQL, PROMQL
        expression: "AlertRuleQueryExpressionString", # required
      },
      total: { # required
        language: "SQL", # required, accepts SQL, PROMQL
        expression: "AlertRuleQueryExpressionString", # required
      },
    },
    periods: {
      period_minutes: 1,
      query: { # required
        language: "SQL", # required, accepts SQL, PROMQL
        expression: "AlertRuleQueryExpressionString", # required
      },
      good: {
        comparator: "GT", # required, accepts GT, LT, GTE, LTE
        threshold: 1.0, # required
      },
      bad: {
        comparator: "GT", # required, accepts GT, LT, GTE, LTE
        threshold: 1.0, # required
      },
    },
  },
  objective: { # required
    target: 1.0, # required
    warning_budget_consumed_ratio: 1.0,
    time_window: { # required
      rolling: {
        days: 1, # required
      },
      calendar: {
        unit: "WEEK", # required, accepts WEEK, MONTH
        week_start_day: "MONDAY", # accepts MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
        time_zone: "String",
      },
    },
  },
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.slo.name #=> String
resp.slo.slo_id #=> String
resp.slo.description #=> String
resp.slo. #=> String
resp.slo.space_id #=> String
resp.slo.service_attributes.service_name #=> String
resp.slo.service_attributes.service_namespace #=> String
resp.slo.service_attributes.cloud_provider #=> String
resp.slo.service_attributes. #=> String
resp.slo.service_attributes.cloud_region #=> String
resp.slo.service_attributes.deployment_environment_name #=> String
resp.slo.sli.events.bad.language #=> String, one of "SQL", "PROMQL"
resp.slo.sli.events.bad.expression #=> String
resp.slo.sli.events.good.language #=> String, one of "SQL", "PROMQL"
resp.slo.sli.events.good.expression #=> String
resp.slo.sli.events.total.language #=> String, one of "SQL", "PROMQL"
resp.slo.sli.events.total.expression #=> String
resp.slo.sli.periods.period_minutes #=> Integer
resp.slo.sli.periods.query.language #=> String, one of "SQL", "PROMQL"
resp.slo.sli.periods.query.expression #=> String
resp.slo.sli.periods.good.comparator #=> String, one of "GT", "LT", "GTE", "LTE"
resp.slo.sli.periods.good.threshold #=> Float
resp.slo.sli.periods.bad.comparator #=> String, one of "GT", "LT", "GTE", "LTE"
resp.slo.sli.periods.bad.threshold #=> Float
resp.slo.objective.target #=> Float
resp.slo.objective.warning_budget_consumed_ratio #=> Float
resp.slo.objective.time_window.rolling.days #=> Integer
resp.slo.objective.time_window.calendar.unit #=> String, one of "WEEK", "MONTH"
resp.slo.objective.time_window.calendar.week_start_day #=> String, one of "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"
resp.slo.objective.time_window.calendar.time_zone #=> String
resp.slo.revision #=> Integer
resp.slo.state.value #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.slo.state.no_data_reason #=> String
resp.slo.state.transitioned_at #=> Time
resp.slo.state.state_transition_measurement.attainment #=> Float
resp.slo.state.state_transition_measurement.error_budget_consumed_ratio #=> Float
resp.slo.state.state_transition_measurement.error_budget.unit #=> String, one of "EVENTS", "PERIODS"
resp.slo.state.state_transition_measurement.error_budget.total #=> Float
resp.slo.state.state_transition_measurement.error_budget.consumed #=> Float
resp.slo.updated_at #=> Time
resp.slo.slo_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space to create the SLO in.

  • :name (required, String) —

    The display name of the SLO. Not unique within a space; the sloId returned in the response identifies the SLO.

  • :description (String) —

    An optional description of the SLO.

  • :service_attributes (required, Types::SloServiceAttributes) —

    The service the SLO is about. Descriptive only: it is not checked against the SLI and never used for authorization.

  • :sli (required, Types::Sli) —

    What the SLO measures.

  • :objective (required, Types::SloObjective) —

    The reliability target, the warning threshold and the window the target is measured over.

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

    The tags to associate with the SLO.

  • :client_token (String) —

    Idempotency token for safe retries. Retrying with the same token returns the original SLO instead of creating a duplicate.

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

Returns:

See Also:



2917
2918
2919
2920
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 2917

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

Generates a one-time code for deep-link authentication.

Direct the user's browser to the returned deepLinkUrl before it expires. The code is exchanged for an authenticated, domain-scoped session and can be used only once.

Examples:

Example: Create a one-time deep-link code


# The following example creates a one-time deep-link code for a domain that remains valid for 300 seconds and, once used,
# redirects the browser to the domain's /auth/callback path. Direct the user's browser to the returned deepLinkUrl before
# it expires; the code can be used only once. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.create_one_time_deep_link_code({
  domain_id: "d-1a2b3c4d5e", 
  redirect_url: "https://d-1a2b3c4d5e.cloudwatch-omni.global.app.aws/auth/callback", 
  ttl_seconds: 300, 
})

resp.to_h outputs the following:
{
  code: "dlc-EXAMPLE1234567890", 
  deep_link_url: "https://d-1a2b3c4d5e.cloudwatch-omni.global.app.aws/deeplink?code=EXAMPLE1234567890", 
  expires_at: Time.parse("2026-09-16T14:27:31Z"), 
}

Request syntax with placeholder values


resp = client.create_one_time_deep_link_code({
  domain_id: "DomainId", # required
  ttl_seconds: 1,
  redirect_url: "String",
})

Response structure


resp.code #=> String
resp.deep_link_url #=> String
resp.expires_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String) —

    The ID of the domain to generate the code for.

  • :ttl_seconds (Integer) —

    How long the code remains valid, in seconds. Defaults to 300.

  • :redirect_url (String) —

    The URL to redirect to after the deep-link code is used. Must be an HTTPS URL in the domain with a path of /auth/callback, and cannot include a query string or fragment. If omitted, no redirect is applied.

Returns:

See Also:



2984
2985
2986
2987
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 2984

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

#create_provisioning_roles_for_organization(params = {}) ⇒ Types::CreateProvisioningRolesForOrganizationOutput

Creates the IAM roles that an organization member account needs before a space can be set up in it: the provisioning role, the space data access role, and the dataset integration role. It also creates an AgentCore evaluation role when agentCoreEvaluationRoleConfiguration is set. The provisioning role is reused when it already exists in the target account. The other roles are created once per clientToken: retrying with the same token and input returns the same roles.

The caller must be the organization's management account or a delegated administrator with an access grant on the organization domain. The target account must be an active member of the same organization as the domain, and must not be the management account.

Fails with ServiceQuotaExceededException when the target member account already has the maximum number of roles of a type the call creates, or has reached an IAM quota.

Examples:

Example: Create the default provisioning role and other roles required to set up an Omni space and enable dataset forwarding in a member account


# The following example creates the provisioning role, the space data access role, the dataset integration role, and an
# AgentCore evaluation role in an organization member account. CloudWatchOmniSpaceAccessPolicy is always attached to the
# space data access role and is not configurable; the example also attaches the optional model inference, DevOps agent,
# and AWS integration policies to it. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.create_provisioning_roles_for_organization({
  agent_core_evaluation_role_configuration: {
  }, 
  domain_id: "d-1a2b3c4d5e", 
  space_data_access_role_configuration: {
    include_policies: [
      "MODEL_INFERENCE", 
      "DEVOPS_AGENT", 
      "AWS_INTEGRATION", 
    ], 
  }, 
  target_account_id: "123456789012", 
})

resp.to_h outputs the following:
{
  agent_core_evaluation_role: {
    arn: "arn:aws:iam::123456789012:role/service-role/AgentCoreEvaluationRole-Org-us-east-1-1767225600123", 
  }, 
  dataset_integration_role: {
    arn: "arn:aws:iam::123456789012:role/service-role/CloudWatchOmniDatasetIntegrationRole-Org-1767225600123", 
  }, 
  provisioning_role: {
    arn: "arn:aws:iam::123456789012:role/service-role/CloudWatchOmniProvisioningRole", 
  }, 
  space_data_access_role: {
    arn: "arn:aws:iam::123456789012:role/service-role/CloudWatchOmniSpaceDataAccessRole-Org-1767225600123", 
  }, 
}

Request syntax with placeholder values


resp = client.create_provisioning_roles_for_organization({
  domain_id: "DomainId", # required
  target_account_id: "AccountId", # required
  space_data_access_role_configuration: {
    include_policies: ["MODEL_INFERENCE"], # accepts MODEL_INFERENCE, DEVOPS_AGENT, AWS_INTEGRATION
  },
  agent_core_evaluation_role_configuration: {
  },
  client_token: "ClientToken",
})

Response structure


resp.provisioning_role.arn #=> String
resp.space_data_access_role.arn #=> String
resp.dataset_integration_role.arn #=> String
resp.agent_core_evaluation_role.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String) —

    The ID of the organization domain.

  • :target_account_id (required, String) —

    The ID of the member account to create the roles in.

  • :space_data_access_role_configuration (Types::SpaceDataAccessRoleConfiguration) —

    Settings for the space data access role, which is always created. Omit for the default: only CloudWatchOmniSpaceAccessPolicy is attached.

  • :agent_core_evaluation_role_configuration (Types::AgentCoreEvaluationRoleConfiguration) —

    Settings for the AgentCore evaluation role. Omit this to create none.

  • :client_token (String) —

    A unique token that makes retries create a single set of roles. Reusing a token with different input is an error. A concurrent request with the same token returns a ConflictException and can be retried.

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

Returns:

See Also:



3096
3097
3098
3099
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3096

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

#create_space(params = {}) ⇒ Types::CreateSpaceOutput

Creates a space in a domain.

Use GetSpace to retrieve the space, ListSpaces to enumerate spaces, UpdateSpace to modify it, and DeleteSpace to remove it.

Examples:

Example: Create a space


# The following example creates a space in a domain and encrypts its data at rest with a customer managed KMS key. The
# name must be 3-64 characters of lowercase letters, numbers, and hyphens. Payloads are shown as JSON; on the wire they
# are CBOR-encoded.

resp = client.create_space({
  name: "prod-observability", 
  agent_core_evaluation_role_arn: "arn:aws:iam::123456789012:role/CloudWatchAgentCoreEvaluationRole", 
  client_token: "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73", 
  data_access_role_arn: "arn:aws:iam::123456789012:role/CloudWatchSpaceDataAccessRole", 
  domain_id: "d-1a2b3c4d5e", 
  encryption_configuration: {
    encryption_strategy: "CUSTOMER_MANAGED", 
    kms_key_arn: "arn:aws:kms:us-east-1:123456789012:key/1a2b3c4d-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  }, 
  tags: {
    "Team" => "observability", 
  }, 
})

resp.to_h outputs the following:
{
  space: {
    name: "prod-observability", 
    agent_core_evaluation_role_arn: "arn:aws:iam::123456789012:role/CloudWatchAgentCoreEvaluationRole", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    data_access_role_arn: "arn:aws:iam::123456789012:role/CloudWatchSpaceDataAccessRole", 
    domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:domain/d-1a2b3c4d5e", 
    encryption_configuration: {
      encryption_strategy: "CUSTOMER_MANAGED", 
      kms_key_arn: "arn:aws:kms:us-east-1:123456789012:key/1a2b3c4d-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    }, 
    owner_account_id: "123456789012", 
    region: "us-east-1", 
    space_arn: "arn:aws:cloudwatch:us-east-1:123456789012:space/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.create_space({
  name: "CreateSpaceInputNameString", # required
  domain_id: "DomainId", # required
  identity_center_configuration: {
    region: "RegionName", # required
  },
  data_access_role_arn: "Arn", # required
  agent_core_evaluation_role_arn: "Arn",
  encryption_configuration: {
    encryption_strategy: "AWS_OWNED", # required, accepts AWS_OWNED, CUSTOMER_MANAGED
    kms_key_arn: "KmsKeyArn",
  },
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "ClientToken",
})

Response structure


resp.space.space_id #=> String
resp.space.name #=> String
resp.space.space_arn #=> String
resp.space.domain_arn #=> String
resp.space.region #=> String
resp.space.identity_center_configuration.region #=> String
resp.space. #=> String
resp.space.data_access_role_arn #=> String
resp.space.created_at #=> Time
resp.space.updated_at #=> Time
resp.space.agent_core_evaluation_role_arn #=> String
resp.space.status #=> String, one of "ACTIVE", "SUSPENDED", "MOVING"
resp.space.status_reason #=> String
resp.space.encryption_configuration.encryption_strategy #=> String, one of "AWS_OWNED", "CUSTOMER_MANAGED"
resp.space.encryption_configuration.kms_key_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String) —

    A name that identifies the space. Must be 3-64 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.

  • :domain_id (required, String) —

    The ID of the domain to create the space in.

  • :identity_center_configuration (Types::SpaceIdentityCenterConfiguration) —

    Identity Center settings for this space. Omit to use the space's Region.

  • :data_access_role_arn (required, String) —

    The ARN of the IAM role used for data access. The role must be in the caller's account.

  • :agent_core_evaluation_role_arn (String) —

    The ARN of the IAM role used by AgentCore online evaluation. Must be in the caller's account. Omit if the space does not use AgentCore online evaluation.

  • :encryption_configuration (Types::EncryptionConfiguration) —

    How to encrypt the space's data at rest. Omit for service owned encryption, which is equivalent to passing encryptionStrategy AWS_OWNED.

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

    The tags to associate with the space.

  • :client_token (String) —

    Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.

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

Returns:

See Also:



3231
3232
3233
3234
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3231

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

#create_view(params = {}) ⇒ Types::CreateViewResponse

Creates a new SQL view.

A view is a named, reusable SQL query that can be referenced from telemetry queries. View names must be unique within the account and region. Only USER views can be created — MANAGED views are provisioned by AWS.

Examples:

Example: Create a view


# The following example creates a user view that saves an error-count-by-service query. View names must begin with the
# view. prefix and be unique within the account and Region. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.create_view({
  name: "view.service_errors", 
  client_token: "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73", 
  definition: "SELECT resource['attributes']['service.name'] AS service, COUNT(*) AS error_count FROM \"logs.default\" WHERE severityText = 'ERROR' GROUP BY service", 
  description: "Error counts by service", 
  tags: {
    "Team" => "observability", 
  }, 
})

resp.to_h outputs the following:
{
  name: "view.service_errors", 
  type: "USER", 
  arn: "arn:aws:cloudwatch:us-east-1:123456789012:view/view.service_errors", 
  created_at: Time.parse("2026-09-16T14:22:31Z"), 
  definition: "SELECT resource['attributes']['service.name'] AS service, COUNT(*) AS error_count FROM \"logs.default\" WHERE severityText = 'ERROR' GROUP BY service", 
  description: "Error counts by service", 
  updated_at: Time.parse("2026-09-16T14:22:31Z"), 
}

Request syntax with placeholder values


resp = client.create_view({
  name: "ViewName", # required
  definition: "ViewDefinition", # required
  description: "ViewDescription",
  tags: {
    "TagKey" => "TagValue",
  },
  client_token: "CreateViewRequestClientTokenString",
})

Response structure


resp.name #=> String
resp.type #=> String, one of "USER", "MANAGED"
resp.description #=> String
resp.definition #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String) —

    The name of the view. Must begin with the "view." prefix. View names must be unique within the account and region.

  • :definition (required, String) —

    The SQL query that defines the view.

  • :description (String) —

    A description of the view.

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

    Resource tags.

  • :client_token (String) —

    Idempotency token for safe retries. Retrying with the same token returns the original view instead of creating a duplicate.

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

Returns:

See Also:



3326
3327
3328
3329
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3326

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

#delete_access_grant(params = {}) ⇒ Struct

Removes an existing AccessGrant, revoking the access it granted.

A service-managed grant cannot be deleted.

Examples:

Example: Delete an access grant


# The following example deletes an access grant by ID, revoking the access it granted. Payloads are shown as JSON; on the
# wire they are CBOR-encoded.

resp = client.delete_access_grant({
  grant_id: "7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_access_grant({
  grant_id: "GrantId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :grant_id (required, String) —

    The ID of the access grant to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3364
3365
3366
3367
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3364

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

#delete_access_profile(params = {}) ⇒ Struct

Removes an access profile.

An access profile cannot be deleted while access grants reference it.

Examples:

Example: Delete an access profile


# The following example deletes an access profile from a space. An access profile cannot be deleted while access grants
# reference it. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_access_profile({
  profile_id: "analyst-readonly", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_access_profile({
  space_id: "SpaceId", # required
  profile_id: "ProfileId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :profile_id (required, String) —

    The unique ID of the access profile to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3407
3408
3409
3410
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3407

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

#delete_alert(params = {}) ⇒ Struct

Deletes an alert by its identifier.

Idempotent: deleting an alert that has already been removed succeeds without error.

Examples:

Example: Delete an alert


# The following example removes an alert from a space. Deleting an alert that has already been removed succeeds without
# error. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_alert({
  alert_id: "c3d4e5f67a8b4c9d8e0f1a2b3c4d5e6f", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_alert({
  space_id: "SpaceId", # required
  alert_id: "AlertId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :alert_id (required, String) —

    The alert to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3451
3452
3453
3454
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3451

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

#delete_domain(params = {}) ⇒ Struct

Removes a domain and all of its resources. Call this operation in the Region where the domain was created.

A domain cannot be deleted while it contains spaces.

Examples:

Example: Delete a domain


# The following example deletes a domain in the Region where it was created. The domain must not contain any spaces. A
# successful response returns an empty body. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_domain({
  domain_id: "d-1a2b3c4d5e", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_domain({
  domain_id: "DomainId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String) —

    The unique ID of the domain to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3490
3491
3492
3493
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3490

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

#delete_domain_access_grant_for_organization(params = {}) ⇒ Struct

Removes an existing organization access grant, revoking the access it granted.

A service-managed grant cannot be deleted.

Examples:

Example: Delete an organization domain access grant


# The following example deletes an organization domain access grant by ID, revoking the access it granted. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_domain_access_grant_for_organization({
  grant_id: "7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_domain_access_grant_for_organization({
  grant_id: "GrantId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :grant_id (required, String) —

    The ID of the access grant to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3529
3530
3531
3532
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3529

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

#delete_domain_for_organization(params = {}) ⇒ Struct

Removes an organization domain and all of its resources. Call this operation in the Region where the domain was created.

A domain cannot be deleted while it contains spaces.

Examples:

Example: Delete an organization domain


# The following example deletes an organization domain in the Region where it was created. The domain must not contain any
# spaces. A successful response returns an empty body. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_domain_for_organization({
  domain_id: "d-9z8y7x6w5v", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_domain_for_organization({
  domain_id: "DomainId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String) —

    The ID of the organization domain to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3568
3569
3570
3571
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3568

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

#delete_experiment(params = {}) ⇒ Struct

Deletes an experiment and its runs.

The runs' stored results and cases are also deleted; records in the caller's log group are kept. Fails with a ConflictException while a run is RUNNING or STOPPING; stop the runs first. Deleting an experiment that does not exist or was already deleted succeeds.

A large experiment can take more than one call: while the delete is still in progress, the call fails with a ConflictException (DELETE_IN_PROGRESS), and repeating the call continues it.

Examples:

Example: Delete an experiment


# The following example deletes an experiment that has no RUNNING or STOPPING runs. The response is empty. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_experiment({
  experiment_id: "exp-01JC8Z5V7Q3M9K2T4R6W8Y0ABC", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_experiment({
  experiment_id: "ExperimentId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :experiment_id (required, String) —

    The ID of the experiment to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3613
3614
3615
3616
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3613

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

#delete_experiment_run(params = {}) ⇒ Struct

Deletes a run that has ended.

Also deletes the run's stored results and cases, and the live control run of a target run. Records in the experiment's results log group, in the log stream experimentId/runId, are kept, so a deleted run's ID cannot be reused: PutExperimentRunResults fails with a ConflictException (RUN_ID_DELETED). Deleting a run that does not exist or was already deleted succeeds, but the experiment must exist.

Fails with a ConflictException (RUN_ACTIVE) while the run is RUNNING or STOPPING; stop or complete it first. Also fails with RUN_REFERENCED for a live control run while its target run exists, and for the control of a RUNNING or STOPPING run. A run with many cases can need more than one call: DELETE_IN_PROGRESS means the delete is still in progress, and repeating the call continues it.

Examples:

Example: Delete a run


# The following example deletes a reported run that has ended. Payloads are shown as JSON; on the wire they are
# CBOR-encoded.

resp = client.delete_experiment_run({
  experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
  run_id: "ci-build-4821", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_experiment_run({
  experiment_id: "ExperimentId", # required
  run_id: "ExperimentRunId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :experiment_id (required, String) —

    The ID of the experiment the run belongs to. The experiment must exist.

  • :run_id (required, String) —

    The ID of the run to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3669
3670
3671
3672
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3669

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

#delete_integration(params = {}) ⇒ Struct

Deletes an integration. Returns the resulting status.

Examples:

Example: Delete an integration by id


# The following example deletes the integration identified by its id. DeleteIntegration is idempotent and returns an empty
# response. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_integration({
  identifier: {
    integration_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  }, 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_integration({
  identifier: { # required
    integration_id: "String",
    integration_arn: "IntegrationArn",
    integration_name: "String",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :identifier (required, Types::IntegrationIdentifier) —

    Identifies the integration to delete — exactly one of integrationId, integrationArn, or integrationName.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3712
3713
3714
3715
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3712

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

#delete_lookup(params = {}) ⇒ Struct

Deletes the specified lookup table.

Queries that join against the lookup table fail after it is deleted.

Examples:

Example: Delete a lookup table


# The following example deletes one specific lookup table by its id. The response body is empty. Queries that join against
# it fail after it is deleted. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_lookup({
  identifier: "3k7f2m9qx4pd8w1n6v0b5j2tz", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_lookup({
  identifier: "LookupIdentifier", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :identifier (required, String) —

    The id of the lookup table to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3750
3751
3752
3753
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3750

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

#delete_omni_dashboard(params = {}) ⇒ Struct

Removes a dashboard from a space.

Examples:

Example: Delete a dashboard


# The following example removes a dashboard from a space. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_omni_dashboard({
  dashboard_id: "c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_omni_dashboard({
  space_id: "SpaceId", # required
  dashboard_id: "DashboardId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :dashboard_id (required, String) —

    The unique ID of the dashboard.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3790
3791
3792
3793
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3790

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

#delete_omni_slo(params = {}) ⇒ Struct

Deletes an SLO by its identifier and stops its evaluation.

Idempotent: deleting an SLO that has already been removed succeeds without error.

An SLO that alerts reference is refused with a ConflictException (conflictType RESOURCE_IN_USE) unless force is true. The error does not name the alerts; ListAlerts with filterCriteria.sloIds lists them. With force, the alerts are not changed: the SLO's metrics stop being published, so they report their noData state (NODATA by default) until they are deleted or pointed at another SLO.

Examples:

Example: Delete an SLO


# The following example deletes an SLO that no alert references. Deleting an SLO that has already been removed succeeds
# without error. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_omni_slo({
  slo_id: "9f8e7d6c5b4a49382716051a2b3c4d5e", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
}

Example: Delete an SLO that alerts reference


# The following example deletes an SLO even though alerts reference it. Because force is true, the delete succeeds;
# without force, it would fail with a ConflictException. The referencing alerts are not changed: they report their noData
# state until they are deleted or pointed at another SLO. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_omni_slo({
  force: true, 
  slo_id: "7a6b5c4d3e2f41a0b9c8d7e6f5a4b3c2", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_omni_slo({
  space_id: "SpaceId", # required
  slo_id: "SloId", # required
  force: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space that owns the SLO.

  • :slo_id (required, String) —

    The SLO to delete.

  • :force (Boolean) —

    Delete the SLO even when alerts reference it. Those alerts go to their noData state. Defaults to false.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3862
3863
3864
3865
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3862

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

#delete_space(params = {}) ⇒ Struct

Removes a space and all of its resources.

Examples:

Example: Delete a space


# The following example removes a space and all of its resources. Payloads are shown as JSON; on the wire they are
# CBOR-encoded.

resp = client.delete_space({
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_space({
  space_id: "SpaceId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3898
3899
3900
3901
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3898

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

#delete_view(params = {}) ⇒ Struct

Deletes the specified view.

Queries that reference the view fail after it is deleted. Managed views cannot be deleted.

Examples:

Example: Delete a view


# The following example deletes a view. The response body is empty. Queries that reference the view fail after it is
# deleted. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.delete_view({
  name: "view.service_errors", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.delete_view({
  name: "ViewName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String) —

    The name of the view to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3937
3938
3939
3940
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 3937

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

#get_access_grant(params = {}) ⇒ Types::GetAccessGrantOutput

Retrieves the full detail of a single AccessGrant by ID.

Examples:

Example: Get an access grant


# The following example retrieves the full detail of a single access grant by ID. Payloads are shown as JSON; on the wire
# they are CBOR-encoded.

resp = client.get_access_grant({
  grant_id: "7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
})

resp.to_h outputs the following:
{
  access_grant: {
    name: "analyst-read-access", 
    account_id: "123456789012", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    created_by: "arn:aws:iam::123456789012:role/ObservabilityAdmin", 
    domain_id: "d-1a2b3c4d5e", 
    grant_arn: "arn:aws:cloudwatch:us-east-1:123456789012:access-grant/7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
    grant_id: "7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
    grant_type: "CUSTOMER_MANAGED", 
    permission: "CUSTOM", 
    principal: {
      principal_id: "94b6c7d8-1a2b-4c3d-9e4f-5a6b7c8d9e0f", 
      principal_type: "IDC_USER", 
    }, 
    scoped_actions: [
      {
        actions: [
          "cloudwatch:GetOmniDashboard", 
          "cloudwatch:UpdateOmniDashboard", 
        ], 
        resources: [
          {
            resource_arns: [
              "arn:aws:cloudwatch:us-east-1:123456789012:omni-dashboard/c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
            ], 
            resource_type: "OmniDashboard", 
          }, 
        ], 
      }, 
    ], 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.get_access_grant({
  grant_id: "GrantId", # required
})

Response structure


resp.access_grant.grant_id #=> String
resp.access_grant.grant_arn #=> String
resp.access_grant.name #=> String
resp.access_grant. #=> String
resp.access_grant.domain_id #=> String
resp.access_grant.principal.principal_type #=> String, one of "IDC_USER", "IDC_GROUP", "IAM_USER", "IAM_ROLE", "IAM_ROOT", "ACCESS_PROFILE", "ALERT", "AGENT", "SLO"
resp.access_grant.principal.principal_id #=> String
resp.access_grant.principal.principal_attributes #=> Array
resp.access_grant.principal.principal_attributes[0].key #=> String
resp.access_grant.principal.principal_attributes[0].value #=> String
resp.access_grant.permission #=> String, one of "SPACE_ADMIN", "READ", "READ_WRITE_DELETE", "CUSTOM"
resp.access_grant.grant_type #=> String, one of "SERVICE_MANAGED", "CUSTOMER_MANAGED"
resp.access_grant.created_by #=> String
resp.access_grant.created_at #=> Time
resp.access_grant.updated_at #=> Time
resp.access_grant.space_id #=> String
resp.access_grant.scoped_actions #=> Array
resp.access_grant.scoped_actions[0].actions #=> Array
resp.access_grant.scoped_actions[0].actions[0] #=> String
resp.access_grant.scoped_actions[0].resources #=> Array
resp.access_grant.scoped_actions[0].resources[0].resource_type #=> String
resp.access_grant.scoped_actions[0].resources[0].resource_arns #=> Array
resp.access_grant.scoped_actions[0].resources[0].resource_arns[0] #=> String
resp.access_grant.scoped_actions[0].resources[0].tags #=> Hash
resp.access_grant.scoped_actions[0].resources[0].tags["String"] #=> String
resp.access_grant.scoped_actions[0].resources[0].signal_types #=> Array
resp.access_grant.scoped_actions[0].resources[0].signal_types[0] #=> String, one of "LOGS", "TRACES"
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups #=> Array
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups[0] #=> Array
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups[0][0].field #=> String
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups[0][0].operator #=> String, one of "IN"
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups[0][0].values #=> Array
resp.access_grant.scoped_actions[0].resources[0].row_scope_groups[0][0].values[0] #=> String
resp.access_grant.scoped_actions[0].context_conditions #=> Hash
resp.access_grant.scoped_actions[0].context_conditions["String"] #=> Array
resp.access_grant.scoped_actions[0].context_conditions["String"][0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :grant_id (required, String) —

    The ID of the access grant to retrieve.

Returns:

See Also:



4047
4048
4049
4050
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 4047

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

#get_access_profile(params = {}) ⇒ Types::GetAccessProfileOutput

Retrieves an access profile by ID.

The response indicates whether the calling principal is currently allowed to assume the profile.

Examples:

Example: Get an access profile


# The following example retrieves an access profile by ID, including whether the calling principal is currently allowed to
# assume it. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_access_profile({
  profile_id: "analyst-readonly", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  access_profile: {
    name: "Analyst read-only profile", 
    arn: "arn:aws:cloudwatch:us-east-1:123456789012:access-profile/analyst-readonly", 
    assume_status: "ALLOWED", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    description: "Read-only access for analysts.", 
    profile_id: "analyst-readonly", 
    profile_type: "CUSTOMER_MANAGED", 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.get_access_profile({
  space_id: "SpaceId", # required
  profile_id: "ProfileId", # required
})

Response structure


resp.access_profile.profile_id #=> String
resp.access_profile.space_id #=> String
resp.access_profile.arn #=> String
resp.access_profile.name #=> String
resp.access_profile.description #=> String
resp.access_profile.created_at #=> Time
resp.access_profile.updated_at #=> Time
resp.access_profile.assume_status #=> String, one of "ALLOWED", "DENIED"
resp.access_profile.profile_type #=> String, one of "SERVICE_MANAGED", "CUSTOMER_MANAGED"

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :profile_id (required, String) —

    The unique ID of the access profile.

Returns:

See Also:



4116
4117
4118
4119
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 4116

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

#get_alert(params = {}) ⇒ Types::GetAlertOutput

Retrieves a single alert by its identifier.

Use ListAlerts to enumerate alerts in the space.

Examples:

Example: Retrieve an alert


# The following example retrieves an alert by its identifier, including the live evaluation state that CreateAlert does
# not report. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_alert({
  alert_id: "c3d4e5f67a8b4c9d8e0f1a2b3c4d5e6f", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  alert: {
    name: "service-error-count-elevated", 
    account_id: "123456789012", 
    alert_arn: "arn:aws:cloudwatch:us-east-1:123456789012:alert/c3d4e5f67a8b4c9d8e0f1a2b3c4d5e6f", 
    alert_id: "c3d4e5f67a8b4c9d8e0f1a2b3c4d5e6f", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    description: "Alerts when a service logs more errors than its accepted rate.", 
    notification_rules: [
      {
        target: {
          metadata: {
            "channel" => "oncall-alerts", 
          }, 
          type: "slack", 
          arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
        }, 
        trigger: {
          state_values: [
            "CRITICAL", 
          ], 
        }, 
      }, 
    ], 
    notification_status: "ENABLED", 
    profile_id: "analyst-readonly", 
    rule: {
      telemetry_rule: {
        condition: {
          comparator: "GT", 
          critical_threshold: 200.0, 
          threshold_field: "error_count", 
          threshold_mode: "FIELD_VALUE", 
          warning_threshold: 50.0, 
        }, 
        evaluation: {
          interval_seconds: 300, 
          pending_duration_seconds: 600, 
          recovery_duration_seconds: 300, 
        }, 
        no_data: {
          treat_as: "NODATA", 
        }, 
        query: {
          expression: "SELECT resource['attributes']['service.name'] AS service, COUNT(*) AS error_count FROM \"logs.default\" WHERE severityText = 'ERROR' GROUP BY service", 
          language: "SQL", 
        }, 
      }, 
    }, 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    state: {
      value: "CRITICAL", 
      contributor_summary: {
        critical_count: 1, 
        warning_count: 3, 
      }, 
      transitioned_at: Time.parse("2026-09-17T09:11:52Z"), 
    }, 
    updated_at: Time.parse("2026-09-17T09:11:52Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.get_alert({
  space_id: "SpaceId", # required
  alert_id: "AlertId", # required
})

Response structure


resp.alert.name #=> String
resp.alert.alert_id #=> String
resp.alert.description #=> String
resp.alert. #=> String
resp.alert.space_id #=> String
resp.alert.profile_id #=> String
resp.alert.rule.telemetry_rule.query.language #=> String, one of "SQL", "PROMQL"
resp.alert.rule.telemetry_rule.query.expression #=> String
resp.alert.rule.telemetry_rule.condition.threshold_mode #=> String, one of "COUNT_OF_RESULTS", "FIELD_VALUE"
resp.alert.rule.telemetry_rule.condition.threshold_field #=> String
resp.alert.rule.telemetry_rule.condition.comparator #=> String, one of "GT", "LT", "GTE", "LTE"
resp.alert.rule.telemetry_rule.condition.warning_threshold #=> Float
resp.alert.rule.telemetry_rule.condition.critical_threshold #=> Float
resp.alert.rule.telemetry_rule.evaluation.interval_seconds #=> Integer
resp.alert.rule.telemetry_rule.evaluation.pending_duration_seconds #=> Integer
resp.alert.rule.telemetry_rule.evaluation.recovery_duration_seconds #=> Integer
resp.alert.rule.telemetry_rule.no_data.treat_as #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.alert.rule.slo_rule.slo_id #=> String
resp.alert.rule.slo_rule.condition.burn_rate.window_minutes #=> Integer
resp.alert.rule.slo_rule.condition.burn_rate.short_window_minutes #=> Integer
resp.alert.rule.slo_rule.condition.burn_rate.warning_threshold #=> Float
resp.alert.rule.slo_rule.condition.burn_rate.critical_threshold #=> Float
resp.alert.rule.slo_rule.condition.error_budget.warning_threshold #=> Float
resp.alert.rule.slo_rule.condition.error_budget.critical_threshold #=> Float
resp.alert.rule.slo_rule.evaluation.interval_seconds #=> Integer
resp.alert.rule.slo_rule.evaluation.pending_duration_seconds #=> Integer
resp.alert.rule.slo_rule.evaluation.recovery_duration_seconds #=> Integer
resp.alert.rule.slo_rule.no_data.treat_as #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.alert.notification_status #=> String, one of "ENABLED", "DISABLED"
resp.alert.state.value #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.alert.state.transitioned_at #=> Time
resp.alert.state.contributor_summary.warning_count #=> Integer
resp.alert.state.contributor_summary.critical_count #=> Integer
resp.alert.state.data.threshold_breached #=> Float
resp.alert.notification_rules #=> Array
resp.alert.notification_rules[0].trigger.state_values #=> Array
resp.alert.notification_rules[0].trigger.state_values[0] #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.alert.notification_rules[0].target.type #=> String, one of "sns", "slack", "pagerduty", "investigation"
resp.alert.notification_rules[0].target.arn #=> String
resp.alert.notification_rules[0].target. #=> Hash
resp.alert.notification_rules[0].target.["NotificationTargetMetadataMapKeyString"] #=> String
resp.alert.created_at #=> Time
resp.alert.updated_at #=> Time
resp.alert.alert_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :alert_id (required, String) —

    The alert to retrieve.

Returns:

See Also:



4267
4268
4269
4270
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 4267

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

#get_context_graph(params = {}) ⇒ Types::GetContextGraphOutput

Queries the context graph with filtering, traversal, and pagination support.

Pagination note: nodes and edges are returned together as a coherent subgraph. Pagination cursors advance over nodes (the primary collection); each page includes all edges connecting nodes within that page. Callers should treat nodes as the paginated collection and edges as supplementary relationship data attached to those nodes.

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

Examples:

Example: Query a service and its immediate dependencies


# The following example returns context graph nodes matching the filter and traverses one hop out to their direct
# dependencies, over a one-hour window. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_context_graph({
  depth: 1, 
  end_time: Time.parse("2026-09-16T01:00:00Z"), 
  include_metadata: false, 
  max_results: 100, 
  node_filters: {
    namespace: [
      "ecommerce", 
    ], 
    node_type: "SERVICE", 
  }, 
  start_time: Time.parse("2026-09-16T00:00:00Z"), 
})

resp.to_h outputs the following:
{
  next_token: "eyJvZmZzZXQiOjEwMH0=", 
  nodes: [
    {
      name: "checkout-service", 
      edges: [
        {
          operations: [
            "POST /charges", 
          ], 
          edge_id: "edge:checkout-service->payments-service", 
          edge_type: "CALLS", 
          first_observed_at: Time.parse("2026-09-16T00:03:00Z"), 
          from: "svc:checkout-service", 
          last_observed_at: Time.parse("2026-09-16T00:58:00Z"), 
          signal_types: [
            "TRACES", 
          ], 
          sources: [
            "TELEMETRY", 
          ], 
          to: "svc:payments-service", 
        }, 
      ], 
      first_observed_at: Time.parse("2026-09-16T00:03:00Z"), 
      last_observed_at: Time.parse("2026-09-16T00:58:00Z"), 
      node_id: "svc:checkout-service", 
      node_properties: {
        cloud_provider: "aws", 
        namespace: "ecommerce", 
        region: "us-east-1", 
        source_account_id: "123456789012", 
      }, 
      node_type: "SERVICE", 
      signal_types: [
        "TRACES", 
      ], 
      sources: [
        "TELEMETRY", 
      ], 
    }, 
    {
      name: "payments-service", 
      first_observed_at: Time.parse("2026-09-16T00:01:00Z"), 
      last_observed_at: Time.parse("2026-09-16T00:59:00Z"), 
      node_id: "svc:payments-service", 
      node_properties: {
        cloud_provider: "aws", 
        namespace: "ecommerce", 
        region: "us-east-1", 
        source_account_id: "123456789012", 
      }, 
      node_type: "SERVICE", 
      signal_types: [
        "TRACES", 
      ], 
      sources: [
        "TELEMETRY", 
      ], 
    }, 
  ], 
}

Example: Return metric aggregation metadata


# The following example returns aggregation metadata for a metric stream observed on a service over a one-hour window. The
# metric attributes identify its producing service and instrumentation scope; additional data point dimensions can
# identify multiple time series. The metric lists the operations it measures, and the node's operationDetails gives the
# dimension sets that select each one. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_context_graph({
  depth: 0, 
  end_time: Time.parse("2026-09-16T01:00:00Z"), 
  include_metadata: true, 
  max_results: 1, 
  node_filters: {
    node_id: "svc:checkout-service", 
  }, 
  start_time: Time.parse("2026-09-16T00:00:00Z"), 
})

resp.to_h outputs the following:
{
  nodes: [
    {
      metadata: {
        metrics: [
          {
            operations: [
              "POST /checkout", 
            ], 
            name: "http.server.request.duration", 
            aggregation_temporality: "cumulative", 
            attributes: {
              "@instrumentation.@name" => "io.opentelemetry.tomcat-10.0", 
              "@resource.service.name" => "checkout-service", 
              "@resource.service.namespace" => "ecommerce", 
            }, 
            metric_type: "histogram", 
            semantics: {
              unit: "s", 
            }, 
          }, 
        ], 
      }, 
      name: "checkout-service", 
      first_observed_at: Time.parse("2026-09-16T00:03:00Z"), 
      last_observed_at: Time.parse("2026-09-16T00:58:00Z"), 
      node_id: "svc:checkout-service", 
      node_properties: {
        cloud_provider: "aws", 
        namespace: "ecommerce", 
        region: "us-east-1", 
        source_account_id: "123456789012", 
      }, 
      node_type: "SERVICE", 
      operation_details: {
        "POST /checkout" => [
          {
            "http.request.method" => "POST", 
            "http.route" => "/checkout", 
          }, 
        ], 
      }, 
      signal_types: [
        "METRICS", 
        "TRACES", 
      ], 
      sources: [
        "TELEMETRY", 
      ], 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.get_context_graph({
  node_filters: {
    node_id: "ContextGraphId",
    node_type: "SERVICE", # accepts SERVICE, RESOURCE, REMOTE_SERVICE
    name: "ContextGraphName",
    tags: [
      {
        key: "KeyFilterKey", # required
        values: ["KeyFilterValue"],
      },
    ],
    telemetry_attributes: [
      {
        key: "KeyFilterKey", # required
        values: ["KeyFilterValue"],
      },
    ],
    region: ["String"],
    cloud_provider: ["String"],
    source_account_id: ["String"],
    namespace: ["String"],
    category: ["GEN_AI_AGENT"], # accepts GEN_AI_AGENT, GEN_AI_MODEL, DATABASE, MESSAGING_QUEUE, COMPUTE, STORAGE, NETWORK
    stage: ["String"],
    sources: ["VPC_FLOW_LOG"], # accepts VPC_FLOW_LOG, CLOUDTRAIL, IAM_POLICY, CODE_SEMANTICS, TELEMETRY, AZURE_VNET_FLOW_LOG, ELB_ACCESS_LOG, CLOUDFRONT_ACCESS_LOG, S3_ACCESS_LOG, WAF_ACCESS_LOG, AWS_INTEGRATION, CONFIG
  },
  edge_filters: {
    edge_id: "ContextGraphId",
    from: "ContextGraphId",
    to: "ContextGraphId",
    edge_type: "CALLS", # accepts CALLS, ACCESSES, RUNS_ON
    operations: ["String"],
    telemetry_attributes: [
      {
        key: "KeyFilterKey", # required
        values: ["KeyFilterValue"],
      },
    ],
    sources: ["VPC_FLOW_LOG"], # accepts VPC_FLOW_LOG, CLOUDTRAIL, IAM_POLICY, CODE_SEMANTICS, TELEMETRY, AZURE_VNET_FLOW_LOG, ELB_ACCESS_LOG, CLOUDFRONT_ACCESS_LOG, S3_ACCESS_LOG, WAF_ACCESS_LOG, AWS_INTEGRATION, CONFIG
  },
  start_time: Time.now, # required
  end_time: Time.now, # required
  depth: 1,
  max_results: 1,
  max_edges_per_node: 1,
  include_metadata: false,
  next_token: "PaginationToken",
})

Response structure


resp.nodes #=> Array
resp.nodes[0].node_id #=> String
resp.nodes[0].node_type #=> String, one of "SERVICE", "RESOURCE", "REMOTE_SERVICE"
resp.nodes[0].name #=> String
resp.nodes[0].alternate_names #=> Array
resp.nodes[0].alternate_names[0] #=> String
resp.nodes[0].tags #=> Hash
resp.nodes[0].tags["String"] #=> String
resp.nodes[0].node_properties.region #=> String
resp.nodes[0].node_properties.cloud_provider #=> String
resp.nodes[0].node_properties. #=> String
resp.nodes[0].node_properties.namespace #=> String
resp.nodes[0].node_properties.category #=> String, one of "GEN_AI_AGENT", "GEN_AI_MODEL", "DATABASE", "MESSAGING_QUEUE", "COMPUTE", "STORAGE", "NETWORK"
resp.nodes[0].node_properties.stage #=> String
resp.nodes[0].telemetry_attributes #=> Hash
resp.nodes[0].telemetry_attributes["String"] #=> String
resp.nodes[0].operation_details #=> Hash
resp.nodes[0].operation_details["OperationName"] #=> Array
resp.nodes[0].operation_details["OperationName"][0] #=> Hash
resp.nodes[0].operation_details["OperationName"][0]["OperationIdentifierKey"] #=> String
resp.nodes[0].signal_types #=> Array
resp.nodes[0].signal_types[0] #=> String, one of "LOGS", "METRICS", "TRACES", "CONFIG", "UNKNOWN", "PROFILES"
resp.nodes[0].sources #=> Array
resp.nodes[0].sources[0] #=> String, one of "VPC_FLOW_LOG", "CLOUDTRAIL", "IAM_POLICY", "CODE_SEMANTICS", "TELEMETRY", "AZURE_VNET_FLOW_LOG", "ELB_ACCESS_LOG", "CLOUDFRONT_ACCESS_LOG", "S3_ACCESS_LOG", "WAF_ACCESS_LOG", "AWS_INTEGRATION", "CONFIG"
resp.nodes[0]..metrics #=> Array
resp.nodes[0]..metrics[0].name #=> String
resp.nodes[0]..metrics[0].preferred_stat #=> String
resp.nodes[0]..metrics[0].metric_type #=> String
resp.nodes[0]..metrics[0].attributes #=> Hash
resp.nodes[0]..metrics[0].attributes["String"] #=> String
resp.nodes[0]..metrics[0].semantics.description #=> String
resp.nodes[0]..metrics[0].semantics.unit #=> String
resp.nodes[0]..metrics[0].aggregation_temporality #=> String, one of "delta", "cumulative"
resp.nodes[0]..metrics[0].monotonicity #=> String, one of "monotonic", "non_monotonic"
resp.nodes[0]..metrics[0].operations #=> Array
resp.nodes[0]..metrics[0].operations[0] #=> String
resp.nodes[0]..semantics.purpose #=> String
resp.nodes[0]..semantics.language #=> String
resp.nodes[0]..semantics.framework #=> String
resp.nodes[0]..semantics.kind #=> String
resp.nodes[0]..semantics.repository #=> String
resp.nodes[0]..logs #=> Array
resp.nodes[0]..logs[0].attributes #=> Hash
resp.nodes[0]..logs[0].attributes["String"] #=> String
resp.nodes[0]..traces #=> Array
resp.nodes[0]..traces[0].attributes #=> Hash
resp.nodes[0]..traces[0].attributes["String"] #=> String
resp.nodes[0]..profiles #=> Array
resp.nodes[0]..profiles[0].attributes #=> Hash
resp.nodes[0]..profiles[0].attributes["ProfileMetadataAttributeName"] #=> String
resp.nodes[0].first_observed_at #=> Time
resp.nodes[0].last_observed_at #=> Time
resp.nodes[0].edges #=> Array
resp.nodes[0].edges[0].edge_id #=> String
resp.nodes[0].edges[0].from #=> String
resp.nodes[0].edges[0].to #=> String
resp.nodes[0].edges[0].edge_type #=> String, one of "CALLS", "ACCESSES", "RUNS_ON"
resp.nodes[0].edges[0].operations #=> Array
resp.nodes[0].edges[0].operations[0] #=> String
resp.nodes[0].edges[0].edge_properties.protocol #=> String
resp.nodes[0].edges[0].edge_properties.source_port #=> String
resp.nodes[0].edges[0].edge_properties.destination_port #=> String
resp.nodes[0].edges[0].edge_properties.blocked #=> Boolean
resp.nodes[0].edges[0].edge_properties.error_code #=> String
resp.nodes[0].edges[0].edge_properties.http_status_code #=> String
resp.nodes[0].edges[0].edge_properties.http_method #=> String
resp.nodes[0].edges[0].edge_properties.service_initiated #=> Boolean
resp.nodes[0].edges[0].edge_properties.traffic_stats.bytes #=> Integer
resp.nodes[0].edges[0].edge_properties.traffic_stats.packets #=> Integer
resp.nodes[0].edges[0].edge_properties.traffic_stats.flows #=> Integer
resp.nodes[0].edges[0].edge_properties.traffic_stats.sent_bytes #=> Integer
resp.nodes[0].edges[0].edge_properties.traffic_stats.received_bytes #=> Integer
resp.nodes[0].edges[0].telemetry_attributes #=> Hash
resp.nodes[0].edges[0].telemetry_attributes["String"] #=> String
resp.nodes[0].edges[0].signal_types #=> Array
resp.nodes[0].edges[0].signal_types[0] #=> String, one of "LOGS", "METRICS", "TRACES", "CONFIG", "UNKNOWN", "PROFILES"
resp.nodes[0].edges[0].sources #=> Array
resp.nodes[0].edges[0].sources[0] #=> String, one of "VPC_FLOW_LOG", "CLOUDTRAIL", "IAM_POLICY", "CODE_SEMANTICS", "TELEMETRY", "AZURE_VNET_FLOW_LOG", "ELB_ACCESS_LOG", "CLOUDFRONT_ACCESS_LOG", "S3_ACCESS_LOG", "WAF_ACCESS_LOG", "AWS_INTEGRATION", "CONFIG"
resp.nodes[0].edges[0]..metrics #=> Array
resp.nodes[0].edges[0]..metrics[0].name #=> String
resp.nodes[0].edges[0]..metrics[0].preferred_stat #=> String
resp.nodes[0].edges[0]..metrics[0].metric_type #=> String
resp.nodes[0].edges[0]..metrics[0].attributes #=> Hash
resp.nodes[0].edges[0]..metrics[0].attributes["String"] #=> String
resp.nodes[0].edges[0]..metrics[0].semantics.description #=> String
resp.nodes[0].edges[0]..metrics[0].semantics.unit #=> String
resp.nodes[0].edges[0]..metrics[0].aggregation_temporality #=> String, one of "delta", "cumulative"
resp.nodes[0].edges[0]..metrics[0].monotonicity #=> String, one of "monotonic", "non_monotonic"
resp.nodes[0].edges[0]..metrics[0].operations #=> Array
resp.nodes[0].edges[0]..metrics[0].operations[0] #=> String
resp.nodes[0].edges[0]..semantics.purpose #=> String
resp.nodes[0].edges[0]..semantics.language #=> String
resp.nodes[0].edges[0]..semantics.framework #=> String
resp.nodes[0].edges[0]..semantics.kind #=> String
resp.nodes[0].edges[0]..semantics.repository #=> String
resp.nodes[0].edges[0]..logs #=> Array
resp.nodes[0].edges[0]..logs[0].attributes #=> Hash
resp.nodes[0].edges[0]..logs[0].attributes["String"] #=> String
resp.nodes[0].edges[0]..traces #=> Array
resp.nodes[0].edges[0]..traces[0].attributes #=> Hash
resp.nodes[0].edges[0]..traces[0].attributes["String"] #=> String
resp.nodes[0].edges[0]..profiles #=> Array
resp.nodes[0].edges[0]..profiles[0].attributes #=> Hash
resp.nodes[0].edges[0]..profiles[0].attributes["ProfileMetadataAttributeName"] #=> String
resp.nodes[0].edges[0].first_observed_at #=> Time
resp.nodes[0].edges[0].last_observed_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :node_filters (Types::NodeFilters) —

    Criteria restricting which nodes are returned.

  • :edge_filters (Types::EdgeFilters) —

    Criteria restricting which edges are returned.

  • :start_time (required, Time, DateTime, Date, Integer, String) —

    Start of the time range (UTC), inclusive.

  • :end_time (required, Time, DateTime, Date, Integer, String) —

    End of the time range (UTC), inclusive.

  • :depth (Integer) —

    How many hops to traverse out from the nodes matched by nodeFilters. 0 returns only the matched nodes themselves.

  • :max_results (Integer) —

    The maximum number of nodes to return in a single page.

  • :max_edges_per_node (Integer) —

    The maximum number of edges to return per node, bounding the fan-out of a densely connected node.

  • :include_metadata (Boolean) —

    Whether to return the metadata block, semantics included, on each node and edge. Off by default because it costs an extra lookup per returned node.

  • :next_token (String) —

    Pagination token from a previous response, to retrieve the next page.

Returns:

See Also:



4639
4640
4641
4642
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 4639

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

#get_domain(params = {}) ⇒ Types::GetDomainOutput

Retrieves the details of a domain by ID.

Examples:

Example: Get a domain


# The following example retrieves the configuration and status of an Identity Center domain by its ID. Payloads are shown
# as JSON; on the wire they are CBOR-encoded.

resp = client.get_domain({
  domain_id: "d-1a2b3c4d5e", 
})

resp.to_h outputs the following:
{
  domain: {
    name: "prod-observability", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    custom_endpoint_urls: [
      "https://prod-observability.cloudwatch-omni.global.app.aws", 
    ], 
    domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:domain/d-1a2b3c4d5e", 
    domain_endpoint_url: "https://d-1a2b3c4d5e.cloudwatch-omni.global.app.aws", 
    domain_id: "d-1a2b3c4d5e", 
    identity_center_application_arn: "arn:aws:sso::123456789012:application/ssoins-1234567890abcdef/apl-0f9e8d7c6b5a4938", 
    identity_provider_configuration: {
      identity_center_configuration: {
        identity_center_instance_arn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", 
      }, 
    }, 
    identity_providers: [
      "IDC", 
    ], 
    region: "us-east-1", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.get_domain({
  domain_id: "DomainId", # required
})

Response structure


resp.domain.domain_id #=> String
resp.domain.domain_arn #=> String
resp.domain.name #=> String
resp.domain.identity_providers #=> Array
resp.domain.identity_providers[0] #=> String, one of "IAM", "IDC"
resp.domain.identity_provider_configuration.identity_center_configuration.identity_center_instance_arn #=> String
resp.domain.identity_provider_configuration.identity_center_configuration.cross_region_configuration.enabled #=> Boolean
resp.domain.domain_endpoint_url #=> String
resp.domain.custom_endpoint_urls #=> Array
resp.domain.custom_endpoint_urls[0] #=> String
resp.domain.identity_center_application_arn #=> String
resp.domain.region #=> String
resp.domain.created_at #=> Time
resp.domain.updated_at #=> Time
resp.domain.status #=> String, one of "ACTIVE"

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String) —

    The unique ID of the domain.

Returns:

See Also:



4717
4718
4719
4720
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 4717

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

#get_domain_access_grant_for_organization(params = {}) ⇒ Types::GetDomainAccessGrantForOrganizationOutput

Retrieves the full detail of a single organization access grant by ID.

Examples:

Example: Get an organization domain access grant


# The following example retrieves the full detail of a single organization domain access grant by ID. Payloads are shown
# as JSON; on the wire they are CBOR-encoded.

resp = client.get_domain_access_grant_for_organization({
  grant_id: "7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
})

resp.to_h outputs the following:
{
  access_grant: {
    name: "org-domain-admin", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    created_by: "arn:aws:iam::123456789012:role/ObservabilityAdmin", 
    domain_id: "d-1a2b3c4d5e", 
    grant_arn: "arn:aws:cloudwatch:us-east-1:123456789012:organization-access-grant/7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
    grant_id: "7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
    grant_type: "CUSTOMER_MANAGED", 
    permission: "ADMIN", 
    principal: {
      principal_id: "94b6c7d8-1a2b-4c3d-9e4f-5a6b7c8d9e0f", 
      principal_type: "IDC_USER", 
    }, 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.get_domain_access_grant_for_organization({
  grant_id: "GrantId", # required
})

Response structure


resp.access_grant.grant_id #=> String
resp.access_grant.grant_arn #=> String
resp.access_grant.name #=> String
resp.access_grant.domain_id #=> String
resp.access_grant.principal.principal_type #=> String, one of "IDC_USER", "IDC_GROUP", "IAM_USER", "IAM_ROLE", "IAM_ROOT"
resp.access_grant.principal.principal_id #=> String
resp.access_grant.principal.principal_attributes #=> Array
resp.access_grant.principal.principal_attributes[0].key #=> String
resp.access_grant.principal.principal_attributes[0].value #=> String
resp.access_grant.permission #=> String, one of "ADMIN"
resp.access_grant.grant_type #=> String, one of "SERVICE_MANAGED", "CUSTOMER_MANAGED"
resp.access_grant.created_by #=> String
resp.access_grant.created_at #=> Time
resp.access_grant.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :grant_id (required, String) —

    The ID of the access grant to retrieve.

Returns:

See Also:



4787
4788
4789
4790
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 4787

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

#get_domain_for_organization(params = {}) ⇒ Types::GetDomainForOrganizationOutput

Retrieves the details of an organization domain by ID.

Examples:

Example: Get an organization domain


# The following example retrieves the configuration and status of an organization-scoped domain by its ID. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_domain_for_organization({
  domain_id: "d-9z8y7x6w5v", 
})

resp.to_h outputs the following:
{
  organization_domain: {
    name: "prod-observability-org", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    custom_endpoint_urls: [
      "https://prod-observability-org.cloudwatch-omni.global.app.aws", 
    ], 
    domain_access_role_arn: "arn:aws:iam::123456789012:role/CloudWatchOrganizationDomainAccessRole", 
    domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:organization-domain/d-9z8y7x6w5v", 
    domain_endpoint_url: "https://d-9z8y7x6w5v.cloudwatch-omni.global.app.aws", 
    domain_id: "d-9z8y7x6w5v", 
    identity_center_application_arn: "arn:aws:sso::123456789012:application/ssoins-1234567890abcdef/apl-0f9e8d7c6b5a4938", 
    identity_provider_configuration: {
      identity_center_configuration: {
        identity_center_instance_arn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", 
      }, 
    }, 
    identity_providers: [
      "IDC", 
    ], 
    organization_id: "o-a1b2c3d4e5", 
    owner_account_id: "123456789012", 
    region: "us-east-1", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.get_domain_for_organization({
  domain_id: "DomainId", # required
})

Response structure


resp.organization_domain.domain_id #=> String
resp.organization_domain.domain_arn #=> String
resp.organization_domain.name #=> String
resp.organization_domain.domain_endpoint_url #=> String
resp.organization_domain.custom_endpoint_urls #=> Array
resp.organization_domain.custom_endpoint_urls[0] #=> String
resp.organization_domain.organization_id #=> String
resp.organization_domain. #=> String
resp.organization_domain.identity_providers #=> Array
resp.organization_domain.identity_providers[0] #=> String, one of "IAM", "IDC"
resp.organization_domain.identity_provider_configuration.identity_center_configuration.identity_center_instance_arn #=> String
resp.organization_domain.identity_provider_configuration.identity_center_configuration.cross_region_configuration.enabled #=> Boolean
resp.organization_domain.identity_center_application_arn #=> String
resp.organization_domain.region #=> String
resp.organization_domain.status #=> String, one of "ACTIVE"
resp.organization_domain.domain_access_role_arn #=> String
resp.organization_domain.created_at #=> Time
resp.organization_domain.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String) —

    The ID of the organization domain.

Returns:

See Also:



4871
4872
4873
4874
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 4871

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

#get_experiment(params = {}) ⇒ Types::GetExperimentOutput

Retrieves the details of an experiment by ID.

The response includes the experiment's target, type, configuration, run count, latest run, and baseline run. To read the experiment's tags, call ListTagsForResource with its ARN. Use ListExperiments to enumerate experiments.

Examples:

Example: Get an experiment


# The following example retrieves an experiment that has three runs. The latest run was reported from a CI build and
# passed its rule. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_experiment({
  experiment_id: "exp-01JC8Z5V7Q3M9K2T4R6W8Y0ABC", 
})

resp.to_h outputs the following:
{
  experiment: {
    name: "Travel agent regression suite", 
    baseline_run_id: "ci-build-4790", 
    created_at: Time.parse("2026-11-10T14:22:31Z"), 
    description: "Checks booking accuracy before each release.", 
    experiment_arn: "arn:aws:cloudwatch:us-east-1:123456789012:experiment/exp-01JC8Z5V7Q3M9K2T4R6W8Y0ABC", 
    experiment_config: {
      dataset: {
        execution_role_arn: "arn:aws:iam::123456789012:role/ExperimentExecutionRole", 
        results_log_group: "/experiments/travel-agent/results", 
      }, 
    }, 
    experiment_id: "exp-01JC8Z5V7Q3M9K2T4R6W8Y0ABC", 
    experiment_type: "DATASET", 
    latest_run: {
      cases_total: 50, 
      completed_at: Time.parse("2026-11-11T09:18:40Z"), 
      created_at: Time.parse("2026-11-11T09:05:12Z"), 
      dataset_id: "travel-bookings-v2", 
      dataset_source: "AGENTCORE", 
      passed: 47, 
      producer_kind: "SDK", 
      role: "TARGET", 
      rule_name: "release-gate", 
      run_id: "ci-build-4821", 
      source: "REPORTED", 
      status: "COMPLETED", 
      target_version: "7", 
      verdict: "PASSED", 
      verdict_reason_code: "PASSED", 
    }, 
    run_count: 3, 
    target: {
      name: "Travel agent", 
      definition: {
        agent_core_runtime: {
          runtime_arn: "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/travel_agent-a1B2c3D4e5", 
        }, 
      }, 
      environment: "staging", 
      service_name: "travel-agent", 
    }, 
    target_run_count: 3, 
    updated_at: Time.parse("2026-11-10T16:03:08Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.get_experiment({
  experiment_id: "ExperimentId", # required
})

Response structure


resp.experiment.experiment_id #=> String
resp.experiment.experiment_arn #=> String
resp.experiment.name #=> String
resp.experiment.description #=> String
resp.experiment.target.name #=> String
resp.experiment.target.service_name #=> String
resp.experiment.target.environment #=> String
resp.experiment.target.definition.agent_core_runtime.runtime_arn #=> String
resp.experiment.target.definition.https_endpoint.base_url #=> String
resp.experiment.experiment_type #=> String, one of "DATASET"
resp.experiment.experiment_config.dataset.execution_role_arn #=> String
resp.experiment.experiment_config.dataset.results_log_group #=> String
resp.experiment.experiment_config.dataset.trace_log_groups #=> Array
resp.experiment.experiment_config.dataset.trace_log_groups[0] #=> String
resp.experiment.experiment_config.dataset.collect_trace_stats #=> Boolean
resp.experiment.run_count #=> Integer
resp.experiment.target_run_count #=> Integer
resp.experiment.latest_run.run_id #=> String
resp.experiment.latest_run.source #=> String, one of "REPORTED", "HOSTED"
resp.experiment.latest_run.status #=> String, one of "RUNNING", "STOPPING", "COMPLETED", "DID_NOT_FINISH"
resp.experiment.latest_run.status_reason #=> String, one of "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "RESULTS_WRITE_FAILED"
resp.experiment.latest_run.producer_kind #=> String, one of "SDK", "CUSTOM"
resp.experiment.latest_run.target_version #=> String
resp.experiment.latest_run.dataset_source #=> String, one of "AGENTCORE", "FILE", "OTHER"
resp.experiment.latest_run.dataset_id #=> String
resp.experiment.latest_run.dataset_name #=> String
resp.experiment.latest_run.dataset_version #=> String
resp.experiment.latest_run.rule_name #=> String
resp.experiment.latest_run.rule_content_hash #=> String
resp.experiment.latest_run. #=> Hash
resp.experiment.latest_run.["RunMetadataMapKeyString"] #=> String
resp.experiment.latest_run.description #=> String
resp.experiment.latest_run.trace_stats.status #=> String, one of "PENDING", "AVAILABLE", "UNAVAILABLE"
resp.experiment.latest_run.trace_stats.status_reason #=> String, one of "NO_TRACES", "SPANS_NOT_FOUND", "ACCESS_DENIED", "SCAN_LIMIT", "QUERY_FAILED", "INTERNAL_ERROR"
resp.experiment.latest_run.trace_stats.cases_read #=> Integer
resp.experiment.latest_run.trace_stats.sampled #=> Boolean
resp.experiment.latest_run.trace_stats.cases_with_spans #=> Integer
resp.experiment.latest_run.trace_stats.attributes #=> Array
resp.experiment.latest_run.trace_stats.attributes[0].name #=> String, one of "MODEL", "TOOL_NAME", "SYSTEM_INSTRUCTIONS"
resp.experiment.latest_run.trace_stats.attributes[0].version #=> Integer
resp.experiment.latest_run.trace_stats.attributes[0].distinct #=> Integer
resp.experiment.latest_run.trace_stats.attributes[0].values_hash #=> String
resp.experiment.latest_run.trace_stats.attributes[0].values #=> Array
resp.experiment.latest_run.trace_stats.attributes[0].values[0].value #=> String
resp.experiment.latest_run.trace_stats.attributes[0].values[0].cases #=> Integer
resp.experiment.latest_run.trace_stats.metrics #=> Array
resp.experiment.latest_run.trace_stats.metrics[0].name #=> String, one of "MODEL_CALLS", "TOOL_CALLS", "INPUT_TOKENS", "OUTPUT_TOKENS", "TURN_LATENCY_MS", "FAILED"
resp.experiment.latest_run.trace_stats.metrics[0].version #=> Integer
resp.experiment.latest_run.trace_stats.metrics[0].count #=> Integer
resp.experiment.latest_run.trace_stats.metrics[0].mean #=> Float
resp.experiment.latest_run.trace_stats.metrics[0].p50 #=> Float
resp.experiment.latest_run.trace_stats.metrics[0].p90 #=> Float
resp.experiment.latest_run.trace_stats.computed_at #=> Time
resp.experiment.latest_run.verdict #=> String, one of "PASSED", "FAILED", "DID_NOT_FINISH"
resp.experiment.latest_run.verdict_reason_code #=> String, one of "PASSED", "NOT_SCORED_RATE_ABOVE_MAX", "PASS_RATE_BELOW_MIN", "AVERAGE_BELOW_MIN", "AVERAGE_ABOVE_MAX", "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "BELOW_CONTROL", "REGRESSED_CASES_ABOVE_MAX", "FIXED_CASES_BELOW_MIN", "UNPAIRED_CASE_RATE_ABOVE_MAX", "SCORE_REGRESSED", "CONTROL_DID_NOT_FINISH", "RESULTS_WRITE_FAILED"
resp.experiment.latest_run.verdict_reason #=> String
resp.experiment.latest_run.pass_rate #=> Float
resp.experiment.latest_run.control_pass_rate #=> Float
resp.experiment.latest_run.role #=> String, one of "TARGET", "CONTROL"
resp.experiment.latest_run.control_run_id #=> String
resp.experiment.latest_run.cases_total #=> Integer
resp.experiment.latest_run.passed #=> Integer
resp.experiment.latest_run.created_at #=> Time
resp.experiment.latest_run.completed_at #=> Time
resp.experiment.baseline_run_id #=> String
resp.experiment.created_at #=> Time
resp.experiment.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :experiment_id (required, String) —

    The ID of the experiment.

Returns:

See Also:



5029
5030
5031
5032
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 5029

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

#get_experiment_run(params = {}) ⇒ Types::GetExperimentRunOutput

Retrieves the details of a run.

The response includes the run's status, progress, case summary, evaluator metrics and, when it has a rule, its verdict and the checks behind it. For a hosted run, it also includes the batch evaluation's progress.

Examples:

Example: Get a completed hosted run


# The following example returns a hosted run that has completed and passed its rule. Payloads are shown as JSON; on the
# wire they are CBOR-encoded.

resp = client.get_experiment_run({
  experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
  run_id: "run-01JD8M2A4C6E8G0J2K4M6P8R0T", 
})

resp.to_h outputs the following:
{
  run: {
    metadata: {
      "modelId" => "anthropic.claude-sonnet", 
      "promptVersion" => "v3", 
    }, 
    case_records_written: 120, 
    checks: [
      {
        bound: {
          min: 0.9, 
        }, 
        decisive: false, 
        metric: {
          pass_rate: {
          }, 
        }, 
        observed: 0.95, 
        passed: true, 
      }, 
      {
        bound: {
          max: 0.05, 
        }, 
        decisive: false, 
        metric: {
          not_scored_rate: {
          }, 
        }, 
        observed: 0.0, 
        passed: true, 
      }, 
    ], 
    completed_at: Time.parse("2026-11-10T14:41:05Z"), 
    created_at: Time.parse("2026-11-10T14:22:31Z"), 
    dataset: {
      version: "3", 
      case_count: 120, 
      content_hash: "sha256:3b7e9f2a1c4d6e8f0a2b4c6d8e0f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9c1d3e5f", 
      id: "support-faq-dataset", 
      source: "AGENTCORE", 
    }, 
    description: "Release candidate with the v3 support prompt", 
    evaluators: [
      {
        evaluator_id: "Builtin.Helpfulness", 
        rating_scale: "NUMERIC", 
      }, 
    ], 
    experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
    metrics: [
      {
        average: 0.84, 
        evaluator_id: "Builtin.Helpfulness", 
        max: 1.0, 
        min: 0.41, 
        passed_count: 114, 
        scored_count: 120, 
      }, 
    ], 
    producer_principal: "arn:aws:iam::123456789012:role/ReleaseAutomation", 
    role: "TARGET", 
    rule: {
      name: "release-gate", 
      case_criteria: [
        {
          evaluator: {
            evaluator_id: "Builtin.Helpfulness", 
            threshold: {
              min_score: 0.7, 
            }, 
          }, 
        }, 
      ], 
      content_hash: "sha256:9a8b7c6d5e4f30211203f4e5d6c7b8a99a8b7c6d5e4f30211203f4e5d6c7b8a9", 
      gates: [
        {
          bound: {
            min: 0.9, 
          }, 
          metric: {
            pass_rate: {
            }, 
          }, 
        }, 
      ], 
      source: "INLINE", 
    }, 
    run_id: "run-01JD8M2A4C6E8G0J2K4M6P8R0T", 
    source: "HOSTED", 
    started_at: Time.parse("2026-11-10T14:22:34Z"), 
    status: "COMPLETED", 
    summary: {
      cases_done: 120, 
      cases_reported: 120, 
      cases_total: 120, 
      completed: 0, 
      failed: 6, 
      not_run: 0, 
      not_scored: 0, 
      not_scored_rate: 0.0, 
      pass_rate: 0.95, 
      passed: 114, 
      target_error: 0, 
      timed_out: 0, 
    }, 
    target: {
      agent_core_runtime: {
        version: "7", 
        endpoint_arn: "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/support_agent-a1B2c3D4e5/runtime-endpoint/production", 
      }, 
    }, 
    updated_at: Time.parse("2026-11-10T14:41:05Z"), 
    verdict: "PASSED", 
    verdict_reason: "pass rate 95% (required 90%)", 
    verdict_reason_code: "PASSED", 
  }, 
}

Request syntax with placeholder values


resp = client.get_experiment_run({
  experiment_id: "ExperimentId", # required
  run_id: "ExperimentRunId", # required
})

Response structure


resp.run.experiment_id #=> String
resp.run.run_id #=> String
resp.run.source #=> String, one of "REPORTED", "HOSTED"
resp.run.status #=> String, one of "RUNNING", "STOPPING", "COMPLETED", "DID_NOT_FINISH"
resp.run.status_reason #=> String, one of "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "RESULTS_WRITE_FAILED"
resp.run.status_detail #=> String
resp.run.producer.kind #=> String, one of "SDK", "CUSTOM"
resp.run.producer.name #=> String
resp.run.producer.version #=> String
resp.run.producer.external_id #=> String
resp.run.producer_principal #=> String
resp.run.target.agent_core_runtime.endpoint_arn #=> String
resp.run.target.agent_core_runtime.request_template #=> String
resp.run.target.agent_core_runtime.version #=> String
resp.run.target.https_endpoint.url #=> String
resp.run.target.https_endpoint.version #=> String
resp.run.target.custom.version #=> String
resp.run.target.custom.endpoint #=> String
resp.run.control.target.agent_core_runtime.endpoint_arn #=> String
resp.run.control.target.agent_core_runtime.request_template #=> String
resp.run.control.target.agent_core_runtime.version #=> String
resp.run.control.target.https_endpoint.url #=> String
resp.run.control.target.https_endpoint.version #=> String
resp.run.control.target.custom.version #=> String
resp.run.control.target.custom.endpoint #=> String
resp.run.control.run_id #=> String
resp.run.control.latest_passed.endpoint_arn #=> String
resp.run.control_run_id #=> String
resp.run.role #=> String, one of "TARGET", "CONTROL"
resp.run.target_run_id #=> String
resp.run.dataset.source #=> String, one of "AGENTCORE", "FILE", "OTHER"
resp.run.dataset.id #=> String
resp.run.dataset.name #=> String
resp.run.dataset.version #=> String
resp.run.dataset.case_count #=> Integer
resp.run.dataset.content_hash #=> String
resp.run.evaluators #=> Array
resp.run.evaluators[0].evaluator_id #=> String
resp.run.evaluators[0].rating_scale #=> String, one of "NUMERIC", "CATEGORICAL"
resp.run.evaluators[0].score_direction #=> String, one of "HIGHER_IS_BETTER", "LOWER_IS_BETTER"
resp.run.rule.source #=> String, one of "FILE", "INLINE"
resp.run.rule.name #=> String
resp.run.rule.case_criteria #=> Array
resp.run.rule.case_criteria[0].evaluator.evaluator_id #=> String
resp.run.rule.case_criteria[0].evaluator.threshold.min_score #=> Float
resp.run.rule.case_criteria[0].evaluator.threshold.max_score #=> Float
resp.run.rule.case_criteria[0].evaluator.threshold.pass_labels #=> Array
resp.run.rule.case_criteria[0].evaluator.threshold.pass_labels[0] #=> String
resp.run.rule.gates #=> Array
resp.run.rule.gates[0].metric.evaluator_average.evaluator_id #=> String
resp.run.rule.gates[0].bound.min #=> Float
resp.run.rule.gates[0].bound.max #=> Float
resp.run.rule.gates[0].bound.vs_control.min_delta #=> Float
resp.run.rule.gates[0].bound.vs_control.mode #=> String, one of "ABSOLUTE", "RATIO"
resp.run.rule.content_hash #=> String
resp.run. #=> Hash
resp.run.["RunMetadataMapKeyString"] #=> String
resp.run.description #=> String
resp.run.trace_stats.status #=> String, one of "PENDING", "AVAILABLE", "UNAVAILABLE"
resp.run.trace_stats.status_reason #=> String, one of "NO_TRACES", "SPANS_NOT_FOUND", "ACCESS_DENIED", "SCAN_LIMIT", "QUERY_FAILED", "INTERNAL_ERROR"
resp.run.trace_stats.cases_read #=> Integer
resp.run.trace_stats.sampled #=> Boolean
resp.run.trace_stats.cases_with_spans #=> Integer
resp.run.trace_stats.attributes #=> Array
resp.run.trace_stats.attributes[0].name #=> String, one of "MODEL", "TOOL_NAME", "SYSTEM_INSTRUCTIONS"
resp.run.trace_stats.attributes[0].version #=> Integer
resp.run.trace_stats.attributes[0].distinct #=> Integer
resp.run.trace_stats.attributes[0].values_hash #=> String
resp.run.trace_stats.attributes[0].values #=> Array
resp.run.trace_stats.attributes[0].values[0].value #=> String
resp.run.trace_stats.attributes[0].values[0].cases #=> Integer
resp.run.trace_stats.metrics #=> Array
resp.run.trace_stats.metrics[0].name #=> String, one of "MODEL_CALLS", "TOOL_CALLS", "INPUT_TOKENS", "OUTPUT_TOKENS", "TURN_LATENCY_MS", "FAILED"
resp.run.trace_stats.metrics[0].version #=> Integer
resp.run.trace_stats.metrics[0].count #=> Integer
resp.run.trace_stats.metrics[0].mean #=> Float
resp.run.trace_stats.metrics[0].p50 #=> Float
resp.run.trace_stats.metrics[0].p90 #=> Float
resp.run.trace_stats.computed_at #=> Time
resp.run.batch_evaluation.batch_evaluation_arn #=> String
resp.run.batch_evaluation.total_sessions #=> Integer
resp.run.batch_evaluation.sessions_completed #=> Integer
resp.run.batch_evaluation.sessions_in_progress #=> Integer
resp.run.batch_evaluation.sessions_failed #=> Integer
resp.run.batch_evaluation.sessions_ignored #=> Integer
resp.run.summary.cases_total #=> Integer
resp.run.summary.cases_reported #=> Integer
resp.run.summary.cases_done #=> Integer
resp.run.summary.passed #=> Integer
resp.run.summary.failed #=> Integer
resp.run.summary.completed #=> Integer
resp.run.summary.target_error #=> Integer
resp.run.summary.timed_out #=> Integer
resp.run.summary.not_scored #=> Integer
resp.run.summary.not_run #=> Integer
resp.run.summary.pass_rate #=> Float
resp.run.summary.not_scored_rate #=> Float
resp.run.metrics #=> Array
resp.run.metrics[0].evaluator_id #=> String
resp.run.metrics[0].average #=> Float
resp.run.metrics[0].min #=> Float
resp.run.metrics[0].max #=> Float
resp.run.metrics[0].label_counts #=> Hash
resp.run.metrics[0].label_counts["LabelCountMapKeyString"] #=> Integer
resp.run.metrics[0].scored_count #=> Integer
resp.run.metrics[0].passed_count #=> Integer
resp.run.case_records_written #=> Integer
resp.run.verdict #=> String, one of "PASSED", "FAILED", "DID_NOT_FINISH"
resp.run.verdict_reason_code #=> String, one of "PASSED", "NOT_SCORED_RATE_ABOVE_MAX", "PASS_RATE_BELOW_MIN", "AVERAGE_BELOW_MIN", "AVERAGE_ABOVE_MAX", "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "BELOW_CONTROL", "REGRESSED_CASES_ABOVE_MAX", "FIXED_CASES_BELOW_MIN", "UNPAIRED_CASE_RATE_ABOVE_MAX", "SCORE_REGRESSED", "CONTROL_DID_NOT_FINISH", "RESULTS_WRITE_FAILED"
resp.run.verdict_reason #=> String
resp.run.checks #=> Array
resp.run.checks[0].metric.evaluator_average.evaluator_id #=> String
resp.run.checks[0].bound.min #=> Float
resp.run.checks[0].bound.max #=> Float
resp.run.checks[0].bound.vs_control.min_delta #=> Float
resp.run.checks[0].bound.vs_control.mode #=> String, one of "ABSOLUTE", "RATIO"
resp.run.checks[0].observed #=> Float
resp.run.checks[0].control_observed #=> Float
resp.run.checks[0].delta #=> Float
resp.run.checks[0].passed #=> Boolean
resp.run.checks[0].decisive #=> Boolean
resp.run.checks[0].observed_by_evaluator #=> Array
resp.run.checks[0].observed_by_evaluator[0].evaluator_id #=> String
resp.run.checks[0].observed_by_evaluator[0].count #=> Integer
resp.run.created_at #=> Time
resp.run.started_at #=> Time
resp.run.completed_at #=> Time
resp.run.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :experiment_id (required, String) —

    The ID of the experiment the run belongs to.

  • :run_id (required, String) —

    The ID of the run to retrieve.

Returns:

See Also:



5324
5325
5326
5327
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 5324

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

#get_integration(params = {}) ⇒ Types::GetIntegrationOutput

Returns the details of a single integration, identified by its identifier, Amazon Resource Name, or name.

Examples:

Example: Get an integration by id


# The following example returns the integration with the given id. Payloads are shown as JSON; on the wire they are
# CBOR-encoded.

resp = client.get_integration({
  identifier: {
    integration_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  }, 
})

resp.to_h outputs the following:
{
  integration: {
    name: "my-aws-integration", 
    created_at: Time.parse("2026-09-16T00:03:00Z"), 
    integration_arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    integration_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    integration_type: "AWS_INTEGRATION", 
    role_arn: "arn:aws:iam::123456789012:role/service-role/CloudWatchIntegrationRole", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-16T00:03:00Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.get_integration({
  identifier: { # required
    integration_id: "String",
    integration_arn: "IntegrationArn",
    integration_name: "String",
  },
})

Response structure


resp.integration.integration_id #=> String
resp.integration.integration_arn #=> String
resp.integration.integration_type #=> String, one of "AWS_CONFIG_SLREC", "AWS_CONFIG_AZURE_SLREC", "GITHUB", "SLACK", "EXTERNAL_AGENT", "AWS_INTEGRATION", "PAGERDUTY", "GITHUB_ENTERPRISE"
resp.integration.name #=> String
resp.integration.status #=> String, one of "ACTIVE", "DELETED", "PENDING", "PENDING_OAUTH", "ERROR", "FAILED"
resp.integration.auth_type #=> String, one of "NONE", "OAUTH2", "API_KEY"
resp.integration.credential_arn #=> String
resp.integration.role_arn #=> String
resp.integration.integration_attributes #=> Hash
resp.integration.integration_attributes["StringMapKeyString"] #=> String
resp.integration.authorization_url #=> String
resp.integration.error_message #=> String
resp.integration.created_at #=> Time
resp.integration.updated_at #=> Time
resp.integration.scope #=> String, one of "ACCOUNT", "ORGANIZATION"

Parameters:

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

    ({})

Options Hash (params):

  • :identifier (required, Types::IntegrationIdentifier) —

    Identifies the integration to return — exactly one of integrationId, integrationArn, or integrationName.

Returns:

See Also:



5398
5399
5400
5401
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 5398

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

#get_intelligence_configuration(params = {}) ⇒ Types::GetIntelligenceConfigurationOutput

Retrieves the intelligence configuration for the calling account in the current Region. The account is the account of the caller's credentials; the request does not name it. If the account has no configuration yet, the response is the default configuration, with intelligenceEnabled set to false.

Examples:

Example: Retrieve the intelligence configuration


# The following example retrieves the intelligence configuration for the calling account. The request carries no
# parameters; the account is taken from the caller identity. Payloads are shown as JSON; on the wire they are
# CBOR-encoded.

resp = client.get_intelligence_configuration({
})

resp.to_h outputs the following:
{
  account_id: "123456789012", 
  auto_investigations: [
    {
      integration_arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/f0e1d2c3-b4a5-4968-8776-655443322110", 
      minimum_severity: "HIGH", 
    }, 
  ], 
  created_at: Time.parse("2026-01-15T08:30:00Z"), 
  intelligence_enabled: true, 
  kms_key_arn: "arn:aws:kms:us-east-1:123456789012:key/1a2b3c4d-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  notification_targets: [
    {
      filter: {
        minimum_severity: "HIGH", 
        services: [
          "checkout-service", 
        ], 
      }, 
      target: {
        metadata: {
          "channel" => "checkout-oncall", 
          "channelId" => "C0123456789", 
        }, 
        type: "slack", 
        arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      }, 
      target_id: "k3m9q2x7v1", 
    }, 
    {
      target: {
        type: "sns", 
        arn: "arn:aws:sns:us-east-1:123456789012:checkout-oncall", 
      }, 
      target_id: "p8w4t6z0n5", 
    }, 
  ], 
  updated_at: Time.parse("2026-09-16T12:05:00Z"), 
}

Response structure


resp. #=> String
resp.intelligence_enabled #=> Boolean
resp.kms_key_arn #=> String
resp.updated_at #=> Time
resp.created_at #=> Time
resp.notification_targets #=> Array
resp.notification_targets[0].target_id #=> String
resp.notification_targets[0].target.type #=> String, one of "sns", "slack", "pagerduty"
resp.notification_targets[0].target.arn #=> String
resp.notification_targets[0].target. #=> Hash
resp.notification_targets[0].target.["IntelligenceNotificationTargetMetadataMapKeyString"] #=> String
resp.notification_targets[0].filter.services #=> Array
resp.notification_targets[0].filter.services[0] #=> String
resp.notification_targets[0].filter.minimum_severity #=> String, one of "LOW", "MEDIUM", "HIGH"
resp.auto_investigations #=> Array
resp.auto_investigations[0].integration_arn #=> String
resp.auto_investigations[0].minimum_severity #=> String, one of "LOW", "MEDIUM", "HIGH"

Parameters:

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

    ({})

Returns:

See Also:



5494
5495
5496
5497
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 5494

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

#get_lookup(params = {}) ⇒ Types::GetLookupResponse

Returns the metadata of the specified lookup table.

Examples:

Example: Get a lookup table


# The following example returns a lookup table's metadata. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_lookup({
  identifier: "3k7f2m9qx4pd8w1n6v0b5j2tz", 
})

resp.to_h outputs the following:
{
  name: "service_owners", 
  arn: "arn:aws:cloudwatch:us-east-1:123456789012:lookup/service_owners/3k7f2m9qx4pd8w1n6v0b5j2tz", 
  columns: [
    "service", 
    "team", 
  ], 
  created_at: Time.parse("2026-10-18T09:05:12Z"), 
  description: "Owning team per service", 
  row_count: 2, 
  size_bytes: 48, 
  updated_at: Time.parse("2026-10-20T14:22:31Z"), 
}

Request syntax with placeholder values


resp = client.get_lookup({
  identifier: "LookupIdentifier", # required
})

Response structure


resp.name #=> String
resp.arn #=> String
resp.description #=> String
resp.columns #=> Array
resp.columns[0] #=> String
resp.row_count #=> Integer
resp.size_bytes #=> Integer
resp.kms_key_arn #=> String
resp.created_at #=> Time
resp.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :identifier (required, String) —

    The id of the lookup table to return.

Returns:

See Also:



5563
5564
5565
5566
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 5563

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

#get_lookup_data(params = {}) ⇒ Types::GetLookupDataResponse

Returns the content of the specified lookup table as CSV.

Examples:

Example: Read a lookup table's content


# The following example returns every row of a lookup table as CSV, led by a header record of the column names. Payloads
# are shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_lookup_data({
  identifier: "3k7f2m9qx4pd8w1n6v0b5j2tz", 
})

resp.to_h outputs the following:
{
  rows: "service,team\ncheckout,payments\nsearch,discovery\n", 
}

Request syntax with placeholder values


resp = client.get_lookup_data({
  identifier: "LookupIdentifier", # required
})

Response structure


resp.rows #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :identifier (required, String) —

    The id of the lookup table whose content to return.

Returns:

See Also:



5606
5607
5608
5609
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 5606

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

#get_omni_dashboard(params = {}) ⇒ Types::GetOmniDashboardOutput

Retrieves a dashboard by ID within a space.

Examples:

Example: Get a dashboard


# The following example retrieves a dashboard by ID within a space, including its full body. Payloads are shown as JSON;
# on the wire they are CBOR-encoded.

resp = client.get_omni_dashboard({
  dashboard_id: "c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  omni_dashboard: {
    name: "service-health-overview", 
    arn: "arn:aws:cloudwatch:us-east-1:123456789012:omni-dashboard/c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
    body: "{\"panels\":[{\"type\":\"markdown\",\"title\":\"Overview\",\"layout\":{\"x\":0,\"y\":0,\"w\":60,\"h\":120},\"config\":{\"content\":\"Service health for OrderProcessor.\"}},{\"type\":\"explore\",\"title\":\"Lambda errors\",\"layout\":{\"x\":0,\"y\":120,\"w\":60,\"h\":400},\"config\":{\"queries\":[{\"queryId\":\"A\",\"queryLanguage\":\"promql\",\"queryString\":\"sum(rate(aws_lambda_errors_sum{function_name=\\\"OrderProcessor\\\"}[5m]))\"}],\"visualization\":\"line\"}}]}", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    created_by: "arn:aws:iam::123456789012:role/ObservabilityAdmin", 
    dashboard_id: "c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
    description: "Overview of service health metrics.", 
    tags: {
      "Team" => "observability", 
    }, 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.get_omni_dashboard({
  space_id: "SpaceId", # required
  dashboard_id: "DashboardId", # required
})

Response structure


resp.omni_dashboard.dashboard_id #=> String
resp.omni_dashboard.arn #=> String
resp.omni_dashboard.name #=> String
resp.omni_dashboard.body #=> String
resp.omni_dashboard.created_by #=> String
resp.omni_dashboard.description #=> String
resp.omni_dashboard.tags #=> Hash
resp.omni_dashboard.tags["TagKey"] #=> String
resp.omni_dashboard.created_at #=> Time
resp.omni_dashboard.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :dashboard_id (required, String) —

    The unique ID of the dashboard.

Returns:

See Also:



5675
5676
5677
5678
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 5675

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

#get_omni_slo(params = {}) ⇒ Types::GetOmniSloOutput

Retrieves a single service level objective (SLO) by its identifier, including its definition and its current state.

The state reports the measurement taken when the state last changed, not a live figure. Use ListOmniSlos to enumerate the SLOs in a space.

Examples:

Example: Retrieve an SLO


# The following example retrieves a request-based SLO by its identifier. The state reports the measurement taken when the
# state last changed: 75.1 percent of the error budget, counted in events, had been consumed, which reached the warning
# ratio of 0.75, so the SLO entered the WARNING state. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_omni_slo({
  slo_id: "9f8e7d6c5b4a49382716051a2b3c4d5e", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  slo: {
    name: "checkout-api-availability", 
    account_id: "123456789012", 
    description: "99.9 percent of checkout API requests succeed over a rolling 30 days.", 
    objective: {
      target: 99.9, 
      time_window: {
        rolling: {
          days: 30, 
        }, 
      }, 
      warning_budget_consumed_ratio: 0.75, 
    }, 
    revision: 1, 
    service_attributes: {
      cloud_account_id: "123456789012", 
      cloud_provider: "aws", 
      cloud_region: "us-east-1", 
      deployment_environment_name: "prod", 
      service_name: "checkout-api", 
      service_namespace: "retail", 
    }, 
    sli: {
      events: {
        good: {
          expression: "sum(increase({\"http.server.request.duration_count\", \"service.name\"=\"checkout-api\", \"http.response.status_code\"!~\"5..\"}[$__interval]))", 
          language: "PROMQL", 
        }, 
        total: {
          expression: "sum(increase({\"http.server.request.duration_count\", \"service.name\"=\"checkout-api\"}[$__interval]))", 
          language: "PROMQL", 
        }, 
      }, 
    }, 
    slo_arn: "arn:aws:cloudwatch:us-east-1:123456789012:omni-slo/9f8e7d6c5b4a49382716051a2b3c4d5e", 
    slo_id: "9f8e7d6c5b4a49382716051a2b3c4d5e", 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    state: {
      value: "WARNING", 
      state_transition_measurement: {
        attainment: 99.925, 
        error_budget: {
          consumed: 931.0, 
          total: 1240.0, 
          unit: "EVENTS", 
        }, 
        error_budget_consumed_ratio: 0.751, 
      }, 
      transitioned_at: Time.parse("2026-11-15T21:04:00Z"), 
    }, 
    updated_at: Time.parse("2026-11-02T09:15:42Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.get_omni_slo({
  space_id: "SpaceId", # required
  slo_id: "SloId", # required
})

Response structure


resp.slo.name #=> String
resp.slo.slo_id #=> String
resp.slo.description #=> String
resp.slo. #=> String
resp.slo.space_id #=> String
resp.slo.service_attributes.service_name #=> String
resp.slo.service_attributes.service_namespace #=> String
resp.slo.service_attributes.cloud_provider #=> String
resp.slo.service_attributes. #=> String
resp.slo.service_attributes.cloud_region #=> String
resp.slo.service_attributes.deployment_environment_name #=> String
resp.slo.sli.events.bad.language #=> String, one of "SQL", "PROMQL"
resp.slo.sli.events.bad.expression #=> String
resp.slo.sli.events.good.language #=> String, one of "SQL", "PROMQL"
resp.slo.sli.events.good.expression #=> String
resp.slo.sli.events.total.language #=> String, one of "SQL", "PROMQL"
resp.slo.sli.events.total.expression #=> String
resp.slo.sli.periods.period_minutes #=> Integer
resp.slo.sli.periods.query.language #=> String, one of "SQL", "PROMQL"
resp.slo.sli.periods.query.expression #=> String
resp.slo.sli.periods.good.comparator #=> String, one of "GT", "LT", "GTE", "LTE"
resp.slo.sli.periods.good.threshold #=> Float
resp.slo.sli.periods.bad.comparator #=> String, one of "GT", "LT", "GTE", "LTE"
resp.slo.sli.periods.bad.threshold #=> Float
resp.slo.objective.target #=> Float
resp.slo.objective.warning_budget_consumed_ratio #=> Float
resp.slo.objective.time_window.rolling.days #=> Integer
resp.slo.objective.time_window.calendar.unit #=> String, one of "WEEK", "MONTH"
resp.slo.objective.time_window.calendar.week_start_day #=> String, one of "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"
resp.slo.objective.time_window.calendar.time_zone #=> String
resp.slo.revision #=> Integer
resp.slo.state.value #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.slo.state.no_data_reason #=> String
resp.slo.state.transitioned_at #=> Time
resp.slo.state.state_transition_measurement.attainment #=> Float
resp.slo.state.state_transition_measurement.error_budget_consumed_ratio #=> Float
resp.slo.state.state_transition_measurement.error_budget.unit #=> String, one of "EVENTS", "PERIODS"
resp.slo.state.state_transition_measurement.error_budget.total #=> Float
resp.slo.state.state_transition_measurement.error_budget.consumed #=> Float
resp.slo.updated_at #=> Time
resp.slo.slo_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space that owns the SLO.

  • :slo_id (required, String) —

    The identifier of the SLO to retrieve.

Returns:

See Also:



5819
5820
5821
5822
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 5819

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

#get_space(params = {}) ⇒ Types::GetSpaceOutput

Retrieves the details of a space by ID.

Examples:

Example: Get a space


# The following example retrieves the details of a space by ID. Payloads are shown as JSON; on the wire they are
# CBOR-encoded.

resp = client.get_space({
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  space: {
    name: "prod-observability", 
    agent_core_evaluation_role_arn: "arn:aws:iam::123456789012:role/CloudWatchAgentCoreEvaluationRole", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    data_access_role_arn: "arn:aws:iam::123456789012:role/CloudWatchSpaceDataAccessRole", 
    domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:domain/d-1a2b3c4d5e", 
    encryption_configuration: {
      encryption_strategy: "CUSTOMER_MANAGED", 
      kms_key_arn: "arn:aws:kms:us-east-1:123456789012:key/1a2b3c4d-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    }, 
    owner_account_id: "123456789012", 
    region: "us-east-1", 
    space_arn: "arn:aws:cloudwatch:us-east-1:123456789012:space/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-16T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.get_space({
  space_id: "SpaceId", # required
})

Response structure


resp.space.space_id #=> String
resp.space.name #=> String
resp.space.space_arn #=> String
resp.space.domain_arn #=> String
resp.space.region #=> String
resp.space.identity_center_configuration.region #=> String
resp.space. #=> String
resp.space.data_access_role_arn #=> String
resp.space.created_at #=> Time
resp.space.updated_at #=> Time
resp.space.agent_core_evaluation_role_arn #=> String
resp.space.status #=> String, one of "ACTIVE", "SUSPENDED", "MOVING"
resp.space.status_reason #=> String
resp.space.encryption_configuration.encryption_strategy #=> String, one of "AWS_OWNED", "CUSTOMER_MANAGED"
resp.space.encryption_configuration.kms_key_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

Returns:

See Also:



5892
5893
5894
5895
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 5892

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

#get_space_credentials_for_organization(params = {}) ⇒ Types::GetSpaceCredentialsForOrganizationOutput

Returns temporary credentials for a space in an organization member account. The credentials are valid for one hour.

The caller must be the organization's management account or a delegated administrator with access to the target space. The target account must be an active member of the same organization as the domain, and the space must already exist.

Examples:

Example: Get space credentials for an organization member account


# The following example returns temporary, space-scoped AWS credentials for an existing space in an organization member
# account, selected by spaceId. The credentials are valid for one hour, as reflected by the expiration timestamp. Payloads
# are shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_space_credentials_for_organization({
  context: {
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  }, 
  credential_type: "SPACE_OPERATION", 
})

resp.to_h outputs the following:
{
  credentials: {
    access_key_id: "ASIAIOSFODNN7EXAMPLE", 
    expiration: Time.parse("2026-09-16T15:22:31Z"), 
    secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", 
    session_token: "IQoJb3JpZ2luX2VjEXAMPLESESSIONTOKEN1234567890", 
  }, 
}

Request syntax with placeholder values


resp = client.get_space_credentials_for_organization({
  context: { # required
    space_id: "SpaceId",
    domain_id: "DomainId",
    target_account_id: "AccountId",
  },
  credential_type: "SPACE_OPERATION", # required, accepts SPACE_OPERATION, PROVISIONING
})

Response structure


resp.credentials.access_key_id #=> String
resp.credentials.secret_access_key #=> String
resp.credentials.session_token #=> String
resp.credentials.expiration #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :context (required, Types::SpaceCredentialRequestContext) —

    Context for credential resolution.

  • :credential_type (required, String) —

    Selects which member-account credential to return.

Returns:

See Also:



5961
5962
5963
5964
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 5961

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

#get_space_data_access(params = {}) ⇒ Types::GetSpaceDataAccessOutput

Returns temporary credentials for working with data in a space, limited to the actions you request.

The credentials allow only the requested actions that can be granted in the space and that your access grants allow. Requested actions that cannot be conferred are ignored rather than rejected.

Examples:

Example: Get data credentials for log queries


# The following example requests credentials that allow running log queries and reading metric data in a space. Payloads
# are shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_space_data_access({
  audit_context: {
    "source" => "logs-console", 
  }, 
  duration_seconds: 3600, 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  target_scopes: [
    {
      actions: [
        "logs:StartQuery", 
        "logs:GetQueryResults", 
      ], 
    }, 
    {
      actions: [
        "cloudwatch:GetMetricData", 
      ], 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  credentials: {
    access_key_id: "ASIAIOSFODNN7EXAMPLE", 
    expiration: Time.parse("2026-10-20T19:22:31Z"), 
    secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", 
    session_token: "EXAMPLE-SESSION-TOKEN", 
  }, 
}

Request syntax with placeholder values


resp = client.get_space_data_access({
  space_id: "SpaceId", # required
  target_scopes: [ # required
    {
      actions: ["DataAccessActionName"], # required
    },
  ],
  duration_seconds: 1,
  audit_context: {
    "DataAccessAuditContextKeyString" => "DataAccessAuditContextValueString",
  },
})

Response structure


resp.credentials.access_key_id #=> String
resp.credentials.secret_access_key #=> String
resp.credentials.session_token #=> String
resp.credentials.expiration #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space to return credentials for.

  • :target_scopes (required, Array<Types::DataAccessTarget>) —

    The actions to include in the credentials, grouped by service.

  • :duration_seconds (Integer) —

    The lifetime of the credentials, in seconds. Defaults to 3600.

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

    Caller-supplied key-value pairs that are recorded for auditing. They do not affect authorization or the permissions of the credentials.

Returns:

See Also:



6053
6054
6055
6056
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 6053

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

#get_telemetry_query_results(params = {}) ⇒ Types::GetTelemetryQueryResultsResponse

Returns the results for the specified query.

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

Examples:

Example: Get telemetry query results


# The following example retrieves a page of results for a completed query, along with execution statistics. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.get_telemetry_query_results({
  max_results: 100, 
  query_id: "3b2a1c0d-7e6f-4a5b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  rows: [
    {
      "error_count" => "42", 
      "service.name" => "checkout-service", 
    }, 
    {
      "error_count" => "7", 
      "service.name" => "payments-service", 
    }, 
  ], 
  statistics: {
    bytes_scanned: 1048576.0, 
    partial_results: {
      partial_results_detected: false, 
    }, 
    percent_complete: 100, 
    records_matched: 49, 
    records_scanned: 20000, 
  }, 
  status: "Complete", 
}

Request syntax with placeholder values


resp = client.get_telemetry_query_results({
  query_id: "GetTelemetryQueryResultsRequestQueryIdString", # required
  next_token: "String",
  max_results: 1,
})

Response structure


resp.status #=> String, one of "Running", "Failed", "Complete", "Cancelled"
resp.rows #=> Array
resp.rows[0] #=> Hash
resp.rows[0]["String"] #=> String
resp.next_token #=> String
resp.statistics.bytes_scanned #=> Float
resp.statistics.percent_complete #=> Integer
resp.statistics.records_scanned #=> Integer
resp.statistics.records_matched #=> Integer
resp.statistics.partial_results.partial_results_detected #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :query_id (required, String) —

    The unique ID of the query.

  • :next_token (String) —

    A token to retrieve the next page of results.

  • :max_results (Integer) —

    The maximum number of result rows to return per page.

Returns:

See Also:



6138
6139
6140
6141
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 6138

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

#get_view(params = {}) ⇒ Types::GetViewResponse

Returns the definition and metadata of the specified view.

Examples:

Example: Get a view


# The following example returns the definition and metadata of a view. Payloads are shown as JSON; on the wire they are
# CBOR-encoded.

resp = client.get_view({
  name: "view.service_errors", 
})

resp.to_h outputs the following:
{
  name: "view.service_errors", 
  type: "USER", 
  arn: "arn:aws:cloudwatch:us-east-1:123456789012:view/view.service_errors", 
  created_at: Time.parse("2026-09-16T14:22:31Z"), 
  definition: "SELECT resource['attributes']['service.name'] AS service, COUNT(*) AS error_count FROM \"logs.default\" WHERE severityText = 'ERROR' GROUP BY service", 
  description: "Error counts by service", 
  updated_at: Time.parse("2026-09-16T14:22:31Z"), 
}

Request syntax with placeholder values


resp = client.get_view({
  name: "ViewName", # required
})

Response structure


resp.name #=> String
resp.type #=> String, one of "USER", "MANAGED"
resp.description #=> String
resp.definition #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String) —

    The name of the view.

Returns:

See Also:



6199
6200
6201
6202
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 6199

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

#list_access_grants(params = {}) ⇒ Types::ListAccessGrantsOutput

Returns AccessGrants, with optional filtering by domain, space, principal, or permission. A grant is returned only when it matches every filter supplied. With no filters, returns the grants for the current account and Region.

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

Examples:

Example: List access grants in a space


# The following example lists the first page of access grants in a space and returns a nextToken to retrieve the next
# page. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_access_grants({
  domain_id: "d-1a2b3c4d5e", 
  max_results: 50, 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "analyst-read-access", 
      domain_id: "d-1a2b3c4d5e", 
      grant_arn: "arn:aws:cloudwatch:us-east-1:123456789012:access-grant/7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
      grant_id: "7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
      grant_type: "CUSTOMER_MANAGED", 
      permission: "CUSTOM", 
      principal: {
        principal_id: "94b6c7d8-1a2b-4c3d-9e4f-5a6b7c8d9e0f", 
        principal_type: "IDC_USER", 
      }, 
      space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    }, 
    {
      name: "oncall-read-write", 
      domain_id: "d-1a2b3c4d5e", 
      grant_arn: "arn:aws:cloudwatch:us-east-1:123456789012:access-grant/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", 
      grant_id: "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", 
      grant_type: "CUSTOMER_MANAGED", 
      permission: "READ_WRITE_DELETE", 
      principal: {
        principal_id: "2f5a8c1b-6d3e-4f7a-8b9c-0d1e2f3a4b5c", 
        principal_type: "IDC_GROUP", 
      }, 
      space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjIwfQ==", 
}

Request syntax with placeholder values


resp = client.list_access_grants({
  domain_id: "DomainId",
  space_id: "SpaceId",
  principal_id: "PrincipalId",
  principal_type: "IDC_USER", # accepts IDC_USER, IDC_GROUP, IAM_USER, IAM_ROLE, IAM_ROOT, ACCESS_PROFILE, ALERT, AGENT, SLO
  permission: "SPACE_ADMIN", # accepts SPACE_ADMIN, READ, READ_WRITE_DELETE, CUSTOM
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].grant_id #=> String
resp.items[0].grant_arn #=> String
resp.items[0].name #=> String
resp.items[0].domain_id #=> String
resp.items[0].principal.principal_type #=> String, one of "IDC_USER", "IDC_GROUP", "IAM_USER", "IAM_ROLE", "IAM_ROOT", "ACCESS_PROFILE", "ALERT", "AGENT", "SLO"
resp.items[0].principal.principal_id #=> String
resp.items[0].principal.principal_attributes #=> Array
resp.items[0].principal.principal_attributes[0].key #=> String
resp.items[0].principal.principal_attributes[0].value #=> String
resp.items[0].permission #=> String, one of "SPACE_ADMIN", "READ", "READ_WRITE_DELETE", "CUSTOM"
resp.items[0].grant_type #=> String, one of "SERVICE_MANAGED", "CUSTOMER_MANAGED"
resp.items[0].space_id #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (String) —

    Filter by domain ID.

  • :space_id (String) —

    Filter by space ID.

  • :principal_id (String) —

    Filter by principal ID.

  • :principal_type (String) —

    Filter by principal type.

  • :permission (String) —

    Filter by permission level.

  • :next_token (String) —

    A token to retrieve the next page of results. Supply the same filters used on the request that returned it. Tokens expire after 24 hours.

  • :max_results (Integer) —

    The maximum number of access grants to return per page. Defaults to 100. A page can contain fewer results than this value even when more results remain; continue while nextToken is present.

Returns:

See Also:



6318
6319
6320
6321
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 6318

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

#list_access_profiles(params = {}) ⇒ Types::ListAccessProfilesOutput

Returns the access profiles in a space.

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

Examples:

Example: List access profiles in a space


# The following example lists the first page of access profiles in a space and returns a nextToken to retrieve the next
# page. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_access_profiles({
  max_results: 50, 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "Analyst read-only profile", 
      arn: "arn:aws:cloudwatch:us-east-1:123456789012:access-profile/analyst-readonly", 
      description: "Read-only access for analysts.", 
      profile_id: "analyst-readonly", 
      profile_type: "CUSTOMER_MANAGED", 
    }, 
    {
      name: "On-call admin profile", 
      arn: "arn:aws:cloudwatch:us-east-1:123456789012:access-profile/oncall-admin", 
      description: "Full access for on-call responders.", 
      profile_id: "oncall-admin", 
      profile_type: "CUSTOMER_MANAGED", 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjIwfQ==", 
}

Request syntax with placeholder values


resp = client.list_access_profiles({
  space_id: "SpaceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].profile_id #=> String
resp.items[0].arn #=> String
resp.items[0].name #=> String
resp.items[0].description #=> String
resp.items[0].profile_type #=> String, one of "SERVICE_MANAGED", "CUSTOMER_MANAGED"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :next_token (String) —

    A token to retrieve the next page of results.

  • :max_results (Integer) —

    The maximum number of access profiles to return per page. Defaults to 100.

Returns:

See Also:



6396
6397
6398
6399
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 6396

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

#list_alerts(params = {}) ⇒ Types::ListAlertsOutput

Lists alerts within a space, optionally filtered by exact name(s), a single name prefix, or exact alertId(s), with pagination.

Use GetAlert to retrieve a single alert's full detail.

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

Examples:

Example: List alerts in a space


# The following example lists the first page of alerts in a space, sorted by state, and returns a nextToken to retrieve
# the next page. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_alerts({
  filter_criteria: {
    name_prefix: "service-", 
    state_value: [
      "WARNING", 
      "CRITICAL", 
    ], 
  }, 
  max_results: 50, 
  sort_by: "STATE", 
  sort_order: "DESC", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "service-error-count-elevated", 
      alert_arn: "arn:aws:cloudwatch:us-east-1:123456789012:alert/c3d4e5f67a8b4c9d8e0f1a2b3c4d5e6f", 
      alert_id: "c3d4e5f67a8b4c9d8e0f1a2b3c4d5e6f", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      notification_status: "ENABLED", 
      profile_id: "analyst-readonly", 
      space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      state: {
        value: "CRITICAL", 
        contributor_summary: {
          critical_count: 1, 
          warning_count: 3, 
        }, 
        transitioned_at: Time.parse("2026-09-17T09:11:52Z"), 
      }, 
      updated_at: Time.parse("2026-09-17T09:11:52Z"), 
    }, 
    {
      name: "service-checkout-5xx-responses", 
      alert_arn: "arn:aws:cloudwatch:us-east-1:123456789012:alert/d4e5f6a78b9c4d0e9f1a2b3c4d5e6f70", 
      alert_id: "d4e5f6a78b9c4d0e9f1a2b3c4d5e6f70", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      notification_status: "DISABLED", 
      profile_id: "analyst-readonly", 
      space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      state: {
        value: "WARNING", 
        data: {
          threshold_breached: 14.0, 
        }, 
        transitioned_at: Time.parse("2026-09-17T09:11:52Z"), 
      }, 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjIwfQ==", 
}

Request syntax with placeholder values


resp = client.list_alerts({
  space_id: "SpaceId", # required
  filter_criteria: {
    names: ["AlertNameFilterListMemberString"],
    name_prefix: "AlertFilterCriteriaNamePrefixString",
    ids: ["AlertId"],
    state_value: ["OK"], # accepts OK, WARNING, CRITICAL, NODATA
    notifications_enabled: false,
    slo_ids: ["SloId"],
  },
  sort_by: "NAME", # accepts NAME, STATE
  sort_order: "ASC", # accepts ASC, DESC
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].name #=> String
resp.items[0].alert_id #=> String
resp.items[0].space_id #=> String
resp.items[0].slo_id #=> String
resp.items[0].profile_id #=> String
resp.items[0].notification_status #=> String, one of "ENABLED", "DISABLED"
resp.items[0].state.value #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.items[0].state.transitioned_at #=> Time
resp.items[0].state.contributor_summary.warning_count #=> Integer
resp.items[0].state.contributor_summary.critical_count #=> Integer
resp.items[0].state.data.threshold_breached #=> Float
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.items[0].alert_arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :filter_criteria (Types::AlertFilterCriteria) —

    Filter criteria narrowing which alerts are returned. All members are optional; the three name/id filters are mutually exclusive.

  • :sort_by (String) —

    The field to sort results by.

  • :sort_order (String) —

    The order in which to sort results.

  • :next_token (String) —

    A token to retrieve the next page of results.

  • :max_results (Integer) —

    The maximum number of alerts to return per page.

Returns:

See Also:



6535
6536
6537
6538
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 6535

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

#list_anomalies(params = {}) ⇒ Types::ListAnomaliesOutput

This operation is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.

Retrieves the anomalies matching the given filters.

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

Examples:

Example: List high-severity log anomalies for a service


# The following example lists the high-severity anomalies detected in the logs of one service over a one-hour window.
# Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_anomalies({
  max_results: 25, 
  services: [
    "checkout-service", 
  ], 
  severity: "high", 
  signal_types: [
    "logs", 
  ], 
  time_range: {
    end: Time.parse("2026-09-16T01:00:00Z"), 
    start: Time.parse("2026-09-16T00:00:00Z"), 
  }, 
})

resp.to_h outputs the following:
{
  items: [
    {
      anomaly_id: "3f6c1a4b8e0d2f5a7c9e1b3d5f7a9c0e2b4d6f8a0c2e4a6b8d0f2a4c6e8b0d2f", 
      cloud_provider: "aws", 
      description: "The rate of payment authorization errors in the checkout-service logs rose well above its usual level.", 
      evidence_samples: [
        {
          ended_at: Time.parse("2026-09-16T00:10:00Z"), 
          measurement: {
            current_value: 142, 
            expected_value: 4, 
            period_minutes: 5, 
            quantity: "logEventCount", 
            statistic: "Sum", 
            unit: "Count", 
          }, 
          started_at: Time.parse("2026-09-16T00:05:00Z"), 
          telemetry_samples: [
            {
              message: "Payment authorization failed: upstream timeout", 
            }, 
          ], 
        }, 
      ], 
      first_seen_at: Time.parse("2026-09-16T00:05:00Z"), 
      last_seen_at: Time.parse("2026-09-16T00:41:00Z"), 
      occurrence_count: 14, 
      service: "checkout-service", 
      severity: "high", 
      signal_type: "logs", 
      source_account_id: "123456789012", 
      source_region: "us-east-1", 
      title: "Payment authorization errors increased", 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjI1fQ==", 
}

Example: Retrieve anomalies by ID


# The following example retrieves two anomalies by their IDs, for example the anomalies an observation correlates. An ID
# that does not exist or that the caller cannot read is left out of the response. Payloads are shown as JSON; on the wire
# they are CBOR-encoded.

resp = client.list_anomalies({
  anomaly_ids: [
    "3f6c1a4b8e0d2f5a7c9e1b3d5f7a9c0e2b4d6f8a0c2e4a6b8d0f2a4c6e8b0d2f", 
    "7b2e4d6f8a0c1e3a5c7e9b1d3f5a7c9e0b2d4f6a8c0e2a4c6e8b0d2f4a6c8e0b", 
  ], 
})

resp.to_h outputs the following:
{
  items: [
    {
      anomaly_id: "3f6c1a4b8e0d2f5a7c9e1b3d5f7a9c0e2b4d6f8a0c2e4a6b8d0f2a4c6e8b0d2f", 
      first_seen_at: Time.parse("2026-09-16T00:05:00Z"), 
      last_seen_at: Time.parse("2026-09-16T00:41:00Z"), 
      service: "checkout-service", 
      severity: "high", 
      signal_type: "logs", 
    }, 
    {
      anomaly_id: "7b2e4d6f8a0c1e3a5c7e9b1d3f5a7c9e0b2d4f6a8c0e2a4c6e8b0d2f4a6c8e0b", 
      first_seen_at: Time.parse("2026-09-16T00:03:00Z"), 
      last_seen_at: Time.parse("2026-09-16T00:39:00Z"), 
      service: "payments-service", 
      severity: "medium", 
      signal_type: "metrics", 
    }, 
  ], 
}

Example: Read what accounted for a trace anomaly


# The following example lists trace anomalies for a service. Each occurrence states what it measured and what accounted
# for the anomalous excess. The error rate carries no statistic because nothing aggregated it in CloudWatch's sense — it
# is a ratio the detector derived from counts. The shares have different bases and must not be summed across dimensions: a
# tool share is a share of the anomalous excess, while an error-class share is a share of the total failures. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_anomalies({
  max_results: 25, 
  services: [
    "payments-service", 
  ], 
  signal_types: [
    "traces", 
  ], 
  time_range: {
    end: Time.parse("2026-09-16T01:00:00Z"), 
    start: Time.parse("2026-09-16T00:00:00Z"), 
  }, 
})

resp.to_h outputs the following:
{
  items: [
    {
      anomaly_id: "9d4f2b6a8c0e1f3a5b7d9f1c3e5a7b9d0f2c4e6a8b0d2f4c6e8a0b2d4f6c8e0a", 
      description: "The error rate of the Authorize operation rose well above its usual level, concentrated in one tool.", 
      evidence_samples: [
        {
          detector: "sequential", 
          ended_at: Time.parse("2026-09-16T00:47:00Z"), 
          measurement: {
            current_value: 0.42, 
            expected_value: 0.01, 
            period_minutes: 5, 
            quantity: "errorRate", 
            sample_count: 200, 
            threshold: 0.25, 
            unit: "Ratio", 
          }, 
          omitted_contributors: 2, 
          sampled_fraction: 0.05, 
          signal_details: {
            trace: {
              alarmed_tools: [
                "chargeCard", 
                "lookupPolicy", 
              ], 
              alarmed_tools_omitted: 1, 
              error_count: 84, 
            }, 
          }, 
          source: "span_metrics_xray", 
          started_at: Time.parse("2026-09-16T00:42:00Z"), 
          top_contributors: [
            {
              name: "chargeCard", 
              dimension: "tool", 
              share: 0.68, 
            }, 
            {
              name: "PaymentTimeoutException", 
              dimension: "errorClass", 
              share: 0.42, 
            }, 
          ], 
        }, 
      ], 
      first_seen_at: Time.parse("2026-09-16T00:12:00Z"), 
      last_seen_at: Time.parse("2026-09-16T00:47:00Z"), 
      occurrence_count: 8, 
      service: "payments-service", 
      severity: "high", 
      signal_type: "traces", 
      title: "Authorize: error rate increased", 
    }, 
  ], 
}

Example: Read a metric anomaly, including one that measures no figure


# The following example lists metric anomalies. The first states the figure it compared, in the unit CloudWatch published
# the metric as; a metric occurrence carries no quantity, because the anomaly already names the metric. The second is a
# presence anomaly: it measures nothing, so it carries no measurement at all, and what it found is in signalDetails
# instead. Both still state the window their findings cover. Payloads are shown as JSON; on the wire they are
# CBOR-encoded.

resp = client.list_anomalies({
  max_results: 25, 
  signal_types: [
    "metrics", 
  ], 
  time_range: {
    end: Time.parse("2026-09-16T01:00:00Z"), 
    start: Time.parse("2026-09-16T00:00:00Z"), 
  }, 
})

resp.to_h outputs the following:
{
  items: [
    {
      anomaly_id: "2c8e0a4f6b8d1e3a5c7f9b1d3e5a7c9f0b2d4e6a8c0f2b4d6e8a0c2f4b6d8e0a", 
      evidence_samples: [
        {
          detector: "mas_conformal_ks", 
          ended_at: Time.parse("2026-09-16T00:31:00Z"), 
          measurement: {
            baseline_is_new: true, 
            current_value: 1.44, 
            expected_lower: 1.45, 
            expected_upper: 1.46, 
            period_minutes: 5, 
            statistic: "Average", 
            transform: "stddev_30m", 
            unit: "Percent", 
          }, 
          started_at: Time.parse("2026-09-16T00:26:00Z"), 
        }, 
      ], 
      first_seen_at: Time.parse("2026-09-16T00:09:00Z"), 
      last_seen_at: Time.parse("2026-09-16T00:31:00Z"), 
      occurrence_count: 5, 
      service: "checkout-service", 
      severity: "medium", 
      signal_type: "metrics", 
      title: "AllocatorFragmentationRatio moved outside its expected range", 
    }, 
    {
      anomaly_id: "4a6c8e0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a4c6e8b0d2f4a6c", 
      evidence_samples: [
        {
          detector: "presence", 
          ended_at: Time.parse("2026-09-16T00:24:00Z"), 
          signal_details: {
            metric: {
              signal_loss: {
                last_reported_at: Time.parse("2026-09-16T00:17:00Z"), 
                last_value: 5021, 
                missing_minutes: 7, 
              }, 
            }, 
          }, 
          started_at: Time.parse("2026-09-16T00:23:00Z"), 
        }, 
      ], 
      first_seen_at: Time.parse("2026-09-16T00:24:00Z"), 
      last_seen_at: Time.parse("2026-09-16T00:24:00Z"), 
      occurrence_count: 1, 
      service: "payments-service", 
      severity: "high", 
      signal_type: "metrics", 
      title: "SystemErrors stopped reporting", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_anomalies({
  time_range: {
    start: Time.now,
    end: Time.now,
  },
  services: ["ServiceName"],
  signal_types: ["logs"], # accepts logs, metrics, traces
  max_results: 1,
  next_token: "PaginationToken",
  severity: "info", # accepts info, low, medium, high, critical
  source_account_id: ["String"],
  anomaly_ids: ["AnomalyId"],
})

Response structure


resp.items #=> Array
resp.items[0].anomaly_id #=> String
resp.items[0].service #=> String
resp.items[0].signal_type #=> String, one of "logs", "metrics", "traces"
resp.items[0].anomaly_type #=> String
resp.items[0].severity #=> String, one of "info", "low", "medium", "high", "critical"
resp.items[0].description #=> String
resp.items[0].last_seen_at #=> Time
resp.items[0].first_seen_at #=> Time
resp.items[0].details #=> Hash
resp.items[0].details["String"] #=> String
resp.items[0].title #=> String
resp.items[0].occurrence_count #=> Integer
resp.items[0]. #=> String
resp.items[0].source_region #=> String
resp.items[0].node_id #=> String
resp.items[0].node_type #=> String, one of "SERVICE", "RESOURCE", "REMOTE_SERVICE"
resp.items[0].cloud_provider #=> String
resp.items[0].evidence_samples #=> Array
resp.items[0].evidence_samples[0].started_at #=> Time
resp.items[0].evidence_samples[0].ended_at #=> Time
resp.items[0].evidence_samples[0].measurement.quantity #=> String
resp.items[0].evidence_samples[0].measurement.statistic #=> String
resp.items[0].evidence_samples[0].measurement.unit #=> String
resp.items[0].evidence_samples[0].measurement.transform #=> String
resp.items[0].evidence_samples[0].measurement.current_value #=> Float
resp.items[0].evidence_samples[0].measurement.expected_value #=> Float
resp.items[0].evidence_samples[0].measurement.expected_lower #=> Float
resp.items[0].evidence_samples[0].measurement.expected_upper #=> Float
resp.items[0].evidence_samples[0].measurement.threshold #=> Float
resp.items[0].evidence_samples[0].measurement.sample_count #=> Integer
resp.items[0].evidence_samples[0].measurement.period_minutes #=> Integer
resp.items[0].evidence_samples[0].measurement.baseline_is_new #=> Boolean
resp.items[0].evidence_samples[0].detector #=> String
resp.items[0].evidence_samples[0].source #=> String
resp.items[0].evidence_samples[0].sampled_fraction #=> Float
resp.items[0].evidence_samples[0].top_contributors #=> Array
resp.items[0].evidence_samples[0].top_contributors[0].dimension #=> String
resp.items[0].evidence_samples[0].top_contributors[0].name #=> String
resp.items[0].evidence_samples[0].top_contributors[0].share #=> Float
resp.items[0].evidence_samples[0].omitted_contributors #=> Integer
resp.items[0].evidence_samples[0].telemetry_samples #=> Array
resp.items[0].evidence_samples[0].telemetry_samples[0].recorded_at #=> Time
resp.items[0].evidence_samples[0].telemetry_samples[0].message #=> String
resp.items[0].evidence_samples[0].signal_details.log.status_class #=> String
resp.items[0].evidence_samples[0].signal_details.log.status_code_field #=> String
resp.items[0].evidence_samples[0].signal_details.metric.signal_loss.last_reported_at #=> Time
resp.items[0].evidence_samples[0].signal_details.metric.signal_loss.missing_minutes #=> Integer
resp.items[0].evidence_samples[0].signal_details.metric.signal_loss.last_value #=> Float
resp.items[0].evidence_samples[0].signal_details.metric.signal_onset.first_value #=> Float
resp.items[0].evidence_samples[0].signal_details.metric.signal_onset.absent_minutes #=> Integer
resp.items[0].evidence_samples[0].signal_details.metric.count_drop.zero_count #=> Integer
resp.items[0].evidence_samples[0].signal_details.metric.count_drop.tail_probability #=> Float
resp.items[0].evidence_samples[0].signal_details.trace.error_count #=> Integer
resp.items[0].evidence_samples[0].signal_details.trace.alarmed_tools #=> Array
resp.items[0].evidence_samples[0].signal_details.trace.alarmed_tools[0] #=> String
resp.items[0].evidence_samples[0].signal_details.trace.alarmed_tools_omitted #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :time_range (Types::IntelligenceTimeRange) —

    Time window to scope the anomaly search.

  • :services (Array<String>) —

    Filter by service names.

  • :signal_types (Array<String>) —

    Filter by signal types (e.g. logs, metrics, traces).

  • :max_results (Integer) —

    Maximum number of anomalies to return per page.

  • :next_token (String) —

    Pagination token from a previous response.

  • :severity (String) —

    Filter by severity level. Anomaly severities are lowercase, so send "high", not "HIGH". One level only; there is no severity list and no minimum-severity filter.

  • :source_account_id (Array<String>) —

    Filter by the accounts that produced the signal.

  • :anomaly_ids (Array<String>) —

    Optional batch-get filter. When set, anomalies are fetched by ID under the caller's account. Pagination still applies: maxResults bounds the returned anomalies per page; nextToken cursors through the input ID list. An ID that does not exist, or that the caller is not permitted to read, is omitted from items; compare the IDs you requested against the IDs returned across all pages to find them.

    anomalyIds is mutually exclusive with the other filters (timeRange, services, signalTypes, severity, sourceAccountId) — passing any of them alongside anomalyIds returns a ValidationException. Use a follow-up ListAnomalies call without anomalyIds for filtered queries.

Returns:

See Also:



6923
6924
6925
6926
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 6923

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

#list_domain_access_grants_for_organization(params = {}) ⇒ Types::ListDomainAccessGrantsForOrganizationOutput

Returns organization-level domain access grants, with optional filtering by domain, principal, or permission. A grant is returned only when it matches every filter supplied. With no filters, returns the grants for the caller's organization.

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

Examples:

Example: List organization domain access grants


# The following example lists the first page of organization domain access grants and returns a nextToken to retrieve the
# next page. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_domain_access_grants_for_organization({
  domain_id: "d-1a2b3c4d5e", 
  max_results: 50, 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "org-domain-admin", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      domain_id: "d-1a2b3c4d5e", 
      grant_arn: "arn:aws:cloudwatch:us-east-1:123456789012:organization-access-grant/7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
      grant_id: "7f3e9d21-4c8b-4f6a-b1d2-3e4f5a6b7c8d", 
      grant_type: "CUSTOMER_MANAGED", 
      permission: "ADMIN", 
      principal: {
        principal_id: "94b6c7d8-1a2b-4c3d-9e4f-5a6b7c8d9e0f", 
        principal_type: "IDC_USER", 
      }, 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
    {
      name: "org-domain-admin-group", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      domain_id: "d-1a2b3c4d5e", 
      grant_arn: "arn:aws:cloudwatch:us-east-1:123456789012:organization-access-grant/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", 
      grant_id: "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", 
      grant_type: "CUSTOMER_MANAGED", 
      permission: "ADMIN", 
      principal: {
        principal_id: "2f5a8c1b-6d3e-4f7a-8b9c-0d1e2f3a4b5c", 
        principal_type: "IDC_GROUP", 
      }, 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjIwfQ==", 
}

Request syntax with placeholder values


resp = client.list_domain_access_grants_for_organization({
  domain_id: "DomainId",
  principal_id: "PrincipalId",
  principal_type: "IDC_USER", # accepts IDC_USER, IDC_GROUP, IAM_USER, IAM_ROLE, IAM_ROOT
  permission: "ADMIN", # accepts ADMIN
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].grant_id #=> String
resp.items[0].grant_arn #=> String
resp.items[0].name #=> String
resp.items[0].domain_id #=> String
resp.items[0].principal.principal_type #=> String, one of "IDC_USER", "IDC_GROUP", "IAM_USER", "IAM_ROLE", "IAM_ROOT"
resp.items[0].principal.principal_id #=> String
resp.items[0].principal.principal_attributes #=> Array
resp.items[0].principal.principal_attributes[0].key #=> String
resp.items[0].principal.principal_attributes[0].value #=> String
resp.items[0].permission #=> String, one of "ADMIN"
resp.items[0].grant_type #=> String, one of "SERVICE_MANAGED", "CUSTOMER_MANAGED"
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (String) —

    Filter by domain ID.

  • :principal_id (String) —

    Filter by principal ID.

  • :principal_type (String) —

    Filter by principal type.

  • :permission (String) —

    Filter by permission level.

  • :next_token (String) —

    A token to retrieve the next page of results. Supply the same filters used on the request that returned it. Tokens expire after 24 hours.

  • :max_results (Integer) —

    The maximum number of access grants to return per page. Defaults to 100. A page can contain fewer results than this value even when more results remain; continue while nextToken is present.

Returns:

See Also:



7040
7041
7042
7043
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 7040

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

#list_domains(params = {}) ⇒ Types::ListDomainsOutput

Returns the caller's domains: the account-scoped domain and the organization-scoped domain, if either exists. At most two domains are returned.

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

Examples:

Example: List domains


# The following example lists the caller's domains. At most two are returned — the account-scoped domain and the
# organization-scoped domain — so there is no nextToken. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_domains({
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "prod-observability", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:domain/d-1a2b3c4d5e", 
      domain_id: "d-1a2b3c4d5e", 
      identity_center_instance_arn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", 
      region: "us-east-1", 
      status: "ACTIVE", 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
    {
      name: "prod-observability-org", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:organization-domain/d-9z8y7x6w5v", 
      domain_id: "d-9z8y7x6w5v", 
      identity_center_instance_arn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", 
      region: "us-east-1", 
      status: "ACTIVE", 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_domains({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].domain_id #=> String
resp.items[0].domain_arn #=> String
resp.items[0].name #=> String
resp.items[0].identity_center_instance_arn #=> String
resp.items[0].region #=> String
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.items[0].status #=> String, one of "ACTIVE"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String) —

    A token to retrieve the next page of results. Tokens expire after 24 hours.

  • :max_results (Integer) —

    The maximum number of domains to return per page. Defaults to 100.

Returns:

See Also:



7122
7123
7124
7125
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 7122

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

#list_experiment_runs(params = {}) ⇒ Types::ListExperimentRunsOutput

Lists the runs of an experiment.

Returns a summary for each run, newest first. Use GetExperimentRun to retrieve a single run's full details.

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

Examples:

Example: List an experiment's runs


# The following example lists the runs of an experiment: a run reported from the caller's code and a hosted run, newest
# first. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_experiment_runs({
  experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
  max_results: 10, 
})

resp.to_h outputs the following:
{
  items: [
    {
      cases_total: 50, 
      completed_at: Time.parse("2026-11-10T15:18:37Z"), 
      created_at: Time.parse("2026-11-10T15:02:10Z"), 
      dataset_name: "support-faq.jsonl", 
      dataset_source: "FILE", 
      pass_rate: 0.94, 
      passed: 47, 
      producer_kind: "CUSTOM", 
      role: "TARGET", 
      rule_content_hash: "sha256:9a8b7c6d5e4f30211203f4e5d6c7b8a99a8b7c6d5e4f30211203f4e5d6c7b8a9", 
      rule_name: "release-gate", 
      run_id: "ci-build-4821", 
      source: "REPORTED", 
      status: "COMPLETED", 
      target_version: "7", 
      verdict: "PASSED", 
      verdict_reason: "pass rate 94% (required 90%)", 
      verdict_reason_code: "PASSED", 
    }, 
    {
      metadata: {
        "modelId" => "anthropic.claude-sonnet", 
        "promptVersion" => "v3", 
      }, 
      cases_total: 120, 
      completed_at: Time.parse("2026-11-10T14:41:05Z"), 
      created_at: Time.parse("2026-11-10T14:22:31Z"), 
      dataset_id: "support-faq-dataset", 
      dataset_source: "AGENTCORE", 
      dataset_version: "3", 
      description: "Release candidate with the v3 support prompt", 
      pass_rate: 0.95, 
      passed: 114, 
      role: "TARGET", 
      rule_content_hash: "sha256:9a8b7c6d5e4f30211203f4e5d6c7b8a99a8b7c6d5e4f30211203f4e5d6c7b8a9", 
      rule_name: "release-gate", 
      run_id: "run-01JD8M2A4C6E8G0J2K4M6P8R0T", 
      source: "HOSTED", 
      status: "COMPLETED", 
      target_version: "7", 
      verdict: "PASSED", 
      verdict_reason: "pass rate 95% (required 90%)", 
      verdict_reason_code: "PASSED", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_experiment_runs({
  experiment_id: "ExperimentId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.items #=> Array
resp.items[0].run_id #=> String
resp.items[0].source #=> String, one of "REPORTED", "HOSTED"
resp.items[0].status #=> String, one of "RUNNING", "STOPPING", "COMPLETED", "DID_NOT_FINISH"
resp.items[0].status_reason #=> String, one of "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "RESULTS_WRITE_FAILED"
resp.items[0].producer_kind #=> String, one of "SDK", "CUSTOM"
resp.items[0].target_version #=> String
resp.items[0].dataset_source #=> String, one of "AGENTCORE", "FILE", "OTHER"
resp.items[0].dataset_id #=> String
resp.items[0].dataset_name #=> String
resp.items[0].dataset_version #=> String
resp.items[0].rule_name #=> String
resp.items[0].rule_content_hash #=> String
resp.items[0]. #=> Hash
resp.items[0].["RunMetadataMapKeyString"] #=> String
resp.items[0].description #=> String
resp.items[0].trace_stats.status #=> String, one of "PENDING", "AVAILABLE", "UNAVAILABLE"
resp.items[0].trace_stats.status_reason #=> String, one of "NO_TRACES", "SPANS_NOT_FOUND", "ACCESS_DENIED", "SCAN_LIMIT", "QUERY_FAILED", "INTERNAL_ERROR"
resp.items[0].trace_stats.cases_read #=> Integer
resp.items[0].trace_stats.sampled #=> Boolean
resp.items[0].trace_stats.cases_with_spans #=> Integer
resp.items[0].trace_stats.attributes #=> Array
resp.items[0].trace_stats.attributes[0].name #=> String, one of "MODEL", "TOOL_NAME", "SYSTEM_INSTRUCTIONS"
resp.items[0].trace_stats.attributes[0].version #=> Integer
resp.items[0].trace_stats.attributes[0].distinct #=> Integer
resp.items[0].trace_stats.attributes[0].values_hash #=> String
resp.items[0].trace_stats.attributes[0].values #=> Array
resp.items[0].trace_stats.attributes[0].values[0].value #=> String
resp.items[0].trace_stats.attributes[0].values[0].cases #=> Integer
resp.items[0].trace_stats.metrics #=> Array
resp.items[0].trace_stats.metrics[0].name #=> String, one of "MODEL_CALLS", "TOOL_CALLS", "INPUT_TOKENS", "OUTPUT_TOKENS", "TURN_LATENCY_MS", "FAILED"
resp.items[0].trace_stats.metrics[0].version #=> Integer
resp.items[0].trace_stats.metrics[0].count #=> Integer
resp.items[0].trace_stats.metrics[0].mean #=> Float
resp.items[0].trace_stats.metrics[0].p50 #=> Float
resp.items[0].trace_stats.metrics[0].p90 #=> Float
resp.items[0].trace_stats.computed_at #=> Time
resp.items[0].verdict #=> String, one of "PASSED", "FAILED", "DID_NOT_FINISH"
resp.items[0].verdict_reason_code #=> String, one of "PASSED", "NOT_SCORED_RATE_ABOVE_MAX", "PASS_RATE_BELOW_MIN", "AVERAGE_BELOW_MIN", "AVERAGE_ABOVE_MAX", "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "BELOW_CONTROL", "REGRESSED_CASES_ABOVE_MAX", "FIXED_CASES_BELOW_MIN", "UNPAIRED_CASE_RATE_ABOVE_MAX", "SCORE_REGRESSED", "CONTROL_DID_NOT_FINISH", "RESULTS_WRITE_FAILED"
resp.items[0].verdict_reason #=> String
resp.items[0].pass_rate #=> Float
resp.items[0].control_pass_rate #=> Float
resp.items[0].role #=> String, one of "TARGET", "CONTROL"
resp.items[0].control_run_id #=> String
resp.items[0].cases_total #=> Integer
resp.items[0].passed #=> Integer
resp.items[0].created_at #=> Time
resp.items[0].completed_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :experiment_id (required, String) —

    The ID of the experiment to list runs for.

  • :max_results (Integer) —

    The maximum number of runs to return in one page, from 1 to 100. Defaults to 50.

  • :next_token (String) —

    A token to retrieve the next page of results.

Returns:

See Also:



7275
7276
7277
7278
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 7275

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

#list_experiments(params = {}) ⇒ Types::ListExperimentsOutput

Lists the experiments in the caller's account.

Returns a summary for each experiment, newest first. Results can be filtered by experiment type, target service name, and creation time. An experiment is returned only when it matches every specified filter. Use GetExperiment to retrieve a single experiment's full detail. To find experiments by tag, use the Resource Groups Tagging API.

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

Examples:

Example: List DATASET experiments


# The following example lists the DATASET experiments. One experiment matches, and there are no more pages. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_experiments({
  experiment_type: "DATASET", 
  max_results: 10, 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "Travel agent regression suite", 
      baseline_run_id: "ci-build-4790", 
      created_at: Time.parse("2026-11-10T14:22:31Z"), 
      experiment_arn: "arn:aws:cloudwatch:us-east-1:123456789012:experiment/exp-01JC8Z5V7Q3M9K2T4R6W8Y0ABC", 
      experiment_config: {
        dataset: {
          execution_role_arn: "arn:aws:iam::123456789012:role/ExperimentExecutionRole", 
          results_log_group: "/experiments/travel-agent/results", 
        }, 
      }, 
      experiment_id: "exp-01JC8Z5V7Q3M9K2T4R6W8Y0ABC", 
      experiment_type: "DATASET", 
      run_count: 3, 
      target: {
        name: "Travel agent", 
        definition: {
          agent_core_runtime: {
            runtime_arn: "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/travel_agent-a1B2c3D4e5", 
          }, 
        }, 
        environment: "staging", 
        service_name: "travel-agent", 
      }, 
      target_run_count: 3, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_experiments({
  max_results: 1,
  next_token: "NextToken",
  experiment_type: "DATASET", # accepts DATASET
  target_service_name: "ListExperimentsInputTargetServiceNameString",
  created_after: Time.now,
  created_before: Time.now,
})

Response structure


resp.items #=> Array
resp.items[0].experiment_id #=> String
resp.items[0].experiment_arn #=> String
resp.items[0].name #=> String
resp.items[0].target.name #=> String
resp.items[0].target.service_name #=> String
resp.items[0].target.environment #=> String
resp.items[0].target.definition.agent_core_runtime.runtime_arn #=> String
resp.items[0].target.definition.https_endpoint.base_url #=> String
resp.items[0].experiment_type #=> String, one of "DATASET"
resp.items[0].experiment_config.dataset.execution_role_arn #=> String
resp.items[0].experiment_config.dataset.results_log_group #=> String
resp.items[0].experiment_config.dataset.trace_log_groups #=> Array
resp.items[0].experiment_config.dataset.trace_log_groups[0] #=> String
resp.items[0].experiment_config.dataset.collect_trace_stats #=> Boolean
resp.items[0].run_count #=> Integer
resp.items[0].target_run_count #=> Integer
resp.items[0].latest_run.run_id #=> String
resp.items[0].latest_run.source #=> String, one of "REPORTED", "HOSTED"
resp.items[0].latest_run.status #=> String, one of "RUNNING", "STOPPING", "COMPLETED", "DID_NOT_FINISH"
resp.items[0].latest_run.status_reason #=> String, one of "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "RESULTS_WRITE_FAILED"
resp.items[0].latest_run.producer_kind #=> String, one of "SDK", "CUSTOM"
resp.items[0].latest_run.target_version #=> String
resp.items[0].latest_run.dataset_source #=> String, one of "AGENTCORE", "FILE", "OTHER"
resp.items[0].latest_run.dataset_id #=> String
resp.items[0].latest_run.dataset_name #=> String
resp.items[0].latest_run.dataset_version #=> String
resp.items[0].latest_run.rule_name #=> String
resp.items[0].latest_run.rule_content_hash #=> String
resp.items[0].latest_run. #=> Hash
resp.items[0].latest_run.["RunMetadataMapKeyString"] #=> String
resp.items[0].latest_run.description #=> String
resp.items[0].latest_run.trace_stats.status #=> String, one of "PENDING", "AVAILABLE", "UNAVAILABLE"
resp.items[0].latest_run.trace_stats.status_reason #=> String, one of "NO_TRACES", "SPANS_NOT_FOUND", "ACCESS_DENIED", "SCAN_LIMIT", "QUERY_FAILED", "INTERNAL_ERROR"
resp.items[0].latest_run.trace_stats.cases_read #=> Integer
resp.items[0].latest_run.trace_stats.sampled #=> Boolean
resp.items[0].latest_run.trace_stats.cases_with_spans #=> Integer
resp.items[0].latest_run.trace_stats.attributes #=> Array
resp.items[0].latest_run.trace_stats.attributes[0].name #=> String, one of "MODEL", "TOOL_NAME", "SYSTEM_INSTRUCTIONS"
resp.items[0].latest_run.trace_stats.attributes[0].version #=> Integer
resp.items[0].latest_run.trace_stats.attributes[0].distinct #=> Integer
resp.items[0].latest_run.trace_stats.attributes[0].values_hash #=> String
resp.items[0].latest_run.trace_stats.attributes[0].values #=> Array
resp.items[0].latest_run.trace_stats.attributes[0].values[0].value #=> String
resp.items[0].latest_run.trace_stats.attributes[0].values[0].cases #=> Integer
resp.items[0].latest_run.trace_stats.metrics #=> Array
resp.items[0].latest_run.trace_stats.metrics[0].name #=> String, one of "MODEL_CALLS", "TOOL_CALLS", "INPUT_TOKENS", "OUTPUT_TOKENS", "TURN_LATENCY_MS", "FAILED"
resp.items[0].latest_run.trace_stats.metrics[0].version #=> Integer
resp.items[0].latest_run.trace_stats.metrics[0].count #=> Integer
resp.items[0].latest_run.trace_stats.metrics[0].mean #=> Float
resp.items[0].latest_run.trace_stats.metrics[0].p50 #=> Float
resp.items[0].latest_run.trace_stats.metrics[0].p90 #=> Float
resp.items[0].latest_run.trace_stats.computed_at #=> Time
resp.items[0].latest_run.verdict #=> String, one of "PASSED", "FAILED", "DID_NOT_FINISH"
resp.items[0].latest_run.verdict_reason_code #=> String, one of "PASSED", "NOT_SCORED_RATE_ABOVE_MAX", "PASS_RATE_BELOW_MIN", "AVERAGE_BELOW_MIN", "AVERAGE_ABOVE_MAX", "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "BELOW_CONTROL", "REGRESSED_CASES_ABOVE_MAX", "FIXED_CASES_BELOW_MIN", "UNPAIRED_CASE_RATE_ABOVE_MAX", "SCORE_REGRESSED", "CONTROL_DID_NOT_FINISH", "RESULTS_WRITE_FAILED"
resp.items[0].latest_run.verdict_reason #=> String
resp.items[0].latest_run.pass_rate #=> Float
resp.items[0].latest_run.control_pass_rate #=> Float
resp.items[0].latest_run.role #=> String, one of "TARGET", "CONTROL"
resp.items[0].latest_run.control_run_id #=> String
resp.items[0].latest_run.cases_total #=> Integer
resp.items[0].latest_run.passed #=> Integer
resp.items[0].latest_run.created_at #=> Time
resp.items[0].latest_run.completed_at #=> Time
resp.items[0].baseline_run_id #=> String
resp.items[0].created_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer) —

    The maximum number of experiments to return in one page, from 1 to 100. Defaults to 50.

  • :next_token (String) —

    A token to retrieve the next page of results.

  • :experiment_type (String) —

    Filter by experiment type.

  • :target_service_name (String) —

    Filter by target service name.

  • :created_after (Time, DateTime, Date, Integer, String) —

    Returns only experiments created after this time.

  • :created_before (Time, DateTime, Date, Integer, String) —

    Returns only experiments created before this time.

Returns:

See Also:



7442
7443
7444
7445
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 7442

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

#list_integrations(params = {}) ⇒ Types::ListIntegrationsOutput

Lists the integrations in the account, optionally filtered by type, status, or name. Results are paginated.

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

Examples:

Example: List integrations of a type


# The following example lists up to 20 AWS_INTEGRATION integrations in the account. Payloads are shown as JSON; on the
# wire they are CBOR-encoded.

resp = client.list_integrations({
  integration_type: "AWS_INTEGRATION", 
  max_results: 20, 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "my-aws-integration", 
      created_at: Time.parse("2026-09-16T00:03:00Z"), 
      integration_arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      integration_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      integration_type: "AWS_INTEGRATION", 
      status: "ACTIVE", 
      updated_at: Time.parse("2026-09-16T00:03:00Z"), 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjIwfQ==", 
}

Request syntax with placeholder values


resp = client.list_integrations({
  integration_type: "AWS_CONFIG_SLREC", # accepts AWS_CONFIG_SLREC, AWS_CONFIG_AZURE_SLREC, GITHUB, SLACK, EXTERNAL_AGENT, AWS_INTEGRATION, PAGERDUTY, GITHUB_ENTERPRISE
  status: "ACTIVE", # accepts ACTIVE, DELETED, PENDING, PENDING_OAUTH, ERROR, FAILED
  name: "String",
  next_token: "String",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].integration_id #=> String
resp.items[0].integration_arn #=> String
resp.items[0].integration_type #=> String, one of "AWS_CONFIG_SLREC", "AWS_CONFIG_AZURE_SLREC", "GITHUB", "SLACK", "EXTERNAL_AGENT", "AWS_INTEGRATION", "PAGERDUTY", "GITHUB_ENTERPRISE"
resp.items[0].name #=> String
resp.items[0].status #=> String, one of "ACTIVE", "DELETED", "PENDING", "PENDING_OAUTH", "ERROR", "FAILED"
resp.items[0].auth_type #=> String, one of "NONE", "OAUTH2", "API_KEY"
resp.items[0].credential_arn #=> String
resp.items[0].role_arn #=> String
resp.items[0].integration_attributes #=> Hash
resp.items[0].integration_attributes["StringMapKeyString"] #=> String
resp.items[0].authorization_url #=> String
resp.items[0].error_message #=> String
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.items[0].scope #=> String, one of "ACCOUNT", "ORGANIZATION"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :integration_type (String) —

    Returns only integrations of this provider type.

  • :status (String) —

    Returns only integrations in this status.

  • :name (String) —

    Returns only the integration with this exact name.

  • :next_token (String) —

    Pagination token from a previous response; omit for the first page.

  • :max_results (Integer) —

    Maximum number of integrations to return in one page.

Returns:

See Also:



7533
7534
7535
7536
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 7533

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

#list_lookups(params = {}) ⇒ Types::ListLookupsResponse

Lists the lookup tables in the caller's account and Region.

Returns a summary for each table. Content is not included.

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

Examples:

Example: List the lookup tables in an account and Region


# The following example returns a page of lookup table summaries. Content is not included. A nextToken is returned when
# more results are available. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_lookups({
  max_results: 10, 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "service_owners", 
      arn: "arn:aws:cloudwatch:us-east-1:123456789012:lookup/service_owners/3k7f2m9qx4pd8w1n6v0b5j2tz", 
      columns: [
        "service", 
        "team", 
        "oncall", 
      ], 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      description: "Owning team per service", 
      row_count: 42, 
      size_bytes: 2048, 
      updated_at: Time.parse("2026-10-20T14:22:31Z"), 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjEwfQ==", 
}

Request syntax with placeholder values


resp = client.list_lookups({
  max_results: 1,
  next_token: "String",
})

Response structure


resp.items #=> Array
resp.items[0].name #=> String
resp.items[0].arn #=> String
resp.items[0].description #=> String
resp.items[0].columns #=> Array
resp.items[0].columns[0] #=> String
resp.items[0].row_count #=> Integer
resp.items[0].size_bytes #=> Integer
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer) —

    The maximum number of lookup tables to return per page.

  • :next_token (String) —

    A token to retrieve the next page of results.

Returns:

See Also:



7611
7612
7613
7614
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 7611

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

#list_observations(params = {}) ⇒ Types::ListObservationsOutput

This operation is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.

Lists observations matching the given filters.

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

Examples:

Example: List the most severe open observations


# The following example lists observations, filtered to the HIGH severity in the ACTIVE status, most recently updated
# first. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_observations({
  filters: {
    severity: [
      "HIGH", 
    ], 
    status: [
      "ACTIVE", 
    ], 
  }, 
  max_results: 50, 
})

resp.to_h outputs the following:
{
  items: [
    {
      account_id: "123456789012", 
      affected_nodes: [
        {
          name: "checkout-service", 
          account_id: "123456789012", 
          cloud_provider: "aws", 
          node_type: "SERVICE", 
          region: "us-east-1", 
        }, 
        {
          name: "payments-service", 
          account_id: "123456789012", 
          cloud_provider: "aws", 
          node_type: "SERVICE", 
          region: "us-east-1", 
        }, 
      ], 
      anomalies: [
        "3f6c1a4b8e0d2f5a7c9e1b3d5f7a9c0e2b4d6f8a0c2e4a6b8d0f2a4c6e8b0d2f", 
        "7b2e4d6f8a0c1e3a5c7e9b1d3f5a7c9e0b2d4f6a8c0e2a4c6e8b0d2f4a6c8e0b", 
      ], 
      created_at: Time.parse("2026-09-16T00:05:00Z"), 
      observation_id: "6f2c1a4b8e0d3f5a7c91", 
      reasoning: "1. Checkout p99 latency increased sharply. 2. The rise aligns with slower responses from the payments dependency. 3. Both signals localize to the same Region.", 
      severity: "HIGH", 
      status: "ACTIVE", 
      summary: "Checkout latency rose after its payments dependency began responding slowly. The slowdown is concentrated in one Region.", 
      title: "Elevated checkout latency from a payments dependency", 
      updated_at: Time.parse("2026-09-16T00:42:00Z"), 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjUwfQ==", 
}

Request syntax with placeholder values


resp = client.list_observations({
  filters: {
    status: ["ACTIVE"], # accepts ACTIVE, INACTIVE
    severity: ["LOW"], # accepts LOW, MEDIUM, HIGH
    services: ["ServiceName"],
    time_range: {
      start: Time.now,
      end: Time.now,
    },
  },
  max_results: 1,
  next_token: "PaginationToken",
  observation_ids: ["ObservationId"],
})

Response structure


resp.items #=> Array
resp.items[0].observation_id #=> String
resp.items[0]. #=> String
resp.items[0].title #=> String
resp.items[0].summary #=> String
resp.items[0].severity #=> String, one of "LOW", "MEDIUM", "HIGH"
resp.items[0].status #=> String, one of "ACTIVE", "INACTIVE"
resp.items[0].reasoning #=> String
resp.items[0].anomalies #=> Array
resp.items[0].anomalies[0] #=> String
resp.items[0].affected_nodes #=> Array
resp.items[0].affected_nodes[0].name #=> String
resp.items[0].affected_nodes[0].node_type #=> String, one of "SERVICE", "RESOURCE", "REMOTE_SERVICE"
resp.items[0].affected_nodes[0]. #=> String
resp.items[0].affected_nodes[0]. #=> String
resp.items[0].affected_nodes[0].region #=> String
resp.items[0].affected_nodes[0].cloud_provider #=> String
resp.items[0].affected_nodes[0].node_id #=> String
resp.items[0].related_changes #=> Array
resp.items[0].related_changes[0].change_id #=> String
resp.items[0].related_changes[0].changed_at #=> Time
resp.items[0].related_changes[0].type #=> String, one of "DEPLOY", "CONFIG_CHANGE"
resp.items[0].related_changes[0].source #=> String
resp.items[0].related_changes[0].summary #=> String
resp.items[0].related_changes[0].node.name #=> String
resp.items[0].related_changes[0].node.node_type #=> String, one of "SERVICE", "RESOURCE", "REMOTE_SERVICE"
resp.items[0].related_changes[0].node. #=> String
resp.items[0].related_changes[0].node. #=> String
resp.items[0].related_changes[0].node.region #=> String
resp.items[0].related_changes[0].node.cloud_provider #=> String
resp.items[0].related_changes[0].node.node_id #=> String
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filters (Types::ObservationFilters) —

    Criteria restricting which observations are returned.

  • :max_results (Integer) —

    The maximum number of observations to return in a single page. Valid range is 1 to 100. When omitted, the service defaults to 50.

  • :next_token (String) —

    Pagination token from a previous response, to retrieve the next page.

  • :observation_ids (Array<String>) —

    Optional batch-get filter. When set, observations are fetched by ID under the caller's account. Pagination still applies: maxResults bounds the returned observations per page; nextToken cursors through the input ID list. An ID that does not exist, or that the caller is not permitted to read, is omitted from items; compare the IDs you requested against the IDs returned across all pages to find them.

    observationIds is mutually exclusive with filters: passing filters alongside observationIds returns a ValidationException. Use a follow-up ListObservations call without observationIds for filtered queries.

Returns:

See Also:



7765
7766
7767
7768
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 7765

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

#list_omni_dashboards(params = {}) ⇒ Types::ListOmniDashboardsOutput

Returns the dashboards in a space, optionally filtered by name prefix.

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

Examples:

Example: List dashboards in a space


# The following example lists the first page of dashboards in a space and returns a nextToken to retrieve the next page.
# Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_omni_dashboards({
  max_results: 50, 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "service-health-overview", 
      arn: "arn:aws:cloudwatch:us-east-1:123456789012:omni-dashboard/c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      created_by: "arn:aws:iam::123456789012:role/ObservabilityAdmin", 
      dashboard_id: "c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
      description: "Overview of service health metrics.", 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
    {
      name: "cost-explorer-dashboard", 
      arn: "arn:aws:cloudwatch:us-east-1:123456789012:omni-dashboard/d4e5f6a7-8b9c-4d0e-9f1a-2b3c4d5e6f70", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      created_by: "arn:aws:iam::123456789012:role/ObservabilityAdmin", 
      dashboard_id: "d4e5f6a7-8b9c-4d0e-9f1a-2b3c4d5e6f70", 
      description: "Monthly cost breakdown by service.", 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjIwfQ==", 
}

Request syntax with placeholder values


resp = client.list_omni_dashboards({
  space_id: "SpaceId", # required
  name_prefix: "ListOmniDashboardsInputNamePrefixString",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].dashboard_id #=> String
resp.items[0].arn #=> String
resp.items[0].name #=> String
resp.items[0].created_by #=> String
resp.items[0].description #=> String
resp.items[0].tags #=> Hash
resp.items[0].tags["TagKey"] #=> String
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :name_prefix (String) —

    Filter to dashboards whose name starts with this prefix.

  • :next_token (String) —

    A token to retrieve the next page of results.

  • :max_results (Integer) —

    The maximum number of dashboards to return per page. Defaults to 100. A page can contain fewer results than this value even when more results remain; continue while nextToken is present.

Returns:

See Also:



7856
7857
7858
7859
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 7856

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

#list_omni_slos(params = {}) ⇒ Types::ListOmniSlosOutput

Lists the SLOs in a space, with their current state, optionally filtered and sorted, with pagination.

Each item reports the measurement taken when its state last changed.

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

Examples:

Example: List the SLOs that need attention


# The following example lists the SLOs in a space whose state is WARNING or CRITICAL, sorted by state with CRITICAL first,
# two to a page. The response holds a nextToken, so more SLOs match. Each item reports the measurement taken when its
# state last changed. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_omni_slos({
  filter_criteria: {
    state_value: [
      "WARNING", 
      "CRITICAL", 
    ], 
  }, 
  max_results: 2, 
  sort_by: "STATE", 
  sort_order: "DESC", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "checkout-api-latency-p99", 
      objective: {
        target: 99.9, 
        time_window: {
          calendar: {
            time_zone: "America/New_York", 
            unit: "WEEK", 
            week_start_day: "MONDAY", 
          }, 
        }, 
      }, 
      service_attributes: {
        deployment_environment_name: "prod", 
        service_name: "checkout-api", 
      }, 
      slo_arn: "arn:aws:cloudwatch:us-east-1:123456789012:omni-slo/7a6b5c4d3e2f41a0b9c8d7e6f5a4b3c2", 
      slo_id: "7a6b5c4d3e2f41a0b9c8d7e6f5a4b3c2", 
      space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      state: {
        value: "CRITICAL", 
        state_transition_measurement: {
          attainment: 99.89, 
          error_budget: {
            consumed: 11.0, 
            total: 10.001, 
            unit: "PERIODS", 
          }, 
          error_budget_consumed_ratio: 1.1, 
        }, 
        transitioned_at: Time.parse("2026-11-16T03:41:00Z"), 
      }, 
      updated_at: Time.parse("2026-11-02T09:20:05Z"), 
    }, 
    {
      name: "checkout-api-availability", 
      objective: {
        target: 99.9, 
        time_window: {
          rolling: {
            days: 30, 
          }, 
        }, 
        warning_budget_consumed_ratio: 0.75, 
      }, 
      service_attributes: {
        cloud_account_id: "123456789012", 
        cloud_provider: "aws", 
        cloud_region: "us-east-1", 
        deployment_environment_name: "prod", 
        service_name: "checkout-api", 
        service_namespace: "retail", 
      }, 
      slo_arn: "arn:aws:cloudwatch:us-east-1:123456789012:omni-slo/9f8e7d6c5b4a49382716051a2b3c4d5e", 
      slo_id: "9f8e7d6c5b4a49382716051a2b3c4d5e", 
      space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      state: {
        value: "WARNING", 
        state_transition_measurement: {
          attainment: 99.925, 
          error_budget: {
            consumed: 931.0, 
            total: 1240.0, 
            unit: "EVENTS", 
          }, 
          error_budget_consumed_ratio: 0.751, 
        }, 
        transitioned_at: Time.parse("2026-11-15T21:04:00Z"), 
      }, 
      updated_at: Time.parse("2026-11-02T09:15:42Z"), 
    }, 
  ], 
  next_token: "eyJwYWdlIjoyLCJzb3J0IjoiU1RBVEUifQ==", 
}

Request syntax with placeholder values


resp = client.list_omni_slos({
  space_id: "SpaceId", # required
  filter_criteria: {
    name_prefix: "SloName",
    names: ["SloName"],
    ids: ["SloId"],
    state_value: ["OK"], # accepts OK, WARNING, CRITICAL, NODATA
  },
  sort_by: "NAME", # accepts NAME, STATE
  sort_order: "ASC", # accepts ASC, DESC
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].name #=> String
resp.items[0].slo_id #=> String
resp.items[0].space_id #=> String
resp.items[0].service_attributes.service_name #=> String
resp.items[0].service_attributes.service_namespace #=> String
resp.items[0].service_attributes.cloud_provider #=> String
resp.items[0].service_attributes. #=> String
resp.items[0].service_attributes.cloud_region #=> String
resp.items[0].service_attributes.deployment_environment_name #=> String
resp.items[0].objective.target #=> Float
resp.items[0].objective.warning_budget_consumed_ratio #=> Float
resp.items[0].objective.time_window.rolling.days #=> Integer
resp.items[0].objective.time_window.calendar.unit #=> String, one of "WEEK", "MONTH"
resp.items[0].objective.time_window.calendar.week_start_day #=> String, one of "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"
resp.items[0].objective.time_window.calendar.time_zone #=> String
resp.items[0].state.value #=> String, one of "OK", "WARNING", "CRITICAL", "NODATA"
resp.items[0].state.no_data_reason #=> String
resp.items[0].state.transitioned_at #=> Time
resp.items[0].state.state_transition_measurement.attainment #=> Float
resp.items[0].state.state_transition_measurement.error_budget_consumed_ratio #=> Float
resp.items[0].state.state_transition_measurement.error_budget.unit #=> String, one of "EVENTS", "PERIODS"
resp.items[0].state.state_transition_measurement.error_budget.total #=> Float
resp.items[0].state.state_transition_measurement.error_budget.consumed #=> Float
resp.items[0].updated_at #=> Time
resp.items[0].slo_arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :filter_criteria (Types::SloFilterCriteria) —

    Filters that narrow which SLOs are returned. All members are optional; the names, namePrefix and ids filters are mutually exclusive.

  • :sort_by (String) —

    The field to sort results by. Defaults to NAME.

  • :sort_order (String) —

    The order in which to sort results.

  • :next_token (String) —

    A token to retrieve the next page of results.

  • :max_results (Integer) —

    The maximum number of SLOs to return per page. Defaults to 50.

Returns:

See Also:



8040
8041
8042
8043
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 8040

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

#list_spaces(params = {}) ⇒ Types::ListSpacesOutput

Returns the spaces in the account, optionally filtered by domain.

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

Examples:

Example: List spaces in a domain


# The following example lists the first page of spaces in a domain and returns a nextToken to retrieve the next page.
# Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.list_spaces({
  domain_id: "d-1a2b3c4d5e", 
  max_results: 50, 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "prod-observability", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:domain/d-1a2b3c4d5e", 
      owner_account_id: "123456789012", 
      region: "us-east-1", 
      space_arn: "arn:aws:cloudwatch:us-east-1:123456789012:space/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      status: "ACTIVE", 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
    {
      name: "staging-observability", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:domain/d-1a2b3c4d5e", 
      owner_account_id: "123456789012", 
      region: "us-east-1", 
      space_arn: "arn:aws:cloudwatch:us-east-1:123456789012:space/b2c3d4e5-6f7a-4b8c-9d0e-1f2a3b4c5d6e", 
      space_id: "b2c3d4e5-6f7a-4b8c-9d0e-1f2a3b4c5d6e", 
      status: "ACTIVE", 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjIwfQ==", 
}

Request syntax with placeholder values


resp = client.list_spaces({
  domain_id: "DomainId",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].space_id #=> String
resp.items[0].name #=> String
resp.items[0].space_arn #=> String
resp.items[0].domain_arn #=> String
resp.items[0].region #=> String
resp.items[0]. #=> String
resp.items[0].status #=> String, one of "ACTIVE", "SUSPENDED", "MOVING"
resp.items[0].status_reason #=> String
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (String) —

    Filter by domain ID.

  • :next_token (String) —

    A token to retrieve the next page of results. Supply the same filters used on the request that returned it. Tokens expire after 24 hours.

  • :max_results (Integer) —

    The maximum number of spaces to return per page. Defaults to 100. A page can contain fewer results than this value even when more results remain; continue while nextToken is present.

Returns:

See Also:



8133
8134
8135
8136
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 8133

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

#list_spaces_for_organization(params = {}) ⇒ Types::ListSpacesForOrganizationOutput

Returns the spaces across all member accounts in the organization.

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

Examples:

Example: List spaces across the organization


# The following example lists the first page of spaces across all member accounts in the organization. The results include
# spaces owned by different accounts, along with a nextToken to retrieve the next page. Payloads are shown as JSON; on the
# wire they are CBOR-encoded.

resp = client.list_spaces_for_organization({
  max_results: 50, 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "prod-observability", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      owner_account_id: "111122223333", 
      region: "us-east-1", 
      space_arn: "arn:aws:cloudwatch:us-east-1:111122223333:space/c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f", 
      space_id: "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f", 
      status: "ACTIVE", 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
    {
      name: "prod-observability", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      owner_account_id: "444455556666", 
      region: "us-east-1", 
      space_arn: "arn:aws:cloudwatch:us-east-1:444455556666:space/d4e5f6a7-8b9c-4d0e-8f1a-2b3c4d5e6f7a", 
      space_id: "d4e5f6a7-8b9c-4d0e-8f1a-2b3c4d5e6f7a", 
      status: "ACTIVE", 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjIwfQ==", 
}

Request syntax with placeholder values


resp = client.list_spaces_for_organization({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.items #=> Array
resp.items[0].space_id #=> String
resp.items[0].name #=> String
resp.items[0].space_arn #=> String
resp.items[0].domain_arn #=> String
resp.items[0].region #=> String
resp.items[0]. #=> String
resp.items[0].status #=> String, one of "ACTIVE", "SUSPENDED", "MOVING"
resp.items[0].status_reason #=> String
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String) —

    A token to retrieve the next page of results. Tokens expire after 24 hours.

  • :max_results (Integer) —

    The maximum number of spaces to return per page. Defaults to 100.

Returns:

See Also:



8218
8219
8220
8221
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 8218

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

#list_telemetry_fields(params = {}) ⇒ Types::ListTelemetryFieldsResponse

Lists fields available for telemetry queries.

Returns a list of fields included in the specified dataset, granular to telemetry type. Returned field names reflect the exact stored casing and are case-sensitive when referenced in query expressions; the query engine does not normalize identifier case.

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

Examples:

Example: List fields for a dataset


# The following example lists the log fields available in the specified dataset. Payloads are shown as JSON; on the wire
# they are CBOR-encoded.

resp = client.list_telemetry_fields({
  data_set_name: "default", 
  telemetry_type: "LOGS", 
})

resp.to_h outputs the following:
{
  fields: [
    {
      name: "@timestamp", 
    }, 
    {
      name: "@message", 
    }, 
    {
      name: "attributes", 
      children: [
        {
          name: "http.method", 
        }, 
        {
          name: "http.status_code", 
        }, 
      ], 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_telemetry_fields({
  data_set_name: "ListTelemetryFieldsRequestDataSetNameString", # required
  telemetry_type: "LOGS", # accepts LOGS, TRACES
  start_time: Time.now,
  end_time: Time.now,
  next_token: "String",
})

Response structure


resp.fields #=> Array
resp.fields[0].name #=> String
resp.fields[0].children #=> Array
resp.fields[0].children[0] #=> Types::Field
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :data_set_name (required, String) —

    The name of the dataset to list fields for.

  • :telemetry_type (String) —

    The type of telemetry to filter fields by.

  • :start_time (Time, DateTime, Date, Integer, String) —

    Inclusive start of the lookback window. When omitted, the service defaults to the configured lookback before endTime.

  • :end_time (Time, DateTime, Date, Integer, String) —

    Inclusive end of the lookback window. When omitted, the service defaults to the current time.

  • :next_token (String) —

    A token to retrieve the next page of results. Reserved for future pagination; the service does not paginate at this time and returns null.

Returns:

See Also:



8312
8313
8314
8315
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 8312

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

#list_telemetry_query_sessions(params = {}) ⇒ Types::ListTelemetryQuerySessionsResponse

Lists telemetry query sessions.

Returns a list of telemetry query sessions owned by the caller.

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

Examples:

Example: List telemetry query sessions


# The following example lists the query sessions owned by the caller. Payloads are shown as JSON; on the wire they are
# CBOR-encoded.

resp = client.list_telemetry_query_sessions({
  max_results: 10, 
})

resp.to_h outputs the following:
{
  next_token: "eyJvZmZzZXQiOjEwfQ==", 
  sessions: [
    {
      created_at: Time.parse("2026-09-16T00:00:00Z"), 
      last_activity_at: Time.parse("2026-09-16T00:05:00Z"), 
      session_id: "9f8c7d6e-5b4a-4c3d-9e2f-1a0b2c3d4e5f", 
      session_name: "prod-latency-investigation", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_telemetry_query_sessions({
  next_token: "String",
  max_results: 1,
})

Response structure


resp.sessions #=> Array
resp.sessions[0].session_id #=> String
resp.sessions[0].created_at #=> Time
resp.sessions[0].last_activity_at #=> Time
resp.sessions[0].session_name #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String) —

    A token to retrieve the next page of results.

  • :max_results (Integer) —

    The maximum number of sessions to return per page.

Returns:

See Also:



8377
8378
8379
8380
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 8377

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

#list_views(params = {}) ⇒ Types::ListViewsResponse

Lists the views in the caller's account and region.

Returns a summary for each view, optionally filtered by view type. View definitions are not included — use GetView to retrieve them.

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

Examples:

Example: List the views in an account and Region


# The following example returns a page of view summaries, filtered to user-created views. Definitions are not included —
# call GetView to retrieve them. A nextToken is returned when more results are available. Payloads are shown as JSON; on
# the wire they are CBOR-encoded.

resp = client.list_views({
  type: "USER", 
  max_results: 10, 
})

resp.to_h outputs the following:
{
  items: [
    {
      name: "view.service_errors", 
      type: "USER", 
      created_at: Time.parse("2026-09-16T14:22:31Z"), 
      description: "Error counts by service", 
      updated_at: Time.parse("2026-09-16T14:22:31Z"), 
    }, 
  ], 
  next_token: "eyJvZmZzZXQiOjEwfQ==", 
}

Request syntax with placeholder values


resp = client.list_views({
  type: "USER", # accepts USER, MANAGED
  max_results: 1,
  next_token: "String",
})

Response structure


resp.items #=> Array
resp.items[0].name #=> String
resp.items[0].type #=> String, one of "USER", "MANAGED"
resp.items[0].description #=> String
resp.items[0].created_at #=> Time
resp.items[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :type (String) —

    Return only views of this ownership category.

  • :max_results (Integer) —

    The maximum number of views to return per page.

  • :next_token (String) —

    A token to retrieve the next page of results.

Returns:

See Also:



8451
8452
8453
8454
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 8451

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

#put_experiment_run_results(params = {}) ⇒ Types::PutExperimentRunResultsOutput

Reports a batch of scored cases for a run.

Applies to runs reported from the caller's code (REPORTED runs). Each call reports up to 25 cases. The first call with a new runId creates the run and must include the run block. Repeat the call to report more cases, then call CompleteExperimentRun to end the run. Fails with a ConflictException (RUN_TERMINAL) for a run that has ended, and (RUN_ID_DELETED) for the runId of a deleted run.

The batch is atomic: an invalid item fails the whole request with a ValidationException that names the item and field (for example, results[3].caseId), and nothing is written. A request is at most 1 MB, and each results item at most 256 KB as canonical JSON. A larger item fails with a ValidationException, and a larger request is rejected before it reaches the API.

Examples:

Example: Create a reported run and report its first cases


# The following example creates a run reported from the caller's code and reports two cases: one the agent answered, and
# one where the agent could not be invoked. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.put_experiment_run_results({
  client_token: "ci-build-4821-batch-1", 
  experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
  results: [
    {
      case_id: "faq-001", 
      evaluators: [
        {
          evaluator_id: "Builtin.Helpfulness", 
          score: 0.86, 
        }, 
      ], 
      execution_status: "COMPLETED", 
      session_id: "ci-build-4821-faq-001", 
      turns: [
        {
          input: "How do I reset my password?", 
          output: "Choose Forgot password on the sign-in page and follow the link that we email you.", 
          trace_id: "6f1c2a9e4b7d3f08a5c1e9b2d4f6a8c0", 
        }, 
      ], 
    }, 
    {
      case_id: "faq-002", 
      execution_status: "TARGET_ERROR", 
      status_reason: "TARGET_INVOKE_ERROR", 
      turns: [
        {
          input: "Can I change the email on my account?", 
        }, 
      ], 
    }, 
  ], 
  run: {
    metadata: {
      "gitCommit" => "4f9c2e1", 
    }, 
    dataset: {
      name: "support-faq.jsonl", 
      case_count: 50, 
      source: "FILE", 
    }, 
    evaluators: [
      {
        evaluator_id: "Builtin.Helpfulness", 
        rating_scale: "NUMERIC", 
      }, 
    ], 
    producer: {
      version: "1.4.0", 
      name: "release-eval-harness", 
      external_id: "4821", 
      kind: "CUSTOM", 
    }, 
    rule: {
      name: "release-gate", 
      case_criteria: [
        {
          evaluator: {
            evaluator_id: "Builtin.Helpfulness", 
            threshold: {
              min_score: 0.7, 
            }, 
          }, 
        }, 
      ], 
      gates: [
        {
          bound: {
            min: 0.9, 
          }, 
          metric: {
            pass_rate: {
            }, 
          }, 
        }, 
      ], 
      source: "FILE", 
    }, 
    started_at: Time.parse("2026-11-10T15:01:58Z"), 
    target: {
      agent_core_runtime: {
        version: "7", 
        endpoint_arn: "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/support_agent-a1B2c3D4e5/runtime-endpoint/production", 
      }, 
    }, 
  }, 
  run_id: "ci-build-4821", 
})

resp.to_h outputs the following:
{
  case_writes: [
    {
      case_id: "faq-001", 
      status: "PASSED", 
    }, 
    {
      case_id: "faq-002", 
      status: "TARGET_ERROR", 
      status_reason: "TARGET_INVOKE_ERROR", 
    }, 
  ], 
  experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
  run_created: true, 
  run_id: "ci-build-4821", 
}

Request syntax with placeholder values


resp = client.put_experiment_run_results({
  experiment_id: "ExperimentId", # required
  run_id: "ExperimentRunId", # required
  client_token: "ClientToken",
  run: {
    producer: { # required
      kind: "SDK", # required, accepts SDK, CUSTOM
      name: "ExperimentProducerNameString", # required
      version: "ExperimentProducerVersionString",
      external_id: "ExperimentProducerExternalIdString",
    },
    rule: {
      source: "FILE", # required, accepts FILE, INLINE
      name: "ExperimentRuleNameString",
      case_criteria: [
        {
          evaluator: {
            evaluator_id: "EvaluatorIdentifier", # required
            threshold: { # required
              min_score: 1.0,
              max_score: 1.0,
              pass_labels: ["EvaluatorLabel"],
            },
          },
        },
      ],
      gates: [ # required
        {
          metric: { # required
            pass_rate: {
            },
            not_scored_rate: {
            },
            evaluator_average: {
              evaluator_id: "EvaluatorIdentifier", # required
            },
            regressed_cases: {
            },
            fixed_cases: {
            },
            regressed_scores: {
            },
            unpaired_case_rate: {
            },
          },
          bound: {
            min: 1.0,
            max: 1.0,
            vs_control: {
              min_delta: 1.0, # required
              mode: "ABSOLUTE", # required, accepts ABSOLUTE, RATIO
            },
          },
        },
      ],
      content_hash: "ExperimentRuleContentHashString",
    },
    control: {
      target: {
        agent_core_runtime: {
          endpoint_arn: "AgentCoreRuntimeTargetEndpointArnString", # required
          request_template: "RequestTemplate",
          version: "AgentCoreRuntimeTargetVersionString",
        },
        https_endpoint: {
          url: "HttpsEndpointTargetUrlString",
          version: "HttpsEndpointTargetVersionString",
        },
        custom: {
          version: "CustomTargetVersionString",
          endpoint: "CustomTargetEndpointString",
        },
      },
      run_id: "ExperimentRunId",
      latest_passed: {
        endpoint_arn: "LatestPassedFilterEndpointArnString",
      },
    },
    evaluators: [
      {
        evaluator_id: "EvaluatorIdentifier", # required
        rating_scale: "NUMERIC", # accepts NUMERIC, CATEGORICAL
        score_direction: "HIGHER_IS_BETTER", # accepts HIGHER_IS_BETTER, LOWER_IS_BETTER
      },
    ],
    target: {
      agent_core_runtime: {
        endpoint_arn: "AgentCoreRuntimeTargetEndpointArnString", # required
        request_template: "RequestTemplate",
        version: "AgentCoreRuntimeTargetVersionString",
      },
      https_endpoint: {
        url: "HttpsEndpointTargetUrlString",
        version: "HttpsEndpointTargetVersionString",
      },
      custom: {
        version: "CustomTargetVersionString",
        endpoint: "CustomTargetEndpointString",
      },
    },
    dataset: { # required
      source: "AGENTCORE", # required, accepts AGENTCORE, FILE, OTHER
      id: "ExperimentRunDatasetIdString",
      name: "ExperimentRunDatasetNameString",
      version: "ExperimentRunDatasetVersionString",
      case_count: 1,
      content_hash: "ExperimentRunDatasetContentHashString",
    },
    metadata: {
      "RunMetadataMapKeyString" => "RunMetadataValue",
    },
    description: "Description",
    started_at: Time.now,
  },
  results: [ # required
    {
      case_id: "CaseId", # required
      session_id: "ExperimentCaseResultSessionIdString",
      execution_status: "COMPLETED", # required, accepts COMPLETED, TARGET_ERROR, TIMED_OUT, NOT_RUN
      status_reason: "TARGET_INVOKE_ERROR", # accepts TARGET_INVOKE_ERROR, TARGET_RESPONSE_INVALID, TURN_TIME_LIMIT, RUN_STOPPED, SCORING_THROTTLED, SCORING_ERROR, EVALUATOR_ERROR, SPANS_MISSING
      turns: [
        {
          trace_id: "ExperimentTraceId",
          input: "CaseText",
          output: "CaseText",
          truncated: ["input"], # accepts input, output
        },
      ],
      evaluators: [
        {
          evaluator_id: "EvaluatorIdentifier", # required
          score: 1.0,
          label: "EvaluatorLabel",
          explanation: "CaseText",
          explanation_truncated: false,
          error: {
            code: "SCORING_THROTTLED", # required, accepts SCORING_THROTTLED, SCORING_ERROR, EVALUATOR_ERROR, SPANS_MISSING
          },
        },
      ],
    },
  ],
})

Response structure


resp.experiment_id #=> String
resp.run_id #=> String
resp.case_writes #=> Array
resp.case_writes[0].case_id #=> String
resp.case_writes[0].status #=> String, one of "PASSED", "FAILED", "COMPLETED", "TARGET_ERROR", "TIMED_OUT", "NOT_SCORED", "NOT_RUN"
resp.case_writes[0].status_reason #=> String, one of "TARGET_INVOKE_ERROR", "TARGET_RESPONSE_INVALID", "TURN_TIME_LIMIT", "RUN_STOPPED", "SCORING_THROTTLED", "SCORING_ERROR", "EVALUATOR_ERROR", "SPANS_MISSING"
resp.run_created #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :experiment_id (required, String) —

    The ID of the experiment the run belongs to.

  • :run_id (required, String) —

    The ID of the run, chosen by the caller. A runId that is new to the experiment creates a run. A call that fails validation does not create the run.

  • :client_token (String) —

    Idempotency token for safe retries. Repeated requests with the same token and identical input return the recorded response. A call that fails validation frees the token, so the corrected batch can be resent with the same token.

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

  • :run (Types::ReportedRunInfo) —

    The details of the run. Required on the call that creates the run; optional afterwards, and must match the run when present.

  • :results (required, Array<Types::ExperimentCaseResult>) —

    The cases to report: up to 25 distinct cases, written atomically so that all are accepted or none are. Each item is at most 256 KB as canonical JSON.

Returns:

See Also:



8779
8780
8781
8782
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 8779

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

#put_intelligence_configuration(params = {}) ⇒ Types::PutIntelligenceConfigurationOutput

Creates or updates the intelligence configuration for the calling account in the current Region. The account is the account of the caller's credentials; the request does not name it. Set intelligenceEnabled to true to enable Observations, or to false to disable it. A request that sets no setting fails with ValidationException. Each setting that the request sends replaces the stored value, and each setting that it omits stays unchanged. An automatic-investigation entry for the stored integration sent without minimumSeverity keeps the stored minimumSeverity.

The service does not check whether the configuration changed after the caller last read it. The request carries no version, so a request based on an earlier GetIntelligenceConfiguration response replaces any change saved after that read, and no error is returned. One exception is a notification target sent with a targetId that is no longer stored, for example because another save removed it, which fails with ValidationException. ConflictException means only that another update was saved while this request was being processed, after the service read the configuration for this request and before it saved the result. The service checks for such a change to the notification targets when the request carries notificationTargets, to the automatic-investigation entries when it carries autoInvestigations, and to the KMS key when it sets a new key or removes the key. A request that adds a notification target or changes its filter also fails with ConflictException if Observations is turned off while the request is being processed. Other updates saved while the request is being processed can also cause ConflictException. When the request fails with ConflictException, nothing is saved. To lower the chance of replacing another caller's change, call GetIntelligenceConfiguration right before saving, and omit each setting that you do not mean to change.

The service does not use clientToken to recognize a retry, so a retried request is processed again like a new one (see clientToken).

Examples:

Example: Configure a customer-managed KMS key


# The following example sets the customer-managed KMS key used to encrypt the account's intelligence data. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.put_intelligence_configuration({
  client_token: "b3f8c7d6-5b4a-4c3d-9e2f-1a0b2c3d4e5f", 
  kms_key_arn: "arn:aws:kms:us-east-1:123456789012:key/1a2b3c4d-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  account_id: "123456789012", 
  created_at: Time.parse("2026-01-15T08:30:00Z"), 
  intelligence_enabled: true, 
  kms_key_arn: "arn:aws:kms:us-east-1:123456789012:key/1a2b3c4d-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  updated_at: Time.parse("2026-09-16T12:00:00Z"), 
}

Example: Add notification targets and turn on automatic investigations


# The following example, for an account that already has Observations enabled, adds a Slack target for HIGH observations
# of one service and an Amazon SNS target for every observation, and starts automatic investigations for HIGH
# observations. The service assigns each new target its targetId. Payloads are shown as JSON; on the wire they are
# CBOR-encoded.

resp = client.put_intelligence_configuration({
  auto_investigations: [
    {
      integration_arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/f0e1d2c3-b4a5-4968-8776-655443322110", 
      minimum_severity: "HIGH", 
    }, 
  ], 
  client_token: "c4a9d8e7-6c5b-4d4e-8f3a-2b1c0d9e8f7a", 
  notification_targets: [
    {
      filter: {
        minimum_severity: "HIGH", 
        services: [
          "checkout-service", 
        ], 
      }, 
      target: {
        metadata: {
          "channel" => "checkout-oncall", 
        }, 
        type: "slack", 
        arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      }, 
    }, 
    {
      target: {
        type: "sns", 
        arn: "arn:aws:sns:us-east-1:123456789012:checkout-oncall", 
      }, 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  account_id: "123456789012", 
  auto_investigations: [
    {
      integration_arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/f0e1d2c3-b4a5-4968-8776-655443322110", 
      minimum_severity: "HIGH", 
    }, 
  ], 
  created_at: Time.parse("2026-01-15T08:30:00Z"), 
  intelligence_enabled: true, 
  kms_key_arn: "arn:aws:kms:us-east-1:123456789012:key/1a2b3c4d-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  notification_targets: [
    {
      filter: {
        minimum_severity: "HIGH", 
        services: [
          "checkout-service", 
        ], 
      }, 
      target: {
        metadata: {
          "channel" => "checkout-oncall", 
          "channelId" => "C0123456789", 
        }, 
        type: "slack", 
        arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
      }, 
      target_id: "k3m9q2x7v1", 
    }, 
    {
      target: {
        type: "sns", 
        arn: "arn:aws:sns:us-east-1:123456789012:checkout-oncall", 
      }, 
      target_id: "p8w4t6z0n5", 
    }, 
  ], 
  updated_at: Time.parse("2026-09-16T12:05:00Z"), 
}

Request syntax with placeholder values


resp = client.put_intelligence_configuration({
  intelligence_enabled: false,
  kms_key_arn: "IntelligenceKmsKeyArn",
  remove_kms_key: false,
  client_token: "ClientToken",
  notification_targets: [
    {
      target_id: "IntelligenceNotificationTargetEntryTargetIdString",
      target: { # required
        type: "sns", # required, accepts sns, slack, pagerduty
        arn: "IntelligenceNotificationTargetArnString", # required
        metadata: {
          "IntelligenceNotificationTargetMetadataMapKeyString" => "IntelligenceNotificationTargetMetadataMapValueString",
        },
      },
      filter: {
        services: ["IntelligenceNotificationServiceName"],
        minimum_severity: "LOW", # accepts LOW, MEDIUM, HIGH
      },
    },
  ],
  auto_investigations: [
    {
      integration_arn: "AutoInvestigationEntryIntegrationArnString", # required
      minimum_severity: "LOW", # accepts LOW, MEDIUM, HIGH
    },
  ],
})

Response structure


resp. #=> String
resp.intelligence_enabled #=> Boolean
resp.kms_key_arn #=> String
resp.updated_at #=> Time
resp.created_at #=> Time
resp.notification_targets #=> Array
resp.notification_targets[0].target_id #=> String
resp.notification_targets[0].target.type #=> String, one of "sns", "slack", "pagerduty"
resp.notification_targets[0].target.arn #=> String
resp.notification_targets[0].target. #=> Hash
resp.notification_targets[0].target.["IntelligenceNotificationTargetMetadataMapKeyString"] #=> String
resp.notification_targets[0].filter.services #=> Array
resp.notification_targets[0].filter.services[0] #=> String
resp.notification_targets[0].filter.minimum_severity #=> String, one of "LOW", "MEDIUM", "HIGH"
resp.auto_investigations #=> Array
resp.auto_investigations[0].integration_arn #=> String
resp.auto_investigations[0].minimum_severity #=> String, one of "LOW", "MEDIUM", "HIGH"

Parameters:

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

    ({})

Options Hash (params):

  • :intelligence_enabled (Boolean) —

    Whether to enable Observations, which detects anomalies and correlates them into observations, for the calling account. Set it to true to enable and to false to disable.

    Observations is in preview release and is subject to change.

  • :kms_key_arn (String) —

    Optional KMS key ARN to configure customer-managed encryption for anomaly data. The key must be in the calling account and in the current Region. A key in another account or another Region fails with ValidationException and nothing is saved.

  • :remove_kms_key (Boolean) —

    Set to true to disassociate the configured KMS key. Mutually exclusive with kmsKeyArn; the service returns ValidationException if both are provided.

  • :client_token (String) —

    A token that identifies the request: 1 to 64 printable ASCII characters, with no spaces. For this operation, the token does not make a retry safe: the service checks only its format, and does not store the token or compare it with earlier requests, so a request sent again with the same token is processed again as a new request, not answered with the first result. Sending the same settings again saves them again, and a notification target sent without a targetId is added again with a new targetId. A retry fails with ConflictException only if another update of the configuration is saved while the retry is being processed. To find out whether an earlier attempt was saved, call GetIntelligenceConfiguration.

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

  • :notification_targets (Array<Types::IntelligenceNotificationTargetEntry>) —

    The destinations Intelligence notifications are sent to. Omit it to leave the stored targets unchanged, send an empty list to remove all targets, and send any other list to replace the stored list in full.

    Send a new entry without a targetId; the service assigns one. For an existing entry, echo its targetId and its target, including metadata, unchanged; its filter may change. Every write that changes the list re-validates all of its targets, and if any target fails, the request fails with ValidationException and nothing is stored.

    A save that adds a target, or changes the filter of a stored target, needs Intelligence already enabled on the account and not turned off by the same request, permission to view observations (cloudwatch:ListObservations), and kms:Decrypt on the configuration's customer managed key when one is set. A save that adds a slack or pagerduty target, or changes its filter, also needs cloudwatch:InvokeIntegration on its integration. A save that adds an sns target also needs sns:GetTopicAttributes on its topic. Removing targets and sending an empty list need none of these.

    The list replaces the targets stored when the service reads the configuration for this request, so of two requests that change the targets one after the other, the later one replaces the list the earlier one saved. If the stored targets change while the request is being saved, the request fails with ConflictException and nothing is stored, so the caller reads the configuration again and retries. There is no version member to send for the targets: the service compares against the targets it read for this request.

    Observations is in preview release and is subject to change.

  • :auto_investigations (Array<Types::AutoInvestigationEntry>) —

    The automatic-investigation entries for the account in this Region. Omit it to leave the stored entries unchanged, send an empty list to turn automatic investigations off, and send any other list to replace the stored entries in full. An entry for the stored integration sent without minimumSeverity keeps the stored minimumSeverity.

    Each entry names the ARN of an active AWS DevOps Agent integration in the account and Region. For each entry that the request adds, or whose integration or effective minimumSeverity it changes, the caller needs permission to view and to invoke that integration. At most one entry is accepted, and it covers the entire account. If any check fails, the request fails and nothing is stored. If the stored entries change while the request is being saved, the request fails with ConflictException and nothing is stored, so the caller reads the configuration again and retries. There is no version member to send for these entries: the service compares against the entries it read for this request.

    Observations is in preview release and is subject to change.

Returns:

See Also:



9072
9073
9074
9075
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 9072

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

#search_principals(params = {}) ⇒ Types::SearchPrincipalsOutput

Searches Identity Center for users and groups in a domain. The domain must be configured with Identity Center.

To grant access to a result, pass its principalId to CreateAccessGrant with a principalType of IDC_USER for a user or IDC_GROUP for a group.

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

Examples:

Example: Search principals by name


# The following example searches a domain for principals whose name matches a text query. No nextToken is returned, so
# there are no more results. To grant access to a result, pass its principalId to CreateAccessGrant with a principalType
# of IDC_USER for a user or IDC_GROUP for a group. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.search_principals({
  domain_id: "d-1a2b3c4d5e", 
  search_query: "jane", 
})

resp.to_h outputs the following:
{
  results: [
    {
      display_name: "Jane Doe", 
      principal_id: "94b6c7d8-1a2b-4c3d-9e4f-5a6b7c8d9e0f", 
      principal_type: "USER", 
      user_name: "jane.doe", 
    }, 
    {
      display_name: "Jane's Analysts", 
      principal_id: "2f5a8c1b-6d3e-4f7a-8b9c-0d1e2f3a4b5c", 
      principal_type: "GROUP", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.search_principals({
  domain_id: "DomainId", # required
  search_query: "SearchPrincipalsInputSearchQueryString", # required
  max_results: 1,
  next_token: "SearchPrincipalsNextToken",
})

Response structure


resp.results #=> Array
resp.results[0].principal_id #=> String
resp.results[0].principal_type #=> String, one of "USER", "GROUP"
resp.results[0].display_name #=> String
resp.results[0].user_name #=> String
resp.results[0].description #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String) —

    The ID of the domain to search within.

  • :search_query (required, String) —

    A search term to match against user names, display names, and IDs. Pass * to list all principals. Maximum 128 characters.

  • :max_results (Integer) —

    The maximum number of results to return. Defaults to 100.

  • :next_token (String) —

    A token to retrieve the next page of results. Supply the same searchQuery used on the request that returned it. Tokens expire after 24 hours.

Returns:

See Also:



9158
9159
9160
9161
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 9158

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

#start_experiment_run(params = {}) ⇒ Types::StartExperimentRunOutput

Starts a hosted run of an experiment.

The service runs the dataset's cases against the given version of the experiment's target with an Amazon Bedrock AgentCore batch evaluation and scores them with the given evaluators. The run starts as RUNNING and ends as COMPLETED, or as DID_NOT_FINISH when it is stopped or fails. Use GetExperimentRun to check the run's progress.

When the run has a rule, it gets a verdict when it ends. A target control starts a second, live control run alongside this one.

Examples:

Example: Start a hosted run


# The following example starts a hosted run of an experiment against version 3 of an AgentCore dataset, scored with one
# evaluator and gated on a 90% pass rate. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.start_experiment_run({
  metadata: {
    "modelId" => "anthropic.claude-sonnet", 
    "promptVersion" => "v3", 
  }, 
  client_token: "release-2026-11-10-hosted", 
  dataset: {
    version: "3", 
    id: "support-faq-dataset", 
    source: "AGENTCORE", 
  }, 
  description: "Release candidate with the v3 support prompt", 
  evaluators: [
    {
      evaluator_id: "Builtin.Helpfulness", 
      rating_scale: "NUMERIC", 
    }, 
  ], 
  experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
  rule: {
    name: "release-gate", 
    case_criteria: [
      {
        evaluator: {
          evaluator_id: "Builtin.Helpfulness", 
          threshold: {
            min_score: 0.7, 
          }, 
        }, 
      }, 
    ], 
    gates: [
      {
        bound: {
          min: 0.9, 
        }, 
        metric: {
          pass_rate: {
          }, 
        }, 
      }, 
    ], 
    source: "INLINE", 
  }, 
  target: {
    agent_core_runtime: {
      endpoint_arn: "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/support_agent-a1B2c3D4e5/runtime-endpoint/production", 
    }, 
  }, 
})

resp.to_h outputs the following:
{
  run: {
    metadata: {
      "modelId" => "anthropic.claude-sonnet", 
      "promptVersion" => "v3", 
    }, 
    created_at: Time.parse("2026-11-10T14:22:31Z"), 
    dataset: {
      version: "3", 
      case_count: 120, 
      content_hash: "sha256:3b7e9f2a1c4d6e8f0a2b4c6d8e0f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9c1d3e5f", 
      id: "support-faq-dataset", 
      source: "AGENTCORE", 
    }, 
    description: "Release candidate with the v3 support prompt", 
    evaluators: [
      {
        evaluator_id: "Builtin.Helpfulness", 
        rating_scale: "NUMERIC", 
      }, 
    ], 
    experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
    producer_principal: "arn:aws:iam::123456789012:role/ReleaseAutomation", 
    role: "TARGET", 
    rule: {
      name: "release-gate", 
      case_criteria: [
        {
          evaluator: {
            evaluator_id: "Builtin.Helpfulness", 
            threshold: {
              min_score: 0.7, 
            }, 
          }, 
        }, 
      ], 
      content_hash: "sha256:9a8b7c6d5e4f30211203f4e5d6c7b8a99a8b7c6d5e4f30211203f4e5d6c7b8a9", 
      gates: [
        {
          bound: {
            min: 0.9, 
          }, 
          metric: {
            pass_rate: {
            }, 
          }, 
        }, 
      ], 
      source: "INLINE", 
    }, 
    run_id: "run-01JD8M2A4C6E8G0J2K4M6P8R0T", 
    source: "HOSTED", 
    status: "RUNNING", 
    target: {
      agent_core_runtime: {
        version: "7", 
        endpoint_arn: "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/support_agent-a1B2c3D4e5/runtime-endpoint/production", 
      }, 
    }, 
    updated_at: Time.parse("2026-11-10T14:22:31Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.start_experiment_run({
  experiment_id: "ExperimentId", # required
  client_token: "ClientToken",
  rule: {
    source: "FILE", # required, accepts FILE, INLINE
    name: "ExperimentRuleNameString",
    case_criteria: [
      {
        evaluator: {
          evaluator_id: "EvaluatorIdentifier", # required
          threshold: { # required
            min_score: 1.0,
            max_score: 1.0,
            pass_labels: ["EvaluatorLabel"],
          },
        },
      },
    ],
    gates: [ # required
      {
        metric: { # required
          pass_rate: {
          },
          not_scored_rate: {
          },
          evaluator_average: {
            evaluator_id: "EvaluatorIdentifier", # required
          },
          regressed_cases: {
          },
          fixed_cases: {
          },
          regressed_scores: {
          },
          unpaired_case_rate: {
          },
        },
        bound: {
          min: 1.0,
          max: 1.0,
          vs_control: {
            min_delta: 1.0, # required
            mode: "ABSOLUTE", # required, accepts ABSOLUTE, RATIO
          },
        },
      },
    ],
    content_hash: "ExperimentRuleContentHashString",
  },
  evaluators: [ # required
    {
      evaluator_id: "EvaluatorIdentifier", # required
      rating_scale: "NUMERIC", # accepts NUMERIC, CATEGORICAL
      score_direction: "HIGHER_IS_BETTER", # accepts HIGHER_IS_BETTER, LOWER_IS_BETTER
    },
  ],
  target: { # required
    agent_core_runtime: {
      endpoint_arn: "AgentCoreRuntimeTargetEndpointArnString", # required
      request_template: "RequestTemplate",
      version: "AgentCoreRuntimeTargetVersionString",
    },
    https_endpoint: {
      url: "HttpsEndpointTargetUrlString",
      version: "HttpsEndpointTargetVersionString",
    },
    custom: {
      version: "CustomTargetVersionString",
      endpoint: "CustomTargetEndpointString",
    },
  },
  dataset: { # required
    source: "AGENTCORE", # required, accepts AGENTCORE, FILE, OTHER
    id: "ExperimentRunDatasetIdString",
    name: "ExperimentRunDatasetNameString",
    version: "ExperimentRunDatasetVersionString",
    case_count: 1,
    content_hash: "ExperimentRunDatasetContentHashString",
  },
  control: {
    target: {
      agent_core_runtime: {
        endpoint_arn: "AgentCoreRuntimeTargetEndpointArnString", # required
        request_template: "RequestTemplate",
        version: "AgentCoreRuntimeTargetVersionString",
      },
      https_endpoint: {
        url: "HttpsEndpointTargetUrlString",
        version: "HttpsEndpointTargetVersionString",
      },
      custom: {
        version: "CustomTargetVersionString",
        endpoint: "CustomTargetEndpointString",
      },
    },
    run_id: "ExperimentRunId",
    latest_passed: {
      endpoint_arn: "LatestPassedFilterEndpointArnString",
    },
  },
  metadata: {
    "RunMetadataMapKeyString" => "RunMetadataValue",
  },
  description: "Description",
})

Response structure


resp.run.experiment_id #=> String
resp.run.run_id #=> String
resp.run.source #=> String, one of "REPORTED", "HOSTED"
resp.run.status #=> String, one of "RUNNING", "STOPPING", "COMPLETED", "DID_NOT_FINISH"
resp.run.status_reason #=> String, one of "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "RESULTS_WRITE_FAILED"
resp.run.status_detail #=> String
resp.run.producer.kind #=> String, one of "SDK", "CUSTOM"
resp.run.producer.name #=> String
resp.run.producer.version #=> String
resp.run.producer.external_id #=> String
resp.run.producer_principal #=> String
resp.run.target.agent_core_runtime.endpoint_arn #=> String
resp.run.target.agent_core_runtime.request_template #=> String
resp.run.target.agent_core_runtime.version #=> String
resp.run.target.https_endpoint.url #=> String
resp.run.target.https_endpoint.version #=> String
resp.run.target.custom.version #=> String
resp.run.target.custom.endpoint #=> String
resp.run.control.target.agent_core_runtime.endpoint_arn #=> String
resp.run.control.target.agent_core_runtime.request_template #=> String
resp.run.control.target.agent_core_runtime.version #=> String
resp.run.control.target.https_endpoint.url #=> String
resp.run.control.target.https_endpoint.version #=> String
resp.run.control.target.custom.version #=> String
resp.run.control.target.custom.endpoint #=> String
resp.run.control.run_id #=> String
resp.run.control.latest_passed.endpoint_arn #=> String
resp.run.control_run_id #=> String
resp.run.role #=> String, one of "TARGET", "CONTROL"
resp.run.target_run_id #=> String
resp.run.dataset.source #=> String, one of "AGENTCORE", "FILE", "OTHER"
resp.run.dataset.id #=> String
resp.run.dataset.name #=> String
resp.run.dataset.version #=> String
resp.run.dataset.case_count #=> Integer
resp.run.dataset.content_hash #=> String
resp.run.evaluators #=> Array
resp.run.evaluators[0].evaluator_id #=> String
resp.run.evaluators[0].rating_scale #=> String, one of "NUMERIC", "CATEGORICAL"
resp.run.evaluators[0].score_direction #=> String, one of "HIGHER_IS_BETTER", "LOWER_IS_BETTER"
resp.run.rule.source #=> String, one of "FILE", "INLINE"
resp.run.rule.name #=> String
resp.run.rule.case_criteria #=> Array
resp.run.rule.case_criteria[0].evaluator.evaluator_id #=> String
resp.run.rule.case_criteria[0].evaluator.threshold.min_score #=> Float
resp.run.rule.case_criteria[0].evaluator.threshold.max_score #=> Float
resp.run.rule.case_criteria[0].evaluator.threshold.pass_labels #=> Array
resp.run.rule.case_criteria[0].evaluator.threshold.pass_labels[0] #=> String
resp.run.rule.gates #=> Array
resp.run.rule.gates[0].metric.evaluator_average.evaluator_id #=> String
resp.run.rule.gates[0].bound.min #=> Float
resp.run.rule.gates[0].bound.max #=> Float
resp.run.rule.gates[0].bound.vs_control.min_delta #=> Float
resp.run.rule.gates[0].bound.vs_control.mode #=> String, one of "ABSOLUTE", "RATIO"
resp.run.rule.content_hash #=> String
resp.run. #=> Hash
resp.run.["RunMetadataMapKeyString"] #=> String
resp.run.description #=> String
resp.run.trace_stats.status #=> String, one of "PENDING", "AVAILABLE", "UNAVAILABLE"
resp.run.trace_stats.status_reason #=> String, one of "NO_TRACES", "SPANS_NOT_FOUND", "ACCESS_DENIED", "SCAN_LIMIT", "QUERY_FAILED", "INTERNAL_ERROR"
resp.run.trace_stats.cases_read #=> Integer
resp.run.trace_stats.sampled #=> Boolean
resp.run.trace_stats.cases_with_spans #=> Integer
resp.run.trace_stats.attributes #=> Array
resp.run.trace_stats.attributes[0].name #=> String, one of "MODEL", "TOOL_NAME", "SYSTEM_INSTRUCTIONS"
resp.run.trace_stats.attributes[0].version #=> Integer
resp.run.trace_stats.attributes[0].distinct #=> Integer
resp.run.trace_stats.attributes[0].values_hash #=> String
resp.run.trace_stats.attributes[0].values #=> Array
resp.run.trace_stats.attributes[0].values[0].value #=> String
resp.run.trace_stats.attributes[0].values[0].cases #=> Integer
resp.run.trace_stats.metrics #=> Array
resp.run.trace_stats.metrics[0].name #=> String, one of "MODEL_CALLS", "TOOL_CALLS", "INPUT_TOKENS", "OUTPUT_TOKENS", "TURN_LATENCY_MS", "FAILED"
resp.run.trace_stats.metrics[0].version #=> Integer
resp.run.trace_stats.metrics[0].count #=> Integer
resp.run.trace_stats.metrics[0].mean #=> Float
resp.run.trace_stats.metrics[0].p50 #=> Float
resp.run.trace_stats.metrics[0].p90 #=> Float
resp.run.trace_stats.computed_at #=> Time
resp.run.batch_evaluation.batch_evaluation_arn #=> String
resp.run.batch_evaluation.total_sessions #=> Integer
resp.run.batch_evaluation.sessions_completed #=> Integer
resp.run.batch_evaluation.sessions_in_progress #=> Integer
resp.run.batch_evaluation.sessions_failed #=> Integer
resp.run.batch_evaluation.sessions_ignored #=> Integer
resp.run.summary.cases_total #=> Integer
resp.run.summary.cases_reported #=> Integer
resp.run.summary.cases_done #=> Integer
resp.run.summary.passed #=> Integer
resp.run.summary.failed #=> Integer
resp.run.summary.completed #=> Integer
resp.run.summary.target_error #=> Integer
resp.run.summary.timed_out #=> Integer
resp.run.summary.not_scored #=> Integer
resp.run.summary.not_run #=> Integer
resp.run.summary.pass_rate #=> Float
resp.run.summary.not_scored_rate #=> Float
resp.run.metrics #=> Array
resp.run.metrics[0].evaluator_id #=> String
resp.run.metrics[0].average #=> Float
resp.run.metrics[0].min #=> Float
resp.run.metrics[0].max #=> Float
resp.run.metrics[0].label_counts #=> Hash
resp.run.metrics[0].label_counts["LabelCountMapKeyString"] #=> Integer
resp.run.metrics[0].scored_count #=> Integer
resp.run.metrics[0].passed_count #=> Integer
resp.run.case_records_written #=> Integer
resp.run.verdict #=> String, one of "PASSED", "FAILED", "DID_NOT_FINISH"
resp.run.verdict_reason_code #=> String, one of "PASSED", "NOT_SCORED_RATE_ABOVE_MAX", "PASS_RATE_BELOW_MIN", "AVERAGE_BELOW_MIN", "AVERAGE_ABOVE_MAX", "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "BELOW_CONTROL", "REGRESSED_CASES_ABOVE_MAX", "FIXED_CASES_BELOW_MIN", "UNPAIRED_CASE_RATE_ABOVE_MAX", "SCORE_REGRESSED", "CONTROL_DID_NOT_FINISH", "RESULTS_WRITE_FAILED"
resp.run.verdict_reason #=> String
resp.run.checks #=> Array
resp.run.checks[0].metric.evaluator_average.evaluator_id #=> String
resp.run.checks[0].bound.min #=> Float
resp.run.checks[0].bound.max #=> Float
resp.run.checks[0].bound.vs_control.min_delta #=> Float
resp.run.checks[0].bound.vs_control.mode #=> String, one of "ABSOLUTE", "RATIO"
resp.run.checks[0].observed #=> Float
resp.run.checks[0].control_observed #=> Float
resp.run.checks[0].delta #=> Float
resp.run.checks[0].passed #=> Boolean
resp.run.checks[0].decisive #=> Boolean
resp.run.checks[0].observed_by_evaluator #=> Array
resp.run.checks[0].observed_by_evaluator[0].evaluator_id #=> String
resp.run.checks[0].observed_by_evaluator[0].count #=> Integer
resp.run.created_at #=> Time
resp.run.started_at #=> Time
resp.run.completed_at #=> Time
resp.run.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :experiment_id (required, String) —

    The ID of the experiment to start the run in.

  • :client_token (String) —

    Idempotency token for safe retries. Repeated requests with the same token return the original run instead of starting another.

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

  • :rule (Types::ExperimentRule) —

    An optional rule. When present, the run gets a verdict when it ends.

  • :evaluators (required, Array<Types::ExperimentEvaluator>) —

    The evaluators to score the run with, from 1 to 10 for a hosted run. The run's rule can reference only these evaluators.

  • :target (required, Types::TargetConfig) —

    The version of the experiment's target to run. Hosted runs support only agentCoreRuntime.

  • :dataset (required, Types::ExperimentRunDataset) —

    The dataset to run, with source AGENTCORE, an id and a published version. Fails with FIELD_REQUIRED without a version, and the version cannot be DRAFT. Omit caseCount and contentHash.

  • :control (Types::ControlSource) —

    An optional control to compare the run with. A target control starts a second run on the same dataset alongside this one, which uses a second AgentCore batch evaluation and counts toward the experiment's run quota. Required by rules that use vsControl or paired metrics (RULE_CONTROL_REQUIRED).

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

    Additional details about what the run tested, beyond the target and dataset versions.

  • :description (String) —

    An optional description of the run, up to 1024 characters with no control characters. Cannot be changed after the run starts.

Returns:

See Also:



9583
9584
9585
9586
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 9583

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

#start_telemetry_query(params = {}) ⇒ Types::StartTelemetryQueryResponse

Starts a telemetry query within a session.

Submits the provided query string for execution in the specified session. Use GetTelemetryQueryResults to poll for results and check query status.

Examples:

Example: Start a telemetry query


# The following example submits a SQL query within a session and returns the query ID used to poll for results. Payloads
# are shown as JSON; on the wire they are CBOR-encoded.

resp = client.start_telemetry_query({
  query_string: "SELECT `@timestamp`, `@message` FROM \"logs.default\" WHERE `@timestamp` BETWEEN NOW() - INTERVAL '1 HOUR' AND NOW() ORDER BY `@timestamp` DESC LIMIT 100", 
  session_id: "9f8c7d6e-5b4a-4c3d-9e2f-1a0b2c3d4e5f", 
})

resp.to_h outputs the following:
{
  query_id: "3b2a1c0d-7e6f-4a5b-8c9d-0e1f2a3b4c5d", 
  session_id: "9f8c7d6e-5b4a-4c3d-9e2f-1a0b2c3d4e5f", 
}

Request syntax with placeholder values


resp = client.start_telemetry_query({
  query_string: "StartTelemetryQueryRequestQueryStringString", # required
  session_id: "StartTelemetryQueryRequestSessionIdString", # required
})

Response structure


resp.query_id #=> String
resp.session_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :query_string (required, String) —

    The query string to execute.

  • :session_id (required, String) —

    The unique ID of the session.

Returns:

See Also:



9638
9639
9640
9641
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 9638

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

#start_telemetry_query_session(params = {}) ⇒ Types::StartTelemetryQuerySessionResponse

Starts a new telemetry query session.

A session provides a logical grouping for one or more telemetry queries. The returned session ID is required when starting queries via StartTelemetryQuery.

Examples:

Example: Start a telemetry query session


# The following example starts a session for grouping telemetry queries and returns its session ID. Payloads are shown as
# JSON; on the wire they are CBOR-encoded.

resp = client.start_telemetry_query_session({
  session_name: "prod-latency-investigation", 
})

resp.to_h outputs the following:
{
  session_id: "9f8c7d6e-5b4a-4c3d-9e2f-1a0b2c3d4e5f", 
}

Request syntax with placeholder values


resp = client.start_telemetry_query_session({
  session_name: "StartTelemetryQuerySessionRequestSessionNameString",
})

Response structure


resp.session_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :session_name (String) —

    A human-readable name for the session. Names under /aws/ are reserved for service integrations.

Returns:

See Also:



9686
9687
9688
9689
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 9686

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

#stop_experiment_run(params = {}) ⇒ Types::StopExperimentRunOutput

Stops a run.

Applies to runs reported from the caller's code and to hosted runs. The run ends as DID_NOT_FINISH with statusReason STOPPED; a hosted run is STOPPING until its batch evaluation has stopped. Stopping a run that is STOPPING or has ended returns its current state.

Fails with a ConflictException (RUN_TERMINAL) while a CompleteExperimentRun call is finishing the run; retry CompleteExperimentRun instead.

Examples:

Example: Stop a reported run


# The following example stops a run reported from the caller's code after the agent under test became unreachable. The run
# ends as DID_NOT_FINISH, and cases that were never reported count as not run. Payloads are shown as JSON; on the wire
# they are CBOR-encoded.

resp = client.stop_experiment_run({
  detail: "agent unreachable after 5 consecutive errors", 
  experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
  run_id: "ci-build-4821", 
})

resp.to_h outputs the following:
{
  run: {
    case_records_written: 20, 
    completed_at: Time.parse("2026-11-10T15:09:44Z"), 
    created_at: Time.parse("2026-11-10T15:02:10Z"), 
    dataset: {
      name: "support-faq.jsonl", 
      case_count: 50, 
      source: "FILE", 
    }, 
    evaluators: [
      {
        evaluator_id: "Builtin.Helpfulness", 
        rating_scale: "NUMERIC", 
      }, 
    ], 
    experiment_id: "exp-01JD8K3M5N7P9Q2R4S6T8V0W1X", 
    producer: {
      version: "1.4.0", 
      name: "release-eval-harness", 
      external_id: "4821", 
      kind: "CUSTOM", 
    }, 
    producer_principal: "arn:aws:iam::123456789012:role/ReleaseAutomation", 
    role: "TARGET", 
    run_id: "ci-build-4821", 
    source: "REPORTED", 
    started_at: Time.parse("2026-11-10T15:02:10Z"), 
    status: "DID_NOT_FINISH", 
    status_detail: "agent unreachable after 5 consecutive errors", 
    status_reason: "STOPPED", 
    summary: {
      cases_done: 20, 
      cases_reported: 20, 
      cases_total: 50, 
      completed: 20, 
      failed: 0, 
      not_run: 30, 
      not_scored: 0, 
      not_scored_rate: 0.0, 
      passed: 0, 
      target_error: 0, 
      timed_out: 0, 
    }, 
    target: {
      agent_core_runtime: {
        version: "7", 
        endpoint_arn: "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/support_agent-a1B2c3D4e5/runtime-endpoint/production", 
      }, 
    }, 
    updated_at: Time.parse("2026-11-10T15:09:44Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.stop_experiment_run({
  experiment_id: "ExperimentId", # required
  run_id: "ExperimentRunId", # required
  detail: "DetailText",
})

Response structure


resp.run.experiment_id #=> String
resp.run.run_id #=> String
resp.run.source #=> String, one of "REPORTED", "HOSTED"
resp.run.status #=> String, one of "RUNNING", "STOPPING", "COMPLETED", "DID_NOT_FINISH"
resp.run.status_reason #=> String, one of "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "RESULTS_WRITE_FAILED"
resp.run.status_detail #=> String
resp.run.producer.kind #=> String, one of "SDK", "CUSTOM"
resp.run.producer.name #=> String
resp.run.producer.version #=> String
resp.run.producer.external_id #=> String
resp.run.producer_principal #=> String
resp.run.target.agent_core_runtime.endpoint_arn #=> String
resp.run.target.agent_core_runtime.request_template #=> String
resp.run.target.agent_core_runtime.version #=> String
resp.run.target.https_endpoint.url #=> String
resp.run.target.https_endpoint.version #=> String
resp.run.target.custom.version #=> String
resp.run.target.custom.endpoint #=> String
resp.run.control.target.agent_core_runtime.endpoint_arn #=> String
resp.run.control.target.agent_core_runtime.request_template #=> String
resp.run.control.target.agent_core_runtime.version #=> String
resp.run.control.target.https_endpoint.url #=> String
resp.run.control.target.https_endpoint.version #=> String
resp.run.control.target.custom.version #=> String
resp.run.control.target.custom.endpoint #=> String
resp.run.control.run_id #=> String
resp.run.control.latest_passed.endpoint_arn #=> String
resp.run.control_run_id #=> String
resp.run.role #=> String, one of "TARGET", "CONTROL"
resp.run.target_run_id #=> String
resp.run.dataset.source #=> String, one of "AGENTCORE", "FILE", "OTHER"
resp.run.dataset.id #=> String
resp.run.dataset.name #=> String
resp.run.dataset.version #=> String
resp.run.dataset.case_count #=> Integer
resp.run.dataset.content_hash #=> String
resp.run.evaluators #=> Array
resp.run.evaluators[0].evaluator_id #=> String
resp.run.evaluators[0].rating_scale #=> String, one of "NUMERIC", "CATEGORICAL"
resp.run.evaluators[0].score_direction #=> String, one of "HIGHER_IS_BETTER", "LOWER_IS_BETTER"
resp.run.rule.source #=> String, one of "FILE", "INLINE"
resp.run.rule.name #=> String
resp.run.rule.case_criteria #=> Array
resp.run.rule.case_criteria[0].evaluator.evaluator_id #=> String
resp.run.rule.case_criteria[0].evaluator.threshold.min_score #=> Float
resp.run.rule.case_criteria[0].evaluator.threshold.max_score #=> Float
resp.run.rule.case_criteria[0].evaluator.threshold.pass_labels #=> Array
resp.run.rule.case_criteria[0].evaluator.threshold.pass_labels[0] #=> String
resp.run.rule.gates #=> Array
resp.run.rule.gates[0].metric.evaluator_average.evaluator_id #=> String
resp.run.rule.gates[0].bound.min #=> Float
resp.run.rule.gates[0].bound.max #=> Float
resp.run.rule.gates[0].bound.vs_control.min_delta #=> Float
resp.run.rule.gates[0].bound.vs_control.mode #=> String, one of "ABSOLUTE", "RATIO"
resp.run.rule.content_hash #=> String
resp.run. #=> Hash
resp.run.["RunMetadataMapKeyString"] #=> String
resp.run.description #=> String
resp.run.trace_stats.status #=> String, one of "PENDING", "AVAILABLE", "UNAVAILABLE"
resp.run.trace_stats.status_reason #=> String, one of "NO_TRACES", "SPANS_NOT_FOUND", "ACCESS_DENIED", "SCAN_LIMIT", "QUERY_FAILED", "INTERNAL_ERROR"
resp.run.trace_stats.cases_read #=> Integer
resp.run.trace_stats.sampled #=> Boolean
resp.run.trace_stats.cases_with_spans #=> Integer
resp.run.trace_stats.attributes #=> Array
resp.run.trace_stats.attributes[0].name #=> String, one of "MODEL", "TOOL_NAME", "SYSTEM_INSTRUCTIONS"
resp.run.trace_stats.attributes[0].version #=> Integer
resp.run.trace_stats.attributes[0].distinct #=> Integer
resp.run.trace_stats.attributes[0].values_hash #=> String
resp.run.trace_stats.attributes[0].values #=> Array
resp.run.trace_stats.attributes[0].values[0].value #=> String
resp.run.trace_stats.attributes[0].values[0].cases #=> Integer
resp.run.trace_stats.metrics #=> Array
resp.run.trace_stats.metrics[0].name #=> String, one of "MODEL_CALLS", "TOOL_CALLS", "INPUT_TOKENS", "OUTPUT_TOKENS", "TURN_LATENCY_MS", "FAILED"
resp.run.trace_stats.metrics[0].version #=> Integer
resp.run.trace_stats.metrics[0].count #=> Integer
resp.run.trace_stats.metrics[0].mean #=> Float
resp.run.trace_stats.metrics[0].p50 #=> Float
resp.run.trace_stats.metrics[0].p90 #=> Float
resp.run.trace_stats.computed_at #=> Time
resp.run.batch_evaluation.batch_evaluation_arn #=> String
resp.run.batch_evaluation.total_sessions #=> Integer
resp.run.batch_evaluation.sessions_completed #=> Integer
resp.run.batch_evaluation.sessions_in_progress #=> Integer
resp.run.batch_evaluation.sessions_failed #=> Integer
resp.run.batch_evaluation.sessions_ignored #=> Integer
resp.run.summary.cases_total #=> Integer
resp.run.summary.cases_reported #=> Integer
resp.run.summary.cases_done #=> Integer
resp.run.summary.passed #=> Integer
resp.run.summary.failed #=> Integer
resp.run.summary.completed #=> Integer
resp.run.summary.target_error #=> Integer
resp.run.summary.timed_out #=> Integer
resp.run.summary.not_scored #=> Integer
resp.run.summary.not_run #=> Integer
resp.run.summary.pass_rate #=> Float
resp.run.summary.not_scored_rate #=> Float
resp.run.metrics #=> Array
resp.run.metrics[0].evaluator_id #=> String
resp.run.metrics[0].average #=> Float
resp.run.metrics[0].min #=> Float
resp.run.metrics[0].max #=> Float
resp.run.metrics[0].label_counts #=> Hash
resp.run.metrics[0].label_counts["LabelCountMapKeyString"] #=> Integer
resp.run.metrics[0].scored_count #=> Integer
resp.run.metrics[0].passed_count #=> Integer
resp.run.case_records_written #=> Integer
resp.run.verdict #=> String, one of "PASSED", "FAILED", "DID_NOT_FINISH"
resp.run.verdict_reason_code #=> String, one of "PASSED", "NOT_SCORED_RATE_ABOVE_MAX", "PASS_RATE_BELOW_MIN", "AVERAGE_BELOW_MIN", "AVERAGE_ABOVE_MAX", "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "BELOW_CONTROL", "REGRESSED_CASES_ABOVE_MAX", "FIXED_CASES_BELOW_MIN", "UNPAIRED_CASE_RATE_ABOVE_MAX", "SCORE_REGRESSED", "CONTROL_DID_NOT_FINISH", "RESULTS_WRITE_FAILED"
resp.run.verdict_reason #=> String
resp.run.checks #=> Array
resp.run.checks[0].metric.evaluator_average.evaluator_id #=> String
resp.run.checks[0].bound.min #=> Float
resp.run.checks[0].bound.max #=> Float
resp.run.checks[0].bound.vs_control.min_delta #=> Float
resp.run.checks[0].bound.vs_control.mode #=> String, one of "ABSOLUTE", "RATIO"
resp.run.checks[0].observed #=> Float
resp.run.checks[0].control_observed #=> Float
resp.run.checks[0].delta #=> Float
resp.run.checks[0].passed #=> Boolean
resp.run.checks[0].decisive #=> Boolean
resp.run.checks[0].observed_by_evaluator #=> Array
resp.run.checks[0].observed_by_evaluator[0].evaluator_id #=> String
resp.run.checks[0].observed_by_evaluator[0].count #=> Integer
resp.run.created_at #=> Time
resp.run.started_at #=> Time
resp.run.completed_at #=> Time
resp.run.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :experiment_id (required, String) —

    The ID of the experiment the run belongs to.

  • :run_id (required, String) —

    The ID of the run to stop.

  • :detail (String) —

    An optional reason for stopping the run, stored as the run's statusDetail. For example, "agent unreachable after 5 consecutive errors".

Returns:

See Also:



9928
9929
9930
9931
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 9928

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

#stop_telemetry_query(params = {}) ⇒ Struct

Stops a running telemetry query.

Examples:

Example: Stop a running telemetry query


# The following example stops a running query by its ID. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.stop_telemetry_query({
  query_id: "3b2a1c0d-7e6f-4a5b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.stop_telemetry_query({
  query_id: "StopTelemetryQueryRequestQueryIdString", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :query_id (required, String) —

    The unique ID of the query.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



9963
9964
9965
9966
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 9963

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

#stop_telemetry_query_session(params = {}) ⇒ Struct

Stops a telemetry query session.

Terminates the specified session. After a session is stopped it cannot be reused.

Examples:

Example: Stop a telemetry query session


# The following example terminates the specified session. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.stop_telemetry_query_session({
  session_id: "9f8c7d6e-5b4a-4c3d-9e2f-1a0b2c3d4e5f", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.stop_telemetry_query_session({
  session_id: "StopTelemetryQuerySessionRequestSessionIdString", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :session_id (required, String) —

    The unique ID of the session.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



10001
10002
10003
10004
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 10001

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

#submit_feedback(params = {}) ⇒ Struct

This operation is in preview release for Amazon CloudWatch Omni and is subject to change.

Sends feedback about the CloudWatch Omni observability experience. Describe what was helpful, wrong, or missing in the text member. The feedback is recorded against the calling account, which is taken from the caller's identity rather than from the request.

Examples:

Example: Send free-text feedback


# The following example sends a free-text comment about an observability finding. Payloads are shown as JSON; on the wire
# they are CBOR-encoded.

resp = client.submit_feedback({
  text: "The observation for the checkout service identified the wrong root cause.", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.submit_feedback({
  text: "FeedbackText", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :text (required, String) —

    The feedback to record, as free text — what was helpful, wrong, or missing. A request that omits it, or whose value is only whitespace, returns a ValidationException.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



10045
10046
10047
10048
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 10045

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

#update_access_profile(params = {}) ⇒ Types::UpdateAccessProfileOutput

Updates the name or description of an access profile.

Only the provided fields are changed; omitted fields are left unchanged.

Examples:

Example: Update an access profile description


# The following example updates only the description of an access profile; the name is left unchanged. Payloads are shown
# as JSON; on the wire they are CBOR-encoded.

resp = client.update_access_profile({
  description: "Read-only access for analysts and on-call responders.", 
  profile_id: "analyst-readonly", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  access_profile: {
    name: "Analyst read-only profile", 
    arn: "arn:aws:cloudwatch:us-east-1:123456789012:access-profile/analyst-readonly", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    description: "Read-only access for analysts and on-call responders.", 
    profile_id: "analyst-readonly", 
    profile_type: "CUSTOMER_MANAGED", 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    updated_at: Time.parse("2026-09-17T09:11:52Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.update_access_profile({
  space_id: "SpaceId", # required
  profile_id: "ProfileId", # required
  name: "AccessProfileName",
  description: "UpdateAccessProfileInputDescriptionString",
})

Response structure


resp.access_profile.profile_id #=> String
resp.access_profile.space_id #=> String
resp.access_profile.arn #=> String
resp.access_profile.name #=> String
resp.access_profile.description #=> String
resp.access_profile.created_at #=> Time
resp.access_profile.updated_at #=> Time
resp.access_profile.assume_status #=> String, one of "ALLOWED", "DENIED"
resp.access_profile.profile_type #=> String, one of "SERVICE_MANAGED", "CUSTOMER_MANAGED"

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :profile_id (required, String) —

    The unique ID of the access profile to update.

  • :name (String) —

    A new name for the access profile. Omit to leave unchanged.

  • :description (String) —

    A new description of the access profile. Omit to leave unchanged.

Returns:

See Also:



10122
10123
10124
10125
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 10122

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

#update_alert(params = {}) ⇒ Struct

Updates an existing alert.

Only non-null fields overwrite existing values.

Examples:

Example: Raise an alert's thresholds


# The following example replaces only the condition of an alert's rule; the query, the evaluation cadence and the
# notification rules are left unchanged. A supplied condition is replaced whole rather than merged, so every threshold to
# keep is sent again. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.update_alert({
  alert_id: "c3d4e5f67a8b4c9d8e0f1a2b3c4d5e6f", 
  rule: {
    telemetry_rule: {
      condition: {
        comparator: "GT", 
        critical_threshold: 400.0, 
        threshold_field: "error_count", 
        threshold_mode: "FIELD_VALUE", 
        warning_threshold: 100.0, 
      }, 
    }, 
  }, 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.update_alert({
  space_id: "SpaceId", # required
  alert_id: "AlertId", # required
  profile_id: "ProfileId",
  name: "UpdateAlertInputNameString",
  description: "UpdateAlertInputDescriptionString",
  rule: {
    telemetry_rule: {
      query: {
        language: "SQL", # required, accepts SQL, PROMQL
        expression: "AlertRuleQueryExpressionString", # required
      },
      condition: {
        threshold_mode: "COUNT_OF_RESULTS", # accepts COUNT_OF_RESULTS, FIELD_VALUE
        threshold_field: "AlertConditionThresholdFieldString",
        comparator: "GT", # accepts GT, LT, GTE, LTE
        warning_threshold: 1.0,
        critical_threshold: 1.0,
      },
      evaluation: {
        interval_seconds: 1, # required
        pending_duration_seconds: 1,
        recovery_duration_seconds: 1,
      },
      no_data: {
        treat_as: "OK", # required, accepts OK, WARNING, CRITICAL, NODATA
      },
    },
    slo_rule: {
      slo_id: "SloId",
      condition: {
        burn_rate: {
          window_minutes: 1, # required
          short_window_minutes: 1,
          warning_threshold: 1.0,
          critical_threshold: 1.0,
        },
        error_budget: {
          warning_threshold: 1.0,
          critical_threshold: 1.0,
        },
      },
      evaluation: {
        interval_seconds: 1, # required
        pending_duration_seconds: 1,
        recovery_duration_seconds: 1,
      },
      no_data: {
        treat_as: "OK", # required, accepts OK, WARNING, CRITICAL, NODATA
      },
    },
  },
  notifications_enabled: false,
  notification_rules: [
    {
      trigger: { # required
        state_values: ["OK"], # accepts OK, WARNING, CRITICAL, NODATA
      },
      target: { # required
        type: "sns", # required, accepts sns, slack, pagerduty, investigation
        arn: "NotificationTargetArnString", # required
        metadata: {
          "NotificationTargetMetadataMapKeyString" => "NotificationTargetMetadataMapValueString",
        },
      },
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :alert_id (required, String) —

    The alert to update.

  • :profile_id (String) —

    The ID of the access profile associated with the alert.

  • :name (String) —

    A new display name for the alert. Omit to leave the name unchanged (apply-if-present / PATCH). Same constraints as CreateAlert.name; the name is not the alert's identity, so a rename never changes the alertId.

  • :description (String) —

    A new description of the alert. Omit to leave unchanged.

  • :rule (Types::Rule) —

    The rule that defines how the alert is evaluated. Omit to leave unchanged. For a telemetryRule, each of query, condition, evaluation and noData is replaced whole when present. For an sloRule, each of sloId, condition, evaluation and noData is applied only when supplied; omitted members keep their stored value, and a supplied block is replaced whole. Within any supplied block, an omitted optional member is cleared to unset (null/absent), not preserved from the stored alert or defaulted. The rule kind cannot change: supplying a sloRule for a telemetry alert, or a telemetryRule for an SLO alert, is a validation error.

  • :notifications_enabled (Boolean) —

    Whether actions (notifications) are enabled for this alert. Omitted = leave existing value unchanged.

  • :notification_rules (Array<Types::NotificationRule>) —

    Replaces the entire notification rule list when present; full-replace, not merge. Omitted = leave existing rules unchanged. An empty list clears all rules (the alert keeps evaluating; only notifications stop).

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



10276
10277
10278
10279
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 10276

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

#update_domain(params = {}) ⇒ Types::UpdateDomainOutput

Updates a domain's name or identity provider configuration.

Only the provided fields are changed; omitted fields are left unchanged. Renaming a domain also changes the endpoint URLs derived from its name.

Examples:

Example: Rename a domain


# The following example performs a partial update that changes only the domain name; the omitted fields are left
# unchanged. Renaming the domain also updates the endpoint URLs derived from its name, and updatedAt advances past
# createdAt. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.update_domain({
  name: "prod-observability-metrics", 
  domain_id: "d-1a2b3c4d5e", 
})

resp.to_h outputs the following:
{
  domain: {
    name: "prod-observability-metrics", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    custom_endpoint_urls: [
      "https://prod-observability-metrics.cloudwatch-omni.global.app.aws", 
    ], 
    domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:domain/d-1a2b3c4d5e", 
    domain_endpoint_url: "https://d-1a2b3c4d5e.cloudwatch-omni.global.app.aws", 
    domain_id: "d-1a2b3c4d5e", 
    identity_center_application_arn: "arn:aws:sso::123456789012:application/ssoins-1234567890abcdef/apl-0f9e8d7c6b5a4938", 
    identity_provider_configuration: {
      identity_center_configuration: {
        identity_center_instance_arn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", 
      }, 
    }, 
    identity_providers: [
      "IDC", 
    ], 
    region: "us-east-1", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-17T09:11:52Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.update_domain({
  domain_id: "DomainId", # required
  name: "UpdateDomainInputNameString",
  identity_providers: ["IAM"], # accepts IAM, IDC
  identity_provider_configuration: {
    identity_center_configuration: {
      identity_center_instance_arn: "IdentityCenterInstanceArn",
      cross_region_configuration: {
        enabled: false, # required
      },
    },
  },
})

Response structure


resp.domain.domain_id #=> String
resp.domain.domain_arn #=> String
resp.domain.name #=> String
resp.domain.identity_providers #=> Array
resp.domain.identity_providers[0] #=> String, one of "IAM", "IDC"
resp.domain.identity_provider_configuration.identity_center_configuration.identity_center_instance_arn #=> String
resp.domain.identity_provider_configuration.identity_center_configuration.cross_region_configuration.enabled #=> Boolean
resp.domain.domain_endpoint_url #=> String
resp.domain.custom_endpoint_urls #=> Array
resp.domain.custom_endpoint_urls[0] #=> String
resp.domain.identity_center_application_arn #=> String
resp.domain.region #=> String
resp.domain.created_at #=> Time
resp.domain.updated_at #=> Time
resp.domain.status #=> String, one of "ACTIVE"

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String) —

    The unique ID of the domain to update.

  • :name (String) —

    A new name for the domain. Omit to leave unchanged. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.

  • :identity_providers (Array<String>) —

    The identity providers to configure for the domain.

  • :identity_provider_configuration (Types::IdentityProviderConfiguration) —

    Identity provider configuration for the domain.

Returns:

See Also:



10381
10382
10383
10384
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 10381

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

#update_domain_for_organization(params = {}) ⇒ Types::UpdateDomainForOrganizationOutput

Updates an organization domain's name or identity provider configuration. Call this operation in the Region where the domain was created.

Only the provided fields are changed; omitted fields are left unchanged. Renaming a domain also changes the endpoint URLs derived from its name.

Examples:

Example: Rename an organization domain


# The following example performs a partial update that changes only the organization domain name; the omitted fields are
# left unchanged. The endpoint URLs derived from the name are updated, and updatedAt advances past createdAt. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.update_domain_for_organization({
  name: "prod-observability-org-metrics", 
  domain_id: "d-9z8y7x6w5v", 
})

resp.to_h outputs the following:
{
  organization_domain: {
    name: "prod-observability-org-metrics", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    custom_endpoint_urls: [
      "https://prod-observability-org-metrics.cloudwatch-omni.global.app.aws", 
    ], 
    domain_access_role_arn: "arn:aws:iam::123456789012:role/CloudWatchOrganizationDomainAccessRole", 
    domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:organization-domain/d-9z8y7x6w5v", 
    domain_endpoint_url: "https://d-9z8y7x6w5v.cloudwatch-omni.global.app.aws", 
    domain_id: "d-9z8y7x6w5v", 
    identity_center_application_arn: "arn:aws:sso::123456789012:application/ssoins-1234567890abcdef/apl-0f9e8d7c6b5a4938", 
    identity_provider_configuration: {
      identity_center_configuration: {
        identity_center_instance_arn: "arn:aws:sso:::instance/ssoins-1234567890abcdef", 
      }, 
    }, 
    identity_providers: [
      "IDC", 
    ], 
    organization_id: "o-a1b2c3d4e5", 
    owner_account_id: "123456789012", 
    region: "us-east-1", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-17T09:11:52Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.update_domain_for_organization({
  domain_id: "DomainId", # required
  name: "UpdateDomainForOrganizationInputNameString",
  identity_providers: ["IAM"], # accepts IAM, IDC
  identity_provider_configuration: {
    identity_center_configuration: {
      identity_center_instance_arn: "IdentityCenterInstanceArn",
      cross_region_configuration: {
        enabled: false, # required
      },
    },
  },
})

Response structure


resp.organization_domain.domain_id #=> String
resp.organization_domain.domain_arn #=> String
resp.organization_domain.name #=> String
resp.organization_domain.domain_endpoint_url #=> String
resp.organization_domain.custom_endpoint_urls #=> Array
resp.organization_domain.custom_endpoint_urls[0] #=> String
resp.organization_domain.organization_id #=> String
resp.organization_domain. #=> String
resp.organization_domain.identity_providers #=> Array
resp.organization_domain.identity_providers[0] #=> String, one of "IAM", "IDC"
resp.organization_domain.identity_provider_configuration.identity_center_configuration.identity_center_instance_arn #=> String
resp.organization_domain.identity_provider_configuration.identity_center_configuration.cross_region_configuration.enabled #=> Boolean
resp.organization_domain.identity_center_application_arn #=> String
resp.organization_domain.region #=> String
resp.organization_domain.status #=> String, one of "ACTIVE"
resp.organization_domain.domain_access_role_arn #=> String
resp.organization_domain.created_at #=> Time
resp.organization_domain.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String) —

    The ID of the organization domain to update.

  • :name (String) —

    A new name for the organization domain. Omit to leave unchanged. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.

  • :identity_providers (Array<String>) —

    The identity providers to configure for the domain. Omit to leave unchanged.

  • :identity_provider_configuration (Types::IdentityProviderConfiguration) —

    Identity provider configuration for the domain. Omit to leave unchanged.

Returns:

See Also:



10497
10498
10499
10500
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 10497

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

#update_experiment(params = {}) ⇒ Types::UpdateExperimentOutput

Updates an experiment.

Only the provided fields are changed; omitted fields are left unchanged. A request must set at least one of name, description, experimentConfig, or baselineRunId, and the target and type cannot be changed.

Fails with a ConflictException if experimentConfig is changed while a run is RUNNING or STOPPING. Changes to the name, description, or baseline run are always allowed.

Examples:

Example: Set an experiment's baseline run and description


# The following example makes a completed run the experiment's baseline and changes its description; omitted fields,
# including the configuration, are left unchanged. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.update_experiment({
  baseline_run_id: "ci-build-4790", 
  description: "Checks booking accuracy before each release. Baseline is the November release.", 
  experiment_id: "exp-01JC8Z5V7Q3M9K2T4R6W8Y0ABC", 
})

resp.to_h outputs the following:
{
  experiment: {
    name: "Travel agent regression suite", 
    baseline_run_id: "ci-build-4790", 
    created_at: Time.parse("2026-11-10T14:22:31Z"), 
    description: "Checks booking accuracy before each release. Baseline is the November release.", 
    experiment_arn: "arn:aws:cloudwatch:us-east-1:123456789012:experiment/exp-01JC8Z5V7Q3M9K2T4R6W8Y0ABC", 
    experiment_config: {
      dataset: {
        execution_role_arn: "arn:aws:iam::123456789012:role/ExperimentExecutionRole", 
        results_log_group: "/experiments/travel-agent/results", 
      }, 
    }, 
    experiment_id: "exp-01JC8Z5V7Q3M9K2T4R6W8Y0ABC", 
    experiment_type: "DATASET", 
    run_count: 3, 
    target: {
      name: "Travel agent", 
      definition: {
        agent_core_runtime: {
          runtime_arn: "arn:aws:bedrock-agentcore:us-east-1:123456789012:runtime/travel_agent-a1B2c3D4e5", 
        }, 
      }, 
      environment: "staging", 
      service_name: "travel-agent", 
    }, 
    target_run_count: 3, 
    updated_at: Time.parse("2026-11-11T10:47:55Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.update_experiment({
  experiment_id: "ExperimentId", # required
  name: "ExperimentName",
  description: "Description",
  experiment_config: {
    dataset: {
      execution_role_arn: "ExecutionRoleArn", # required
      results_log_group: "LogGroupName", # required
      trace_log_groups: ["LogGroupName"],
      collect_trace_stats: false,
    },
  },
  baseline_run_id: "ExperimentRunIdOrEmpty",
})

Response structure


resp.experiment.experiment_id #=> String
resp.experiment.experiment_arn #=> String
resp.experiment.name #=> String
resp.experiment.description #=> String
resp.experiment.target.name #=> String
resp.experiment.target.service_name #=> String
resp.experiment.target.environment #=> String
resp.experiment.target.definition.agent_core_runtime.runtime_arn #=> String
resp.experiment.target.definition.https_endpoint.base_url #=> String
resp.experiment.experiment_type #=> String, one of "DATASET"
resp.experiment.experiment_config.dataset.execution_role_arn #=> String
resp.experiment.experiment_config.dataset.results_log_group #=> String
resp.experiment.experiment_config.dataset.trace_log_groups #=> Array
resp.experiment.experiment_config.dataset.trace_log_groups[0] #=> String
resp.experiment.experiment_config.dataset.collect_trace_stats #=> Boolean
resp.experiment.run_count #=> Integer
resp.experiment.target_run_count #=> Integer
resp.experiment.latest_run.run_id #=> String
resp.experiment.latest_run.source #=> String, one of "REPORTED", "HOSTED"
resp.experiment.latest_run.status #=> String, one of "RUNNING", "STOPPING", "COMPLETED", "DID_NOT_FINISH"
resp.experiment.latest_run.status_reason #=> String, one of "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "RESULTS_WRITE_FAILED"
resp.experiment.latest_run.producer_kind #=> String, one of "SDK", "CUSTOM"
resp.experiment.latest_run.target_version #=> String
resp.experiment.latest_run.dataset_source #=> String, one of "AGENTCORE", "FILE", "OTHER"
resp.experiment.latest_run.dataset_id #=> String
resp.experiment.latest_run.dataset_name #=> String
resp.experiment.latest_run.dataset_version #=> String
resp.experiment.latest_run.rule_name #=> String
resp.experiment.latest_run.rule_content_hash #=> String
resp.experiment.latest_run. #=> Hash
resp.experiment.latest_run.["RunMetadataMapKeyString"] #=> String
resp.experiment.latest_run.description #=> String
resp.experiment.latest_run.trace_stats.status #=> String, one of "PENDING", "AVAILABLE", "UNAVAILABLE"
resp.experiment.latest_run.trace_stats.status_reason #=> String, one of "NO_TRACES", "SPANS_NOT_FOUND", "ACCESS_DENIED", "SCAN_LIMIT", "QUERY_FAILED", "INTERNAL_ERROR"
resp.experiment.latest_run.trace_stats.cases_read #=> Integer
resp.experiment.latest_run.trace_stats.sampled #=> Boolean
resp.experiment.latest_run.trace_stats.cases_with_spans #=> Integer
resp.experiment.latest_run.trace_stats.attributes #=> Array
resp.experiment.latest_run.trace_stats.attributes[0].name #=> String, one of "MODEL", "TOOL_NAME", "SYSTEM_INSTRUCTIONS"
resp.experiment.latest_run.trace_stats.attributes[0].version #=> Integer
resp.experiment.latest_run.trace_stats.attributes[0].distinct #=> Integer
resp.experiment.latest_run.trace_stats.attributes[0].values_hash #=> String
resp.experiment.latest_run.trace_stats.attributes[0].values #=> Array
resp.experiment.latest_run.trace_stats.attributes[0].values[0].value #=> String
resp.experiment.latest_run.trace_stats.attributes[0].values[0].cases #=> Integer
resp.experiment.latest_run.trace_stats.metrics #=> Array
resp.experiment.latest_run.trace_stats.metrics[0].name #=> String, one of "MODEL_CALLS", "TOOL_CALLS", "INPUT_TOKENS", "OUTPUT_TOKENS", "TURN_LATENCY_MS", "FAILED"
resp.experiment.latest_run.trace_stats.metrics[0].version #=> Integer
resp.experiment.latest_run.trace_stats.metrics[0].count #=> Integer
resp.experiment.latest_run.trace_stats.metrics[0].mean #=> Float
resp.experiment.latest_run.trace_stats.metrics[0].p50 #=> Float
resp.experiment.latest_run.trace_stats.metrics[0].p90 #=> Float
resp.experiment.latest_run.trace_stats.computed_at #=> Time
resp.experiment.latest_run.verdict #=> String, one of "PASSED", "FAILED", "DID_NOT_FINISH"
resp.experiment.latest_run.verdict_reason_code #=> String, one of "PASSED", "NOT_SCORED_RATE_ABOVE_MAX", "PASS_RATE_BELOW_MIN", "AVERAGE_BELOW_MIN", "AVERAGE_ABOVE_MAX", "STOPPED", "RUNNER_FAILED", "RESULTS_WRITE_DENIED", "INTERNAL_ERROR", "BELOW_CONTROL", "REGRESSED_CASES_ABOVE_MAX", "FIXED_CASES_BELOW_MIN", "UNPAIRED_CASE_RATE_ABOVE_MAX", "SCORE_REGRESSED", "CONTROL_DID_NOT_FINISH", "RESULTS_WRITE_FAILED"
resp.experiment.latest_run.verdict_reason #=> String
resp.experiment.latest_run.pass_rate #=> Float
resp.experiment.latest_run.control_pass_rate #=> Float
resp.experiment.latest_run.role #=> String, one of "TARGET", "CONTROL"
resp.experiment.latest_run.control_run_id #=> String
resp.experiment.latest_run.cases_total #=> Integer
resp.experiment.latest_run.passed #=> Integer
resp.experiment.latest_run.created_at #=> Time
resp.experiment.latest_run.completed_at #=> Time
resp.experiment.baseline_run_id #=> String
resp.experiment.created_at #=> Time
resp.experiment.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :experiment_id (required, String) —

    The ID of the experiment to update.

  • :name (String) —

    A new name for the experiment. Omit to leave unchanged.

  • :description (String) —

    A new description of the experiment. Omit to leave unchanged; an empty string clears it.

  • :experiment_config (Types::ExperimentConfig) —

    A new configuration for the experiment. Omit to leave unchanged. Replaces the configuration in full, and its member must match the experiment's type: a DATASET experiment takes only experimentConfig.dataset. The configuration is validated as in CreateExperiment: a new execution role requires iam:PassRole, the role must be assumable, and the results log group must exist and use the Standard log class. Applies to runs started after the update.

  • :baseline_run_id (String) —

    The ID of the run to make the experiment's baseline. Omit to leave unchanged; an empty string clears it. The run must be a COMPLETED target run of this experiment. A live control's run is rejected whether or not it has ended, but a run used as another run's historical control is a target run and is accepted. Otherwise fails with a ValidationException. Deleting the baseline run clears the baseline.

Returns:

See Also:



10680
10681
10682
10683
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 10680

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

#update_integration(params = {}) ⇒ Types::UpdateIntegrationOutput

Updates an existing integration, identified by its id, ARN, or name. Only the fields you provide are changed.

Examples:

Example: Update an integration's attributes


# The following example replaces the provider-specific attributes of the integration identified by its id. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.update_integration({
  identifier: {
    integration_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
  }, 
  integration_attributes: {
    "notificationChannel" => "ops-oncall", 
  }, 
})

resp.to_h outputs the following:
{
  integration: {
    name: "my-aws-integration", 
    created_at: Time.parse("2026-09-16T00:03:00Z"), 
    integration_arn: "arn:aws:cloudwatch:us-east-1:123456789012:integration/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    integration_attributes: {
      "notificationChannel" => "ops-oncall", 
    }, 
    integration_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    integration_type: "AWS_INTEGRATION", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-16T12:00:00Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.update_integration({
  identifier: { # required
    integration_id: "String",
    integration_arn: "IntegrationArn",
    integration_name: "String",
  },
  credential: {
    oauth_code_credential: {
      auth_code: "OAuthCodeCredentialAuthCodeString", # required
    },
    oauth_client_credential: {
      client_id: "String", # required
      client_secret: "SensitiveString", # required
      provider_id: "String",
    },
    api_key_credential: {
      api_key_value: "ApiKeyCredentialApiKeyValueString", # required
    },
  },
  integration_attributes: {
    "StringMapKeyString" => "StringMapValueString",
  },
  role_arn: "String",
})

Response structure


resp.integration.integration_id #=> String
resp.integration.integration_arn #=> String
resp.integration.integration_type #=> String, one of "AWS_CONFIG_SLREC", "AWS_CONFIG_AZURE_SLREC", "GITHUB", "SLACK", "EXTERNAL_AGENT", "AWS_INTEGRATION", "PAGERDUTY", "GITHUB_ENTERPRISE"
resp.integration.name #=> String
resp.integration.status #=> String, one of "ACTIVE", "DELETED", "PENDING", "PENDING_OAUTH", "ERROR", "FAILED"
resp.integration.auth_type #=> String, one of "NONE", "OAUTH2", "API_KEY"
resp.integration.credential_arn #=> String
resp.integration.role_arn #=> String
resp.integration.integration_attributes #=> Hash
resp.integration.integration_attributes["StringMapKeyString"] #=> String
resp.integration.authorization_url #=> String
resp.integration.error_message #=> String
resp.integration.created_at #=> Time
resp.integration.updated_at #=> Time
resp.integration.scope #=> String, one of "ACCOUNT", "ORGANIZATION"

Parameters:

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

    ({})

Options Hash (params):

  • :identifier (required, Types::IntegrationIdentifier) —

    Identifies the integration to update — exactly one of integrationId, integrationArn, or integrationName.

  • :credential (Types::IntegrationCredential) —

    The replacement credential used to authenticate with the provider.

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

    The provider-specific attributes to associate with the integration.

  • :role_arn (String) —

    The Amazon Resource Name of the IAM role assumed to access the integration.

Returns:

See Also:



10786
10787
10788
10789
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 10786

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

#update_lookup(params = {}) ⇒ Types::UpdateLookupResponse

Replaces a lookup table's content, its description, or both.

Only the fields you provide are changed. Replacing the content replaces every row: there is no partial row update.

Examples:

Example: Replace a lookup table's content


# The following example replaces every row of a lookup table. The omitted description is left unchanged. Call GetLookup to
# read the table's metadata after the update. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.update_lookup({
  body: "service,team\ncheckout,payments\nsearch,discovery\ncatalog,retail\n", 
  identifier: "3k7f2m9qx4pd8w1n6v0b5j2tz", 
})

resp.to_h outputs the following:
{
  arn: "arn:aws:cloudwatch:us-east-1:123456789012:lookup/service_owners/3k7f2m9qx4pd8w1n6v0b5j2tz", 
  updated_at: Time.parse("2026-10-20T16:04:09Z"), 
}

Request syntax with placeholder values


resp = client.update_lookup({
  identifier: "LookupIdentifier", # required
  description: "LookupDescription",
  body: "LookupBody",
  query_id: "LookupQueryId",
  kms_key_arn: "KmsKeyArn",
})

Response structure


resp.arn #=> String
resp.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :identifier (required, String) —

    The id of the lookup table to update.

  • :description (String) —

    The new description of the lookup table. Omit to leave the description unchanged, or supply an empty string to remove it, leaving the table with no description.

  • :body (String) —

    The replacement CSV content of the lookup table. Omit to leave the content unchanged. At most one of body and queryId may be specified.

  • :query_id (String) —

    The identifier of a query whose results become the lookup table's content.

  • :kms_key_arn (String) —

    The ARN of a customer managed KMS key used to encrypt the lookup table's content.

Returns:

See Also:



10857
10858
10859
10860
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 10857

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

#update_omni_dashboard(params = {}) ⇒ Types::UpdateOmniDashboardOutput

Updates an existing dashboard within a space.

Only the provided fields are changed; omitted fields are left unchanged.

Examples:

Example: Update a dashboard body


# The following example updates only the body of a dashboard; the name and description are left unchanged. Payloads are
# shown as JSON; on the wire they are CBOR-encoded.

resp = client.update_omni_dashboard({
  body: "{\"panels\":[{\"type\":\"markdown\",\"title\":\"Overview\",\"layout\":{\"x\":0,\"y\":0,\"w\":60,\"h\":120},\"config\":{\"content\":\"Service health for OrderProcessor.\"}},{\"type\":\"divider\",\"title\":\"Errors\",\"layout\":{\"x\":0,\"y\":120,\"w\":60,\"h\":40}},{\"type\":\"explore\",\"title\":\"Lambda errors (5-minute rate)\",\"layout\":{\"x\":0,\"y\":160,\"w\":60,\"h\":400},\"config\":{\"queries\":[{\"queryId\":\"A\",\"queryLanguage\":\"promql\",\"queryString\":\"sum(rate(aws_lambda_errors_sum{function_name=\\\"OrderProcessor\\\"}[5m]))\"}],\"visualization\":\"line\"}}]}", 
  dashboard_id: "c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  omni_dashboard: {
    name: "service-health-overview", 
    arn: "arn:aws:cloudwatch:us-east-1:123456789012:omni-dashboard/c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
    body: "{\"panels\":[{\"type\":\"markdown\",\"title\":\"Overview\",\"layout\":{\"x\":0,\"y\":0,\"w\":60,\"h\":120},\"config\":{\"content\":\"Service health for OrderProcessor.\"}},{\"type\":\"divider\",\"title\":\"Errors\",\"layout\":{\"x\":0,\"y\":120,\"w\":60,\"h\":40}},{\"type\":\"explore\",\"title\":\"Lambda errors (5-minute rate)\",\"layout\":{\"x\":0,\"y\":160,\"w\":60,\"h\":400},\"config\":{\"queries\":[{\"queryId\":\"A\",\"queryLanguage\":\"promql\",\"queryString\":\"sum(rate(aws_lambda_errors_sum{function_name=\\\"OrderProcessor\\\"}[5m]))\"}],\"visualization\":\"line\"}}]}", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    created_by: "arn:aws:iam::123456789012:role/ObservabilityAdmin", 
    dashboard_id: "c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f", 
    description: "Overview of service health metrics.", 
    tags: {
      "Team" => "observability", 
    }, 
    updated_at: Time.parse("2026-09-17T09:11:52Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.update_omni_dashboard({
  space_id: "SpaceId", # required
  dashboard_id: "DashboardId", # required
  body: "UpdateOmniDashboardInputBodyString",
  name: "UpdateOmniDashboardInputNameString",
  description: "UpdateOmniDashboardInputDescriptionString",
})

Response structure


resp.omni_dashboard.dashboard_id #=> String
resp.omni_dashboard.arn #=> String
resp.omni_dashboard.name #=> String
resp.omni_dashboard.body #=> String
resp.omni_dashboard.created_by #=> String
resp.omni_dashboard.description #=> String
resp.omni_dashboard.tags #=> Hash
resp.omni_dashboard.tags["TagKey"] #=> String
resp.omni_dashboard.created_at #=> Time
resp.omni_dashboard.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space.

  • :dashboard_id (required, String) —

    The unique ID of the dashboard.

  • :body (String) —

    The new dashboard definition, as a JSON document. Maximum 1 MiB. Omit to leave unchanged.

  • :name (String) —

    A new name for the dashboard. Omit to leave unchanged.

  • :description (String) —

    A new description of the dashboard. Omit to leave unchanged.

Returns:

See Also:



10943
10944
10945
10946
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 10943

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

#update_omni_slo(params = {}) ⇒ Struct

Updates an existing SLO.

Omitted members are left unchanged, and a member that is present replaces that block whole, so read the SLO, change it, and write it back. Changing the SLI starts a new revision, which restarts the window totals.

Examples:

Example: Lower the target of an SLO


# The following example lowers the target of an SLO from 99.9 to 99.5 percent. A supplied objective is replaced whole, so
# the warning ratio and the time window to keep are sent again. The SLI is not changed, so no new revision starts and the
# error budget is recomputed from the stored window totals. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.update_omni_slo({
  objective: {
    target: 99.5, 
    time_window: {
      rolling: {
        days: 30, 
      }, 
    }, 
    warning_budget_consumed_ratio: 0.75, 
  }, 
  slo_id: "9f8e7d6c5b4a49382716051a2b3c4d5e", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
}

Example: Change the SLI of an SLO


# The following example changes the good condition of a time-slice SLI to a p99 latency of at most 250 milliseconds. A
# supplied SLI is replaced whole, so the period length and the query are sent again. Changing the SLI starts a new
# revision, and the window totals restart. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.update_omni_slo({
  sli: {
    periods: {
      good: {
        comparator: "LTE", 
        threshold: 0.25, 
      }, 
      period_minutes: 1, 
      query: {
        expression: "histogram_quantile(0.99, sum by (le) (rate({\"http.server.request.duration_bucket\", \"service.name\"=\"checkout-api\"}[$__interval])))", 
        language: "PROMQL", 
      }, 
    }, 
  }, 
  slo_id: "7a6b5c4d3e2f41a0b9c8d7e6f5a4b3c2", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
}

Request syntax with placeholder values


resp = client.update_omni_slo({
  space_id: "SpaceId", # required
  slo_id: "SloId", # required
  name: "SloName",
  description: "SloDescription",
  service_attributes: {
    service_name: "SloServiceAttributeValue", # required
    service_namespace: "SloServiceAttributeValue",
    cloud_provider: "SloServiceAttributeValue",
    cloud_account_id: "SloServiceAttributeValue",
    cloud_region: "SloServiceAttributeValue",
    deployment_environment_name: "SloServiceAttributeValue",
  },
  sli: {
    events: {
      bad: {
        language: "SQL", # required, accepts SQL, PROMQL
        expression: "AlertRuleQueryExpressionString", # required
      },
      good: {
        language: "SQL", # required, accepts SQL, PROMQL
        expression: "AlertRuleQueryExpressionString", # required
      },
      total: { # required
        language: "SQL", # required, accepts SQL, PROMQL
        expression: "AlertRuleQueryExpressionString", # required
      },
    },
    periods: {
      period_minutes: 1,
      query: { # required
        language: "SQL", # required, accepts SQL, PROMQL
        expression: "AlertRuleQueryExpressionString", # required
      },
      good: {
        comparator: "GT", # required, accepts GT, LT, GTE, LTE
        threshold: 1.0, # required
      },
      bad: {
        comparator: "GT", # required, accepts GT, LT, GTE, LTE
        threshold: 1.0, # required
      },
    },
  },
  objective: {
    target: 1.0, # required
    warning_budget_consumed_ratio: 1.0,
    time_window: { # required
      rolling: {
        days: 1, # required
      },
      calendar: {
        unit: "WEEK", # required, accepts WEEK, MONTH
        week_start_day: "MONDAY", # accepts MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
        time_zone: "String",
      },
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space that owns the SLO.

  • :slo_id (required, String) —

    The SLO to update.

  • :name (String) —

    A new display name. Renaming never changes the sloId or the ARN.

  • :description (String) —

    A new description.

  • :service_attributes (Types::SloServiceAttributes) —

    Replaces the whole service attributes block, so resend every member to keep. Omit it to leave the stored attributes unchanged.

  • :sli (Types::Sli) —

    Replaces the whole SLI. Starts a new revision.

  • :objective (Types::SloObjective) —

    Replaces the whole objective, including the time window, so resend every member to keep. The error budget is recomputed from the stored window totals; no new revision starts.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



11100
11101
11102
11103
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 11100

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

#update_space(params = {}) ⇒ Types::UpdateSpaceOutput

Updates a space.

Only the provided fields are changed; omitted fields are left unchanged.

Examples:

Example: Rename a space


# The following example updates only the name of a space; omitted fields are left unchanged. The response returns the full
# space with a later updatedAt timestamp. Payloads are shown as JSON; on the wire they are CBOR-encoded.

resp = client.update_space({
  name: "prod-observability-team", 
  space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
})

resp.to_h outputs the following:
{
  space: {
    name: "prod-observability-team", 
    agent_core_evaluation_role_arn: "arn:aws:iam::123456789012:role/CloudWatchAgentCoreEvaluationRole", 
    created_at: Time.parse("2026-09-16T14:22:31Z"), 
    data_access_role_arn: "arn:aws:iam::123456789012:role/CloudWatchSpaceDataAccessRole", 
    domain_arn: "arn:aws:cloudwatch:us-east-1:123456789012:domain/d-1a2b3c4d5e", 
    encryption_configuration: {
      encryption_strategy: "CUSTOMER_MANAGED", 
      kms_key_arn: "arn:aws:kms:us-east-1:123456789012:key/1a2b3c4d-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    }, 
    owner_account_id: "123456789012", 
    region: "us-east-1", 
    space_arn: "arn:aws:cloudwatch:us-east-1:123456789012:space/a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    space_id: "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d", 
    status: "ACTIVE", 
    updated_at: Time.parse("2026-09-17T09:11:52Z"), 
  }, 
}

Request syntax with placeholder values


resp = client.update_space({
  space_id: "SpaceId", # required
  identity_center_configuration: {
    region: "RegionName", # required
  },
  name: "UpdateSpaceInputNameString",
  agent_core_evaluation_role_arn: "Arn",
  encryption_configuration: {
    encryption_strategy: "AWS_OWNED", # required, accepts AWS_OWNED, CUSTOMER_MANAGED
    kms_key_arn: "KmsKeyArn",
  },
})

Response structure


resp.space.space_id #=> String
resp.space.name #=> String
resp.space.space_arn #=> String
resp.space.domain_arn #=> String
resp.space.region #=> String
resp.space.identity_center_configuration.region #=> String
resp.space. #=> String
resp.space.data_access_role_arn #=> String
resp.space.created_at #=> Time
resp.space.updated_at #=> Time
resp.space.agent_core_evaluation_role_arn #=> String
resp.space.status #=> String, one of "ACTIVE", "SUSPENDED", "MOVING"
resp.space.status_reason #=> String
resp.space.encryption_configuration.encryption_strategy #=> String, one of "AWS_OWNED", "CUSTOMER_MANAGED"
resp.space.encryption_configuration.kms_key_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :space_id (required, String) —

    The unique ID of the space to update.

  • :identity_center_configuration (Types::SpaceIdentityCenterConfiguration) —

    Identity Center settings for this space. Omit to leave the configuration unchanged.

  • :name (String) —

    A new name for the space. Omit to leave unchanged. Must be 3-64 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.

  • :agent_core_evaluation_role_arn (String) —

    The ARN of the IAM role used by AgentCore online evaluation. Must be in the caller's account. Omit if the space does not use AgentCore online evaluation.

  • :encryption_configuration (Types::EncryptionConfiguration) —

    How to encrypt the space's data at rest. Omit to leave encryption unchanged. Pass encryptionStrategy AWS_OWNED to stop using a customer managed key and revert to service owned encryption.

Returns:

See Also:



11205
11206
11207
11208
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 11205

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

#update_view(params = {}) ⇒ Types::UpdateViewResponse

Updates an existing view's definition and/or description.

Only the fields you provide are changed. Managed views cannot be updated.

Examples:

Example: Update a view's definition


# The following example changes only the definition; the omitted description is left unchanged. Managed views cannot be
# updated. The response carries the view's effective configuration. Payloads are shown as JSON; on the wire they are
# CBOR-encoded.

resp = client.update_view({
  name: "view.service_errors", 
  definition: "SELECT resource['attributes']['service.name'] AS service, COUNT(*) AS error_count FROM \"logs.default\" WHERE status['code'] IN ('2', 'ERROR') GROUP BY service", 
})

resp.to_h outputs the following:
{
  name: "view.service_errors", 
  type: "USER", 
  arn: "arn:aws:cloudwatch:us-east-1:123456789012:view/view.service_errors", 
  created_at: Time.parse("2026-09-16T14:22:31Z"), 
  definition: "SELECT resource['attributes']['service.name'] AS service, COUNT(*) AS error_count FROM \"logs.default\" WHERE status['code'] IN ('2', 'ERROR') GROUP BY service", 
  description: "Error counts by service", 
  updated_at: Time.parse("2026-09-17T09:11:52Z"), 
}

Request syntax with placeholder values


resp = client.update_view({
  name: "ViewName", # required
  definition: "ViewDefinition",
  description: "ViewDescription",
})

Response structure


resp.name #=> String
resp.type #=> String, one of "USER", "MANAGED"
resp.description #=> String
resp.definition #=> String
resp.created_at #=> Time
resp.updated_at #=> Time
resp.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String) —

    The name of the view to update.

  • :definition (String) —

    The new SQL query that defines the view. Omit to leave unchanged.

  • :description (String) —

    The new description of the view. Omit to leave unchanged.

Returns:

See Also:



11279
11280
11281
11282
# File 'gems/aws-sdk-cloudwatchomni/lib/aws-sdk-cloudwatchomni/client.rb', line 11279

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