Skip to main content

vpc_origins

Creates, updates, deletes or gets a vpc_origin resource or lists vpc_origins in a region

Overview

Namevpc_origins
TypeResource
DescriptionAn Amazon CloudFront VPC origin.
Idawscc.cloudfront.vpc_origins

Fields

NameDatatypeDescription
arnstring
created_timestring
idstring
last_modified_timestring
statusstring
tagsarrayA complex type that contains zero or more ``Tag`` elements.
vpc_origin_endpoint_configobjectThe VPC origin endpoint configuration.
regionstringAWS region.

For more information, see AWS::CloudFront::VpcOrigin.

Methods

NameResourceAccessible byRequired Params
create_resourcevpc_originsINSERTVpcOriginEndpointConfig, region
delete_resourcevpc_originsDELETEIdentifier, region
update_resourcevpc_originsUPDATEIdentifier, PatchDocument, region
list_resourcesvpc_origins_list_onlySELECTregion
get_resourcevpc_originsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual vpc_origin.

SELECT
region,
arn,
created_time,
id,
last_modified_time,
status,
tags,
vpc_origin_endpoint_config
FROM awscc.cloudfront.vpc_origins
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';

INSERT example

Use the following StackQL query and manifest file to create a new vpc_origin resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.cloudfront.vpc_origins (
VpcOriginEndpointConfig,
region
)
SELECT
'{{ vpc_origin_endpoint_config }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a vpc_origin resource, using stack-deploy.

/*+ update */
UPDATE awscc.cloudfront.vpc_origins
SET PatchDocument = string('{{ {
"Tags": tags,
"VpcOriginEndpointConfig": vpc_origin_endpoint_config
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.cloudfront.vpc_origins
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';

Permissions

To operate on the vpc_origins resource, the following permissions are required:

cloudfront:CreateVpcOrigin,
cloudfront:GetVpcOrigin,
cloudfront:TagResource,
ec2:DescribeInstances,
elasticloadbalancing:DescribeLoadBalancers,
ec2:DescribeInternetGateways,
iam:CreateServiceLinkedRole,
sts:AssumeRole