Skip to content

Commit 50cf29a

Browse files
author
awstools
committed
feat(client-cloudhsm-v2): Add support for Dual-Stack hsm2m.medium clusters. The customers will now be able to create hsm2m.medium clusters having both IPv4 and IPv6 connection capabilities by specifying a new param called NetworkType=DUALSTACK during cluster creation.
1 parent 718151a commit 50cf29a

File tree

10 files changed

+188
-6
lines changed

10 files changed

+188
-6
lines changed

clients/client-cloudhsm-v2/src/commands/CreateClusterCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export interface CreateClusterCommandOutput extends CreateClusterResponse, __Met
4848
* SubnetIds: [ // SubnetIds // required
4949
* "STRING_VALUE",
5050
* ],
51+
* NetworkType: "IPV4" || "DUALSTACK",
5152
* TagList: [ // TagList
5253
* { // Tag
5354
* Key: "STRING_VALUE", // required
@@ -74,6 +75,7 @@ export interface CreateClusterCommandOutput extends CreateClusterResponse, __Met
7475
* // SubnetId: "STRING_VALUE",
7576
* // EniId: "STRING_VALUE",
7677
* // EniIp: "STRING_VALUE",
78+
* // EniIpV6: "STRING_VALUE",
7779
* // HsmId: "STRING_VALUE", // required
7880
* // State: "CREATE_IN_PROGRESS" || "ACTIVE" || "DEGRADED" || "DELETE_IN_PROGRESS" || "DELETED",
7981
* // StateMessage: "STRING_VALUE",
@@ -83,12 +85,13 @@ export interface CreateClusterCommandOutput extends CreateClusterResponse, __Met
8385
* // PreCoPassword: "STRING_VALUE",
8486
* // SecurityGroup: "STRING_VALUE",
8587
* // SourceBackupId: "STRING_VALUE",
86-
* // State: "CREATE_IN_PROGRESS" || "UNINITIALIZED" || "INITIALIZE_IN_PROGRESS" || "INITIALIZED" || "ACTIVE" || "UPDATE_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "DELETED" || "DEGRADED",
88+
* // State: "CREATE_IN_PROGRESS" || "UNINITIALIZED" || "INITIALIZE_IN_PROGRESS" || "INITIALIZED" || "ACTIVE" || "UPDATE_IN_PROGRESS" || "MODIFY_IN_PROGRESS" || "ROLLBACK_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "DELETED" || "DEGRADED",
8789
* // StateMessage: "STRING_VALUE",
8890
* // SubnetMapping: { // ExternalSubnetMapping
8991
* // "<keys>": "STRING_VALUE",
9092
* // },
9193
* // VpcId: "STRING_VALUE",
94+
* // NetworkType: "IPV4" || "DUALSTACK",
9295
* // Certificates: { // Certificates
9396
* // ClusterCsr: "STRING_VALUE",
9497
* // HsmCertificate: "STRING_VALUE",

clients/client-cloudhsm-v2/src/commands/CreateHsmCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export interface CreateHsmCommandOutput extends CreateHsmResponse, __MetadataBea
5252
* // SubnetId: "STRING_VALUE",
5353
* // EniId: "STRING_VALUE",
5454
* // EniIp: "STRING_VALUE",
55+
* // EniIpV6: "STRING_VALUE",
5556
* // HsmId: "STRING_VALUE", // required
5657
* // State: "CREATE_IN_PROGRESS" || "ACTIVE" || "DEGRADED" || "DELETE_IN_PROGRESS" || "DELETED",
5758
* // StateMessage: "STRING_VALUE",

clients/client-cloudhsm-v2/src/commands/DeleteClusterCommand.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export interface DeleteClusterCommandOutput extends DeleteClusterResponse, __Met
5959
* // SubnetId: "STRING_VALUE",
6060
* // EniId: "STRING_VALUE",
6161
* // EniIp: "STRING_VALUE",
62+
* // EniIpV6: "STRING_VALUE",
6263
* // HsmId: "STRING_VALUE", // required
6364
* // State: "CREATE_IN_PROGRESS" || "ACTIVE" || "DEGRADED" || "DELETE_IN_PROGRESS" || "DELETED",
6465
* // StateMessage: "STRING_VALUE",
@@ -68,12 +69,13 @@ export interface DeleteClusterCommandOutput extends DeleteClusterResponse, __Met
6869
* // PreCoPassword: "STRING_VALUE",
6970
* // SecurityGroup: "STRING_VALUE",
7071
* // SourceBackupId: "STRING_VALUE",
71-
* // State: "CREATE_IN_PROGRESS" || "UNINITIALIZED" || "INITIALIZE_IN_PROGRESS" || "INITIALIZED" || "ACTIVE" || "UPDATE_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "DELETED" || "DEGRADED",
72+
* // State: "CREATE_IN_PROGRESS" || "UNINITIALIZED" || "INITIALIZE_IN_PROGRESS" || "INITIALIZED" || "ACTIVE" || "UPDATE_IN_PROGRESS" || "MODIFY_IN_PROGRESS" || "ROLLBACK_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "DELETED" || "DEGRADED",
7273
* // StateMessage: "STRING_VALUE",
7374
* // SubnetMapping: { // ExternalSubnetMapping
7475
* // "<keys>": "STRING_VALUE",
7576
* // },
7677
* // VpcId: "STRING_VALUE",
78+
* // NetworkType: "IPV4" || "DUALSTACK",
7779
* // Certificates: { // Certificates
7880
* // ClusterCsr: "STRING_VALUE",
7981
* // HsmCertificate: "STRING_VALUE",

clients/client-cloudhsm-v2/src/commands/DescribeClustersCommand.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export interface DescribeClustersCommandOutput extends DescribeClustersResponse,
7070
* // SubnetId: "STRING_VALUE",
7171
* // EniId: "STRING_VALUE",
7272
* // EniIp: "STRING_VALUE",
73+
* // EniIpV6: "STRING_VALUE",
7374
* // HsmId: "STRING_VALUE", // required
7475
* // State: "CREATE_IN_PROGRESS" || "ACTIVE" || "DEGRADED" || "DELETE_IN_PROGRESS" || "DELETED",
7576
* // StateMessage: "STRING_VALUE",
@@ -79,12 +80,13 @@ export interface DescribeClustersCommandOutput extends DescribeClustersResponse,
7980
* // PreCoPassword: "STRING_VALUE",
8081
* // SecurityGroup: "STRING_VALUE",
8182
* // SourceBackupId: "STRING_VALUE",
82-
* // State: "CREATE_IN_PROGRESS" || "UNINITIALIZED" || "INITIALIZE_IN_PROGRESS" || "INITIALIZED" || "ACTIVE" || "UPDATE_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "DELETED" || "DEGRADED",
83+
* // State: "CREATE_IN_PROGRESS" || "UNINITIALIZED" || "INITIALIZE_IN_PROGRESS" || "INITIALIZED" || "ACTIVE" || "UPDATE_IN_PROGRESS" || "MODIFY_IN_PROGRESS" || "ROLLBACK_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "DELETED" || "DEGRADED",
8384
* // StateMessage: "STRING_VALUE",
8485
* // SubnetMapping: { // ExternalSubnetMapping
8586
* // "<keys>": "STRING_VALUE",
8687
* // },
8788
* // VpcId: "STRING_VALUE",
89+
* // NetworkType: "IPV4" || "DUALSTACK",
8890
* // Certificates: { // Certificates
8991
* // ClusterCsr: "STRING_VALUE",
9092
* // HsmCertificate: "STRING_VALUE",

clients/client-cloudhsm-v2/src/commands/InitializeClusterCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface InitializeClusterCommandOutput extends InitializeClusterRespons
4848
* const command = new InitializeClusterCommand(input);
4949
* const response = await client.send(command);
5050
* // { // InitializeClusterResponse
51-
* // State: "CREATE_IN_PROGRESS" || "UNINITIALIZED" || "INITIALIZE_IN_PROGRESS" || "INITIALIZED" || "ACTIVE" || "UPDATE_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "DELETED" || "DEGRADED",
51+
* // State: "CREATE_IN_PROGRESS" || "UNINITIALIZED" || "INITIALIZE_IN_PROGRESS" || "INITIALIZED" || "ACTIVE" || "UPDATE_IN_PROGRESS" || "MODIFY_IN_PROGRESS" || "ROLLBACK_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "DELETED" || "DEGRADED",
5252
* // StateMessage: "STRING_VALUE",
5353
* // };
5454
*

clients/client-cloudhsm-v2/src/commands/ModifyClusterCommand.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export interface ModifyClusterCommandOutput extends ModifyClusterResponse, __Met
6262
* // SubnetId: "STRING_VALUE",
6363
* // EniId: "STRING_VALUE",
6464
* // EniIp: "STRING_VALUE",
65+
* // EniIpV6: "STRING_VALUE",
6566
* // HsmId: "STRING_VALUE", // required
6667
* // State: "CREATE_IN_PROGRESS" || "ACTIVE" || "DEGRADED" || "DELETE_IN_PROGRESS" || "DELETED",
6768
* // StateMessage: "STRING_VALUE",
@@ -71,12 +72,13 @@ export interface ModifyClusterCommandOutput extends ModifyClusterResponse, __Met
7172
* // PreCoPassword: "STRING_VALUE",
7273
* // SecurityGroup: "STRING_VALUE",
7374
* // SourceBackupId: "STRING_VALUE",
74-
* // State: "CREATE_IN_PROGRESS" || "UNINITIALIZED" || "INITIALIZE_IN_PROGRESS" || "INITIALIZED" || "ACTIVE" || "UPDATE_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "DELETED" || "DEGRADED",
75+
* // State: "CREATE_IN_PROGRESS" || "UNINITIALIZED" || "INITIALIZE_IN_PROGRESS" || "INITIALIZED" || "ACTIVE" || "UPDATE_IN_PROGRESS" || "MODIFY_IN_PROGRESS" || "ROLLBACK_IN_PROGRESS" || "DELETE_IN_PROGRESS" || "DELETED" || "DEGRADED",
7576
* // StateMessage: "STRING_VALUE",
7677
* // SubnetMapping: { // ExternalSubnetMapping
7778
* // "<keys>": "STRING_VALUE",
7879
* // },
7980
* // VpcId: "STRING_VALUE",
81+
* // NetworkType: "IPV4" || "DUALSTACK",
8082
* // Certificates: { // Certificates
8183
* // ClusterCsr: "STRING_VALUE",
8284
* // HsmCertificate: "STRING_VALUE",

clients/client-cloudhsm-v2/src/commands/TagResourceCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ export interface TagResourceCommandOutput extends TagResourceResponse, __Metadat
6969
* @throws {@link CloudHsmInvalidRequestException} (client fault)
7070
* <p>The request was rejected because it is not a valid request.</p>
7171
*
72+
* @throws {@link CloudHsmResourceLimitExceededException} (client fault)
73+
* <p>The request was rejected because it exceeds an CloudHSM limit.</p>
74+
*
7275
* @throws {@link CloudHsmResourceNotFoundException} (client fault)
7376
* <p>The request was rejected because it refers to a resource that cannot be
7477
* found.</p>

clients/client-cloudhsm-v2/src/models/models_0.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,20 @@ export interface CopyBackupToRegionResponse {
399399
DestinationBackup?: DestinationBackup | undefined;
400400
}
401401

402+
/**
403+
* @public
404+
* @enum
405+
*/
406+
export const NetworkType = {
407+
DUALSTACK: "DUALSTACK",
408+
IPV4: "IPV4",
409+
} as const;
410+
411+
/**
412+
* @public
413+
*/
414+
export type NetworkType = (typeof NetworkType)[keyof typeof NetworkType];
415+
402416
/**
403417
* @public
404418
*/
@@ -440,6 +454,14 @@ export interface CreateClusterRequest {
440454
*/
441455
SubnetIds: string[] | undefined;
442456

457+
/**
458+
* <p>The NetworkType to create a cluster with. The allowed values are
459+
* <code>IPV4</code> and <code>DUALSTACK</code>.
460+
* </p>
461+
* @public
462+
*/
463+
NetworkType?: NetworkType | undefined;
464+
443465
/**
444466
* <p>Tags to apply to the CloudHSM cluster during creation.</p>
445467
* @public
@@ -545,6 +567,12 @@ export interface Hsm {
545567
*/
546568
EniIp?: string | undefined;
547569

570+
/**
571+
* <p>The IPv6 address (if any) of the HSM's elastic network interface (ENI).</p>
572+
* @public
573+
*/
574+
EniIpV6?: string | undefined;
575+
548576
/**
549577
* <p>The HSM's identifier (ID).</p>
550578
* @public
@@ -576,6 +604,8 @@ export const ClusterState = {
576604
DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS",
577605
INITIALIZED: "INITIALIZED",
578606
INITIALIZE_IN_PROGRESS: "INITIALIZE_IN_PROGRESS",
607+
MODIFY_IN_PROGRESS: "MODIFY_IN_PROGRESS",
608+
ROLLBACK_IN_PROGRESS: "ROLLBACK_IN_PROGRESS",
579609
UNINITIALIZED: "UNINITIALIZED",
580610
UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS",
581611
} as const;
@@ -670,6 +700,16 @@ export interface Cluster {
670700
*/
671701
VpcId?: string | undefined;
672702

703+
/**
704+
* <p>The cluster's NetworkType can be set to either IPV4 (which is the default) or DUALSTACK.
705+
* When set to IPV4, communication between your application and the Hardware Security Modules (HSMs) is restricted to the IPv4 protocol only.
706+
* In contrast, the DUALSTACK network type enables communication over both the IPv4 and IPv6 protocols.
707+
* To use the DUALSTACK option, you'll need to configure your Virtual Private Cloud (VPC) and subnets to support both IPv4 and IPv6. This involves adding IPv6 Classless Inter-Domain Routing (CIDR) blocks to the existing IPv4 CIDR blocks in your subnets.
708+
* The choice between IPV4 and DUALSTACK network types determines the flexibility of the network addressing setup for your cluster. The DUALSTACK option provides more flexibility by allowing both IPv4 and IPv6 communication.</p>
709+
* @public
710+
*/
711+
NetworkType?: NetworkType | undefined;
712+
673713
/**
674714
* <p>Contains one or more certificates or a certificate signing request (CSR).</p>
675715
* @public
@@ -1210,6 +1250,28 @@ export interface RestoreBackupResponse {
12101250
Backup?: Backup | undefined;
12111251
}
12121252

1253+
/**
1254+
* <p>The request was rejected because it exceeds an CloudHSM limit.</p>
1255+
* @public
1256+
*/
1257+
export class CloudHsmResourceLimitExceededException extends __BaseException {
1258+
readonly name: "CloudHsmResourceLimitExceededException" = "CloudHsmResourceLimitExceededException";
1259+
readonly $fault: "client" = "client";
1260+
Message?: string | undefined;
1261+
/**
1262+
* @internal
1263+
*/
1264+
constructor(opts: __ExceptionOptionType<CloudHsmResourceLimitExceededException, __BaseException>) {
1265+
super({
1266+
name: "CloudHsmResourceLimitExceededException",
1267+
$fault: "client",
1268+
...opts,
1269+
});
1270+
Object.setPrototypeOf(this, CloudHsmResourceLimitExceededException.prototype);
1271+
this.Message = opts.Message;
1272+
}
1273+
}
1274+
12131275
/**
12141276
* @public
12151277
*/

clients/client-cloudhsm-v2/src/protocols/Aws_json1_1.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import {
5151
CloudHsmAccessDeniedException,
5252
CloudHsmInternalFailureException,
5353
CloudHsmInvalidRequestException,
54+
CloudHsmResourceLimitExceededException,
5455
CloudHsmResourceNotFoundException,
5556
CloudHsmServiceException,
5657
CloudHsmTagException,
@@ -708,6 +709,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
708709
case "CloudHsmTagException":
709710
case "com.amazonaws.cloudhsmv2#CloudHsmTagException":
710711
throw await de_CloudHsmTagExceptionRes(parsedOutput, context);
712+
case "CloudHsmResourceLimitExceededException":
713+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceLimitExceededException":
714+
throw await de_CloudHsmResourceLimitExceededExceptionRes(parsedOutput, context);
711715
default:
712716
const parsedBody = parsedOutput.body;
713717
return throwDefaultError({
@@ -766,6 +770,22 @@ const de_CloudHsmInvalidRequestExceptionRes = async (
766770
return __decorateServiceException(exception, body);
767771
};
768772

773+
/**
774+
* deserializeAws_json1_1CloudHsmResourceLimitExceededExceptionRes
775+
*/
776+
const de_CloudHsmResourceLimitExceededExceptionRes = async (
777+
parsedOutput: any,
778+
context: __SerdeContext
779+
): Promise<CloudHsmResourceLimitExceededException> => {
780+
const body = parsedOutput.body;
781+
const deserialized: any = _json(body);
782+
const exception = new CloudHsmResourceLimitExceededException({
783+
$metadata: deserializeMetadata(parsedOutput),
784+
...deserialized,
785+
});
786+
return __decorateServiceException(exception, body);
787+
};
788+
769789
/**
770790
* deserializeAws_json1_1CloudHsmResourceNotFoundExceptionRes
771791
*/
@@ -908,6 +928,8 @@ const de_Backups = (output: any, context: __SerdeContext): Backup[] => {
908928

909929
// de_CloudHsmInvalidRequestException omitted.
910930

931+
// de_CloudHsmResourceLimitExceededException omitted.
932+
911933
// de_CloudHsmResourceNotFoundException omitted.
912934

913935
// de_CloudHsmServiceException omitted.
@@ -927,6 +949,7 @@ const de_Cluster = (output: any, context: __SerdeContext): Cluster => {
927949
HsmType: __expectString,
928950
Hsms: _json,
929951
Mode: __expectString,
952+
NetworkType: __expectString,
930953
PreCoPassword: __expectString,
931954
SecurityGroup: __expectString,
932955
SourceBackupId: __expectString,

0 commit comments

Comments
 (0)