Skip to content

Commit

Permalink
feat(client-ec2): Provision BYOIPv4 address ranges and advertise them…
Browse files Browse the repository at this point in the history
… by specifying the network border groups option in Los Angeles, Phoenix and Dallas AWS Local Zones.
  • Loading branch information
awstools committed Dec 19, 2023
1 parent ba936d1 commit 0d9d3e8
Show file tree
Hide file tree
Showing 12 changed files with 156 additions and 65 deletions.
2 changes: 2 additions & 0 deletions clients/client-ec2/src/commands/AdvertiseByoipCidrCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export interface AdvertiseByoipCidrCommandOutput extends AdvertiseByoipCidrResul
* Cidr: "STRING_VALUE", // required
* Asn: "STRING_VALUE",
* DryRun: true || false,
* NetworkBorderGroup: "STRING_VALUE",
* };
* const command = new AdvertiseByoipCidrCommand(input);
* const response = await client.send(command);
Expand All @@ -75,6 +76,7 @@ export interface AdvertiseByoipCidrCommandOutput extends AdvertiseByoipCidrResul
* // ],
* // StatusMessage: "STRING_VALUE",
* // State: "advertised" || "deprovisioned" || "failed-deprovision" || "failed-provision" || "pending-deprovision" || "pending-provision" || "provisioned" || "provisioned-not-publicly-advertisable",
* // NetworkBorderGroup: "STRING_VALUE",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface DeprovisionByoipCidrCommandOutput extends DeprovisionByoipCidrR
* // ],
* // StatusMessage: "STRING_VALUE",
* // State: "advertised" || "deprovisioned" || "failed-deprovision" || "failed-provision" || "pending-deprovision" || "pending-provision" || "provisioned" || "provisioned-not-publicly-advertisable",
* // NetworkBorderGroup: "STRING_VALUE",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export interface DescribeByoipCidrsCommandOutput extends DescribeByoipCidrsResul
* // ],
* // StatusMessage: "STRING_VALUE",
* // State: "advertised" || "deprovisioned" || "failed-deprovision" || "failed-provision" || "pending-deprovision" || "pending-provision" || "provisioned" || "provisioned-not-publicly-advertisable",
* // NetworkBorderGroup: "STRING_VALUE",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface MoveByoipCidrToIpamCommandOutput extends MoveByoipCidrToIpamRes
* // ],
* // StatusMessage: "STRING_VALUE",
* // State: "advertised" || "deprovisioned" || "failed-deprovision" || "failed-provision" || "pending-deprovision" || "pending-provision" || "provisioned" || "provisioned-not-publicly-advertisable",
* // NetworkBorderGroup: "STRING_VALUE",
* // },
* // };
*
Expand Down
2 changes: 2 additions & 0 deletions clients/client-ec2/src/commands/ProvisionByoipCidrCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export interface ProvisionByoipCidrCommandOutput extends ProvisionByoipCidrResul
* },
* ],
* MultiRegion: true || false,
* NetworkBorderGroup: "STRING_VALUE",
* };
* const command = new ProvisionByoipCidrCommand(input);
* const response = await client.send(command);
Expand All @@ -93,6 +94,7 @@ export interface ProvisionByoipCidrCommandOutput extends ProvisionByoipCidrResul
* // ],
* // StatusMessage: "STRING_VALUE",
* // State: "advertised" || "deprovisioned" || "failed-deprovision" || "failed-provision" || "pending-deprovision" || "pending-provision" || "provisioned" || "provisioned-not-publicly-advertisable",
* // NetworkBorderGroup: "STRING_VALUE",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export interface WithdrawByoipCidrCommandOutput extends WithdrawByoipCidrResult,
* // ],
* // StatusMessage: "STRING_VALUE",
* // State: "advertised" || "deprovisioned" || "failed-deprovision" || "failed-provision" || "pending-deprovision" || "pending-provision" || "provisioned" || "provisioned-not-publicly-advertisable",
* // NetworkBorderGroup: "STRING_VALUE",
* // },
* // };
*
Expand Down
42 changes: 42 additions & 0 deletions clients/client-ec2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2975,6 +2975,27 @@ export interface AdvertiseByoipCidrRequest {
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
*/
DryRun?: boolean;

/**
* @public
* <p>If you have <a href="https://docs.aws.amazon.com/local-zones/latest/ug/how-local-zones-work.html">Local Zones</a> enabled, you can choose a network border group for Local Zones when you provision and advertise a BYOIPv4 CIDR. Choose the network border group carefully as the EIP and the Amazon Web Services resource it is associated with must reside in the same network border group.</p>
* <p>You can provision BYOIP address ranges to and advertise them in the following Local Zone network border groups:</p>
* <ul>
* <li>
* <p>us-east-1-dfw-2</p>
* </li>
* <li>
* <p>us-west-2-lax-1</p>
* </li>
* <li>
* <p>us-west-2-phx-2</p>
* </li>
* </ul>
* <note>
* <p>You cannot provision or advertise BYOIPv6 address ranges in Local Zones at this time.</p>
* </note>
*/
NetworkBorderGroup?: string;
}

