Describes the certificate that's identified by the CertificateId.
Transfer Family automatically publishes a Amazon CloudWatch metric called DaysUntilExpiry for imported certificates. This metric tracks the number of days until the certificate expires based on the InactiveDate. The metric is available in the AWS/Transfer namespace and includes the CertificateId as a dimension.
Parameters:
-
certificate_id
(CertificateId)
–
An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.
Raises:
Source code in docs_src/capo_transfer/_services/transfer.py
| def describe_certificate(
self,
certificate_id: "capo_transfer.types.certificate_id.CertificateId",
*,
config_overrides: Optional[TransferClientConfig] = None,
) -> (
"capo_transfer.types.describe_certificate_response.DescribeCertificateResponse"
):
"""<p>Describes the certificate that's identified by the <code>CertificateId</code>.</p> <note> <p>Transfer Family automatically publishes a Amazon CloudWatch metric called <code>DaysUntilExpiry</code> for imported certificates. This metric tracks the number of days until the certificate expires based on the <code>InactiveDate</code>. The metric is available in the <code>AWS/Transfer</code> namespace and includes the <code>CertificateId</code> as a dimension.</p> </note>
Args:
certificate_id: <p>An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.</p>
Raises:
capo_transfer.errors.internal_service_error.InternalServiceError: <p>This exception is thrown when an error occurs in the Transfer Family service.</p>
capo_transfer.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
capo_transfer.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.</p>
capo_transfer.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed because the Amazon Web ServicesTransfer Family service is not available.</p>
capo_transfer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_transfer.types.describe_certificate_request.DescribeCertificateRequest]",
) -> OperationResponse[
"capo_transfer.types.describe_certificate_response.DescribeCertificateResponse"
]:
import capo_transfer._operations.transfer_service.describe_certificate
output, http_response = (
capo_transfer._operations.transfer_service.describe_certificate.describe_certificate(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_transfer.types.describe_certificate_response.DescribeCertificateResponse",
) -> dict[str, Any]:
import capo_transfer.types.describe_certificate_response
return capo_transfer.types.describe_certificate_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("DescribeCertificate", redact_output=_redact_output),
)
input_: capo_transfer.types.describe_certificate_request.DescribeCertificateRequest = {
"certificate_id": certificate_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|