Get the details of an Amazon CloudFront VPC origin.
Parameters:
Raises:
Examples:
To get a VPC origin
The following command gets a VPC origin:
>>> await client.get_vpc_origin(id='vo_BQwjxxQxjCaBcQLzJUFkDM')
Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
| async def get_vpc_origin(
self,
id: "capo_cloudfront.types.string.string",
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
) -> "capo_cloudfront.types.get_vpc_origin_result.GetVpcOriginResult":
"""<p>Get the details of an Amazon CloudFront VPC origin.</p>
Args:
id: <p>The VPC origin ID.</p>
Raises:
capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
capo_cloudfront.errors.entity_not_found.EntityNotFound: <p>The entity was not found.</p>
capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</p>
capo_cloudfront.errors.unsupported_operation.UnsupportedOperation: <p>This operation is not supported in this Amazon Web Services Region.</p>
capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To get a VPC origin
The following command gets a VPC origin:
>>> await client.get_vpc_origin(id='vo_BQwjxxQxjCaBcQLzJUFkDM')
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudfront.types.get_vpc_origin_request.GetVpcOriginRequest]",
) -> AsyncOperationResponse[
"capo_cloudfront.types.get_vpc_origin_result.GetVpcOriginResult"
]:
import capo_cloudfront._operations.cloudfront2020_05_31.get_vpc_origin
(
output,
http_response,
) = await capo_cloudfront._operations.cloudfront2020_05_31.get_vpc_origin.async_get_vpc_origin(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetVpcOrigin")
)
input_: capo_cloudfront.types.get_vpc_origin_request.GetVpcOriginRequest = {
"id": id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|