Class: Aws::LookoutMetrics::Client

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

Overview

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

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

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

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an 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, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.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::InstanceProfileCredentails 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)
  • :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.

  • :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.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :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.

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

    The log formatter.

  • :log_level (Symbol) — default: :info

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

  • :logger (Logger)

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

  • :max_attempts (Integer) — default: 3

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

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

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

  • :retry_backoff (Proc)

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

  • :retry_base_delay (Float) — default: 0.3

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

  • :retry_jitter (Symbol) — default: :none

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

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

  • :retry_limit (Integer) — default: 3

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

  • :retry_max_delay (Integer) — default: 0

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

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

    Specifies which retry algorithm to use. Values are:

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

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

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

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

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

  • :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.

  • :http_proxy (URI::HTTP, String)

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

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. 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_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_wire_trace (Boolean) — default: false

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

  • :ssl_verify_peer (Boolean) — default: true

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

  • :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.



335
336
337
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 335

def initialize(*args)
  super
end

Instance Method Details

#activate_anomaly_detector(params = {}) ⇒ Struct

Activates an anomaly detector.

Examples:

Request syntax with placeholder values


resp = client.activate_anomaly_detector({
  anomaly_detector_arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (required, String)

    The ARN of the anomaly detector.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



358
359
360
361
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 358

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

#back_test_anomaly_detector(params = {}) ⇒ Struct

Runs a backtest for anomaly detection for the specified resource.

Examples:

Request syntax with placeholder values


resp = client.back_test_anomaly_detector({
  anomaly_detector_arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (required, String)

    The Amazon Resource Name (ARN) of the anomaly detector.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



380
381
382
383
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 380

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

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

Creates an alert for an anomaly detector.

Examples:

Request syntax with placeholder values


resp = client.create_alert({
  alert_name: "AlertName", # required
  alert_sensitivity_threshold: 1, # required
  alert_description: "AlertDescription",
  anomaly_detector_arn: "Arn", # required
  action: { # required
    sns_configuration: {
      role_arn: "Arn", # required
      sns_topic_arn: "Arn", # required
    },
    lambda_configuration: {
      role_arn: "Arn", # required
      lambda_arn: "Arn", # required
    },
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.alert_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :alert_name (required, String)

    The name of the alert.

  • :alert_sensitivity_threshold (required, Integer)

    An integer from 0 to 100 specifying the alert sensitivity threshold.

  • :alert_description (String)

    A description of the alert.

  • :anomaly_detector_arn (required, String)

    The ARN of the detector to which the alert is attached.

  • :action (required, Types::Action)

    Action that will be triggered when there is an alert.

  • :tags (Hash<String,String>)

    A list of tags to apply to the alert.

Returns:

See Also:



443
444
445
446
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 443

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

#create_anomaly_detector(params = {}) ⇒ Types::CreateAnomalyDetectorResponse

Creates an anomaly detector.

Examples:

Request syntax with placeholder values


resp = client.create_anomaly_detector({
  anomaly_detector_name: "AnomalyDetectorName", # required
  anomaly_detector_description: "AnomalyDetectorDescription",
  anomaly_detector_config: { # required
    anomaly_detector_frequency: "P1D", # accepts P1D, PT1H, PT10M, PT5M
  },
  kms_key_arn: "KmsKeyArn",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.anomaly_detector_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_name (required, String)

    The name of the detector.

  • :anomaly_detector_description (String)

    A description of the detector.

  • :anomaly_detector_config (required, Types::AnomalyDetectorConfig)

    Contains information about the configuration of the anomaly detector.

  • :kms_key_arn (String)

    The ARN of the KMS key to use to encrypt your data.

  • :tags (Hash<String,String>)

    A list of tags to apply to the anomaly detector.

Returns:

See Also:



495
496
497
498
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 495

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

#create_metric_set(params = {}) ⇒ Types::CreateMetricSetResponse

Creates a dataset.

Examples:

Request syntax with placeholder values


resp = client.create_metric_set({
  anomaly_detector_arn: "Arn", # required
  metric_set_name: "MetricSetName", # required
  metric_set_description: "MetricSetDescription",
  metric_list: [ # required
    {
      metric_name: "ColumnName", # required
      aggregation_function: "AVG", # required, accepts AVG, SUM
      namespace: "Namespace",
    },
  ],
  offset: 1,
  timestamp_column: {
    column_name: "ColumnName",
    column_format: "DateTimeFormat",
  },
  dimension_list: ["ColumnName"],
  metric_set_frequency: "P1D", # accepts P1D, PT1H, PT10M, PT5M
  metric_source: { # required
    s3_source_config: {
      role_arn: "Arn", # required
      templated_path_list: ["TemplatedPath"],
      historical_data_path_list: ["HistoricalDataPath"],
      file_format_descriptor: {
        csv_format_descriptor: {
          file_compression: "NONE", # accepts NONE, GZIP
          charset: "Charset",
          contains_header: false,
          delimiter: "Delimiter",
          header_list: ["ColumnName"],
          quote_symbol: "QuoteSymbol",
        },
        json_format_descriptor: {
          file_compression: "NONE", # accepts NONE, GZIP
          charset: "Charset",
        },
      },
    },
    app_flow_config: {
      role_arn: "Arn", # required
      flow_name: "FlowName", # required
    },
    cloud_watch_config: {
      role_arn: "Arn", # required
    },
    rds_source_config: {
      db_instance_identifier: "RDSDatabaseIdentifier", # required
      database_host: "DatabaseHost", # required
      database_port: 1, # required
      secret_manager_arn: "PoirotSecretManagerArn", # required
      database_name: "RDSDatabaseName", # required
      table_name: "TableName", # required
      role_arn: "Arn", # required
      vpc_configuration: { # required
        subnet_id_list: ["SubnetId"], # required
        security_group_id_list: ["SecurityGroupId"], # required
      },
    },
    redshift_source_config: {
      cluster_identifier: "RedshiftClusterIdentifier", # required
      database_host: "DatabaseHost", # required
      database_port: 1, # required
      secret_manager_arn: "PoirotSecretManagerArn", # required
      database_name: "RedshiftDatabaseName", # required
      table_name: "TableName", # required
      role_arn: "Arn", # required
      vpc_configuration: { # required
        subnet_id_list: ["SubnetId"], # required
        security_group_id_list: ["SecurityGroupId"], # required
      },
    },
  },
  timezone: "Timezone",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.metric_set_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (required, String)

    The ARN of the anomaly detector that will use the dataset.

  • :metric_set_name (required, String)

    The name of the dataset.

  • :metric_set_description (String)

    A description of the dataset you are creating.

  • :metric_list (required, Array<Types::Metric>)

    A list of metrics that the dataset will contain.

  • :offset (Integer)

    After an interval ends, the amount of seconds that the detector waits before importing data. Offset is only supported for S3 and Redshift datasources.

  • :timestamp_column (Types::TimestampColumn)

    Contains information about the column used for tracking time in your source data.

  • :dimension_list (Array<String>)

    A list of the fields you want to treat as dimensions.

  • :metric_set_frequency (String)

    The frequency with which the source data will be analyzed for anomalies.

  • :metric_source (required, Types::MetricSource)

    Contains information about how the source data should be interpreted.

  • :timezone (String)

    The time zone in which your source data was recorded.

  • :tags (Hash<String,String>)

    A list of tags to apply to the dataset.

Returns:

See Also:



635
636
637
638
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 635

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

#delete_alert(params = {}) ⇒ Struct

Deletes an alert.

Examples:

Request syntax with placeholder values


resp = client.delete_alert({
  alert_arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :alert_arn (required, String)

    The ARN of the alert to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



657
658
659
660
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 657

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

#delete_anomaly_detector(params = {}) ⇒ Struct

Deletes a detector. Deleting an anomaly detector will delete all of its corresponding resources including any configured datasets and alerts.

Examples:

Request syntax with placeholder values


resp = client.delete_anomaly_detector({
  anomaly_detector_arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (required, String)

    The ARN of the detector to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



681
682
683
684
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 681

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

#describe_alert(params = {}) ⇒ Types::DescribeAlertResponse

Describes an alert.

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.

Examples:

Request syntax with placeholder values


resp = client.describe_alert({
  alert_arn: "Arn", # required
})

Response structure


resp.alert.action.sns_configuration.role_arn #=> String
resp.alert.action.sns_configuration.sns_topic_arn #=> String
resp.alert.action.lambda_configuration.role_arn #=> String
resp.alert.action.lambda_configuration.lambda_arn #=> String
resp.alert.alert_description #=> String
resp.alert.alert_arn #=> String
resp.alert.anomaly_detector_arn #=> String
resp.alert.alert_name #=> String
resp.alert.alert_sensitivity_threshold #=> Integer
resp.alert.alert_type #=> String, one of "SNS", "LAMBDA"
resp.alert.alert_status #=> String, one of "ACTIVE", "INACTIVE"
resp.alert.last_modification_time #=> Time
resp.alert.creation_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :alert_arn (required, String)

    The ARN of the alert to describe.

Returns:

See Also:



726
727
728
729
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 726

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

#describe_anomaly_detection_executions(params = {}) ⇒ Types::DescribeAnomalyDetectionExecutionsResponse

Returns information about the status of the specified anomaly detection jobs.

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

Examples:

Request syntax with placeholder values


resp = client.describe_anomaly_detection_executions({
  anomaly_detector_arn: "Arn", # required
  timestamp: "TimestampString",
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.execution_list #=> Array
resp.execution_list[0].timestamp #=> String
resp.execution_list[0].status #=> String, one of "PENDING", "IN_PROGRESS", "COMPLETED", "FAILED", "FAILED_TO_SCHEDULE"
resp.execution_list[0].failure_reason #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (required, String)

    The Amazon Resource Name (ARN) of the anomaly detector.

  • :timestamp (String)

    The timestamp of the anomaly detection job.

  • :max_results (Integer)

    The number of items to return in the response.

  • :next_token (String)

    Specify the pagination token that's returned by a previous request to retrieve the next page of results.

Returns:

See Also:



775
776
777
778
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 775

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

#describe_anomaly_detector(params = {}) ⇒ Types::DescribeAnomalyDetectorResponse

Describes a detector.

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.

Examples:

Request syntax with placeholder values


resp = client.describe_anomaly_detector({
  anomaly_detector_arn: "Arn", # required
})

Response structure


resp.anomaly_detector_arn #=> String
resp.anomaly_detector_name #=> String
resp.anomaly_detector_description #=> String
resp.anomaly_detector_config.anomaly_detector_frequency #=> String, one of "P1D", "PT1H", "PT10M", "PT5M"
resp.creation_time #=> Time
resp.last_modification_time #=> Time
resp.status #=> String, one of "ACTIVE", "ACTIVATING", "DELETING", "FAILED", "INACTIVE", "LEARNING", "BACK_TEST_ACTIVATING", "BACK_TEST_ACTIVE", "BACK_TEST_COMPLETE"
resp.failure_reason #=> String
resp.kms_key_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (required, String)

    The ARN of the detector to describe.

Returns:

See Also:



824
825
826
827
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 824

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

#describe_metric_set(params = {}) ⇒ Types::DescribeMetricSetResponse

Describes a dataset.

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.

Examples:

Request syntax with placeholder values


resp = client.describe_metric_set({
  metric_set_arn: "Arn", # required
})

Response structure


resp.metric_set_arn #=> String
resp.anomaly_detector_arn #=> String
resp.metric_set_name #=> String
resp.metric_set_description #=> String
resp.creation_time #=> Time
resp.last_modification_time #=> Time
resp.offset #=> Integer
resp.metric_list #=> Array
resp.metric_list[0].metric_name #=> String
resp.metric_list[0].aggregation_function #=> String, one of "AVG", "SUM"
resp.metric_list[0].namespace #=> String
resp.timestamp_column.column_name #=> String
resp.timestamp_column.column_format #=> String
resp.dimension_list #=> Array
resp.dimension_list[0] #=> String
resp.metric_set_frequency #=> String, one of "P1D", "PT1H", "PT10M", "PT5M"
resp.timezone #=> String
resp.metric_source.s3_source_config.role_arn #=> String
resp.metric_source.s3_source_config.templated_path_list #=> Array
resp.metric_source.s3_source_config.templated_path_list[0] #=> String
resp.metric_source.s3_source_config.historical_data_path_list #=> Array
resp.metric_source.s3_source_config.historical_data_path_list[0] #=> String
resp.metric_source.s3_source_config.file_format_descriptor.csv_format_descriptor.file_compression #=> String, one of "NONE", "GZIP"
resp.metric_source.s3_source_config.file_format_descriptor.csv_format_descriptor.charset #=> String
resp.metric_source.s3_source_config.file_format_descriptor.csv_format_descriptor.contains_header #=> Boolean
resp.metric_source.s3_source_config.file_format_descriptor.csv_format_descriptor.delimiter #=> String
resp.metric_source.s3_source_config.file_format_descriptor.csv_format_descriptor.header_list #=> Array
resp.metric_source.s3_source_config.file_format_descriptor.csv_format_descriptor.header_list[0] #=> String
resp.metric_source.s3_source_config.file_format_descriptor.csv_format_descriptor.quote_symbol #=> String
resp.metric_source.s3_source_config.file_format_descriptor.json_format_descriptor.file_compression #=> String, one of "NONE", "GZIP"
resp.metric_source.s3_source_config.file_format_descriptor.json_format_descriptor.charset #=> String
resp.metric_source.app_flow_config.role_arn #=> String
resp.metric_source.app_flow_config.flow_name #=> String
resp.metric_source.cloud_watch_config.role_arn #=> String
resp.metric_source.rds_source_config.db_instance_identifier #=> String
resp.metric_source.rds_source_config.database_host #=> String
resp.metric_source.rds_source_config.database_port #=> Integer
resp.metric_source.rds_source_config.secret_manager_arn #=> String
resp.metric_source.rds_source_config.database_name #=> String
resp.metric_source.rds_source_config.table_name #=> String
resp.metric_source.rds_source_config.role_arn #=> String
resp.metric_source.rds_source_config.vpc_configuration.subnet_id_list #=> Array
resp.metric_source.rds_source_config.vpc_configuration.subnet_id_list[0] #=> String
resp.metric_source.rds_source_config.vpc_configuration.security_group_id_list #=> Array
resp.metric_source.rds_source_config.vpc_configuration.security_group_id_list[0] #=> String
resp.metric_source.redshift_source_config.cluster_identifier #=> String
resp.metric_source.redshift_source_config.database_host #=> String
resp.metric_source.redshift_source_config.database_port #=> Integer
resp.metric_source.redshift_source_config.secret_manager_arn #=> String
resp.metric_source.redshift_source_config.database_name #=> String
resp.metric_source.redshift_source_config.table_name #=> String
resp.metric_source.redshift_source_config.role_arn #=> String
resp.metric_source.redshift_source_config.vpc_configuration.subnet_id_list #=> Array
resp.metric_source.redshift_source_config.vpc_configuration.subnet_id_list[0] #=> String
resp.metric_source.redshift_source_config.vpc_configuration.security_group_id_list #=> Array
resp.metric_source.redshift_source_config.vpc_configuration.security_group_id_list[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :metric_set_arn (required, String)

    The ARN of the dataset.

Returns:

See Also:



924
925
926
927
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 924

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

#get_anomaly_group(params = {}) ⇒ Types::GetAnomalyGroupResponse

Returns details about a group of anomalous metrics.

Examples:

Request syntax with placeholder values


resp = client.get_anomaly_group({
  anomaly_group_id: "UUID", # required
  anomaly_detector_arn: "Arn", # required
})

Response structure


resp.anomaly_group.start_time #=> String
resp.anomaly_group.end_time #=> String
resp.anomaly_group.anomaly_group_id #=> String
resp.anomaly_group.anomaly_group_score #=> Float
resp.anomaly_group.primary_metric_name #=> String
resp.anomaly_group.metric_level_impact_list #=> Array
resp.anomaly_group.metric_level_impact_list[0].metric_name #=> String
resp.anomaly_group.metric_level_impact_list[0].num_time_series #=> Integer
resp.anomaly_group.metric_level_impact_list[0].contribution_matrix.dimension_contribution_list #=> Array
resp.anomaly_group.metric_level_impact_list[0].contribution_matrix.dimension_contribution_list[0].dimension_name #=> String
resp.anomaly_group.metric_level_impact_list[0].contribution_matrix.dimension_contribution_list[0].dimension_value_contribution_list #=> Array
resp.anomaly_group.metric_level_impact_list[0].contribution_matrix.dimension_contribution_list[0].dimension_value_contribution_list[0].dimension_value #=> String
resp.anomaly_group.metric_level_impact_list[0].contribution_matrix.dimension_contribution_list[0].dimension_value_contribution_list[0].contribution_score #=> Float

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_group_id (required, String)

    The ID of the anomaly group.

  • :anomaly_detector_arn (required, String)

    The Amazon Resource Name (ARN) of the anomaly detector.

Returns:

See Also:



968
969
970
971
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 968

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

#get_feedback(params = {}) ⇒ Types::GetFeedbackResponse

Get feedback for an anomaly group.

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

Examples:

Request syntax with placeholder values


resp = client.get_feedback({
  anomaly_detector_arn: "Arn", # required
  anomaly_group_time_series_feedback: { # required
    anomaly_group_id: "UUID", # required
    time_series_id: "TimeSeriesId",
  },
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.anomaly_group_time_series_feedback #=> Array
resp.anomaly_group_time_series_feedback[0].time_series_id #=> String
resp.anomaly_group_time_series_feedback[0].is_anomaly #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (required, String)

    The Amazon Resource Name (ARN) of the anomaly detector.

  • :anomaly_group_time_series_feedback (required, Types::AnomalyGroupTimeSeries)

    The anomalous metric and group ID.

  • :max_results (Integer)

    The maximum number of results to return.

  • :next_token (String)

    Specify the pagination token that's returned by a previous request to retrieve the next page of results.

Returns:

See Also:



1018
1019
1020
1021
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1018

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

#get_sample_data(params = {}) ⇒ Types::GetSampleDataResponse

Returns a selection of sample records from an Amazon S3 datasource.

Examples:

Request syntax with placeholder values


resp = client.get_sample_data({
  s3_source_config: {
    role_arn: "Arn", # required
    templated_path_list: ["TemplatedPath"],
    historical_data_path_list: ["HistoricalDataPath"],
    file_format_descriptor: { # required
      csv_format_descriptor: {
        file_compression: "NONE", # accepts NONE, GZIP
        charset: "Charset",
        contains_header: false,
        delimiter: "Delimiter",
        header_list: ["ColumnName"],
        quote_symbol: "QuoteSymbol",
      },
      json_format_descriptor: {
        file_compression: "NONE", # accepts NONE, GZIP
        charset: "Charset",
      },
    },
  },
})

Response structure


resp.header_values #=> Array
resp.header_values[0] #=> String
resp.sample_rows #=> Array
resp.sample_rows[0] #=> Array
resp.sample_rows[0][0] #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



1069
1070
1071
1072
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1069

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

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

Lists the alerts attached to a detector.

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.

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

Examples:

Request syntax with placeholder values


resp = client.list_alerts({
  anomaly_detector_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.alert_summary_list #=> Array
resp.alert_summary_list[0].alert_arn #=> String
resp.alert_summary_list[0].anomaly_detector_arn #=> String
resp.alert_summary_list[0].alert_name #=> String
resp.alert_summary_list[0].alert_sensitivity_threshold #=> Integer
resp.alert_summary_list[0].alert_type #=> String, one of "SNS", "LAMBDA"
resp.alert_summary_list[0].alert_status #=> String, one of "ACTIVE", "INACTIVE"
resp.alert_summary_list[0].last_modification_time #=> Time
resp.alert_summary_list[0].creation_time #=> Time
resp.alert_summary_list[0].tags #=> Hash
resp.alert_summary_list[0].tags["TagKey"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (String)

    The ARN of the alert's detector.

  • :next_token (String)

    If the result of the previous request is truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

  • :max_results (Integer)

    The maximum number of results that will be displayed by the request.

Returns:

See Also:



1126
1127
1128
1129
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1126

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

#list_anomaly_detectors(params = {}) ⇒ Types::ListAnomalyDetectorsResponse

Lists the detectors in the current AWS Region.

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.

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

Examples:

Request syntax with placeholder values


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

Response structure


resp.anomaly_detector_summary_list #=> Array
resp.anomaly_detector_summary_list[0].anomaly_detector_arn #=> String
resp.anomaly_detector_summary_list[0].anomaly_detector_name #=> String
resp.anomaly_detector_summary_list[0].anomaly_detector_description #=> String
resp.anomaly_detector_summary_list[0].creation_time #=> Time
resp.anomaly_detector_summary_list[0].last_modification_time #=> Time
resp.anomaly_detector_summary_list[0].status #=> String, one of "ACTIVE", "ACTIVATING", "DELETING", "FAILED", "INACTIVE", "LEARNING", "BACK_TEST_ACTIVATING", "BACK_TEST_ACTIVE", "BACK_TEST_COMPLETE"
resp.anomaly_detector_summary_list[0].tags #=> Hash
resp.anomaly_detector_summary_list[0].tags["TagKey"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return.

  • :next_token (String)

    If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

Returns:

See Also:



1177
1178
1179
1180
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1177

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

#list_anomaly_group_summaries(params = {}) ⇒ Types::ListAnomalyGroupSummariesResponse

Returns a list of anomaly groups.

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

Examples:

Request syntax with placeholder values


resp = client.list_anomaly_group_summaries({
  anomaly_detector_arn: "Arn", # required
  sensitivity_threshold: 1, # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.anomaly_group_summary_list #=> Array
resp.anomaly_group_summary_list[0].start_time #=> String
resp.anomaly_group_summary_list[0].end_time #=> String
resp.anomaly_group_summary_list[0].anomaly_group_id #=> String
resp.anomaly_group_summary_list[0].anomaly_group_score #=> Float
resp.anomaly_group_summary_list[0].primary_metric_name #=> String
resp.anomaly_group_statistics.evaluation_start_date #=> String
resp.anomaly_group_statistics.total_count #=> Integer
resp.anomaly_group_statistics.itemized_metric_stats_list #=> Array
resp.anomaly_group_statistics.itemized_metric_stats_list[0].metric_name #=> String
resp.anomaly_group_statistics.itemized_metric_stats_list[0].occurrence_count #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (required, String)

    The Amazon Resource Name (ARN) of the anomaly detector.

  • :sensitivity_threshold (required, Integer)

    The minimum severity score for inclusion in the output.

  • :max_results (Integer)

    The maximum number of results to return.

  • :next_token (String)

    Specify the pagination token that's returned by a previous request to retrieve the next page of results.

Returns:

See Also:



1233
1234
1235
1236
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1233

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

#list_anomaly_group_time_series(params = {}) ⇒ Types::ListAnomalyGroupTimeSeriesResponse

Gets a list of anomalous metrics for a measure in an anomaly group.

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

Examples:

Request syntax with placeholder values


resp = client.list_anomaly_group_time_series({
  anomaly_detector_arn: "Arn", # required
  anomaly_group_id: "UUID", # required
  metric_name: "MetricName", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.anomaly_group_id #=> String
resp.metric_name #=> String
resp.timestamp_list #=> Array
resp.timestamp_list[0] #=> String
resp.next_token #=> String
resp.time_series_list #=> Array
resp.time_series_list[0].time_series_id #=> String
resp.time_series_list[0].dimension_list #=> Array
resp.time_series_list[0].dimension_list[0].dimension_name #=> String
resp.time_series_list[0].dimension_list[0].dimension_value #=> String
resp.time_series_list[0].metric_value_list #=> Array
resp.time_series_list[0].metric_value_list[0] #=> Float

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (required, String)

    The Amazon Resource Name (ARN) of the anomaly detector.

  • :anomaly_group_id (required, String)

    The ID of the anomaly group.

  • :metric_name (required, String)

    The name of the measure field.

  • :max_results (Integer)

    The maximum number of results to return.

  • :next_token (String)

    Specify the pagination token that's returned by a previous request to retrieve the next page of results.

Returns:

See Also:



1295
1296
1297
1298
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1295

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

#list_metric_sets(params = {}) ⇒ Types::ListMetricSetsResponse

Lists the datasets in the current AWS Region.

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource immediately after creating or modifying it, use retries to allow time for the write operation to complete.

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

Examples:

Request syntax with placeholder values


resp = client.list_metric_sets({
  anomaly_detector_arn: "Arn",
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.metric_set_summary_list #=> Array
resp.metric_set_summary_list[0].metric_set_arn #=> String
resp.metric_set_summary_list[0].anomaly_detector_arn #=> String
resp.metric_set_summary_list[0].metric_set_description #=> String
resp.metric_set_summary_list[0].metric_set_name #=> String
resp.metric_set_summary_list[0].creation_time #=> Time
resp.metric_set_summary_list[0].last_modification_time #=> Time
resp.metric_set_summary_list[0].tags #=> Hash
resp.metric_set_summary_list[0].tags["TagKey"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (String)

    The ARN of the anomaly detector containing the metrics sets to list.

  • :max_results (Integer)

    The maximum number of results to return.

  • :next_token (String)

    If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

Returns:

See Also:



1350
1351
1352
1353
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1350

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

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

Gets a list of tags for a detector, dataset, or alert.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The resource's Amazon Resource Name (ARN).

Returns:

See Also:



1383
1384
1385
1386
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1383

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

#put_feedback(params = {}) ⇒ Struct

Add feedback for an anomalous metric.

Examples:

Request syntax with placeholder values


resp = client.put_feedback({
  anomaly_detector_arn: "Arn", # required
  anomaly_group_time_series_feedback: { # required
    anomaly_group_id: "UUID", # required
    time_series_id: "TimeSeriesId", # required
    is_anomaly: false, # required
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (required, String)

    The Amazon Resource Name (ARN) of the anomaly detector.

  • :anomaly_group_time_series_feedback (required, Types::AnomalyGroupTimeSeriesFeedback)

    Feedback for an anomalous metric.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1413
1414
1415
1416
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1413

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

#tag_resource(params = {}) ⇒ Struct

Adds tags to a detector, dataset, or alert.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The resource's Amazon Resource Name (ARN).

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

    Tags to apply to the resource. Tag keys and values can contain letters, numbers, spaces, and the following symbols: _.:/=+@-

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1446
1447
1448
1449
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1446

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

#untag_resource(params = {}) ⇒ Struct

Removes tags from a detector, dataset, or alert.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The resource's Amazon Resource Name (ARN).

  • :tag_keys (required, Array<String>)

    Keys to remove from the resource's tags.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1476
1477
1478
1479
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1476

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

#update_anomaly_detector(params = {}) ⇒ Types::UpdateAnomalyDetectorResponse

Updates a detector. After activation, you can only change a detector's ingestion delay and description.

Examples:

Request syntax with placeholder values


resp = client.update_anomaly_detector({
  anomaly_detector_arn: "Arn", # required
  kms_key_arn: "KmsKeyArn",
  anomaly_detector_description: "AnomalyDetectorDescription",
  anomaly_detector_config: {
    anomaly_detector_frequency: "P1D", # accepts P1D, PT1H, PT10M, PT5M
  },
})

Response structure


resp.anomaly_detector_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :anomaly_detector_arn (required, String)

    The ARN of the detector to update.

  • :kms_key_arn (String)

    The Amazon Resource Name (ARN) of an AWS KMS encryption key.

  • :anomaly_detector_description (String)

    The updated detector description.

  • :anomaly_detector_config (Types::AnomalyDetectorConfig)

    Contains information about the configuration to which the detector will be updated.

Returns:

See Also:



1520
1521
1522
1523
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1520

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

#update_metric_set(params = {}) ⇒ Types::UpdateMetricSetResponse

Updates a dataset.

Examples:

Request syntax with placeholder values


resp = client.update_metric_set({
  metric_set_arn: "Arn", # required
  metric_set_description: "MetricSetDescription",
  metric_list: [
    {
      metric_name: "ColumnName", # required
      aggregation_function: "AVG", # required, accepts AVG, SUM
      namespace: "Namespace",
    },
  ],
  offset: 1,
  timestamp_column: {
    column_name: "ColumnName",
    column_format: "DateTimeFormat",
  },
  dimension_list: ["ColumnName"],
  metric_set_frequency: "P1D", # accepts P1D, PT1H, PT10M, PT5M
  metric_source: {
    s3_source_config: {
      role_arn: "Arn", # required
      templated_path_list: ["TemplatedPath"],
      historical_data_path_list: ["HistoricalDataPath"],
      file_format_descriptor: {
        csv_format_descriptor: {
          file_compression: "NONE", # accepts NONE, GZIP
          charset: "Charset",
          contains_header: false,
          delimiter: "Delimiter",
          header_list: ["ColumnName"],
          quote_symbol: "QuoteSymbol",
        },
        json_format_descriptor: {
          file_compression: "NONE", # accepts NONE, GZIP
          charset: "Charset",
        },
      },
    },
    app_flow_config: {
      role_arn: "Arn", # required
      flow_name: "FlowName", # required
    },
    cloud_watch_config: {
      role_arn: "Arn", # required
    },
    rds_source_config: {
      db_instance_identifier: "RDSDatabaseIdentifier", # required
      database_host: "DatabaseHost", # required
      database_port: 1, # required
      secret_manager_arn: "PoirotSecretManagerArn", # required
      database_name: "RDSDatabaseName", # required
      table_name: "TableName", # required
      role_arn: "Arn", # required
      vpc_configuration: { # required
        subnet_id_list: ["SubnetId"], # required
        security_group_id_list: ["SecurityGroupId"], # required
      },
    },
    redshift_source_config: {
      cluster_identifier: "RedshiftClusterIdentifier", # required
      database_host: "DatabaseHost", # required
      database_port: 1, # required
      secret_manager_arn: "PoirotSecretManagerArn", # required
      database_name: "RedshiftDatabaseName", # required
      table_name: "TableName", # required
      role_arn: "Arn", # required
      vpc_configuration: { # required
        subnet_id_list: ["SubnetId"], # required
        security_group_id_list: ["SecurityGroupId"], # required
      },
    },
  },
})

Response structure


resp.metric_set_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :metric_set_arn (required, String)

    The ARN of the dataset to update.

  • :metric_set_description (String)

    The dataset's description.

  • :metric_list (Array<Types::Metric>)

    The metric list.

  • :offset (Integer)

    After an interval ends, the amount of seconds that the detector waits before importing data. Offset is only supported for S3 and Redshift datasources.

  • :timestamp_column (Types::TimestampColumn)

    The timestamp column.

  • :dimension_list (Array<String>)

    The dimension list.

  • :metric_set_frequency (String)

    The dataset's interval.

  • :metric_source (Types::MetricSource)

    Contains information about source data used to generate a metric.

Returns:

See Also:



1640
1641
1642
1643
# File 'gems/aws-sdk-lookoutmetrics/lib/aws-sdk-lookoutmetrics/client.rb', line 1640

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