vpc_block_public_access_options
Creates, updates, deletes, gets or lists a vpc_block_public_access_options resource.
Overview
| Name | vpc_block_public_access_options |
| Type | Resource |
| Id | aws.ec2.vpc_block_public_access_options |
Fields
The following fields are returned by SELECT queries:
- describe_vpc_block_public_access_options
| Name | Datatype | Description |
|---|---|---|
aws_account_id | string | An Amazon Web Services account ID. |
aws_region | string | An Amazon Web Services Region. |
exclusions_allowed | string | Determines 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_mode | string | The 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_timestamp | string | The last time the VPC BPA mode was updated. |
managed_by | string | The 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. |
reason | string | The reason for the current state. |
state | string | The current state of VPC BPA. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_vpc_block_public_access_options | select | region | DryRun | 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. |
modify_vpc_block_public_access_options | update | InternetGatewayBlockMode, region | DryRun | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
InternetGatewayBlockMode | string | The 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. |
region | string | AWS region (default: us-east-1) |
DryRun | boolean | Checks 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_options
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_options
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;