Lists all active and completed zonal shifts in Amazon Application Recovery Controller in your Amazon Web Services account in this Amazon Web Services Region. ListZonalShifts returns customer-initiated zonal shifts, as well as practice run zonal shifts that ARC started on your behalf for zonal autoshift.
For more information about listing autoshifts, see ">ListAutoshifts.
Parameters:
-
next_token
(Optional[str], default:
None
)
–
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's nextToken response to request the next page of results.
-
status
(Optional[ZonalShiftStatus], default:
None
)
–
A status for a zonal shift.
The Status for a zonal shift can have one of the following values:
-
ACTIVE: The zonal shift has been started and is active.
-
EXPIRED: The zonal shift has expired (the expiry time was exceeded).
-
CANCELED: The zonal shift was canceled.
-
max_results
(Optional[MaxResults], default:
None
)
–
The number of objects that you want to return with this call.
-
resource_identifier
(Optional[ResourceIdentifier], default:
None
)
–
The identifier for the resource that you want to list zonal shifts for. The identifier is the Amazon Resource Name (ARN) for the resource.
Raises:
Source code in docs_src/capo_arc_zonal_shift/_services/async_arc_zonal_shift.py
| async def list_zonal_shifts(
self,
*,
config_overrides: Optional[AsyncARCZonalShiftClientConfig] = None,
next_token: Optional[str] = None,
status: Optional[
"capo_arc_zonal_shift.types.zonal_shift_status.ZonalShiftStatus"
] = None,
max_results: Optional[
"capo_arc_zonal_shift.types.max_results.MaxResults"
] = None,
resource_identifier: Optional[
"capo_arc_zonal_shift.types.resource_identifier.ResourceIdentifier"
] = None,
) -> (
"capo_arc_zonal_shift.types.list_zonal_shifts_response.ListZonalShiftsResponse"
):
"""<p>Lists all active and completed zonal shifts in Amazon Application Recovery Controller in your Amazon Web Services account in this Amazon Web Services Region. <code>ListZonalShifts</code> returns customer-initiated zonal shifts, as well as practice run zonal shifts that ARC started on your behalf for zonal autoshift.</p> <p>For more information about listing autoshifts, see <a href="https://docs.aws.amazon.com/arc-zonal-shift/latest/api/API_ListAutoshifts.html">">ListAutoshifts</a>.</p>
Args:
next_token: <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>nextToken</code> 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's <code>nextToken</code> response to request the next page of results.</p>
status: <p>A status for a zonal shift.</p> <p>The <code>Status</code> for a zonal shift can have one of the following values:</p> <ul> <li> <p> <b>ACTIVE</b>: The zonal shift has been started and is active.</p> </li> <li> <p> <b>EXPIRED</b>: The zonal shift has expired (the expiry time was exceeded).</p> </li> <li> <p> <b>CANCELED</b>: The zonal shift was canceled.</p> </li> </ul>
max_results: <p>The number of objects that you want to return with this call.</p>
resource_identifier: <p>The identifier for the resource that you want to list zonal shifts for. The identifier is the Amazon Resource Name (ARN) for the resource.</p>
Raises:
capo_arc_zonal_shift.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_arc_zonal_shift.errors.internal_server_exception.InternalServerException: <p>There was an internal server error.</p>
capo_arc_zonal_shift.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_arc_zonal_shift.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_arc_zonal_shift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_arc_zonal_shift.types.list_zonal_shifts_request.ListZonalShiftsRequest]",
) -> AsyncOperationResponse[
"capo_arc_zonal_shift.types.list_zonal_shifts_response.ListZonalShiftsResponse"
]:
import capo_arc_zonal_shift._operations.perc_data_plane.list_zonal_shifts
(
output,
http_response,
) = await capo_arc_zonal_shift._operations.perc_data_plane.list_zonal_shifts.async_list_zonal_shifts(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListZonalShifts")
)
input_: capo_arc_zonal_shift.types.list_zonal_shifts_request.ListZonalShiftsRequest = {}
if next_token is not None:
input_["next_token"] = next_token
if status is not None:
input_["status"] = status
if max_results is not None:
input_["max_results"] = max_results
if resource_identifier is not None:
input_["resource_identifier"] = resource_identifier
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|