Skip to content

deactivate_key_signing_key

deactivate_key_signing_key(
    hosted_zone_id: ResourceId,
    name: SigningKeyName,
    *,
    config_overrides: Optional[Route53ClientConfig] = None,
) -> DeactivateKeySigningKeyResponse

Deactivates a key-signing key (KSK) so that it will not be used for signing by DNSSEC. This operation changes the KSK status to INACTIVE.

Parameters:

  • hosted_zone_id (ResourceId) –

    A unique string used to identify a hosted zone.

  • name (SigningKeyName) –

    A string used to identify a key-signing key (KSK).

Raises:

  • ConcurrentModification –

    Another user submitted a request to create, update, or delete the object at the same time that you did. Retry the request.

  • InvalidInput –

    The input is not valid.

  • InvalidKeySigningKeyStatus –

    The key-signing key (KSK) status isn't valid or another KSK has the status INTERNAL_FAILURE.

  • InvalidSigningStatus –

    Your hosted zone status isn't valid for this operation. In the hosted zone, change the status to enable DNSSEC or disable DNSSEC.

  • KeySigningKeyInParentDSRecord –

    The key-signing key (KSK) is specified in a parent DS record.

  • KeySigningKeyInUse –

    The key-signing key (KSK) that you specified can't be deactivated because it's the only KSK for a currently-enabled DNSSEC. Disable DNSSEC signing, or add or enable another KSK.

  • NoSuchKeySigningKey –

    The specified key-signing key (KSK) doesn't 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 deactivate_key_signing_key(
    self,
    hosted_zone_id: "capo_route_53.types.resource_id.ResourceId",
    name: "capo_route_53.types.signing_key_name.SigningKeyName",
    *,
    config_overrides: Optional[Route53ClientConfig] = None,
) -> "capo_route_53.types.deactivate_key_signing_key_response.DeactivateKeySigningKeyResponse":
    """<p>Deactivates a key-signing key (KSK) so that it will not be used for signing by DNSSEC. This operation changes the KSK status to <code>INACTIVE</code>.</p>

    Args:
        hosted_zone_id: <p>A unique string used to identify a hosted zone.</p>
        name: <p>A string used to identify a key-signing key (KSK).</p>

    Raises:
        capo_route_53.errors.concurrent_modification.ConcurrentModification: <p>Another user submitted a request to create, update, or delete the object at the same time that you did. Retry the request. </p>
        capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
        capo_route_53.errors.invalid_key_signing_key_status.InvalidKeySigningKeyStatus: <p>The key-signing key (KSK) status isn't valid or another KSK has the status <code>INTERNAL_FAILURE</code>.</p>
        capo_route_53.errors.invalid_signing_status.InvalidSigningStatus: <p>Your hosted zone status isn't valid for this operation. In the hosted zone, change the status to enable <code>DNSSEC</code> or disable <code>DNSSEC</code>.</p>
        capo_route_53.errors.key_signing_key_in_parent_ds_record.KeySigningKeyInParentDSRecord: <p>The key-signing key (KSK) is specified in a parent DS record.</p>
        capo_route_53.errors.key_signing_key_in_use.KeySigningKeyInUse: <p>The key-signing key (KSK) that you specified can't be deactivated because it's the only KSK for a currently-enabled DNSSEC. Disable DNSSEC signing, or add or enable another KSK.</p>
        capo_route_53.errors.no_such_key_signing_key.NoSuchKeySigningKey: <p>The specified key-signing key (KSK) doesn't 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.deactivate_key_signing_key_request.DeactivateKeySigningKeyRequest]",
    ) -> OperationResponse[
        "capo_route_53.types.deactivate_key_signing_key_response.DeactivateKeySigningKeyResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.deactivate_key_signing_key

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeactivateKeySigningKey")
    )
    input_: capo_route_53.types.deactivate_key_signing_key_request.DeactivateKeySigningKeyRequest = {
        "hosted_zone_id": hosted_zone_id,
        "name": name,
    }

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