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
| 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. |
For more information, see AWS::CloudFront::VpcOrigin.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | VpcOriginEndpointConfig, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, 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 data__Identifier = '<Id>';
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
'{{ VpcOriginEndpointConfig }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.cloudfront.vpc_origins (
Tags,
VpcOriginEndpointConfig,
region
)
SELECT
'{{ Tags }}',
'{{ VpcOriginEndpointConfig }}',
'{{ 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: VpcOriginEndpointConfig
value:
Arn: '{{ Arn }}'
HTTPPort: '{{ HTTPPort }}'
HTTPSPort: '{{ HTTPSPort }}'
Name: '{{ Name }}'
OriginProtocolPolicy: '{{ OriginProtocolPolicy }}'
OriginSSLProtocols:
- '{{ OriginSSLProtocols[0] }}'
DELETE example
/*+ delete */
DELETE FROM awscc.cloudfront.vpc_origins
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the vpc_origins resource, the following permissions are required:
Create
cloudfront:CreateVpcOrigin,
cloudfront:GetVpcOrigin,
cloudfront:TagResource,
ec2:DescribeInstances,
elasticloadbalancing:DescribeLoadBalancers,
ec2:DescribeInternetGateways,
iam:CreateServiceLinkedRole,
sts:AssumeRole
Delete
cloudfront:DeleteVpcOrigin,
cloudfront:GetVpcOrigin,
elasticloadbalancing:DescribeLoadBalancers,
ec2:DescribeInstances,
ec2:DescribeInternetGateways,
iam:CreateServiceLinkedRole,
sts:AssumeRole
List
cloudfront:ListVpcOrigins
Read
cloudfront:GetVpcOrigin,
cloudfront:ListTagsForResource
Update
cloudfront:UpdateVpcOrigin,
cloudfront:GetVpcOrigin,
cloudfront:TagResource,
ec2:DescribeInstances,
cloudfront:UntagResource,
cloudfront:ListTagsForResource,
elasticloadbalancing:DescribeLoadBalancers,
ec2:DescribeInternetGateways,
iam:CreateServiceLinkedRole,
sts:AssumeRole