Skip to content

Commit

Permalink
feat(client-cloudhsm-v2): Added support for hsm type hsm2m.medium. Ad…
Browse files Browse the repository at this point in the history
…ded supported for creating a cluster in FIPS or NON_FIPS mode.
  • Loading branch information
awstools committed Jun 13, 2024
1 parent b0de95c commit 59f9e1a
Show file tree
Hide file tree
Showing 11 changed files with 111 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface CreateClusterCommandOutput extends CreateClusterResponse, __Met
* Value: "STRING_VALUE", // required
* },
* ],
* Mode: "FIPS" || "NON_FIPS",
* };
* const command = new CreateClusterCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -98,6 +99,7 @@ export interface CreateClusterCommandOutput extends CreateClusterResponse, __Met
* // Value: "STRING_VALUE", // required
* // },
* // ],
* // Mode: "FIPS" || "NON_FIPS",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export interface DeleteBackupCommandOutput extends DeleteBackupResponse, __Metad
* // Value: "STRING_VALUE", // required
* // },
* // ],
* // HsmType: "STRING_VALUE",
* // Mode: "FIPS" || "NON_FIPS",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export interface DeleteClusterCommandOutput extends DeleteClusterResponse, __Met
* // Value: "STRING_VALUE", // required
* // },
* // ],
* // Mode: "FIPS" || "NON_FIPS",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export interface DescribeBackupsCommandOutput extends DescribeBackupsResponse, _
* // Value: "STRING_VALUE", // required
* // },
* // ],
* // HsmType: "STRING_VALUE",
* // Mode: "FIPS" || "NON_FIPS",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export interface DescribeClustersCommandOutput extends DescribeClustersResponse,
* // Value: "STRING_VALUE", // required
* // },
* // ],
* // Mode: "FIPS" || "NON_FIPS",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export interface ModifyBackupAttributesCommandOutput extends ModifyBackupAttribu
* // Value: "STRING_VALUE", // required
* // },
* // ],
* // HsmType: "STRING_VALUE",
* // Mode: "FIPS" || "NON_FIPS",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export interface ModifyClusterCommandOutput extends ModifyClusterResponse, __Met
* // Value: "STRING_VALUE", // required
* // },
* // ],
* // Mode: "FIPS" || "NON_FIPS",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export interface RestoreBackupCommandOutput extends RestoreBackupResponse, __Met
* // Value: "STRING_VALUE", // required
* // },
* // ],
* // HsmType: "STRING_VALUE",
* // Mode: "FIPS" || "NON_FIPS",
* // },
* // };
*
Expand Down
43 changes: 41 additions & 2 deletions clients/client-cloudhsm-v2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ export const BackupState = {
*/
export type BackupState = (typeof BackupState)[keyof typeof BackupState];

/**
* @public
* @enum
*/
export const ClusterMode = {
FIPS: "FIPS",
NON_FIPS: "NON_FIPS",
} as const;

/**
* @public
*/
export type ClusterMode = (typeof ClusterMode)[keyof typeof ClusterMode];

/**
* <p>Contains a tag. A tag is a key-value pair.</p>
* @public
Expand Down Expand Up @@ -116,6 +130,18 @@ export interface Backup {
* @public
*/
TagList?: Tag[];

/**
* <p>The HSM type of the cluster that was backed up.</p>
* @public
*/
HsmType?: string;

/**
* <p>The mode of the cluster that was backed up.</p>
* @public
*/
Mode?: ClusterMode;
}

/**
Expand Down Expand Up @@ -378,8 +404,8 @@ export interface CreateClusterRequest {
BackupRetentionPolicy?: BackupRetentionPolicy;

/**
* <p>The type of HSM to use in the cluster. Currently the only allowed value is
* <code>hsm1.medium</code>.</p>
* <p>The type of HSM to use in the cluster. The allowed values are
* <code>hsm1.medium</code> and <code>hsm2m.medium</code>.</p>
* @public
*/
HsmType: string | undefined;
Expand Down Expand Up @@ -412,6 +438,13 @@ export interface CreateClusterRequest {
* @public
*/
TagList?: Tag[];

/**
* <p>The mode to use in the cluster. The allowed values are
* <code>FIPS</code> and <code>NON_FIPS</code>.</p>
* @public
*/
Mode?: ClusterMode;
}

