Amazon Elastic Compute Cloud

2017/11/08 - Amazon Elastic Compute Cloud - 4 updated api methods

Changes  AWS PrivateLink for Amazon Services - Customers can now privately access Amazon services from their Amazon Virtual Private Cloud (VPC), without using public IPs, and without requiring the traffic to traverse across the Internet.

CreateVpcEndpoint (updated) Link ¶
Changes (request, response)
Request
{'PrivateDnsEnabled': 'boolean',
 'SecurityGroupIds': ['string'],
 'SubnetIds': ['string'],
 'VpcEndpointType': 'Interface | Gateway'}
Response
{'VpcEndpoint': {'DnsEntries': [{'DnsName': 'string',
                                 'HostedZoneId': 'string'}],
                 'Groups': [{'GroupId': 'string', 'GroupName': 'string'}],
                 'NetworkInterfaceIds': ['string'],
                 'PrivateDnsEnabled': 'boolean',
                 'State': {'Expired',
                           'Failed',
                           'PendingAcceptance',
                           'Rejected'},
                 'SubnetIds': ['string'],
                 'VpcEndpointType': 'Interface | Gateway'}}

Creates a VPC endpoint for a specified AWS service. An endpoint enables you to create a private connection between your VPC and another AWS service in your account. You can create a gateway endpoint or an interface endpoint.

A gateway endpoint serves as a target for a route in your route table for traffic destined for the AWS service. You can specify the VPC route tables that use the endpoint, and you can optionally specify an endpoint policy to attach to the endpoint that will control access to the service from your VPC.

An interface endpoint is a network interface in your subnet with a private IP address that serves as an entry point for traffic destined to the AWS service. You can specify the subnets in which to create an endpoint, and the security groups to associate with the network interface.

See also: AWS API Documentation

Request Syntax

client.create_vpc_endpoint(
    DryRun=True|False,
    VpcEndpointType='Interface'|'Gateway',
    VpcId='string',
    ServiceName='string',
    PolicyDocument='string',
    RouteTableIds=[
        'string',
    ],
    SubnetIds=[
        'string',
    ],
    SecurityGroupIds=[
        'string',
    ],
    ClientToken='string',
    PrivateDnsEnabled=True|False
)
type DryRun

boolean

param DryRun

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 .

type VpcEndpointType

string

param VpcEndpointType

The type of endpoint. If not specified, the default is a gateway endpoint.

type VpcId

string

param VpcId

[REQUIRED]

The ID of the VPC in which the endpoint will be used.

type ServiceName

string

param ServiceName

[REQUIRED]

The AWS service name, in the form com.amazonaws.region.service . To get a list of available services, use the DescribeVpcEndpointServices request.

type PolicyDocument

string

param PolicyDocument

(Gateway endpoint) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.

type RouteTableIds

list

param RouteTableIds

(Gateway endpoint) One or more route table IDs.

  • (string) --

type SubnetIds

list

param SubnetIds

(Interface endpoint) The ID of one or more subnets in which to create a network interface for the endpoint.

  • (string) --

type SecurityGroupIds

list

param SecurityGroupIds

(Interface endpoint) The ID of one or more security groups to associate with the network interface.

  • (string) --

type ClientToken

string

param ClientToken

Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

type PrivateDnsEnabled

boolean

param PrivateDnsEnabled

(Interface endpoint) Indicate whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the region (for example, kinesis.us-east-1.amazonaws.com ) which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.

To use a private hosted zone, you must set the following VPC attributes to true : enableDnsHostnames and enableDnsSupport . Use ModifyVpcAttribute to set the VPC attributes.

Default: true

rtype

dict

returns

Response Syntax

