@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class PutRestApiRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
A PUT request to update an existing API, with external API definitions specified as the request body.
NOOP
Constructor and Description |
---|
PutRestApiRequest() |
Modifier and Type | Method and Description |
---|---|
PutRestApiRequest |
addParametersEntry(String key,
String value)
Add a single Parameters entry
|
PutRestApiRequest |
clearParametersEntries()
Removes all the entries added into Parameters.
|
PutRestApiRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
ByteBuffer |
getBody()
The PUT request body containing external API definitions.
|
Boolean |
getFailOnWarnings()
A query parameter to indicate whether to rollback the API update (
true ) or not (false )
when a warning is encountered. |
String |
getMode()
The
mode query parameter to specify the update mode. |
Map<String,String> |
getParameters()
Custom header parameters as part of the request.
|
String |
getRestApiId()
The string identifier of the associated RestApi.
|
int |
hashCode() |
Boolean |
isFailOnWarnings()
A query parameter to indicate whether to rollback the API update (
true ) or not (false )
when a warning is encountered. |
void |
setBody(ByteBuffer body)
The PUT request body containing external API definitions.
|
void |
setFailOnWarnings(Boolean failOnWarnings)
A query parameter to indicate whether to rollback the API update (
true ) or not (false )
when a warning is encountered. |
void |
setMode(PutMode mode)
The
mode query parameter to specify the update mode. |
void |
setMode(String mode)
The
mode query parameter to specify the update mode. |
void |
setParameters(Map<String,String> parameters)
Custom header parameters as part of the request.
|
void |
setRestApiId(String restApiId)
The string identifier of the associated RestApi.
|
String |
toString()
Returns a string representation of this object.
|
PutRestApiRequest |
withBody(ByteBuffer body)
The PUT request body containing external API definitions.
|
PutRestApiRequest |
withFailOnWarnings(Boolean failOnWarnings)
A query parameter to indicate whether to rollback the API update (
true ) or not (false )
when a warning is encountered. |
PutRestApiRequest |
withMode(PutMode mode)
The
mode query parameter to specify the update mode. |
PutRestApiRequest |
withMode(String mode)
The
mode query parameter to specify the update mode. |
PutRestApiRequest |
withParameters(Map<String,String> parameters)
Custom header parameters as part of the request.
|
PutRestApiRequest |
withRestApiId(String restApiId)
The string identifier of the associated RestApi.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public void setRestApiId(String restApiId)
The string identifier of the associated RestApi.
restApiId
- The string identifier of the associated RestApi.public String getRestApiId()
The string identifier of the associated RestApi.
public PutRestApiRequest withRestApiId(String restApiId)
The string identifier of the associated RestApi.
restApiId
- The string identifier of the associated RestApi.public void setMode(String mode)
The mode
query parameter to specify the update mode. Valid values are "merge" and "overwrite". By
default, the update mode is "merge".
mode
- The mode
query parameter to specify the update mode. Valid values are "merge" and
"overwrite". By default, the update mode is "merge".PutMode
public String getMode()
The mode
query parameter to specify the update mode. Valid values are "merge" and "overwrite". By
default, the update mode is "merge".
mode
query parameter to specify the update mode. Valid values are "merge" and
"overwrite". By default, the update mode is "merge".PutMode
public PutRestApiRequest withMode(String mode)
The mode
query parameter to specify the update mode. Valid values are "merge" and "overwrite". By
default, the update mode is "merge".
mode
- The mode
query parameter to specify the update mode. Valid values are "merge" and
"overwrite". By default, the update mode is "merge".PutMode
public void setMode(PutMode mode)
The mode
query parameter to specify the update mode. Valid values are "merge" and "overwrite". By
default, the update mode is "merge".
mode
- The mode
query parameter to specify the update mode. Valid values are "merge" and
"overwrite". By default, the update mode is "merge".PutMode
public PutRestApiRequest withMode(PutMode mode)
The mode
query parameter to specify the update mode. Valid values are "merge" and "overwrite". By
default, the update mode is "merge".
mode
- The mode
query parameter to specify the update mode. Valid values are "merge" and
"overwrite". By default, the update mode is "merge".PutMode
public void setFailOnWarnings(Boolean 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
.
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
.public Boolean getFailOnWarnings()
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
.
true
) or not (
false
) when a warning is encountered. The default value is false
.public PutRestApiRequest withFailOnWarnings(Boolean 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
.
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
.public Boolean isFailOnWarnings()
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
.
true
) or not (
false
) when a warning is encountered. The default value is false
.public Map<String,String> getParameters()
Custom header parameters as part of the request. For example, to exclude DocumentationParts from an imported API,
set ignore=documentation
as a parameters
value, as in the AWS CLI command of
aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'
.
ignore=documentation
as a parameters
value, as in the AWS CLI
command of
aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'
.public void setParameters(Map<String,String> parameters)
Custom header parameters as part of the request. For example, to exclude DocumentationParts from an imported API,
set ignore=documentation
as a parameters
value, as in the AWS CLI command of
aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'
.
parameters
- Custom header parameters as part of the request. For example, to exclude DocumentationParts from an
imported API, set ignore=documentation
as a parameters
value, as in the AWS CLI
command of
aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'
.public PutRestApiRequest withParameters(Map<String,String> parameters)
Custom header parameters as part of the request. For example, to exclude DocumentationParts from an imported API,
set ignore=documentation
as a parameters
value, as in the AWS CLI command of
aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'
.
parameters
- Custom header parameters as part of the request. For example, to exclude DocumentationParts from an
imported API, set ignore=documentation
as a parameters
value, as in the AWS CLI
command of
aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'
.public PutRestApiRequest addParametersEntry(String key, String value)
public PutRestApiRequest clearParametersEntries()
public void setBody(ByteBuffer body)
The PUT request body containing external API definitions. Currently, only OpenAPI definition JSON/YAML files are supported. The maximum size of the API definition file is 6MB.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
body
- The PUT request body containing external API definitions. Currently, only OpenAPI definition JSON/YAML
files are supported. The maximum size of the API definition file is 6MB.public ByteBuffer getBody()
The PUT request body containing external API definitions. Currently, only OpenAPI definition JSON/YAML files are supported. The maximum size of the API definition file is 6MB.
ByteBuffer
s are stateful. Calling their get
methods changes their position
. We recommend
using ByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independent
position
, and calling get
methods on this rather than directly on the returned ByteBuffer
.
Doing so will ensure that anyone else using the ByteBuffer
will not be affected by changes to the
position
.
public PutRestApiRequest withBody(ByteBuffer body)
The PUT request body containing external API definitions. Currently, only OpenAPI definition JSON/YAML files are supported. The maximum size of the API definition file is 6MB.
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
body
- The PUT request body containing external API definitions. Currently, only OpenAPI definition JSON/YAML
files are supported. The maximum size of the API definition file is 6MB.public String toString()
toString
in class Object
Object.toString()
public PutRestApiRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()