AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the ImportRestApi operation. A feature of the API Gateway control service for creating a new API from an external API definition file.

Inheritance Hierarchy


Namespace: Amazon.APIGateway.Model
Assembly: AWSSDK.APIGateway.dll
Version: 3.x.y.z


public class ImportRestApiRequest : AmazonAPIGatewayRequest

The ImportRestApiRequest type exposes the following members


Public Method ImportRestApiRequest()


Public Property Body System.IO.MemoryStream

Gets and sets the property Body.

[Required] The POST request body containing external API definitions. Currently, only Swagger definition JSON files are supported. The maximum size of the API definition file is 2MB.

Public Property FailOnWarnings System.Boolean

Gets and sets the property 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.

Public Property Parameters System.Collections.Generic.Dictionary<System.String, System.String>

Gets and sets the property Parameters.

A key-value map of context-specific query string parameters specifying the behavior of different API importing operations. The following shows operation-specific parameters and their supported values.

To exclude DocumentationParts from the import, set parameters as ignore=documentation.

To configure the endpoint type, set parameters as endpointConfigurationTypes=EDGE, endpointConfigurationTypes=REGIONAL, or endpointConfigurationTypes=PRIVATE. The default endpoint type is EDGE.

To handle imported basePath, set parameters as basePath=ignore, basePath=prepend or basePath=split.

For example, the AWS CLI command to exclude documentation from the imported API is:

aws apigateway import-rest-api --parameters ignore=documentation --body

The AWS CLI command to set the regional endpoint on the imported API is:

aws apigateway import-rest-api --parameters endpointConfigurationTypes=REGIONAL
            --body 'file:///path/to/imported-api-body.json'

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms