Deletes a key-signing key (KSK). Before you can delete a KSK, you must deactivate it. The KSK must be deactivated before you can delete it regardless of whether the hosted zone is enabled for DNSSEC signing.
You can use DeactivateKeySigningKey to deactivate the key before you delete it.
Use GetDNSSEC to verify that the KSK is in an INACTIVE status.
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
–
-
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/async_route53.py
| async def delete_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[AsyncRoute53ClientConfig] = None,
) -> "capo_route_53.types.delete_key_signing_key_response.DeleteKeySigningKeyResponse":
"""<p>Deletes a key-signing key (KSK). Before you can delete a KSK, you must deactivate it. The KSK must be deactivated before you can delete it regardless of whether the hosted zone is enabled for DNSSEC signing.</p> <p>You can use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeactivateKeySigningKey.html">DeactivateKeySigningKey</a> to deactivate the key before you delete it.</p> <p>Use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetDNSSEC.html">GetDNSSEC</a> to verify that the KSK is in an <code>INACTIVE</code> status.</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_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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_route_53.types.delete_key_signing_key_request.DeleteKeySigningKeyRequest]",
) -> AsyncOperationResponse[
"capo_route_53.types.delete_key_signing_key_response.DeleteKeySigningKeyResponse"
]:
import capo_route_53._operations.aws_dns_v20130401.delete_key_signing_key
(
output,
http_response,
) = await capo_route_53._operations.aws_dns_v20130401.delete_key_signing_key.async_delete_key_signing_key(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteKeySigningKey")
)
input_: capo_route_53.types.delete_key_signing_key_request.DeleteKeySigningKeyRequest = {
"hosted_zone_id": hosted_zone_id,
"name": name,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|