aws_sdk_apigatewayv2/operation/update_integration/_update_integration_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Updates an Integration.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateIntegrationInput {
7 /// <p>The API identifier.</p>
8 pub api_id: ::std::option::Option<::std::string::String>,
9 /// <p>The ID of the VPC link for a private integration. Supported only for HTTP APIs.</p>
10 pub connection_id: ::std::option::Option<::std::string::String>,
11 /// <p>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.</p>
12 pub connection_type: ::std::option::Option<crate::types::ConnectionType>,
13 /// <p>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:</p>
14 /// <p>CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.</p>
15 /// <p>CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.</p>
16 /// <p>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.</p>
17 pub content_handling_strategy: ::std::option::Option<crate::types::ContentHandlingStrategy>,
18 /// <p>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.</p>
19 pub credentials_arn: ::std::option::Option<::std::string::String>,
20 /// <p>The description of the integration</p>
21 pub description: ::std::option::Option<::std::string::String>,
22 /// <p>The integration ID.</p>
23 pub integration_id: ::std::option::Option<::std::string::String>,
24 /// <p>Specifies the integration's HTTP method type.</p>
25 pub integration_method: ::std::option::Option<::std::string::String>,
26 /// <p>Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html">Integration subtype reference</a>.</p>
27 pub integration_subtype: ::std::option::Option<::std::string::String>,
28 /// <p>The integration type of an integration. One of the following:</p>
29 /// <p>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.</p>
30 /// <p>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.</p>
31 /// <p>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.</p>
32 /// <p>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.</p>
33 /// <p>MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.</p>
34 pub integration_type: ::std::option::Option<crate::types::IntegrationType>,
35 /// <p>For a Lambda integration, specify the URI of a Lambda function.</p>
36 /// <p>For an HTTP integration, specify a fully-qualified URL.</p>
37 /// <p>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 <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html">DiscoverInstances</a>. For private integrations, all resources must be owned by the same AWS account.</p>
38 pub integration_uri: ::std::option::Option<::std::string::String>,
39 /// <p>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.</p>
40 /// <p>WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.</p>
41 /// <p>NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.</p>
42 /// <p>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.</p>
43 pub passthrough_behavior: ::std::option::Option<crate::types::PassthroughBehavior>,
44 /// <p>Specifies the format of the payload sent to an integration. Required for HTTP APIs. Supported values for Lambda proxy integrations are 1.0 and 2.0. For all other integrations, 1.0 is the only supported value. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html">Working with AWS Lambda proxy integrations for HTTP APIs</a>.</p>
45 pub payload_format_version: ::std::option::Option<::std::string::String>,
46 /// <p>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.<replaceable>
47 /// {location}
48 /// </replaceable>.<replaceable>
49 /// {name}
50 /// </replaceable> , where <replaceable>
51 /// {location}
52 /// </replaceable> is querystring, path, or header; and <replaceable>
53 /// {name}
54 /// </replaceable> must be a valid and unique method request parameter name.</p>
55 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html">Working with AWS service integrations for HTTP APIs</a>.</p>
56 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
57 pub request_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
58 /// <p>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.</p>
59 pub request_templates: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
60 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
61 pub response_parameters: ::std::option::Option<
62 ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
63 >,
64 /// <p>The template selection expression for the integration.</p>
65 pub template_selection_expression: ::std::option::Option<::std::string::String>,
66 /// <p>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.</p>
67 pub timeout_in_millis: ::std::option::Option<i32>,
68 /// <p>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.</p>
69 pub tls_config: ::std::option::Option<crate::types::TlsConfigInput>,
70}
71impl UpdateIntegrationInput {
72 /// <p>The API identifier.</p>
73 pub fn api_id(&self) -> ::std::option::Option<&str> {
74 self.api_id.as_deref()
75 }
76 /// <p>The ID of the VPC link for a private integration. Supported only for HTTP APIs.</p>
77 pub fn connection_id(&self) -> ::std::option::Option<&str> {
78 self.connection_id.as_deref()
79 }
80 /// <p>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.</p>
81 pub fn connection_type(&self) -> ::std::option::Option<&crate::types::ConnectionType> {
82 self.connection_type.as_ref()
83 }
84 /// <p>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:</p>
85 /// <p>CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.</p>
86 /// <p>CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.</p>
87 /// <p>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.</p>
88 pub fn content_handling_strategy(&self) -> ::std::option::Option<&crate::types::ContentHandlingStrategy> {
89 self.content_handling_strategy.as_ref()
90 }
91 /// <p>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.</p>
92 pub fn credentials_arn(&self) -> ::std::option::Option<&str> {
93 self.credentials_arn.as_deref()
94 }
95 /// <p>The description of the integration</p>
96 pub fn description(&self) -> ::std::option::Option<&str> {
97 self.description.as_deref()
98 }
99 /// <p>The integration ID.</p>
100 pub fn integration_id(&self) -> ::std::option::Option<&str> {
101 self.integration_id.as_deref()
102 }
103 /// <p>Specifies the integration's HTTP method type.</p>
104 pub fn integration_method(&self) -> ::std::option::Option<&str> {
105 self.integration_method.as_deref()
106 }
107 /// <p>Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html">Integration subtype reference</a>.</p>
108 pub fn integration_subtype(&self) -> ::std::option::Option<&str> {
109 self.integration_subtype.as_deref()
110 }
111 /// <p>The integration type of an integration. One of the following:</p>
112 /// <p>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.</p>
113 /// <p>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.</p>
114 /// <p>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.</p>
115 /// <p>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.</p>
116 /// <p>MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.</p>
117 pub fn integration_type(&self) -> ::std::option::Option<&crate::types::IntegrationType> {
118 self.integration_type.as_ref()
119 }
120 /// <p>For a Lambda integration, specify the URI of a Lambda function.</p>
121 /// <p>For an HTTP integration, specify a fully-qualified URL.</p>
122 /// <p>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 <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html">DiscoverInstances</a>. For private integrations, all resources must be owned by the same AWS account.</p>
123 pub fn integration_uri(&self) -> ::std::option::Option<&str> {
124 self.integration_uri.as_deref()
125 }
126 /// <p>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.</p>
127 /// <p>WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.</p>
128 /// <p>NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.</p>
129 /// <p>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.</p>
130 pub fn passthrough_behavior(&self) -> ::std::option::Option<&crate::types::PassthroughBehavior> {
131 self.passthrough_behavior.as_ref()
132 }
133 /// <p>Specifies the format of the payload sent to an integration. Required for HTTP APIs. Supported values for Lambda proxy integrations are 1.0 and 2.0. For all other integrations, 1.0 is the only supported value. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html">Working with AWS Lambda proxy integrations for HTTP APIs</a>.</p>
134 pub fn payload_format_version(&self) -> ::std::option::Option<&str> {
135 self.payload_format_version.as_deref()
136 }
137 /// <p>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.<replaceable>
138 /// {location}
139 /// </replaceable>.<replaceable>
140 /// {name}
141 /// </replaceable> , where <replaceable>
142 /// {location}
143 /// </replaceable> is querystring, path, or header; and <replaceable>
144 /// {name}
145 /// </replaceable> must be a valid and unique method request parameter name.</p>
146 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html">Working with AWS service integrations for HTTP APIs</a>.</p>
147 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
148 pub fn request_parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
149 self.request_parameters.as_ref()
150 }
151 /// <p>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.</p>
152 pub fn request_templates(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
153 self.request_templates.as_ref()
154 }
155 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
156 pub fn response_parameters(
157 &self,
158 ) -> ::std::option::Option<
159 &::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
160 > {
161 self.response_parameters.as_ref()
162 }
163 /// <p>The template selection expression for the integration.</p>
164 pub fn template_selection_expression(&self) -> ::std::option::Option<&str> {
165 self.template_selection_expression.as_deref()
166 }
167 /// <p>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.</p>
168 pub fn timeout_in_millis(&self) -> ::std::option::Option<i32> {
169 self.timeout_in_millis
170 }
171 /// <p>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.</p>
172 pub fn tls_config(&self) -> ::std::option::Option<&crate::types::TlsConfigInput> {
173 self.tls_config.as_ref()
174 }
175}
176impl UpdateIntegrationInput {
177 /// Creates a new builder-style object to manufacture [`UpdateIntegrationInput`](crate::operation::update_integration::UpdateIntegrationInput).
178 pub fn builder() -> crate::operation::update_integration::builders::UpdateIntegrationInputBuilder {
179 crate::operation::update_integration::builders::UpdateIntegrationInputBuilder::default()
180 }
181}
182
183/// A builder for [`UpdateIntegrationInput`](crate::operation::update_integration::UpdateIntegrationInput).
184#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
185#[non_exhaustive]
186pub struct UpdateIntegrationInputBuilder {
187 pub(crate) api_id: ::std::option::Option<::std::string::String>,
188 pub(crate) connection_id: ::std::option::Option<::std::string::String>,
189 pub(crate) connection_type: ::std::option::Option<crate::types::ConnectionType>,
190 pub(crate) content_handling_strategy: ::std::option::Option<crate::types::ContentHandlingStrategy>,
191 pub(crate) credentials_arn: ::std::option::Option<::std::string::String>,
192 pub(crate) description: ::std::option::Option<::std::string::String>,
193 pub(crate) integration_id: ::std::option::Option<::std::string::String>,
194 pub(crate) integration_method: ::std::option::Option<::std::string::String>,
195 pub(crate) integration_subtype: ::std::option::Option<::std::string::String>,
196 pub(crate) integration_type: ::std::option::Option<crate::types::IntegrationType>,
197 pub(crate) integration_uri: ::std::option::Option<::std::string::String>,
198 pub(crate) passthrough_behavior: ::std::option::Option<crate::types::PassthroughBehavior>,
199 pub(crate) payload_format_version: ::std::option::Option<::std::string::String>,
200 pub(crate) request_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
201 pub(crate) request_templates: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
202 pub(crate) response_parameters: ::std::option::Option<
203 ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
204 >,
205 pub(crate) template_selection_expression: ::std::option::Option<::std::string::String>,
206 pub(crate) timeout_in_millis: ::std::option::Option<i32>,
207 pub(crate) tls_config: ::std::option::Option<crate::types::TlsConfigInput>,
208}
209impl UpdateIntegrationInputBuilder {
210 /// <p>The API identifier.</p>
211 /// This field is required.
212 pub fn api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213 self.api_id = ::std::option::Option::Some(input.into());
214 self
215 }
216 /// <p>The API identifier.</p>
217 pub fn set_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218 self.api_id = input;
219 self
220 }
221 /// <p>The API identifier.</p>
222 pub fn get_api_id(&self) -> &::std::option::Option<::std::string::String> {
223 &self.api_id
224 }
225 /// <p>The ID of the VPC link for a private integration. Supported only for HTTP APIs.</p>
226 pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227 self.connection_id = ::std::option::Option::Some(input.into());
228 self
229 }
230 /// <p>The ID of the VPC link for a private integration. Supported only for HTTP APIs.</p>
231 pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232 self.connection_id = input;
233 self
234 }
235 /// <p>The ID of the VPC link for a private integration. Supported only for HTTP APIs.</p>
236 pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
237 &self.connection_id
238 }
239 /// <p>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.</p>
240 pub fn connection_type(mut self, input: crate::types::ConnectionType) -> Self {
241 self.connection_type = ::std::option::Option::Some(input);
242 self
243 }
244 /// <p>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.</p>
245 pub fn set_connection_type(mut self, input: ::std::option::Option<crate::types::ConnectionType>) -> Self {
246 self.connection_type = input;
247 self
248 }
249 /// <p>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.</p>
250 pub fn get_connection_type(&self) -> &::std::option::Option<crate::types::ConnectionType> {
251 &self.connection_type
252 }
253 /// <p>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:</p>
254 /// <p>CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.</p>
255 /// <p>CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.</p>
256 /// <p>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.</p>
257 pub fn content_handling_strategy(mut self, input: crate::types::ContentHandlingStrategy) -> Self {
258 self.content_handling_strategy = ::std::option::Option::Some(input);
259 self
260 }
261 /// <p>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:</p>
262 /// <p>CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.</p>
263 /// <p>CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.</p>
264 /// <p>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.</p>
265 pub fn set_content_handling_strategy(mut self, input: ::std::option::Option<crate::types::ContentHandlingStrategy>) -> Self {
266 self.content_handling_strategy = input;
267 self
268 }
269 /// <p>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:</p>
270 /// <p>CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.</p>
271 /// <p>CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.</p>
272 /// <p>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.</p>
273 pub fn get_content_handling_strategy(&self) -> &::std::option::Option<crate::types::ContentHandlingStrategy> {
274 &self.content_handling_strategy
275 }
276 /// <p>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.</p>
277 pub fn credentials_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
278 self.credentials_arn = ::std::option::Option::Some(input.into());
279 self
280 }
281 /// <p>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.</p>
282 pub fn set_credentials_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283 self.credentials_arn = input;
284 self
285 }
286 /// <p>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.</p>
287 pub fn get_credentials_arn(&self) -> &::std::option::Option<::std::string::String> {
288 &self.credentials_arn
289 }
290 /// <p>The description of the integration</p>
291 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
292 self.description = ::std::option::Option::Some(input.into());
293 self
294 }
295 /// <p>The description of the integration</p>
296 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
297 self.description = input;
298 self
299 }
300 /// <p>The description of the integration</p>
301 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
302 &self.description
303 }
304 /// <p>The integration ID.</p>
305 /// This field is required.
306 pub fn integration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
307 self.integration_id = ::std::option::Option::Some(input.into());
308 self
309 }
310 /// <p>The integration ID.</p>
311 pub fn set_integration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
312 self.integration_id = input;
313 self
314 }
315 /// <p>The integration ID.</p>
316 pub fn get_integration_id(&self) -> &::std::option::Option<::std::string::String> {
317 &self.integration_id
318 }
319 /// <p>Specifies the integration's HTTP method type.</p>
320 pub fn integration_method(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
321 self.integration_method = ::std::option::Option::Some(input.into());
322 self
323 }
324 /// <p>Specifies the integration's HTTP method type.</p>
325 pub fn set_integration_method(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
326 self.integration_method = input;
327 self
328 }
329 /// <p>Specifies the integration's HTTP method type.</p>
330 pub fn get_integration_method(&self) -> &::std::option::Option<::std::string::String> {
331 &self.integration_method
332 }
333 /// <p>Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html">Integration subtype reference</a>.</p>
334 pub fn integration_subtype(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
335 self.integration_subtype = ::std::option::Option::Some(input.into());
336 self
337 }
338 /// <p>Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html">Integration subtype reference</a>.</p>
339 pub fn set_integration_subtype(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
340 self.integration_subtype = input;
341 self
342 }
343 /// <p>Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html">Integration subtype reference</a>.</p>
344 pub fn get_integration_subtype(&self) -> &::std::option::Option<::std::string::String> {
345 &self.integration_subtype
346 }
347 /// <p>The integration type of an integration. One of the following:</p>
348 /// <p>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.</p>
349 /// <p>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.</p>
350 /// <p>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.</p>
351 /// <p>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.</p>
352 /// <p>MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.</p>
353 pub fn integration_type(mut self, input: crate::types::IntegrationType) -> Self {
354 self.integration_type = ::std::option::Option::Some(input);
355 self
356 }
357 /// <p>The integration type of an integration. One of the following:</p>
358 /// <p>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.</p>
359 /// <p>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.</p>
360 /// <p>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.</p>
361 /// <p>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.</p>
362 /// <p>MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.</p>
363 pub fn set_integration_type(mut self, input: ::std::option::Option<crate::types::IntegrationType>) -> Self {
364 self.integration_type = input;
365 self
366 }
367 /// <p>The integration type of an integration. One of the following:</p>
368 /// <p>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.</p>
369 /// <p>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.</p>
370 /// <p>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.</p>
371 /// <p>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.</p>
372 /// <p>MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.</p>
373 pub fn get_integration_type(&self) -> &::std::option::Option<crate::types::IntegrationType> {
374 &self.integration_type
375 }
376 /// <p>For a Lambda integration, specify the URI of a Lambda function.</p>
377 /// <p>For an HTTP integration, specify a fully-qualified URL.</p>
378 /// <p>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 <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html">DiscoverInstances</a>. For private integrations, all resources must be owned by the same AWS account.</p>
379 pub fn integration_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
380 self.integration_uri = ::std::option::Option::Some(input.into());
381 self
382 }
383 /// <p>For a Lambda integration, specify the URI of a Lambda function.</p>
384 /// <p>For an HTTP integration, specify a fully-qualified URL.</p>
385 /// <p>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 <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html">DiscoverInstances</a>. For private integrations, all resources must be owned by the same AWS account.</p>
386 pub fn set_integration_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
387 self.integration_uri = input;
388 self
389 }
390 /// <p>For a Lambda integration, specify the URI of a Lambda function.</p>
391 /// <p>For an HTTP integration, specify a fully-qualified URL.</p>
392 /// <p>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 <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html">DiscoverInstances</a>. For private integrations, all resources must be owned by the same AWS account.</p>
393 pub fn get_integration_uri(&self) -> &::std::option::Option<::std::string::String> {
394 &self.integration_uri
395 }
396 /// <p>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.</p>
397 /// <p>WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.</p>
398 /// <p>NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.</p>
399 /// <p>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.</p>
400 pub fn passthrough_behavior(mut self, input: crate::types::PassthroughBehavior) -> Self {
401 self.passthrough_behavior = ::std::option::Option::Some(input);
402 self
403 }
404 /// <p>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.</p>
405 /// <p>WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.</p>
406 /// <p>NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.</p>
407 /// <p>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.</p>
408 pub fn set_passthrough_behavior(mut self, input: ::std::option::Option<crate::types::PassthroughBehavior>) -> Self {
409 self.passthrough_behavior = input;
410 self
411 }
412 /// <p>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.</p>
413 /// <p>WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.</p>
414 /// <p>NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.</p>
415 /// <p>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.</p>
416 pub fn get_passthrough_behavior(&self) -> &::std::option::Option<crate::types::PassthroughBehavior> {
417 &self.passthrough_behavior
418 }
419 /// <p>Specifies the format of the payload sent to an integration. Required for HTTP APIs. Supported values for Lambda proxy integrations are 1.0 and 2.0. For all other integrations, 1.0 is the only supported value. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html">Working with AWS Lambda proxy integrations for HTTP APIs</a>.</p>
420 pub fn payload_format_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
421 self.payload_format_version = ::std::option::Option::Some(input.into());
422 self
423 }
424 /// <p>Specifies the format of the payload sent to an integration. Required for HTTP APIs. Supported values for Lambda proxy integrations are 1.0 and 2.0. For all other integrations, 1.0 is the only supported value. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html">Working with AWS Lambda proxy integrations for HTTP APIs</a>.</p>
425 pub fn set_payload_format_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
426 self.payload_format_version = input;
427 self
428 }
429 /// <p>Specifies the format of the payload sent to an integration. Required for HTTP APIs. Supported values for Lambda proxy integrations are 1.0 and 2.0. For all other integrations, 1.0 is the only supported value. To learn more, see <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html">Working with AWS Lambda proxy integrations for HTTP APIs</a>.</p>
430 pub fn get_payload_format_version(&self) -> &::std::option::Option<::std::string::String> {
431 &self.payload_format_version
432 }
433 /// Adds a key-value pair to `request_parameters`.
434 ///
435 /// To override the contents of this collection use [`set_request_parameters`](Self::set_request_parameters).
436 ///
437 /// <p>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.<replaceable>
438 /// {location}
439 /// </replaceable>.<replaceable>
440 /// {name}
441 /// </replaceable> , where <replaceable>
442 /// {location}
443 /// </replaceable> is querystring, path, or header; and <replaceable>
444 /// {name}
445 /// </replaceable> must be a valid and unique method request parameter name.</p>
446 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html">Working with AWS service integrations for HTTP APIs</a>.</p>
447 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
448 pub fn request_parameters(
449 mut self,
450 k: impl ::std::convert::Into<::std::string::String>,
451 v: impl ::std::convert::Into<::std::string::String>,
452 ) -> Self {
453 let mut hash_map = self.request_parameters.unwrap_or_default();
454 hash_map.insert(k.into(), v.into());
455 self.request_parameters = ::std::option::Option::Some(hash_map);
456 self
457 }
458 /// <p>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.<replaceable>
459 /// {location}
460 /// </replaceable>.<replaceable>
461 /// {name}
462 /// </replaceable> , where <replaceable>
463 /// {location}
464 /// </replaceable> is querystring, path, or header; and <replaceable>
465 /// {name}
466 /// </replaceable> must be a valid and unique method request parameter name.</p>
467 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html">Working with AWS service integrations for HTTP APIs</a>.</p>
468 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
469 pub fn set_request_parameters(
470 mut self,
471 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
472 ) -> Self {
473 self.request_parameters = input;
474 self
475 }
476 /// <p>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.<replaceable>
477 /// {location}
478 /// </replaceable>.<replaceable>
479 /// {name}
480 /// </replaceable> , where <replaceable>
481 /// {location}
482 /// </replaceable> is querystring, path, or header; and <replaceable>
483 /// {name}
484 /// </replaceable> must be a valid and unique method request parameter name.</p>
485 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html">Working with AWS service integrations for HTTP APIs</a>.</p>
486 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
487 pub fn get_request_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
488 &self.request_parameters
489 }
490 /// Adds a key-value pair to `request_templates`.
491 ///
492 /// To override the contents of this collection use [`set_request_templates`](Self::set_request_templates).
493 ///
494 /// <p>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.</p>
495 pub fn request_templates(
496 mut self,
497 k: impl ::std::convert::Into<::std::string::String>,
498 v: impl ::std::convert::Into<::std::string::String>,
499 ) -> Self {
500 let mut hash_map = self.request_templates.unwrap_or_default();
501 hash_map.insert(k.into(), v.into());
502 self.request_templates = ::std::option::Option::Some(hash_map);
503 self
504 }
505 /// <p>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.</p>
506 pub fn set_request_templates(
507 mut self,
508 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
509 ) -> Self {
510 self.request_templates = input;
511 self
512 }
513 /// <p>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.</p>
514 pub fn get_request_templates(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
515 &self.request_templates
516 }
517 /// Adds a key-value pair to `response_parameters`.
518 ///
519 /// To override the contents of this collection use [`set_response_parameters`](Self::set_response_parameters).
520 ///
521 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
522 pub fn response_parameters(
523 mut self,
524 k: impl ::std::convert::Into<::std::string::String>,
525 v: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
526 ) -> Self {
527 let mut hash_map = self.response_parameters.unwrap_or_default();
528 hash_map.insert(k.into(), v);
529 self.response_parameters = ::std::option::Option::Some(hash_map);
530 self
531 }
532 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
533 pub fn set_response_parameters(
534 mut self,
535 input: ::std::option::Option<
536 ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
537 >,
538 ) -> Self {
539 self.response_parameters = input;
540 self
541 }
542 /// <p>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 <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html">Transforming API requests and responses</a>.</p>
543 pub fn get_response_parameters(
544 &self,
545 ) -> &::std::option::Option<
546 ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
547 > {
548 &self.response_parameters
549 }
550 /// <p>The template selection expression for the integration.</p>
551 pub fn template_selection_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
552 self.template_selection_expression = ::std::option::Option::Some(input.into());
553 self
554 }
555 /// <p>The template selection expression for the integration.</p>
556 pub fn set_template_selection_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
557 self.template_selection_expression = input;
558 self
559 }
560 /// <p>The template selection expression for the integration.</p>
561 pub fn get_template_selection_expression(&self) -> &::std::option::Option<::std::string::String> {
562 &self.template_selection_expression
563 }
564 /// <p>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.</p>
565 pub fn timeout_in_millis(mut self, input: i32) -> Self {
566 self.timeout_in_millis = ::std::option::Option::Some(input);
567 self
568 }
569 /// <p>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.</p>
570 pub fn set_timeout_in_millis(mut self, input: ::std::option::Option<i32>) -> Self {
571 self.timeout_in_millis = input;
572 self
573 }
574 /// <p>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.</p>
575 pub fn get_timeout_in_millis(&self) -> &::std::option::Option<i32> {
576 &self.timeout_in_millis
577 }
578 /// <p>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.</p>
579 pub fn tls_config(mut self, input: crate::types::TlsConfigInput) -> Self {
580 self.tls_config = ::std::option::Option::Some(input);
581 self
582 }
583 /// <p>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.</p>
584 pub fn set_tls_config(mut self, input: ::std::option::Option<crate::types::TlsConfigInput>) -> Self {
585 self.tls_config = input;
586 self
587 }
588 /// <p>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.</p>
589 pub fn get_tls_config(&self) -> &::std::option::Option<crate::types::TlsConfigInput> {
590 &self.tls_config
591 }
592 /// Consumes the builder and constructs a [`UpdateIntegrationInput`](crate::operation::update_integration::UpdateIntegrationInput).
593 pub fn build(
594 self,
595 ) -> ::std::result::Result<crate::operation::update_integration::UpdateIntegrationInput, ::aws_smithy_types::error::operation::BuildError> {
596 ::std::result::Result::Ok(crate::operation::update_integration::UpdateIntegrationInput {
597 api_id: self.api_id,
598 connection_id: self.connection_id,
599 connection_type: self.connection_type,
600 content_handling_strategy: self.content_handling_strategy,
601 credentials_arn: self.credentials_arn,
602 description: self.description,
603 integration_id: self.integration_id,
604 integration_method: self.integration_method,
605 integration_subtype: self.integration_subtype,
606 integration_type: self.integration_type,
607 integration_uri: self.integration_uri,
608 passthrough_behavior: self.passthrough_behavior,
609 payload_format_version: self.payload_format_version,
610 request_parameters: self.request_parameters,
611 request_templates: self.request_templates,
612 response_parameters: self.response_parameters,
613 template_selection_expression: self.template_selection_expression,
614 timeout_in_millis: self.timeout_in_millis,
615 tls_config: self.tls_config,
616 })
617 }
618}