Skip to content

update_key_value_store

update_key_value_store(
    name: KeyValueStoreName,
    comment: KeyValueStoreComment,
    if_match: string,
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
) -> UpdateKeyValueStoreResult

Specifies the key value store to update.

Parameters:

  • name (KeyValueStoreName) –

    The name of the key value store to update.

  • comment (KeyValueStoreComment) –

    The comment of the key value store to update.

  • if_match (string) –

    The key value store to update, if a match occurs.

Raises:

Examples:

To update a KeyValueStore Use the following command to update a KeyValueStore.

>>> client.update_key_value_store(name='my-keyvaluestore-name', comment='my-changed-comment', if_match='ETVPDKIKX0DER')
Source code in docs_src/capo_cloudfront/_services/cloud_front.py
def update_key_value_store(
    self,
    name: "capo_cloudfront.types.key_value_store_name.KeyValueStoreName",
    comment: "capo_cloudfront.types.key_value_store_comment.KeyValueStoreComment",
    if_match: "capo_cloudfront.types.string.string",
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
) -> (
    "capo_cloudfront.types.update_key_value_store_result.UpdateKeyValueStoreResult"
):
    """<p>Specifies the key value store to update.</p>

    Args:
        name: <p>The name of the key value store to update.</p>
        comment: <p>The comment of the key value store to update.</p>
        if_match: <p>The key value store to update, if a match occurs.</p>

    Raises:
        capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
        capo_cloudfront.errors.entity_not_found.EntityNotFound: <p>The entity was not found.</p>
        capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</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 update a KeyValueStore
        Use the following command to update a KeyValueStore.

        >>> client.update_key_value_store(name='my-keyvaluestore-name', comment='my-changed-comment', if_match='ETVPDKIKX0DER')
    """

    def _handler(
        req: "OperationRequest[capo_cloudfront.types.update_key_value_store_request.UpdateKeyValueStoreRequest]",
    ) -> OperationResponse[
        "capo_cloudfront.types.update_key_value_store_result.UpdateKeyValueStoreResult"
    ]:
        import capo_cloudfront._operations.cloudfront2020_05_31.update_key_value_store

        output, http_response = (
            capo_cloudfront._operations.cloudfront2020_05_31.update_key_value_store.update_key_value_store(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateKeyValueStore")
    )
    input_: capo_cloudfront.types.update_key_value_store_request.UpdateKeyValueStoreRequest = {
        "name": name,
        "comment": comment,
        "if_match": if_match,
    }

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