CmdID

CmdID / aws / aws cloudfront

aws cloudfront update-field-level-encryption-profile

Update a field-level encryption profile. AWS CLI reference

1 example 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To update a CloudFront field-level encryption profile

The following update-field-level-encryption-profile example updates the field-level encryption profile with the ID PPK0UOSIF5WSV. This example updates the profile's Name and Comment, and adds a second FieldPatterns item, by providing the parameters in a JSON file.

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

aws cloudfront update-field-level-encryption-profile --id PPK0UOSIF5WSV --if-match E1QQG65FS2L2GC --field-level-encryption-profile-config file://fle-profile-config.jsonIdentify
--idThe ID of the field-level encryption profile request.
--if-matchThe value of the ETag header that you received when retrieving the profile identity to update.
--field-level-encryption-profile-configRequest to update a field-level encryption profile.

Contents of fle-profile-config.json:

{
    "Name": "ExampleFLEProfileUpdated",
    "CallerReference": "cli-example",
    "Comment": "Updated FLE profile for AWS CLI example",
    "EncryptionEntities": {
        "Quantity": 1,
        "Items": [
            {
                "PublicKeyId": "K2K8NC4HVFE3M0",
                "ProviderId": "ExampleFLEProvider",
                "FieldPatterns": {
                    "Quantity": 2,
                    "Items": [
                        "ExampleSensitiveField",
                        "SecondExampleSensitiveField"
                    ]
                }
            }
        ]
    }
}
Its output
{
    "ETag": "EJETYFJ9CL66D",
    "FieldLevelEncryptionProfile": {
        "Id": "PPK0UOSIF5WSV",
        "LastModifiedTime": "2019-12-10T19:05:58.296Z",
        "FieldLevelEncryptionProfileConfig": {
            "Name": "ExampleFLEProfileUpdated",
            "CallerReference": "cli-example",
            "Comment": "Updated FLE profile for AWS CLI example",
            "EncryptionEntities": {
                "Quantity": 1,
                "Items": [
                    {
                        "PublicKeyId": "K2K8NC4HVFE3M0",
                        "ProviderId": "ExampleFLEProvider",
                        "FieldPatterns": {
                            "Quantity": 2,
                            "Items": [
                                "ExampleSensitiveField",
                                "SecondExampleSensitiveField"
                            ]
                        }
                    }
                ]
            }
        }
    }
}

For more information, see Use field-level encryption to help protect sensitive data in the Amazon CloudFront Developer Guide.

Options

3 in the AWS CLI reference
--field-level-encryption-profile-configRequest to update a field-level encryption profile.
--idThe ID of the field-level encryption profile request.
--if-matchThe value of the ETag header that you received when retrieving the profile identity to update.