2023/03/14 - Amazon Elastic Compute Cloud - 3 updated api methods
Changes This release adds a new DnsOptions key (PrivateDnsOnlyForInboundResolverEndpoint) to CreateVpcEndpoint and ModifyVpcEndpoint APIs.
{'DnsOptions': {'PrivateDnsOnlyForInboundResolverEndpoint': 'boolean'}}Response
{'VpcEndpoint': {'DnsOptions': {'PrivateDnsOnlyForInboundResolverEndpoint': 'boolean'}}}
Creates a VPC endpoint for a specified service. An endpoint enables you to create a private connection between your VPC and the service. The service may be provided by Amazon Web Services, an Amazon Web Services Marketplace Partner, or another Amazon Web Services account. For more information, see the Amazon Web Services PrivateLink Guide.
See also: AWS API Documentation
Request Syntax
client.create_vpc_endpoint( DryRun=True|False, VpcEndpointType='Interface'|'Gateway'|'GatewayLoadBalancer', VpcId='string', ServiceName='string', PolicyDocument='string', RouteTableIds=[ 'string', ], SubnetIds=[ 'string', ], SecurityGroupIds=[ 'string', ], IpAddressType='ipv4'|'dualstack'|'ipv6', DnsOptions={ 'DnsRecordIpType': 'ipv4'|'dualstack'|'ipv6'|'service-defined', 'PrivateDnsOnlyForInboundResolverEndpoint': True|False }, ClientToken='string', PrivateDnsEnabled=True|False, TagSpecifications=[ { 'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'coip-pool'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-connection'|'vpc-endpoint-service'|'vpc-endpoint-service-permission'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type'|'verified-access-instance'|'verified-access-group'|'verified-access-endpoint'|'verified-access-policy'|'verified-access-trust-provider'|'vpn-connection-device-type'|'vpc-block-public-access-exclusion'|'ipam-resource-discovery'|'ipam-resource-discovery-association', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ] )
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 .
string
The type of endpoint.
Default: Gateway
string
[REQUIRED]
The ID of the VPC for the endpoint.
string
[REQUIRED]
The service name.
string
(Interface and gateway endpoints) 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.
list
(Gateway endpoint) The route table IDs.
(string) --
list
(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create an endpoint network interface. For a Gateway Load Balancer endpoint, you can specify only one subnet.
(string) --
list
(Interface endpoint) The IDs of the security groups to associate with the endpoint network interface. If this parameter is not specified, we use the default security group for the VPC.
(string) --
string
The IP address type for the endpoint.
dict
The DNS options for the endpoint.
DnsRecordIpType (string) --
The DNS records created for the endpoint.
PrivateDnsOnlyForInboundResolverEndpoint (boolean) --
Indicates whether to enable private DNS only for inbound endpoints. This option is available only for services that support both gateway and interface endpoints. It routes traffic that originates from the VPC to the gateway endpoint and traffic that originates from on-premises to the interface endpoint.
string
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
boolean
(Interface endpoint) Indicates 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
list
The tags to associate with the endpoint.
(dict) --
The tags to apply to a resource when the resource is being created. When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.
Note
The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.
ResourceType (string) --
The type of resource to tag on creation.
Tags (list) --
The tags to apply to the resource.
(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.
dict
Response Syntax
{ 'VpcEndpoint': { 'VpcEndpointId': 'string', 'VpcEndpointType': 'Interface'|'Gateway'|'GatewayLoadBalancer', 'VpcId': 'string', 'ServiceName': 'string', 'State': 'PendingAcceptance'|'Pending'|'Available'|'Deleting'|'Deleted'|'Rejected'|'Failed'|'Expired', 'PolicyDocument': 'string', 'RouteTableIds': [ 'string', ], 'SubnetIds': [ 'string', ], 'Groups': [ { 'GroupId': 'string', 'GroupName': 'string' }, ], 'IpAddressType': 'ipv4'|'dualstack'|'ipv6', 'DnsOptions': { 'DnsRecordIpType': 'ipv4'|'dualstack'|'ipv6'|'service-defined', 'PrivateDnsOnlyForInboundResolverEndpoint': True|False }, 'PrivateDnsEnabled': True|False, 'RequesterManaged': True|False, 'NetworkInterfaceIds': [ 'string', ], 'DnsEntries': [ { 'DnsName': 'string', 'HostedZoneId': 'string' }, ], 'CreationTimestamp': datetime(2015, 1, 1), 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'OwnerId': 'string', 'LastError': { 'Message': 'string', 'Code': 'string' } }, 'ClientToken': 'string' }
Response Structure
(dict) --
VpcEndpoint (dict) --
Information about the endpoint.
VpcEndpointId (string) --
The ID of the 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 service to which the endpoint is associated.
State (string) --
The state of the endpoint.
PolicyDocument (string) --
The policy document associated with the endpoint, if applicable.
RouteTableIds (list) --
(Gateway endpoint) The IDs of the route tables associated with the endpoint.
(string) --
SubnetIds (list) --
(Interface endpoint) The subnets for the endpoint.
(string) --
Groups (list) --
(Interface endpoint) Information about the security groups that are 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.
IpAddressType (string) --
The IP address type for the endpoint.
DnsOptions (dict) --
The DNS options for the endpoint.
DnsRecordIpType (string) --
The DNS records created for the endpoint.
PrivateDnsOnlyForInboundResolverEndpoint (boolean) --
Indicates whether to enable private DNS only for inbound endpoints.
PrivateDnsEnabled (boolean) --
(Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.
RequesterManaged (boolean) --
Indicates whether the endpoint is being managed by its service.
NetworkInterfaceIds (list) --
(Interface endpoint) The 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 that the endpoint was created.
Tags (list) --
The tags assigned to the endpoint.
(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.
OwnerId (string) --
The ID of the Amazon Web Services account that owns the endpoint.
LastError (dict) --
The last error that occurred for endpoint.
Message (string) --
The error message for the VPC endpoint error.
Code (string) --
The error code for the VPC endpoint error.
ClientToken (string) --
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
{'VpcEndpoints': {'DnsOptions': {'PrivateDnsOnlyForInboundResolverEndpoint': 'boolean'}}}
Describes 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' )
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 .
list
The IDs of the VPC endpoints.
(string) --
list
The filters.
ip-address-type - The IP address type ( ipv4 | ipv6 ).
service-name - The name of the service.
tag :<key> - 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.
tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
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 ( pendingAcceptance | pending | available | deleting | deleted | rejected | failed ).
vpc-endpoint-type - The type of VPC endpoint ( Interface | Gateway | GatewayLoadBalancer ).
(dict) --
A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.
If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.
Name (string) --
The name of the filter. Filter names are case-sensitive.
Values (list) --
The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.
(string) --
integer
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 1,000, we return only 1,000 items.
string
The token for the next set of items to return. (You received this token from a prior call.)
dict
Response Syntax
{ 'VpcEndpoints': [ { 'VpcEndpointId': 'string', 'VpcEndpointType': 'Interface'|'Gateway'|'GatewayLoadBalancer', 'VpcId': 'string', 'ServiceName': 'string', 'State': 'PendingAcceptance'|'Pending'|'Available'|'Deleting'|'Deleted'|'Rejected'|'Failed'|'Expired', 'PolicyDocument': 'string', 'RouteTableIds': [ 'string', ], 'SubnetIds': [ 'string', ], 'Groups': [ { 'GroupId': 'string', 'GroupName': 'string' }, ], 'IpAddressType': 'ipv4'|'dualstack'|'ipv6', 'DnsOptions': { 'DnsRecordIpType': 'ipv4'|'dualstack'|'ipv6'|'service-defined', 'PrivateDnsOnlyForInboundResolverEndpoint': True|False }, 'PrivateDnsEnabled': True|False, 'RequesterManaged': True|False, 'NetworkInterfaceIds': [ 'string', ], 'DnsEntries': [ { 'DnsName': 'string', 'HostedZoneId': 'string' }, ], 'CreationTimestamp': datetime(2015, 1, 1), 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'OwnerId': 'string', 'LastError': { 'Message': 'string', 'Code': 'string' } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
VpcEndpoints (list) --
Information about the endpoints.
(dict) --
Describes a VPC endpoint.
VpcEndpointId (string) --
The ID of the 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 service to which the endpoint is associated.
State (string) --
The state of the endpoint.
PolicyDocument (string) --
The policy document associated with the endpoint, if applicable.
RouteTableIds (list) --
(Gateway endpoint) The IDs of the route tables associated with the endpoint.
(string) --
SubnetIds (list) --
(Interface endpoint) The subnets for the endpoint.
(string) --
Groups (list) --
(Interface endpoint) Information about the security groups that are 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.
IpAddressType (string) --
The IP address type for the endpoint.
DnsOptions (dict) --
The DNS options for the endpoint.
DnsRecordIpType (string) --
The DNS records created for the endpoint.
PrivateDnsOnlyForInboundResolverEndpoint (boolean) --
Indicates whether to enable private DNS only for inbound endpoints.
PrivateDnsEnabled (boolean) --
(Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.
RequesterManaged (boolean) --
Indicates whether the endpoint is being managed by its service.
NetworkInterfaceIds (list) --
(Interface endpoint) The 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 that the endpoint was created.
Tags (list) --
The tags assigned to the endpoint.
(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.
OwnerId (string) --
The ID of the Amazon Web Services account that owns the endpoint.
LastError (dict) --
The last error that occurred for endpoint.
Message (string) --
The error message for the VPC endpoint error.
Code (string) --
The error code for the VPC endpoint error.
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.
{'DnsOptions': {'PrivateDnsOnlyForInboundResolverEndpoint': 'boolean'}}
Modifies attributes of a specified VPC endpoint. The attributes that you can modify depend on the type of VPC endpoint (interface, gateway, or Gateway Load Balancer). For more information, see the Amazon Web Services PrivateLink 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', ], IpAddressType='ipv4'|'dualstack'|'ipv6', DnsOptions={ 'DnsRecordIpType': 'ipv4'|'dualstack'|'ipv6'|'service-defined', 'PrivateDnsOnlyForInboundResolverEndpoint': True|False }, PrivateDnsEnabled=True|False )
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 .
string
[REQUIRED]
The ID of the endpoint.
boolean
(Gateway endpoint) Specify true to reset the policy document to the default policy. The default policy allows full access to the service.
string
(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format.
list
(Gateway endpoint) The IDs of the route tables to associate with the endpoint.
(string) --
list
(Gateway endpoint) The IDs of the route tables to disassociate from the endpoint.
(string) --
list
(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.
(string) --
list
(Interface endpoint) The IDs of the subnets from which to remove the endpoint.
(string) --
list
(Interface endpoint) The IDs of the security groups to associate with the network interface.
(string) --
list
(Interface endpoint) The IDs of the security groups to disassociate from the network interface.
(string) --
string
The IP address type for the endpoint.
dict
The DNS options for the endpoint.
DnsRecordIpType (string) --
The DNS records created for the endpoint.
PrivateDnsOnlyForInboundResolverEndpoint (boolean) --
Indicates whether to enable private DNS only for inbound endpoints. This option is available only for services that support both gateway and interface endpoints. It routes traffic that originates from the VPC to the gateway endpoint and traffic that originates from on-premises to the interface endpoint.
boolean
(Interface endpoint) Indicates whether a private hosted zone is associated with the VPC.
dict
Response Syntax
{ 'Return': True|False }
Response Structure
(dict) --
Return (boolean) --
Returns true if the request succeeds; otherwise, it returns an error.