pub struct Client { /* private fields */ }
Expand description

Client for Amazon API Gateway

Client for invoking operations on Amazon API Gateway. Each operation on Amazon API Gateway is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

Examples

Constructing a client and invoking an operation

    // create a shared configuration. This can be used & shared between multiple service clients.
    let shared_config = aws_config::load_from_env().await;
    let client = aws_sdk_apigateway::Client::new(&shared_config);
    // invoke an operation
    /* let rsp = client
        .<operation_name>().
        .<param>("some value")
        .send().await; */

Constructing a client with custom configuration

use aws_config::retry::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_apigateway::config::Builder::from(&shared_config)
  .retry_config(RetryConfig::disabled())
  .build();
let client = aws_sdk_apigateway::Client::from_conf(config);

Implementations§

Creates a client with the given service configuration.

Examples found in repository?
src/client.rs (line 70)
64
65
66
67
68
69
70
71
    fn from(
        client: aws_smithy_client::Client<
            aws_smithy_client::erase::DynConnector,
            aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
        >,
    ) -> Self {
        Self::with_config(client, crate::Config::builder().build())
    }

Returns the client’s configuration.

Constructs a fluent builder for the CreateApiKey operation.

Constructs a fluent builder for the CreateAuthorizer operation.

  • The fluent builder is configurable:
    • rest_api_id(impl Into<String>) / set_rest_api_id(Option<String>):

      The string identifier of the associated RestApi.

    • name(impl Into<String>) / set_name(Option<String>):

      The name of the authorizer.

    • r#type(AuthorizerType) / set_type(Option<AuthorizerType>):

      The authorizer type. Valid values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS for using an Amazon Cognito user pool.

    • provider_ar_ns(Vec<String>) / set_provider_ar_ns(Option<Vec<String>>):

      A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. For a TOKEN or REQUEST authorizer, this is not defined.

    • auth_type(impl Into<String>) / set_auth_type(Option<String>):

      Optional customer-defined field, used in OpenAPI imports and exports without functional impact.

    • authorizer_uri(impl Into<String>) / set_authorizer_uri(Option<String>):

      Specifies the authorizer’s Uniform Resource Identifier (URI). For TOKEN or REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations.

    • authorizer_credentials(impl Into<String>) / set_authorizer_credentials(Option<String>):

      Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role’s Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.

    • identity_source(impl Into<String>) / set_identity_source(Option<String>):

      The identity source for which authorization is requested. For a TOKEN or COGNITO_USER_POOLS authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is Auth, the header mapping expression is method.request.header.Auth. For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.

    • identity_validation_expression(impl Into<String>) / set_identity_validation_expression(Option<String>):

      A validation expression for the incoming identity token. For TOKEN authorizers, this value is a regular expression. For COGNITO_USER_POOLS authorizers, API Gateway will match the aud field of the incoming token from the client against the specified regular expression. It will invoke the authorizer’s Lambda function when there is a match. Otherwise, it will return a 401 Unauthorized response without calling the Lambda function. The validation expression does not apply to the REQUEST authorizer.

    • authorizer_result_ttl_in_seconds(i32) / set_authorizer_result_ttl_in_seconds(Option<i32>):

      The TTL in seconds of cached authorizer results. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.

  • On success, responds with CreateAuthorizerOutput with field(s):
    • id(Option<String>):

      The identifier for the authorizer resource.

    • name(Option<String>):

      The name of the authorizer.

    • r#type(Option<AuthorizerType>):

      The authorizer type. Valid values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS for using an Amazon Cognito user pool.

    • provider_ar_ns(Option<Vec<String>>):

      A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. For a TOKEN or REQUEST authorizer, this is not defined.

    • auth_type(Option<String>):

      Optional customer-defined field, used in OpenAPI imports and exports without functional impact.

    • authorizer_uri(Option<String>):

      Specifies the authorizer’s Uniform Resource Identifier (URI). For TOKEN or REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations.

    • authorizer_credentials(Option<String>):

      Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role’s Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.

    • identity_source(Option<String>):

      The identity source for which authorization is requested. For a TOKEN or COGNITO_USER_POOLS authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is Auth, the header mapping expression is method.request.header.Auth. For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.

    • identity_validation_expression(Option<String>):

      A validation expression for the incoming identity token. For TOKEN authorizers, this value is a regular expression. For COGNITO_USER_POOLS authorizers, API Gateway will match the aud field of the incoming token from the client against the specified regular expression. It will invoke the authorizer’s Lambda function when there is a match. Otherwise, it will return a 401 Unauthorized response without calling the Lambda function. The validation expression does not apply to the REQUEST authorizer.

    • authorizer_result_ttl_in_seconds(Option<i32>):

      The TTL in seconds of cached authorizer results. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.

  • On failure, responds with SdkError<CreateAuthorizerError>

