EC2 / Client / modify_vpc_block_public_access_exclusion

modify_vpc_block_public_access_exclusion#

EC2.Client.modify_vpc_block_public_access_exclusion(**kwargs)#

Modify VPC Block Public Access (BPA) exclusions. A VPC BPA exclusion is a mode that can be applied to a single VPC or subnet that exempts it from the account’s BPA mode and will allow bidirectional or egress-only access. You can create BPA exclusions for VPCs and subnets even when BPA is not enabled on the account to ensure that there is no traffic disruption to the exclusions when VPC BPA is turned on.

See also: AWS API Documentation

Request Syntax

response = client.modify_vpc_block_public_access_exclusion(
    DryRun=True|False,
    ExclusionId='string',
    InternetGatewayExclusionMode='allow-bidirectional'|'allow-egress'
)
Parameters:
  • 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.

  • ExclusionId (string) –

    [REQUIRED]

    The ID of an exclusion.

  • InternetGatewayExclusionMode (string) –

    [REQUIRED]

    The exclusion mode for internet gateway traffic.

    • allow-bidirectional: Allow all internet traffic to and from the excluded VPCs and subnets.

    • allow-egress: Allow outbound internet traffic from the excluded VPCs and subnets. Block inbound internet traffic to the excluded VPCs and subnets. Only applies when VPC Block Public Access is set to Bidirectional.

Return type:

dict

Returns:

Response Syntax

{
    'VpcBlockPublicAccessExclusion': {
        'ExclusionId': 'string',
        'InternetGatewayExclusionMode': 'allow-bidirectional'|'allow-egress',
        'ResourceArn': 'string',
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'update-in-progress'|'update-complete'|'update-failed'|'delete-in-progress'|'delete-complete'|'disable-in-progress'|'disable-complete',
        'Reason': 'string',
        'CreationTimestamp': datetime(2015, 1, 1),
        'LastUpdateTimestamp': datetime(2015, 1, 1),
        'DeletionTimestamp': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –

    • VpcBlockPublicAccessExclusion (dict) –

      Details related to the exclusion.

      • ExclusionId (string) –

        The ID of the exclusion.

      • InternetGatewayExclusionMode (string) –

        The exclusion mode for internet gateway traffic.

        • allow-bidirectional: Allow all internet traffic to and from the excluded VPCs and subnets.

        • allow-egress: Allow outbound internet traffic from the excluded VPCs and subnets. Block inbound internet traffic to the excluded VPCs and subnets. Only applies when VPC Block Public Access is set to Bidirectional.

      • ResourceArn (string) –

        The ARN of the exclusion.

      • State (string) –

        The state of the exclusion.

      • Reason (string) –

        The reason for the current exclusion state.

      • CreationTimestamp (datetime) –

        When the exclusion was created.

      • LastUpdateTimestamp (datetime) –

        When the exclusion was last updated.

      • DeletionTimestamp (datetime) –

        When the exclusion was deleted.

      • Tags (list) –

        tag - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

        • (dict) –

          Describes a tag.

          • Key (string) –

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

          • Value (string) –

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.