aws_sdk_apigateway/client/import_rest_api.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`ImportRestApi`](crate::operation::import_rest_api::builders::ImportRestApiFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`fail_on_warnings(bool)`](crate::operation::import_rest_api::builders::ImportRestApiFluentBuilder::fail_on_warnings) / [`set_fail_on_warnings(Option<bool>)`](crate::operation::import_rest_api::builders::ImportRestApiFluentBuilder::set_fail_on_warnings):<br>required: **false**<br><p>A query parameter to indicate whether to rollback the API creation (<code>true</code>) or not (<code>false</code>) when a warning is encountered. The default value is <code>false</code>.</p><br>
7 /// - [`parameters(impl Into<String>, impl Into<String>)`](crate::operation::import_rest_api::builders::ImportRestApiFluentBuilder::parameters) / [`set_parameters(Option<HashMap::<String, String>>)`](crate::operation::import_rest_api::builders::ImportRestApiFluentBuilder::set_parameters):<br>required: **false**<br><p>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.</p> <p>To exclude DocumentationParts from the import, set <code>parameters</code> as <code>ignore=documentation</code>.</p> <p>To configure the endpoint type, set <code>parameters</code> as <code>endpointConfigurationTypes=EDGE</code>, <code>endpointConfigurationTypes=REGIONAL</code>, or <code>endpointConfigurationTypes=PRIVATE</code>. The default endpoint type is <code>EDGE</code>.</p> <p>To handle imported <code>basepath</code>, set <code>parameters</code> as <code>basepath=ignore</code>, <code>basepath=prepend</code> or <code>basepath=split</code>.</p><br>
8 /// - [`body(Blob)`](crate::operation::import_rest_api::builders::ImportRestApiFluentBuilder::body) / [`set_body(Option<Blob>)`](crate::operation::import_rest_api::builders::ImportRestApiFluentBuilder::set_body):<br>required: **true**<br><p>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.</p><br>
9 /// - On success, responds with [`ImportRestApiOutput`](crate::operation::import_rest_api::ImportRestApiOutput) with field(s):
10 /// - [`id(Option<String>)`](crate::operation::import_rest_api::ImportRestApiOutput::id): <p>The API's identifier. This identifier is unique across all of your APIs in API Gateway.</p>
11 /// - [`name(Option<String>)`](crate::operation::import_rest_api::ImportRestApiOutput::name): <p>The API's name.</p>
12 /// - [`description(Option<String>)`](crate::operation::import_rest_api::ImportRestApiOutput::description): <p>The API's description.</p>
13 /// - [`created_date(Option<DateTime>)`](crate::operation::import_rest_api::ImportRestApiOutput::created_date): <p>The timestamp when the API was created.</p>
14 /// - [`version(Option<String>)`](crate::operation::import_rest_api::ImportRestApiOutput::version): <p>A version identifier for the API.</p>
15 /// - [`warnings(Option<Vec::<String>>)`](crate::operation::import_rest_api::ImportRestApiOutput::warnings): <p>The warning messages reported when <code>failonwarnings</code> is turned on during API import.</p>
16 /// - [`binary_media_types(Option<Vec::<String>>)`](crate::operation::import_rest_api::ImportRestApiOutput::binary_media_types): <p>The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.</p>
17 /// - [`minimum_compression_size(Option<i32>)`](crate::operation::import_rest_api::ImportRestApiOutput::minimum_compression_size): <p>A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.</p>
18 /// - [`api_key_source(Option<ApiKeySourceType>)`](crate::operation::import_rest_api::ImportRestApiOutput::api_key_source): <p>The source of the API key for metering requests according to a usage plan. Valid values are: ><code>HEADER</code> to read the API key from the <code>X-API-Key</code> header of a request. <code>AUTHORIZER</code> to read the API key from the <code>UsageIdentifierKey</code> from a custom authorizer.</p>
19 /// - [`endpoint_configuration(Option<EndpointConfiguration>)`](crate::operation::import_rest_api::ImportRestApiOutput::endpoint_configuration): <p>The endpoint configuration of this RestApi showing the endpoint types and IP address types of the API.</p>
20 /// - [`policy(Option<String>)`](crate::operation::import_rest_api::ImportRestApiOutput::policy): <p>A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.</p>
21 /// - [`tags(Option<HashMap::<String, String>>)`](crate::operation::import_rest_api::ImportRestApiOutput::tags): <p>The collection of tags. Each tag element is associated with a given resource.</p>
22 /// - [`disable_execute_api_endpoint(bool)`](crate::operation::import_rest_api::ImportRestApiOutput::disable_execute_api_endpoint): <p>Specifies whether clients can invoke your API by using the default <code>execute-api</code> endpoint. By default, clients can invoke your API with the default <code>https://{api_id}.execute-api.{region}.amazonaws.com</code> endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.</p>
23 /// - [`root_resource_id(Option<String>)`](crate::operation::import_rest_api::ImportRestApiOutput::root_resource_id): <p>The API's root resource ID.</p>
24 /// - On failure, responds with [`SdkError<ImportRestApiError>`](crate::operation::import_rest_api::ImportRestApiError)
25 pub fn import_rest_api(&self) -> crate::operation::import_rest_api::builders::ImportRestApiFluentBuilder {
26 crate::operation::import_rest_api::builders::ImportRestApiFluentBuilder::new(self.handle.clone())
27 }
28}