/**
Expand Down Expand Up @@ -641,6 +674,12 @@ export interface Cluster {
* @public
*/
TagList?: Tag[];

/**
* <p>The mode of the cluster.</p>
* @public
*/
Mode?: ClusterMode;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions clients/client-cloudhsm-v2/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,8 @@ const de_Backup = (output: any, context: __SerdeContext): Backup => {
CopyTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
CreateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
DeleteTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
HsmType: __expectString,
Mode: __expectString,
NeverExpires: __expectBoolean,
SourceBackup: __expectString,
SourceCluster: __expectString,
Expand Down Expand Up @@ -809,6 +811,7 @@ const de_Cluster = (output: any, context: __SerdeContext): Cluster => {
CreateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
HsmType: __expectString,
Hsms: _json,
Mode: __expectString,
PreCoPassword: __expectString,
SecurityGroup: __expectString,
SourceBackupId: __expectString,
Expand Down
57 changes: 54 additions & 3 deletions codegen/sdk-codegen/aws-models/cloudhsm-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@
"traits": {
"smithy.api#documentation": "<p>The list of tags for the backup.</p>"
}
},
"HsmType": {
"target": "com.amazonaws.cloudhsmv2#HsmType",
"traits": {
"smithy.api#documentation": "<p>The HSM type of the cluster that was backed up.</p>"
}
},
"Mode": {
"target": "com.amazonaws.cloudhsmv2#ClusterMode",
"traits": {
"smithy.api#documentation": "<p>The mode of the cluster that was backed up.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -1232,7 +1244,7 @@
"traits": {
"smithy.api#length": {
"min": 0,
"max": 5000
"max": 20000
},
"smithy.api#pattern": "^[a-zA-Z0-9+-/=\\s]*$"
}
Expand Down Expand Up @@ -1439,6 +1451,12 @@
"traits": {
"smithy.api#documentation": "<p>The list of tags for the cluster.</p>"
}
},
"Mode": {
"target": "com.amazonaws.cloudhsmv2#ClusterMode",
"traits": {
"smithy.api#documentation": "<p>The mode of the cluster.</p>"
}
}
},
"traits": {
Expand All @@ -1451,6 +1469,23 @@
"smithy.api#pattern": "^cluster-[2-7a-zA-Z]{11,16}$"
}
},
"com.amazonaws.cloudhsmv2#ClusterMode": {
"type": "enum",
"members": {
"FIPS": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "FIPS"
}
},
"NON_FIPS": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "NON_FIPS"
}
}
}
},
"com.amazonaws.cloudhsmv2#ClusterState": {
"type": "enum",
"members": {
Expand Down Expand Up @@ -1643,7 +1678,7 @@
"HsmType": {
"target": "com.amazonaws.cloudhsmv2#HsmType",
"traits": {
"smithy.api#documentation": "<p>The type of HSM to use in the cluster. Currently the only allowed value is\n <code>hsm1.medium</code>.</p>",
"smithy.api#documentation": "<p>The type of HSM to use in the cluster. The allowed values are\n <code>hsm1.medium</code> and <code>hsm2m.medium</code>.</p>",
"smithy.api#required": {}
}
},
Expand All @@ -1665,6 +1700,12 @@
"traits": {
"smithy.api#documentation": "<p>Tags to apply to the CloudHSM cluster during creation.</p>"
}
},
"Mode": {
"target": "com.amazonaws.cloudhsmv2#ClusterMode",
"traits": {
"smithy.api#documentation": "<p>The mode to use in the cluster. The allowed values are\n <code>FIPS</code> and <code>NON_FIPS</code>.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -2186,6 +2227,12 @@
},
"value": {
"target": "com.amazonaws.cloudhsmv2#Strings"
},
"traits": {
"smithy.api#length": {
"min": 0,
"max": 30
}
}
},
"com.amazonaws.cloudhsmv2#Hsm": {
Expand Down Expand Up @@ -2289,7 +2336,11 @@
"com.amazonaws.cloudhsmv2#HsmType": {
"type": "string",
"traits": {
"smithy.api#pattern": "^(hsm1\\.medium)$"
"smithy.api#length": {
"min": 0,
"max": 32
},
"smithy.api#pattern": "^((p|)hsm[0-9][a-z.]*\\.[a-zA-Z]+)$"
}
},
"com.amazonaws.cloudhsmv2#Hsms": {
Expand Down

0 comments on commit 59f9e1a

Please sign in to comment.