Skip to content

delete_reusable_delegation_set

delete_reusable_delegation_set(
    id: ResourceId, *, config_overrides: Optional[Route53ClientConfig] = None
) -> DeleteReusableDelegationSetResponse

Deletes a reusable delegation set.

You can delete a reusable delegation set only if it isn't associated with any hosted zones.

To verify that the reusable delegation set is not associated with any hosted zones, submit a GetReusableDelegationSet request and specify the ID of the reusable delegation set that you want to delete.

Parameters:

  • id (ResourceId) –

    The ID of the reusable delegation set that you want to delete.

Raises:

  • DelegationSetInUse –

    The specified delegation contains associated hosted zones which must be deleted before the reusable delegation set can be deleted.

  • DelegationSetNotReusable –

    A reusable delegation set with the specified ID does not exist.

  • InvalidInput –

    The input is not valid.

  • NoSuchDelegationSet –

    A reusable delegation set with the specified ID does not exist.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_route_53/_services/route53.py
def delete_reusable_delegation_set(
    self,
    id: "capo_route_53.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[Route53ClientConfig] = None,
) -> "capo_route_53.types.delete_reusable_delegation_set_response.DeleteReusableDelegationSetResponse":
    """<p>Deletes a reusable delegation set.</p> <important> <p>You can delete a reusable delegation set only if it isn't associated with any hosted zones.</p> </important> <p>To verify that the reusable delegation set is not associated with any hosted zones, submit a <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetReusableDelegationSet.html">GetReusableDelegationSet</a> request and specify the ID of the reusable delegation set that you want to delete.</p>

    Args:
        id: <p>The ID of the reusable delegation set that you want to delete.</p>

    Raises:
        capo_route_53.errors.delegation_set_in_use.DelegationSetInUse: <p>The specified delegation contains associated hosted zones which must be deleted before the reusable delegation set can be deleted.</p>
        capo_route_53.errors.delegation_set_not_reusable.DelegationSetNotReusable: <p>A reusable delegation set with the specified ID does not exist.</p>
        capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
        capo_route_53.errors.no_such_delegation_set.NoSuchDelegationSet: <p>A reusable delegation set with the specified ID does not exist.</p>
        capo_route_53.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route_53.types.delete_reusable_delegation_set_request.DeleteReusableDelegationSetRequest]",
    ) -> OperationResponse[
        "capo_route_53.types.delete_reusable_delegation_set_response.DeleteReusableDelegationSetResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.delete_reusable_delegation_set

        output, http_response = (
            capo_route_53._operations.aws_dns_v20130401.delete_reusable_delegation_set.delete_reusable_delegation_set(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteReusableDelegationSet")
    )
    input_: capo_route_53.types.delete_reusable_delegation_set_request.DeleteReusableDelegationSetRequest = {
        "id": id
    }

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