/**
Expand Down Expand Up @@ -3080,6 +3101,27 @@ export interface ByoipCidr {
* <p>The state of the address pool.</p>
*/
State?: ByoipCidrState;

/**
* @public
* <p>If you have <a href="https://docs.aws.amazon.com/local-zones/latest/ug/how-local-zones-work.html">Local Zones</a> enabled, you can choose a network border group for Local Zones when you provision and advertise a BYOIPv4 CIDR. Choose the network border group carefully as the EIP and the Amazon Web Services resource it is associated with must reside in the same network border group.</p>
* <p>You can provision BYOIP address ranges to and advertise them in the following Local Zone network border groups:</p>
* <ul>
* <li>
* <p>us-east-1-dfw-2</p>
* </li>
* <li>
* <p>us-west-2-lax-1</p>
* </li>
* <li>
* <p>us-west-2-phx-2</p>
* </li>
* </ul>
* <note>
* <p>You cannot provision or advertise BYOIPv6 address ranges in Local Zones at this time.</p>
* </note>
*/
NetworkBorderGroup?: string;
}

/**
Expand Down
84 changes: 36 additions & 48 deletions clients/client-ec2/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6737,27 +6737,26 @@ export type LaunchTemplateInstanceMetadataTagsState =
export interface LaunchTemplateInstanceMetadataOptionsRequest {
/**
* @public
* <p>IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to <code>optional</code>
* (in other words, set the use of IMDSv2 to <code>optional</code>) or
* <code>required</code> (in other words, set the use of IMDSv2 to
* <code>required</code>).</p>
* <p>Indicates whether IMDSv2 is required.</p>
* <ul>
* <li>
* <p>
* <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without
* a session token in your request. If you retrieve the IAM role credentials
* without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials
* using a valid session token, the IMDSv2 role credentials are returned.</p>
* <code>optional</code> - IMDSv2 is optional. You can choose whether to send a
* session token in your instance metadata retrieval requests. If you retrieve
* IAM role credentials without a session token, you receive the IMDSv1 role
* credentials. If you retrieve IAM role credentials using a valid session token,
* you receive the IMDSv2 role credentials.</p>
* </li>
* <li>
* <p>
* <code>required</code> - When IMDSv2 is required, you must send a session token
* with any instance metadata retrieval requests. In this state, retrieving the IAM role
* credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p>
* <code>required</code> - IMDSv2 is required. You must send a session token
* in your instance metadata retrieval requests. With this option, retrieving the
* IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are
* not available.</p>
* </li>
* </ul>
* <p>Default: <code>optional</code>
* </p>
* <p>Default: If the value of <code>ImdsSupport</code> for the Amazon Machine Image (AMI)
* for your instance is <code>v2.0</code>, the default is <code>required</code>.</p>
*/
HttpTokens?: LaunchTemplateHttpTokensState;

Expand Down Expand Up @@ -6956,6 +6955,8 @@ export interface LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
/**
* @public
* <p>Associates a public IPv4 address with eth0 for a new network interface.</p>
* <p>Starting on February 1, 2024, Amazon Web Services will charge for all public IPv4 addresses, including public IPv4 addresses
* associated with running instances and Elastic IP addresses. For more information, see the <i>Public IPv4 Address</i> tab on the <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing page</a>.</p>
*/
AssociatePublicIpAddress?: boolean;

