Skip to content

update_field_level_encryption_config async

update_field_level_encryption_config(
    field_level_encryption_config: FieldLevelEncryptionConfig,
    id: string,
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
    if_match: Optional[string] = None,
) -> UpdateFieldLevelEncryptionConfigResult

Update a field-level encryption configuration.

Parameters:

  • field_level_encryption_config (FieldLevelEncryptionConfig) –

    Request to update a field-level encryption configuration.

  • id (string) –

    The ID of the configuration you want to update.

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

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

Raises:

Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
async def update_field_level_encryption_config(
    self,
    field_level_encryption_config: "capo_cloudfront.types.field_level_encryption_config.FieldLevelEncryptionConfig",
    id: "capo_cloudfront.types.string.string",
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
    if_match: Optional["capo_cloudfront.types.string.string"] = None,
) -> "capo_cloudfront.types.update_field_level_encryption_config_result.UpdateFieldLevelEncryptionConfigResult":
    """<p>Update a field-level encryption configuration.</p>

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

    Raises:
        capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</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_config.NoSuchFieldLevelEncryptionConfig: <p>The specified configuration for field-level encryption doesn't exist.</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.query_arg_profile_empty.QueryArgProfileEmpty: <p>No profile specified for the field-level encryption query argument.</p>
        capo_cloudfront.errors.too_many_field_level_encryption_content_type_profiles.TooManyFieldLevelEncryptionContentTypeProfiles: <p>The maximum number of content type profiles for field-level encryption have been created.</p>
        capo_cloudfront.errors.too_many_field_level_encryption_query_arg_profiles.TooManyFieldLevelEncryptionQueryArgProfiles: <p>The maximum number of query arg profiles for field-level encryption have been created.</p>
        capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudfront.types.update_field_level_encryption_config_request.UpdateFieldLevelEncryptionConfigRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudfront.types.update_field_level_encryption_config_result.UpdateFieldLevelEncryptionConfigResult"
    ]:
        import capo_cloudfront._operations.cloudfront2020_05_31.update_field_level_encryption_config

        (
            output,
            http_response,
        ) = await capo_cloudfront._operations.cloudfront2020_05_31.update_field_level_encryption_config.async_update_field_level_encryption_config(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFieldLevelEncryptionConfig")
    )
    input_: capo_cloudfront.types.update_field_level_encryption_config_request.UpdateFieldLevelEncryptionConfigRequest = {
        "field_level_encryption_config": field_level_encryption_config,
        "id": id,
    }
    if if_match is not None:
        input_["if_match"] = if_match

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output