1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateApi`](crate::operation::create_api::builders::CreateApiFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`api_key_selection_expression(impl Into<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::api_key_selection_expression) / [`set_api_key_selection_expression(Option<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_api_key_selection_expression):<br>required: **false**<br><p>An API key selection expression. Supported only for WebSocket APIs. See <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions">API Key Selection Expressions</a>.</p><br>
    ///   - [`cors_configuration(Cors)`](crate::operation::create_api::builders::CreateApiFluentBuilder::cors_configuration) / [`set_cors_configuration(Option<Cors>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_cors_configuration):<br>required: **false**<br><p>A CORS configuration. Supported only for HTTP APIs. See <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-cors.html">Configuring CORS</a> for more information.</p><br>
    ///   - [`credentials_arn(impl Into<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::credentials_arn) / [`set_credentials_arn(Option<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_credentials_arn):<br>required: **false**<br><p>This property is part of quick create. It specifies the credentials required for the integration, if any. For a Lambda integration, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, specify null. Currently, this property is not used for HTTP integrations. Supported only for HTTP APIs.</p><br>
    ///   - [`description(impl Into<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_description):<br>required: **false**<br><p>The description of the API.</p><br>
    ///   - [`disable_schema_validation(bool)`](crate::operation::create_api::builders::CreateApiFluentBuilder::disable_schema_validation) / [`set_disable_schema_validation(Option<bool>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_disable_schema_validation):<br>required: **false**<br><p>Avoid validating models when creating a deployment. Supported only for WebSocket APIs.</p><br>
    ///   - [`disable_execute_api_endpoint(bool)`](crate::operation::create_api::builders::CreateApiFluentBuilder::disable_execute_api_endpoint) / [`set_disable_execute_api_endpoint(Option<bool>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_disable_execute_api_endpoint):<br>required: **false**<br><p>Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.</p><br>
    ///   - [`name(impl Into<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_name):<br>required: **true**<br><p>The name of the API.</p><br>
    ///   - [`protocol_type(ProtocolType)`](crate::operation::create_api::builders::CreateApiFluentBuilder::protocol_type) / [`set_protocol_type(Option<ProtocolType>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_protocol_type):<br>required: **true**<br><p>The API protocol.</p><br>
    ///   - [`route_key(impl Into<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::route_key) / [`set_route_key(Option<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_route_key):<br>required: **false**<br><p>This property is part of quick create. If you don't specify a routeKey, a default route of $default is created. The $default route acts as a catch-all for any request made to your API, for a particular stage. The $default route key can't be modified. You can add routes after creating the API, and you can update the route keys of additional routes. Supported only for HTTP APIs.</p><br>
    ///   - [`route_selection_expression(impl Into<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::route_selection_expression) / [`set_route_selection_expression(Option<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_route_selection_expression):<br>required: **false**<br><p>The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.</p><br>
    ///   - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_tags):<br>required: **false**<br><p>The collection of tags. Each tag element is associated with a given resource.</p><br>
    ///   - [`target(impl Into<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::target) / [`set_target(Option<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_target):<br>required: **false**<br><p>This property is part of quick create. Quick create produces an API with an integration, a default catch-all route, and a default stage which is configured to automatically deploy changes. For HTTP integrations, specify a fully qualified URL. For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively. Supported only for HTTP APIs.</p><br>
    ///   - [`version(impl Into<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::version) / [`set_version(Option<String>)`](crate::operation::create_api::builders::CreateApiFluentBuilder::set_version):<br>required: **false**<br><p>A version identifier for the API.</p><br>
    /// - On success, responds with [`CreateApiOutput`](crate::operation::create_api::CreateApiOutput) with field(s):
    ///   - [`api_endpoint(Option<String>)`](crate::operation::create_api::CreateApiOutput::api_endpoint): <p>The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.</p>
    ///   - [`api_gateway_managed(Option<bool>)`](crate::operation::create_api::CreateApiOutput::api_gateway_managed): <p>Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API Gateway. A managed API can be deleted only through the tooling or service that created it.</p>
    ///   - [`api_id(Option<String>)`](crate::operation::create_api::CreateApiOutput::api_id): <p>The API ID.</p>
    ///   - [`api_key_selection_expression(Option<String>)`](crate::operation::create_api::CreateApiOutput::api_key_selection_expression): <p>An API key selection expression. Supported only for WebSocket APIs. See <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions">API Key Selection Expressions</a>.</p>
    ///   - [`cors_configuration(Option<Cors>)`](crate::operation::create_api::CreateApiOutput::cors_configuration): <p>A CORS configuration. Supported only for HTTP APIs.</p>
    ///   - [`created_date(Option<DateTime>)`](crate::operation::create_api::CreateApiOutput::created_date): <p>The timestamp when the API was created.</p>
    ///   - [`description(Option<String>)`](crate::operation::create_api::CreateApiOutput::description): <p>The description of the API.</p>
    ///   - [`disable_schema_validation(Option<bool>)`](crate::operation::create_api::CreateApiOutput::disable_schema_validation): <p>Avoid validating models when creating a deployment. Supported only for WebSocket APIs.</p>
    ///   - [`disable_execute_api_endpoint(Option<bool>)`](crate::operation::create_api::CreateApiOutput::disable_execute_api_endpoint): <p>Specifies whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint.</p>
    ///   - [`import_info(Option<Vec::<String>>)`](crate::operation::create_api::CreateApiOutput::import_info): <p>The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.</p>
    ///   - [`name(Option<String>)`](crate::operation::create_api::CreateApiOutput::name): <p>The name of the API.</p>
    ///   - [`protocol_type(Option<ProtocolType>)`](crate::operation::create_api::CreateApiOutput::protocol_type): <p>The API protocol.</p>
    ///   - [`route_selection_expression(Option<String>)`](crate::operation::create_api::CreateApiOutput::route_selection_expression): <p>The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.</p>
    ///   - [`tags(Option<HashMap::<String, String>>)`](crate::operation::create_api::CreateApiOutput::tags): <p>A collection of tags associated with the API.</p>
    ///   - [`version(Option<String>)`](crate::operation::create_api::CreateApiOutput::version): <p>A version identifier for the API.</p>
    ///   - [`warnings(Option<Vec::<String>>)`](crate::operation::create_api::CreateApiOutput::warnings): <p>The warning messages reported when failonwarnings is turned on during API import.</p>
    /// - On failure, responds with [`SdkError<CreateApiError>`](crate::operation::create_api::CreateApiError)
    pub fn create_api(&self) -> crate::operation::create_api::builders::CreateApiFluentBuilder {
        crate::operation::create_api::builders::CreateApiFluentBuilder::new(self.handle.clone())
    }
}