Skip to content

Commit fa71f14

Browse files
author
awstools
committed
feat(client-ec2): Adds support for targeting Dedicated Host allocations by assetIds in AWS Outposts
1 parent 832ca5b commit fa71f14

33 files changed

+412
-2491
lines changed

clients/client-ec2/src/commands/AllocateAddressCommand.ts

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -97,39 +97,24 @@ export interface AllocateAddressCommandOutput extends AllocateAddressResult, __M
9797
* @throws {@link EC2ServiceException}
9898
* <p>Base exception class for all service exceptions from EC2 service.</p>
9999
*
100-
* @example To allocate an Elastic IP address for EC2-VPC
100+
* @example To allocate an Elastic IP address
101101
* ```javascript
102-
* // This example allocates an Elastic IP address to use with an instance in a VPC.
103-
* const input = {
104-
* "Domain": "vpc"
105-
* };
102+
* // This example allocates an Elastic IP address.
103+
* const input = undefined;
106104
* const command = new AllocateAddressCommand(input);
107105
* const response = await client.send(command);
108106
* /* response ==
109107
* {
110108
* "AllocationId": "eipalloc-64d5890a",
111109
* "Domain": "vpc",
112-
* "PublicIp": "203.0.113.0"
110+
* "NetworkBorderGroup": "us-east-1",
111+
* "PublicIp": "203.0.113.0",
112+
* "PublicIpv4Pool": "amazon"
113113
* }
114114
* *\/
115115
* // example id: ec2-allocate-address-1
116116
* ```
117117
*
118-
* @example To allocate an Elastic IP address for EC2-Classic
119-
* ```javascript
120-
* // This example allocates an Elastic IP address to use with an instance in EC2-Classic.
121-
* const input = undefined;
122-
* const command = new AllocateAddressCommand(input);
123-
* const response = await client.send(command);
124-
* /* response ==
125-
* {
126-
* "Domain": "standard",
127-
* "PublicIp": "198.51.100.0"
128-
* }
129-
* *\/
130-
* // example id: ec2-allocate-address-2
131-
* ```
132-
*
133118
*/
134119
export class AllocateAddressCommand extends $Command<
135120
AllocateAddressCommandInput,

