export_api

ApiGatewayV2.Client.export_api(**kwargs)

See also: AWS API Documentation

Request Syntax

response = client.export_api(
    ApiId='string',
    ExportVersion='string',
    IncludeExtensions=True|False,
    OutputType='YAML'|'JSON',
    Specification='OAS30',
    StageName='string'
)
Parameters
  • ApiId (string) --

    [REQUIRED]

    The API identifier.

  • ExportVersion (string) -- The version of the API Gateway export algorithm. API Gateway uses the latest version by default. Currently, the only supported version is 1.0.
  • IncludeExtensions (boolean) -- Specifies whether to include API Gateway extensions in the exported API definition. API Gateway extensions are included by default.
  • OutputType (string) --

    [REQUIRED]

    The output type of the exported definition file. Valid values are JSON and YAML.

  • Specification (string) --

    [REQUIRED]

    The version of the API specification to use. OAS30, for OpenAPI 3.0, is the only supported value.

  • StageName (string) -- The name of the API stage to export. If you don't specify this property, a representation of the latest API configuration is exported.
Return type

dict

Returns

Response Syntax

{
    'body': StreamingBody()
}

Response Structure

  • (dict) --

    Success

    • body (StreamingBody) --

      Represents an exported definition of an API in a particular output format, for example, YAML. The API is serialized to the requested specification, for example, OpenAPI 3.0.

Exceptions

  • ApiGatewayV2.Client.exceptions.NotFoundException
  • ApiGatewayV2.Client.exceptions.TooManyRequestsException
  • ApiGatewayV2.Client.exceptions.BadRequestException