@Generated(value="software.amazon.awssdk:codegen") public class ImportRestApiRequest extends APIGatewayRequest implements ToCopyableBuilder<ImportRestApiRequest.Builder,ImportRestApiRequest>
A POST request to import an API to Amazon API Gateway using an input of an API definition file.
| Modifier and Type | Class and Description |
|---|---|
static interface |
ImportRestApiRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
body()
The POST request body containing external API definitions.
|
static ImportRestApiRequest.Builder |
builder() |
boolean |
equals(Object obj) |
Boolean |
failOnWarnings()
A query parameter to indicate whether to rollback the API creation (
true) or not (false
) when a warning is encountered. |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest. |
int |
hashCode() |
Map<String,String> |
parameters()
A key-value map of context-specific query string parameters specifying the behavior of different API importing
operations.
|
static Class<? extends ImportRestApiRequest.Builder> |
serializableBuilderClass() |
ImportRestApiRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
requestOverrideConfigcopypublic Boolean 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.
true) or not (
false) when a warning is encountered. The default value is false.public Map<String,String> 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 or
endpointConfigurationTypes=REGIONAL. 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 'file:///path/to/imported-api-body.json
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
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
To exclude DocumentationParts from the import, set parameters as
ignore=documentation.
To configure the endpoint type, set parameters as
endpointConfigurationTypes=EDGE orendpointConfigurationTypes=REGIONAL. 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 'file:///path/to/imported-api-body.json
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.jsonpublic ByteBuffer body()
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.
This method will return a new read-only ByteBuffer each time it is invoked.
public ImportRestApiRequest.Builder toBuilder()
ToCopyableBuildertoBuilder in interface ToCopyableBuilder<ImportRestApiRequest.Builder,ImportRestApiRequest>toBuilder in class APIGatewayRequestpublic static ImportRestApiRequest.Builder builder()
public static Class<? extends ImportRestApiRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequestSdkRequest. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class) method will
again be available.getValueForField in class SdkRequestfieldName - The name of the member to be retrieved.clazz - The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.