Returns the landing zone ARN for the landing zone deployed in your managed account. This API also creates an ARN for existing accounts that do not yet have a landing zone ARN.
Returns one landing zone ARN.
Parameters:
-
next_token
(Optional[str], default:
None
)
–
The token to continue the list from a previous API call with the same parameters.
-
max_results
(Optional[ListLandingZonesMaxResults], default:
None
)
–
The maximum number of returned landing zone ARNs, which is one.
Raises:
Source code in docs_src/capo_controltower/_services/control_tower.py
| def list_landing_zones(
self,
*,
config_overrides: Optional[ControlTowerClientConfig] = None,
next_token: Optional[str] = None,
max_results: Optional[
"capo_controltower.types.list_landing_zones_max_results.ListLandingZonesMaxResults"
] = None,
) -> "capo_controltower.types.list_landing_zones_output.ListLandingZonesOutput":
"""<p>Returns the landing zone ARN for the landing zone deployed in your managed account. This API also creates an ARN for existing accounts that do not yet have a landing zone ARN. </p> <p>Returns one landing zone ARN.</p>
Args:
next_token: <p>The token to continue the list from a previous API call with the same parameters.</p>
max_results: <p>The maximum number of returned landing zone ARNs, which is one.</p>
Raises:
capo_controltower.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_controltower.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during processing of a request.</p>
capo_controltower.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_controltower.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
capo_controltower.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_controltower.types.list_landing_zones_input.ListLandingZonesInput]",
) -> OperationResponse[
"capo_controltower.types.list_landing_zones_output.ListLandingZonesOutput"
]:
import capo_controltower._operations.aws_control_tower_apis.list_landing_zones
output, http_response = (
capo_controltower._operations.aws_control_tower_apis.list_landing_zones.list_landing_zones(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListLandingZones")
)
input_: capo_controltower.types.list_landing_zones_input.ListLandingZonesInput = {}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|