Skip to content

Commit

Permalink
feat(client-ec2): Amazon VPC IP Address Manager (IPAM) now allows cus…
Browse files Browse the repository at this point in the history
…tomers to provision IPv4 CIDR blocks and allocate Elastic IP Addresses directly from IPAM pools with public IPv4 space
  • Loading branch information
awstools committed Aug 28, 2024
1 parent 2162019 commit 4f1d59b
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 26 deletions.
1 change: 1 addition & 0 deletions clients/client-ec2/src/commands/AllocateAddressCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export interface AllocateAddressCommandOutput extends AllocateAddressResult, __M
* ],
* },
* ],
* IpamPoolId: "STRING_VALUE",
* };
* const command = new AllocateAddressCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export interface AllocateIpamPoolCidrCommandOutput extends AllocateIpamPoolCidrR
* // IpamPoolAllocationId: "STRING_VALUE",
* // Description: "STRING_VALUE",
* // ResourceId: "STRING_VALUE",
* // ResourceType: "ipam-pool" || "vpc" || "ec2-public-ipv4-pool" || "custom" || "subnet",
* // ResourceType: "ipam-pool" || "vpc" || "ec2-public-ipv4-pool" || "custom" || "subnet" || "eip",
* // ResourceRegion: "STRING_VALUE",
* // ResourceOwner: "STRING_VALUE",
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface GetIpamDiscoveredPublicAddressesCommandOutput
* // AddressOwnerId: "STRING_VALUE",
* // AddressAllocationId: "STRING_VALUE",
* // AssociationStatus: "associated" || "disassociated",
* // AddressType: "service-managed-ip" || "service-managed-byoip" || "amazon-owned-eip" || "byoip" || "ec2-public-ip",
* // AddressType: "service-managed-ip" || "service-managed-byoip" || "amazon-owned-eip" || "amazon-owned-contig" || "byoip" || "ec2-public-ip",
* // Service: "nat-gateway" || "database-migration-service" || "redshift" || "elastic-container-service" || "relational-database-service" || "site-to-site-vpn" || "load-balancer" || "global-accelerator" || "other",
* // ServiceResource: "STRING_VALUE",
* // VpcId: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export interface GetIpamPoolAllocationsCommandOutput extends GetIpamPoolAllocati
* // IpamPoolAllocationId: "STRING_VALUE",
* // Description: "STRING_VALUE",
* // ResourceId: "STRING_VALUE",
* // ResourceType: "ipam-pool" || "vpc" || "ec2-public-ipv4-pool" || "custom" || "subnet",
* // ResourceType: "ipam-pool" || "vpc" || "ec2-public-ipv4-pool" || "custom" || "subnet" || "eip",
* // ResourceRegion: "STRING_VALUE",
* // ResourceOwner: "STRING_VALUE",
* // },
Expand Down
39 changes: 17 additions & 22 deletions clients/client-ec2/src/commands/RegisterImageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,17 @@ export interface RegisterImageCommandOutput extends RegisterImageResult, __Metad
/**
* <p>Registers an AMI. When you're creating an instance-store backed AMI, registering the AMI
* is the final step in the creation process. For more information about creating AMIs, see
* <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html">Create your
* own AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot">Create an AMI from a snapshot</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-instance-store.html">Create an instance-store
* backed AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
* <note>
* <p>For Amazon EBS-backed instances, <a>CreateImage</a> creates and registers the AMI
* in a single request, so you don't have to register the AMI yourself. We recommend that you
* always use <a>CreateImage</a> unless you have a specific reason to use
* RegisterImage.</p>
* </note>
* <p>If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration.
* If you make changes to an image, deregister the previous image and register the new image.</p>
* <p>If needed, you can deregister an AMI at any time. Any modifications you make to an AMI
* backed by an instance store volume invalidates its registration. If you make changes to an
* image, deregister the previous image and register the new image.</p>
* <p>
* <b>Register a snapshot of a root device volume</b>
* </p>
Expand All @@ -48,29 +49,23 @@ export interface RegisterImageCommandOutput extends RegisterImageResult, __Metad
* You can't set the encryption state of the volume using the block device mapping. If the
* snapshot is encrypted, or encryption by default is enabled, the root volume of an instance
* launched from the AMI is encrypted.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot">Create a Linux AMI from a snapshot</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html">Use encryption with Amazon EBS-backed AMIs</a>
* in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot">Create an AMI from a snapshot</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html">Use encryption with Amazon EBS-backed
* AMIs</a> in the <i>Amazon EC2 User Guide</i>.</p>
* <p>
* <b>Amazon Web Services Marketplace product codes</b>
* </p>
* <p>If any snapshots have Amazon Web Services Marketplace product codes, they are copied to the new
* AMI.</p>
* <p>Windows and some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE
* Linux Enterprise Server (SLES), use the Amazon EC2 billing product code associated with an AMI to
* verify the subscription status for package updates. To create a new AMI for operating systems
* that require a billing product code, instead of registering the AMI, do the following to
* preserve the billing product code association:</p>
* <ol>
* <li>
* <p>Launch an instance from an existing AMI with that billing product code.</p>
* </li>
* <li>
* <p>Customize the instance.</p>
* </li>
* <li>
* <p>Create an AMI from the instance using <a>CreateImage</a>.</p>
* </li>
* </ol>
* <p>In most cases, AMIs for Windows, RedHat, SUSE, and SQL Server require correct licensing
* information to be present on the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing
* information</a> in the <i>Amazon EC2 User Guide</i>. When creating an AMI from
* a snapshot, the <code>RegisterImage</code> operation derives the correct billing information
* from the snapshot's metadata, but this requires the appropriate metadata to be present. To
* verify if the correct billing information was applied, check the <code>PlatformDetails</code>
* field on the new AMI. If the field is empty or doesn't match the expected operating system
* code (for example, Windows, RedHat, SUSE, or SQL), the AMI creation was unsuccessful, and you
* should discard the AMI and instead create the AMI from an instance using <a>CreateImage</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#how-to-create-ebs-ami">Create an AMI
* from an instance </a> in the <i>Amazon EC2 User Guide</i>.</p>
* <p>If you purchase a Reserved Instance to apply to an On-Demand Instance that was launched
* from an AMI with a billing product code, make sure that the Reserved Instance has the matching
* billing product code. If you purchase a Reserved Instance without the matching billing product
Expand Down
7 changes: 7 additions & 0 deletions clients/client-ec2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3239,6 +3239,12 @@ export interface AllocateAddressRequest {
* @public
*/
TagSpecifications?: TagSpecification[];

