get_public_key

get_public_key(**kwargs)

Gets a public key.

See also: AWS API Documentation

Request Syntax

response = client.get_public_key(
    Id='string'
)
Parameters
Id (string) --

[REQUIRED]

The identifier of the public key you are getting.

Return type
dict
Returns
Response Syntax
{
    'PublicKey': {
        'Id': 'string',
        'CreatedTime': datetime(2015, 1, 1),
        'PublicKeyConfig': {
            'CallerReference': 'string',
            'Name': 'string',
            'EncodedKey': 'string',
            'Comment': 'string'
        }
    },
    'ETag': 'string'
}

Response Structure

  • (dict) --
    • PublicKey (dict) --

      The public key.

      • Id (string) --

        The identifier of the public key.

      • CreatedTime (datetime) --

        The date and time when the public key was uploaded.

      • PublicKeyConfig (dict) --

        Configuration information about a public key that you can use with signed URLs and signed cookies, or with field-level encryption.

        • CallerReference (string) --

          A string included in the request to help make sure that the request can't be replayed.

        • Name (string) --

          A name to help identify the public key.

        • EncodedKey (string) --

          The public key that you can use with signed URLs and signed cookies, or with field-level encryption.

        • Comment (string) --

          A comment to describe the public key. The comment cannot be longer than 128 characters.

    • ETag (string) --

      The identifier for this version of the public key.

Exceptions

  • CloudFront.Client.exceptions.AccessDenied
  • CloudFront.Client.exceptions.NoSuchPublicKey