Skip to content

get_server_certificate async

get_server_certificate(
    server_certificate_name: serverCertificateNameType,
    *,
    config_overrides: Optional[AsyncIAMClientConfig] = None,
) -> GetServerCertificateResponse

Retrieves information about the specified server certificate stored in IAM.

For more information about working with server certificates, see Working with server certificates in the IAM User Guide. This topic includes a list of Amazon Web Services services that can use the server certificates that you manage with IAM.

Parameters:

  • server_certificate_name (serverCertificateNameType) –

    The name of the server certificate you want to retrieve information about.

    This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

Raises:

  • NoSuchEntityException –

    The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.

  • ServiceFailureException –

    The request processing has failed because of an unknown error, exception or failure.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_iam/_services/async_iam.py
async def get_server_certificate(
    self,
    server_certificate_name: "capo_iam.types.server_certificate_name_type.serverCertificateNameType",
    *,
    config_overrides: Optional[AsyncIAMClientConfig] = None,
) -> "capo_iam.types.get_server_certificate_response.GetServerCertificateResponse":
    """<p>Retrieves information about the specified server certificate stored in IAM.</p> <p>For more information about working with server certificates, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html">Working with server certificates</a> in the <i>IAM User Guide</i>. This topic includes a list of Amazon Web Services services that can use the server certificates that you manage with IAM.</p>

    Args:
        server_certificate_name: <p>The name of the server certificate you want to retrieve information about.</p> <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>

    Raises:
        capo_iam.errors.no_such_entity_exception.NoSuchEntityException: <p>The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.</p>
        capo_iam.errors.service_failure_exception.ServiceFailureException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iam.types.get_server_certificate_request.GetServerCertificateRequest]",
    ) -> AsyncOperationResponse[
        "capo_iam.types.get_server_certificate_response.GetServerCertificateResponse"
    ]:
        import capo_iam._operations.aws_identity_management_v20100508.get_server_certificate

        (
            output,
            http_response,
        ) = await capo_iam._operations.aws_identity_management_v20100508.get_server_certificate.async_get_server_certificate(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetServerCertificate")
    )
    input_: capo_iam.types.get_server_certificate_request.GetServerCertificateRequest = {
        "server_certificate_name": server_certificate_name
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output