/**
* <p>The ID of an IPAM pool.</p>
* @public
*/
IpamPoolId?: string;
}

/**
Expand Down Expand Up @@ -3553,6 +3559,7 @@ export interface AllocateIpamPoolCidrRequest {
export const IpamPoolAllocationResourceType = {
custom: "custom",
ec2_public_ipv4_pool: "ec2-public-ipv4-pool",
eip: "eip",
ipam_pool: "ipam-pool",
subnet: "subnet",
vpc: "vpc",
Expand Down
1 change: 1 addition & 0 deletions clients/client-ec2/src/models/models_6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ export interface GetIpamDiscoveredPublicAddressesRequest {
* @enum
*/
export const IpamPublicAddressType = {
AMAZON_OWNED_CONTIG: "amazon-owned-contig",
AMAZON_OWNED_EIP: "amazon-owned-eip",
BYOIP: "byoip",
EC2_PUBLIC_IP: "ec2-public-ip",
Expand Down
3 changes: 3 additions & 0 deletions clients/client-ec2/src/protocols/Aws_ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27609,6 +27609,9 @@ const se_AllocateAddressRequest = (input: AllocateAddressRequest, context: __Ser
entries[loc] = value;
});
}
if (input[_IPI] != null) {
entries[_IPI] = input[_IPI];
}
return entries;
};

