Skip to content

create_landing_zone async

create_landing_zone(
    version: LandingZoneVersion,
    *,
    config_overrides: Optional[AsyncControlTowerClientConfig] = None,
    remediation_types: Optional[RemediationTypes] = None,
    tags: Optional[TagMap] = None,
    manifest: Optional[Manifest] = None,
) -> CreateLandingZoneOutput

Creates a new landing zone. This API call starts an asynchronous operation that creates and configures a landing zone, based on the parameters specified in the manifest JSON file.

Parameters:

  • version (LandingZoneVersion) –

    The landing zone version, for example, 3.0.

  • remediation_types (Optional[RemediationTypes], default: None ) –

    Specifies the types of remediation actions to apply when creating the landing zone, such as automatic drift correction or compliance enforcement.

  • tags (Optional[TagMap], default: None ) –

    Tags to be applied to the landing zone.

  • manifest (Optional[Manifest], default: None ) –

    The manifest JSON file is a text file that describes your Amazon Web Services resources. For examples, review Launch your landing zone.

Raises:

Source code in docs_src/capo_controltower/_services/async_control_tower.py
async def create_landing_zone(
    self,
    version: "capo_controltower.types.landing_zone_version.LandingZoneVersion",
    *,
    config_overrides: Optional[AsyncControlTowerClientConfig] = None,
    remediation_types: Optional[
        "capo_controltower.types.remediation_types.RemediationTypes"
    ] = None,
    tags: Optional["capo_controltower.types.tag_map.TagMap"] = None,
    manifest: Optional["capo_controltower.types.manifest.Manifest"] = None,
) -> "capo_controltower.types.create_landing_zone_output.CreateLandingZoneOutput":
    """<p>Creates a new landing zone. This API call starts an asynchronous operation that creates and configures a landing zone, based on the parameters specified in the manifest JSON file.</p>

    Args:
        version: <p>The landing zone version, for example, 3.0.</p>
        remediation_types: <p>Specifies the types of remediation actions to apply when creating the landing zone, such as automatic drift correction or compliance enforcement.</p>
        tags: <p>Tags to be applied to the landing zone. </p>
        manifest: <p>The manifest JSON file is a text file that describes your Amazon Web Services resources. For examples, review <a href="https://docs.aws.amazon.com/controltower/latest/userguide/lz-api-launch">Launch your landing zone</a>. </p>

    Raises:
        capo_controltower.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_controltower.errors.conflict_exception.ConflictException: <p>Updating or deleting the resource can cause an inconsistent state.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_controltower.types.create_landing_zone_input.CreateLandingZoneInput]",
    ) -> AsyncOperationResponse[
        "capo_controltower.types.create_landing_zone_output.CreateLandingZoneOutput"
    ]:
        import capo_controltower._operations.aws_control_tower_apis.create_landing_zone

        (
            output,
            http_response,
        ) = await capo_controltower._operations.aws_control_tower_apis.create_landing_zone.async_create_landing_zone(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateLandingZone")
    )
    input_: capo_controltower.types.create_landing_zone_input.CreateLandingZoneInput = {
        "version": version
    }
    if remediation_types is not None:
        input_["remediation_types"] = remediation_types
    if tags is not None:
        input_["tags"] = tags
    if manifest is not None:
        input_["manifest"] = manifest

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output