Class: Aws::SSMIncidents::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::SSMIncidents::Client
- 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
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.
Instance Method Summary collapse
-
#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.
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.
467 468 469 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 467 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.
520 521 522 523 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 520 def batch_get_incident_findings(params = {}, = {}) req = build_request(:batch_get_incident_findings, params) req.send_request() end |
#create_replication_set(params = {}) ⇒ Types::CreateReplicationSetOutput
A replication set replicates and encrypts your data to the provided Regions with the provided KMS key.
568 569 570 571 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 568 def create_replication_set(params = {}, = {}) req = build_request(:create_replication_set, params) req.send_request() 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.
684 685 686 687 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 684 def create_response_plan(params = {}, = {}) req = build_request(:create_response_plan, params) req.send_request() 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.
759 760 761 762 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 759 def create_timeline_event(params = {}, = {}) req = build_request(:create_timeline_event, params) req.send_request() end |
#delete_incident_record(params = {}) ⇒ Struct
Delete an incident record from Incident Manager.
782 783 784 785 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 782 def delete_incident_record(params = {}, = {}) req = build_request(:delete_incident_record, params) req.send_request() end |
#delete_replication_set(params = {}) ⇒ Struct
Deletes all Regions in your replication set. Deleting the replication set deletes all Incident Manager data.
806 807 808 809 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 806 def delete_replication_set(params = {}, = {}) req = build_request(:delete_replication_set, params) req.send_request() end |
#delete_resource_policy(params = {}) ⇒ Struct
Deletes the resource policy that Resource Access Manager uses to share your Incident Manager resource.
834 835 836 837 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 834 def delete_resource_policy(params = {}, = {}) req = build_request(:delete_resource_policy, params) req.send_request() 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.
858 859 860 861 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 858 def delete_response_plan(params = {}, = {}) req = build_request(:delete_response_plan, params) req.send_request() end |
#delete_timeline_event(params = {}) ⇒ Struct
Deletes a timeline event from an incident.
886 887 888 889 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 886 def delete_timeline_event(params = {}, = {}) req = build_request(:delete_timeline_event, params) req.send_request() end |
#get_incident_record(params = {}) ⇒ Types::GetIncidentRecordOutput
Returns the details for the specified incident record.
933 934 935 936 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 933 def get_incident_record(params = {}, = {}) req = build_request(:get_incident_record, params) req.send_request() 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
979 980 981 982 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 979 def get_replication_set(params = {}, = {}) req = build_request(:get_replication_set, params) req.send_request() 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.
1026 1027 1028 1029 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1026 def get_resource_policies(params = {}, = {}) req = build_request(:get_resource_policies, params) req.send_request() end |
#get_response_plan(params = {}) ⇒ Types::GetResponsePlanOutput
Retrieves the details of the specified response plan.
1089 1090 1091 1092 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1089 def get_response_plan(params = {}, = {}) req = build_request(:get_response_plan, params) req.send_request() end |
#get_timeline_event(params = {}) ⇒ Types::GetTimelineEventOutput
Retrieves a timeline event based on its ID and incident record.
1131 1132 1133 1134 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1131 def get_timeline_event(params = {}, = {}) req = build_request(:get_timeline_event, params) req.send_request() 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.
1179 1180 1181 1182 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1179 def list_incident_findings(params = {}, = {}) req = build_request(:list_incident_findings, params) req.send_request() 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.
1264 1265 1266 1267 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1264 def list_incident_records(params = {}, = {}) req = build_request(:list_incident_records, params) req.send_request() end |
#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.
1315 1316 1317 1318 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1315 def (params = {}, = {}) req = build_request(:list_related_items, params) req.send_request() 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.
1353 1354 1355 1356 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1353 def list_replication_sets(params = {}, = {}) req = build_request(:list_replication_sets, params) req.send_request() 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.
1393 1394 1395 1396 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1393 def list_response_plans(params = {}, = {}) req = build_request(:list_response_plans, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags that are attached to the specified response plan or incident.
1423 1424 1425 1426 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1423 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() 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.
1516 1517 1518 1519 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1516 def list_timeline_events(params = {}, = {}) req = build_request(:list_timeline_events, params) req.send_request() 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.
1556 1557 1558 1559 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1556 def put_resource_policy(params = {}, = {}) req = build_request(:put_resource_policy, params) req.send_request() end |
#start_incident(params = {}) ⇒ Types::StartIncidentOutput
Used to start an incident from CloudWatch alarms, EventBridge events, or manually.
1650 1651 1652 1653 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1650 def start_incident(params = {}, = {}) req = build_request(:start_incident, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds a tag to a response plan.
1679 1680 1681 1682 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1679 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes a tag from a resource.
1706 1707 1708 1709 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1706 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_deletion_protection(params = {}) ⇒ Struct
Update deletion protection to either allow or deny deletion of the final Region in a replication set.
1741 1742 1743 1744 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1741 def update_deletion_protection(params = {}, = {}) req = build_request(:update_deletion_protection, params) req.send_request() 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.
1830 1831 1832 1833 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1830 def update_incident_record(params = {}, = {}) req = build_request(:update_incident_record, params) req.send_request() end |
#update_related_items(params = {}) ⇒ Struct
Add or remove related items from the related items tab of an incident record.
1898 1899 1900 1901 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1898 def (params = {}, = {}) req = build_request(:update_related_items, params) req.send_request() end |
#update_replication_set(params = {}) ⇒ Struct
Add or delete Regions from your replication set.
1943 1944 1945 1946 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 1943 def update_replication_set(params = {}, = {}) req = build_request(:update_replication_set, params) req.send_request() end |
#update_response_plan(params = {}) ⇒ Struct
Updates the specified response plan.
2081 2082 2083 2084 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 2081 def update_response_plan(params = {}, = {}) req = build_request(:update_response_plan, params) req.send_request() end |
#update_timeline_event(params = {}) ⇒ Struct
Updates a timeline event. You can update events of type Custom
Event
.
2151 2152 2153 2154 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 2151 def update_timeline_event(params = {}, = {}) req = build_request(:update_timeline_event, params) req.send_request() 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 |
2267 2268 2269 2270 2271 |
# File 'gems/aws-sdk-ssmincidents/lib/aws-sdk-ssmincidents/client.rb', line 2267 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |