IAM / Client / get_server_certificate

get_server_certificate#

IAM.Client.get_server_certificate(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.get_server_certificate(
    ServerCertificateName='string'
)
Parameters:

ServerCertificateName (string) –

[REQUIRED]

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: _+=,.@-

Return type:

dict

Returns:

Response Syntax

{
    'ServerCertificate': {
        'ServerCertificateMetadata': {
            'Path': 'string',
            'ServerCertificateName': 'string',
            'ServerCertificateId': 'string',
            'Arn': 'string',
            'UploadDate': datetime(2015, 1, 1),
            'Expiration': datetime(2015, 1, 1)
        },
        'CertificateBody': 'string',
        'CertificateChain': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –

    Contains the response to a successful GetServerCertificate request.

    • ServerCertificate (dict) –

      A structure containing details about the server certificate.

      • ServerCertificateMetadata (dict) –

        The meta information of the server certificate, such as its name, path, ID, and ARN.

        • Path (string) –

          The path to the server certificate. For more information about paths, see IAM identifiers in the IAM User Guide.

        • ServerCertificateName (string) –

          The name that identifies the server certificate.

        • ServerCertificateId (string) –

          The stable and unique string identifying the server certificate. For more information about IDs, see IAM identifiers in the IAM User Guide.

        • Arn (string) –

          The Amazon Resource Name (ARN) specifying the server certificate. For more information about ARNs and how to use them in policies, see IAM identifiers in the IAM User Guide.

        • UploadDate (datetime) –

          The date when the server certificate was uploaded.

        • Expiration (datetime) –

          The date on which the certificate is set to expire.

      • CertificateBody (string) –

        The contents of the public key certificate.

      • CertificateChain (string) –

        The contents of the public key certificate chain.

      • Tags (list) –

        A list of tags that are attached to the server certificate. For more information about tagging, see Tagging IAM resources in the IAM User Guide.

        • (dict) –

          A structure that represents user-provided metadata that can be associated with an IAM resource. For more information about tagging, see Tagging IAM resources in the IAM User Guide.

          • Key (string) –

            The key name that can be used to look up or retrieve the associated value. For example, Department or Cost Center are common choices.

          • Value (string) –

            The value associated with this tag. For example, tags with a key name of Department could have values such as Human Resources, Accounting, and Support. Tags with a key name of Cost Center might have values that consist of the number associated with the different cost centers in your company. Typically, many resources have tags with the same key name but with different values.

            Note

            Amazon Web Services always interprets the tag Value as a single string. If you need to store an array, you can store comma-separated values in the string. However, you must interpret the value in your code.

Exceptions

  • IAM.Client.exceptions.NoSuchEntityException

  • IAM.Client.exceptions.ServiceFailureException