HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/lib/python3/dist-packages/awscli/examples/cloudfront/update-field-level-encryption-config.rst
**To update a CloudFront field-level encryption configuration**

The following example updates the ``Comment`` field of the field-level
encryption configuration with the ID ``C3KM2WVD605UAY`` by providing the
parameters in a JSON file.

To update a field-level encryption configuration, you must have the
configuration's ID and ``ETag``. The ID is returned in the output of the
`create-field-level-encryption-config
<create-field-level-encryption-config.html>`_ and
`list-field-level-encryption-configs
<list-field-level-encryption-configs.html>`_ commands.
To get the ``ETag``, use the
`get-field-level-encryption
<get-field-level-encryption.html>`_ or
`get-field-level-encryption-config
<get-field-level-encryption-config.html>`_ command.
Use the ``--if-match`` option to provide the configuration's ``ETag``.

::

    aws cloudfront update-field-level-encryption-config \
        --id C3KM2WVD605UAY \
        --if-match E2P4Z4VU7TY5SG \
        --field-level-encryption-config file://fle-config.json

The file ``fle-config.json`` is a JSON document in the current directory that
contains the following::

    {
        "CallerReference": "cli-example",
        "Comment": "Updated example FLE configuration",
        "QueryArgProfileConfig": {
            "ForwardWhenQueryArgProfileIsUnknown": true,
            "QueryArgProfiles": {
                "Quantity": 0
            }
        },
        "ContentTypeProfileConfig": {
            "ForwardWhenContentTypeIsUnknown": true,
            "ContentTypeProfiles": {
                "Quantity": 1,
                "Items": [
                    {
                        "Format": "URLEncoded",
                        "ProfileId": "P280MFCLSYOCVU",
                        "ContentType": "application/x-www-form-urlencoded"
                    }
                ]
            }
        }
    }

Output::

    {
        "ETag": "E26M4BIAV81ZF6",
        "FieldLevelEncryption": {
            "Id": "C3KM2WVD605UAY",
            "LastModifiedTime": "2019-12-10T22:26:26.170Z",
            "FieldLevelEncryptionConfig": {
                "CallerReference": "cli-example",
                "Comment": "Updated example FLE configuration",
                "QueryArgProfileConfig": {
                    "ForwardWhenQueryArgProfileIsUnknown": true,
                    "QueryArgProfiles": {
                        "Quantity": 0,
                        "Items": []
                    }
                },
                "ContentTypeProfileConfig": {
                    "ForwardWhenContentTypeIsUnknown": true,
                    "ContentTypeProfiles": {
                        "Quantity": 1,
                        "Items": [
                            {
                                "Format": "URLEncoded",
                                "ProfileId": "P280MFCLSYOCVU",
                                "ContentType": "application/x-www-form-urlencoded"
                            }
                        ]
                    }
                }
            }
        }
    }