network_acls
Creates, updates, deletes or gets a network_acl resource or lists network_acls in a region
Overview
| Name | network_acls |
| Type | Resource |
| Description | Specifies a network ACL for your VPC. To add a network ACL entry, see [AWS::EC2::NetworkAclEntry](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkaclentry.html). |
| Id | awscc.ec2.network_acls |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
vpc_id | string | The ID of the VPC for the network ACL. |
id | string | |
tags | array | The tags for the network ACL. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | |
region | string | AWS region. |
For more information, see AWS::EC2::NetworkAcl.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | network_acls | INSERT | VpcId, region |
delete_resource | network_acls | DELETE | Identifier, region |
update_resource | network_acls | UPDATE | Identifier, PatchDocument, region |
list_resources | network_acls_list_only | SELECT | region |
get_resource | network_acls | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual network_acl.
SELECT
region,
vpc_id,
id,
tags
FROM awscc.ec2.network_acls
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';
Lists all network_acls in a region.
SELECT
region,
id
FROM awscc.ec2.network_acls_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new network_acl resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.ec2.network_acls (
VpcId,
region
)
SELECT
'{{ vpc_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.ec2.network_acls (
VpcId,
Tags,
region
)
SELECT
'{{ vpc_id }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: network_acl
props:
- name: vpc_id
value: '{{ vpc_id }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a network_acl resource, using stack-deploy.
/*+ update */
UPDATE awscc.ec2.network_acls
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.ec2.network_acls
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the network_acls resource, the following permissions are required:
- Read
- Create
- Update
- List
- Delete
ec2:DescribeNetworkAcls,
ec2:DescribeTags
ec2:CreateNetworkAcl,
ec2:DescribeNetworkAcls,
ec2:CreateTags
ec2:DescribeNetworkAcls,
ec2:DeleteTags,
ec2:CreateTags
ec2:DescribeNetworkAcls
ec2:DeleteTags,
ec2:DeleteNetworkAcl,
ec2:DescribeNetworkAcls