Skip to content

get_export

Operation

get_export

get_export(request: GetExportInput | GetExportInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetExportInputDict]) -> GetExportOutput

Exports a deployed version of a RestApi in a specified format.

Parameters:

Name Type Description Default
request GetExportInput | GetExportInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[GetExportInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetExportOutput

An instance of GetExportOutput.

get_export async

get_export(request: GetExportInput | GetExportInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetExportInputDict]) -> GetExportOutput

Exports a deployed version of a RestApi in a specified format.

Parameters:

Name Type Description Default
request GetExportInput | GetExportInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[GetExportInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetExportOutput

An instance of GetExportOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

GetExportInputDict

Bases: TypedDict

Dictionary form of GetExportInput.

Attributes

accepts instance-attribute
accepts: str | None

The content-type of the export, for example application/json. Currently application/json and application/yaml are supported for exportType ofoas30 and swagger. This should be specified in the Accept header for direct API requests.

export_type instance-attribute
export_type: Required[str]

The type of export. Acceptable values are 'oas30' for OpenAPI 3.0.x and 'swagger' for Swagger/OpenAPI 2.0.

parameters instance-attribute
parameters: Mapping[str, str] | None

A key-value map of query string parameters that specify properties of the export, depending on the requested exportType. For exportType oas30 and swagger, any combination of the following parameters are supported: extensions='integrations' or extensions='apigateway' will export the API with x-amazon-apigateway-integration extensions. extensions='authorizers' will export the API with x-amazon-apigateway-authorizer extensions. postman will export the API with Postman extensions, allowing for import to the Postman tool

rest_api_id instance-attribute
rest_api_id: Required[str]

The string identifier of the associated RestApi.

stage_name instance-attribute
stage_name: Required[str]

The name of the Stage that will be exported.

GetExportInput dataclass

Bases: _SerdeShape

Request a new export of a RestApi for a particular Stage.

Attributes

accepts class-attribute instance-attribute
accepts: str | None = ...

The content-type of the export, for example application/json. Currently application/json and application/yaml are supported for exportType ofoas30 and swagger. This should be specified in the Accept header for direct API requests.

export_type class-attribute instance-attribute
export_type: str | None = ...

The type of export. Acceptable values are 'oas30' for OpenAPI 3.0.x and 'swagger' for Swagger/OpenAPI 2.0.

parameters class-attribute instance-attribute
parameters: dict[str, str] | None = ...

A key-value map of query string parameters that specify properties of the export, depending on the requested exportType. For exportType oas30 and swagger, any combination of the following parameters are supported: extensions='integrations' or extensions='apigateway' will export the API with x-amazon-apigateway-integration extensions. extensions='authorizers' will export the API with x-amazon-apigateway-authorizer extensions. postman will export the API with Postman extensions, allowing for import to the Postman tool

rest_api_id class-attribute instance-attribute
rest_api_id: str | None = ...

The string identifier of the associated RestApi.

stage_name class-attribute instance-attribute
stage_name: str | None = ...

The name of the Stage that will be exported.

Output

GetExportOutput dataclass

Bases: _SerdeShape

The binary blob response to GetExport, which contains the generated SDK.

Attributes

body class-attribute instance-attribute
body: bytes | None = ...

The binary blob response to GetExport, which contains the export.

content_disposition class-attribute instance-attribute
content_disposition: str | None = ...

The content-disposition header value in the HTTP response.

content_type class-attribute instance-attribute
content_type: str | None = ...

The content-type header value in the HTTP response. This will correspond to a valid 'accept' type in the request.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.