vpc_origins
Creates, updates, deletes or gets a vpc_origin resource or lists vpc_origins in a region
Overview
| Name | vpc_origins |
| Type | Resource |
| Description | An Amazon CloudFront VPC origin. |
| Id | awscc.cloudfront.vpc_origins |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | |
created_time | string | |
id | string | |
last_modified_time | string | |
status | string | |
tags | array | A complex type that contains zero or more ``Tag`` elements. |
vpc_origin_endpoint_config | object | The VPC origin endpoint configuration. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | |
region | string | AWS region. |
For more information, see AWS::CloudFront::VpcOrigin.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | vpc_origins | INSERT | VpcOriginEndpointConfig, region |
delete_resource | vpc_origins | DELETE | Identifier, region |
update_resource | vpc_origins | UPDATE | Identifier, PatchDocument, region |
list_resources | vpc_origins_list_only | SELECT | region |
get_resource | vpc_origins | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all vpc_origins in a region.
SELECT
region,
id
FROM awscc.cloudfront.vpc_origins_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new vpc_origin resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.cloudfront.vpc_origins (
VpcOriginEndpointConfig,
region
)
SELECT
'{{ vpc_origin_endpoint_config }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.cloudfront.vpc_origins (
Tags,
VpcOriginEndpointConfig,
region
)
SELECT
'{{ tags }}',
'{{ vpc_origin_endpoint_config }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: vpc_origin
props:
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: vpc_origin_endpoint_config
value:
arn: '{{ arn }}'
h_tt_pport: '{{ h_tt_pport }}'
h_tt_ps_port: '{{ h_tt_ps_port }}'
name: '{{ name }}'
origin_protocol_policy: '{{ origin_protocol_policy }}'
origin_ss_lprotocols:
- '{{ origin_ss_lprotocols[0] }}'
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:
- Create
- Delete
- List
- Read
- Update
cloudfront:CreateVpcOrigin,
cloudfront:GetVpcOrigin,
cloudfront:TagResource,
ec2:DescribeInstances,
elasticloadbalancing:DescribeLoadBalancers,
ec2:DescribeInternetGateways,
iam:CreateServiceLinkedRole,
sts:AssumeRole
cloudfront:DeleteVpcOrigin,
cloudfront:GetVpcOrigin,
elasticloadbalancing:DescribeLoadBalancers,
ec2:DescribeInstances,
ec2:DescribeInternetGateways,
iam:CreateServiceLinkedRole,
sts:AssumeRole
cloudfront:ListVpcOrigins
cloudfront:GetVpcOrigin,
cloudfront:ListTagsForResource
cloudfront:UpdateVpcOrigin,
cloudfront:GetVpcOrigin,
cloudfront:TagResource,
ec2:DescribeInstances,
cloudfront:UntagResource,
cloudfront:ListTagsForResource,
elasticloadbalancing:DescribeLoadBalancers,
ec2:DescribeInternetGateways,
iam:CreateServiceLinkedRole,
sts:AssumeRole