Expand Down Expand Up @@ -7380,29 +7381,8 @@ export interface RequestLaunchTemplateData {

/**
* @public
* <p>The tags to apply to the resources that are created during instance launch.</p>
* <p>You can specify tags for the following resources only:</p>
* <ul>
* <li>
* <p>Instances</p>
* </li>
* <li>
* <p>Volumes</p>
* </li>
* <li>
* <p>Elastic graphics</p>
* </li>
* <li>
* <p>Spot Instance requests</p>
* </li>
* <li>
* <p>Network interfaces</p>
* </li>
* </ul>
* <p>To tag a resource after it has been created, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
* <note>
* <p>To tag the launch template itself, you must use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html">TagSpecification</a> parameter.</p>
* </note>
* <p>The tags to apply to the resources that are created during instance launch. These
* tags are not applied to the launch template.</p>
*/
TagSpecifications?: LaunchTemplateTagSpecificationRequest[];

Expand Down Expand Up @@ -8162,18 +8142,24 @@ export interface LaunchTemplateInstanceMetadataOptions {

/**
* @public
* <p>Indicates whether IMDSv2 is <code>optional</code> or <code>required</code>.</p>
* <p>
* <code>optional</code> - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without
* a session token in your request. If you retrieve the IAM role credentials
* without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials
* using a valid session token, the IMDSv2 role credentials are returned.</p>
* <p>
* <code>required</code> - When IMDSv2 is required, you must send a session token
* with any instance metadata retrieval requests. In this state, retrieving the IAM role
* credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p>
* <p>Default: <code>optional</code>
* </p>
* <p>Indicates whether IMDSv2 is required.</p>
* <ul>
* <li>
* <p>
* <code>optional</code> - IMDSv2 is optional. You can choose whether to send a
* session token in your instance metadata retrieval requests. If you retrieve
* IAM role credentials without a session token, you receive the IMDSv1 role
* credentials. If you retrieve IAM role credentials using a valid session token,
* you receive the IMDSv2 role credentials.</p>
* </li>
* <li>
* <p>
* <code>required</code> - IMDSv2 is required. You must send a session token
* in your instance metadata retrieval requests. With this option, retrieving the
* IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are
* not available.</p>
* </li>
* </ul>
*/
HttpTokens?: LaunchTemplateHttpTokensState;

Expand Down Expand Up @@ -8368,6 +8354,8 @@ export interface LaunchTemplateInstanceNetworkInterfaceSpecification {
* @public
* <p>Indicates whether to associate a public IPv4 address with eth0 for a new network
* interface.</p>
* <p>Starting on February 1, 2024, Amazon Web Services will charge for all public IPv4 addresses, including public IPv4 addresses
* associated with running instances and Elastic IP addresses. For more information, see the <i>Public IPv4 Address</i> tab on the <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing page</a>.</p>
*/
AssociatePublicIpAddress?: boolean;

Expand Down
2 changes: 2 additions & 0 deletions clients/client-ec2/src/models/models_4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10815,6 +10815,8 @@ export interface InstanceNetworkInterfaceSpecification {
* assigned to a new network interface, not an existing one. You cannot specify more than one
* network interface in the request. If launching into a default subnet, the default value is
* <code>true</code>.</p>
* <p>Starting on February 1, 2024, Amazon Web Services will charge for all public IPv4 addresses, including public IPv4 addresses
* associated with running instances and Elastic IP addresses. For more information, see the <i>Public IPv4 Address</i> tab on the <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing page</a>.</p>
*/
AssociatePublicIpAddress?: boolean;

Expand Down
21 changes: 21 additions & 0 deletions clients/client-ec2/src/models/models_6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8645,6 +8645,27 @@ export interface ProvisionByoipCidrRequest {
* <p>Reserved.</p>
*/
MultiRegion?: boolean;

/**
* @public
* <p>If you have <a href="https://docs.aws.amazon.com/local-zones/latest/ug/how-local-zones-work.html">Local Zones</a> enabled, you can choose a network border group for Local Zones when you provision and advertise a BYOIPv4 CIDR. Choose the network border group carefully as the EIP and the Amazon Web Services resource it is associated with must reside in the same network border group.</p>
* <p>You can provision BYOIP address ranges to and advertise them in the following Local Zone network border groups:</p>
* <ul>
* <li>
* <p>us-east-1-dfw-2</p>
* </li>
* <li>
* <p>us-west-2-lax-1</p>
* </li>
* <li>
* <p>us-west-2-phx-2</p>
* </li>
* </ul>
* <note>
* <p>You cannot provision or advertise BYOIPv6 address ranges in Local Zones at this time.</p>
* </note>
*/
NetworkBorderGroup?: string;
}

/**
Expand Down
9 changes: 9 additions & 0 deletions clients/client-ec2/src/protocols/Aws_ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39349,6 +39349,9 @@ const se_AdvertiseByoipCidrRequest = (input: AdvertiseByoipCidrRequest, context:
if (input[_DRr] != null) {
entries[_DRr] = input[_DRr];
}
if (input[_NBG] != null) {
entries[_NBG] = input[_NBG];
}
return entries;
};

Expand Down Expand Up @@ -62045,6 +62048,9 @@ const se_ProvisionByoipCidrRequest = (input: ProvisionByoipCidrRequest, context:
if (input[_MRu] != null) {
entries[_MRu] = input[_MRu];
}
if (input[_NBG] != null) {
entries[_NBG] = input[_NBG];
}
return entries;
};

Expand Down Expand Up @@ -69330,6 +69336,9 @@ const de_ByoipCidr = (output: any, context: __SerdeContext): ByoipCidr => {
if (output[_st] != null) {
contents[_Stat] = __expectString(output[_st]);
}
if (output[_nBG] != null) {
contents[_NBG] = __expectString(output[_nBG]);
}
return contents;
};

Expand Down
Loading

0 comments on commit 0d9d3e8

Please sign in to comment.