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.
Parameters:
-
plan_arn
(PlanArn)
–
The Amazon Resource Name (ARN) of the plan.
-
execution_id
(ExecutionId)
–
The execution identifier of a plan execution.
-
step_name
(StepName)
–
The name of a step in a plan execution.
-
approval
(Approval)
–
The status of approval for a plan execution step.
-
comment
(Optional[ExecutionComment], default:
None
)
–
A comment that you can enter about a plan execution.
Raises:
Source code in docs_src/capo_arc_region_switch/_services/async_arc_regionswitch.py
| async def approve_plan_execution_step(
self,
plan_arn: "capo_arc_region_switch.types.plan_arn.PlanArn",
execution_id: "capo_arc_region_switch.types.execution_id.ExecutionId",
step_name: "capo_arc_region_switch.types.step_name.StepName",
approval: "capo_arc_region_switch.types.approval.Approval",
*,
config_overrides: Optional[AsyncARCRegionswitchClientConfig] = None,
comment: Optional[
"capo_arc_region_switch.types.execution_comment.ExecutionComment"
] = None,
) -> "capo_arc_region_switch.types.approve_plan_execution_step_response.ApprovePlanExecutionStepResponse":
"""<p>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.</p> <p>You must specify the plan ARN, execution ID, step name, and approval status. You can also provide an optional comment explaining the approval decision.</p>
Args:
plan_arn: <p>The Amazon Resource Name (ARN) of the plan.</p>
execution_id: <p>The execution identifier of a plan execution.</p>
step_name: <p>The name of a step in a plan execution.</p>
approval: <p>The status of approval for a plan execution step. </p>
comment: <p>A comment that you can enter about a plan execution.</p>
Raises:
capo_arc_region_switch.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p> <p>HTTP Status Code: 403</p>
capo_arc_region_switch.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p> <p>HTTP Status Code: 404</p>
capo_arc_region_switch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_arc_region_switch.types.approve_plan_execution_step_request.ApprovePlanExecutionStepRequest]",
) -> AsyncOperationResponse[
"capo_arc_region_switch.types.approve_plan_execution_step_response.ApprovePlanExecutionStepResponse"
]:
import capo_arc_region_switch._operations.arc_region_switch.approve_plan_execution_step
(
output,
http_response,
) = await capo_arc_region_switch._operations.arc_region_switch.approve_plan_execution_step.async_approve_plan_execution_step(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ApprovePlanExecutionStep")
)
input_: capo_arc_region_switch.types.approve_plan_execution_step_request.ApprovePlanExecutionStepRequest = {
"plan_arn": plan_arn,
"execution_id": execution_id,
"step_name": step_name,
"approval": approval,
}
if comment is not None:
input_["comment"] = comment
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|