This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html). # AWS::EC2::NetworkAcl 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). ## Syntax To declare this entity in your CloudFormation template, use the following syntax: ### JSON ``` { "Type" : "AWS::EC2::NetworkAcl", "Properties" : { "[Tags](#cfn-ec2-networkacl-tags)" : {{[ Tag, ... ]}}, "[VpcId](#cfn-ec2-networkacl-vpcid)" : {{String}} } } ``` ### YAML ``` Type: AWS::EC2::NetworkAcl Properties: [Tags](#cfn-ec2-networkacl-tags): {{ - Tag}} [VpcId](#cfn-ec2-networkacl-vpcid): {{String}} ``` ## Properties `Tags` The tags for the network ACL. *Required*: No *Type*: Array of [Tag](aws-properties-ec2-networkacl-tag.md) *Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) `VpcId` The ID of the VPC for the network ACL. *Required*: Yes *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) ## Return values ### Ref When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the network ACL. For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html). ### Fn::GetAtt The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values. For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html). #### `Id` The ID of the network ACL. ## Examples ### Network ACL The following example creates a network ACL. #### JSON ``` "myNetworkAcl" : { "Type" : "AWS::EC2::NetworkAcl", "Properties" : { "VpcId" : { "Ref" : "myVPC" }, "Tags" : [ { "Key" : "stack", "Value" : "production" } ] } } ``` #### YAML ``` myNetworkAcl: Type: AWS::EC2::NetworkAcl Properties: VpcId: Ref: myVPC Tags: - Key: stack Value: production ``` ## See also + [CreateNetworkAcl](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateNetworkAcl.html) in the *Amazon EC2 API Reference* + [Network ACLs](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html) in the *Amazon VPC User Guide*

AltStyle によって変換されたページ (->オリジナル) /