aws_sdk_apigateway/client/create_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 [`CreateRestApi`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`name(impl Into<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::set_name):<br>required: **true**<br><p>The name of the RestApi.</p><br>
7 /// - [`description(impl Into<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::set_description):<br>required: **false**<br><p>The description of the RestApi.</p><br>
8 /// - [`version(impl Into<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::version) / [`set_version(Option<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::set_version):<br>required: **false**<br><p>A version identifier for the API.</p><br>
9 /// - [`clone_from(impl Into<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::clone_from) / [`set_clone_from(Option<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::set_clone_from):<br>required: **false**<br><p>The ID of the RestApi that you want to clone from.</p><br>
10 /// - [`binary_media_types(impl Into<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::binary_media_types) / [`set_binary_media_types(Option<Vec::<String>>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::set_binary_media_types):<br>required: **false**<br><p>The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.</p><br>
11 /// - [`minimum_compression_size(i32)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::minimum_compression_size) / [`set_minimum_compression_size(Option<i32>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::set_minimum_compression_size):<br>required: **false**<br><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><br>
12 /// - [`api_key_source(ApiKeySourceType)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::api_key_source) / [`set_api_key_source(Option<ApiKeySourceType>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::set_api_key_source):<br>required: **false**<br><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><br>
13 /// - [`endpoint_configuration(EndpointConfiguration)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::endpoint_configuration) / [`set_endpoint_configuration(Option<EndpointConfiguration>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::set_endpoint_configuration):<br>required: **false**<br><p>The endpoint configuration of this RestApi showing the endpoint types and IP address types of the API.</p><br>
14 /// - [`policy(impl Into<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::policy) / [`set_policy(Option<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::set_policy):<br>required: **false**<br><p>A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.</p><br>
15 /// - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::set_tags):<br>required: **false**<br><p>The key-value map of strings. The valid character set is \[a-zA-Z+-=._:/\]. The tag key can be up to 128 characters and must not start with aws:. The tag value can be up to 256 characters.</p><br>
16 /// - [`disable_execute_api_endpoint(bool)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::disable_execute_api_endpoint) / [`set_disable_execute_api_endpoint(Option<bool>)`](crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::set_disable_execute_api_endpoint):<br>required: **false**<br><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><br>
17 /// - On success, responds with [`CreateRestApiOutput`](crate::operation::create_rest_api::CreateRestApiOutput) with field(s):
18 /// - [`id(Option<String>)`](crate::operation::create_rest_api::CreateRestApiOutput::id): <p>The API's identifier. This identifier is unique across all of your APIs in API Gateway.</p>
19 /// - [`name(Option<String>)`](crate::operation::create_rest_api::CreateRestApiOutput::name): <p>The API's name.</p>
20 /// - [`description(Option<String>)`](crate::operation::create_rest_api::CreateRestApiOutput::description): <p>The API's description.</p>
21 /// - [`created_date(Option<DateTime>)`](crate::operation::create_rest_api::CreateRestApiOutput::created_date): <p>The timestamp when the API was created.</p>
22 /// - [`version(Option<String>)`](crate::operation::create_rest_api::CreateRestApiOutput::version): <p>A version identifier for the API.</p>
23 /// - [`warnings(Option<Vec::<String>>)`](crate::operation::create_rest_api::CreateRestApiOutput::warnings): <p>The warning messages reported when <code>failonwarnings</code> is turned on during API import.</p>
24 /// - [`binary_media_types(Option<Vec::<String>>)`](crate::operation::create_rest_api::CreateRestApiOutput::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>
25 /// - [`minimum_compression_size(Option<i32>)`](crate::operation::create_rest_api::CreateRestApiOutput::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>
26 /// - [`api_key_source(Option<ApiKeySourceType>)`](crate::operation::create_rest_api::CreateRestApiOutput::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>
27 /// - [`endpoint_configuration(Option<EndpointConfiguration>)`](crate::operation::create_rest_api::CreateRestApiOutput::endpoint_configuration): <p>The endpoint configuration of this RestApi showing the endpoint types and IP address types of the API.</p>
28 /// - [`policy(Option<String>)`](crate::operation::create_rest_api::CreateRestApiOutput::policy): <p>A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.</p>
29 /// - [`tags(Option<HashMap::<String, String>>)`](crate::operation::create_rest_api::CreateRestApiOutput::tags): <p>The collection of tags. Each tag element is associated with a given resource.</p>
30 /// - [`disable_execute_api_endpoint(bool)`](crate::operation::create_rest_api::CreateRestApiOutput::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>
31 /// - [`root_resource_id(Option<String>)`](crate::operation::create_rest_api::CreateRestApiOutput::root_resource_id): <p>The API's root resource ID.</p>
32 /// - On failure, responds with [`SdkError<CreateRestApiError>`](crate::operation::create_rest_api::CreateRestApiError)
33 pub fn create_rest_api(&self) -> crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder {
34 crate::operation::create_rest_api::builders::CreateRestApiFluentBuilder::new(self.handle.clone())
35 }
36}