Constructs a fluent builder for the CreateBasePathMapping operation.

Constructs a fluent builder for the CreateDeployment operation.

Constructs a fluent builder for the CreateDocumentationPart operation.

Constructs a fluent builder for the CreateDocumentationVersion operation.

Constructs a fluent builder for the CreateDomainName operation.

Constructs a fluent builder for the CreateModel operation.

Constructs a fluent builder for the CreateRequestValidator operation.

Constructs a fluent builder for the CreateResource operation.

Constructs a fluent builder for the CreateRestApi operation.

Constructs a fluent builder for the CreateStage operation.

Constructs a fluent builder for the CreateUsagePlan operation.

Constructs a fluent builder for the CreateUsagePlanKey operation.

Constructs a fluent builder for the CreateVpcLink operation.

Constructs a fluent builder for the DeleteApiKey operation.

Constructs a fluent builder for the DeleteAuthorizer operation.

Constructs a fluent builder for the DeleteBasePathMapping operation.

Constructs a fluent builder for the DeleteClientCertificate operation.

Constructs a fluent builder for the DeleteDeployment operation.

Constructs a fluent builder for the DeleteDocumentationPart operation.

Constructs a fluent builder for the DeleteDocumentationVersion operation.

Constructs a fluent builder for the DeleteDomainName operation.

Constructs a fluent builder for the DeleteGatewayResponse operation.

Constructs a fluent builder for the DeleteIntegration operation.

Constructs a fluent builder for the DeleteIntegrationResponse operation.

Constructs a fluent builder for the DeleteMethod operation.

Constructs a fluent builder for the DeleteMethodResponse operation.

Constructs a fluent builder for the DeleteModel operation.

Constructs a fluent builder for the DeleteRequestValidator operation.

Constructs a fluent builder for the DeleteResource operation.

Constructs a fluent builder for the DeleteRestApi operation.

Constructs a fluent builder for the DeleteStage operation.

Constructs a fluent builder for the DeleteUsagePlan operation.

Constructs a fluent builder for the DeleteUsagePlanKey operation.

Constructs a fluent builder for the DeleteVpcLink operation.

Constructs a fluent builder for the FlushStageAuthorizersCache operation.

Constructs a fluent builder for the FlushStageCache operation.

Constructs a fluent builder for the GenerateClientCertificate operation.

Constructs a fluent builder for the GetAccount operation.

Constructs a fluent builder for the GetApiKey operation.

