Skip to content

delete_field_level_encryption_profile

delete_field_level_encryption_profile(
    id: string,
    *,
    config_overrides: Optional[CloudFrontClientConfig] = None,
    if_match: Optional[string] = None,
) -> None

Remove a field-level encryption profile.

Parameters:

  • id (string) –

    Request the ID of the profile you want to delete from CloudFront.

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

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

Raises:

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

    Args:
        id: <p>Request the ID of the profile you want to delete from CloudFront.</p>
        if_match: <p>The value of the <code>ETag</code> header that you received when retrieving the profile to delete. For example: <code>E2QWRUHAPOMQZL</code>.</p>

    Raises:
        capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
        capo_cloudfront.errors.field_level_encryption_profile_in_use.FieldLevelEncryptionProfileInUse: <p>The specified profile for field-level encryption is in use.</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.precondition_failed.PreconditionFailed: <p>The precondition in one or more of the request fields evaluated to <code>false</code>.</p>
        capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudfront.types.delete_field_level_encryption_profile_request.DeleteFieldLevelEncryptionProfileRequest]",
    ) -> OperationResponse[None]:
        import capo_cloudfront._operations.cloudfront2020_05_31.delete_field_level_encryption_profile

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteFieldLevelEncryptionProfile")
    )
    input_: capo_cloudfront.types.delete_field_level_encryption_profile_request.DeleteFieldLevelEncryptionProfileRequest = {
        "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