Class: Aws::ARCRegionswitch::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::ARCRegionswitch::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb
Overview
An API client for ARCRegionswitch. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::ARCRegionswitch::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
-
#approve_plan_execution_step(params = {}) ⇒ Struct
Approves a step in a plan execution that requires manual approval.
-
#cancel_plan_execution(params = {}) ⇒ Struct
Cancels an in-progress plan execution.
-
#create_plan(params = {}) ⇒ Types::CreatePlanResponse
Creates a new Region switch plan.
-
#delete_plan(params = {}) ⇒ Struct
Deletes a Region switch plan.
-
#get_plan(params = {}) ⇒ Types::GetPlanResponse
Retrieves detailed information about a Region switch plan.
-
#get_plan_evaluation_status(params = {}) ⇒ Types::GetPlanEvaluationStatusResponse
Retrieves the evaluation status of a Region switch plan.
-
#get_plan_execution(params = {}) ⇒ Types::GetPlanExecutionResponse
Retrieves detailed information about a specific plan execution.
-
#get_plan_in_region(params = {}) ⇒ Types::GetPlanInRegionResponse
Retrieves information about a Region switch plan in a specific Amazon Web Services Region.
-
#list_plan_execution_events(params = {}) ⇒ Types::ListPlanExecutionEventsResponse
Lists the events that occurred during a plan execution.
-
#list_plan_executions(params = {}) ⇒ Types::ListPlanExecutionsResponse
Lists the executions of a Region switch plan.
-
#list_plans(params = {}) ⇒ Types::ListPlansResponse
Lists all Region switch plans in your Amazon Web Services account.
-
#list_plans_in_region(params = {}) ⇒ Types::ListPlansInRegionResponse
Lists all Region switch plans in your Amazon Web Services account that are available in the current Amazon Web Services Region.
-
#list_route_53_health_checks(params = {}) ⇒ Types::ListRoute53HealthChecksResponse
List the Amazon Route 53 health checks.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags attached to a Region switch resource.
-
#start_plan_execution(params = {}) ⇒ Types::StartPlanExecutionResponse
Starts the execution of a Region switch plan.
-
#tag_resource(params = {}) ⇒ Struct
Adds or updates tags for a Region switch resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes tags from a Region switch resource.
-
#update_plan(params = {}) ⇒ Types::UpdatePlanResponse
Updates an existing Region switch plan.
-
#update_plan_execution(params = {}) ⇒ Struct
Updates an in-progress plan execution.
-
#update_plan_execution_step(params = {}) ⇒ Struct
Updates a specific step in an in-progress plan execution.
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.
Parameters:
- options (Hash)
Options Hash (options):
-
:plugins
(Array<Seahorse::Client::Plugin>)
— default:
[]]
—
A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.
-
:credentials
(required, Aws::CredentialProvider)
—
Your AWS credentials used for authentication. This can be any class that includes and implements
Aws::CredentialProvider
, or 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 fromaws login
.Aws::ProcessCredentials
- Used for loading credentials from a process that outputs to stdout.Aws::InstanceProfileCredentials
- Used for loading credentials from an EC2 IMDS on an EC2 instance.Aws::ECSCredentials
- Used for loading credentials from instances running in ECS.Aws::CognitoIdentityCredentials
- Used for loading credentials from the Cognito Identity service.
When
:credentials
are not configured directly, the following locations will be searched for credentials:Aws.config[:credentials]
The
:access_key_id
,:secret_access_key
,:session_token
, and:account_id
options.ENV['AWS_ACCESS_KEY_ID']
,ENV['AWS_SECRET_ACCESS_KEY']
,ENV['AWS_SESSION_TOKEN']
, andENV['AWS_ACCOUNT_ID']
.~/.aws/credentials
~/.aws/config
EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of
Aws::InstanceProfileCredentials
orAws::ECSCredentials
to enable retries and extended timeouts. Instance profile credential fetching can be disabled by settingENV['AWS_EC2_METADATA_DISABLED']
totrue
.
-
:region
(required, String)
—
The AWS region to connect to. The configured
:region
is used to determine the service:endpoint
. When not passed, a default:region
is searched for in the following locations:Aws.config[:region]
ENV['AWS_REGION']
ENV['AMAZON_REGION']
ENV['AWS_DEFAULT_REGION']
~/.aws/credentials
~/.aws/config
- :access_key_id (String)
- :account_id (String)
-
:active_endpoint_cache
(Boolean)
— default:
false
—
When set to
true
, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults tofalse
. -
: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 aRetryCapacityNotAvailableError
and will not retry instead of sleeping. -
:auth_scheme_preference
(Array<String>)
—
A list of preferred authentication schemes to use when making a request. Supported values are:
sigv4
,sigv4a
,httpBearerAuth
, andnoAuth
. When set usingENV['AWS_AUTH_SCHEME_PREFERENCE']
or in shared config asauth_scheme_preference
, the value should be a comma-separated list. -
:client_side_monitoring
(Boolean)
— default:
false
—
When
true
, client-side metrics will be collected for all API requests from this client. -
:client_side_monitoring_client_id
(String)
— default:
""
—
Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.
-
:client_side_monitoring_host
(String)
— default:
"127.0.0.1"
—
Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.
-
:client_side_monitoring_port
(Integer)
— default:
31000
—
Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.
-
:client_side_monitoring_publisher
(Aws::ClientSideMonitoring::Publisher)
— default:
Aws::ClientSideMonitoring::Publisher
—
Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.
-
:convert_params
(Boolean)
— default:
true
—
When
true
, an attempt is made to coerce request parameters into the required types. -
:correct_clock_skew
(Boolean)
— default:
true
—
Used only in
standard
and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks. -
:defaults_mode
(String)
— default:
"legacy"
—
See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.
-
:disable_host_prefix_injection
(Boolean)
— default:
false
—
When
true
, the SDK will not prepend the modeled host prefix to the endpoint. -
:disable_request_compression
(Boolean)
— default:
false
—
When set to 'true' the request body will not be compressed for supported operations.
-
:endpoint
(String, URI::HTTPS, URI::HTTP)
—
Normally you should not configure the
:endpoint
option directly. This is normally constructed from the:region
option. Configuring:endpoint
is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:'http://example.com' 'https://example.com' 'http://example.com:123'
-
:endpoint_cache_max_entries
(Integer)
— default:
1000
—
Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.
-
:endpoint_cache_max_threads
(Integer)
— default:
10
—
Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
-
:endpoint_cache_poll_interval
(Integer)
— default:
60
—
When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.
-
:endpoint_discovery
(Boolean)
— default:
false
—
When set to
true
, endpoint discovery will be enabled for operations when available. -
:ignore_configured_endpoint_urls
(Boolean)
—
Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.
-
:log_formatter
(Aws::Log::Formatter)
— default:
Aws::Log::Formatter.default
—
The log formatter.
-
:log_level
(Symbol)
— default:
:info
—
The log level to send messages to the
:logger
at. -
:logger
(Logger)
—
The Logger instance to send log messages to. If this option is not set, logging will be disabled.
-
:max_attempts
(Integer)
— default:
3
—
An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in
standard
andadaptive
retry modes. -
:profile
(String)
— default:
"default"
—
Used when loading credentials from the shared credentials file at
HOME/.aws/credentials
. When not specified, 'default' is used. -
:request_checksum_calculation
(String)
— default:
"when_supported"
—
Determines when a checksum will be calculated for request payloads. Values are:
when_supported
- (default) When set, a checksum will be calculated for all request payloads of operations modeled with thehttpChecksum
trait whererequestChecksumRequired
istrue
and/or arequestAlgorithmMember
is modeled.when_required
- When set, a checksum will only be calculated for request payloads of operations modeled with thehttpChecksum
trait whererequestChecksumRequired
istrue
or where arequestAlgorithmMember
is modeled and supplied.
-
:request_min_compression_size_bytes
(Integer)
— default:
10240
—
The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.
-
:response_checksum_validation
(String)
— default:
"when_supported"
—
Determines when checksum validation will be performed on response payloads. Values are:
when_supported
- (default) When set, checksum validation is performed on all response payloads of operations modeled with thehttpChecksum
trait whereresponseAlgorithms
is modeled, except when no modeled checksum algorithms are supported.when_required
- When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and therequestValidationModeMember
member is set toENABLED
.
-
: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 ofstandard
mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.
-
:sdk_ua_app_id
(String)
—
A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
- :secret_access_key (String)
- :session_token (String)
-
:sigv4a_signing_region_set
(Array)
—
A list of regions that should be signed with SigV4a signing. When not passed, a default
:sigv4a_signing_region_set
is searched for in the following locations:Aws.config[:sigv4a_signing_region_set]
ENV['AWS_SIGV4A_SIGNING_REGION_SET']
~/.aws/config
-
:simple_json
(Boolean)
— default:
false
—
Disables request parameter conversion, validation, and formatting. Also disables response data type conversions. The request parameters hash must be formatted exactly as the API expects.This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.
-
:stub_responses
(Boolean)
— default:
false
—
Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.
Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.
-
:telemetry_provider
(Aws::Telemetry::TelemetryProviderBase)
— default:
Aws::Telemetry::NoOpTelemetryProvider
—
Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses
NoOpTelemetryProvider
which will not record or emit any telemetry data. The SDK supports the following telemetry providers:- OpenTelemetry (OTel) - To use the OTel provider, install and require the
opentelemetry-sdk
gem and then, pass in an instance of aAws::Telemetry::OTelProvider
for telemetry provider.
- OpenTelemetry (OTel) - To use the OTel provider, install and require the
-
:token_provider
(Aws::TokenProvider)
—
Your Bearer token used for authentication. This can be any class that includes and implements
Aws::TokenProvider
, or instance of any one of the following classes:Aws::StaticTokenProvider
- Used for configuring static, non-refreshing tokens.Aws::SSOTokenProvider
- Used for loading tokens from AWS SSO using an access token generated fromaws login
.
When
:token_provider
is not configured directly, theAws::TokenProviderChain
will be used to search for tokens configured for your profile in shared configuration files. -
:use_dualstack_endpoint
(Boolean)
—
When set to
true
, dualstack enabled endpoints (with.aws
TLD) will be used if available. -
:use_fips_endpoint
(Boolean)
—
When set to
true
, fips compatible endpoints will be used if available. When afips
region is used, the region is normalized and this config is set totrue
. -
:validate_params
(Boolean)
— default:
true
—
When
true
, request parameters are validated before sending the request. -
:endpoint_provider
(Aws::ARCRegionswitch::EndpointProvider)
—
The endpoint provider used to resolve endpoints. Any object that responds to
#resolve_endpoint(parameters)
whereparameters
is a Struct similar toAws::ARCRegionswitch::EndpointParameters
. -
:http_continue_timeout
(Float)
— default:
1
—
The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to
nil
which disables this behaviour. This value can safely be set per request on the session. -
:http_idle_timeout
(Float)
— default:
5
—
The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.
-
:http_open_timeout
(Float)
— default:
15
—
The default number of seconds to wait for response data. This value can safely be set per-request on the session.
-
:http_proxy
(URI::HTTP, String)
—
A proxy to send requests through. Formatted like 'http://proxy.com:123'.
-
:http_read_timeout
(Float)
— default:
60
—
The default number of seconds to wait for response data. This value can safely be set per-request on the session.
-
:http_wire_trace
(Boolean)
— default:
false
—
When
true
, HTTP debug output will be sent to the:logger
. -
:on_chunk_received
(Proc)
—
When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a
content-length
). -
:on_chunk_sent
(Proc)
—
When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.
-
:raise_response_errors
(Boolean)
— default:
true
—
When
true
, response errors are raised. -
:ssl_ca_bundle
(String)
—
Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass
:ssl_ca_bundle
or:ssl_ca_directory
the the system default will be used if available. -
:ssl_ca_directory
(String)
—
Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass
:ssl_ca_bundle
or:ssl_ca_directory
the the system default will be used if available. -
:ssl_ca_store
(String)
—
Sets the X509::Store to verify peer certificate.
-
:ssl_cert
(OpenSSL::X509::Certificate)
—
Sets a client certificate when creating http connections.
-
:ssl_key
(OpenSSL::PKey)
—
Sets a client key when creating http connections.
-
:ssl_timeout
(Float)
—
Sets the SSL timeout in seconds
-
:ssl_verify_peer
(Boolean)
— default:
true
—
When
true
, SSL peer certificates are verified when establishing a connection.
480 481 482 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 480 def initialize(*args) super end |
Instance Method Details
#approve_plan_execution_step(params = {}) ⇒ Struct
Approves a step in a plan execution that requires manual approval. When you create a plan, you can include approval steps that require manual intervention before the execution can proceed. This operation allows you to provide that approval.
You must specify the plan ARN, execution ID, step name, and approval status. You can also provide an optional comment explaining the approval decision.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.approve_plan_execution_step({
plan_arn: "PlanArn", # required
execution_id: "ExecutionId", # required
step_name: "StepName", # required
approval: "approve", # required, accepts approve, decline
comment: "ExecutionComment",
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:plan_arn
(required, String)
—
The Amazon Resource Name (ARN) of the plan.
-
:execution_id
(required, String)
—
The execution identifier of a plan execution.
-
:step_name
(required, String)
—
The name of a step in a plan execution.
-
:approval
(required, String)
—
The status of approval for a plan execution step.
-
:comment
(String)
—
A comment that you can enter about a plan execution.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
526 527 528 529 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 526 def approve_plan_execution_step(params = {}, options = {}) req = build_request(:approve_plan_execution_step, params) req.send_request(options) end |
#cancel_plan_execution(params = {}) ⇒ Struct
Cancels an in-progress plan execution. This operation stops the execution of the plan and prevents any further steps from being processed.
You must specify the plan ARN and execution ID. You can also provide an optional comment explaining why the execution was canceled.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.cancel_plan_execution({
plan_arn: "PlanArn", # required
execution_id: "ExecutionId", # required
comment: "ExecutionComment",
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:plan_arn
(required, String)
—
The Amazon Resource Name (ARN) of the plan.
-
:execution_id
(required, String)
—
The execution identifier of a plan execution.
-
:comment
(String)
—
A comment that you can enter about canceling a plan execution step.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
561 562 563 564 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 561 def cancel_plan_execution(params = {}, options = {}) req = build_request(:cancel_plan_execution, params) req.send_request(options) end |
#create_plan(params = {}) ⇒ Types::CreatePlanResponse
Creates a new Region switch plan. A plan defines the steps required to shift traffic from one Amazon Web Services Region to another.
You must specify a name for the plan, the primary Region, and at least one additional Region. You can also provide a description, execution role, recovery time objective, associated alarms, triggers, and workflows that define the steps to execute during a Region switch.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.create_plan({
description: "String",
workflows: [ # required
{
steps: [
{
name: "StepName", # required
description: "String",
execution_block_configuration: { # required
custom_action_lambda_config: {
timeout_minutes: 1,
lambdas: [ # required
{
cross_account_role: "IamRoleArn",
external_id: "String",
arn: "LambdaArn",
},
],
retry_interval_minutes: 1.0, # required
region_to_run: "activatingRegion", # required, accepts activatingRegion, deactivatingRegion
ungraceful: {
behavior: "skip", # accepts skip
},
},
ec2_asg_capacity_increase_config: {
timeout_minutes: 1,
asgs: [ # required
{
cross_account_role: "IamRoleArn",
external_id: "String",
arn: "AsgArn",
},
],
ungraceful: {
minimum_success_percentage: 1, # required
},
target_percent: 1,
capacity_monitoring_approach: "sampledMaxInLast24Hours", # accepts sampledMaxInLast24Hours, autoscalingMaxInLast24Hours
},
execution_approval_config: {
timeout_minutes: 1,
approval_role: "RoleArn", # required
},
arc_routing_control_config: {
timeout_minutes: 1,
cross_account_role: "IamRoleArn",
external_id: "String",
region_and_routing_controls: { # required
"String" => [
{
routing_control_arn: "RoutingControlArn", # required
state: "On", # required, accepts On, Off
},
],
},
},
global_aurora_config: {
timeout_minutes: 1,
cross_account_role: "IamRoleArn",
external_id: "String",
behavior: "switchoverOnly", # required, accepts switchoverOnly, failover
ungraceful: {
ungraceful: "failover", # accepts failover
},
global_cluster_identifier: "GlobalClusterIdentifier", # required
database_cluster_arns: ["AuroraClusterArn"], # required
},
parallel_config: {
steps: { # required
# recursive Steps
},
},
region_switch_plan_config: {
cross_account_role: "IamRoleArn",
external_id: "String",
arn: "PlanArn", # required
},
ecs_capacity_increase_config: {
timeout_minutes: 1,
services: [ # required
{
cross_account_role: "IamRoleArn",
external_id: "String",
cluster_arn: "EcsClusterArn",
service_arn: "EcsServiceArn",
},
],
ungraceful: {
minimum_success_percentage: 1, # required
},
target_percent: 1,
capacity_monitoring_approach: "sampledMaxInLast24Hours", # accepts sampledMaxInLast24Hours, containerInsightsMaxInLast24Hours
},
eks_resource_scaling_config: {
timeout_minutes: 1,
kubernetes_resource_type: { # required
api_version: "String", # required
kind: "String", # required
},
scaling_resources: [
{
"String" => {
"Region" => {
namespace: "KubernetesNamespace", # required
name: "String", # required
hpa_name: "String",
},
},
},
],
eks_clusters: [
{
cross_account_role: "IamRoleArn",
external_id: "String",
cluster_arn: "EksClusterArn", # required
},
],
ungraceful: {
minimum_success_percentage: 1, # required
},
target_percent: 1,
capacity_monitoring_approach: "sampledMaxInLast24Hours", # accepts sampledMaxInLast24Hours
},
route53_health_check_config: {
timeout_minutes: 1,
cross_account_role: "IamRoleArn",
external_id: "String",
hosted_zone_id: "Route53HostedZoneId", # required
record_name: "Route53RecordName", # required
record_sets: [
{
record_set_identifier: "Route53ResourceRecordSetIdentifier",
region: "Region",
},
],
},
},
execution_block_type: "CustomActionLambda", # required, accepts CustomActionLambda, ManualApproval, AuroraGlobalDatabase, EC2AutoScaling, ARCRoutingControl, ARCRegionSwitchPlan, Parallel, ECSServiceScaling, EKSResourceScaling, Route53HealthCheck
},
],
workflow_target_action: "activate", # required, accepts activate, deactivate
workflow_target_region: "Region",
workflow_description: "String",
},
],
execution_role: "IamRoleArn", # required
recovery_time_objective_minutes: 1,
associated_alarms: {
"String" => {
cross_account_role: "IamRoleArn",
external_id: "String",
resource_identifier: "String", # required
alarm_type: "applicationHealth", # required, accepts applicationHealth, trigger
},
},
triggers: [
{
description: "String",
target_region: "Region", # required
action: "activate", # required, accepts activate, deactivate
conditions: [ # required
{
associated_alarm_name: "String", # required
condition: "red", # required, accepts red, green
},
],
min_delay_minutes_between_executions: 1, # required
},
],
name: "PlanName", # required
regions: ["Region"], # required
recovery_approach: "activeActive", # required, accepts activeActive, activePassive
primary_region: "Region",
tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.plan.arn #=> String
resp.plan.description #=> String
resp.plan.workflows #=> Array
resp.plan.workflows[0].steps #=> Array
resp.plan.workflows[0].steps[0].name #=> String
resp.plan.workflows[0].steps[0].description #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.retry_interval_minutes #=> Float
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.region_to_run #=> String, one of "activatingRegion", "deactivatingRegion"
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.ungraceful.behavior #=> String, one of "skip"
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours", "autoscalingMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.execution_approval_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.execution_approval_config.approval_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"] #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"][0].routing_control_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"][0].state #=> String, one of "On", "Off"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.behavior #=> String, one of "switchoverOnly", "failover"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.ungraceful.ungraceful #=> String, one of "failover"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.global_cluster_identifier #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.database_cluster_arns #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.database_cluster_arns[0] #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.parallel_config.steps #=> Types::Steps
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].cluster_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].service_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours", "containerInsightsMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.kubernetes_resource_type.api_version #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.kubernetes_resource_type.kind #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0] #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"] #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].namespace #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].hpa_name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].cluster_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.hosted_zone_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets[0].record_set_identifier #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets[0].region #=> String
resp.plan.workflows[0].steps[0].execution_block_type #=> String, one of "CustomActionLambda", "ManualApproval", "AuroraGlobalDatabase", "EC2AutoScaling", "ARCRoutingControl", "ARCRegionSwitchPlan", "Parallel", "ECSServiceScaling", "EKSResourceScaling", "Route53HealthCheck"
resp.plan.workflows[0].workflow_target_action #=> String, one of "activate", "deactivate"
resp.plan.workflows[0].workflow_target_region #=> String
resp.plan.workflows[0].workflow_description #=> String
resp.plan.execution_role #=> String
resp.plan.recovery_time_objective_minutes #=> Integer
resp.plan.associated_alarms #=> Hash
resp.plan.associated_alarms["String"].cross_account_role #=> String
resp.plan.associated_alarms["String"].external_id #=> String
resp.plan.associated_alarms["String"].resource_identifier #=> String
resp.plan.associated_alarms["String"].alarm_type #=> String, one of "applicationHealth", "trigger"
resp.plan.triggers #=> Array
resp.plan.triggers[0].description #=> String
resp.plan.triggers[0].target_region #=> String
resp.plan.triggers[0].action #=> String, one of "activate", "deactivate"
resp.plan.triggers[0].conditions #=> Array
resp.plan.triggers[0].conditions[0].associated_alarm_name #=> String
resp.plan.triggers[0].conditions[0].condition #=> String, one of "red", "green"
resp.plan.triggers[0].min_delay_minutes_between_executions #=> Integer
resp.plan.name #=> String
resp.plan.regions #=> Array
resp.plan.regions[0] #=> String
resp.plan.recovery_approach #=> String, one of "activeActive", "activePassive"
resp.plan.primary_region #=> String
resp.plan.owner #=> String
resp.plan.version #=> String
resp.plan.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:description
(String)
—
The description of a Region switch plan.
-
:workflows
(required, Array<Types::Workflow>)
—
An array of workflows included in a Region switch plan.
-
:execution_role
(required, String)
—
An execution role is a way to categorize a Region switch plan.
-
:recovery_time_objective_minutes
(Integer)
—
Optionally, you can specify an recovery time objective for a Region switch plan, in minutes.
-
:associated_alarms
(Hash<String,Types::AssociatedAlarm>)
—
The alarms associated with a Region switch plan.
-
:triggers
(Array<Types::Trigger>)
—
The triggers associated with a Region switch plan.
-
:name
(required, String)
—
The name of a Region switch plan.
-
:regions
(required, Array<String>)
—
An array that specifies the Amazon Web Services Regions for a Region switch plan. Specify two Regions.
-
:recovery_approach
(required, String)
—
The recovery approach for a Region switch plan, which can be active/active (activeActive) or active/passive (activePassive).
-
:primary_region
(String)
—
The primary Amazon Web Services Region for the application. This is the Region where the application normally runs before any Region switch occurs.
-
:tags
(Hash<String,String>)
—
The tags to apply to the Region switch plan.
Returns:
See Also:
906 907 908 909 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 906 def create_plan(params = {}, options = {}) req = build_request(:create_plan, params) req.send_request(options) end |
#delete_plan(params = {}) ⇒ Struct
Deletes a Region switch plan. You must specify the ARN of the plan to delete.
You cannot delete a plan that has an active execution in progress.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.delete_plan({
arn: "PlanArn", # required
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:arn
(required, String)
—
The Amazon Resource Name (ARN) of the plan.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
931 932 933 934 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 931 def delete_plan(params = {}, options = {}) req = build_request(:delete_plan, params) req.send_request(options) end |
#get_plan(params = {}) ⇒ Types::GetPlanResponse
Retrieves detailed information about a Region switch plan. You must specify the ARN of the plan.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_plan({
arn: "PlanArn", # required
})
Response structure
Response structure
resp.plan.arn #=> String
resp.plan.description #=> String
resp.plan.workflows #=> Array
resp.plan.workflows[0].steps #=> Array
resp.plan.workflows[0].steps[0].name #=> String
resp.plan.workflows[0].steps[0].description #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.retry_interval_minutes #=> Float
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.region_to_run #=> String, one of "activatingRegion", "deactivatingRegion"
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.ungraceful.behavior #=> String, one of "skip"
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours", "autoscalingMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.execution_approval_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.execution_approval_config.approval_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"] #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"][0].routing_control_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"][0].state #=> String, one of "On", "Off"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.behavior #=> String, one of "switchoverOnly", "failover"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.ungraceful.ungraceful #=> String, one of "failover"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.global_cluster_identifier #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.database_cluster_arns #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.database_cluster_arns[0] #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.parallel_config.steps #=> Types::Steps
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].cluster_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].service_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours", "containerInsightsMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.kubernetes_resource_type.api_version #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.kubernetes_resource_type.kind #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0] #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"] #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].namespace #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].hpa_name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].cluster_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.hosted_zone_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets[0].record_set_identifier #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets[0].region #=> String
resp.plan.workflows[0].steps[0].execution_block_type #=> String, one of "CustomActionLambda", "ManualApproval", "AuroraGlobalDatabase", "EC2AutoScaling", "ARCRoutingControl", "ARCRegionSwitchPlan", "Parallel", "ECSServiceScaling", "EKSResourceScaling", "Route53HealthCheck"
resp.plan.workflows[0].workflow_target_action #=> String, one of "activate", "deactivate"
resp.plan.workflows[0].workflow_target_region #=> String
resp.plan.workflows[0].workflow_description #=> String
resp.plan.execution_role #=> String
resp.plan.recovery_time_objective_minutes #=> Integer
resp.plan.associated_alarms #=> Hash
resp.plan.associated_alarms["String"].cross_account_role #=> String
resp.plan.associated_alarms["String"].external_id #=> String
resp.plan.associated_alarms["String"].resource_identifier #=> String
resp.plan.associated_alarms["String"].alarm_type #=> String, one of "applicationHealth", "trigger"
resp.plan.triggers #=> Array
resp.plan.triggers[0].description #=> String
resp.plan.triggers[0].target_region #=> String
resp.plan.triggers[0].action #=> String, one of "activate", "deactivate"
resp.plan.triggers[0].conditions #=> Array
resp.plan.triggers[0].conditions[0].associated_alarm_name #=> String
resp.plan.triggers[0].conditions[0].condition #=> String, one of "red", "green"
resp.plan.triggers[0].min_delay_minutes_between_executions #=> Integer
resp.plan.name #=> String
resp.plan.regions #=> Array
resp.plan.regions[0] #=> String
resp.plan.recovery_approach #=> String, one of "activeActive", "activePassive"
resp.plan.primary_region #=> String
resp.plan.owner #=> String
resp.plan.version #=> String
resp.plan.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:arn
(required, String)
—
The Amazon Resource Name (ARN) of the plan.
Returns:
See Also:
1062 1063 1064 1065 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1062 def get_plan(params = {}, options = {}) req = build_request(:get_plan, params) req.send_request(options) end |
#get_plan_evaluation_status(params = {}) ⇒ Types::GetPlanEvaluationStatusResponse
Retrieves the evaluation status of a Region switch plan. The evaluation status provides information about the last time the plan was evaluated and any warnings or issues detected.
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):
- plan_evaluation_status_passed
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_plan_evaluation_status({
plan_arn: "PlanArn", # required
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.plan_arn #=> String
resp.last_evaluation_time #=> Time
resp.last_evaluated_version #=> String
resp.region #=> String
resp.evaluation_state #=> String, one of "passed", "actionRequired", "pendingEvaluation", "unknown"
resp.warnings #=> Array
resp.warnings[0].workflow.action #=> String, one of "activate", "deactivate"
resp.warnings[0].workflow.name #=> String
resp.warnings[0].version #=> String
resp.warnings[0].step_name #=> String
resp.warnings[0].resource_arn #=> String
resp.warnings[0].warning_status #=> String, one of "active", "resolved"
resp.warnings[0].warning_updated_time #=> Time
resp.warnings[0].warning_message #=> String
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:plan_arn
(required, String)
—
The Amazon Resource Name (ARN) of the Region switch plan to retrieve evaluation status for.
-
:max_results
(Integer)
—
The number of objects that you want to return with this call.
-
:next_token
(String)
—
Specifies that you want to receive the next page of results. Valid only if you received a
nextToken
response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call'snextToken
response to request the next page of results.
Returns:
-
(Types::GetPlanEvaluationStatusResponse)
—
Returns a response object which responds to the following methods:
- #plan_arn => String
- #last_evaluation_time => Time
- #last_evaluated_version => String
- #region => String
- #evaluation_state => String
- #warnings => Array<Types::ResourceWarning>
- #next_token => String
See Also:
1132 1133 1134 1135 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1132 def get_plan_evaluation_status(params = {}, options = {}) req = build_request(:get_plan_evaluation_status, params) req.send_request(options) end |
#get_plan_execution(params = {}) ⇒ Types::GetPlanExecutionResponse
Retrieves detailed information about a specific plan execution. You must specify the plan ARN and execution ID.
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):
- plan_execution_completed
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_plan_execution({
plan_arn: "PlanArn", # required
execution_id: "ExecutionId", # required
max_results: 1,
next_token: "String",
})
Response structure
Response structure
resp.plan_arn #=> String
resp.execution_id #=> String
resp.version #=> String
resp.updated_at #=> Time
resp.comment #=> String
resp.start_time #=> Time
resp.end_time #=> Time
resp.mode #=> String, one of "graceful", "ungraceful"
resp.execution_state #=> String, one of "inProgress", "pausedByFailedStep", "pausedByOperator", "completed", "completedWithExceptions", "canceled", "planExecutionTimedOut", "pendingManualApproval", "failed", "pending", "completedMonitoringApplicationHealth"
resp.execution_action #=> String, one of "activate", "deactivate"
resp.execution_region #=> String
resp.step_states #=> Array
resp.step_states[0].name #=> String
resp.step_states[0].status #=> String, one of "notStarted", "running", "failed", "completed", "canceled", "skipped", "pendingApproval"
resp.step_states[0].start_time #=> Time
resp.step_states[0].end_time #=> Time
resp.step_states[0].step_mode #=> String, one of "graceful", "ungraceful"
resp.plan.arn #=> String
resp.plan.description #=> String
resp.plan.workflows #=> Array
resp.plan.workflows[0].steps #=> Array
resp.plan.workflows[0].steps[0].name #=> String
resp.plan.workflows[0].steps[0].description #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.retry_interval_minutes #=> Float
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.region_to_run #=> String, one of "activatingRegion", "deactivatingRegion"
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.ungraceful.behavior #=> String, one of "skip"
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours", "autoscalingMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.execution_approval_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.execution_approval_config.approval_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"] #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"][0].routing_control_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"][0].state #=> String, one of "On", "Off"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.behavior #=> String, one of "switchoverOnly", "failover"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.ungraceful.ungraceful #=> String, one of "failover"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.global_cluster_identifier #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.database_cluster_arns #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.database_cluster_arns[0] #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.parallel_config.steps #=> Types::Steps
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].cluster_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].service_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours", "containerInsightsMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.kubernetes_resource_type.api_version #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.kubernetes_resource_type.kind #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0] #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"] #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].namespace #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].hpa_name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].cluster_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.hosted_zone_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets[0].record_set_identifier #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets[0].region #=> String
resp.plan.workflows[0].steps[0].execution_block_type #=> String, one of "CustomActionLambda", "ManualApproval", "AuroraGlobalDatabase", "EC2AutoScaling", "ARCRoutingControl", "ARCRegionSwitchPlan", "Parallel", "ECSServiceScaling", "EKSResourceScaling", "Route53HealthCheck"
resp.plan.workflows[0].workflow_target_action #=> String, one of "activate", "deactivate"
resp.plan.workflows[0].workflow_target_region #=> String
resp.plan.workflows[0].workflow_description #=> String
resp.plan.execution_role #=> String
resp.plan.recovery_time_objective_minutes #=> Integer
resp.plan.associated_alarms #=> Hash
resp.plan.associated_alarms["String"].cross_account_role #=> String
resp.plan.associated_alarms["String"].external_id #=> String
resp.plan.associated_alarms["String"].resource_identifier #=> String
resp.plan.associated_alarms["String"].alarm_type #=> String, one of "applicationHealth", "trigger"
resp.plan.triggers #=> Array
resp.plan.triggers[0].description #=> String
resp.plan.triggers[0].target_region #=> String
resp.plan.triggers[0].action #=> String, one of "activate", "deactivate"
resp.plan.triggers[0].conditions #=> Array
resp.plan.triggers[0].conditions[0].associated_alarm_name #=> String
resp.plan.triggers[0].conditions[0].condition #=> String, one of "red", "green"
resp.plan.triggers[0].min_delay_minutes_between_executions #=> Integer
resp.plan.name #=> String
resp.plan.regions #=> Array
resp.plan.regions[0] #=> String
resp.plan.recovery_approach #=> String, one of "activeActive", "activePassive"
resp.plan.primary_region #=> String
resp.plan.owner #=> String
resp.plan.version #=> String
resp.plan.updated_at #=> Time
resp.actual_recovery_time #=> String
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:plan_arn
(required, String)
—
The Amazon Resource Name (ARN) of the plan with the execution to retrieve.
-
:execution_id
(required, String)
—
The execution identifier of a plan execution.
-
:max_results
(Integer)
—
The number of objects that you want to return with this call.
-
:next_token
(String)
—
Specifies that you want to receive the next page of results. Valid only if you received a
nextToken
response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call'snextToken
response to request the next page of results.
Returns:
-
(Types::GetPlanExecutionResponse)
—
Returns a response object which responds to the following methods:
- #plan_arn => String
- #execution_id => String
- #version => String
- #updated_at => Time
- #comment => String
- #start_time => Time
- #end_time => Time
- #mode => String
- #execution_state => String
- #execution_action => String
- #execution_region => String
- #step_states => Array<Types::StepState>
- #plan => Types::Plan
- #actual_recovery_time => String
- #next_token => String
See Also:
1320 1321 1322 1323 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1320 def get_plan_execution(params = {}, options = {}) req = build_request(:get_plan_execution, params) req.send_request(options) end |
#get_plan_in_region(params = {}) ⇒ Types::GetPlanInRegionResponse
Retrieves information about a Region switch plan in a specific Amazon Web Services Region. This operation is useful for getting Region-specific information about a plan.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.get_plan_in_region({
arn: "PlanArn", # required
})
Response structure
Response structure
resp.plan.arn #=> String
resp.plan.description #=> String
resp.plan.workflows #=> Array
resp.plan.workflows[0].steps #=> Array
resp.plan.workflows[0].steps[0].name #=> String
resp.plan.workflows[0].steps[0].description #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.retry_interval_minutes #=> Float
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.region_to_run #=> String, one of "activatingRegion", "deactivatingRegion"
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.ungraceful.behavior #=> String, one of "skip"
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours", "autoscalingMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.execution_approval_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.execution_approval_config.approval_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"] #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"][0].routing_control_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"][0].state #=> String, one of "On", "Off"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.behavior #=> String, one of "switchoverOnly", "failover"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.ungraceful.ungraceful #=> String, one of "failover"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.global_cluster_identifier #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.database_cluster_arns #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.database_cluster_arns[0] #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.parallel_config.steps #=> Types::Steps
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].cluster_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].service_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours", "containerInsightsMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.kubernetes_resource_type.api_version #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.kubernetes_resource_type.kind #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0] #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"] #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].namespace #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].hpa_name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].cluster_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.hosted_zone_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets[0].record_set_identifier #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets[0].region #=> String
resp.plan.workflows[0].steps[0].execution_block_type #=> String, one of "CustomActionLambda", "ManualApproval", "AuroraGlobalDatabase", "EC2AutoScaling", "ARCRoutingControl", "ARCRegionSwitchPlan", "Parallel", "ECSServiceScaling", "EKSResourceScaling", "Route53HealthCheck"
resp.plan.workflows[0].workflow_target_action #=> String, one of "activate", "deactivate"
resp.plan.workflows[0].workflow_target_region #=> String
resp.plan.workflows[0].workflow_description #=> String
resp.plan.execution_role #=> String
resp.plan.recovery_time_objective_minutes #=> Integer
resp.plan.associated_alarms #=> Hash
resp.plan.associated_alarms["String"].cross_account_role #=> String
resp.plan.associated_alarms["String"].external_id #=> String
resp.plan.associated_alarms["String"].resource_identifier #=> String
resp.plan.associated_alarms["String"].alarm_type #=> String, one of "applicationHealth", "trigger"
resp.plan.triggers #=> Array
resp.plan.triggers[0].description #=> String
resp.plan.triggers[0].target_region #=> String
resp.plan.triggers[0].action #=> String, one of "activate", "deactivate"
resp.plan.triggers[0].conditions #=> Array
resp.plan.triggers[0].conditions[0].associated_alarm_name #=> String
resp.plan.triggers[0].conditions[0].condition #=> String, one of "red", "green"
resp.plan.triggers[0].min_delay_minutes_between_executions #=> Integer
resp.plan.name #=> String
resp.plan.regions #=> Array
resp.plan.regions[0] #=> String
resp.plan.recovery_approach #=> String, one of "activeActive", "activePassive"
resp.plan.primary_region #=> String
resp.plan.owner #=> String
resp.plan.version #=> String
resp.plan.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:arn
(required, String)
—
The Amazon Resource Name (ARN) of the plan in Region.
Returns:
See Also:
1452 1453 1454 1455 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1452 def get_plan_in_region(params = {}, options = {}) req = build_request(:get_plan_in_region, params) req.send_request(options) end |
#list_plan_execution_events(params = {}) ⇒ Types::ListPlanExecutionEventsResponse
Lists the events that occurred during a plan execution. These events provide a detailed timeline of the execution process.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_plan_execution_events({
plan_arn: "PlanArn", # required
execution_id: "ExecutionId", # required
max_results: 1,
next_token: "String",
name: "StepName",
})
Response structure
Response structure
resp.items #=> Array
resp.items[0].timestamp #=> Time
resp.items[0].type #=> String, one of "unknown", "executionPending", "executionStarted", "executionSucceeded", "executionFailed", "executionPausing", "executionPaused", "executionCanceling", "executionCanceled", "executionPendingApproval", "executionBehaviorChangedToUngraceful", "executionBehaviorChangedToGraceful", "executionPendingChildPlanManualApproval", "executionSuccessMonitoringApplicationHealth", "stepStarted", "stepUpdate", "stepSucceeded", "stepFailed", "stepSkipped", "stepPausedByError", "stepPausedByOperator", "stepCanceled", "stepPendingApproval", "stepExecutionBehaviorChangedToUngraceful", "stepPendingApplicationHealthMonitor"
resp.items[0].step_name #=> String
resp.items[0].execution_block_type #=> String, one of "CustomActionLambda", "ManualApproval", "AuroraGlobalDatabase", "EC2AutoScaling", "ARCRoutingControl", "ARCRegionSwitchPlan", "Parallel", "ECSServiceScaling", "EKSResourceScaling", "Route53HealthCheck"
resp.items[0].resources #=> Array
resp.items[0].resources[0] #=> String
resp.items[0].error #=> String
resp.items[0].description #=> String
resp.items[0].event_id #=> String
resp.items[0].previous_event_id #=> String
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:plan_arn
(required, String)
—
The Amazon Resource Name (ARN) of the plan.
-
:execution_id
(required, String)
—
The execution identifier of a plan execution.
-
:max_results
(Integer)
—
The number of objects that you want to return with this call.
-
:next_token
(String)
—
Specifies that you want to receive the next page of results. Valid only if you received a
nextToken
response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call'snextToken
response to request the next page of results. -
:name
(String)
—
The name of the plan execution event.
Returns:
-
(Types::ListPlanExecutionEventsResponse)
—
Returns a response object which responds to the following methods:
- #items => Array<Types::ExecutionEvent>
- #next_token => String
See Also:
1515 1516 1517 1518 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1515 def list_plan_execution_events(params = {}, options = {}) req = build_request(:list_plan_execution_events, params) req.send_request(options) end |
#list_plan_executions(params = {}) ⇒ Types::ListPlanExecutionsResponse
Lists the executions of a Region switch plan. This operation returns information about both current and historical executions.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_plan_executions({
plan_arn: "PlanArn", # required
max_results: 1,
next_token: "String",
state: "inProgress", # accepts inProgress, pausedByFailedStep, pausedByOperator, completed, completedWithExceptions, canceled, planExecutionTimedOut, pendingManualApproval, failed, pending, completedMonitoringApplicationHealth
})
Response structure
Response structure
resp.items #=> Array
resp.items[0].plan_arn #=> String
resp.items[0].execution_id #=> String
resp.items[0].version #=> String
resp.items[0].updated_at #=> Time
resp.items[0].comment #=> String
resp.items[0].start_time #=> Time
resp.items[0].end_time #=> Time
resp.items[0].mode #=> String, one of "graceful", "ungraceful"
resp.items[0].execution_state #=> String, one of "inProgress", "pausedByFailedStep", "pausedByOperator", "completed", "completedWithExceptions", "canceled", "planExecutionTimedOut", "pendingManualApproval", "failed", "pending", "completedMonitoringApplicationHealth"
resp.items[0].execution_action #=> String, one of "activate", "deactivate"
resp.items[0].execution_region #=> String
resp.items[0].actual_recovery_time #=> String
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:plan_arn
(required, String)
—
The ARN for the plan.
-
:max_results
(Integer)
—
The number of objects that you want to return with this call.
-
:next_token
(String)
—
Specifies that you want to receive the next page of results. Valid only if you received a
nextToken
response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call'snextToken
response to request the next page of results. -
:state
(String)
—
The state of the plan execution. For example, the plan execution might be In Progress.
Returns:
-
(Types::ListPlanExecutionsResponse)
—
Returns a response object which responds to the following methods:
- #items => Array<Types::AbbreviatedExecution>
- #next_token => String
See Also:
1577 1578 1579 1580 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1577 def list_plan_executions(params = {}, options = {}) req = build_request(:list_plan_executions, params) req.send_request(options) end |
#list_plans(params = {}) ⇒ Types::ListPlansResponse
Lists all Region switch plans in your Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_plans({
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.plans #=> Array
resp.plans[0].arn #=> String
resp.plans[0].owner #=> String
resp.plans[0].name #=> String
resp.plans[0].regions #=> Array
resp.plans[0].regions[0] #=> String
resp.plans[0].recovery_approach #=> String, one of "activeActive", "activePassive"
resp.plans[0].primary_region #=> String
resp.plans[0].version #=> String
resp.plans[0].updated_at #=> Time
resp.plans[0].description #=> String
resp.plans[0].execution_role #=> String
resp.plans[0].active_plan_execution #=> String
resp.plans[0].recovery_time_objective_minutes #=> Integer
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
The number of objects that you want to return with this call.
-
:next_token
(String)
—
Specifies that you want to receive the next page of results. Valid only if you received a
nextToken
response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call'snextToken
response to request the next page of results.
Returns:
-
(Types::ListPlansResponse)
—
Returns a response object which responds to the following methods:
- #plans => Array<Types::AbbreviatedPlan>
- #next_token => String
See Also:
1630 1631 1632 1633 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1630 def list_plans(params = {}, options = {}) req = build_request(:list_plans, params) req.send_request(options) end |
#list_plans_in_region(params = {}) ⇒ Types::ListPlansInRegionResponse
Lists all Region switch plans in your Amazon Web Services account that are available in the current Amazon Web Services Region.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_plans_in_region({
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.plans #=> Array
resp.plans[0].arn #=> String
resp.plans[0].owner #=> String
resp.plans[0].name #=> String
resp.plans[0].regions #=> Array
resp.plans[0].regions[0] #=> String
resp.plans[0].recovery_approach #=> String, one of "activeActive", "activePassive"
resp.plans[0].primary_region #=> String
resp.plans[0].version #=> String
resp.plans[0].updated_at #=> Time
resp.plans[0].description #=> String
resp.plans[0].execution_role #=> String
resp.plans[0].active_plan_execution #=> String
resp.plans[0].recovery_time_objective_minutes #=> Integer
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:max_results
(Integer)
—
The number of objects that you want to return with this call.
-
:next_token
(String)
—
Specifies that you want to receive the next page of results. Valid only if you received a
nextToken
response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call'snextToken
response to request the next page of results.
Returns:
-
(Types::ListPlansInRegionResponse)
—
Returns a response object which responds to the following methods:
- #plans => Array<Types::AbbreviatedPlan>
- #next_token => String
See Also:
1684 1685 1686 1687 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1684 def list_plans_in_region(params = {}, options = {}) req = build_request(:list_plans_in_region, params) req.send_request(options) end |
#list_route_53_health_checks(params = {}) ⇒ Types::ListRoute53HealthChecksResponse
List the Amazon Route 53 health checks.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_route_53_health_checks({
arn: "PlanArn", # required
hosted_zone_id: "Route53HostedZoneId",
record_name: "Route53RecordName",
max_results: 1,
next_token: "NextToken",
})
Response structure
Response structure
resp.health_checks #=> Array
resp.health_checks[0].hosted_zone_id #=> String
resp.health_checks[0].record_name #=> String
resp.health_checks[0].health_check_id #=> String
resp.health_checks[0].region #=> String
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:arn
(required, String)
—
The Amazon Resource Name (ARN) of the Amazon Route 53 health check request.
-
:hosted_zone_id
(String)
—
The hosted zone ID for the health checks.
-
:record_name
(String)
—
The record name for the health checks.
-
:max_results
(Integer)
—
The number of objects that you want to return with this call.
-
:next_token
(String)
—
Specifies that you want to receive the next page of results. Valid only if you received a
nextToken
response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call'snextToken
response to request the next page of results.
Returns:
-
(Types::ListRoute53HealthChecksResponse)
—
Returns a response object which responds to the following methods:
- #health_checks => Array<Types::Route53HealthCheck>
- #next_token => String
See Also:
1741 1742 1743 1744 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1741 def list_route_53_health_checks(params = {}, options = {}) req = build_request(:list_route_53_health_checks, params) req.send_request(options) end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags attached to a Region switch resource.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_tags_for_resource({
arn: "PlanArn", # required
})
Response structure
Response structure
resp.resource_tags #=> Hash
resp.resource_tags["TagKey"] #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:arn
(required, String)
—
The Amazon Resource Name (ARN) of the resource.
Returns:
-
(Types::ListTagsForResourceResponse)
—
Returns a response object which responds to the following methods:
- #resource_tags => Hash<String,String>
See Also:
1770 1771 1772 1773 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1770 def list_tags_for_resource(params = {}, options = {}) req = build_request(:list_tags_for_resource, params) req.send_request(options) end |
#start_plan_execution(params = {}) ⇒ Types::StartPlanExecutionResponse
Starts the execution of a Region switch plan. You can execute a plan in either PRACTICE or RECOVERY mode.
In PRACTICE mode, the execution simulates the steps without making actual changes to your application's traffic routing. In RECOVERY mode, the execution performs actual changes to shift traffic between Regions.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.start_plan_execution({
plan_arn: "PlanArn", # required
target_region: "String", # required
action: "activate", # required, accepts activate, deactivate
mode: "graceful", # accepts graceful, ungraceful
comment: "ExecutionComment",
latest_version: "String",
})
Response structure
Response structure
resp.execution_id #=> String
resp.plan #=> String
resp.plan_version #=> String
resp.activate_region #=> String
resp.deactivate_region #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:plan_arn
(required, String)
—
The Amazon Resource Name (ARN) of the plan to execute.
-
:target_region
(required, String)
—
The Amazon Web Services Region to target with this execution. This is the Region that traffic will be shifted to or from, depending on the action.
-
:action
(required, String)
—
The action to perform. Valid values are ACTIVATE (to shift traffic to the target Region) or DEACTIVATE (to shift traffic away from the target Region).
-
:mode
(String)
—
The plan execution mode. Valid values are
Practice
, for testing without making actual changes, orRecovery
, for actual traffic shifting and application recovery. -
:comment
(String)
—
An optional comment explaining why the plan execution is being started.
-
:latest_version
(String)
—
A boolean value indicating whether to use the latest version of the plan. If set to false, you must specify a specific version.
Returns:
-
(Types::StartPlanExecutionResponse)
—
Returns a response object which responds to the following methods:
- #execution_id => String
- #plan => String
- #plan_version => String
- #activate_region => String
- #deactivate_region => String
See Also:
1840 1841 1842 1843 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1840 def start_plan_execution(params = {}, options = {}) req = build_request(:start_plan_execution, params) req.send_request(options) end |
#tag_resource(params = {}) ⇒ Struct
Adds or updates tags for a Region switch resource. You can assign metadata to your resources in the form of tags, which are key-value pairs.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.tag_resource({
arn: "PlanArn", # required
tags: { # required
"TagKey" => "TagValue",
},
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:arn
(required, String)
—
The Amazon Resource Name (ARN) for a tag that you add to a resource.
-
:tags
(required, Hash<String,String>)
—
Tags that you add to a resource. You can add a maximum of 50 tags in Region switch.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
1871 1872 1873 1874 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1871 def tag_resource(params = {}, options = {}) req = build_request(:tag_resource, params) req.send_request(options) end |
#untag_resource(params = {}) ⇒ Struct
Removes tags from a Region switch resource.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.untag_resource({
arn: "PlanArn", # required
resource_tag_keys: ["TagKey"], # required
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:arn
(required, String)
—
The Amazon Resource Name (ARN) for a tag you remove a resource from.
-
:resource_tag_keys
(required, Array<String>)
—
Tag keys that you remove from a resource.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
1897 1898 1899 1900 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 1897 def untag_resource(params = {}, options = {}) req = build_request(:untag_resource, params) req.send_request(options) end |
#update_plan(params = {}) ⇒ Types::UpdatePlanResponse
Updates an existing Region switch plan. You can modify the plan's description, workflows, execution role, recovery time objective, associated alarms, and triggers.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_plan({
arn: "PlanArn", # required
description: "String",
workflows: [ # required
{
steps: [
{
name: "StepName", # required
description: "String",
execution_block_configuration: { # required
custom_action_lambda_config: {
timeout_minutes: 1,
lambdas: [ # required
{
cross_account_role: "IamRoleArn",
external_id: "String",
arn: "LambdaArn",
},
],
retry_interval_minutes: 1.0, # required
region_to_run: "activatingRegion", # required, accepts activatingRegion, deactivatingRegion
ungraceful: {
behavior: "skip", # accepts skip
},
},
ec2_asg_capacity_increase_config: {
timeout_minutes: 1,
asgs: [ # required
{
cross_account_role: "IamRoleArn",
external_id: "String",
arn: "AsgArn",
},
],
ungraceful: {
minimum_success_percentage: 1, # required
},
target_percent: 1,
capacity_monitoring_approach: "sampledMaxInLast24Hours", # accepts sampledMaxInLast24Hours, autoscalingMaxInLast24Hours
},
execution_approval_config: {
timeout_minutes: 1,
approval_role: "RoleArn", # required
},
arc_routing_control_config: {
timeout_minutes: 1,
cross_account_role: "IamRoleArn",
external_id: "String",
region_and_routing_controls: { # required
"String" => [
{
routing_control_arn: "RoutingControlArn", # required
state: "On", # required, accepts On, Off
},
],
},
},
global_aurora_config: {
timeout_minutes: 1,
cross_account_role: "IamRoleArn",
external_id: "String",
behavior: "switchoverOnly", # required, accepts switchoverOnly, failover
ungraceful: {
ungraceful: "failover", # accepts failover
},
global_cluster_identifier: "GlobalClusterIdentifier", # required
database_cluster_arns: ["AuroraClusterArn"], # required
},
parallel_config: {
steps: { # required
# recursive Steps
},
},
region_switch_plan_config: {
cross_account_role: "IamRoleArn",
external_id: "String",
arn: "PlanArn", # required
},
ecs_capacity_increase_config: {
timeout_minutes: 1,
services: [ # required
{
cross_account_role: "IamRoleArn",
external_id: "String",
cluster_arn: "EcsClusterArn",
service_arn: "EcsServiceArn",
},
],
ungraceful: {
minimum_success_percentage: 1, # required
},
target_percent: 1,
capacity_monitoring_approach: "sampledMaxInLast24Hours", # accepts sampledMaxInLast24Hours, containerInsightsMaxInLast24Hours
},
eks_resource_scaling_config: {
timeout_minutes: 1,
kubernetes_resource_type: { # required
api_version: "String", # required
kind: "String", # required
},
scaling_resources: [
{
"String" => {
"Region" => {
namespace: "KubernetesNamespace", # required
name: "String", # required
hpa_name: "String",
},
},
},
],
eks_clusters: [
{
cross_account_role: "IamRoleArn",
external_id: "String",
cluster_arn: "EksClusterArn", # required
},
],
ungraceful: {
minimum_success_percentage: 1, # required
},
target_percent: 1,
capacity_monitoring_approach: "sampledMaxInLast24Hours", # accepts sampledMaxInLast24Hours
},
route53_health_check_config: {
timeout_minutes: 1,
cross_account_role: "IamRoleArn",
external_id: "String",
hosted_zone_id: "Route53HostedZoneId", # required
record_name: "Route53RecordName", # required
record_sets: [
{
record_set_identifier: "Route53ResourceRecordSetIdentifier",
region: "Region",
},
],
},
},
execution_block_type: "CustomActionLambda", # required, accepts CustomActionLambda, ManualApproval, AuroraGlobalDatabase, EC2AutoScaling, ARCRoutingControl, ARCRegionSwitchPlan, Parallel, ECSServiceScaling, EKSResourceScaling, Route53HealthCheck
},
],
workflow_target_action: "activate", # required, accepts activate, deactivate
workflow_target_region: "Region",
workflow_description: "String",
},
],
execution_role: "IamRoleArn", # required
recovery_time_objective_minutes: 1,
associated_alarms: {
"String" => {
cross_account_role: "IamRoleArn",
external_id: "String",
resource_identifier: "String", # required
alarm_type: "applicationHealth", # required, accepts applicationHealth, trigger
},
},
triggers: [
{
description: "String",
target_region: "Region", # required
action: "activate", # required, accepts activate, deactivate
conditions: [ # required
{
associated_alarm_name: "String", # required
condition: "red", # required, accepts red, green
},
],
min_delay_minutes_between_executions: 1, # required
},
],
})
Response structure
Response structure
resp.plan.arn #=> String
resp.plan.description #=> String
resp.plan.workflows #=> Array
resp.plan.workflows[0].steps #=> Array
resp.plan.workflows[0].steps[0].name #=> String
resp.plan.workflows[0].steps[0].description #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.lambdas[0].arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.retry_interval_minutes #=> Float
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.region_to_run #=> String, one of "activatingRegion", "deactivatingRegion"
resp.plan.workflows[0].steps[0].execution_block_configuration.custom_action_lambda_config.ungraceful.behavior #=> String, one of "skip"
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.asgs[0].arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ec2_asg_capacity_increase_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours", "autoscalingMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.execution_approval_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.execution_approval_config.approval_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"] #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"][0].routing_control_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.arc_routing_control_config.region_and_routing_controls["String"][0].state #=> String, one of "On", "Off"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.behavior #=> String, one of "switchoverOnly", "failover"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.ungraceful.ungraceful #=> String, one of "failover"
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.global_cluster_identifier #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.database_cluster_arns #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.global_aurora_config.database_cluster_arns[0] #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.parallel_config.steps #=> Types::Steps
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.region_switch_plan_config.arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].cluster_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.services[0].service_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.ecs_capacity_increase_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours", "containerInsightsMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.kubernetes_resource_type.api_version #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.kubernetes_resource_type.kind #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0] #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"] #=> Hash
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].namespace #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.scaling_resources[0]["String"]["Region"].hpa_name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.eks_clusters[0].cluster_arn #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.ungraceful.minimum_success_percentage #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.target_percent #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.eks_resource_scaling_config.capacity_monitoring_approach #=> String, one of "sampledMaxInLast24Hours"
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.timeout_minutes #=> Integer
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.cross_account_role #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.external_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.hosted_zone_id #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_name #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets #=> Array
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets[0].record_set_identifier #=> String
resp.plan.workflows[0].steps[0].execution_block_configuration.route53_health_check_config.record_sets[0].region #=> String
resp.plan.workflows[0].steps[0].execution_block_type #=> String, one of "CustomActionLambda", "ManualApproval", "AuroraGlobalDatabase", "EC2AutoScaling", "ARCRoutingControl", "ARCRegionSwitchPlan", "Parallel", "ECSServiceScaling", "EKSResourceScaling", "Route53HealthCheck"
resp.plan.workflows[0].workflow_target_action #=> String, one of "activate", "deactivate"
resp.plan.workflows[0].workflow_target_region #=> String
resp.plan.workflows[0].workflow_description #=> String
resp.plan.execution_role #=> String
resp.plan.recovery_time_objective_minutes #=> Integer
resp.plan.associated_alarms #=> Hash
resp.plan.associated_alarms["String"].cross_account_role #=> String
resp.plan.associated_alarms["String"].external_id #=> String
resp.plan.associated_alarms["String"].resource_identifier #=> String
resp.plan.associated_alarms["String"].alarm_type #=> String, one of "applicationHealth", "trigger"
resp.plan.triggers #=> Array
resp.plan.triggers[0].description #=> String
resp.plan.triggers[0].target_region #=> String
resp.plan.triggers[0].action #=> String, one of "activate", "deactivate"
resp.plan.triggers[0].conditions #=> Array
resp.plan.triggers[0].conditions[0].associated_alarm_name #=> String
resp.plan.triggers[0].conditions[0].condition #=> String, one of "red", "green"
resp.plan.triggers[0].min_delay_minutes_between_executions #=> Integer
resp.plan.name #=> String
resp.plan.regions #=> Array
resp.plan.regions[0] #=> String
resp.plan.recovery_approach #=> String, one of "activeActive", "activePassive"
resp.plan.primary_region #=> String
resp.plan.owner #=> String
resp.plan.version #=> String
resp.plan.updated_at #=> Time
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:arn
(required, String)
—
The Amazon Resource Name (ARN) of the plan.
-
:description
(String)
—
The updated description for the Region switch plan.
-
:workflows
(required, Array<Types::Workflow>)
—
The updated workflows for the Region switch plan.
-
:execution_role
(required, String)
—
The updated IAM role ARN that grants Region switch the permissions needed to execute the plan steps.
-
:recovery_time_objective_minutes
(Integer)
—
The updated target recovery time objective (RTO) in minutes for the plan.
-
:associated_alarms
(Hash<String,Types::AssociatedAlarm>)
—
The updated CloudWatch alarms associated with the plan.
-
:triggers
(Array<Types::Trigger>)
—
The updated conditions that can automatically trigger the execution of the plan.
Returns:
See Also:
2218 2219 2220 2221 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 2218 def update_plan(params = {}, options = {}) req = build_request(:update_plan, params) req.send_request(options) end |
#update_plan_execution(params = {}) ⇒ Struct
Updates an in-progress plan execution. This operation allows you to modify certain aspects of the execution, such as adding a comment or changing the action.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_plan_execution({
plan_arn: "PlanArn", # required
execution_id: "ExecutionId", # required
action: "switchToGraceful", # required, accepts switchToGraceful, switchToUngraceful, pause, resume
comment: "ExecutionComment",
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:plan_arn
(required, String)
—
The Amazon Resource Name (ARN) of the plan with the execution to update.
-
:execution_id
(required, String)
—
The execution identifier of a plan execution.
-
:action
(required, String)
—
The action specified for a plan execution, for example, Switch to Graceful or Pause.
-
:comment
(String)
—
An optional comment about the plan execution.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
2256 2257 2258 2259 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 2256 def update_plan_execution(params = {}, options = {}) req = build_request(:update_plan_execution, params) req.send_request(options) end |
#update_plan_execution_step(params = {}) ⇒ Struct
Updates a specific step in an in-progress plan execution. This operation allows you to modify the step's comment or action.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.update_plan_execution_step({
plan_arn: "PlanArn", # required
execution_id: "ExecutionId", # required
comment: "ExecutionComment", # required
step_name: "String", # required
action_to_take: "switchToUngraceful", # required, accepts switchToUngraceful, skip
})
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:plan_arn
(required, String)
—
The Amazon Resource Name (ARN) of the plan containing the execution step to update.
-
:execution_id
(required, String)
—
The unique identifier of the plan execution containing the step to update.
-
:comment
(required, String)
—
An optional comment about the plan execution.
-
:step_name
(required, String)
—
The name of the execution step to update.
-
:action_to_take
(required, String)
—
The updated action to take for the step. This can be used to skip or retry a step.
Returns:
-
(Struct)
—
Returns an empty response.
See Also:
2298 2299 2300 2301 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 2298 def update_plan_execution_step(params = {}, options = {}) req = build_request(:update_plan_execution_step, 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 |
---|---|---|---|
plan_evaluation_status_passed | #get_plan_evaluation_status | 30 | 5 |
plan_execution_completed | #get_plan_execution | 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.
2414 2415 2416 2417 2418 |
# File 'gems/aws-sdk-arcregionswitch/lib/aws-sdk-arcregionswitch/client.rb', line 2414 def wait_until(waiter_name, params = {}, options = {}) w = waiter(waiter_name, options) yield(w.waiter) if block_given? # deprecated w.wait(params) end |