Skip to content

update_field_level_encryption_profile

update_field_level_encryption_profile(
    field_level_encryption_profile_config: FieldLevelEncryptionProfileConfig,
    id: string,
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
    if_match: Optional[string] = None,
) -> UpdateFieldLevelEncryptionProfileResult

Update a field-level encryption profile.

Parameters:

  • field_level_encryption_profile_config (FieldLevelEncryptionProfileConfig) –

    Request to update a field-level encryption profile.

  • id (string) –

    The ID of the field-level encryption profile request.

  • if_match (Optional[string], default: None ) –

    The value of the ETag header that you received when retrieving the profile identity to update. For example: E2QWRUHAPOMQZL.

Raises:

Source code in docs_src/capo_cloudfront/_services/cloud_front.py
def update_field_level_encryption_profile(
    self,
    field_level_encryption_profile_config: "capo_cloudfront.types.field_level_encryption_profile_config.FieldLevelEncryptionProfileConfig",
    id: "capo_cloudfront.types.string.string",
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
    if_match: Optional["capo_cloudfront.types.string.string"] = None,
) -> "capo_cloudfront.types.update_field_level_encryption_profile_result.UpdateFieldLevelEncryptionProfileResult":
    """<p>Update a field-level encryption profile.</p>

    Args:
        field_level_encryption_profile_config: <p>Request to update a field-level encryption profile.</p>
        id: <p>The ID of the field-level encryption profile request.</p>
        if_match: <p>The value of the <code>ETag</code> header that you received when retrieving the profile identity to update. For example: <code>E2QWRUHAPOMQZL</code>.</p>

    Raises:
        capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
        capo_cloudfront.errors.field_level_encryption_profile_already_exists.FieldLevelEncryptionProfileAlreadyExists: <p>The specified profile for field-level encryption already exists.</p>
        capo_cloudfront.errors.field_level_encryption_profile_size_exceeded.FieldLevelEncryptionProfileSizeExceeded: <p>The maximum size of a profile for field-level encryption was exceeded.</p>
        capo_cloudfront.errors.illegal_update.IllegalUpdate: <p>The update contains modifications that are not allowed.</p>
        capo_cloudfront.errors.inconsistent_quantities.InconsistentQuantities: <p>The value of <code>Quantity</code> and the size of <code>Items</code> don't match.</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.no_such_field_level_encryption_profile.NoSuchFieldLevelEncryptionProfile: <p>The specified profile for field-level encryption doesn't exist.</p>
        capo_cloudfront.errors.no_such_public_key.NoSuchPublicKey: <p>The specified public key doesn't exist.</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.too_many_field_level_encryption_encryption_entities.TooManyFieldLevelEncryptionEncryptionEntities: <p>The maximum number of encryption entities for field-level encryption have been created.</p>
        capo_cloudfront.errors.too_many_field_level_encryption_field_patterns.TooManyFieldLevelEncryptionFieldPatterns: <p>The maximum number of field patterns for field-level encryption have been created.</p>
        capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudfront.types.update_field_level_encryption_profile_request.UpdateFieldLevelEncryptionProfileRequest]",
    ) -> OperationResponse[
        "capo_cloudfront.types.update_field_level_encryption_profile_result.UpdateFieldLevelEncryptionProfileResult"
    ]:
        import capo_cloudfront._operations.cloudfront2020_05_31.update_field_level_encryption_profile

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFieldLevelEncryptionProfile")
    )
    input_: capo_cloudfront.types.update_field_level_encryption_profile_request.UpdateFieldLevelEncryptionProfileRequest = {
        "field_level_encryption_profile_config": field_level_encryption_profile_config,
        "id": id,
    }
    if if_match is not None:
        input_["if_match"] = if_match

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