Skip to content

activate_key_signing_key

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

Activates a key-signing key (KSK) so that it can be used for signing by DNSSEC. This operation changes the KSK status to ACTIVE.

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). Name can include numbers, letters, and underscores (_). Name must be unique for each key-signing key in the same hosted zone.

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.

  • InvalidKMSArn –

    The KeyManagementServiceArn that you specified isn't valid to use with DNSSEC signing.

  • InvalidSigningStatus –

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

  • 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 activate_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.activate_key_signing_key_response.ActivateKeySigningKeyResponse":
    """<p>Activates a key-signing key (KSK) so that it can be used for signing by DNSSEC. This operation changes the KSK status to <code>ACTIVE</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). <code>Name</code> can include numbers, letters, and underscores (_). <code>Name</code> must be unique for each key-signing key in the same hosted zone.</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_kms_arn.InvalidKMSArn: <p>The KeyManagementServiceArn that you specified isn't valid to use with DNSSEC signing.</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.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.activate_key_signing_key_request.ActivateKeySigningKeyRequest]",
    ) -> OperationResponse[
        "capo_route_53.types.activate_key_signing_key_response.ActivateKeySigningKeyResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.activate_key_signing_key

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ActivateKeySigningKey")
    )
    input_: capo_route_53.types.activate_key_signing_key_request.ActivateKeySigningKeyRequest = {
        "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