Specifies the key value store to delete.
Parameters:
-
name
(KeyValueStoreName)
–
The name of the key value store.
-
if_match
(string)
–
The key value store to delete, if a match occurs.
Raises:
Examples:
To delete a KeyValueStore
Use the following command to delete a KeyValueStore.
>>> client.delete_key_value_store(name='my-keyvaluestore-name', if_match='ETVPDKIKX0DER')
Source code in docs_src/capo_cloudfront/_services/cloud_front.py
| def delete_key_value_store(
self,
name: "capo_cloudfront.types.key_value_store_name.KeyValueStoreName",
if_match: "capo_cloudfront.types.string.string",
*,
config_overrides: Optional[CloudFrontClientConfig] = None,
) -> None:
"""<p>Specifies the key value store to delete.</p>
Args:
name: <p>The name of the key value store.</p>
if_match: <p>The key value store to delete, if a match occurs.</p>
Raises:
capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
capo_cloudfront.errors.cannot_delete_entity_while_in_use.CannotDeleteEntityWhileInUse: <p>The entity cannot be deleted while it is in use.</p>
capo_cloudfront.errors.entity_not_found.EntityNotFound: <p>The entity was not found.</p>
capo_cloudfront.errors.invalid_if_match_version.InvalidIfMatchVersion: <p>The <code>If-Match</code> version is missing or not valid.</p>
capo_cloudfront.errors.precondition_failed.PreconditionFailed: <p>The precondition in one or more of the request fields evaluated to <code>false</code>.</p>
capo_cloudfront.errors.unsupported_operation.UnsupportedOperation: <p>This operation is not supported in this Amazon Web Services Region.</p>
capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete a KeyValueStore
Use the following command to delete a KeyValueStore.
>>> client.delete_key_value_store(name='my-keyvaluestore-name', if_match='ETVPDKIKX0DER')
"""
def _handler(
req: "OperationRequest[capo_cloudfront.types.delete_key_value_store_request.DeleteKeyValueStoreRequest]",
) -> OperationResponse[None]:
import capo_cloudfront._operations.cloudfront2020_05_31.delete_key_value_store
output, http_response = (
capo_cloudfront._operations.cloudfront2020_05_31.delete_key_value_store.delete_key_value_store(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteKeyValueStore")
)
input_: capo_cloudfront.types.delete_key_value_store_request.DeleteKeyValueStoreRequest = {
"name": name,
"if_match": if_match,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|