Skip to content

delete_domain

delete_domain(
    identifier: DomainId,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    client_token: Optional[str] = None,
    skip_deletion_check: Optional[bool] = None,
    cascade_delete: Optional[bool] = None,
) -> DeleteDomainOutput

Deletes a Amazon DataZone domain.

Parameters:

  • identifier (DomainId) –

    The identifier of the Amazon Web Services domain that is to be deleted.

  • client_token (Optional[str], default: None ) –

    A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

  • skip_deletion_check (Optional[bool], default: None ) –

    Specifies whether to skip the check that prevents deletion of a domain that still contains resources. When you use this parameter, Amazon DataZone deletes the domain but might not remove its associated resources, which can leave orphaned resources behind. To delete a domain and fully clean up its associated resources, use cascadeDelete instead. You can't use this parameter together with cascadeDelete.

  • cascade_delete (Optional[bool], default: None ) –

    Specifies whether to delete the domain along with all of its associated resources. When you use this parameter, Amazon DataZone deletes the domain and cleanly removes its associated resources without leaving orphaned resources behind. Amazon DataZone reports deletion progress in the deleteProgress field. Amazon DataZone reports any resources that it can't delete in the failureReasons field of the GetDomain response. You can't use this parameter together with skipDeletionCheck. If you don't specify a value, the default is false.

Raises:

Source code in docs_src/capo_datazone/_services/data_zone.py
def delete_domain(
    self,
    identifier: "capo_datazone.types.domain_id.DomainId",
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    client_token: Optional[str] = None,
    skip_deletion_check: Optional[bool] = None,
    cascade_delete: Optional[bool] = None,
) -> "capo_datazone.types.delete_domain_output.DeleteDomainOutput":
    """<p>Deletes a Amazon DataZone domain.</p>

    Args:
        identifier: <p>The identifier of the Amazon Web Services domain that is to be deleted.</p>
        client_token: <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
        skip_deletion_check: <p>Specifies whether to skip the check that prevents deletion of a domain that still contains resources. When you use this parameter, Amazon DataZone deletes the domain but might not remove its associated resources, which can leave orphaned resources behind. To delete a domain and fully clean up its associated resources, use <code>cascadeDelete</code> instead. You can't use this parameter together with <code>cascadeDelete</code>.</p>
        cascade_delete: <p>Specifies whether to delete the domain along with all of its associated resources. When you use this parameter, Amazon DataZone deletes the domain and cleanly removes its associated resources without leaving orphaned resources behind. Amazon DataZone reports deletion progress in the <code>deleteProgress</code> field. Amazon DataZone reports any resources that it can't delete in the <code>failureReasons</code> field of the <code>GetDomain</code> response. You can't use this parameter together with <code>skipDeletionCheck</code>. If you don't specify a value, the default is <code>false</code>.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.conflict_exception.ConflictException: <p>There is a conflict while performing this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datazone.types.delete_domain_input.DeleteDomainInput]",
    ) -> OperationResponse[
        "capo_datazone.types.delete_domain_output.DeleteDomainOutput"
    ]:
        import capo_datazone._operations.data_zone.delete_domain

        output, http_response = (
            capo_datazone._operations.data_zone.delete_domain.delete_domain(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDomain")
    )
    input_: capo_datazone.types.delete_domain_input.DeleteDomainInput = {
        "identifier": identifier
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if skip_deletion_check is not None:
        input_["skip_deletion_check"] = skip_deletion_check
    if cascade_delete is not None:
        input_["cascade_delete"] = cascade_delete

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output