CmdID / aws / aws cloudfront
aws cloudfront update-field-level-encryption-config
Update a field-level encryption configuration. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To update a CloudFront field-level encryption configuration
The following update-field-level-encryption-config 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 and list-field-level-encryption-configs commands. To get the ETag, use the get-field-level-encryption or get-field-level-encryption-config 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.jsonIdentify--idThe ID of the configuration you want to update.--if-matchThe value of the ETag header that you received when retrieving the configuration identity to update.--field-level-encryption-configRequest to update a field-level encryption configuration.Contents of fle-config.json:
{
"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"
}
]
}
}
}
Its output, shortened
{
"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"
}
]
}
}
}
}
… 1 more lineFor more information, see Use field-level encryption to help protect sensitive data in the Amazon CloudFront Developer Guide.
Options
--field-level-encryption-configRequest to update a field-level encryption configuration.--idThe ID of the configuration you want to update.--if-matchThe value of the ETag header that you received when retrieving the configuration identity to update.