Constructs a fluent builder for the GetApiKeys operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetAuthorizer operation.

  • The fluent builder is configurable:
  • On success, responds with GetAuthorizerOutput with field(s):
    • id(Option<String>):

      The identifier for the authorizer resource.

    • name(Option<String>):

      The name of the authorizer.

    • r#type(Option<AuthorizerType>):

      The authorizer type. Valid values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS for using an Amazon Cognito user pool.

    • provider_ar_ns(Option<Vec<String>>):

      A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. For a TOKEN or REQUEST authorizer, this is not defined.

    • auth_type(Option<String>):

      Optional customer-defined field, used in OpenAPI imports and exports without functional impact.

    • authorizer_uri(Option<String>):

      Specifies the authorizer’s Uniform Resource Identifier (URI). For TOKEN or REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations.

    • authorizer_credentials(Option<String>):

      Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role’s Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.

    • identity_source(Option<String>):

      The identity source for which authorization is requested. For a TOKEN or COGNITO_USER_POOLS authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is Auth, the header mapping expression is method.request.header.Auth. For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.

    • identity_validation_expression(Option<String>):

      A validation expression for the incoming identity token. For TOKEN authorizers, this value is a regular expression. For COGNITO_USER_POOLS authorizers, API Gateway will match the aud field of the incoming token from the client against the specified regular expression. It will invoke the authorizer’s Lambda function when there is a match. Otherwise, it will return a 401 Unauthorized response without calling the Lambda function. The validation expression does not apply to the REQUEST authorizer.

    • authorizer_result_ttl_in_seconds(Option<i32>):

      The TTL in seconds of cached authorizer results. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.

  • On failure, responds with SdkError<GetAuthorizerError>

Constructs a fluent builder for the GetAuthorizers operation.

Constructs a fluent builder for the GetBasePathMapping operation.

Constructs a fluent builder for the GetBasePathMappings operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetClientCertificate operation.

Constructs a fluent builder for the GetClientCertificates operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetDeployment operation.

Constructs a fluent builder for the GetDeployments operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetDocumentationPart operation.

Constructs a fluent builder for the GetDocumentationParts operation.

Constructs a fluent builder for the GetDocumentationVersion operation.

Constructs a fluent builder for the GetDocumentationVersions operation.

Constructs a fluent builder for the GetDomainName operation.

Constructs a fluent builder for the GetDomainNames operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetExport operation.

Constructs a fluent builder for the GetGatewayResponse operation.

Constructs a fluent builder for the GetGatewayResponses operation.

Constructs a fluent builder for the GetIntegration operation.

  • The fluent builder is configurable:
  • On success, responds with GetIntegrationOutput with field(s):
    • r#type(Option<IntegrationType>):

      Specifies an API method integration type. The valid value is one of the following:

      For the HTTP and HTTP proxy integrations, each integration can specify a protocol (http/https), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a connectionType of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

    • http_method(Option<String>):

      Specifies the integration’s HTTP method type.

    • uri(Option<String>):

      Specifies Uniform Resource Identifier (URI) of the integration endpoint.

      For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the URI is not used for routing. For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&{p1}={v1}&p2={v2}… query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}

    • connection_type(Option<ConnectionType>):

      The type of the network connection to the integration endpoint. The valid value is INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and a network load balancer in a VPC. The default value is INTERNET.

    • connection_id(Option<String>):

      The ID of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

    • credentials(Option<String>):

      Specifies the credentials required for the integration, if any. For AWS integrations, 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 the string arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, specify null.

    • request_parameters(Option<HashMap<String, String>>):

      A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

    • request_templates(Option<HashMap<String, String>>):

      Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.

    • passthrough_behavior(Option<String>):

      Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. The valid value is one of the following: WHEN_NO_MATCH: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request. WHEN_NO_TEMPLATES: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response. NEVER: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.

    • content_handling(Option<ContentHandlingStrategy>):

      Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

      If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehavior is configured to support payload pass-through.

    • timeout_in_millis(i32):

      Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds.

    • cache_namespace(Option<String>):

      Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the cacheNamespace. You can specify the same cacheNamespace across resources to return the same cached data for requests to different resources.

    • cache_key_parameters(Option<Vec<String>>):

      A list of request parameters whose values API Gateway caches. To be valid values for cacheKeyParameters, these parameters must also be specified for Method requestParameters.

    • integration_responses(Option<HashMap<String, IntegrationResponse>>):

      Specifies the integration’s responses.

    • tls_config(Option<TlsConfig>):

      Specifies the TLS configuration for an integration.

  • On failure, responds with SdkError<GetIntegrationError>

