APIGateway / Client / get_api_key

get_api_key#

APIGateway.Client.get_api_key(**kwargs)#

Gets information about the current ApiKey resource.

See also: AWS API Documentation

Request Syntax

response = client.get_api_key(
    apiKey='string',
    includeValue=True|False
)
Parameters:
  • apiKey (string) –

    [REQUIRED]

    The identifier of the ApiKey resource.

  • includeValue (boolean) – A boolean flag to specify whether ( true) or not ( false) the result contains the key value.

Return type:

dict

Returns:

Response Syntax

{
    'id': 'string',
    'value': 'string',
    'name': 'string',
    'customerId': 'string',
    'description': 'string',
    'enabled': True|False,
    'createdDate': datetime(2015, 1, 1),
    'lastUpdatedDate': datetime(2015, 1, 1),
    'stageKeys': [
        'string',
    ],
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) –

    A resource that can be distributed to callers for executing Method resources that require an API key. API keys can be mapped to any Stage on any RestApi, which indicates that the callers with the API key can make requests to that stage.

    • id (string) –

      The identifier of the API Key.

    • value (string) –

      The value of the API Key.

    • name (string) –

      The name of the API Key.

    • customerId (string) –

      An Amazon Web Services Marketplace customer identifier, when integrating with the Amazon Web Services SaaS Marketplace.

    • description (string) –

      The description of the API Key.

    • enabled (boolean) –

      Specifies whether the API Key can be used by callers.

    • createdDate (datetime) –

      The timestamp when the API Key was created.

    • lastUpdatedDate (datetime) –

      The timestamp when the API Key was last updated.

    • stageKeys (list) –

      A list of Stage resources that are associated with the ApiKey resource.

      • (string) –

    • tags (dict) –

      The collection of tags. Each tag element is associated with a given resource.

      • (string) –

        • (string) –

Exceptions

  • APIGateway.Client.exceptions.BadRequestException

  • APIGateway.Client.exceptions.NotFoundException

  • APIGateway.Client.exceptions.UnauthorizedException

  • APIGateway.Client.exceptions.TooManyRequestsException