start_plan_execution
async
¶
start_plan_execution(
plan_arn: PlanArn,
target_region: str,
action: ExecutionAction,
*,
config_overrides: Optional[AsyncARCRegionswitchClientConfig] = None,
mode: Optional[ExecutionMode] = None,
comment: Optional[ExecutionComment] = None,
latest_version: Optional[str] = None,
recovery_execution_id: Optional[RecoveryExecutionId] = None,
client_token: Optional[str] = None,
) -> StartPlanExecutionResponse
Starts the execution of a Region switch plan. You can execute a plan in either graceful or ungraceful mode.
Specifing ungraceful mode either changes the behavior of the execution blocks in a workflow or skips specific execution blocks.
Parameters:
-
plan_arn(PlanArn) –The Amazon Resource Name (ARN) of the plan to execute.
-
target_region(str) –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(ExecutionAction) –The action to perform. Valid values are
activate(to shift traffic to the target Region) ordeactivate(to shift traffic away from the target Region). -
mode(Optional[ExecutionMode], default:None) –The plan execution mode. Valid values are
graceful, for starting the execution in graceful mode, orungraceful, for starting the execution in ungraceful mode. -
comment(Optional[ExecutionComment], default:None) –An optional comment explaining why the plan execution is being started.
-
latest_version(Optional[str], default:None) –A boolean value indicating whether to use the latest version of the plan. If set to false, you must specify a specific version.
-
recovery_execution_id(Optional[RecoveryExecutionId], default:None) –The execution identifier of the recovery execution that ran in the opposite region post-recovery is ran in. Required when starting a post-recovery execution.
-
client_token(Optional[str], default:None) –A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request and returns the result of the original successful request. If you don't provide a client token, the service automatically generates one. For more information about idempotency, see Making retries safe with idempotent APIs.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
HTTP Status Code: 403
-
ConflictException–The client token was already used with different request parameters. A client token must map to the same parameters for every request. To retry this operation, provide a new client token.
-
IllegalArgumentException–The request processing has an invalid argument.
-
IllegalStateException–The operation failed because the current state of the resource doesn't allow the operation to proceed.
HTTP Status Code: 400
-
ResourceNotFoundException–The specified resource was not found.
HTTP Status Code: 404
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_arc_region_switch/_services/async_arc_regionswitch.py
1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 | |