Class: Aws::SSMIncidents::Client

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

Overview

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

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

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

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

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

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

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. 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, :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.

  • :client_side_monitoring (Boolean) — default: false

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

  • :client_side_monitoring_client_id (String) — default: ""

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

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

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

  • :client_side_monitoring_port (Integer) — default: 31000

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

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

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

  • :convert_params (Boolean) — default: true

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

  • :correct_clock_skew (Boolean) — default: true

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

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

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

  • :disable_host_prefix_injection (Boolean) — default: false

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

  • :disable_request_compression (Boolean) — default: false

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

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

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

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

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

  • :endpoint_cache_max_threads (Integer) — default: 10

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

  • :endpoint_cache_poll_interval (Integer) — default: 60

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

  • :endpoint_discovery (Boolean) — default: false

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

  • :ignore_configured_endpoint_urls (Boolean)

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

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

    The log formatter.

  • :log_level (Symbol) — default: :info

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

  • :logger (Logger)

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

  • :max_attempts (Integer) — default: 3

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

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

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

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

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

  • :sdk_ua_app_id (String)

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

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

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

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

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

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

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

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

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

    A Bearer Token Provider. This can be an 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::SSMIncidents::EndpointProvider)

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



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

def initialize(*args)
  super
end

Instance Method Details

#batch_get_incident_findings(params = {}) ⇒ Types::BatchGetIncidentFindingsOutput

Retrieves details about all specified findings for an incident, including descriptive details about each finding. A finding represents a recent application environment change made by an CodeDeploy deployment or an CloudFormation stack creation or update that can be investigated as a potential cause of the incident.

Examples:

Request syntax with placeholder values


resp = client.batch_get_incident_findings({
  finding_ids: ["FindingId"], # required
  incident_record_arn: "Arn", # required
})

Response structure


resp.errors #=> Array
resp.errors[0].code #=> String
resp.errors[0].finding_id #=> String
resp.errors[0].message #=> String
resp.findings #=> Array
resp.findings[0].creation_time #=> Time
resp.findings[0].details.cloud_formation_stack_update.end_time #=> Time
resp.findings[0].details.cloud_formation_stack_update.stack_arn #=> String
resp.findings[0].details.cloud_formation_stack_update.start_time #=> Time
resp.findings[0].details.code_deploy_deployment.deployment_group_arn #=> String
resp.findings[0].details.code_deploy_deployment.deployment_id #=> String
resp.findings[0].details.code_deploy_deployment.end_time #=> Time
resp.findings[0].details.code_deploy_deployment.start_time #=> Time
resp.findings[0].id #=> String
resp.findings[0].last_modified_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :finding_ids (required, Array<String>)

    A list of IDs of findings for which you want to view details.

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident for which you want to view finding details.

Returns:

See Also:



497
498
499
500
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 497

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

#create_replication_set(params = {}) ⇒ Types::CreateReplicationSetOutput

A replication set replicates and encrypts your data to the provided Regions with the provided KMS key.

Examples:

Request syntax with placeholder values


