Creates a cell in an account.
Parameters:
-
cell_name
(Optional[__string], default:
None
)
–
The name of the cell to create.
-
cells
(Optional[__listOf__string], default:
None
)
–
A list of cell Amazon Resource Names (ARNs) contained within this cell, for use in nested cells. For example, Availability Zones within specific Amazon Web Services Regions.
Raises:
Source code in docs_src/capo_route53_recovery_readiness/_services/route53_recovery_readiness.py
| def create_cell(
self,
*,
config_overrides: Optional[Route53RecoveryReadinessClientConfig] = None,
cell_name: Optional[
"capo_route53_recovery_readiness.types.__string.__string"
] = None,
cells: Optional[
"capo_route53_recovery_readiness.types.__list_of__string.__listOf__string"
] = None,
tags: Optional["capo_route53_recovery_readiness.types.tags.Tags"] = None,
) -> (
"capo_route53_recovery_readiness.types.create_cell_response.CreateCellResponse"
):
"""<p>Creates a cell in an account.</p>
Args:
cell_name: <p>The name of the cell to create.</p>
cells: <p>A list of cell Amazon Resource Names (ARNs) contained within this cell, for use in nested cells. For example, Availability Zones within specific Amazon Web Services Regions.</p>
Raises:
capo_route53_recovery_readiness.errors.access_denied_exception.AccessDeniedException: User does not have sufficient access to perform this action.
capo_route53_recovery_readiness.errors.conflict_exception.ConflictException: Updating or deleting a resource can cause an inconsistent state.
capo_route53_recovery_readiness.errors.internal_server_exception.InternalServerException: An unexpected error occurred.
capo_route53_recovery_readiness.errors.throttling_exception.ThrottlingException: Request was denied due to request throttling.
capo_route53_recovery_readiness.errors.validation_exception.ValidationException: The input fails to satisfy the constraints specified by an AWS service.
capo_route53_recovery_readiness.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_route53_recovery_readiness.types.create_cell_request.CreateCellRequest]",
) -> OperationResponse[
"capo_route53_recovery_readiness.types.create_cell_response.CreateCellResponse"
]:
import capo_route53_recovery_readiness._operations.route53_recovery_readiness.create_cell
output, http_response = (
capo_route53_recovery_readiness._operations.route53_recovery_readiness.create_cell.create_cell(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateCell")
)
input_: capo_route53_recovery_readiness.types.create_cell_request.CreateCellRequest = {}
if cell_name is not None:
input_["cell_name"] = cell_name
if cells is not None:
input_["cells"] = cells
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|