Class: Aws::SSMIncidents::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::SSMIncidents::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-ssmincidents/client.rb,
sig/client.rbs
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.
Defined Under Namespace
Modules: _BatchGetIncidentFindingsResponseSuccess, _CreateReplicationSetResponseSuccess, _CreateResponsePlanResponseSuccess, _CreateTimelineEventResponseSuccess, _DeleteIncidentRecordResponseSuccess, _DeleteReplicationSetResponseSuccess, _DeleteResourcePolicyResponseSuccess, _DeleteResponsePlanResponseSuccess, _DeleteTimelineEventResponseSuccess, _GetIncidentRecordResponseSuccess, _GetReplicationSetResponseSuccess, _GetResourcePoliciesResponseSuccess, _GetResponsePlanResponseSuccess, _GetTimelineEventResponseSuccess, _ListIncidentFindingsResponseSuccess, _ListIncidentRecordsResponseSuccess, _ListRelatedItemsResponseSuccess, _ListReplicationSetsResponseSuccess, _ListResponsePlansResponseSuccess, _ListTagsForResourceResponseSuccess, _ListTimelineEventsResponseSuccess, _PutResourcePolicyResponseSuccess, _StartIncidentResponseSuccess, _TagResourceResponseSuccess, _UntagResourceResponseSuccess, _UpdateDeletionProtectionResponseSuccess, _UpdateIncidentRecordResponseSuccess, _UpdateRelatedItemsResponseSuccess, _UpdateReplicationSetResponseSuccess, _UpdateResponsePlanResponseSuccess, _UpdateTimelineEventResponseSuccess
Constant Summary collapse
- Params =
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#batch_get_incident_findings(params = {}) ⇒ Types::BatchGetIncidentFindingsOutput
Retrieves details about all specified findings for an incident, including descriptive details about each finding.
-
#create_replication_set(params = {}) ⇒ Types::CreateReplicationSetOutput
A replication set replicates and encrypts your data to the provided Regions with the provided KMS key.
-
#create_response_plan(params = {}) ⇒ Types::CreateResponsePlanOutput
Creates a response plan that automates the initial response to incidents.
-
#create_timeline_event(params = {}) ⇒ Types::CreateTimelineEventOutput
Creates a custom timeline event on the incident details page of an incident record.
-
#delete_incident_record(params = {}) ⇒ Struct
Delete an incident record from Incident Manager.
-
#delete_replication_set(params = {}) ⇒ Struct
Deletes all Regions in your replication set.
-
#delete_resource_policy(params = {}) ⇒ Struct
Deletes the resource policy that Resource Access Manager uses to share your Incident Manager resource.
-
#delete_response_plan(params = {}) ⇒ Struct
Deletes the specified response plan.
-
#delete_timeline_event(params = {}) ⇒ Struct
Deletes a timeline event from an incident.
-
#get_incident_record(params = {}) ⇒ Types::GetIncidentRecordOutput
Returns the details for the specified incident record.
-
#get_replication_set(params = {}) ⇒ Types::GetReplicationSetOutput
Retrieve your Incident Manager replication set.
-
#get_resource_policies(params = {}) ⇒ Types::GetResourcePoliciesOutput
Retrieves the resource policies attached to the specified response plan.
-
#get_response_plan(params = {}) ⇒ Types::GetResponsePlanOutput
Retrieves the details of the specified response plan.
-
#get_timeline_event(params = {}) ⇒ Types::GetTimelineEventOutput
Retrieves a timeline event based on its ID and incident record.
-
#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.
-
#list_incident_records(params = {}) ⇒ Types::ListIncidentRecordsOutput
Lists all incident records in your account.
-
#list_related_items(params = {}) ⇒ Types::ListRelatedItemsOutput
List all related items for an incident record.
-
#list_replication_sets(params = {}) ⇒ Types::ListReplicationSetsOutput
Lists details about the replication set configured in your account.
-
#list_response_plans(params = {}) ⇒ Types::ListResponsePlansOutput
Lists all response plans in your account.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags that are attached to the specified response plan or incident.
-
#list_timeline_events(params = {}) ⇒ Types::ListTimelineEventsOutput
Lists timeline events for the specified incident record.
-
#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyOutput
Adds a resource policy to the specified response plan.
-
#start_incident(params = {}) ⇒ Types::StartIncidentOutput
Used to start an incident from CloudWatch alarms, EventBridge events, or manually.
-
#tag_resource(params = {}) ⇒ Struct
Adds a tag to a response plan.
-
#untag_resource(params = {}) ⇒ Struct
Removes a tag from a resource.
-
#update_deletion_protection(params = {}) ⇒ Struct
Update deletion protection to either allow or deny deletion of the final Region in a replication set.
-
#update_incident_record(params = {}) ⇒ Struct
Update the details of an incident record.
-
#update_related_items(params = {}) ⇒ Struct
Add or remove related items from the related items tab of an incident record.
-
#update_replication_set(params = {}) ⇒ Struct
Add or delete Regions from your replication set.
-
#update_response_plan(params = {}) ⇒ Struct
Updates the specified response plan.
-
#update_timeline_event(params = {}) ⇒ Struct
Updates a timeline event.
Class Method Summary collapse
- .errors_module ⇒ Object private
- .new ⇒ Object
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
471 472 473 |
# File 'lib/aws-sdk-ssmincidents/client.rb', line 471 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2306 2307 2308 |
# File 'lib/aws-sdk-ssmincidents/client.rb', line 2306 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2309 2310 2311 |
# File 'lib/aws-sdk-ssmincidents/client.rb', line 2309 def errors_module Errors end |
.new ⇒ Object
14 |
# File 'sig/client.rbs', line 14
def self.new: (
|
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.
87 |
# File 'sig/client.rbs', line 87
def batch_get_incident_findings: (
|
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 |
# File 'lib/aws-sdk-ssmincidents/client.rb', line 2164 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::SSMIncidents') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-ssmincidents' context[:gem_version] = '1.71.0' Seahorse::Client::Request.new(handlers, context) end |
#create_replication_set(params = {}) ⇒ Types::CreateReplicationSetOutput
A replication set replicates and encrypts your data to the provided Regions with the provided KMS key.
98 |
# File 'sig/client.rbs', line 98
def create_replication_set: (
|
#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.
112 |
# File 'sig/client.rbs', line 112
def create_response_plan: (
|
#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.
150 |
# File 'sig/client.rbs', line 150
def create_timeline_event: (
|
#delete_incident_record(params = {}) ⇒ Struct
Delete an incident record from Incident Manager.
169 |
# File 'sig/client.rbs', line 169
def delete_incident_record: (
|
#delete_replication_set(params = {}) ⇒ Struct
Deletes all Regions in your replication set. Deleting the replication set deletes all Incident Manager data.
178 |
# File 'sig/client.rbs', line 178
def delete_replication_set: (
|
#delete_resource_policy(params = {}) ⇒ Struct
Deletes the resource policy that Resource Access Manager uses to share your Incident Manager resource.
187 |
# File 'sig/client.rbs', line 187
def delete_resource_policy: (
|
#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.
197 |
# File 'sig/client.rbs', line 197
def delete_response_plan: (
|
#delete_timeline_event(params = {}) ⇒ Struct
Deletes a timeline event from an incident.
206 |
# File 'sig/client.rbs', line 206
def delete_timeline_event: (
|
#get_incident_record(params = {}) ⇒ Types::GetIncidentRecordOutput
Returns the details for the specified incident record.
217 |
# File 'sig/client.rbs', line 217
def get_incident_record: (
|
#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
227 |
# File 'sig/client.rbs', line 227
def get_replication_set: (
|
#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.
238 |
# File 'sig/client.rbs', line 238
def get_resource_policies: (
|
#get_response_plan(params = {}) ⇒ Types::GetResponsePlanOutput
Retrieves the details of the specified response plan.
257 |
# File 'sig/client.rbs', line 257
def get_response_plan: (
|
#get_timeline_event(params = {}) ⇒ Types::GetTimelineEventOutput
Retrieves a timeline event based on its ID and incident record.
267 |
# File 'sig/client.rbs', line 267
def get_timeline_event: (
|
#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.
279 |
# File 'sig/client.rbs', line 279
def list_incident_findings: (
|
#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.
292 |
# File 'sig/client.rbs', line 292
def list_incident_records: (
|
#list_related_items(params = {}) ⇒ Types::ListRelatedItemsOutput
List all related items for an incident record.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
307 |
# File 'sig/client.rbs', line 307
def list_related_items: (
|
#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.
320 |
# File 'sig/client.rbs', line 320
def list_replication_sets: (
|
#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.
332 |
# File 'sig/client.rbs', line 332
def list_response_plans: (
|
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags that are attached to the specified response plan or incident.
343 |
# File 'sig/client.rbs', line 343
def list_tags_for_resource: (
|
#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.
354 |
# File 'sig/client.rbs', line 354
def list_timeline_events: (
|
#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.
371 |
# File 'sig/client.rbs', line 371
def put_resource_policy: (
|
#start_incident(params = {}) ⇒ Types::StartIncidentOutput
Used to start an incident from CloudWatch alarms, EventBridge events, or manually.
382 |
# File 'sig/client.rbs', line 382
def start_incident: (
|
#tag_resource(params = {}) ⇒ Struct
Adds a tag to a response plan.
403 |
# File 'sig/client.rbs', line 403
def tag_resource: (
|
#untag_resource(params = {}) ⇒ Struct
Removes a tag from a resource.
413 |
# File 'sig/client.rbs', line 413
def untag_resource: (
|
#update_deletion_protection(params = {}) ⇒ Struct
Update deletion protection to either allow or deny deletion of the final Region in a replication set.
423 |
# File 'sig/client.rbs', line 423
def update_deletion_protection: (
|
#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.
434 |
# File 'sig/client.rbs', line 434
def update_incident_record: (
|
#update_related_items(params = {}) ⇒ Struct
Add or remove related items from the related items tab of an incident record.
458 |
# File 'sig/client.rbs', line 458
def update_related_items: (
|
#update_replication_set(params = {}) ⇒ Struct
Add or delete Regions from your replication set.
472 |
# File 'sig/client.rbs', line 472
def update_replication_set: (
|
#update_response_plan(params = {}) ⇒ Struct
Updates the specified response plan.
493 |
# File 'sig/client.rbs', line 493
def update_response_plan: (
|
#update_timeline_event(params = {}) ⇒ Struct
Updates a timeline event. You can update events of type Custom Event.
526 |
# File 'sig/client.rbs', line 526
def update_timeline_event: (
|
#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 |
543 |
# File 'sig/client.rbs', line 543
def wait_until: (:wait_for_replication_set_active waiter_name,
|
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2279 2280 2281 |
# File 'lib/aws-sdk-ssmincidents/client.rb', line 2279 def waiter_names waiters.keys end |