{
    'VpcEndpoint': {
        'VpcEndpointId': 'string',
        'VpcEndpointType': 'Interface'|'Gateway',
        'VpcId': 'string',
        'ServiceName': 'string',
        'State': 'PendingAcceptance'|'Pending'|'Available'|'Deleting'|'Deleted'|'Rejected'|'Failed'|'Expired',
        'PolicyDocument': 'string',
        'RouteTableIds': [
            'string',
        ],
        'SubnetIds': [
            'string',
        ],
        'Groups': [
            {
                'GroupId': 'string',
                'GroupName': 'string'
            },
        ],
        'PrivateDnsEnabled': True|False,
        'NetworkInterfaceIds': [
            'string',
        ],
        'DnsEntries': [
            {
                'DnsName': 'string',
                'HostedZoneId': 'string'
            },
        ],
        'CreationTimestamp': datetime(2015, 1, 1)
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of CreateVpcEndpoint.

    • VpcEndpoint (dict) --

      Information about the endpoint.

      • VpcEndpointId (string) --

        The ID of the VPC endpoint.

      • VpcEndpointType (string) --

        The type of endpoint.

      • VpcId (string) --

        The ID of the VPC to which the endpoint is associated.

      • ServiceName (string) --

        The name of the AWS service to which the endpoint is associated.

      • State (string) --

        The state of the VPC endpoint.

      • PolicyDocument (string) --

        The policy document associated with the endpoint, if applicable.

      • RouteTableIds (list) --

        (Gateway endpoint) One or more route tables associated with the endpoint.

        • (string) --

      • SubnetIds (list) --

        (Interface endpoint) One or more subnets in which the endpoint is located.

        • (string) --

      • Groups (list) --

        (Interface endpoint) Information about the security groups associated with the network interface.

        • (dict) --

          Describes a security group.

          • GroupId (string) --

            The ID of the security group.

          • GroupName (string) --

            The name of the security group.

      • PrivateDnsEnabled (boolean) --

        (Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.

      • NetworkInterfaceIds (list) --

        (Interface endpoint) One or more network interfaces for the endpoint.

        • (string) --

      • DnsEntries (list) --

        (Interface endpoint) The DNS entries for the endpoint.

        • (dict) --

          Describes a DNS entry.

          • DnsName (string) --

            The DNS name.

          • HostedZoneId (string) --

            The ID of the private hosted zone.

      • CreationTimestamp (datetime) --

        The date and time the VPC endpoint was created.

    • ClientToken (string) --

      Unique, case-sensitive identifier you provide to ensure the idempotency of the request.

DescribeVpcEndpointServices (updated) Link ¶
Changes (request, response)
Request
{'Filters': [{'Name': 'string', 'Values': ['string']}],
 'ServiceNames': ['string']}
Response
{'ServiceDetails': [{'AcceptanceRequired': 'boolean',
                     'AvailabilityZones': ['string'],
                     'BaseEndpointDnsNames': ['string'],
                     'Owner': 'string',
                     'PrivateDnsName': 'string',
                     'ServiceName': 'string',
                     'ServiceType': [{'ServiceType': 'Interface | Gateway'}],
                     'VpcEndpointPolicySupported': 'boolean'}]}

Describes all supported AWS services that can be specified when creating a VPC endpoint.

See also: AWS API Documentation

Request Syntax

client.describe_vpc_endpoint_services(
    DryRun=True|False,
    ServiceNames=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
type DryRun

boolean

param DryRun

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 .

type ServiceNames

list

param ServiceNames

One or more service names.

  • (string) --

type Filters

list

param Filters

One or more filters.

  • service-name : The name of the service.

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

    • Name (string) --

      The name of the filter. Filter names are case-sensitive.

    • Values (list) --

      One or more filter values. Filter values are case-sensitive.

      • (string) --

type MaxResults

integer

param MaxResults

The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

Constraint: If the value is greater than 1000, we return only 1000 items.

type NextToken

string

param NextToken

The token for the next set of items to return. (You received this token from a prior call.)

rtype

dict

returns

Response Syntax

{
    'ServiceNames': [
        'string',
    ],
    'ServiceDetails': [
        {
            'ServiceName': 'string',
            'ServiceType': [
                {
                    'ServiceType': 'Interface'|'Gateway'
                },
            ],
            'AvailabilityZones': [
                'string',
            ],
            'Owner': 'string',
            'BaseEndpointDnsNames': [
                'string',
            ],
            'PrivateDnsName': 'string',
            'VpcEndpointPolicySupported': True|False,
            'AcceptanceRequired': True|False
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeVpcEndpointServices.

    • ServiceNames (list) --

      A list of supported AWS services.

      • (string) --

    • ServiceDetails (list) --

      Information about the service.

      • (dict) --

        Describes a service.

        • ServiceName (string) --

          The Amazon Resource Name (ARN) of the service.

        • ServiceType (list) --

          The type of service.

          • (dict) --

            Describes the type of service for a VPC endpoint.

            • ServiceType (string) --

              The type of service.

        • AvailabilityZones (list) --

          The Availability Zones in which the service is available.

          • (string) --

        • Owner (string) --

          The AWS account ID of the service owner.

        • BaseEndpointDnsNames (list) --

          The DNS names for the service.

          • (string) --

        • PrivateDnsName (string) --

          The private DNS name for the service.

        • VpcEndpointPolicySupported (boolean) --

          Indicates whether the service supports endpoint policies.

        • AcceptanceRequired (boolean) --

          Indicates whether VPC endpoint connection requests to the service must be accepted by the service owner.

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

DescribeVpcEndpoints (updated) Link ¶
Changes (response)
{'VpcEndpoints': {'DnsEntries': [{'DnsName': 'string',
                                  'HostedZoneId': 'string'}],
                  'Groups': [{'GroupId': 'string', 'GroupName': 'string'}],
                  'NetworkInterfaceIds': ['string'],
                  'PrivateDnsEnabled': 'boolean',
                  'State': {'Expired',
                            'Failed',
                            'PendingAcceptance',
                            'Rejected'},
                  'SubnetIds': ['string'],
                  'VpcEndpointType': 'Interface | Gateway'}}

Describes one or more of your VPC endpoints.

See also: AWS API Documentation

Request Syntax

client.describe_vpc_endpoints(
    DryRun=True|False,
    VpcEndpointIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
type DryRun

boolean

param DryRun

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 .

type VpcEndpointIds

list

param VpcEndpointIds

One or more endpoint IDs.

  • (string) --

type Filters

list

param Filters

One or more filters.

  • service-name : The name of the AWS service.

  • vpc-id : The ID of the VPC in which the endpoint resides.

  • vpc-endpoint-id : The ID of the endpoint.

  • vpc-endpoint-state : The state of the endpoint. ( pending | available | deleting | deleted )

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

    • Name (string) --

      The name of the filter. Filter names are case-sensitive.

    • Values (list) --

      One or more filter values. Filter values are case-sensitive.

      • (string) --

type MaxResults

integer

param MaxResults

The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

Constraint: If the value is greater than 1000, we return only 1000 items.

type NextToken

string

param NextToken

The token for the next set of items to return. (You received this token from a prior call.)

rtype

dict

returns

Response Syntax

{
    'VpcEndpoints': [
        {
            'VpcEndpointId': 'string',
            'VpcEndpointType': 'Interface'|'Gateway',
            'VpcId': 'string',
            'ServiceName': 'string',
            'State': 'PendingAcceptance'|'Pending'|'Available'|'Deleting'|'Deleted'|'Rejected'|'Failed'|'Expired',
            'PolicyDocument': 'string',
            'RouteTableIds': [
                'string',
            ],
            'SubnetIds': [
                'string',
            ],
            'Groups': [
                {
                    'GroupId': 'string',
                    'GroupName': 'string'
                },
            ],
            'PrivateDnsEnabled': True|False,
            'NetworkInterfaceIds': [
                'string',
            ],
            'DnsEntries': [
                {
                    'DnsName': 'string',
                    'HostedZoneId': 'string'
                },
            ],
            'CreationTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeVpcEndpoints.

    • VpcEndpoints (list) --

      Information about the endpoints.

      • (dict) --

        Describes a VPC endpoint.

        • VpcEndpointId (string) --

          The ID of the VPC endpoint.

        • VpcEndpointType (string) --

          The type of endpoint.

        • VpcId (string) --

          The ID of the VPC to which the endpoint is associated.

        • ServiceName (string) --

          The name of the AWS service to which the endpoint is associated.

        • State (string) --

          The state of the VPC endpoint.

        • PolicyDocument (string) --

          The policy document associated with the endpoint, if applicable.

        • RouteTableIds (list) --

          (Gateway endpoint) One or more route tables associated with the endpoint.

          • (string) --

        • SubnetIds (list) --

          (Interface endpoint) One or more subnets in which the endpoint is located.

          • (string) --

        • Groups (list) --

          (Interface endpoint) Information about the security groups associated with the network interface.

          • (dict) --

            Describes a security group.

            • GroupId (string) --

              The ID of the security group.

            • GroupName (string) --

              The name of the security group.

        • PrivateDnsEnabled (boolean) --

          (Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.

        • NetworkInterfaceIds (list) --

          (Interface endpoint) One or more network interfaces for the endpoint.

          • (string) --

        • DnsEntries (list) --

          (Interface endpoint) The DNS entries for the endpoint.

          • (dict) --

            Describes a DNS entry.

            • DnsName (string) --

              The DNS name.

            • HostedZoneId (string) --

              The ID of the private hosted zone.

        • CreationTimestamp (datetime) --

          The date and time the VPC endpoint was created.

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

ModifyVpcEndpoint (updated) Link ¶
Changes (request)
{'AddSecurityGroupIds': ['string'],
 'AddSubnetIds': ['string'],
 'PrivateDnsEnabled': 'boolean',
 'RemoveSecurityGroupIds': ['string'],
 'RemoveSubnetIds': ['string']}

Modifies attributes of a specified VPC endpoint. The attributes that you can modify depend on the type of VPC endpoint (interface or gateway). For more information, see VPC Endpoints in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

client.modify_vpc_endpoint(
    DryRun=True|False,
    VpcEndpointId='string',
    ResetPolicy=True|False,
    PolicyDocument='string',
    AddRouteTableIds=[
        'string',
    ],
    RemoveRouteTableIds=[
        'string',
    ],
    AddSubnetIds=[
        'string',
    ],
    RemoveSubnetIds=[
        'string',
    ],
    AddSecurityGroupIds=[
        'string',
    ],
    RemoveSecurityGroupIds=[
        'string',
    ],
    PrivateDnsEnabled=True|False
)
type DryRun

boolean

param DryRun

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 .

type VpcEndpointId

string

param VpcEndpointId

[REQUIRED]

The ID of the endpoint.

type ResetPolicy

boolean

param ResetPolicy

(Gateway endpoint) Specify true to reset the policy document to the default policy. The default policy allows full access to the service.

type PolicyDocument

string

param PolicyDocument

(Gateway endpoint) A policy document to attach to the endpoint. The policy must be in valid JSON format.

type AddRouteTableIds

list

param AddRouteTableIds

(Gateway endpoint) One or more route tables IDs to associate with the endpoint.

  • (string) --

type RemoveRouteTableIds

list

param RemoveRouteTableIds

(Gateway endpoint) One or more route table IDs to disassociate from the endpoint.

  • (string) --

type AddSubnetIds

list

param AddSubnetIds

(Interface endpoint) One or more subnet IDs in which to serve the endpoint.

  • (string) --

type RemoveSubnetIds

list

param RemoveSubnetIds

(Interface endpoint) One or more subnets IDs in which to remove the endpoint.

  • (string) --

type AddSecurityGroupIds

list

param AddSecurityGroupIds

(Interface endpoint) One or more security group IDs to associate with the network interface.

  • (string) --

type RemoveSecurityGroupIds

list

param RemoveSecurityGroupIds

(Interface endpoint) One or more security group IDs to disassociate from the network interface.

  • (string) --

type PrivateDnsEnabled

boolean

param PrivateDnsEnabled

(Interface endpoint) Indicate whether a private hosted zone is associated with the VPC.

rtype

dict

returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.