resp = client.create_replication_set({
  client_token: "ClientToken",
  regions: { # required
    "RegionName" => {
      sse_kms_key_id: "SseKmsKey",
    },
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    A token that ensures that the operation is called only once with the specified details.

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

  • :regions (required, Hash<String,Types::RegionMapInputValue>)

    The Regions that Incident Manager replicates your data to. You can have up to three Regions in your replication set.

  • :tags (Hash<String,String>)

    A list of tags to add to the replication set.

Returns:

See Also:



545
546
547
548
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 545

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

#create_response_plan(params = {}) ⇒ Types::CreateResponsePlanOutput

Creates a response plan that automates the initial response to incidents. A response plan engages contacts, starts chat channel collaboration, and initiates runbooks at the beginning of an incident.

Examples:

Request syntax with placeholder values


resp = client.create_response_plan({
  actions: [
    {
      ssm_automation: {
        document_name: "SsmAutomationDocumentNameString", # required
        document_version: "SsmAutomationDocumentVersionString",
        dynamic_parameters: {
          "DynamicSsmParametersKeyString" => {
            variable: "INCIDENT_RECORD_ARN", # accepts INCIDENT_RECORD_ARN, INVOLVED_RESOURCES
          },
        },
        parameters: {
          "SsmParametersKeyString" => ["SsmParameterValuesMemberString"],
        },
        role_arn: "RoleArn", # required
        target_account: "RESPONSE_PLAN_OWNER_ACCOUNT", # accepts RESPONSE_PLAN_OWNER_ACCOUNT, IMPACTED_ACCOUNT
      },
    },
  ],
  chat_channel: {
    chatbot_sns: ["SnsArn"],
    empty: {
    },
  },
  client_token: "ClientToken",
  display_name: "ResponsePlanDisplayName",
  engagements: ["SsmContactsArn"],
  incident_template: { # required
    dedupe_string: "DedupeString",
    impact: 1, # required
    incident_tags: {
      "TagKey" => "TagValue",
    },
    notification_targets: [
      {
        sns_topic_arn: "Arn",
      },
    ],
    summary: "IncidentSummary",
    title: "IncidentTitle", # required
  },
  integrations: [
    {
      pager_duty_configuration: {
        name: "PagerDutyConfigurationNameString", # required
        pager_duty_incident_configuration: { # required
          service_id: "PagerDutyIncidentConfigurationServiceIdString", # required
        },
        secret_id: "PagerDutyConfigurationSecretIdString", # required
      },
    },
  ],
  name: "ResponsePlanName", # required
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :actions (Array<Types::Action>)

    The actions that the response plan starts at the beginning of an incident.

  • :chat_channel (Types::ChatChannel)

    The Chatbot chat channel used for collaboration during an incident.

  • :client_token (String)

    A token ensuring that the operation is called only once with the specified details.

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

  • :display_name (String)

    The long format of the response plan name. This field can contain spaces.

  • :engagements (Array<String>)

    The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an incident.

  • :incident_template (required, Types::IncidentTemplate)

    Details used to create an incident when using this response plan.

  • :integrations (Array<Types::Integration>)

    Information about third-party services integrated into the response plan.

  • :name (required, String)

    The short format name of the response plan. Can't include spaces.

  • :tags (Hash<String,String>)

    A list of tags that you are adding to the response plan.

Returns:

See Also:



661
662
663
664
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 661

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

#create_timeline_event(params = {}) ⇒ Types::CreateTimelineEventOutput

Creates a custom timeline event on the incident details page of an incident record. Incident Manager automatically creates timeline events that mark key moments during an incident. You can create custom timeline events to mark important events that Incident Manager can detect automatically.

Examples:

Request syntax with placeholder values


resp = client.create_timeline_event({
  client_token: "ClientToken",
  event_data: "EventData", # required
  event_references: [
    {
      related_item_id: "GeneratedId",
      resource: "Arn",
    },
  ],
  event_time: Time.now, # required
  event_type: "TimelineEventType", # required
  incident_record_arn: "Arn", # required
})

Response structure


resp.event_id #=> String
resp.incident_record_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    A token that ensures that a client calls the action only once with the specified details.

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

  • :event_data (required, String)

    A short description of the event.

  • :event_references (Array<Types::EventReference>)

    Adds one or more references to the TimelineEvent. A reference is an Amazon Web Services resource involved or associated with the incident. To specify a reference, enter its Amazon Resource Name (ARN). You can also specify a related item associated with a resource. For example, to specify an Amazon DynamoDB (DynamoDB) table as a resource, use the table's ARN. You can also specify an Amazon CloudWatch metric associated with the DynamoDB table as a related item.

  • :event_time (required, Time, DateTime, Date, Integer, String)

    The timestamp for when the event occurred.

  • :event_type (required, String)

    The type of event. You can create timeline events of type Custom Event and Note.

    To make a Note-type event appear on the Incident notes panel in the console, specify eventType as Noteand enter the Amazon Resource Name (ARN) of the incident as the value for eventReference.

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident record that the action adds the incident to.

Returns:

See Also:



736
737
738
739
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 736

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

#delete_incident_record(params = {}) ⇒ Struct

Delete an incident record from Incident Manager.

Examples:

Request syntax with placeholder values


resp = client.delete_incident_record({
  arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the incident record you are deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



759
760
761
762
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 759

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

#delete_replication_set(params = {}) ⇒ Struct

Deletes all Regions in your replication set. Deleting the replication set deletes all Incident Manager data.

Examples:

Request syntax with placeholder values


resp = client.delete_replication_set({
  arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the replication set you're deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



783
784
785
786
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 783

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

#delete_resource_policy(params = {}) ⇒ Struct

Deletes the resource policy that Resource Access Manager uses to share your Incident Manager resource.

Examples:

Request syntax with placeholder values


resp = client.delete_resource_policy({
  policy_id: "PolicyId", # required
  resource_arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :policy_id (required, String)

    The ID of the resource policy you're deleting.

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource you're deleting the policy from.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



811
812
813
814
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 811

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

#delete_response_plan(params = {}) ⇒ Struct

Deletes the specified response plan. Deleting a response plan stops all linked CloudWatch alarms and EventBridge events from creating an incident with this response plan.

Examples:

Request syntax with placeholder values


resp = client.delete_response_plan({
  arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the response plan.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



835
836
837
838
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 835

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

#delete_timeline_event(params = {}) ⇒ Struct

Deletes a timeline event from an incident.

Examples:

Request syntax with placeholder values


resp = client.delete_timeline_event({
  event_id: "UUID", # required
  incident_record_arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :event_id (required, String)

    The ID of the event to update. You can use ListTimelineEvents to find an event's ID.

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident that includes the timeline event.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



863
864
865
866
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 863

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

#get_incident_record(params = {}) ⇒ Types::GetIncidentRecordOutput

Returns the details for the specified incident record.

Examples:

Request syntax with placeholder values


resp = client.get_incident_record({
  arn: "Arn", # required
})

Response structure


resp.incident_record.arn #=> String
resp.incident_record.automation_executions #=> Array
resp.incident_record.automation_executions[0].ssm_execution_arn #=> String
resp.incident_record.chat_channel.chatbot_sns #=> Array
resp.incident_record.chat_channel.chatbot_sns[0] #=> String
resp.incident_record.creation_time #=> Time
resp.incident_record.dedupe_string #=> String
resp.incident_record.impact #=> Integer
resp.incident_record.incident_record_source.created_by #=> String
resp.incident_record.incident_record_source.invoked_by #=> String
resp.incident_record.incident_record_source.resource_arn #=> String
resp.incident_record.incident_record_source.source #=> String
resp.incident_record.last_modified_by #=> String
resp.incident_record.last_modified_time #=> Time
resp.incident_record.notification_targets #=> Array
resp.incident_record.notification_targets[0].sns_topic_arn #=> String
resp.incident_record.resolved_time #=> Time
resp.incident_record.status #=> String, one of "OPEN", "RESOLVED"
resp.incident_record.summary #=> String
resp.incident_record.title #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the incident record.

Returns:

See Also:



910
911
912
913
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 910

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

#get_replication_set(params = {}) ⇒ Types::GetReplicationSetOutput

Retrieve your Incident Manager replication set.

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

  • wait_for_replication_set_active
  • wait_for_replication_set_deleted

Examples:

Request syntax with placeholder values


resp = client.get_replication_set({
  arn: "Arn", # required
})

Response structure


resp.replication_set.arn #=> String
resp.replication_set.created_by #=> String
resp.replication_set.created_time #=> Time
resp.replication_set.deletion_protected #=> Boolean
resp.replication_set.last_modified_by #=> String
resp.replication_set.last_modified_time #=> Time
resp.replication_set.region_map #=> Hash
resp.replication_set.region_map["RegionName"].sse_kms_key_id #=> String
resp.replication_set.region_map["RegionName"].status #=> String, one of "ACTIVE", "CREATING", "DELETING", "FAILED"
resp.replication_set.region_map["RegionName"].status_message #=> String
resp.replication_set.region_map["RegionName"].status_update_date_time #=> Time
resp.replication_set.status #=> String, one of "ACTIVE", "CREATING", "UPDATING", "DELETING", "FAILED"

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the replication set you want to retrieve.

Returns:

See Also:



956
957
958
959
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 956

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

#get_resource_policies(params = {}) ⇒ Types::GetResourcePoliciesOutput

Retrieves the resource policies attached to the specified response plan.

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_resource_policies({
  max_results: 1,
  next_token: "NextToken",
  resource_arn: "Arn", # required
})

Response structure


resp.next_token #=> String
resp.resource_policies #=> Array
resp.resource_policies[0].policy_document #=> String
resp.resource_policies[0].policy_id #=> String
resp.resource_policies[0].ram_resource_share_region #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of resource policies to display for each page of results.

  • :next_token (String)

    The pagination token for the next set of items to return. (You received this token from a previous call.)

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the response plan with the attached resource policy.

Returns:

See Also:



1003
1004
1005
1006
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1003

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

#get_response_plan(params = {}) ⇒ Types::GetResponsePlanOutput

Retrieves the details of the specified response plan.

Examples:

Request syntax with placeholder values


resp = client.get_response_plan({
  arn: "Arn", # required
})

Response structure


resp.actions #=> Array
resp.actions[0].ssm_automation.document_name #=> String
resp.actions[0].ssm_automation.document_version #=> String
resp.actions[0].ssm_automation.dynamic_parameters #=> Hash
resp.actions[0].ssm_automation.dynamic_parameters["DynamicSsmParametersKeyString"].variable #=> String, one of "INCIDENT_RECORD_ARN", "INVOLVED_RESOURCES"
resp.actions[0].ssm_automation.parameters #=> Hash
resp.actions[0].ssm_automation.parameters["SsmParametersKeyString"] #=> Array
resp.actions[0].ssm_automation.parameters["SsmParametersKeyString"][0] #=> String
resp.actions[0].ssm_automation.role_arn #=> String
resp.actions[0].ssm_automation. #=> String, one of "RESPONSE_PLAN_OWNER_ACCOUNT", "IMPACTED_ACCOUNT"
resp.arn #=> String
resp.chat_channel.chatbot_sns #=> Array
resp.chat_channel.chatbot_sns[0] #=> String
resp.display_name #=> String
resp.engagements #=> Array
resp.engagements[0] #=> String
resp.incident_template.dedupe_string #=> String
resp.incident_template.impact #=> Integer
resp.incident_template.incident_tags #=> Hash
resp.incident_template.incident_tags["TagKey"] #=> String
resp.incident_template.notification_targets #=> Array
resp.incident_template.notification_targets[0].sns_topic_arn #=> String
resp.incident_template.summary #=> String
resp.incident_template.title #=> String
resp.integrations #=> Array
resp.integrations[0].pager_duty_configuration.name #=> String
resp.integrations[0].pager_duty_configuration.pager_duty_incident_configuration.service_id #=> String
resp.integrations[0].pager_duty_configuration.secret_id #=> String
resp.name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the response plan.

Returns:

See Also:



1066
1067
1068
1069
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1066

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

#get_timeline_event(params = {}) ⇒ Types::GetTimelineEventOutput

Retrieves a timeline event based on its ID and incident record.

Examples:

Request syntax with placeholder values


resp = client.get_timeline_event({
  event_id: "UUID", # required
  incident_record_arn: "Arn", # required
})

Response structure


resp.event.event_data #=> String
resp.event.event_id #=> String
resp.event.event_references #=> Array
resp.event.event_references[0].related_item_id #=> String
resp.event.event_references[0].resource #=> String
resp.event.event_time #=> Time
resp.event.event_type #=> String
resp.event.event_updated_time #=> Time
resp.event.incident_record_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :event_id (required, String)

    The ID of the event. You can get an event's ID when you create it, or by using ListTimelineEvents.

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident that includes the timeline event.

Returns:

See Also:



1108
1109
1110
1111
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1108

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

#list_incident_findings(params = {}) ⇒ Types::ListIncidentFindingsOutput

Retrieves a list of the IDs of findings, plus their last modified times, that have been identified for a specified incident. A finding represents a recent application environment change made by an CloudFormation stack creation or update or an CodeDeploy deployment that can be investigated as a potential cause of the incident.

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_incident_findings({
  incident_record_arn: "Arn", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.findings #=> Array
resp.findings[0].id #=> String
resp.findings[0].last_modified_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident for which you want to view associated findings.

  • :max_results (Integer)

    The maximum number of findings to retrieve per call.

  • :next_token (String)

    The pagination token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1156
1157
1158
1159
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1156

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

#list_incident_records(params = {}) ⇒ Types::ListIncidentRecordsOutput

Lists all incident records in your account. Use this command to retrieve the Amazon Resource Name (ARN) of the incident record you want to update.

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_incident_records({
  filters: [
    {
      condition: { # required
        after: Time.now,
        before: Time.now,
        equals: {
          integer_values: [1],
          string_values: ["StringListMemberString"],
        },
      },
      key: "FilterKeyString", # required
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.incident_record_summaries #=> Array
resp.incident_record_summaries[0].arn #=> String
resp.incident_record_summaries[0].creation_time #=> Time
resp.incident_record_summaries[0].impact #=> Integer
resp.incident_record_summaries[0].incident_record_source.created_by #=> String
resp.incident_record_summaries[0].incident_record_source.invoked_by #=> String
resp.incident_record_summaries[0].incident_record_source.resource_arn #=> String
resp.incident_record_summaries[0].incident_record_source.source #=> String
resp.incident_record_summaries[0].resolved_time #=> Time
resp.incident_record_summaries[0].status #=> String, one of "OPEN", "RESOLVED"
resp.incident_record_summaries[0].title #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filters (Array<Types::Filter>)

    Filters the list of incident records you want to search through. You can filter on the following keys:

    • creationTime

    • impact

    • status

    • createdBy

    Note the following when when you use Filters:

    • If you don't specify a Filter, the response includes all incident records.

    • If you specify more than one filter in a single request, the response returns incident records that match all filters.

    • If you specify a filter with more than one value, the response returns incident records that match any of the values provided.

  • :max_results (Integer)

    The maximum number of results per page.

  • :next_token (String)

    The pagination token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1241
1242
1243
1244
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1241

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

List all related items for an incident record.

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_related_items({
  incident_record_arn: "Arn", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.next_token #=> String
resp.related_items #=> Array
resp.related_items[0].generated_id #=> String
resp.related_items[0].identifier.type #=> String, one of "ANALYSIS", "INCIDENT", "METRIC", "PARENT", "ATTACHMENT", "OTHER", "AUTOMATION", "INVOLVED_RESOURCE", "TASK"
resp.related_items[0].identifier.value.arn #=> String
resp.related_items[0].identifier.value.metric_definition #=> String
resp.related_items[0].identifier.value.pager_duty_incident_detail.auto_resolve #=> Boolean
resp.related_items[0].identifier.value.pager_duty_incident_detail.id #=> String
resp.related_items[0].identifier.value.pager_duty_incident_detail.secret_id #=> String
resp.related_items[0].identifier.value.url #=> String
resp.related_items[0].title #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident record containing the listed related items.

  • :max_results (Integer)

    The maximum number of related items per page.

  • :next_token (String)

    The pagination token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1292
1293
1294
1295
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1292

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

#list_replication_sets(params = {}) ⇒ Types::ListReplicationSetsOutput

Lists details about the replication set configured in your account.

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

Examples:

Request syntax with placeholder values


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

Response structure


resp.next_token #=> String
resp.replication_set_arns #=> Array
resp.replication_set_arns[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results per page.

  • :next_token (String)

    The pagination token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1330
1331
1332
1333
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1330

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

#list_response_plans(params = {}) ⇒ Types::ListResponsePlansOutput

Lists all response plans in your account.

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

Examples:

Request syntax with placeholder values


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

Response structure


resp.next_token #=> String
resp.response_plan_summaries #=> Array
resp.response_plan_summaries[0].arn #=> String
resp.response_plan_summaries[0].display_name #=> String
resp.response_plan_summaries[0].name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of response plans per page.

  • :next_token (String)

    The pagination token for the next set of items to return. (You received this token from a previous call.)

Returns:

See Also:



1370
1371
1372
1373
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1370

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

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

Lists the tags that are attached to the specified response plan or incident.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the response plan or incident.

Returns:

See Also:



1400
1401
1402
1403
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1400

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

#list_timeline_events(params = {}) ⇒ Types::ListTimelineEventsOutput

Lists timeline events for the specified incident record.

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_timeline_events({
  filters: [
    {
      condition: { # required
        after: Time.now,
        before: Time.now,
        equals: {
          integer_values: [1],
          string_values: ["StringListMemberString"],
        },
      },
      key: "FilterKeyString", # required
    },
  ],
  incident_record_arn: "Arn", # required
  max_results: 1,
  next_token: "NextToken",
  sort_by: "EVENT_TIME", # accepts EVENT_TIME
  sort_order: "ASCENDING", # accepts ASCENDING, DESCENDING
})

Response structure


resp.event_summaries #=> Array
resp.event_summaries[0].event_id #=> String
resp.event_summaries[0].event_references #=> Array
resp.event_summaries[0].event_references[0].related_item_id #=> String
resp.event_summaries[0].event_references[0].resource #=> String
resp.event_summaries[0].event_time #=> Time
resp.event_summaries[0].event_type #=> String
resp.event_summaries[0].event_updated_time #=> Time
resp.event_summaries[0].incident_record_arn #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filters (Array<Types::Filter>)

    Filters the timeline events based on the provided conditional values. You can filter timeline events with the following keys:

    • eventReference

    • eventTime

    • eventType

    Note the following when deciding how to use Filters:

    • If you don't specify a Filter, the response includes all timeline events.

    • If you specify more than one filter in a single request, the response returns timeline events that match all filters.

    • If you specify a filter with more than one value, the response returns timeline events that match any of the values provided.

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident that includes the timeline event.

  • :max_results (Integer)

    The maximum number of results per page.

  • :next_token (String)

    The pagination token for the next set of items to return. (You received this token from a previous call.)

  • :sort_by (String)

    Sort timeline events by the specified key value pair.

  • :sort_order (String)

    Sorts the order of timeline events by the value specified in the sortBy field.

Returns:

See Also:



1493
1494
1495
1496
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1493

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

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

Adds a resource policy to the specified response plan. The resource policy is used to share the response plan using Resource Access Manager (RAM). For more information about cross-account sharing, see Cross-Region and cross-account incident management.

Examples:

Request syntax with placeholder values


resp = client.put_resource_policy({
  policy: "Policy", # required
  resource_arn: "Arn", # required
})

Response structure


resp.policy_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :policy (required, String)

    Details of the resource policy.

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the response plan to add the resource policy to.

Returns:

See Also:



1533
1534
1535
1536
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1533

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

#start_incident(params = {}) ⇒ Types::StartIncidentOutput

Used to start an incident from CloudWatch alarms, EventBridge events, or manually.

Examples:

Request syntax with placeholder values


resp = client.start_incident({
  client_token: "ClientToken",
  impact: 1,
  related_items: [
    {
      generated_id: "GeneratedId",
      identifier: { # required
        type: "ANALYSIS", # required, accepts ANALYSIS, INCIDENT, METRIC, PARENT, ATTACHMENT, OTHER, AUTOMATION, INVOLVED_RESOURCE, TASK
        value: { # required
          arn: "Arn",
          metric_definition: "MetricDefinition",
          pager_duty_incident_detail: {
            auto_resolve: false,
            id: "PagerDutyIncidentDetailIdString", # required
            secret_id: "PagerDutyIncidentDetailSecretIdString",
          },
          url: "Url",
        },
      },
      title: "RelatedItemTitleString",
    },
  ],
  response_plan_arn: "Arn", # required
  title: "IncidentTitle",
  trigger_details: {
    raw_data: "RawData",
    source: "IncidentSource", # required
    timestamp: Time.now, # required
    trigger_arn: "Arn",
  },
})

Response structure


resp.incident_record_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    A token ensuring that the operation is called only once with the specified details.

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

  • :impact (Integer)

    Defines the impact to the customers. Providing an impact overwrites the impact provided by a response plan.

    Supported impact codes

    • 1 - Critical

    • 2 - High

    • 3 - Medium

    • 4 - Low

    • 5 - No Impact

  • :related_items (Array<Types::RelatedItem>)

    Add related items to the incident for other responders to use. Related items are Amazon Web Services resources, external links, or files uploaded to an Amazon S3 bucket.

  • :response_plan_arn (required, String)

    The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, Amazon SNS topics, runbooks, title, and impact of the incident.

  • :title (String)

    Provide a title for the incident. Providing a title overwrites the title provided by the response plan.

  • :trigger_details (Types::TriggerDetails)

    Details of what created the incident record in Incident Manager.

Returns:

See Also:



1627
1628
1629
1630
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1627

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

#tag_resource(params = {}) ⇒ Struct

Adds a tag to a response plan.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the response plan you're adding the tags to.

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

    A list of tags to add to the response plan.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1656
1657
1658
1659
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1656

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

#untag_resource(params = {}) ⇒ Struct

Removes a tag from a resource.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the response plan you're removing a tag from.

  • :tag_keys (required, Array<String>)

    The name of the tag to remove from the response plan.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1683
1684
1685
1686
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1683

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

#update_deletion_protection(params = {}) ⇒ Struct

Update deletion protection to either allow or deny deletion of the final Region in a replication set.

Examples:

Request syntax with placeholder values


resp = client.update_deletion_protection({
  arn: "Arn", # required
  client_token: "ClientToken",
  deletion_protected: false, # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the replication set to update.

  • :client_token (String)

    A token that ensures that the operation is called only once with the specified details.

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

  • :deletion_protected (required, Boolean)

    Specifies if deletion protection is turned on or off in your account.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1718
1719
1720
1721
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1718

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

#update_incident_record(params = {}) ⇒ Struct

Update the details of an incident record. You can use this operation to update an incident record from the defined chat channel. For more information about using actions in chat channels, see Interacting through chat.

Examples:

Request syntax with placeholder values


resp = client.update_incident_record({
  arn: "Arn", # required
  chat_channel: {
    chatbot_sns: ["SnsArn"],
    empty: {
    },
  },
  client_token: "ClientToken",
  impact: 1,
  notification_targets: [
    {
      sns_topic_arn: "Arn",
    },
  ],
  status: "OPEN", # accepts OPEN, RESOLVED
  summary: "IncidentSummary",
  title: "IncidentTitle",
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the incident record you are updating.

  • :chat_channel (Types::ChatChannel)

    The Chatbot chat channel where responders can collaborate.

  • :client_token (String)

    A token that ensures that a client calls the operation only once with the specified details.

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

  • :impact (Integer)

    Defines the impact of the incident to customers and applications. If you provide an impact for an incident, it overwrites the impact provided by the response plan.

    Supported impact codes

    • 1 - Critical

    • 2 - High

    • 3 - Medium

    • 4 - Low

    • 5 - No Impact

  • :notification_targets (Array<Types::NotificationTargetItem>)

    The Amazon SNS targets that Incident Manager notifies when a client updates an incident.

    Using multiple SNS topics creates redundancy in the event that a Region is down during the incident.

  • :status (String)

    The status of the incident. Possible statuses are Open or Resolved.

  • :summary (String)

    A longer description of what occurred during the incident.

  • :title (String)

    A brief description of the incident.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1807
1808
1809
1810
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1807

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

Add or remove related items from the related items tab of an incident record.

Examples:

Request syntax with placeholder values


resp = client.update_related_items({
  client_token: "ClientToken",
  incident_record_arn: "Arn", # required
  related_items_update: { # required
    item_to_add: {
      generated_id: "GeneratedId",
      identifier: { # required
        type: "ANALYSIS", # required, accepts ANALYSIS, INCIDENT, METRIC, PARENT, ATTACHMENT, OTHER, AUTOMATION, INVOLVED_RESOURCE, TASK
        value: { # required
          arn: "Arn",
          metric_definition: "MetricDefinition",
          pager_duty_incident_detail: {
            auto_resolve: false,
            id: "PagerDutyIncidentDetailIdString", # required
            secret_id: "PagerDutyIncidentDetailSecretIdString",
          },
          url: "Url",
        },
      },
      title: "RelatedItemTitleString",
    },
    item_to_remove: {
      type: "ANALYSIS", # required, accepts ANALYSIS, INCIDENT, METRIC, PARENT, ATTACHMENT, OTHER, AUTOMATION, INVOLVED_RESOURCE, TASK
      value: { # required
        arn: "Arn",
        metric_definition: "MetricDefinition",
        pager_duty_incident_detail: {
          auto_resolve: false,
          id: "PagerDutyIncidentDetailIdString", # required
          secret_id: "PagerDutyIncidentDetailSecretIdString",
        },
        url: "Url",
      },
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    A token that ensures that a client calls the operation only once with the specified details.

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

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident record that contains the related items that you update.

  • :related_items_update (required, Types::RelatedItemsUpdate)

    Details about the item that you are add to, or delete from, an incident.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1875
1876
1877
1878
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1875

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

#update_replication_set(params = {}) ⇒ Struct

Add or delete Regions from your replication set.

Examples:

Request syntax with placeholder values


resp = client.update_replication_set({
  actions: [ # required
    {
      add_region_action: {
        region_name: "RegionName", # required
        sse_kms_key_id: "SseKmsKey",
      },
      delete_region_action: {
        region_name: "RegionName", # required
      },
    },
  ],
  arn: "Arn", # required
  client_token: "ClientToken",
})

Parameters:

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

    ({})

Options Hash (params):

  • :actions (required, Array<Types::UpdateReplicationSetAction>)

    An action to add or delete a Region.

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the replication set you're updating.

  • :client_token (String)

    A token that ensures that the operation is called only once with the specified details.

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1920
1921
1922
1923
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1920

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

#update_response_plan(params = {}) ⇒ Struct

Updates the specified response plan.

Examples:

Request syntax with placeholder values


resp = client.update_response_plan({
  actions: [
    {
      ssm_automation: {
        document_name: "SsmAutomationDocumentNameString", # required
        document_version: "SsmAutomationDocumentVersionString",
        dynamic_parameters: {
          "DynamicSsmParametersKeyString" => {
            variable: "INCIDENT_RECORD_ARN", # accepts INCIDENT_RECORD_ARN, INVOLVED_RESOURCES
          },
        },
        parameters: {
          "SsmParametersKeyString" => ["SsmParameterValuesMemberString"],
        },
        role_arn: "RoleArn", # required
        target_account: "RESPONSE_PLAN_OWNER_ACCOUNT", # accepts RESPONSE_PLAN_OWNER_ACCOUNT, IMPACTED_ACCOUNT
      },
    },
  ],
  arn: "Arn", # required
  chat_channel: {
    chatbot_sns: ["SnsArn"],
    empty: {
    },
  },
  client_token: "ClientToken",
  display_name: "ResponsePlanDisplayName",
  engagements: ["SsmContactsArn"],
  incident_template_dedupe_string: "DedupeString",
  incident_template_impact: 1,
  incident_template_notification_targets: [
    {
      sns_topic_arn: "Arn",
    },
  ],
  incident_template_summary: "IncidentSummary",
  incident_template_tags: {
    "TagKey" => "TagValue",
  },
  incident_template_title: "IncidentTitle",
  integrations: [
    {
      pager_duty_configuration: {
        name: "PagerDutyConfigurationNameString", # required
        pager_duty_incident_configuration: { # required
          service_id: "PagerDutyIncidentConfigurationServiceIdString", # required
        },
        secret_id: "PagerDutyConfigurationSecretIdString", # required
      },
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :actions (Array<Types::Action>)

    The actions that this response plan takes at the beginning of an incident.

  • :arn (required, String)

    The Amazon Resource Name (ARN) of the response plan.

  • :chat_channel (Types::ChatChannel)

    The Chatbot chat channel used for collaboration during an incident.

    Use the empty structure to remove the chat channel from the response plan.

  • :client_token (String)

    A token ensuring that the operation is called only once with the specified details.

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

  • :display_name (String)

    The long format name of the response plan. The display name can't contain spaces.

  • :engagements (Array<String>)

    The Amazon Resource Name (ARN) for the contacts and escalation plans that the response plan engages during an incident.

  • :incident_template_dedupe_string (String)

    The string Incident Manager uses to prevent duplicate incidents from being created by the same incident in the same account.

  • :incident_template_impact (Integer)

    Defines the impact to the customers. Providing an impact overwrites the impact provided by a response plan.

    Supported impact codes

    • 1 - Critical

    • 2 - High

    • 3 - Medium

    • 4 - Low

    • 5 - No Impact

  • :incident_template_notification_targets (Array<Types::NotificationTargetItem>)

    The Amazon SNS targets that are notified when updates are made to an incident.

  • :incident_template_summary (String)

    A brief summary of the incident. This typically contains what has happened, what's currently happening, and next steps.

  • :incident_template_tags (Hash<String,String>)

    Tags to assign to the template. When the StartIncident API action is called, Incident Manager assigns the tags specified in the template to the incident. To call this action, you must also have permission to call the TagResource API action for the incident record resource.

  • :incident_template_title (String)

    The short format name of the incident. The title can't contain spaces.

  • :integrations (Array<Types::Integration>)

    Information about third-party services integrated into the response plan.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2058
2059
2060
2061
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 2058

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

#update_timeline_event(params = {}) ⇒ Struct

Updates a timeline event. You can update events of type Custom Event.

Examples:

Request syntax with placeholder values


resp = client.update_timeline_event({
  client_token: "ClientToken",
  event_data: "EventData",
  event_id: "UUID", # required
  event_references: [
    {
      related_item_id: "GeneratedId",
      resource: "Arn",
    },
  ],
  event_time: Time.now,
  event_type: "TimelineEventType",
  incident_record_arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    A token that ensures that a client calls the operation only once with the specified details.

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

  • :event_data (String)

    A short description of the event.

  • :event_id (required, String)

    The ID of the event to update. You can use ListTimelineEvents to find an event's ID.

  • :event_references (Array<Types::EventReference>)

    Updates all existing references in a TimelineEvent. A reference is an Amazon Web Services resource involved or associated with the incident. To specify a reference, enter its Amazon Resource Name (ARN). You can also specify a related item associated with that resource. For example, to specify an Amazon DynamoDB (DynamoDB) table as a resource, use its ARN. You can also specify an Amazon CloudWatch metric associated with the DynamoDB table as a related item.

    This update action overrides all existing references. If you want to keep existing references, you must specify them in the call. If you don't, this action removes any existing references and enters only new references.

  • :event_time (Time, DateTime, Date, Integer, String)

    The timestamp for when the event occurred.

  • :event_type (String)

    The type of event. You can update events of type Custom Event and Note.

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident that includes the timeline event.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2128
2129
2130
2131
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 2128

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

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

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

Basic Usage

A waiter will call an API operation until:

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

In between attempts, the waiter will sleep.

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

Configuration

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

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

Callbacks

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

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

  # disable max attempts
  max_attempts: nil,

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

Handling Errors

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

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

Valid Waiters

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

waiter_name params :delay :max_attempts
wait_for_replication_set_active #get_replication_set 30 5
wait_for_replication_set_deleted #get_replication_set 30 5

Parameters:

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

    ({})

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

    ({})

Options Hash (options):

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

Yields:

  • (w.waiter)

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

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

  • (Errors::TooManyAttemptsError)

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

  • (Errors::UnexpectedError)

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

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.



2244
2245
2246
2247
2248
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 2244

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