Method: Aws::Drs::Client#start_recovery
- Defined in:
- lib/aws-sdk-drs/client.rb
#start_recovery(params = {}) ⇒ Types::StartRecoveryResponse
Launches Recovery Instances for the specified Source Servers. For each Source Server you may choose a point in time snapshot to launch from, or use an on demand snapshot.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.start_recovery({
is_drill: false,
source_servers: [ # required
{
recovery_snapshot_id: "RecoverySnapshotID",
source_server_id: "SourceServerID", # required
},
],
tags: {
"TagKey" => "TagValue",
},
})
Response structure
Response structure
resp.job.arn #=> String
resp.job.creation_date_time #=> String
resp.job.end_date_time #=> String
resp.job.initiated_by #=> String, one of "START_RECOVERY", "START_DRILL", "FAILBACK", "DIAGNOSTIC", "TERMINATE_RECOVERY_INSTANCES", "TARGET_ACCOUNT", "CREATE_NETWORK_RECOVERY", "UPDATE_NETWORK_RECOVERY", "ASSOCIATE_NETWORK_RECOVERY"
resp.job.job_id #=> String
resp.job.participating_resources #=> Array
resp.job.participating_resources[0].launch_status #=> String, one of "PENDING", "IN_PROGRESS", "LAUNCHED", "FAILED", "TERMINATED"
resp.job.participating_resources[0].participating_resource_id.source_network_id #=> String
resp.job.participating_servers #=> Array
resp.job.participating_servers[0].launch_actions_status.runs #=> Array
resp.job.participating_servers[0].launch_actions_status.runs[0].action.action_code #=> String
resp.job.participating_servers[0].launch_actions_status.runs[0].action.action_id #=> String
resp.job.participating_servers[0].launch_actions_status.runs[0].action.action_version #=> String
resp.job.participating_servers[0].launch_actions_status.runs[0].action.active #=> Boolean
resp.job.participating_servers[0].launch_actions_status.runs[0].action.category #=> String, one of "MONITORING", "VALIDATION", "CONFIGURATION", "SECURITY", "OTHER"
resp.job.participating_servers[0].launch_actions_status.runs[0].action.description #=> String
resp.job.participating_servers[0].launch_actions_status.runs[0].action.name #=> String
resp.job.participating_servers[0].launch_actions_status.runs[0].action.optional #=> Boolean
resp.job.participating_servers[0].launch_actions_status.runs[0].action.order #=> Integer
resp.job.participating_servers[0].launch_actions_status.runs[0].action.parameters #=> Hash
resp.job.participating_servers[0].launch_actions_status.runs[0].action.parameters["LaunchActionParameterName"].type #=> String, one of "SSM_STORE", "DYNAMIC"
resp.job.participating_servers[0].launch_actions_status.runs[0].action.parameters["LaunchActionParameterName"].value #=> String
resp.job.participating_servers[0].launch_actions_status.runs[0].action.type #=> String, one of "SSM_AUTOMATION", "SSM_COMMAND"
resp.job.participating_servers[0].launch_actions_status.runs[0].failure_reason #=> String
resp.job.participating_servers[0].launch_actions_status.runs[0].run_id #=> String
resp.job.participating_servers[0].launch_actions_status.runs[0].status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED"
resp.job.participating_servers[0].launch_actions_status.ssm_agent_discovery_datetime #=> String
resp.job.participating_servers[0].launch_status #=> String, one of "PENDING", "IN_PROGRESS", "LAUNCHED", "FAILED", "TERMINATED"
resp.job.participating_servers[0].recovery_instance_id #=> String
resp.job.participating_servers[0].source_server_id #=> String
resp.job.status #=> String, one of "PENDING", "STARTED", "COMPLETED"
resp.job.tags #=> Hash
resp.job.tags["TagKey"] #=> String
resp.job.type #=> String, one of "LAUNCH", "TERMINATE", "CREATE_CONVERTED_SNAPSHOT"
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:is_drill
(Boolean)
—
Whether this Source Server Recovery operation is a drill or not.
-
:source_servers
(required, Array<Types::StartRecoveryRequestSourceServer>)
—
The Source Servers that we want to start a Recovery Job for.
-
:tags
(Hash<String,String>)
—
The tags to be associated with the Recovery Job.
Returns:
-
(Types::StartRecoveryResponse)
—
Returns a response object which responds to the following methods:
-
#job => Types::Job
-
See Also:
2545 2546 2547 2548 |
# File 'lib/aws-sdk-drs/client.rb', line 2545 def start_recovery(params = {}, options = {}) req = build_request(:start_recovery, params) req.send_request(options) end |