clients/client-ec2/src/commands/AllocateHostsCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface AllocateHostsCommandOutput extends AllocateHostsResult, __Metad
5151
* ClientToken: "STRING_VALUE",
5252
* InstanceType: "STRING_VALUE",
5353
* InstanceFamily: "STRING_VALUE",
54-
* Quantity: Number("int"), // required
54+
* Quantity: Number("int"),
5555
* TagSpecifications: [ // TagSpecificationList
5656
* { // TagSpecification
5757
* 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" || "instance-connect-endpoint",
@@ -66,6 +66,9 @@ export interface AllocateHostsCommandOutput extends AllocateHostsResult, __Metad
6666
* HostRecovery: "on" || "off",
6767
* OutpostArn: "STRING_VALUE",
6868
* HostMaintenance: "on" || "off",
69+
* AssetIds: [ // AssetIdList
70+
* "STRING_VALUE",
71+
* ],
6972
* };
7073
* const command = new AllocateHostsCommand(input);
7174
* const response = await client.send(command);

clients/client-ec2/src/commands/AssociateAddressCommand.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ export interface AssociateAddressCommandOutput extends AssociateAddressResult, _
8686
* @throws {@link EC2ServiceException}
8787
* <p>Base exception class for all service exceptions from EC2 service.</p>
8888
*
89-
* @example To associate an Elastic IP address in EC2-VPC
89+
* @example To associate an Elastic IP address
9090
* ```javascript
91-
* // This example associates the specified Elastic IP address with the specified instance in a VPC.
91+
* // This example associates the specified Elastic IP address with the specified instance.
9292
* const input = {
9393
* "AllocationId": "eipalloc-64d5890a",
9494
* "InstanceId": "i-0b263919b6498b123"
@@ -120,18 +120,6 @@ export interface AssociateAddressCommandOutput extends AssociateAddressResult, _
120120
* // example id: ec2-associate-address-2
121121
* ```
122122
*
123-
* @example To associate an Elastic IP address in EC2-Classic
124-
* ```javascript
125-
* // This example associates an Elastic IP address with an instance in EC2-Classic.
126-
* const input = {
127-
* "InstanceId": "i-07ffe74c7330ebf53",
128-
* "PublicIp": "198.51.100.0"
129-
* };
130-
* const command = new AssociateAddressCommand(input);
131-
* await client.send(command);
132-
* // example id: ec2-associate-address-3
133-
* ```
134-
*
135123
*/
136124
export class AssociateAddressCommand extends $Command<
137125
AssociateAddressCommandInput,

clients/client-ec2/src/commands/CreateFleetCommand.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB
3636

3737
/**
3838
* @public
39-
* <p>Launches an EC2 Fleet.</p>
40-
* <p>You can create a single EC2 Fleet that includes multiple launch specifications that vary by
41-
* instance type, AMI, Availability Zone, or subnet.</p>
39+
* <p>Creates an EC2 Fleet that contains the configuration information for On-Demand Instances and Spot Instances.
40+
* Instances are launched immediately if there is available capacity.</p>
41+
* <p>A single EC2 Fleet can include multiple launch specifications that vary by instance type,
42+
* AMI, Availability Zone, or subnet.</p>
4243
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html">EC2 Fleet</a> in the <i>Amazon EC2 User Guide</i>.</p>
4344
* @example
4445
* Use a bare-bones client and the command you need to make an API call.

clients/client-ec2/src/commands/CreateVpnConnectionCommand.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@s
1414
import { SerdeContext as __SerdeContext } from "@smithy/types";
1515

1616
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
17-
import { CreateVpnConnectionRequest, CreateVpnConnectionResult } from "../models/models_2";
17+
import {
18+
CreateVpnConnectionRequest,
19+
CreateVpnConnectionRequestFilterSensitiveLog,
20+
CreateVpnConnectionResult,
21+
CreateVpnConnectionResultFilterSensitiveLog,
22+
} from "../models/models_2";
1823
import { de_CreateVpnConnectionCommand, se_CreateVpnConnectionCommand } from "../protocols/Aws_ec2";
1924

2025
/**
@@ -317,8 +322,8 @@ export class CreateVpnConnectionCommand extends $Command<
317322
logger,
318323
clientName,
319324
commandName,
320-
inputFilterSensitiveLog: (_: any) => _,
321-
outputFilterSensitiveLog: (_: any) => _,
325+
inputFilterSensitiveLog: CreateVpnConnectionRequestFilterSensitiveLog,
326+
outputFilterSensitiveLog: CreateVpnConnectionResultFilterSensitiveLog,
322327
};
323328
const { requestHandler } = configuration;
324329
return stack.resolve(

clients/client-ec2/src/commands/DescribeAddressesCommand.ts

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -129,69 +129,6 @@ export interface DescribeAddressesCommandOutput extends DescribeAddressesResult,
129129
* // example id: ec2-describe-addresses-1
130130
* ```
131131
*
132-
* @example To describe your Elastic IP addresses for EC2-VPC
133-
* ```javascript
134-
* // This example describes your Elastic IP addresses for use with instances in a VPC.
135-
* const input = {
136-
* "Filters": [
137-
* {
138-
* "Name": "domain",
139-
* "Values": [
140-
* "vpc"
141-
* ]
142-
* }
143-
* ]
144-
* };
145-
* const command = new DescribeAddressesCommand(input);
146-
* const response = await client.send(command);
147-
* /* response ==
148-
* {
149-
* "Addresses": [
150-
* {
151-
* "AllocationId": "eipalloc-12345678",
152-
* "AssociationId": "eipassoc-12345678",
153-
* "Domain": "vpc",
154-
* "InstanceId": "i-1234567890abcdef0",
155-
* "NetworkInterfaceId": "eni-12345678",
156-
* "NetworkInterfaceOwnerId": "123456789012",
157-
* "PrivateIpAddress": "10.0.1.241",
158-
* "PublicIp": "203.0.113.0"
159-
* }
160-
* ]
161-
* }
162-
* *\/
163-
* // example id: ec2-describe-addresses-2
164-
* ```
165-
*
166-
* @example To describe your Elastic IP addresses for EC2-Classic
167-
* ```javascript
168-
* // This example describes your Elastic IP addresses for use with instances in EC2-Classic.
169-
* const input = {
170-
* "Filters": [
171-
* {
172-
* "Name": "domain",
173-
* "Values": [
174-
* "standard"
175-
* ]
176-
* }
177-
* ]
178-
* };
179-
* const command = new DescribeAddressesCommand(input);
180-
* const response = await client.send(command);
181-
* /* response ==
182-
* {
183-
* "Addresses": [
184-
* {
185-
* "Domain": "standard",
186-
* "InstanceId": "i-1234567890abcdef0",
187-
* "PublicIp": "198.51.100.0"
188-
* }
189-
* ]
190-
* }
191-
* *\/
192-
* // example id: ec2-describe-addresses-3
193-
* ```
194-
*
195132
*/
196133
export class DescribeAddressesCommand extends $Command<
197134
DescribeAddressesCommandInput,

clients/client-ec2/src/commands/DescribeHostsCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export interface DescribeHostsCommandOutput extends DescribeHostsResult, __Metad
111111
* // MemberOfServiceLinkedResourceGroup: true || false,
112112
* // OutpostArn: "STRING_VALUE",
113113
* // HostMaintenance: "on" || "off",
114+
* // AssetId: "STRING_VALUE",
114115
* // },
115116
* // ],
116117
* // NextToken: "STRING_VALUE",

clients/client-ec2/src/commands/DescribeInternetGatewaysCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export interface DescribeInternetGatewaysCommandOutput extends DescribeInternetG
115115
* {
116116
* "Attachments": [
117117
* {
118-
* "State": "available",
118+
* "State": "attached",
119119
* "VpcId": "vpc-a01106c2"
120120
* }
121121
* ],

clients/client-ec2/src/commands/DescribeMovingAddressesCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export interface DescribeMovingAddressesCommandOutput extends DescribeMovingAddr
9696
* {
9797
* "MovingAddressStatuses": [
9898
* {
99-
* "MoveStatus": "MovingToVpc",
99+
* "MoveStatus": "movingToVpc",
100100
* "PublicIp": "198.51.100.0"
101101
* }
102102
* ]

clients/client-ec2/src/commands/DescribeScheduledInstanceAvailabilityCommand.ts

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -125,55 +125,6 @@ export interface DescribeScheduledInstanceAvailabilityCommandOutput
125125
* @throws {@link EC2ServiceException}
126126
* <p>Base exception class for all service exceptions from EC2 service.</p>
127127
*
128-
* @example To describe an available schedule
129-
* ```javascript
130-
* // This example describes a schedule that occurs every week on Sunday, starting on the specified date. Note that the output contains a single schedule as an example.
131-
* const input = {
132-
* "FirstSlotStartTimeRange": {
133-
* "EarliestTime": "2016-01-31T00:00:00Z",
134-
* "LatestTime": "2016-01-31T04:00:00Z"
135-
* },
136-
* "Recurrence": {
137-
* "Frequency": "Weekly",
138-
* "Interval": 1,
139-
* "OccurrenceDays": [
140-
* 1
141-
* ]
142-
* }
143-
* };
144-
* const command = new DescribeScheduledInstanceAvailabilityCommand(input);
145-
* const response = await client.send(command);
146-
* /* response ==
147-
* {
148-
* "ScheduledInstanceAvailabilitySet": [
149-
* {
150-
* "AvailabilityZone": "us-west-2b",
151-
* "AvailableInstanceCount": 20,
152-
* "FirstSlotStartTime": "2016-01-31T00:00:00Z",
153-
* "HourlyPrice": "0.095",
154-
* "InstanceType": "c4.large",
155-
* "MaxTermDurationInDays": 366,
156-
* "MinTermDurationInDays": 366,
157-
* "NetworkPlatform": "EC2-VPC",
158-
* "Platform": "Linux/UNIX",
159-
* "PurchaseToken": "eyJ2IjoiMSIsInMiOjEsImMiOi...",
160-
* "Recurrence": {
161-
* "Frequency": "Weekly",
162-
* "Interval": 1,
163-
* "OccurrenceDaySet": [
164-
* 1
165-
* ],
166-
* "OccurrenceRelativeToEnd": false
167-
* },
168-
* "SlotDurationInHours": 23,
169-
* "TotalScheduledInstanceHours": 1219
170-
* }
171-
* ]
172-
* }
173-
* *\/
174-
* // example id: ec2-describe-scheduled-instance-availability-1
175-
* ```
176-
*
177128
*/
178129
export class DescribeScheduledInstanceAvailabilityCommand extends $Command<
179130
DescribeScheduledInstanceAvailabilityCommandInput,

0 commit comments

Comments
 (0)