Amazon API Gateway

2016/12/01 - Amazon API Gateway - 11 new18 updated api methods

Changes  Update apigateway client to latest version

DeleteDocumentationPart (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.delete_documentation_part(
    restApiId='string',
    documentationPartId='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

[Required] Specifies the identifier of an API of the to-be-deleted documentation part.

type documentationPartId:

string

param documentationPartId:

[REQUIRED]

[Required] The identifier of the to-be-deleted documentation part.

returns:

None

UpdateDocumentationVersion (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.update_documentation_version(
    restApiId='string',
    documentationVersion='string',
    patchOperations=[
        {
            'op': 'add'|'remove'|'replace'|'move'|'copy'|'test',
            'path': 'string',
            'value': 'string',
            'from': 'string'
        },
    ]
)
type restApiId:

string

param restApiId:

[REQUIRED]

[Required] The identifier of an API of the to-be-updated documentation version.

type documentationVersion:

string

param documentationVersion:

[REQUIRED]

[Required] The version identifier of the to-be-updated documentation version.

type patchOperations:

list

param patchOperations:

A list of update operations to be applied to the specified resource and in the order specified in this list.

  • (dict) -- A single patch operation to apply to the specified resource. Please refer to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used.

    • op (string) --

      An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

    • path (string) --

      The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

    • value (string) --

      The new target value of the update operation.

    • from (string) --

      Not supported.

rtype:

dict

returns:

Response Syntax

{
    'version': 'string',
    'createdDate': datetime(2015, 1, 1),
    'description': 'string'
}

Response Structure

  • (dict) --

    A snapshot of the documentation of an API.

    Publishing API documentation involves creating a documentation version associated with an API stage and exporting the versioned documentation to an external (e.g., Swagger) file.

    Documenting an API, DocumentationPart, DocumentationVersions

    • version (string) --

      The version identifier of the API documentation snapshot.

    • createdDate (datetime) --

      The date when the API documentation snapshot is created.

    • description (string) --

      The description of the API documentation snapshot.

GetDocumentationPart (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.get_documentation_part(
    restApiId='string',
    documentationPartId='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

[Required] The identifier of an API of the to-be-retrieved documentation part.

type documentationPartId:

string

param documentationPartId:

[REQUIRED]

[Required] The identifier of the to-be-retrieved documentation part.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'location': {
        'type': 'API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY',
        'path': 'string',
        'method': 'string',
        'statusCode': 'string',
        'name': 'string'
    },
    'properties': 'string'
}

Response Structure

  • (dict) --

    A documentation part for a targeted API entity.

    A documentation part consists of a content map ( properties) and a target ( location). The target specifies an API entity to which the documentation content applies. The supported API entity types are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Valid location fields depend on the API entity type. All valid fields are not required.

    The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the Swagger-compliant documentation fields will be injected into the associated API entity definition in the exported Swagger definition file.

    Documenting an API, DocumentationParts

    • id (string) --

      The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.

    • location (dict) --

      The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.

      • type (string) --

        The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, MODEL, or RESOURCE type.

      • path (string) --

        The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.

      • method (string) --

        The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.

      • statusCode (string) --

        The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.

      • name (string) --

        The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.

    • properties (string) --

      A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.

UpdateDocumentationPart (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.update_documentation_part(
    restApiId='string',
    documentationPartId='string',
    patchOperations=[
        {
            'op': 'add'|'remove'|'replace'|'move'|'copy'|'test',
            'path': 'string',
            'value': 'string',
            'from': 'string'
        },
    ]
)
type restApiId:

string

param restApiId:

[REQUIRED]

[Required] The identifier of an API of the to-be-updated documentation part.

type documentationPartId:

string

param documentationPartId:

[REQUIRED]

[Required] The identifier of the to-be-updated documentation part.

type patchOperations:

list

param patchOperations:

A list of update operations to be applied to the specified resource and in the order specified in this list.

  • (dict) -- A single patch operation to apply to the specified resource. Please refer to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used.

    • op (string) --

      An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

    • path (string) --

      The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

    • value (string) --

      The new target value of the update operation.

    • from (string) --

      Not supported.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'location': {
        'type': 'API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY',
        'path': 'string',
        'method': 'string',
        'statusCode': 'string',
        'name': 'string'
    },
    'properties': 'string'
}

Response Structure

  • (dict) --

    A documentation part for a targeted API entity.

    A documentation part consists of a content map ( properties) and a target ( location). The target specifies an API entity to which the documentation content applies. The supported API entity types are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Valid location fields depend on the API entity type. All valid fields are not required.

    The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the Swagger-compliant documentation fields will be injected into the associated API entity definition in the exported Swagger definition file.

    Documenting an API, DocumentationParts

    • id (string) --

      The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.

    • location (dict) --

      The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.

      • type (string) --

        The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, MODEL, or RESOURCE type.

      • path (string) --

        The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.

      • method (string) --

        The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.

      • statusCode (string) --

        The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.

      • name (string) --

        The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.

    • properties (string) --

      A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.

GetDocumentationVersion (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.get_documentation_version(
    restApiId='string',
    documentationVersion='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

[Required] The identifier of the API of the to-be-retrieved documentation snapshot.

type documentationVersion:

string

param documentationVersion:

[REQUIRED]

[Required] The version identifier of the to-be-retrieved documentation snapshot.

rtype:

dict

returns:

Response Syntax

{
    'version': 'string',
    'createdDate': datetime(2015, 1, 1),
    'description': 'string'
}

Response Structure

  • (dict) --

    A snapshot of the documentation of an API.

    Publishing API documentation involves creating a documentation version associated with an API stage and exporting the versioned documentation to an external (e.g., Swagger) file.

    Documenting an API, DocumentationPart, DocumentationVersions

    • version (string) --

      The version identifier of the API documentation snapshot.

    • createdDate (datetime) --

      The date when the API documentation snapshot is created.

    • description (string) --

      The description of the API documentation snapshot.

ImportDocumentationParts (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.import_documentation_parts(
    restApiId='string',
    mode='merge'|'overwrite',
    failOnWarnings=True|False,
    body=b'bytes'|file
)
type restApiId:

string

param restApiId:

[REQUIRED]

[Required] The identifier of an API of the to-be-imported documentation parts.

type mode:

string

param mode:

A query parameter to indicate whether to overwrite ( OVERWRITE) any existing DocumentationParts definition or to merge ( MERGE) the new definition into the existing one. The default value is MERGE.

type failOnWarnings:

boolean

param failOnWarnings:

A query parameter to specify whether to rollback the documentation importation ( true) or not ( false) when a warning is encountered. The default value is false.

type body:

bytes or seekable file-like object

param body:

[REQUIRED]

[Required] Raw byte array representing the to-be-imported documentation parts. To import from a Swagger file, this is a JSON object.

rtype:

dict

returns:

Response Syntax

{
    'ids': [
        'string',
    ],
    'warnings': [
        'string',
    ]
}

Response Structure

  • (dict) --

    A collection of the imported DocumentationPart identifiers.

    This is used to return the result when documentation parts in an external (e.g., Swagger) file are imported into Amazon API Gateway Documenting an API, documentationpart:import, DocumentationPart

    • ids (list) --

      A list of the returned documentation part identifiers.

      • (string) --

    • warnings (list) --

      A list of warning messages reported during import of documentation parts.

      • (string) --

DeleteDocumentationVersion (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.delete_documentation_version(
    restApiId='string',
    documentationVersion='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

[Required] The identifier of an API of a to-be-deleted documentation snapshot.

type documentationVersion:

string

param documentationVersion:

[REQUIRED]

[Required] The version identifier of a to-be-deleted documentation snapshot.

returns:

None

GetDocumentationParts (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.get_documentation_parts(
    restApiId='string',
    type='API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY',
    nameQuery='string',
    path='string',
    position='string',
    limit=123
)
type restApiId:

string

param restApiId:

[REQUIRED]

[Required] The identifier of the API of the to-be-retrieved documentation parts.

type type:

string

param type:

The type of API entities of the to-be-retrieved documentation parts.

type nameQuery:

string

param nameQuery:

The name of API entities of the to-be-retrieved documentation parts.

type path:

string

param path:

The path of API entities of the to-be-retrieved documentation parts.

type position:

string

param position:

The position of the to-be-retrieved documentation part in the DocumentationParts collection.

type limit:

integer

param limit:

The size of the paged results.

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'id': 'string',
            'location': {
                'type': 'API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY',
                'path': 'string',
                'method': 'string',
                'statusCode': 'string',
                'name': 'string'
            },
            'properties': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    The collection of documentation parts of an API.

    Documenting an API, DocumentationPart

    • position (string) --

    • items (list) --

      The current page of DocumentationPart resources in the DocumentationParts collection.

      • (dict) --

        A documentation part for a targeted API entity.

        A documentation part consists of a content map ( properties) and a target ( location). The target specifies an API entity to which the documentation content applies. The supported API entity types are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Valid location fields depend on the API entity type. All valid fields are not required.

        The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the Swagger-compliant documentation fields will be injected into the associated API entity definition in the exported Swagger definition file.

        Documenting an API, DocumentationParts

        • id (string) --

          The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.

        • location (dict) --

          The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.

          • type (string) --

            The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, MODEL, or RESOURCE type.

          • path (string) --

            The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.

          • method (string) --

            The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.

          • statusCode (string) --

            The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.

          • name (string) --

            The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.

        • properties (string) --

          A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.

CreateDocumentationVersion (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.create_documentation_version(
    restApiId='string',
    documentationVersion='string',
    stageName='string',
    description='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

[Required] Specifies the API identifier of the to-be-created documentation version.

type documentationVersion:

string

param documentationVersion:

[REQUIRED]

[Required] The version identifier of the new snapshot.

type stageName:

string

param stageName:

The stage name to be associated with the new documentation snapshot.

type description:

string

param description:

A description about the new documentation snapshot.

rtype:

dict

returns:

Response Syntax

{
    'version': 'string',
    'createdDate': datetime(2015, 1, 1),
    'description': 'string'
}

Response Structure

  • (dict) --

    A snapshot of the documentation of an API.

    Publishing API documentation involves creating a documentation version associated with an API stage and exporting the versioned documentation to an external (e.g., Swagger) file.

    Documenting an API, DocumentationPart, DocumentationVersions

    • version (string) --

      The version identifier of the API documentation snapshot.

    • createdDate (datetime) --

      The date when the API documentation snapshot is created.

    • description (string) --

      The description of the API documentation snapshot.

GetDocumentationVersions (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.get_documentation_versions(
    restApiId='string',
    position='string',
    limit=123
)
type restApiId:

string

param restApiId:

[REQUIRED]

[Required] The identifier of an API of the to-be-retrieved documentation versions.

type position:

string

param position:

The position of the returned DocumentationVersion in the DocumentationVersions collection.

type limit:

integer

param limit:

The page size of the returned documentation versions.

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'version': 'string',
            'createdDate': datetime(2015, 1, 1),
            'description': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    The collection of documentation snapshots of an API.

    Use the DocumentationVersions to manage documentation snapshots associated with various API stages.

    Documenting an API, DocumentationPart, DocumentationVersion

    • position (string) --

    • items (list) --

      The current page of DocumentationVersion items from the DocumentationVersions collection of an API.

      • (dict) --

        A snapshot of the documentation of an API.

        Publishing API documentation involves creating a documentation version associated with an API stage and exporting the versioned documentation to an external (e.g., Swagger) file.

        Documenting an API, DocumentationPart, DocumentationVersions

        • version (string) --

          The version identifier of the API documentation snapshot.

        • createdDate (datetime) --

          The date when the API documentation snapshot is created.

        • description (string) --

          The description of the API documentation snapshot.

CreateDocumentationPart (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.create_documentation_part(
    restApiId='string',
    location={
        'type': 'API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY',
        'path': 'string',
        'method': 'string',
        'statusCode': 'string',
        'name': 'string'
    },
    properties='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

[Required] The identifier of an API of the to-be-created documentation part.

type location:

dict

param location:

[REQUIRED]

[Required] The location of the targeted API entity of the to-be-created documentation part.

  • type (string) -- [REQUIRED]

    The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, MODEL, or RESOURCE type.

  • path (string) --

    The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.

  • method (string) --

    The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.

  • statusCode (string) --

    The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.

  • name (string) --

    The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.

type properties:

string

param properties:

[REQUIRED]

[Required] The new documentation content map of the targeted API entity. Enclosed key-value pairs are API-specific, but only Swagger-compliant key-value pairs can be exported and, hence, published.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'location': {
        'type': 'API'|'AUTHORIZER'|'MODEL'|'RESOURCE'|'METHOD'|'PATH_PARAMETER'|'QUERY_PARAMETER'|'REQUEST_HEADER'|'REQUEST_BODY'|'RESPONSE'|'RESPONSE_HEADER'|'RESPONSE_BODY',
        'path': 'string',
        'method': 'string',
        'statusCode': 'string',
        'name': 'string'
    },
    'properties': 'string'
}

Response Structure

  • (dict) --

    A documentation part for a targeted API entity.

    A documentation part consists of a content map ( properties) and a target ( location). The target specifies an API entity to which the documentation content applies. The supported API entity types are API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Valid location fields depend on the API entity type. All valid fields are not required.

    The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the Swagger-compliant documentation fields will be injected into the associated API entity definition in the exported Swagger definition file.

    Documenting an API, DocumentationParts

    • id (string) --

      The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.

    • location (dict) --

      The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.

      • type (string) --

        The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, MODEL, or RESOURCE type.

      • path (string) --

        The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.

      • method (string) --

        The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.

      • statusCode (string) --

        The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.

      • name (string) --

        The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.

    • properties (string) --

      A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.

CreateApiKey (updated) Link ¶
Changes (both)
{'customerId': 'string'}

Create an ApiKey resource.

AWS CLI

See also: AWS API Documentation

Request Syntax

client.create_api_key(
    name='string',
    description='string',
    enabled=True|False,
    generateDistinctId=True|False,
    value='string',
    stageKeys=[
        {
            'restApiId': 'string',
            'stageName': 'string'
        },
    ],
    customerId='string'
)
type name:

string

param name:

The name of the ApiKey.

type description:

string

param description:

The description of the ApiKey.

type enabled:

boolean

param enabled:

Specifies whether the ApiKey can be used by callers.

type generateDistinctId:

boolean

param generateDistinctId:

Specifies whether ( true) or not ( false) the key identifier is distinct from the created API key value.

type value:

string

param value:

Specifies a value of the API key.

type stageKeys:

list

param stageKeys:

DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.

  • (dict) --

    A reference to a unique stage identified in the format {restApiId}/{stage}.

    • restApiId (string) --

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

    • stageName (string) --

      The stage name in the RestApi that the stage key references.

type customerId:

string

param customerId:

An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace.

rtype:

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',
    ]
}

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.

    Use API Keys

    • 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 AWS Marketplace customer identifier , when integrating with the AWS 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 date when the API Key was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      When the API Key was last updated, in ISO 8601 format.

    • stageKeys (list) --

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

      • (string) --

CreateRestApi (updated) Link ¶
Changes (both)
{'version': 'string'}

Creates a new RestApi resource.

See also: AWS API Documentation

Request Syntax

client.create_rest_api(
    name='string',
    description='string',
    version='string',
    cloneFrom='string',
    binaryMediaTypes=[
        'string',
    ]
)
type name:

string

param name:

[REQUIRED]

The name of the RestApi.

type description:

string

param description:

The description of the RestApi.

type version:

string

param version:

A version identifier for the API.

type cloneFrom:

string

param cloneFrom:

The ID of the RestApi that you want to clone from.

type binaryMediaTypes:

list

param binaryMediaTypes:

The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'version': 'string',
    'warnings': [
        'string',
    ],
    'binaryMediaTypes': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Represents a REST API.

    Create an API

    • id (string) --

      The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The date when the API was created, in ISO 8601 format.

    • version (string) --

      A version identifier for the API.

    • warnings (list) --

      The warning messages reported when failonwarnings is turned on during API import.

      • (string) --

    • binaryMediaTypes (list) --

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

      • (string) --

CreateStage (updated) Link ¶
Changes (both)
{'documentationVersion': 'string'}

Creates a new Stage resource that references a pre-existing Deployment for the API.

See also: AWS API Documentation

Request Syntax

client.create_stage(
    restApiId='string',
    stageName='string',
    deploymentId='string',
    description='string',
    cacheClusterEnabled=True|False,
    cacheClusterSize='0.5'|'1.6'|'6.1'|'13.5'|'28.4'|'58.2'|'118'|'237',
    variables={
        'string': 'string'
    },
    documentationVersion='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource for the Stage resource to create.

type stageName:

string

param stageName:

[REQUIRED]

The name for the Stage resource.

type deploymentId:

string

param deploymentId:

[REQUIRED]

The identifier of the Deployment resource for the Stage resource.

type description:

string

param description:

The description of the Stage resource.

type cacheClusterEnabled:

boolean

param cacheClusterEnabled:

Whether cache clustering is enabled for the stage.

type cacheClusterSize:

string

param cacheClusterSize:

The stage's cache cluster size.

type variables:

dict

param variables:

A map that defines the stage variables for the new Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

  • (string) --

    • (string) --

type documentationVersion:

string

param documentationVersion:

The version of the associated API documentation.

rtype:

dict

returns:

Response Syntax

{
    'deploymentId': 'string',
    'clientCertificateId': 'string',
    'stageName': 'string',
    'description': 'string',
    'cacheClusterEnabled': True|False,
    'cacheClusterSize': '0.5'|'1.6'|'6.1'|'13.5'|'28.4'|'58.2'|'118'|'237',
    'cacheClusterStatus': 'CREATE_IN_PROGRESS'|'AVAILABLE'|'DELETE_IN_PROGRESS'|'NOT_AVAILABLE'|'FLUSH_IN_PROGRESS',
    'methodSettings': {
        'string': {
            'metricsEnabled': True|False,
            'loggingLevel': 'string',
            'dataTraceEnabled': True|False,
            'throttlingBurstLimit': 123,
            'throttlingRateLimit': 123.0,
            'cachingEnabled': True|False,
            'cacheTtlInSeconds': 123,
            'cacheDataEncrypted': True|False,
            'requireAuthorizationForCacheControl': True|False,
            'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER'
        }
    },
    'variables': {
        'string': 'string'
    },
    'documentationVersion': 'string',
    'createdDate': datetime(2015, 1, 1),
    'lastUpdatedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    Represents a unique identifier for a version of a deployed RestApi that is callable by users.

    Deploy an API

    • deploymentId (string) --

      The identifier of the Deployment that the stage points to.

    • clientCertificateId (string) --

      The identifier of a client certificate for an API stage.

    • stageName (string) --

      The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

    • description (string) --

      The stage's description.

    • cacheClusterEnabled (boolean) --

      Specifies whether a cache cluster is enabled for the stage.

    • cacheClusterSize (string) --

      The size of the cache cluster for the stage, if enabled.

    • cacheClusterStatus (string) --

      The status of the cache cluster for the stage, if enabled.

    • methodSettings (dict) --

      A map that defines the method settings for a Stage resource. Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\*/\* for overriding all methods in the stage.

      • (string) --

        • (dict) --

          Specifies the method setting properties.

          • metricsEnabled (boolean) --

            Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

          • loggingLevel (string) --

            Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

          • dataTraceEnabled (boolean) --

            Specifies whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

          • throttlingBurstLimit (integer) --

            Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

          • throttlingRateLimit (float) --

            Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

          • cachingEnabled (boolean) --

            Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

          • cacheTtlInSeconds (integer) --

            Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

          • cacheDataEncrypted (boolean) --

            Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

          • requireAuthorizationForCacheControl (boolean) --

            Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

          • unauthorizedCacheControlHeaderStrategy (string) --

            Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

    • variables (dict) --

      A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

      • (string) --

        • (string) --

    • documentationVersion (string) --

      The version of the associated API documentation.

    • createdDate (datetime) --

      The date and time that the stage was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      The date and time that information about the stage was last updated, in ISO 8601 format.

CreateUsagePlan (updated) Link ¶
Changes (response)
{'productCode': 'string'}

Creates a usage plan with the throttle and quota limits, as well as the associated API stages, specified in the payload.

See also: AWS API Documentation

Request Syntax

client.create_usage_plan(
    name='string',
    description='string',
    apiStages=[
        {
            'apiId': 'string',
            'stage': 'string'
        },
    ],
    throttle={
        'burstLimit': 123,
        'rateLimit': 123.0
    },
    quota={
        'limit': 123,
        'offset': 123,
        'period': 'DAY'|'WEEK'|'MONTH'
    }
)
type name:

string

param name:

[REQUIRED]

The name of the usage plan.

type description:

string

param description:

The description of the usage plan.

type apiStages:

list

param apiStages:

The associated API stages of the usage plan.

  • (dict) --

    API stage name of the associated API stage in a usage plan.

    • apiId (string) --

      API Id of the associated API stage in a usage plan.

    • stage (string) --

      API stage name of the associated API stage in a usage plan.

type throttle:

dict

param throttle:

The throttling limits of the usage plan.

  • burstLimit (integer) --

    The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

  • rateLimit (float) --

    The API request steady-state rate limit.

type quota:

dict

param quota:

The quota of the usage plan.

  • limit (integer) --

    The maximum number of requests that can be made in a given time period.

  • offset (integer) --

    The number of requests subtracted from the given limit in the initial time period.

  • period (string) --

    The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'apiStages': [
        {
            'apiId': 'string',
            'stage': 'string'
        },
    ],
    'throttle': {
        'burstLimit': 123,
        'rateLimit': 123.0
    },
    'quota': {
        'limit': 123,
        'offset': 123,
        'period': 'DAY'|'WEEK'|'MONTH'
    },
    'productCode': 'string'
}

Response Structure

  • (dict) --

    Represents a usage plan than can specify who can assess associated API stages with specified request limits and quotas.

    In a usage plan, you associate an API by specifying the API's Id and a stage name of the specified API. You add plan customers by adding API keys to the plan.

    Create and Use Usage Plans

    • id (string) --

      The identifier of a UsagePlan resource.

    • name (string) --

      The name of a usage plan.

    • description (string) --

      The description of a usage plan.

    • apiStages (list) --

      The associated API stages of a usage plan.

      • (dict) --

        API stage name of the associated API stage in a usage plan.

        • apiId (string) --

          API Id of the associated API stage in a usage plan.

        • stage (string) --

          API stage name of the associated API stage in a usage plan.

    • throttle (dict) --

      The request throttle limits of a usage plan.

      • burstLimit (integer) --

        The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

      • rateLimit (float) --

        The API request steady-state rate limit.

    • quota (dict) --

      The maximum number of permitted requests per a given unit time interval.

      • limit (integer) --

        The maximum number of requests that can be made in a given time period.

      • offset (integer) --

        The number of requests subtracted from the given limit in the initial time period.

      • period (string) --

        The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

    • productCode (string) --

      The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

GetApiKey (updated) Link ¶
Changes (response)
{'customerId': 'string'}

Gets information about the current ApiKey resource.

See also: AWS API Documentation

Request Syntax

client.get_api_key(
    apiKey='string',
    includeValue=True|False
)
type apiKey:

string

param apiKey:

[REQUIRED]

The identifier of the ApiKey resource.

type includeValue:

boolean

param includeValue:

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

rtype:

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',
    ]
}

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.

    Use API Keys

    • 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 AWS Marketplace customer identifier , when integrating with the AWS 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 date when the API Key was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      When the API Key was last updated, in ISO 8601 format.

    • stageKeys (list) --

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

      • (string) --

GetApiKeys (updated) Link ¶
Changes (response)
{'items': {'customerId': 'string'}}

Gets information about the current ApiKeys resource.

See also: AWS API Documentation

Request Syntax

client.get_api_keys(
    position='string',
    limit=123,
    nameQuery='string',
    customerId='string',
    includeValues=True|False
)
type position:

string

param position:

The position of the current ApiKeys resource to get information about.

type limit:

integer

param limit:

The maximum number of ApiKeys to get information about.

type nameQuery:

string

param nameQuery:

The name of queried API keys.

type customerId:

string

param customerId:

The identifier of a customer in AWS Marketplace or an external system, such as a developer portal.

type includeValues:

boolean

param includeValues:

A boolean flag to specify whether ( true) or not ( false) the result contains key values.

rtype:

dict

returns:

Response Syntax

{
    'warnings': [
        'string',
    ],
    'position': 'string',
    'items': [
        {
            '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',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    Represents a collection of API keys as represented by an ApiKeys resource.

    Use API Keys

    • warnings (list) --

      A list of warning messages logged during the import of API keys when the failOnWarnings option is set to true.

      • (string) --

    • position (string) --

    • items (list) --

      The current page of any ApiKey resources in the collection of ApiKey resources.

      • (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.

        Use API Keys

        • 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 AWS Marketplace customer identifier , when integrating with the AWS 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 date when the API Key was created, in ISO 8601 format.

        • lastUpdatedDate (datetime) --

          When the API Key was last updated, in ISO 8601 format.

        • stageKeys (list) --

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

          • (string) --

GetRestApi (updated) Link ¶
Changes (response)
{'version': 'string'}

Lists the RestApi resource in the collection.

See also: AWS API Documentation

Request Syntax

client.get_rest_api(
    restApiId='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'version': 'string',
    'warnings': [
        'string',
    ],
    'binaryMediaTypes': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Represents a REST API.

    Create an API

    • id (string) --

      The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The date when the API was created, in ISO 8601 format.

    • version (string) --

      A version identifier for the API.

    • warnings (list) --

      The warning messages reported when failonwarnings is turned on during API import.

      • (string) --

    • binaryMediaTypes (list) --

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

      • (string) --

GetRestApis (updated) Link ¶
Changes (response)
{'items': {'version': 'string'}}

Lists the RestApis resources for your collection.

See also: AWS API Documentation

Request Syntax

client.get_rest_apis(
    position='string',
    limit=123
)
type position:

string

param position:

The position of the current RestApis resource in the collection to get information about.

type limit:

integer

param limit:

The maximum number of RestApi resources in the collection to get information about. The default limit is 25. It should be an integer between 1 - 500.

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'description': 'string',
            'createdDate': datetime(2015, 1, 1),
            'version': 'string',
            'warnings': [
                'string',
            ],
            'binaryMediaTypes': [
                'string',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    Contains references to your APIs and links that guide you in how to interact with your collection. A collection offers a paginated view of your APIs.

    Create an API

    • position (string) --

    • items (list) --

      An array of links to the current page of RestApi resources.

      • (dict) --

        Represents a REST API.

        Create an API

        • id (string) --

          The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

        • name (string) --

          The API's name.

        • description (string) --

          The API's description.

        • createdDate (datetime) --

          The date when the API was created, in ISO 8601 format.

        • version (string) --

          A version identifier for the API.

        • warnings (list) --

          The warning messages reported when failonwarnings is turned on during API import.

          • (string) --

        • binaryMediaTypes (list) --

          The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

          • (string) --

GetStage (updated) Link ¶
Changes (response)
{'documentationVersion': 'string'}

Gets information about a Stage resource.

See also: AWS API Documentation

Request Syntax

client.get_stage(
    restApiId='string',
    stageName='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource for the Stage resource to get information about.

type stageName:

string

param stageName:

[REQUIRED]

The name of the Stage resource to get information about.

rtype:

dict

returns:

Response Syntax

{
    'deploymentId': 'string',
    'clientCertificateId': 'string',
    'stageName': 'string',
    'description': 'string',
    'cacheClusterEnabled': True|False,
    'cacheClusterSize': '0.5'|'1.6'|'6.1'|'13.5'|'28.4'|'58.2'|'118'|'237',
    'cacheClusterStatus': 'CREATE_IN_PROGRESS'|'AVAILABLE'|'DELETE_IN_PROGRESS'|'NOT_AVAILABLE'|'FLUSH_IN_PROGRESS',
    'methodSettings': {
        'string': {
            'metricsEnabled': True|False,
            'loggingLevel': 'string',
            'dataTraceEnabled': True|False,
            'throttlingBurstLimit': 123,
            'throttlingRateLimit': 123.0,
            'cachingEnabled': True|False,
            'cacheTtlInSeconds': 123,
            'cacheDataEncrypted': True|False,
            'requireAuthorizationForCacheControl': True|False,
            'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER'
        }
    },
    'variables': {
        'string': 'string'
    },
    'documentationVersion': 'string',
    'createdDate': datetime(2015, 1, 1),
    'lastUpdatedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    Represents a unique identifier for a version of a deployed RestApi that is callable by users.

    Deploy an API

    • deploymentId (string) --

      The identifier of the Deployment that the stage points to.

    • clientCertificateId (string) --

      The identifier of a client certificate for an API stage.

    • stageName (string) --

      The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

    • description (string) --

      The stage's description.

    • cacheClusterEnabled (boolean) --

      Specifies whether a cache cluster is enabled for the stage.

    • cacheClusterSize (string) --

      The size of the cache cluster for the stage, if enabled.

    • cacheClusterStatus (string) --

      The status of the cache cluster for the stage, if enabled.

    • methodSettings (dict) --

      A map that defines the method settings for a Stage resource. Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\*/\* for overriding all methods in the stage.

      • (string) --

        • (dict) --

          Specifies the method setting properties.

          • metricsEnabled (boolean) --

            Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

          • loggingLevel (string) --

            Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

          • dataTraceEnabled (boolean) --

            Specifies whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

          • throttlingBurstLimit (integer) --

            Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

          • throttlingRateLimit (float) --

            Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

          • cachingEnabled (boolean) --

            Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

          • cacheTtlInSeconds (integer) --

            Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

          • cacheDataEncrypted (boolean) --

            Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

          • requireAuthorizationForCacheControl (boolean) --

            Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

          • unauthorizedCacheControlHeaderStrategy (string) --

            Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

    • variables (dict) --

      A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

      • (string) --

        • (string) --

    • documentationVersion (string) --

      The version of the associated API documentation.

    • createdDate (datetime) --

      The date and time that the stage was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      The date and time that information about the stage was last updated, in ISO 8601 format.

GetStages (updated) Link ¶
Changes (response)
{'item': {'documentationVersion': 'string'}}

Gets information about one or more Stage resources.

See also: AWS API Documentation

Request Syntax

client.get_stages(
    restApiId='string',
    deploymentId='string'
)
type restApiId:

string

param restApiId:

[REQUIRED]

The stages' API identifiers.

type deploymentId:

string

param deploymentId:

The stages' deployment identifiers.

rtype:

dict

returns:

Response Syntax

{
    'item': [
        {
            'deploymentId': 'string',
            'clientCertificateId': 'string',
            'stageName': 'string',
            'description': 'string',
            'cacheClusterEnabled': True|False,
            'cacheClusterSize': '0.5'|'1.6'|'6.1'|'13.5'|'28.4'|'58.2'|'118'|'237',
            'cacheClusterStatus': 'CREATE_IN_PROGRESS'|'AVAILABLE'|'DELETE_IN_PROGRESS'|'NOT_AVAILABLE'|'FLUSH_IN_PROGRESS',
            'methodSettings': {
                'string': {
                    'metricsEnabled': True|False,
                    'loggingLevel': 'string',
                    'dataTraceEnabled': True|False,
                    'throttlingBurstLimit': 123,
                    'throttlingRateLimit': 123.0,
                    'cachingEnabled': True|False,
                    'cacheTtlInSeconds': 123,
                    'cacheDataEncrypted': True|False,
                    'requireAuthorizationForCacheControl': True|False,
                    'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER'
                }
            },
            'variables': {
                'string': 'string'
            },
            'documentationVersion': 'string',
            'createdDate': datetime(2015, 1, 1),
            'lastUpdatedDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

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

    Deploying API in Stages

    • item (list) --

      An individual Stage resource.

      • (dict) --

        Represents a unique identifier for a version of a deployed RestApi that is callable by users.

        Deploy an API

        • deploymentId (string) --

          The identifier of the Deployment that the stage points to.

        • clientCertificateId (string) --

          The identifier of a client certificate for an API stage.

        • stageName (string) --

          The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

        • description (string) --

          The stage's description.

        • cacheClusterEnabled (boolean) --

          Specifies whether a cache cluster is enabled for the stage.

        • cacheClusterSize (string) --

          The size of the cache cluster for the stage, if enabled.

        • cacheClusterStatus (string) --

          The status of the cache cluster for the stage, if enabled.

        • methodSettings (dict) --

          A map that defines the method settings for a Stage resource. Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\*/\* for overriding all methods in the stage.

          • (string) --

            • (dict) --

              Specifies the method setting properties.

              • metricsEnabled (boolean) --

                Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

              • loggingLevel (string) --

                Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

              • dataTraceEnabled (boolean) --

                Specifies whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

              • throttlingBurstLimit (integer) --

                Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

              • throttlingRateLimit (float) --

                Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

              • cachingEnabled (boolean) --

                Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

              • cacheTtlInSeconds (integer) --

                Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

              • cacheDataEncrypted (boolean) --

                Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

              • requireAuthorizationForCacheControl (boolean) --

                Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

              • unauthorizedCacheControlHeaderStrategy (string) --

                Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

        • variables (dict) --

          A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

          • (string) --

            • (string) --

        • documentationVersion (string) --

          The version of the associated API documentation.

        • createdDate (datetime) --

          The date and time that the stage was created, in ISO 8601 format.

        • lastUpdatedDate (datetime) --

          The date and time that information about the stage was last updated, in ISO 8601 format.

GetUsagePlan (updated) Link ¶
Changes (response)
{'productCode': 'string'}

Gets a usage plan of a given plan identifier.

See also: AWS API Documentation

Request Syntax

client.get_usage_plan(
    usagePlanId='string'
)
type usagePlanId:

string

param usagePlanId:

[REQUIRED]

The identifier of the UsagePlan resource to be retrieved.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'apiStages': [
        {
            'apiId': 'string',
            'stage': 'string'
        },
    ],
    'throttle': {
        'burstLimit': 123,
        'rateLimit': 123.0
    },
    'quota': {
        'limit': 123,
        'offset': 123,
        'period': 'DAY'|'WEEK'|'MONTH'
    },
    'productCode': 'string'
}

Response Structure

  • (dict) --

    Represents a usage plan than can specify who can assess associated API stages with specified request limits and quotas.

    In a usage plan, you associate an API by specifying the API's Id and a stage name of the specified API. You add plan customers by adding API keys to the plan.

    Create and Use Usage Plans

    • id (string) --

      The identifier of a UsagePlan resource.

    • name (string) --

      The name of a usage plan.

    • description (string) --

      The description of a usage plan.

    • apiStages (list) --

      The associated API stages of a usage plan.

      • (dict) --

        API stage name of the associated API stage in a usage plan.

        • apiId (string) --

          API Id of the associated API stage in a usage plan.

        • stage (string) --

          API stage name of the associated API stage in a usage plan.

    • throttle (dict) --

      The request throttle limits of a usage plan.

      • burstLimit (integer) --

        The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

      • rateLimit (float) --

        The API request steady-state rate limit.

    • quota (dict) --

      The maximum number of permitted requests per a given unit time interval.

      • limit (integer) --

        The maximum number of requests that can be made in a given time period.

      • offset (integer) --

        The number of requests subtracted from the given limit in the initial time period.

      • period (string) --

        The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

    • productCode (string) --

      The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

GetUsagePlans (updated) Link ¶
Changes (response)
{'items': {'productCode': 'string'}}

Gets all the usage plans of the caller's account.

See also: AWS API Documentation

Request Syntax

client.get_usage_plans(
    position='string',
    keyId='string',
    limit=123
)
type position:

string

param position:

The zero-based array index specifying the position of the to-be-retrieved UsagePlan resource.

type keyId:

string

param keyId:

The identifier of the API key associated with the usage plans.

type limit:

integer

param limit:

The number of UsagePlan resources to be returned as the result.

rtype:

dict

returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'description': 'string',
            'apiStages': [
                {
                    'apiId': 'string',
                    'stage': 'string'
                },
            ],
            'throttle': {
                'burstLimit': 123,
                'rateLimit': 123.0
            },
            'quota': {
                'limit': 123,
                'offset': 123,
                'period': 'DAY'|'WEEK'|'MONTH'
            },
            'productCode': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents a collection of usage plans for an AWS account.

    Create and Use Usage Plans

    • position (string) --

    • items (list) --

      Gets the current item when enumerating the collection of UsagePlan.

      • (dict) --

        Represents a usage plan than can specify who can assess associated API stages with specified request limits and quotas.

        In a usage plan, you associate an API by specifying the API's Id and a stage name of the specified API. You add plan customers by adding API keys to the plan.

        Create and Use Usage Plans

        • id (string) --

          The identifier of a UsagePlan resource.

        • name (string) --

          The name of a usage plan.

        • description (string) --

          The description of a usage plan.

        • apiStages (list) --

          The associated API stages of a usage plan.

          • (dict) --

            API stage name of the associated API stage in a usage plan.

            • apiId (string) --

              API Id of the associated API stage in a usage plan.

            • stage (string) --

              API stage name of the associated API stage in a usage plan.

        • throttle (dict) --

          The request throttle limits of a usage plan.

          • burstLimit (integer) --

            The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

          • rateLimit (float) --

            The API request steady-state rate limit.

        • quota (dict) --

          The maximum number of permitted requests per a given unit time interval.

          • limit (integer) --

            The maximum number of requests that can be made in a given time period.

          • offset (integer) --

            The number of requests subtracted from the given limit in the initial time period.

          • period (string) --

            The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

        • productCode (string) --

          The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

ImportRestApi (updated) Link ¶
Changes (response)
{'version': 'string'}

A feature of the Amazon API Gateway control service for creating a new API from an external API definition file.

See also: AWS API Documentation

Request Syntax

client.import_rest_api(
    failOnWarnings=True|False,
    parameters={
        'string': 'string'
    },
    body=b'bytes'|file
)
type failOnWarnings:

boolean

param failOnWarnings:

A query parameter to indicate whether to rollback the API creation ( true) or not ( false) when a warning is encountered. The default value is false.

type parameters:

dict

param parameters:

Custom header parameters as part of the request.

  • (string) --

    • (string) --

type body:

bytes or seekable file-like object

param body:

[REQUIRED]

The POST request body containing external API definitions. Currently, only Swagger definition JSON files are supported.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'version': 'string',
    'warnings': [
        'string',
    ],
    'binaryMediaTypes': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Represents a REST API.

    Create an API

    • id (string) --

      The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The date when the API was created, in ISO 8601 format.

    • version (string) --

      A version identifier for the API.

    • warnings (list) --

      The warning messages reported when failonwarnings is turned on during API import.

      • (string) --

    • binaryMediaTypes (list) --

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

      • (string) --

PutRestApi (updated) Link ¶
Changes (response)
{'version': 'string'}

A feature of the Amazon API Gateway control service for updating an existing API with an input of external API definitions. The update can take the form of merging the supplied definition into the existing API or overwriting the existing API.

See also: AWS API Documentation

Request Syntax

client.put_rest_api(
    restApiId='string',
    mode='merge'|'overwrite',
    failOnWarnings=True|False,
    parameters={
        'string': 'string'
    },
    body=b'bytes'|file
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi to be updated.

type mode:

string

param mode:

The mode query parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".

type failOnWarnings:

boolean

param failOnWarnings:

A query parameter to indicate whether to rollback the API update ( true) or not ( false) when a warning is encountered. The default value is false.

type parameters:

dict

param parameters:

Custom headers supplied as part of the request.

  • (string) --

    • (string) --

type body:

bytes or seekable file-like object

param body:

[REQUIRED]

The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'version': 'string',
    'warnings': [
        'string',
    ],
    'binaryMediaTypes': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Represents a REST API.

    Create an API

    • id (string) --

      The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The date when the API was created, in ISO 8601 format.

    • version (string) --

      A version identifier for the API.

    • warnings (list) --

      The warning messages reported when failonwarnings is turned on during API import.

      • (string) --

    • binaryMediaTypes (list) --

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

      • (string) --

UpdateApiKey (updated) Link ¶
Changes (response)
{'customerId': 'string'}

Changes information about an ApiKey resource.

See also: AWS API Documentation

Request Syntax

client.update_api_key(
    apiKey='string',
    patchOperations=[
        {
            'op': 'add'|'remove'|'replace'|'move'|'copy'|'test',
            'path': 'string',
            'value': 'string',
            'from': 'string'
        },
    ]
)
type apiKey:

string

param apiKey:

[REQUIRED]

The identifier of the ApiKey resource to be updated.

type patchOperations:

list

param patchOperations:

A list of update operations to be applied to the specified resource and in the order specified in this list.

  • (dict) -- A single patch operation to apply to the specified resource. Please refer to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used.

    • op (string) --

      An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

    • path (string) --

      The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

    • value (string) --

      The new target value of the update operation.

    • from (string) --

      Not supported.

rtype:

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',
    ]
}

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.

    Use API Keys

    • 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 AWS Marketplace customer identifier , when integrating with the AWS 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 date when the API Key was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      When the API Key was last updated, in ISO 8601 format.

    • stageKeys (list) --

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

      • (string) --

UpdateRestApi (updated) Link ¶
Changes (response)
{'version': 'string'}

Changes information about the specified API.

See also: AWS API Documentation

Request Syntax

client.update_rest_api(
    restApiId='string',
    patchOperations=[
        {
            'op': 'add'|'remove'|'replace'|'move'|'copy'|'test',
            'path': 'string',
            'value': 'string',
            'from': 'string'
        },
    ]
)
type restApiId:

string

param restApiId:

[REQUIRED]

The ID of the RestApi you want to update.

type patchOperations:

list

param patchOperations:

A list of update operations to be applied to the specified resource and in the order specified in this list.

  • (dict) -- A single patch operation to apply to the specified resource. Please refer to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used.

    • op (string) --

      An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

    • path (string) --

      The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

    • value (string) --

      The new target value of the update operation.

    • from (string) --

      Not supported.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'createdDate': datetime(2015, 1, 1),
    'version': 'string',
    'warnings': [
        'string',
    ],
    'binaryMediaTypes': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Represents a REST API.

    Create an API

    • id (string) --

      The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

    • name (string) --

      The API's name.

    • description (string) --

      The API's description.

    • createdDate (datetime) --

      The date when the API was created, in ISO 8601 format.

    • version (string) --

      A version identifier for the API.

    • warnings (list) --

      The warning messages reported when failonwarnings is turned on during API import.

      • (string) --

    • binaryMediaTypes (list) --

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

      • (string) --

UpdateStage (updated) Link ¶
Changes (response)
{'documentationVersion': 'string'}

Changes information about a Stage resource.

See also: AWS API Documentation

Request Syntax

client.update_stage(
    restApiId='string',
    stageName='string',
    patchOperations=[
        {
            'op': 'add'|'remove'|'replace'|'move'|'copy'|'test',
            'path': 'string',
            'value': 'string',
            'from': 'string'
        },
    ]
)
type restApiId:

string

param restApiId:

[REQUIRED]

The identifier of the RestApi resource for the Stage resource to change information about.

type stageName:

string

param stageName:

[REQUIRED]

The name of the Stage resource to change information about.

type patchOperations:

list

param patchOperations:

A list of update operations to be applied to the specified resource and in the order specified in this list.

  • (dict) -- A single patch operation to apply to the specified resource. Please refer to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used.

    • op (string) --

      An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

    • path (string) --

      The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

    • value (string) --

      The new target value of the update operation.

    • from (string) --

      Not supported.

rtype:

dict

returns:

Response Syntax

{
    'deploymentId': 'string',
    'clientCertificateId': 'string',
    'stageName': 'string',
    'description': 'string',
    'cacheClusterEnabled': True|False,
    'cacheClusterSize': '0.5'|'1.6'|'6.1'|'13.5'|'28.4'|'58.2'|'118'|'237',
    'cacheClusterStatus': 'CREATE_IN_PROGRESS'|'AVAILABLE'|'DELETE_IN_PROGRESS'|'NOT_AVAILABLE'|'FLUSH_IN_PROGRESS',
    'methodSettings': {
        'string': {
            'metricsEnabled': True|False,
            'loggingLevel': 'string',
            'dataTraceEnabled': True|False,
            'throttlingBurstLimit': 123,
            'throttlingRateLimit': 123.0,
            'cachingEnabled': True|False,
            'cacheTtlInSeconds': 123,
            'cacheDataEncrypted': True|False,
            'requireAuthorizationForCacheControl': True|False,
            'unauthorizedCacheControlHeaderStrategy': 'FAIL_WITH_403'|'SUCCEED_WITH_RESPONSE_HEADER'|'SUCCEED_WITHOUT_RESPONSE_HEADER'
        }
    },
    'variables': {
        'string': 'string'
    },
    'documentationVersion': 'string',
    'createdDate': datetime(2015, 1, 1),
    'lastUpdatedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    Represents a unique identifier for a version of a deployed RestApi that is callable by users.

    Deploy an API

    • deploymentId (string) --

      The identifier of the Deployment that the stage points to.

    • clientCertificateId (string) --

      The identifier of a client certificate for an API stage.

    • stageName (string) --

      The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

    • description (string) --

      The stage's description.

    • cacheClusterEnabled (boolean) --

      Specifies whether a cache cluster is enabled for the stage.

    • cacheClusterSize (string) --

      The size of the cache cluster for the stage, if enabled.

    • cacheClusterStatus (string) --

      The status of the cache cluster for the stage, if enabled.

    • methodSettings (dict) --

      A map that defines the method settings for a Stage resource. Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\*/\* for overriding all methods in the stage.

      • (string) --

        • (dict) --

          Specifies the method setting properties.

          • metricsEnabled (boolean) --

            Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

          • loggingLevel (string) --

            Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

          • dataTraceEnabled (boolean) --

            Specifies whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

          • throttlingBurstLimit (integer) --

            Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

          • throttlingRateLimit (float) --

            Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

          • cachingEnabled (boolean) --

            Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

          • cacheTtlInSeconds (integer) --

            Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

          • cacheDataEncrypted (boolean) --

            Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

          • requireAuthorizationForCacheControl (boolean) --

            Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

          • unauthorizedCacheControlHeaderStrategy (string) --

            Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

    • variables (dict) --

      A map that defines the stage variables for a Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

      • (string) --

        • (string) --

    • documentationVersion (string) --

      The version of the associated API documentation.

    • createdDate (datetime) --

      The date and time that the stage was created, in ISO 8601 format.

    • lastUpdatedDate (datetime) --

      The date and time that information about the stage was last updated, in ISO 8601 format.

UpdateUsagePlan (updated) Link ¶
Changes (response)
{'productCode': 'string'}

Updates a usage plan of a given plan Id.

See also: AWS API Documentation

Request Syntax

client.update_usage_plan(
    usagePlanId='string',
    patchOperations=[
        {
            'op': 'add'|'remove'|'replace'|'move'|'copy'|'test',
            'path': 'string',
            'value': 'string',
            'from': 'string'
        },
    ]
)
type usagePlanId:

string

param usagePlanId:

[REQUIRED]

The Id of the to-be-updated usage plan.

type patchOperations:

list

param patchOperations:

A list of update operations to be applied to the specified resource and in the order specified in this list.

  • (dict) -- A single patch operation to apply to the specified resource. Please refer to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each operation is used.

    • op (string) --

      An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

    • path (string) --

      The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

    • value (string) --

      The new target value of the update operation.

    • from (string) --

      Not supported.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'description': 'string',
    'apiStages': [
        {
            'apiId': 'string',
            'stage': 'string'
        },
    ],
    'throttle': {
        'burstLimit': 123,
        'rateLimit': 123.0
    },
    'quota': {
        'limit': 123,
        'offset': 123,
        'period': 'DAY'|'WEEK'|'MONTH'
    },
    'productCode': 'string'
}

Response Structure

  • (dict) --

    Represents a usage plan than can specify who can assess associated API stages with specified request limits and quotas.

    In a usage plan, you associate an API by specifying the API's Id and a stage name of the specified API. You add plan customers by adding API keys to the plan.

    Create and Use Usage Plans

    • id (string) --

      The identifier of a UsagePlan resource.

    • name (string) --

      The name of a usage plan.

    • description (string) --

      The description of a usage plan.

    • apiStages (list) --

      The associated API stages of a usage plan.

      • (dict) --

        API stage name of the associated API stage in a usage plan.

        • apiId (string) --

          API Id of the associated API stage in a usage plan.

        • stage (string) --

          API stage name of the associated API stage in a usage plan.

    • throttle (dict) --

      The request throttle limits of a usage plan.

      • burstLimit (integer) --

        The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

      • rateLimit (float) --

        The API request steady-state rate limit.

    • quota (dict) --

      The maximum number of permitted requests per a given unit time interval.

      • limit (integer) --

        The maximum number of requests that can be made in a given time period.

      • offset (integer) --

        The number of requests subtracted from the given limit in the initial time period.

      • period (string) --

        The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

    • productCode (string) --

      The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.