Update an origin access identity.
Parameters:
-
cloud_front_origin_access_identity_config
(CloudFrontOriginAccessIdentityConfig)
–
The identity's configuration information.
-
id
(string)
–
-
if_match
(Optional[string], default:
None
)
–
The value of the ETag header that you received when retrieving the identity's configuration. For example: E2QWRUHAPOMQZL.
Raises:
Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
| async def update_cloud_front_origin_access_identity(
self,
cloud_front_origin_access_identity_config: "capo_cloudfront.types.cloud_front_origin_access_identity_config.CloudFrontOriginAccessIdentityConfig",
id: "capo_cloudfront.types.string.string",
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
if_match: Optional["capo_cloudfront.types.string.string"] = None,
) -> "capo_cloudfront.types.update_cloud_front_origin_access_identity_result.UpdateCloudFrontOriginAccessIdentityResult":
"""<p>Update an origin access identity.</p>
Args:
cloud_front_origin_access_identity_config: <p>The identity's configuration information.</p>
id: <p>The identity's id.</p>
if_match: <p>The value of the <code>ETag</code> header that you received when retrieving the identity's configuration. 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.missing_body.MissingBody: <p>This operation requires a body. Ensure that the body is present and the <code>Content-Type</code> header is set.</p>
capo_cloudfront.errors.no_such_cloud_front_origin_access_identity.NoSuchCloudFrontOriginAccessIdentity: <p>The specified origin access identity does not 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudfront.types.update_cloud_front_origin_access_identity_request.UpdateCloudFrontOriginAccessIdentityRequest]",
) -> AsyncOperationResponse[
"capo_cloudfront.types.update_cloud_front_origin_access_identity_result.UpdateCloudFrontOriginAccessIdentityResult"
]:
import capo_cloudfront._operations.cloudfront2020_05_31.update_cloud_front_origin_access_identity
(
output,
http_response,
) = await capo_cloudfront._operations.cloudfront2020_05_31.update_cloud_front_origin_access_identity.async_update_cloud_front_origin_access_identity(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateCloudFrontOriginAccessIdentity")
)
input_: capo_cloudfront.types.update_cloud_front_origin_access_identity_request.UpdateCloudFrontOriginAccessIdentityRequest = {
"cloud_front_origin_access_identity_config": cloud_front_origin_access_identity_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
|