Skip to main content

vpc_encryption_controls

Creates, updates, deletes, gets or lists a vpc_encryption_controls resource.

Overview

Namevpc_encryption_controls
TypeResource
Idaws.ec2.vpc_encryption_controls

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
modestringThe encryption mode for the VPC Encryption Control configuration.
resource_exclusionsstringInformation about resource exclusions for the VPC Encryption Control configuration.
statestringThe current state of the VPC Encryption Control configuration.
state_messagestringA message providing additional information about the encryption control state.
tagsstringThe tags assigned to the VPC Encryption Control configuration.
vpc_encryption_control_idstringThe ID of the VPC Encryption Control configuration.
vpc_idstringThe ID of the VPC associated with the encryption control configuration.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_vpc_encryption_controlsselectregionDryRun, Filter, VpcEncryptionControlId, VpcId, NextToken, MaxResultsDescribes one or more VPC Encryption Control configurations. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements You can filter the results to return information about specific encryption controls or VPCs. For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.
create_vpc_encryption_controlinsertVpcId, regionDryRun, TagSpecificationCreates a VPC Encryption Control configuration for a specified VPC. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements for standards like HIPAA, FedRAMP, and PCI DSS. For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.
modify_vpc_encryption_controlupdateVpcEncryptionControlId, regionDryRun, Mode, InternetGatewayExclusion, EgressOnlyInternetGatewayExclusion, NatGatewayExclusion, VirtualPrivateGatewayExclusion, VpcPeeringExclusion, LambdaExclusion, VpcLatticeExclusion, ElasticFileSystemExclusionModifies the encryption control configuration for a VPC. You can update the encryption mode and exclusion settings for various gateway types and peering connections. For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.
delete_vpc_encryption_controldeleteVpcEncryptionControlId, regionDryRunDeletes a VPC Encryption Control configuration. This removes the encryption policy enforcement from the specified VPC. For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
VpcEncryptionControlIdstringThe ID of the VPC Encryption Control resource to delete.
VpcIdstringThe ID of the VPC for which to create the encryption control configuration.
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
EgressOnlyInternetGatewayExclusionstringSpecifies whether to exclude egress-only internet gateway traffic from encryption enforcement.
ElasticFileSystemExclusionstringSpecifies whether to exclude Elastic File System traffic from encryption enforcement.
FilterarrayThe filters to apply to the request.
InternetGatewayExclusionstringSpecifies whether to exclude internet gateway traffic from encryption enforcement.
LambdaExclusionstringSpecifies whether to exclude Lambda function traffic from encryption enforcement.
MaxResultsintegerThe maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
ModestringThe encryption mode for the VPC Encryption Control configuration.
NatGatewayExclusionstringSpecifies whether to exclude NAT gateway traffic from encryption enforcement.
NextTokenstringThe token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.
TagSpecificationarrayThe tags to apply to the VPC Encryption Control resource.
VirtualPrivateGatewayExclusionstringSpecifies whether to exclude virtual private gateway traffic from encryption enforcement.
VpcEncryptionControlIdarrayThe IDs of the VPC Encryption Control configurations to describe.
VpcIdarrayThe IDs of the VPCs to describe encryption control configurations for.
VpcLatticeExclusionstringSpecifies whether to exclude VPC Lattice traffic from encryption enforcement.
VpcPeeringExclusionstringSpecifies whether to exclude VPC peering connection traffic from encryption enforcement.

SELECT examples

Describes one or more VPC Encryption Control configurations. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements You can filter the results to return information about specific encryption controls or VPCs. For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.

SELECT
mode,
resource_exclusions,
state,
state_message,
tags,
vpc_encryption_control_id,
vpc_id
FROM aws.ec2.vpc_encryption_controls
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
AND VpcEncryptionControlId = '{{ VpcEncryptionControlId }}'
AND VpcId = '{{ VpcId }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;

INSERT examples

Creates a VPC Encryption Control configuration for a specified VPC. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements for standards like HIPAA, FedRAMP, and PCI DSS. For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.

INSERT INTO aws.ec2.vpc_encryption_controls (
VpcId,
region,
DryRun,
TagSpecification
)
SELECT
'{{ VpcId }}',
'{{ region }}',
'{{ DryRun }}',
'{{ TagSpecification }}'
RETURNING
mode,
resource_exclusions,
state,
state_message,
tags,
vpc_encryption_control_id,
vpc_id
;

UPDATE examples

Modifies the encryption control configuration for a VPC. You can update the encryption mode and exclusion settings for various gateway types and peering connections. For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.

UPDATE aws.ec2.vpc_encryption_controls
SET
-- No updatable properties
WHERE
VpcEncryptionControlId = '{{ VpcEncryptionControlId }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND Mode = '{{ Mode}}'
AND InternetGatewayExclusion = '{{ InternetGatewayExclusion}}'
AND EgressOnlyInternetGatewayExclusion = '{{ EgressOnlyInternetGatewayExclusion}}'
AND NatGatewayExclusion = '{{ NatGatewayExclusion}}'
AND VirtualPrivateGatewayExclusion = '{{ VirtualPrivateGatewayExclusion}}'
AND VpcPeeringExclusion = '{{ VpcPeeringExclusion}}'
AND LambdaExclusion = '{{ LambdaExclusion}}'
AND VpcLatticeExclusion = '{{ VpcLatticeExclusion}}'
AND ElasticFileSystemExclusion = '{{ ElasticFileSystemExclusion}}'
RETURNING
mode,
resource_exclusions,
state,
state_message,
tags,
vpc_encryption_control_id,
vpc_id;

DELETE examples

Deletes a VPC Encryption Control configuration. This removes the encryption policy enforcement from the specified VPC. For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.

DELETE FROM aws.ec2.vpc_encryption_controls
WHERE VpcEncryptionControlId = '{{ VpcEncryptionControlId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;