Skip to main content

vpc_block_public_access_options

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

Overview

Namevpc_block_public_access_options
TypeResource
Idaws.ec2.vpc_block_public_access_options

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
aws_account_idstringAn Amazon Web Services account ID.
aws_regionstringAn Amazon Web Services Region.
exclusions_allowedstringDetermines if exclusions are allowed. If you have enabled VPC BPA at the Organization level, exclusions may be not-allowed. Otherwise, they are allowed.
internet_gateway_block_modestringThe current mode of VPC BPA. off: VPC BPA is not enabled and traffic is allowed to and from internet gateways and egress-only internet gateways in this Region. block-bidirectional: Block all traffic to and from internet gateways and egress-only internet gateways in this Region (except for excluded VPCs and subnets). block-ingress: Block all internet traffic to the VPCs in this Region (except for VPCs or subnets which are excluded). Only traffic to and from NAT gateways and egress-only internet gateways is allowed because these gateways only allow outbound connections to be established.
last_update_timestampstringThe last time the VPC BPA mode was updated.
managed_bystringThe entity that manages the state of VPC BPA. Possible values include: account - The state is managed by the account. declarative-policy - The state is managed by a declarative policy and can't be modified by the account.
reasonstringThe reason for the current state.
statestringThe current state of VPC BPA.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_vpc_block_public_access_optionsselectregionDryRunDescribe VPC Block Public Access (BPA) options. VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that you own in a Region from reaching or being reached from the internet through internet gateways and egress-only internet gateways. To learn more about VPC BPA, see Block public access to VPCs and subnets in the Amazon VPC User Guide.
modify_vpc_block_public_access_optionsupdateInternetGatewayBlockMode, regionDryRunModify VPC Block Public Access (BPA) options. VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that you own in a Region from reaching or being reached from the internet through internet gateways and egress-only internet gateways. To learn more about VPC BPA, see Block public access to VPCs and subnets 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
InternetGatewayBlockModestringThe mode of VPC BPA. off: VPC BPA is not enabled and traffic is allowed to and from internet gateways and egress-only internet gateways in this Region. block-bidirectional: Block all traffic to and from internet gateways and egress-only internet gateways in this Region (except for excluded VPCs and subnets). block-ingress: Block all internet traffic to the VPCs in this Region (except for VPCs or subnets which are excluded). Only traffic to and from NAT gateways and egress-only internet gateways is allowed because these gateways only allow outbound connections to be established.
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.

SELECT examples

Describe VPC Block Public Access (BPA) options. VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that you own in a Region from reaching or being reached from the internet through internet gateways and egress-only internet gateways. To learn more about VPC BPA, see Block public access to VPCs and subnets in the Amazon VPC User Guide.

SELECT
aws_account_id,
aws_region,
exclusions_allowed,
internet_gateway_block_mode,
last_update_timestamp,
managed_by,
reason,
state
FROM aws.ec2.vpc_block_public_access_options
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
;

UPDATE examples

Modify VPC Block Public Access (BPA) options. VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that you own in a Region from reaching or being reached from the internet through internet gateways and egress-only internet gateways. To learn more about VPC BPA, see Block public access to VPCs and subnets in the Amazon VPC User Guide.

UPDATE aws.ec2.vpc_block_public_access_options
SET
-- No updatable properties
WHERE
InternetGatewayBlockMode = '{{ InternetGatewayBlockMode }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
RETURNING
aws_account_id,
aws_region,
exclusions_allowed,
internet_gateway_block_mode,
last_update_timestamp,
managed_by,
reason,
state;