Constructs a fluent builder for the GetIntegrationResponse operation.

  • The fluent builder is configurable:
  • On success, responds with GetIntegrationResponseOutput with field(s):
    • status_code(Option<String>):

      Specifies the status code that is used to map the integration response to an existing MethodResponse.

    • selection_pattern(Option<String>):

      Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

    • response_parameters(Option<HashMap<String, String>>):

      A key-value map specifying response parameters that are passed to the method response from the back end. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name}, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name} or integration.response.body.{JSON-expression}, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.

    • response_templates(Option<HashMap<String, String>>):

      Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

    • content_handling(Option<ContentHandlingStrategy>):

      Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

      If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.

  • On failure, responds with SdkError<GetIntegrationResponseError>

Constructs a fluent builder for the GetMethod operation.

Constructs a fluent builder for the GetMethodResponse operation.

Constructs a fluent builder for the GetModel operation.

Constructs a fluent builder for the GetModels operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetModelTemplate operation.

Constructs a fluent builder for the GetRequestValidator operation.

Constructs a fluent builder for the GetRequestValidators operation.

Constructs a fluent builder for the GetResource operation.

Constructs a fluent builder for the GetResources operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetRestApi operation.

Constructs a fluent builder for the GetRestApis operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetSdk operation.

Constructs a fluent builder for the GetSdkType operation.

Constructs a fluent builder for the GetSdkTypes operation.

Constructs a fluent builder for the GetStage operation.

Constructs a fluent builder for the GetStages operation.

Constructs a fluent builder for the GetTags operation.

Constructs a fluent builder for the GetUsage operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetUsagePlan operation.

Constructs a fluent builder for the GetUsagePlanKey operation.

Constructs a fluent builder for the GetUsagePlanKeys operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetUsagePlans operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the GetVpcLink operation.

Constructs a fluent builder for the GetVpcLinks operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ImportApiKeys operation.

Constructs a fluent builder for the ImportDocumentationParts operation.

Constructs a fluent builder for the ImportRestApi operation.

  • The fluent builder is configurable:
    • fail_on_warnings(bool) / set_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(HashMap<String, String>) / set_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(Blob) / set_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.

  • On success, responds with ImportRestApiOutput with field(s):
    • id(Option<String>):

      The API’s identifier. This identifier is unique across all of your APIs in API Gateway.

    • name(Option<String>):

      The API’s name.

    • description(Option<String>):

      The API’s description.

    • created_date(Option<DateTime>):

      The timestamp when the API was created.

    • version(Option<String>):

      A version identifier for the API.

    • warnings(Option<Vec<String>>):

      The warning messages reported when failonwarnings is turned on during API import.

    • binary_media_types(Option<Vec<String>>):

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

    • minimum_compression_size(Option<i32>):

      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.

    • api_key_source(Option<ApiKeySourceType>):

      The source of the API key for metering requests according to a usage plan. Valid values are: >HEADER to read the API key from the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

    • endpoint_configuration(Option<EndpointConfiguration>):

      The endpoint configuration of this RestApi showing the endpoint types of the API.

    • policy(Option<String>):

      A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.

    • tags(Option<HashMap<String, String>>):

      The collection of tags. Each tag element is associated with a given resource.

    • disable_execute_api_endpoint(bool):

      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.

  • On failure, responds with SdkError<ImportRestApiError>

Constructs a fluent builder for the PutGatewayResponse operation.

