#[non_exhaustive]pub struct ImportRestApiInput {
pub fail_on_warnings: bool,
pub parameters: Option<HashMap<String, String>>,
pub body: Option<Blob>,
}
Expand description
A POST request to import an API to API Gateway using an input of an API definition file.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.fail_on_warnings: bool
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
.
parameters: Option<HashMap<String, String>>
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:
The AWS CLI command to set the regional endpoint on the imported API is:
body: Option<Blob>
The POST 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.
Implementations§
source§impl ImportRestApiInput
impl ImportRestApiInput
sourcepub fn fail_on_warnings(&self) -> bool
pub fn fail_on_warnings(&self) -> bool
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
.
sourcepub fn parameters(&self) -> Option<&HashMap<String, String>>
pub fn parameters(&self) -> Option<&HashMap<String, String>>
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:
The AWS CLI command to set the regional endpoint on the imported API is:
source§impl ImportRestApiInput
impl ImportRestApiInput
sourcepub fn builder() -> ImportRestApiInputBuilder
pub fn builder() -> ImportRestApiInputBuilder
Creates a new builder-style object to manufacture ImportRestApiInput
.
Trait Implementations§
source§impl Clone for ImportRestApiInput
impl Clone for ImportRestApiInput
source§fn clone(&self) -> ImportRestApiInput
fn clone(&self) -> ImportRestApiInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ImportRestApiInput
impl Debug for ImportRestApiInput
source§impl PartialEq<ImportRestApiInput> for ImportRestApiInput
impl PartialEq<ImportRestApiInput> for ImportRestApiInput
source§fn eq(&self, other: &ImportRestApiInput) -> bool
fn eq(&self, other: &ImportRestApiInput) -> bool
self
and other
values to be equal, and is used
by ==
.