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

Client for AmazonApiGatewayV2

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

§Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_apigatewayv2::Client::new(&config);

Occasionally, SDKs may have additional service-specific values that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Config struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_apigatewayv2::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

§Using the Client

A client has a function for every operation that can be performed by the service. For example, the CreateApi operation has a Client::create_api, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.create_api()
    .api_key_selection_expression("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

Implementations§

source§

impl Client

source

pub fn create_api(&self) -> CreateApiFluentBuilder

Constructs a fluent builder for the CreateApi operation.

source§

impl Client

source

pub fn create_api_mapping(&self) -> CreateApiMappingFluentBuilder

Constructs a fluent builder for the CreateApiMapping operation.

source§

impl Client

source

pub fn create_authorizer(&self) -> CreateAuthorizerFluentBuilder

Constructs a fluent builder for the CreateAuthorizer operation.

  • The fluent builder is configurable:
  • On success, responds with CreateAuthorizerOutput with field(s):
    • authorizer_credentials_arn(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, don’t specify this parameter. Supported only for REQUEST authorizers.

    • authorizer_id(Option<String>):

      The authorizer identifier.

    • authorizer_payload_format_version(Option<String>):

      Specifies the format of the payload sent to an HTTP API Lambda authorizer. Required for HTTP API Lambda authorizers. Supported values are 1.0 and 2.0. To learn more, see Working with AWS Lambda authorizers for HTTP APIs.

    • authorizer_result_ttl_in_seconds(Option<i32>):

      The time to live (TTL) for cached authorizer results, in seconds. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway caches authorizer responses. The maximum value is 3600, or 1 hour. Supported only for HTTP API Lambda authorizers.

    • authorizer_type(Option<AuthorizerType>):

      The authorizer type. Specify REQUEST for a Lambda function using incoming request parameters. Specify JWT to use JSON Web Tokens (supported only for HTTP APIs).

    • authorizer_uri(Option<String>):

      The authorizer’s Uniform Resource Identifier (URI). For 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. Supported only for REQUEST authorizers.

    • enable_simple_responses(Option<bool>):

      Specifies whether a Lambda authorizer returns a response in a simple format. If enabled, the Lambda authorizer can return a boolean value instead of an IAM policy. Supported only for HTTP APIs. To learn more, see Working with AWS Lambda authorizers for HTTP APIs

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

      The identity source for which authorization is requested.

      For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. The identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name for WebSocket APIs. For HTTP APIs, use selection expressions prefixed with $, for example, $request.header.Auth, $request.querystring.Name. These parameters are used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, 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. For HTTP APIs, identity sources are also used as the cache key when caching is enabled. To learn more, see Working with AWS Lambda authorizers for HTTP APIs.

      For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example $request.header.Authorization.

    • identity_validation_expression(Option<String>):

      The validation expression does not apply to the REQUEST authorizer.

    • jwt_configuration(Option<JwtConfiguration>):

      Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.

    • name(Option<String>):

      The name of the authorizer.

  • On failure, responds with SdkError<CreateAuthorizerError>
source§

impl Client

source

pub fn create_deployment(&self) -> CreateDeploymentFluentBuilder

Constructs a fluent builder for the CreateDeployment operation.

source§

impl Client

source

pub fn create_domain_name(&self) -> CreateDomainNameFluentBuilder

Constructs a fluent builder for the CreateDomainName operation.

source§

impl Client

source

pub fn create_integration(&self) -> CreateIntegrationFluentBuilder

Constructs a fluent builder for the CreateIntegration operation.

  • The fluent builder is configurable:
    • api_id(impl Into<String>) / set_api_id(Option<String>):
      required: true

      The API identifier.


    • connection_id(impl Into<String>) / set_connection_id(Option<String>):
      required: false

      The ID of the VPC link for a private integration. Supported only for HTTP APIs.


    • connection_type(ConnectionType) / set_connection_type(Option<ConnectionType>):
      required: false

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


    • content_handling_strategy(ContentHandlingStrategy) / set_content_handling_strategy(Option<ContentHandlingStrategy>):
      required: false

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

      CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

      CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

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


    • credentials_arn(impl Into<String>) / set_credentials_arn(Option<String>):
      required: false

      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.


    • description(impl Into<String>) / set_description(Option<String>):
      required: false

      The description of the integration.


    • integration_method(impl Into<String>) / set_integration_method(Option<String>):
      required: false

      Specifies the integration’s HTTP method type.


    • integration_subtype(impl Into<String>) / set_integration_subtype(Option<String>):
      required: false

      Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see Integration subtype reference.


    • integration_type(IntegrationType) / set_integration_type(Option<IntegrationType>):
      required: true

      The integration type of an integration. One of the following:

      AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.

      AWS_PROXY: for integrating the route or method request with a Lambda function or other AWS service action. This integration is also referred to as a Lambda proxy integration.

      HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.

      HTTP_PROXY: for integrating the route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration. For HTTP API private integrations, use an HTTP_PROXY integration.

      MOCK: for integrating the route or method request with API Gateway as a “loopback” endpoint without invoking any backend. Supported only for WebSocket APIs.


    • integration_uri(impl Into<String>) / set_integration_uri(Option<String>):
      required: false

      For a Lambda integration, specify the URI of a Lambda function.

      For an HTTP integration, specify a fully-qualified URL.

      For an HTTP API private integration, specify the ARN of an Application Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map service. If you specify the ARN of an AWS Cloud Map service, API Gateway uses DiscoverInstances to identify resources. You can use query parameters to target specific resources. To learn more, see DiscoverInstances. For private integrations, all resources must be owned by the same AWS account.


    • passthrough_behavior(PassthroughBehavior) / set_passthrough_behavior(Option<PassthroughBehavior>):
      required: false

      Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.

      WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.

      NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.

      WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.


    • payload_format_version(impl Into<String>) / set_payload_format_version(Option<String>):
      required: false

      Specifies the format of the payload sent to an integration. Required for HTTP APIs.


    • request_parameters(impl Into<String>, impl Into<String>) / set_request_parameters(Option<HashMap::<String, String>>):
      required: false

      For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend. 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 backend. 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.

      For HTTP API integrations with a specified integrationSubtype, request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Working with AWS service integrations for HTTP APIs.

      For HTTP API integrations without a specified integrationSubtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to the backend. The key should follow the pattern <action>:<header|querystring|path>.<location> where action can be append, overwrite or remove. For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses.


    • request_templates(impl Into<String>, impl Into<String>) / set_request_templates(Option<HashMap::<String, String>>):
      required: false

      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. Supported only for WebSocket APIs.


    • response_parameters(impl Into<String>, HashMap::<String, String>) / set_response_parameters(Option<HashMap::<String, HashMap::<String, String>>>):
      required: false

      Supported only for HTTP APIs. You use response parameters to transform the HTTP response from a backend integration before returning the response to clients. Specify a key-value map from a selection key to response parameters. The selection key must be a valid HTTP status code within the range of 200-599. Response parameters are a key-value map. The key must match pattern <action>:<header>.<location> or overwrite.statuscode. The action can be append, overwrite or remove. The value can be a static value, or map to response data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses.


    • template_selection_expression(impl Into<String>) / set_template_selection_expression(Option<String>):
      required: false

      The template selection expression for the integration.


    • timeout_in_millis(i32) / set_timeout_in_millis(Option<i32>):
      required: false

      Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.


    • tls_config(TlsConfigInput) / set_tls_config(Option<TlsConfigInput>):
      required: false

      The TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs.


  • On success, responds with CreateIntegrationOutput with field(s):
    • api_gateway_managed(Option<bool>):

      Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can’t delete it.

    • connection_id(Option<String>):

      The ID of the VPC link for a private integration. Supported only for HTTP APIs.

    • connection_type(Option<ConnectionType>):

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

    • content_handling_strategy(Option<ContentHandlingStrategy>):

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

      CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

      CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

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

    • credentials_arn(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.

    • description(Option<String>):

      Represents the description of an integration.

    • integration_id(Option<String>):

      Represents the identifier of an integration.

    • integration_method(Option<String>):

      Specifies the integration’s HTTP method type.

    • integration_response_selection_expression(Option<String>):

      The integration response selection expression for the integration. Supported only for WebSocket APIs. See Integration Response Selection Expressions.

    • integration_subtype(Option<String>):

      Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see Integration subtype reference.

    • integration_type(Option<IntegrationType>):

      The integration type of an integration. One of the following:

      AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.

      AWS_PROXY: for integrating the route or method request with a Lambda function or other AWS service action. This integration is also referred to as a Lambda proxy integration.

      HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.

      HTTP_PROXY: for integrating the route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.

      MOCK: for integrating the route or method request with API Gateway as a “loopback” endpoint without invoking any backend. Supported only for WebSocket APIs.

    • integration_uri(Option<String>):

      For a Lambda integration, specify the URI of a Lambda function.

      For an HTTP integration, specify a fully-qualified URL.

      For an HTTP API private integration, specify the ARN of an Application Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map service. If you specify the ARN of an AWS Cloud Map service, API Gateway uses DiscoverInstances to identify resources. You can use query parameters to target specific resources. To learn more, see DiscoverInstances. For private integrations, all resources must be owned by the same AWS account.

    • passthrough_behavior(Option<PassthroughBehavior>):

      Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.

      WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.

      NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.

      WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.

    • payload_format_version(Option<String>):

      Specifies the format of the payload sent to an integration. Required for HTTP APIs.

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

      For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend. 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 backend. 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.

      For HTTP API integrations with a specified integrationSubtype, request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Working with AWS service integrations for HTTP APIs.

      For HTTP API integrations, without a specified integrationSubtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to backend integrations. The key should follow the pattern <action>:<header|querystring|path>.<location>. The action can be append, overwrite or remove. For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses.

    • 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. Supported only for WebSocket APIs.

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

      Supported only for HTTP APIs. You use response parameters to transform the HTTP response from a backend integration before returning the response to clients. Specify a key-value map from a selection key to response parameters. The selection key must be a valid HTTP status code within the range of 200-599. Response parameters are a key-value map. The key must match pattern <action>:<header>.<location> or overwrite.statuscode. The action can be append, overwrite or remove. The value can be a static value, or map to response data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses.

    • template_selection_expression(Option<String>):

      The template selection expression for the integration. Supported only for WebSocket APIs.

    • timeout_in_millis(Option<i32>):

      Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.

    • tls_config(Option<TlsConfig>):

      The TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs.

  • On failure, responds with SdkError<CreateIntegrationError>
source§

impl Client

source

pub fn create_integration_response( &self ) -> CreateIntegrationResponseFluentBuilder

Constructs a fluent builder for the CreateIntegrationResponse operation.

source§

impl Client

source

pub fn create_model(&self) -> CreateModelFluentBuilder

Constructs a fluent builder for the CreateModel operation.

source§

impl Client

source

pub fn create_route(&self) -> CreateRouteFluentBuilder

Constructs a fluent builder for the CreateRoute operation.

source§

impl Client

source

pub fn create_route_response(&self) -> CreateRouteResponseFluentBuilder

Constructs a fluent builder for the CreateRouteResponse operation.

source§

impl Client

source

pub fn create_stage(&self) -> CreateStageFluentBuilder

Constructs a fluent builder for the CreateStage operation.

source§

impl Client

Constructs a fluent builder for the CreateVpcLink operation.

source§

impl Client

source

pub fn delete_access_log_settings(&self) -> DeleteAccessLogSettingsFluentBuilder

Constructs a fluent builder for the DeleteAccessLogSettings operation.

source§

impl Client

source

pub fn delete_api(&self) -> DeleteApiFluentBuilder

Constructs a fluent builder for the DeleteApi operation.

source§

impl Client

source

pub fn delete_api_mapping(&self) -> DeleteApiMappingFluentBuilder

Constructs a fluent builder for the DeleteApiMapping operation.

source§

impl Client

source

pub fn delete_authorizer(&self) -> DeleteAuthorizerFluentBuilder

Constructs a fluent builder for the DeleteAuthorizer operation.

source§

impl Client

source

pub fn delete_cors_configuration(&self) -> DeleteCorsConfigurationFluentBuilder

Constructs a fluent builder for the DeleteCorsConfiguration operation.

source§

impl Client

source

pub fn delete_deployment(&self) -> DeleteDeploymentFluentBuilder

Constructs a fluent builder for the DeleteDeployment operation.

source§

impl Client

source

pub fn delete_domain_name(&self) -> DeleteDomainNameFluentBuilder

Constructs a fluent builder for the DeleteDomainName operation.

source§

impl Client

source

pub fn delete_integration(&self) -> DeleteIntegrationFluentBuilder

Constructs a fluent builder for the DeleteIntegration operation.

source§

impl Client

source

pub fn delete_integration_response( &self ) -> DeleteIntegrationResponseFluentBuilder

Constructs a fluent builder for the DeleteIntegrationResponse operation.

source§

impl Client

source

pub fn delete_model(&self) -> DeleteModelFluentBuilder

Constructs a fluent builder for the DeleteModel operation.

source§

impl Client

source

pub fn delete_route(&self) -> DeleteRouteFluentBuilder

Constructs a fluent builder for the DeleteRoute operation.

source§

impl Client

source

pub fn delete_route_request_parameter( &self ) -> DeleteRouteRequestParameterFluentBuilder

Constructs a fluent builder for the DeleteRouteRequestParameter operation.

source§

impl Client

source

pub fn delete_route_response(&self) -> DeleteRouteResponseFluentBuilder

Constructs a fluent builder for the DeleteRouteResponse operation.

source§

impl Client

source

pub fn delete_route_settings(&self) -> DeleteRouteSettingsFluentBuilder

Constructs a fluent builder for the DeleteRouteSettings operation.

source§

impl Client

source

pub fn delete_stage(&self) -> DeleteStageFluentBuilder

Constructs a fluent builder for the DeleteStage operation.

source§

impl Client

Constructs a fluent builder for the DeleteVpcLink operation.

source§

impl Client

source

pub fn export_api(&self) -> ExportApiFluentBuilder

Constructs a fluent builder for the ExportApi operation.

source§

impl Client

source

pub fn get_api(&self) -> GetApiFluentBuilder

Constructs a fluent builder for the GetApi operation.

source§

impl Client

source

pub fn get_api_mapping(&self) -> GetApiMappingFluentBuilder

Constructs a fluent builder for the GetApiMapping operation.

source§

impl Client

source

pub fn get_api_mappings(&self) -> GetApiMappingsFluentBuilder

Constructs a fluent builder for the GetApiMappings operation.

source§

impl Client

source

pub fn get_apis(&self) -> GetApisFluentBuilder

Constructs a fluent builder for the GetApis operation.

source§

impl Client

source

pub fn get_authorizer(&self) -> GetAuthorizerFluentBuilder

Constructs a fluent builder for the GetAuthorizer operation.

  • The fluent builder is configurable:
  • On success, responds with GetAuthorizerOutput with field(s):
    • authorizer_credentials_arn(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, don’t specify this parameter. Supported only for REQUEST authorizers.

    • authorizer_id(Option<String>):

      The authorizer identifier.

    • authorizer_payload_format_version(Option<String>):

      Specifies the format of the payload sent to an HTTP API Lambda authorizer. Required for HTTP API Lambda authorizers. Supported values are 1.0 and 2.0. To learn more, see Working with AWS Lambda authorizers for HTTP APIs.

    • authorizer_result_ttl_in_seconds(Option<i32>):

      The time to live (TTL) for cached authorizer results, in seconds. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway caches authorizer responses. The maximum value is 3600, or 1 hour. Supported only for HTTP API Lambda authorizers.

    • authorizer_type(Option<AuthorizerType>):

      The authorizer type. Specify REQUEST for a Lambda function using incoming request parameters. Specify JWT to use JSON Web Tokens (supported only for HTTP APIs).

    • authorizer_uri(Option<String>):

      The authorizer’s Uniform Resource Identifier (URI). For 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. Supported only for REQUEST authorizers.

    • enable_simple_responses(Option<bool>):

      Specifies whether a Lambda authorizer returns a response in a simple format. If enabled, the Lambda authorizer can return a boolean value instead of an IAM policy. Supported only for HTTP APIs. To learn more, see Working with AWS Lambda authorizers for HTTP APIs

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

      The identity source for which authorization is requested.

      For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. The identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name for WebSocket APIs. For HTTP APIs, use selection expressions prefixed with $, for example, $request.header.Auth, $request.querystring.Name. These parameters are used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, 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. For HTTP APIs, identity sources are also used as the cache key when caching is enabled. To learn more, see Working with AWS Lambda authorizers for HTTP APIs.

      For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example $request.header.Authorization.

    • identity_validation_expression(Option<String>):

      The validation expression does not apply to the REQUEST authorizer.

    • jwt_configuration(Option<JwtConfiguration>):

      Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.

    • name(Option<String>):

      The name of the authorizer.

  • On failure, responds with SdkError<GetAuthorizerError>
source§

impl Client

source

pub fn get_authorizers(&self) -> GetAuthorizersFluentBuilder

Constructs a fluent builder for the GetAuthorizers operation.

source§

impl Client

source

pub fn get_deployment(&self) -> GetDeploymentFluentBuilder

Constructs a fluent builder for the GetDeployment operation.

source§

impl Client

source

pub fn get_deployments(&self) -> GetDeploymentsFluentBuilder

Constructs a fluent builder for the GetDeployments operation.

source§

impl Client

source

pub fn get_domain_name(&self) -> GetDomainNameFluentBuilder

Constructs a fluent builder for the GetDomainName operation.

source§

impl Client

source

pub fn get_domain_names(&self) -> GetDomainNamesFluentBuilder

Constructs a fluent builder for the GetDomainNames operation.

source§

impl Client

source

pub fn get_integration(&self) -> GetIntegrationFluentBuilder

Constructs a fluent builder for the GetIntegration operation.

  • The fluent builder is configurable:
  • On success, responds with GetIntegrationOutput with field(s):
    • api_gateway_managed(Option<bool>):

      Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can’t delete it.

    • connection_id(Option<String>):

      The ID of the VPC link for a private integration. Supported only for HTTP APIs.

    • connection_type(Option<ConnectionType>):

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

    • content_handling_strategy(Option<ContentHandlingStrategy>):

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

      CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

      CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

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

    • credentials_arn(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.

    • description(Option<String>):

      Represents the description of an integration.

    • integration_id(Option<String>):

      Represents the identifier of an integration.

    • integration_method(Option<String>):

      Specifies the integration’s HTTP method type.

    • integration_response_selection_expression(Option<String>):

      The integration response selection expression for the integration. Supported only for WebSocket APIs. See Integration Response Selection Expressions.

    • integration_subtype(Option<String>):

      Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see Integration subtype reference.

    • integration_type(Option<IntegrationType>):

      The integration type of an integration. One of the following:

      AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.

      AWS_PROXY: for integrating the route or method request with a Lambda function or other AWS service action. This integration is also referred to as a Lambda proxy integration.

      HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.

      HTTP_PROXY: for integrating the route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.

      MOCK: for integrating the route or method request with API Gateway as a “loopback” endpoint without invoking any backend. Supported only for WebSocket APIs.

    • integration_uri(Option<String>):

      For a Lambda integration, specify the URI of a Lambda function.

      For an HTTP integration, specify a fully-qualified URL.

      For an HTTP API private integration, specify the ARN of an Application Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map service. If you specify the ARN of an AWS Cloud Map service, API Gateway uses DiscoverInstances to identify resources. You can use query parameters to target specific resources. To learn more, see DiscoverInstances. For private integrations, all resources must be owned by the same AWS account.

    • passthrough_behavior(Option<PassthroughBehavior>):

      Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.

      WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.

      NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.

      WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.

    • payload_format_version(Option<String>):

      Specifies the format of the payload sent to an integration. Required for HTTP APIs.

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

      For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend. 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 backend. 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.

      For HTTP API integrations with a specified integrationSubtype, request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Working with AWS service integrations for HTTP APIs.

      For HTTP API integrations, without a specified integrationSubtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to backend integrations. The key should follow the pattern <action>:<header|querystring|path>.<location>. The action can be append, overwrite or remove. For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses.

    • 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. Supported only for WebSocket APIs.

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

      Supported only for HTTP APIs. You use response parameters to transform the HTTP response from a backend integration before returning the response to clients. Specify a key-value map from a selection key to response parameters. The selection key must be a valid HTTP status code within the range of 200-599. Response parameters are a key-value map. The key must match pattern <action>:<header>.<location> or overwrite.statuscode. The action can be append, overwrite or remove. The value can be a static value, or map to response data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses.

    • template_selection_expression(Option<String>):

      The template selection expression for the integration. Supported only for WebSocket APIs.

    • timeout_in_millis(Option<i32>):

      Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.

    • tls_config(Option<TlsConfig>):

      The TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs.

  • On failure, responds with SdkError<GetIntegrationError>
source§

impl Client

source

pub fn get_integration_response(&self) -> GetIntegrationResponseFluentBuilder

Constructs a fluent builder for the GetIntegrationResponse operation.

source§

impl Client

source

pub fn get_integration_responses(&self) -> GetIntegrationResponsesFluentBuilder

Constructs a fluent builder for the GetIntegrationResponses operation.

source§

impl Client

source

pub fn get_integrations(&self) -> GetIntegrationsFluentBuilder

Constructs a fluent builder for the GetIntegrations operation.

source§

impl Client

source

pub fn get_model(&self) -> GetModelFluentBuilder

Constructs a fluent builder for the GetModel operation.

source§

impl Client

source

pub fn get_model_template(&self) -> GetModelTemplateFluentBuilder

Constructs a fluent builder for the GetModelTemplate operation.

source§

impl Client

source

pub fn get_models(&self) -> GetModelsFluentBuilder

Constructs a fluent builder for the GetModels operation.

source§

impl Client

source

pub fn get_route(&self) -> GetRouteFluentBuilder

Constructs a fluent builder for the GetRoute operation.

source§

impl Client

source

pub fn get_route_response(&self) -> GetRouteResponseFluentBuilder

Constructs a fluent builder for the GetRouteResponse operation.

source§

impl Client

source

pub fn get_route_responses(&self) -> GetRouteResponsesFluentBuilder

Constructs a fluent builder for the GetRouteResponses operation.

source§

impl Client

source

pub fn get_routes(&self) -> GetRoutesFluentBuilder

Constructs a fluent builder for the GetRoutes operation.

source§

impl Client

source

pub fn get_stage(&self) -> GetStageFluentBuilder

Constructs a fluent builder for the GetStage operation.

source§

impl Client

source

pub fn get_stages(&self) -> GetStagesFluentBuilder

Constructs a fluent builder for the GetStages operation.

source§

impl Client

source

pub fn get_tags(&self) -> GetTagsFluentBuilder

Constructs a fluent builder for the GetTags operation.

source§

impl Client

Constructs a fluent builder for the GetVpcLink operation.

source§

impl Client

Constructs a fluent builder for the GetVpcLinks operation.

source§

impl Client

source

pub fn import_api(&self) -> ImportApiFluentBuilder

Constructs a fluent builder for the ImportApi operation.

source§

impl Client

source

pub fn reimport_api(&self) -> ReimportApiFluentBuilder

Constructs a fluent builder for the ReimportApi operation.

source§

impl Client

source

pub fn reset_authorizers_cache(&self) -> ResetAuthorizersCacheFluentBuilder

Constructs a fluent builder for the ResetAuthorizersCache operation.

source§

impl Client

source

pub fn tag_resource(&self) -> TagResourceFluentBuilder

Constructs a fluent builder for the TagResource operation.

source§

impl Client

source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

source§

impl Client

source

pub fn update_api(&self) -> UpdateApiFluentBuilder

Constructs a fluent builder for the UpdateApi operation.

source§

impl Client

source

pub fn update_api_mapping(&self) -> UpdateApiMappingFluentBuilder

Constructs a fluent builder for the UpdateApiMapping operation.

source§

impl Client

source

pub fn update_authorizer(&self) -> UpdateAuthorizerFluentBuilder

Constructs a fluent builder for the UpdateAuthorizer operation.

  • The fluent builder is configurable:
  • On success, responds with UpdateAuthorizerOutput with field(s):
    • authorizer_credentials_arn(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, don’t specify this parameter. Supported only for REQUEST authorizers.

    • authorizer_id(Option<String>):

      The authorizer identifier.

    • authorizer_payload_format_version(Option<String>):

      Specifies the format of the payload sent to an HTTP API Lambda authorizer. Required for HTTP API Lambda authorizers. Supported values are 1.0 and 2.0. To learn more, see Working with AWS Lambda authorizers for HTTP APIs.

    • authorizer_result_ttl_in_seconds(Option<i32>):

      The time to live (TTL) for cached authorizer results, in seconds. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway caches authorizer responses. The maximum value is 3600, or 1 hour. Supported only for HTTP API Lambda authorizers.

    • authorizer_type(Option<AuthorizerType>):

      The authorizer type. Specify REQUEST for a Lambda function using incoming request parameters. Specify JWT to use JSON Web Tokens (supported only for HTTP APIs).

    • authorizer_uri(Option<String>):

      The authorizer’s Uniform Resource Identifier (URI). For 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. Supported only for REQUEST authorizers.

    • enable_simple_responses(Option<bool>):

      Specifies whether a Lambda authorizer returns a response in a simple format. If enabled, the Lambda authorizer can return a boolean value instead of an IAM policy. Supported only for HTTP APIs. To learn more, see Working with AWS Lambda authorizers for HTTP APIs

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

      The identity source for which authorization is requested.

      For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. The identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name for WebSocket APIs. For HTTP APIs, use selection expressions prefixed with $, for example, $request.header.Auth, $request.querystring.Name. These parameters are used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, 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. For HTTP APIs, identity sources are also used as the cache key when caching is enabled. To learn more, see Working with AWS Lambda authorizers for HTTP APIs.

      For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example $request.header.Authorization.

    • identity_validation_expression(Option<String>):

      The validation expression does not apply to the REQUEST authorizer.

    • jwt_configuration(Option<JwtConfiguration>):

      Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.

    • name(Option<String>):

      The name of the authorizer.

  • On failure, responds with SdkError<UpdateAuthorizerError>
source§

impl Client

source

pub fn update_deployment(&self) -> UpdateDeploymentFluentBuilder

Constructs a fluent builder for the UpdateDeployment operation.

source§

impl Client

source

pub fn update_domain_name(&self) -> UpdateDomainNameFluentBuilder

Constructs a fluent builder for the UpdateDomainName operation.

source§

impl Client

source

pub fn update_integration(&self) -> UpdateIntegrationFluentBuilder

Constructs a fluent builder for the UpdateIntegration operation.

  • The fluent builder is configurable:
    • api_id(impl Into<String>) / set_api_id(Option<String>):
      required: true

      The API identifier.


    • connection_id(impl Into<String>) / set_connection_id(Option<String>):
      required: false

      The ID of the VPC link for a private integration. Supported only for HTTP APIs.


    • connection_type(ConnectionType) / set_connection_type(Option<ConnectionType>):
      required: false

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


    • content_handling_strategy(ContentHandlingStrategy) / set_content_handling_strategy(Option<ContentHandlingStrategy>):
      required: false

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

      CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

      CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

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


    • credentials_arn(impl Into<String>) / set_credentials_arn(Option<String>):
      required: false

      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.


    • description(impl Into<String>) / set_description(Option<String>):
      required: false

      The description of the integration


    • integration_id(impl Into<String>) / set_integration_id(Option<String>):
      required: true

      The integration ID.


    • integration_method(impl Into<String>) / set_integration_method(Option<String>):
      required: false

      Specifies the integration’s HTTP method type.


    • integration_subtype(impl Into<String>) / set_integration_subtype(Option<String>):
      required: false

      Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see Integration subtype reference.


    • integration_type(IntegrationType) / set_integration_type(Option<IntegrationType>):
      required: false

      The integration type of an integration. One of the following:

      AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.

      AWS_PROXY: for integrating the route or method request with a Lambda function or other AWS service action. This integration is also referred to as a Lambda proxy integration.

      HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.

      HTTP_PROXY: for integrating the route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration. For HTTP API private integrations, use an HTTP_PROXY integration.

      MOCK: for integrating the route or method request with API Gateway as a “loopback” endpoint without invoking any backend. Supported only for WebSocket APIs.


    • integration_uri(impl Into<String>) / set_integration_uri(Option<String>):
      required: false

      For a Lambda integration, specify the URI of a Lambda function.

      For an HTTP integration, specify a fully-qualified URL.

      For an HTTP API private integration, specify the ARN of an Application Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map service. If you specify the ARN of an AWS Cloud Map service, API Gateway uses DiscoverInstances to identify resources. You can use query parameters to target specific resources. To learn more, see DiscoverInstances. For private integrations, all resources must be owned by the same AWS account.


    • passthrough_behavior(PassthroughBehavior) / set_passthrough_behavior(Option<PassthroughBehavior>):
      required: false

      Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.

      WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.

      NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.

      WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.


    • payload_format_version(impl Into<String>) / set_payload_format_version(Option<String>):
      required: false

      Specifies the format of the payload sent to an integration. Required for HTTP APIs.


    • request_parameters(impl Into<String>, impl Into<String>) / set_request_parameters(Option<HashMap::<String, String>>):
      required: false

      For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend. 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 backend. 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.

      For HTTP API integrations with a specified integrationSubtype, request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Working with AWS service integrations for HTTP APIs.

      For HTTP API integrations, without a specified integrationSubtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to the backend. The key should follow the pattern <action>:<header|querystring|path>.<location> where action can be append, overwrite or remove. For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses.


    • request_templates(impl Into<String>, impl Into<String>) / set_request_templates(Option<HashMap::<String, String>>):
      required: false

      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. Supported only for WebSocket APIs.


    • response_parameters(impl Into<String>, HashMap::<String, String>) / set_response_parameters(Option<HashMap::<String, HashMap::<String, String>>>):
      required: false

      Supported only for HTTP APIs. You use response parameters to transform the HTTP response from a backend integration before returning the response to clients. Specify a key-value map from a selection key to response parameters. The selection key must be a valid HTTP status code within the range of 200-599. Response parameters are a key-value map. The key must match pattern <action>:<header>.<location> or overwrite.statuscode. The action can be append, overwrite or remove. The value can be a static value, or map to response data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses.


    • template_selection_expression(impl Into<String>) / set_template_selection_expression(Option<String>):
      required: false

      The template selection expression for the integration.


    • timeout_in_millis(i32) / set_timeout_in_millis(Option<i32>):
      required: false

      Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.


    • tls_config(TlsConfigInput) / set_tls_config(Option<TlsConfigInput>):
      required: false

      The TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs.


  • On success, responds with UpdateIntegrationOutput with field(s):
    • api_gateway_managed(Option<bool>):

      Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can’t delete it.

    • connection_id(Option<String>):

      The ID of the VPC link for a private integration. Supported only for HTTP APIs.

    • connection_type(Option<ConnectionType>):

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

    • content_handling_strategy(Option<ContentHandlingStrategy>):

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

      CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

      CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

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

    • credentials_arn(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.

    • description(Option<String>):

      Represents the description of an integration.

    • integration_id(Option<String>):

      Represents the identifier of an integration.

    • integration_method(Option<String>):

      Specifies the integration’s HTTP method type.

    • integration_response_selection_expression(Option<String>):

      The integration response selection expression for the integration. Supported only for WebSocket APIs. See Integration Response Selection Expressions.

    • integration_subtype(Option<String>):

      Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see Integration subtype reference.

    • integration_type(Option<IntegrationType>):

      The integration type of an integration. One of the following:

      AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.

      AWS_PROXY: for integrating the route or method request with a Lambda function or other AWS service action. This integration is also referred to as a Lambda proxy integration.

      HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.

      HTTP_PROXY: for integrating the route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.

      MOCK: for integrating the route or method request with API Gateway as a “loopback” endpoint without invoking any backend. Supported only for WebSocket APIs.

    • integration_uri(Option<String>):

      For a Lambda integration, specify the URI of a Lambda function.

      For an HTTP integration, specify a fully-qualified URL.

      For an HTTP API private integration, specify the ARN of an Application Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map service. If you specify the ARN of an AWS Cloud Map service, API Gateway uses DiscoverInstances to identify resources. You can use query parameters to target specific resources. To learn more, see DiscoverInstances. For private integrations, all resources must be owned by the same AWS account.

    • passthrough_behavior(Option<PassthroughBehavior>):

      Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.

      WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.

      NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.

      WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.

    • payload_format_version(Option<String>):

      Specifies the format of the payload sent to an integration. Required for HTTP APIs.

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

      For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend. 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 backend. 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.

      For HTTP API integrations with a specified integrationSubtype, request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Working with AWS service integrations for HTTP APIs.

      For HTTP API integrations, without a specified integrationSubtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to backend integrations. The key should follow the pattern <action>:<header|querystring|path>.<location>. The action can be append, overwrite or remove. For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses.

    • 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. Supported only for WebSocket APIs.

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

      Supported only for HTTP APIs. You use response parameters to transform the HTTP response from a backend integration before returning the response to clients. Specify a key-value map from a selection key to response parameters. The selection key must be a valid HTTP status code within the range of 200-599. Response parameters are a key-value map. The key must match pattern <action>:<header>.<location> or overwrite.statuscode. The action can be append, overwrite or remove. The value can be a static value, or map to response data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses.

    • template_selection_expression(Option<String>):

      The template selection expression for the integration. Supported only for WebSocket APIs.

    • timeout_in_millis(Option<i32>):

      Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.

    • tls_config(Option<TlsConfig>):

      The TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs.

  • On failure, responds with SdkError<UpdateIntegrationError>
source§

impl Client

source

pub fn update_integration_response( &self ) -> UpdateIntegrationResponseFluentBuilder

Constructs a fluent builder for the UpdateIntegrationResponse operation.

source§

impl Client

source

pub fn update_model(&self) -> UpdateModelFluentBuilder

Constructs a fluent builder for the UpdateModel operation.

source§

impl Client

source

pub fn update_route(&self) -> UpdateRouteFluentBuilder

Constructs a fluent builder for the UpdateRoute operation.

source§

impl Client

source

pub fn update_route_response(&self) -> UpdateRouteResponseFluentBuilder

Constructs a fluent builder for the UpdateRouteResponse operation.

source§

impl Client

source

pub fn update_stage(&self) -> UpdateStageFluentBuilder

Constructs a fluent builder for the UpdateStage operation.

source§

impl Client

Constructs a fluent builder for the UpdateVpcLink operation.

source§

impl Client

source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

§Panics

This method will panic in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

source

pub fn config(&self) -> &Config

Returns the client’s configuration.

source§

impl Client

source

pub fn new(sdk_config: &SdkConfig) -> Self

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.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

source§

impl Clone for Client

source§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more