Expand Down
20 changes: 19 additions & 1 deletion codegen/sdk-codegen/aws-models/ec2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1601,6 +1601,12 @@
"smithy.api#documentation": "<p>The tags to assign to the Elastic IP address.</p>",
"smithy.api#xmlName": "TagSpecification"
}
},
"IpamPoolId": {
"target": "com.amazonaws.ec2#IpamPoolId",
"traits": {
"smithy.api#documentation": "<p>The ID of an IPAM pool.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -68635,6 +68641,12 @@
"traits": {
"smithy.api#enumValue": "subnet"
}
},
"eip": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "eip"
}
}
}
},
Expand Down Expand Up @@ -69180,6 +69192,12 @@
"smithy.api#enumValue": "amazon-owned-eip"
}
},
"AMAZON_OWNED_CONTIG": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "amazon-owned-contig"
}
},
"BYOIP": {
"target": "smithy.api#Unit",
"traits": {
Expand Down Expand Up @@ -86828,7 +86846,7 @@
"target": "com.amazonaws.ec2#RegisterImageResult"
},
"traits": {
"smithy.api#documentation": "<p>Registers an AMI. When you're creating an instance-store backed AMI, registering the AMI\n is the final step in the creation process. For more information about creating AMIs, see\n <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html\">Create your\n own AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>\n <note>\n <p>For Amazon EBS-backed instances, <a>CreateImage</a> creates and registers the AMI\n in a single request, so you don't have to register the AMI yourself. We recommend that you\n always use <a>CreateImage</a> unless you have a specific reason to use\n RegisterImage.</p>\n </note>\n <p>If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. \n If you make changes to an image, deregister the previous image and register the new image.</p>\n <p>\n <b>Register a snapshot of a root device volume</b>\n </p>\n <p>You can use <code>RegisterImage</code> to create an Amazon EBS-backed Linux AMI from\n a snapshot of a root device volume. You specify the snapshot using a block device mapping.\n You can't set the encryption state of the volume using the block device mapping. If the \n snapshot is encrypted, or encryption by default is enabled, the root volume of an instance \n launched from the AMI is encrypted.</p>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot\">Create a Linux AMI from a snapshot</a> and <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html\">Use encryption with Amazon EBS-backed AMIs</a>\n in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>\n <p>\n <b>Amazon Web Services Marketplace product codes</b>\n </p>\n <p>If any snapshots have Amazon Web Services Marketplace product codes, they are copied to the new\n AMI.</p>\n <p>Windows and some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE\n Linux Enterprise Server (SLES), use the Amazon EC2 billing product code associated with an AMI to\n verify the subscription status for package updates. To create a new AMI for operating systems\n that require a billing product code, instead of registering the AMI, do the following to\n preserve the billing product code association:</p>\n <ol>\n <li>\n <p>Launch an instance from an existing AMI with that billing product code.</p>\n </li>\n <li>\n <p>Customize the instance.</p>\n </li>\n <li>\n <p>Create an AMI from the instance using <a>CreateImage</a>.</p>\n </li>\n </ol>\n <p>If you purchase a Reserved Instance to apply to an On-Demand Instance that was launched\n from an AMI with a billing product code, make sure that the Reserved Instance has the matching\n billing product code. If you purchase a Reserved Instance without the matching billing product\n code, the Reserved Instance will not be applied to the On-Demand Instance. For information\n about how to obtain the platform details and billing information of an AMI, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html\">Understand AMI\n billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>"
"smithy.api#documentation": "<p>Registers an AMI. When you're creating an instance-store backed AMI, registering the AMI\n is the final step in the creation process. For more information about creating AMIs, see\n <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot\">Create an AMI from a snapshot</a> and <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-instance-store.html\">Create an instance-store\n backed AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>\n <note>\n <p>For Amazon EBS-backed instances, <a>CreateImage</a> creates and registers the AMI\n in a single request, so you don't have to register the AMI yourself. We recommend that you\n always use <a>CreateImage</a> unless you have a specific reason to use\n RegisterImage.</p>\n </note>\n <p>If needed, you can deregister an AMI at any time. Any modifications you make to an AMI\n backed by an instance store volume invalidates its registration. If you make changes to an\n image, deregister the previous image and register the new image.</p>\n <p>\n <b>Register a snapshot of a root device volume</b>\n </p>\n <p>You can use <code>RegisterImage</code> to create an Amazon EBS-backed Linux AMI from\n a snapshot of a root device volume. You specify the snapshot using a block device mapping.\n You can't set the encryption state of the volume using the block device mapping. If the \n snapshot is encrypted, or encryption by default is enabled, the root volume of an instance \n launched from the AMI is encrypted.</p>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot\">Create an AMI from a snapshot</a> and <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html\">Use encryption with Amazon EBS-backed\n AMIs</a> in the <i>Amazon EC2 User Guide</i>.</p>\n <p>\n <b>Amazon Web Services Marketplace product codes</b>\n </p>\n <p>If any snapshots have Amazon Web Services Marketplace product codes, they are copied to the new\n AMI.</p>\n <p>In most cases, AMIs for Windows, RedHat, SUSE, and SQL Server require correct licensing\n information to be present on the AMI. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html\">Understand AMI billing\n information</a> in the <i>Amazon EC2 User Guide</i>. When creating an AMI from\n a snapshot, the <code>RegisterImage</code> operation derives the correct billing information\n from the snapshot's metadata, but this requires the appropriate metadata to be present. To\n verify if the correct billing information was applied, check the <code>PlatformDetails</code>\n field on the new AMI. If the field is empty or doesn't match the expected operating system\n code (for example, Windows, RedHat, SUSE, or SQL), the AMI creation was unsuccessful, and you\n should discard the AMI and instead create the AMI from an instance using <a>CreateImage</a>. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#how-to-create-ebs-ami\">Create an AMI\n from an instance </a> in the <i>Amazon EC2 User Guide</i>.</p>\n <p>If you purchase a Reserved Instance to apply to an On-Demand Instance that was launched\n from an AMI with a billing product code, make sure that the Reserved Instance has the matching\n billing product code. If you purchase a Reserved Instance without the matching billing product\n code, the Reserved Instance will not be applied to the On-Demand Instance. For information\n about how to obtain the platform details and billing information of an AMI, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html\">Understand AMI\n billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>"
}
},
"com.amazonaws.ec2#RegisterImageRequest": {
Expand Down

0 comments on commit 4f1d59b

Please sign in to comment.