Constructs a fluent builder for the PutIntegration operation.

  • The fluent builder is configurable:
  • On success, responds with PutIntegrationOutput with field(s):
    • r#type(Option<IntegrationType>):

      Specifies an API method integration type. The valid value is one of the following:

      For the HTTP and HTTP proxy integrations, each integration can specify a protocol (http/https), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a connectionType of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

    • http_method(Option<String>):

      Specifies the integration’s HTTP method type.

    • uri(Option<String>):

      Specifies Uniform Resource Identifier (URI) of the integration endpoint.

      For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the URI is not used for routing. For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&{p1}={v1}&p2={v2}… query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}

    • connection_type(Option<ConnectionType>):

      The type of the network connection to the integration endpoint. The valid value is INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and a network load balancer in a VPC. The default value is INTERNET.

    • connection_id(Option<String>):

      The ID of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

    • credentials(Option<String>):

      Specifies the credentials required for the integration, if any. For AWS integrations, 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 the string arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, specify null.

    • request_parameters(Option<HashMap<String, String>>):

      A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

    • request_templates(Option<HashMap<String, String>>):

      Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.

    • passthrough_behavior(Option<String>):

      Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. The valid value is one of the following: WHEN_NO_MATCH: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request. WHEN_NO_TEMPLATES: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response. NEVER: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.

    • content_handling(Option<ContentHandlingStrategy>):

      Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

      If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehavior is configured to support payload pass-through.

    • timeout_in_millis(i32):

      Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds.

    • cache_namespace(Option<String>):

      Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the cacheNamespace. You can specify the same cacheNamespace across resources to return the same cached data for requests to different resources.

    • cache_key_parameters(Option<Vec<String>>):

      A list of request parameters whose values API Gateway caches. To be valid values for cacheKeyParameters, these parameters must also be specified for Method requestParameters.

    • integration_responses(Option<HashMap<String, IntegrationResponse>>):

      Specifies the integration’s responses.

    • tls_config(Option<TlsConfig>):

      Specifies the TLS configuration for an integration.

  • On failure, responds with SdkError<PutIntegrationError>

Constructs a fluent builder for the PutIntegrationResponse operation.

Constructs a fluent builder for the PutMethod operation.

Constructs a fluent builder for the PutMethodResponse operation.

  • The fluent builder is configurable:
  • On success, responds with PutMethodResponseOutput with field(s):
    • status_code(Option<String>):

      The method response’s status code.

    • response_parameters(Option<HashMap<String, bool>>):

      A key-value map specifying required or optional response parameters that API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API’s IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., ‘application/json’), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

    • response_models(Option<HashMap<String, String>>):

      Specifies the Model resources used for the response’s content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

  • On failure, responds with SdkError<PutMethodResponseError>

Constructs a fluent builder for the PutRestApi operation.

Constructs a fluent builder for the TagResource operation.

Constructs a fluent builder for the TestInvokeAuthorizer operation.

Constructs a fluent builder for the TestInvokeMethod operation.

Constructs a fluent builder for the UntagResource operation.

Constructs a fluent builder for the UpdateAccount operation.

Constructs a fluent builder for the UpdateApiKey operation.

Constructs a fluent builder for the UpdateAuthorizer operation.

  • The fluent builder is configurable:
  • On success, responds with UpdateAuthorizerOutput with field(s):
    • id(Option<String>):

      The identifier for the authorizer resource.

    • name(Option<String>):

      The name of the authorizer.

    • r#type(Option<AuthorizerType>):

      The authorizer type. Valid values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS for using an Amazon Cognito user pool.

    • provider_ar_ns(Option<Vec<String>>):

      A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. For a TOKEN or REQUEST authorizer, this is not defined.

    • auth_type(Option<String>):

      Optional customer-defined field, used in OpenAPI imports and exports without functional impact.

    • authorizer_uri(Option<String>):

      Specifies the authorizer’s Uniform Resource Identifier (URI). For TOKEN or REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations.

    • authorizer_credentials(Option<String>):

      Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role’s Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.

    • identity_source(Option<String>):

      The identity source for which authorization is requested. For a TOKEN or COGNITO_USER_POOLS authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is Auth, the header mapping expression is method.request.header.Auth. For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.

    • identity_validation_expression(Option<String>):

      A validation expression for the incoming identity token. For TOKEN authorizers, this value is a regular expression. For COGNITO_USER_POOLS authorizers, API Gateway will match the aud field of the incoming token from the client against the specified regular expression. It will invoke the authorizer’s Lambda function when there is a match. Otherwise, it will return a 401 Unauthorized response without calling the Lambda function. The validation expression does not apply to the REQUEST authorizer.

    • authorizer_result_ttl_in_seconds(Option<i32>):

      The TTL in seconds of cached authorizer results. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.

  • On failure, responds with SdkError<UpdateAuthorizerError>

