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.
Retrieves information about an HSM. You can identify the HSM by its ARN or its serial number.
Parameters:
-
hsm_arn
(Optional[HsmArn], default:
None
)
–
The ARN of the HSM. Either the HsmArn or the SerialNumber parameter must be specified.
-
hsm_serial_number
(Optional[HsmSerialNumber], default:
None
)
–
The serial number of the HSM. Either the HsmArn or the HsmSerialNumber parameter must be specified.
Raises:
Source code in docs_src/capo_cloudhsm/_services/cloud_hsm.py
| def describe_hsm(
self,
*,
config_overrides: Optional[CloudHSMClientConfig] = None,
hsm_arn: Optional["capo_cloudhsm.types.hsm_arn.HsmArn"] = None,
hsm_serial_number: Optional[
"capo_cloudhsm.types.hsm_serial_number.HsmSerialNumber"
] = None,
) -> "capo_cloudhsm.types.describe_hsm_response.DescribeHsmResponse":
"""<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>Retrieves information about an HSM. You can identify the HSM by its ARN or its serial number.</p>
Args:
hsm_arn: <p>The ARN of the HSM. Either the <code>HsmArn</code> or the <code>SerialNumber</code> parameter must be specified.</p>
hsm_serial_number: <p>The serial number of the HSM. Either the <code>HsmArn</code> or the <code>HsmSerialNumber</code> parameter must be specified.</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.
"""
def _handler(
req: "OperationRequest[capo_cloudhsm.types.describe_hsm_request.DescribeHsmRequest]",
) -> OperationResponse[
"capo_cloudhsm.types.describe_hsm_response.DescribeHsmResponse"
]:
import capo_cloudhsm._operations.cloud_hsm_frontend_service.describe_hsm
output, http_response = (
capo_cloudhsm._operations.cloud_hsm_frontend_service.describe_hsm.describe_hsm(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeHsm")
)
input_: capo_cloudhsm.types.describe_hsm_request.DescribeHsmRequest = {}
if hsm_arn is not None:
input_["hsm_arn"] = hsm_arn
if hsm_serial_number is not None:
input_["hsm_serial_number"] = hsm_serial_number
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|