create_hsm(
subnet_id: SubnetId,
ssh_key: SshKey,
iam_role_arn: IamRoleArn,
subscription_type: SubscriptionType,
*,
config_overrides: Optional[AsyncCloudHSMClientConfig] = None,
eni_ip: Optional[IpAddress] = None,
external_id: Optional[ExternalId] = None,
client_token: Optional[ClientToken] = None,
syslog_ip: Optional[IpAddress] = None,
) -> CreateHsmResponse
This is documentation for AWS CloudHSM Classic. For more information, see AWS CloudHSM Classic FAQs, the AWS CloudHSM Classic User Guide, and the AWS CloudHSM Classic API Reference.
For information about the current version of AWS CloudHSM, see AWS CloudHSM, the AWS CloudHSM User Guide, and the AWS CloudHSM API Reference.
Creates an uninitialized HSM instance.
There is an upfront fee charged for each HSM instance that you create with the CreateHsm operation. If you accidentally provision an HSM and want to request a refund, delete the instance using the DeleteHsm operation, go to the AWS Support Center, create a new case, and select Account and Billing Support.
It can take up to 20 minutes to create and provision an HSM. You can monitor the status of the HSM with the DescribeHsm operation. The HSM is ready to be initialized when the status changes to RUNNING.
Parameters:
-
subnet_id
(SubnetId)
–
The identifier of the subnet in your VPC in which to place the HSM.
-
ssh_key
(SshKey)
–
The SSH public key to install on the HSM.
-
eni_ip
(Optional[IpAddress], default:
None
)
–
The IP address to assign to the HSM's ENI.
If an IP address is not specified, an IP address will be randomly chosen from the CIDR range of the subnet.
-
iam_role_arn
(IamRoleArn)
–
The ARN of an IAM role to enable the AWS CloudHSM service to allocate an ENI on your behalf.
-
external_id
(Optional[ExternalId], default:
None
)
–
The external ID from IamRoleArn, if present.
-
client_token
(Optional[ClientToken], default:
None
)
–
A user-defined token to ensure idempotence. Subsequent calls to this operation with the same token will be ignored.
-
syslog_ip
(Optional[IpAddress], default:
None
)
–
The IP address for the syslog monitoring server. The AWS CloudHSM service only supports one syslog monitoring server.
Raises:
Source code in docs_src/capo_cloudhsm/_services/async_cloud_hsm.py
| async def create_hsm(
self,
subnet_id: "capo_cloudhsm.types.subnet_id.SubnetId",
ssh_key: "capo_cloudhsm.types.ssh_key.SshKey",
iam_role_arn: "capo_cloudhsm.types.iam_role_arn.IamRoleArn",
subscription_type: "capo_cloudhsm.types.subscription_type.SubscriptionType",
*,
config_overrides: Optional[AsyncCloudHSMClientConfig] = None,
eni_ip: Optional["capo_cloudhsm.types.ip_address.IpAddress"] = None,
external_id: Optional["capo_cloudhsm.types.external_id.ExternalId"] = None,
client_token: Optional["capo_cloudhsm.types.client_token.ClientToken"] = None,
syslog_ip: Optional["capo_cloudhsm.types.ip_address.IpAddress"] = None,
) -> "capo_cloudhsm.types.create_hsm_response.CreateHsmResponse":
"""<p>This is documentation for <b>AWS CloudHSM Classic</b>. For more information, see <a href="http://aws.amazon.com/cloudhsm/faqs-classic/">AWS CloudHSM Classic FAQs</a>, the <a href="https://docs.aws.amazon.com/cloudhsm/classic/userguide/">AWS CloudHSM Classic User Guide</a>, and the <a href="https://docs.aws.amazon.com/cloudhsm/classic/APIReference/">AWS CloudHSM Classic API Reference</a>.</p> <p> <b>For information about the current version of AWS CloudHSM</b>, see <a href="http://aws.amazon.com/cloudhsm/">AWS CloudHSM</a>, the <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/">AWS CloudHSM User Guide</a>, and the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/">AWS CloudHSM API Reference</a>.</p> <p>Creates an uninitialized HSM instance.</p> <p>There is an upfront fee charged for each HSM instance that you create with the <code>CreateHsm</code> operation. If you accidentally provision an HSM and want to request a refund, delete the instance using the <a>DeleteHsm</a> operation, go to the <a href="https://console.aws.amazon.com/support/home">AWS Support Center</a>, create a new case, and select <b>Account and Billing Support</b>.</p> <important> <p>It can take up to 20 minutes to create and provision an HSM. You can monitor the status of the HSM with the <a>DescribeHsm</a> operation. The HSM is ready to be initialized when the status changes to <code>RUNNING</code>.</p> </important>
Args:
subnet_id: <p>The identifier of the subnet in your VPC in which to place the HSM.</p>
ssh_key: <p>The SSH public key to install on the HSM.</p>
eni_ip: <p>The IP address to assign to the HSM's ENI.</p> <p>If an IP address is not specified, an IP address will be randomly chosen from the CIDR range of the subnet.</p>
iam_role_arn: <p>The ARN of an IAM role to enable the AWS CloudHSM service to allocate an ENI on your behalf.</p>
external_id: <p>The external ID from <code>IamRoleArn</code>, if present.</p>
client_token: <p>A user-defined token to ensure idempotence. Subsequent calls to this operation with the same token will be ignored.</p>
syslog_ip: <p>The IP address for the syslog monitoring server. The AWS CloudHSM service only supports one syslog monitoring server.</p>
Raises:
capo_cloudhsm.errors.cloud_hsm_internal_exception.CloudHsmInternalException: <p>Indicates that an internal error occurred.</p>
capo_cloudhsm.errors.cloud_hsm_service_exception.CloudHsmServiceException: <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
capo_cloudhsm.errors.invalid_request_exception.InvalidRequestException: <p>Indicates that one or more of the request parameters are not valid.</p>
capo_cloudhsm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudhsm.types.create_hsm_request.CreateHsmRequest]",
) -> AsyncOperationResponse[
"capo_cloudhsm.types.create_hsm_response.CreateHsmResponse"
]:
import capo_cloudhsm._operations.cloud_hsm_frontend_service.create_hsm
(
output,
http_response,
) = await capo_cloudhsm._operations.cloud_hsm_frontend_service.create_hsm.async_create_hsm(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateHsm")
)
input_: capo_cloudhsm.types.create_hsm_request.CreateHsmRequest = {
"subnet_id": subnet_id,
"ssh_key": ssh_key,
"iam_role_arn": iam_role_arn,
"subscription_type": subscription_type,
}
if eni_ip is not None:
input_["eni_ip"] = eni_ip
if external_id is not None:
input_["external_id"] = external_id
if client_token is not None:
input_["client_token"] = client_token
if syslog_ip is not None:
input_["syslog_ip"] = syslog_ip
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|