Constructs a fluent builder for the UpdateBasePathMapping operation.

Constructs a fluent builder for the UpdateClientCertificate operation.

Constructs a fluent builder for the UpdateDeployment operation.

Constructs a fluent builder for the UpdateDocumentationPart operation.

Constructs a fluent builder for the UpdateDocumentationVersion operation.

Constructs a fluent builder for the UpdateDomainName operation.

Constructs a fluent builder for the UpdateGatewayResponse operation.

Constructs a fluent builder for the UpdateIntegration operation.

  • The fluent builder is configurable:
  • On success, responds with UpdateIntegrationOutput with field(s):
    • r#type(Option<IntegrationType>):

      Specifies an API method integration type. The valid value is one of the following:

      For the HTTP and HTTP proxy integrations, each integration can specify a protocol (http/https), port and path. Standard 80 and 443 ports are supported as well as custom ports above 1024. An HTTP or HTTP proxy integration with a connectionType of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

    • http_method(Option<String>):

      Specifies the integration’s HTTP method type.

    • uri(Option<String>):

      Specifies Uniform Resource Identifier (URI) of the integration endpoint.

      For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the URI is not used for routing. For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&{p1}={v1}&p2={v2}… query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}

    • connection_type(Option<ConnectionType>):

      The type of the network connection to the integration endpoint. The valid value is INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and a network load balancer in a VPC. The default value is INTERNET.

    • connection_id(Option<String>):

      The ID of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

    • credentials(Option<String>):

      Specifies the credentials required for the integration, if any. For AWS integrations, 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 the string arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, specify null.

    • request_parameters(Option<HashMap<String, String>>):

      A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

    • request_templates(Option<HashMap<String, String>>):

      Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value.

    • passthrough_behavior(Option<String>):

      Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. The valid value is one of the following: WHEN_NO_MATCH: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request. WHEN_NO_TEMPLATES: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response. NEVER: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.

    • content_handling(Option<ContentHandlingStrategy>):

      Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

      If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehavior is configured to support payload pass-through.

    • timeout_in_millis(i32):

      Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds.

    • cache_namespace(Option<String>):

      Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the cacheNamespace. You can specify the same cacheNamespace across resources to return the same cached data for requests to different resources.

    • cache_key_parameters(Option<Vec<String>>):

      A list of request parameters whose values API Gateway caches. To be valid values for cacheKeyParameters, these parameters must also be specified for Method requestParameters.

    • integration_responses(Option<HashMap<String, IntegrationResponse>>):

      Specifies the integration’s responses.

    • tls_config(Option<TlsConfig>):

      Specifies the TLS configuration for an integration.

  • On failure, responds with SdkError<UpdateIntegrationError>

Constructs a fluent builder for the UpdateIntegrationResponse operation.

Constructs a fluent builder for the UpdateMethod operation.

Constructs a fluent builder for the UpdateMethodResponse operation.

Constructs a fluent builder for the UpdateModel operation.

Constructs a fluent builder for the UpdateRequestValidator operation.

Constructs a fluent builder for the UpdateResource operation.

Constructs a fluent builder for the UpdateRestApi operation.

Constructs a fluent builder for the UpdateStage operation.

Constructs a fluent builder for the UpdateUsage operation.

Constructs a fluent builder for the UpdateUsagePlan operation.

Constructs a fluent builder for the UpdateVpcLink operation.

Creates a new client from an SDK Config.

Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Creates a new client from the service Config.

Panics
  • This method will panic if the conf is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the conf is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
Examples found in repository?
src/client.rs (line 14807)
14806
14807
14808
    pub fn new(sdk_config: &aws_types::sdk_config::SdkConfig) -> Self {
        Self::from_conf(sdk_config.into())
    }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more