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):

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

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



324
325
326
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 324

def initialize(*args)
  super
end

Instance Method Details

#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",
    },
  },
})

Response structure


resp.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    A token ensuring that the action 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.

Returns:

See Also:



367
368
369
370
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 367

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",
        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
    notification_targets: [
      {
        sns_topic_arn: "Arn",
      },
    ],
    summary: "IncidentSummary",
    title: "IncidentTitle", # 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 AWS Chatbot chat channel used for collaboration during an incident.

  • :client_token (String)

    A token ensuring that the action 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 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.

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



461
462
463
464
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 461

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. Timeline events are automatically created by Incident Manager, marking key moment during an incident. You can create custom timeline events to mark important events that are automatically detected by Incident Manager.

Examples:

Request syntax with placeholder values


resp = client.create_timeline_event({
  client_token: "ClientToken", # required
  event_data: "EventData", # required
  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 (required, String)

    A token ensuring that the action is called 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_time (required, Time, DateTime, Date, Integer, String)

    The time that the event occurred.

  • :event_type (required, String)

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

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident record you are adding the event to.

Returns:

See Also:



517
518
519
520
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 517

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:



540
541
542
543
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 540

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:



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

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 AWS 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:



592
593
594
595
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 592

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:



616
617
618
619
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 616

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 you are updating. You can find this by using ListTimelineEvents.

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident that the event is part of.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



644
645
646
647
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 644

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 of 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:



691
692
693
694
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 691

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



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

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 per page of results.

  • :next_token (String)

    The pagination token to continue to the next page of results.

  • :resource_arn (required, String)

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

Returns:

See Also:



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

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.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.notification_targets #=> Array
resp.incident_template.notification_targets[0].sns_topic_arn #=> String
resp.incident_template.summary #=> String
resp.incident_template.title #=> 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:



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

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_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 the timeline event is part of.

Returns:

See Also:



875
876
877
878
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 875

def get_timeline_event(params = {}, options = {})
  req = build_request(:get_timeline_event, 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>)

    Filter the list of incident records you are searching through. You can filter on the following keys:

    • creationTime

    • impact

    • status

    • createdBy

  • :max_results (Integer)

    The maximum number of results per page.

  • :next_token (String)

    The pagination token to continue to the next page of results.

Returns:

See Also:



948
949
950
951
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 948

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].identifier.type #=> String, one of "ANALYSIS", "INCIDENT", "METRIC", "PARENT", "ATTACHMENT", "OTHER"
resp.related_items[0].identifier.value.arn #=> String
resp.related_items[0].identifier.value.metric_definition #=> 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 that you are listing related items for.

  • :max_results (Integer)

    The maximum number of related items per page.

  • :next_token (String)

    The pagination token to continue to the next page of results.

Returns:

See Also:



994
995
996
997
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 994

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 to continue to the next page of results.

Returns:

See Also:



1031
1032
1033
1034
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1031

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 to continue to the next page of results.

Returns:

See Also:



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

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.

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.

Returns:

See Also:



1099
1100
1101
1102
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1099

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 of 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_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 using the following keys:

    • eventTime

    • eventType

  • :incident_record_arn (required, String)

    The Amazon Resource Name (ARN) of the incident that the event is part of.

  • :max_results (Integer)

    The maximum number of results per page.

  • :next_token (String)

    The pagination token to continue to the next page of results.

  • :sort_by (String)

    Sort 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:



1175
1176
1177
1178
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1175

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.

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 you're adding the resource policy to.

Returns:

See Also:



1208
1209
1210
1211
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1208

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: [
    {
      identifier: { # required
        type: "ANALYSIS", # required, accepts ANALYSIS, INCIDENT, METRIC, PARENT, ATTACHMENT, OTHER
        value: { # required
          arn: "Arn",
          metric_definition: "MetricDefinition",
          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 action 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.

    Possible impacts:

    • 1 - Critical impact, this typically relates to full application failure that impacts many to all customers.

    • 2 - High impact, partial application failure with impact to many customers.

    • 3 - Medium impact, the application is providing reduced service to customers.

    • 4 - Low impact, customer might aren't impacted by the problem yet.

    • 5 - No impact, customers aren't currently impacted but urgent action is needed to avoid impact.

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

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

  • :response_plan_arn (required, String)

    The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat channels, 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:



1301
1302
1303
1304
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1301

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 that you are adding to the response plan.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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 you're removing from the response plan.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1357
1358
1359
1360
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1357

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 you're updating.

  • :client_token (String)

    A token ensuring that the action 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)

    Details if deletion protection is enabled or disabled in your account.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1393
1394
1395
1396
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1393

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 action 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 AWS Chatbot chat channel for responders to collaborate in.

  • :client_token (String)

    A token ensuring that the action 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 customers and applications. Providing an impact overwrites the impact provided by the response plan.

    Possible impacts:

    • 1 - Critical impact, this typically relates to full application failure that impacts many to all customers.

    • 2 - High impact, partial application failure with impact to many customers.

    • 3 - Medium impact, the application is providing reduced service to customers.

    • 4 - Low impact, customer might aren't impacted by the problem yet.

    • 5 - No impact, customers aren't currently impacted but urgent action is needed to avoid impact.

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

    The SNS targets that AWS Chatbot uses to notify the chat channel of updates to an incident. You can also make updates to the incident through the chat channel using the SNS topics.

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

  • :status (String)

    The status of the incident. An incident can be Open or Resolved.

  • :summary (String)

    The summary describes what has happened during the incident.

  • :title (String)

    The title of the incident is a brief and easily recognizable.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1486
1487
1488
1489
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1486

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: {
      identifier: { # required
        type: "ANALYSIS", # required, accepts ANALYSIS, INCIDENT, METRIC, PARENT, ATTACHMENT, OTHER
        value: { # required
          arn: "Arn",
          metric_definition: "MetricDefinition",
          url: "Url",
        },
      },
      title: "RelatedItemTitleString",
    },
    item_to_remove: {
      type: "ANALYSIS", # required, accepts ANALYSIS, INCIDENT, METRIC, PARENT, ATTACHMENT, OTHER
      value: { # required
        arn: "Arn",
        metric_definition: "MetricDefinition",
        url: "Url",
      },
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    A token ensuring that the action is called 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 you are updating related items in.

  • :related_items_update (required, Types::RelatedItemsUpdate)

    Details about the item you are adding or deleting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1542
1543
1544
1545
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1542

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 ensuring that the action 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:



1587
1588
1589
1590
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1587

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",
        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_title: "IncidentTitle",
})

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 AWS Chatbot chat channel used for collaboration during an incident.

  • :client_token (String)

    A token ensuring that the action 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. Can't contain spaces.

  • :engagements (Array<String>)

    The contacts and escalation plans that Incident Manager engages at the start of the incident.

  • :incident_template_dedupe_string (String)

    Used to create only one incident record for an incident.

  • :incident_template_impact (Integer)

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

    Possible impacts:

    • 5 - Severe impact

    • 4 - High impact

    • 3 - Medium impact

    • 2 - Low impact

    • 1 - No impact

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

    The SNS targets that AWS Chatbot uses to notify the chat channels and perform actions on the incident record.

  • :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_title (String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1691
1692
1693
1694
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1691

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", # required
  event_data: "EventData",
  event_id: "UUID", # required
  event_time: Time.now,
  event_type: "TimelineEventType",
  incident_record_arn: "Arn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (required, String)

    A token ensuring that the action is called 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 you are updating. You can find this by using ListTimelineEvents.

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

    The time that the event occurred.

  • :event_type (String)

    The type of the event. You can update events of type Custom Event.

  • :incident_record_arn (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1740
1741
1742
1743
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1740

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.



1851
1852
1853
1854
1855
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1851

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