Class: Aws::Resiliencehubv2::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Resiliencehubv2::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-resiliencehubv2/client.rb,
sig/client.rbs
Overview
An API client for Resiliencehubv2. To construct a client, you need to configure a :region and :credentials.
client = Aws::Resiliencehubv2::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: _CreateAssertionResponseSuccess, _CreateInputSourceResponseSuccess, _CreatePolicyResponseSuccess, _CreateReportResponseSuccess, _CreateServiceFunctionResourcesResponseSuccess, _CreateServiceFunctionResponseSuccess, _CreateServiceResponseSuccess, _CreateSystemResponseSuccess, _CreateUserJourneyResponseSuccess, _DeleteAssertionResponseSuccess, _DeleteInputSourceResponseSuccess, _DeletePolicyResponseSuccess, _DeleteServiceFunctionResourcesResponseSuccess, _DeleteServiceFunctionResponseSuccess, _DeleteServiceResponseSuccess, _DeleteSystemResponseSuccess, _DeleteUserJourneyResponseSuccess, _GetFailureModeFindingResponseSuccess, _GetPolicyResponseSuccess, _GetServiceResponseSuccess, _GetSystemResponseSuccess, _GetUserJourneyResponseSuccess, _ImportAppResponseSuccess, _ImportPolicyResponseSuccess, _ListAssertionsResponseSuccess, _ListDependenciesResponseSuccess, _ListFailureModeAssessmentsResponseSuccess, _ListFailureModeFindingsResponseSuccess, _ListInputSourcesResponseSuccess, _ListPoliciesResponseSuccess, _ListReportsResponseSuccess, _ListResourcesResponseSuccess, _ListServiceEventsResponseSuccess, _ListServiceFunctionsResponseSuccess, _ListServiceTopologyEdgesResponseSuccess, _ListServicesResponseSuccess, _ListSystemEventsResponseSuccess, _ListSystemsResponseSuccess, _ListTagsForResourceResponseSuccess, _ListUserJourneysResponseSuccess, _StartFailureModeAssessmentResponseSuccess, _TagResourceResponseSuccess, _UntagResourceResponseSuccess, _UpdateAssertionResponseSuccess, _UpdateDependencyResponseSuccess, _UpdateFailureModeFindingResponseSuccess, _UpdatePolicyResponseSuccess, _UpdateServiceFunctionResponseSuccess, _UpdateServiceResponseSuccess, _UpdateSystemResponseSuccess, _UpdateUserJourneyResponseSuccess
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_assertion(params = {}) ⇒ Types::CreateAssertionResponse
Creates a resilience assertion for a service.
-
#create_input_source(params = {}) ⇒ Types::CreateInputSourceResponse
Creates an input source for a service.
-
#create_policy(params = {}) ⇒ Types::CreatePolicyResponse
Creates a resilience policy that defines availability and disaster recovery requirements.
-
#create_report(params = {}) ⇒ Types::CreateReportResponse
On-demand report creation.
-
#create_service(params = {}) ⇒ Types::CreateServiceResponse
Creates a service.
-
#create_service_function(params = {}) ⇒ Types::CreateServiceFunctionResponse
Creates a service function within a service.
-
#create_service_function_resources(params = {}) ⇒ Types::CreateServiceFunctionResourcesResponse
Associates resources with a service function.
-
#create_system(params = {}) ⇒ Types::CreateSystemResponse
Creates a system that represents a logical grouping of services.
-
#create_user_journey(params = {}) ⇒ Types::CreateUserJourneyResponse
Creates a user journey within a system.
-
#delete_assertion(params = {}) ⇒ Types::DeleteAssertionResponse
Deletes a resilience assertion from a service.
-
#delete_input_source(params = {}) ⇒ Types::DeleteInputSourceResponse
Deletes an input source.
-
#delete_policy(params = {}) ⇒ Types::DeletePolicyResponse
Deletes a resilience policy.
-
#delete_service(params = {}) ⇒ Types::DeleteServiceResponse
Deletes a service.
-
#delete_service_function(params = {}) ⇒ Types::DeleteServiceFunctionResponse
Deletes a service function.
-
#delete_service_function_resources(params = {}) ⇒ Types::DeleteServiceFunctionResourcesResponse
Removes resources from a service function.
-
#delete_system(params = {}) ⇒ Types::DeleteSystemResponse
Deletes a system.
-
#delete_user_journey(params = {}) ⇒ Types::DeleteUserJourneyResponse
Deletes a user journey.
-
#get_failure_mode_finding(params = {}) ⇒ Types::GetFailureModeFindingResponse
Retrieves a finding by findingId.
-
#get_policy(params = {}) ⇒ Types::GetPolicyResponse
Retrieves a resilience policy by ARN.
-
#get_service(params = {}) ⇒ Types::GetServiceResponse
Retrieves a service by ARN.
-
#get_system(params = {}) ⇒ Types::GetSystemResponse
Retrieves a system by ARN.
-
#get_user_journey(params = {}) ⇒ Types::GetUserJourneyResponse
Retrieves a user journey.
-
#import_app(params = {}) ⇒ Types::ImportAppResponse
Imports a V1 app into the V2 resource model, creating a service with the same name.
-
#import_policy(params = {}) ⇒ Types::ImportPolicyResponse
Imports a V1 policy into V2, mapping RTO/RPO values from V1 scenarios.
-
#list_assertions(params = {}) ⇒ Types::ListAssertionsResponse
Lists resilience assertions for a service.
-
#list_dependencies(params = {}) ⇒ Types::ListDependenciesResponse
Lists dependencies discovered for services.
-
#list_failure_mode_assessments(params = {}) ⇒ Types::ListFailureModeAssessmentsResponse
Lists failure mode assessments.
-
#list_failure_mode_findings(params = {}) ⇒ Types::ListFailureModeFindingsResponse
List findings.
-
#list_input_sources(params = {}) ⇒ Types::ListInputSourcesResponse
Lists input sources for a service.
-
#list_policies(params = {}) ⇒ Types::ListPoliciesResponse
Lists resilience policies.
-
#list_reports(params = {}) ⇒ Types::ListReportsResponse
List reports for a service, or all reports owned by the account if serviceArn is not provided.
-
#list_resources(params = {}) ⇒ Types::ListResourcesResponse
List resources.
-
#list_service_events(params = {}) ⇒ Types::ListServiceEventsResponse
Lists events for a service.
-
#list_service_functions(params = {}) ⇒ Types::ListServiceFunctionsResponse
Lists service functions for a service.
-
#list_service_topology_edges(params = {}) ⇒ Types::ListServiceTopologyEdgesResponse
Lists topology edges for a service.
-
#list_services(params = {}) ⇒ Types::ListServicesResponse
Lists services.
-
#list_system_events(params = {}) ⇒ Types::ListSystemEventsResponse
Lists events for a system.
-
#list_systems(params = {}) ⇒ Types::ListSystemsResponse
Lists systems.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags for a resource.
-
#list_user_journeys(params = {}) ⇒ Types::ListUserJourneysResponse
Lists user journeys for a system.
-
#start_failure_mode_assessment(params = {}) ⇒ Types::StartFailureModeAssessmentResponse
Starts a failure mode assessment.
-
#tag_resource(params = {}) ⇒ Struct
Adds tags to a resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes tags from a resource.
-
#update_assertion(params = {}) ⇒ Types::UpdateAssertionResponse
Updates a resilience assertion.
-
#update_dependency(params = {}) ⇒ Types::UpdateDependencyResponse
Updates a dependency classification.
-
#update_failure_mode_finding(params = {}) ⇒ Types::UpdateFailureModeFindingResponse
Updates an existing finding.
-
#update_policy(params = {}) ⇒ Types::UpdatePolicyResponse
Updates an existing resilience policy.
-
#update_service(params = {}) ⇒ Types::UpdateServiceResponse
Updates an existing service.
-
#update_service_function(params = {}) ⇒ Types::UpdateServiceFunctionResponse
Updates a service function.
-
#update_system(params = {}) ⇒ Types::UpdateSystemResponse
Updates an existing system.
-
#update_user_journey(params = {}) ⇒ Types::UpdateUserJourneyResponse
Updates an existing user journey.
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-resiliencehubv2/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.
3599 3600 3601 |
# File 'lib/aws-sdk-resiliencehubv2/client.rb', line 3599 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.
3602 3603 3604 |
# File 'lib/aws-sdk-resiliencehubv2/client.rb', line 3602 def errors_module Errors end |
.new ⇒ Object
14 |
# File 'sig/client.rbs', line 14
def self.new: (
|
Instance Method Details
#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.
3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 |
# File 'lib/aws-sdk-resiliencehubv2/client.rb', line 3453 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::Resiliencehubv2') ) 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-resiliencehubv2' context[:gem_version] = '1.1.0' Seahorse::Client::Request.new(handlers, context) end |
#create_assertion(params = {}) ⇒ Types::CreateAssertionResponse
Creates a resilience assertion for a service.
86 |
# File 'sig/client.rbs', line 86
def create_assertion: (
|
#create_input_source(params = {}) ⇒ Types::CreateInputSourceResponse
Creates an input source for a service.
99 |
# File 'sig/client.rbs', line 99
def create_input_source: (
|
#create_policy(params = {}) ⇒ Types::CreatePolicyResponse
Creates a resilience policy that defines availability and disaster recovery requirements.
125 |
# File 'sig/client.rbs', line 125
def create_policy: (
|
#create_report(params = {}) ⇒ Types::CreateReportResponse
On-demand report creation. Idempotent — duplicate requests with same clientToken return existing result.
155 |
# File 'sig/client.rbs', line 155
def create_report: (
|
#create_service(params = {}) ⇒ Types::CreateServiceResponse
Creates a service.
167 |
# File 'sig/client.rbs', line 167
def create_service: (
|
#create_service_function(params = {}) ⇒ Types::CreateServiceFunctionResponse
Creates a service function within a service.
201 |
# File 'sig/client.rbs', line 201
def create_service_function: (
|
#create_service_function_resources(params = {}) ⇒ Types::CreateServiceFunctionResourcesResponse
Associates resources with a service function.
217 |
# File 'sig/client.rbs', line 217
def create_service_function_resources: (
|
#create_system(params = {}) ⇒ Types::CreateSystemResponse
Creates a system that represents a logical grouping of services.
229 |
# File 'sig/client.rbs', line 229
def create_system: (
|
#create_user_journey(params = {}) ⇒ Types::CreateUserJourneyResponse
Creates a user journey within a system.
244 |
# File 'sig/client.rbs', line 244
def create_user_journey: (
|
#delete_assertion(params = {}) ⇒ Types::DeleteAssertionResponse
Deletes a resilience assertion from a service.
258 |
# File 'sig/client.rbs', line 258
def delete_assertion: (
|
#delete_input_source(params = {}) ⇒ Types::DeleteInputSourceResponse
Deletes an input source.
270 |
# File 'sig/client.rbs', line 270
def delete_input_source: (
|
#delete_policy(params = {}) ⇒ Types::DeletePolicyResponse
Deletes a resilience policy.
281 |
# File 'sig/client.rbs', line 281
def delete_policy: (
|
#delete_service(params = {}) ⇒ Types::DeleteServiceResponse
Deletes a service.
291 |
# File 'sig/client.rbs', line 291
def delete_service: (
|
#delete_service_function(params = {}) ⇒ Types::DeleteServiceFunctionResponse
Deletes a service function.
301 |
# File 'sig/client.rbs', line 301
def delete_service_function: (
|
#delete_service_function_resources(params = {}) ⇒ Types::DeleteServiceFunctionResourcesResponse
Removes resources from a service function.
314 |
# File 'sig/client.rbs', line 314
def delete_service_function_resources: (
|
#delete_system(params = {}) ⇒ Types::DeleteSystemResponse
Deletes a system.
326 |
# File 'sig/client.rbs', line 326
def delete_system: (
|
#delete_user_journey(params = {}) ⇒ Types::DeleteUserJourneyResponse
Deletes a user journey.
336 |
# File 'sig/client.rbs', line 336
def delete_user_journey: (
|
#get_failure_mode_finding(params = {}) ⇒ Types::GetFailureModeFindingResponse
Retrieves a finding by findingId.
347 |
# File 'sig/client.rbs', line 347
def get_failure_mode_finding: (
|
#get_policy(params = {}) ⇒ Types::GetPolicyResponse
Retrieves a resilience policy by ARN.
358 |
# File 'sig/client.rbs', line 358
def get_policy: (
|
#get_service(params = {}) ⇒ Types::GetServiceResponse
Retrieves a service by ARN.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* service_assessment_completed
* service_resource_discovery_completed
368 |
# File 'sig/client.rbs', line 368
def get_service: (
|
#get_system(params = {}) ⇒ Types::GetSystemResponse
Retrieves a system by ARN.
378 |
# File 'sig/client.rbs', line 378
def get_system: (
|
#get_user_journey(params = {}) ⇒ Types::GetUserJourneyResponse
Retrieves a user journey.
388 |
# File 'sig/client.rbs', line 388
def get_user_journey: (
|
#import_app(params = {}) ⇒ Types::ImportAppResponse
Imports a V1 app into the V2 resource model, creating a service with the same name.
399 |
# File 'sig/client.rbs', line 399
def import_app: (
|
#import_policy(params = {}) ⇒ Types::ImportPolicyResponse
Imports a V1 policy into V2, mapping RTO/RPO values from V1 scenarios.
421 |
# File 'sig/client.rbs', line 421
def import_policy: (
|
#list_assertions(params = {}) ⇒ Types::ListAssertionsResponse
Lists resilience assertions for a service.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
440 |
# File 'sig/client.rbs', line 440
def list_assertions: (
|
#list_dependencies(params = {}) ⇒ Types::ListDependenciesResponse
Lists dependencies discovered for services.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
454 |
# File 'sig/client.rbs', line 454
def list_dependencies: (
|
#list_failure_mode_assessments(params = {}) ⇒ Types::ListFailureModeAssessmentsResponse
Lists failure mode assessments.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* failure_mode_assessment_success
470 |
# File 'sig/client.rbs', line 470
def list_failure_mode_assessments: (
|
#list_failure_mode_findings(params = {}) ⇒ Types::ListFailureModeFindingsResponse
List findings.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
488 |
# File 'sig/client.rbs', line 488
def list_failure_mode_findings: (
|
#list_input_sources(params = {}) ⇒ Types::ListInputSourcesResponse
Lists input sources for a service.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
504 |
# File 'sig/client.rbs', line 504
def list_input_sources: (
|
#list_policies(params = {}) ⇒ Types::ListPoliciesResponse
Lists resilience policies.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
518 |
# File 'sig/client.rbs', line 518
def list_policies: (
|
#list_reports(params = {}) ⇒ Types::ListReportsResponse
List reports for a service, or all reports owned by the account if serviceArn is not provided.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* report_succeeded
530 |
# File 'sig/client.rbs', line 530
def list_reports: (
|
#list_resources(params = {}) ⇒ Types::ListResourcesResponse
List resources.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
545 |
# File 'sig/client.rbs', line 545
def list_resources: (
|
#list_service_events(params = {}) ⇒ Types::ListServiceEventsResponse
Lists events for a service.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
562 |
# File 'sig/client.rbs', line 562
def list_service_events: (
|
#list_service_functions(params = {}) ⇒ Types::ListServiceFunctionsResponse
Lists service functions for a service.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
578 |
# File 'sig/client.rbs', line 578
def list_service_functions: (
|
#list_service_topology_edges(params = {}) ⇒ Types::ListServiceTopologyEdgesResponse
Lists topology edges for a service.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
591 |
# File 'sig/client.rbs', line 591
def list_service_topology_edges: (
|
#list_services(params = {}) ⇒ Types::ListServicesResponse
Lists services.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
604 |
# File 'sig/client.rbs', line 604
def list_services: (
|
#list_system_events(params = {}) ⇒ Types::ListSystemEventsResponse
Lists events for a system.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
622 |
# File 'sig/client.rbs', line 622
def list_system_events: (
|
#list_systems(params = {}) ⇒ Types::ListSystemsResponse
Lists systems.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
638 |
# File 'sig/client.rbs', line 638
def list_systems: (
|
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags for a resource.
650 |
# File 'sig/client.rbs', line 650
def list_tags_for_resource: (
|
#list_user_journeys(params = {}) ⇒ Types::ListUserJourneysResponse
Lists user journeys for a system.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
661 |
# File 'sig/client.rbs', line 661
def list_user_journeys: (
|
#start_failure_mode_assessment(params = {}) ⇒ Types::StartFailureModeAssessmentResponse
Starts a failure mode assessment.
676 |
# File 'sig/client.rbs', line 676
def start_failure_mode_assessment: (
|
#tag_resource(params = {}) ⇒ Struct
Adds tags to a resource.
686 |
# File 'sig/client.rbs', line 686
def tag_resource: (
|
#untag_resource(params = {}) ⇒ Struct
Removes tags from a resource.
696 |
# File 'sig/client.rbs', line 696
def untag_resource: (
|
#update_assertion(params = {}) ⇒ Types::UpdateAssertionResponse
Updates a resilience assertion.
707 |
# File 'sig/client.rbs', line 707
def update_assertion: (
|
#update_dependency(params = {}) ⇒ Types::UpdateDependencyResponse
Updates a dependency classification.
725 |
# File 'sig/client.rbs', line 725
def update_dependency: (
|
#update_failure_mode_finding(params = {}) ⇒ Types::UpdateFailureModeFindingResponse
Updates an existing finding.
738 |
# File 'sig/client.rbs', line 738
def update_failure_mode_finding: (
|
#update_policy(params = {}) ⇒ Types::UpdatePolicyResponse
Updates an existing resilience policy.
751 |
# File 'sig/client.rbs', line 751
def update_policy: (
|
#update_service(params = {}) ⇒ Types::UpdateServiceResponse
Updates an existing service.
778 |
# File 'sig/client.rbs', line 778
def update_service: (
|
#update_service_function(params = {}) ⇒ Types::UpdateServiceFunctionResponse
Updates a service function.
809 |
# File 'sig/client.rbs', line 809
def update_service_function: (
|
#update_system(params = {}) ⇒ Types::UpdateSystemResponse
Updates an existing system.
823 |
# File 'sig/client.rbs', line 823
def update_system: (
|
#update_user_journey(params = {}) ⇒ Types::UpdateUserJourneyResponse
Updates an existing user journey.
835 |
# File 'sig/client.rbs', line 835
def update_user_journey: (
|
#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 |
|---|---|---|---|
| failure_mode_assessment_success | #list_failure_mode_assessments | 30 | 5 |
| report_succeeded | #list_reports | 30 | 5 |
| service_assessment_completed | #get_service | 30 | 5 |
| service_resource_discovery_completed | #get_service | 30 | 5 |
845 |
# File 'sig/client.rbs', line 845
def wait_until: (:failure_mode_assessment_success 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.
3570 3571 3572 |
# File 'lib/aws-sdk-resiliencehubv2/client.rb', line 3570 def waiter_names waiters.keys end |