aws_sdk_apigateway/operation/put_integration/_put_integration_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Sets up a method's integration.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PutIntegrationInput {
7 /// <p>The string identifier of the associated RestApi.</p>
8 pub rest_api_id: ::std::option::Option<::std::string::String>,
9 /// <p>Specifies a put integration request's resource ID.</p>
10 pub resource_id: ::std::option::Option<::std::string::String>,
11 /// <p>Specifies the HTTP method for the integration.</p>
12 pub http_method: ::std::option::Option<::std::string::String>,
13 /// <p>Specifies a put integration input's type.</p>
14 pub r#type: ::std::option::Option<crate::types::IntegrationType>,
15 /// <p>The HTTP method for the integration.</p>
16 pub integration_http_method: ::std::option::Option<::std::string::String>,
17 /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where <code>connectionType</code> is not <code>VPC_LINK</code>, or private integration, where <code>connectionType</code> is <code>VPC_LINK</code>. For a private HTTP integration, the URI is not used for routing. For <code>AWS</code> or <code>AWS_PROXY</code> integrations, the URI is of the form <code>arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api</code>}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of <code>GetObject</code>, the <code>uri</code> can be either <code>arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}</code> or <code>arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</code>.</p>
18 pub uri: ::std::option::Option<::std::string::String>,
19 /// <p>The type of the network connection to the integration endpoint. The valid value is <code>INTERNET</code> for connections through the public routable internet or <code>VPC_LINK</code> for private connections between API Gateway and a network load balancer in a VPC. The default value is <code>INTERNET</code>.</p>
20 pub connection_type: ::std::option::Option<crate::types::ConnectionType>,
21 /// <p>The ID of the VpcLink used for the integration. Specify this value only if you specify <code>VPC_LINK</code> as the connection type.</p>
22 pub connection_id: ::std::option::Option<::std::string::String>,
23 /// <p>Specifies whether credentials are required for a put integration.</p>
24 pub credentials: ::std::option::Option<::std::string::String>,
25 /// <p>A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> must be a valid and unique method request parameter name.</p>
26 pub request_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
27 /// <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.</p>
28 pub request_templates: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
29 /// <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 <code>requestTemplates</code> property on the Integration resource. There are three valid values: <code>WHEN_NO_MATCH</code>, <code>WHEN_NO_TEMPLATES</code>, and <code>NEVER</code>.</p>
30 pub passthrough_behavior: ::std::option::Option<::std::string::String>,
31 /// <p>Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the <code>cacheNamespace</code>. You can specify the same <code>cacheNamespace</code> across resources to return the same cached data for requests to different resources.</p>
32 pub cache_namespace: ::std::option::Option<::std::string::String>,
33 /// <p>A list of request parameters whose values API Gateway caches. To be valid values for <code>cacheKeyParameters</code>, these parameters must also be specified for Method <code>requestParameters</code>.</p>
34 pub cache_key_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
35 /// <p>Specifies how to handle request payload content type conversions. Supported values are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following behaviors:</p>
36 /// <p>If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the <code>passthroughBehavior</code> is configured to support payload pass-through.</p>
37 pub content_handling: ::std::option::Option<crate::types::ContentHandlingStrategy>,
38 /// <p>Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.</p>
39 pub timeout_in_millis: ::std::option::Option<i32>,
40 /// <p>Specifies the TLS configuration for an integration.</p>
41 pub tls_config: ::std::option::Option<crate::types::TlsConfig>,
42 /// <p>The response transfer mode of the integration.</p>
43 pub response_transfer_mode: ::std::option::Option<crate::types::ResponseTransferMode>,
44 /// <p>The ALB or NLB listener to send the request to.</p>
45 pub integration_target: ::std::option::Option<::std::string::String>,
46}
47impl PutIntegrationInput {
48 /// <p>The string identifier of the associated RestApi.</p>
49 pub fn rest_api_id(&self) -> ::std::option::Option<&str> {
50 self.rest_api_id.as_deref()
51 }
52 /// <p>Specifies a put integration request's resource ID.</p>
53 pub fn resource_id(&self) -> ::std::option::Option<&str> {
54 self.resource_id.as_deref()
55 }
56 /// <p>Specifies the HTTP method for the integration.</p>
57 pub fn http_method(&self) -> ::std::option::Option<&str> {
58 self.http_method.as_deref()
59 }
60 /// <p>Specifies a put integration input's type.</p>
61 pub fn r#type(&self) -> ::std::option::Option<&crate::types::IntegrationType> {
62 self.r#type.as_ref()
63 }
64 /// <p>The HTTP method for the integration.</p>
65 pub fn integration_http_method(&self) -> ::std::option::Option<&str> {
66 self.integration_http_method.as_deref()
67 }
68 /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where <code>connectionType</code> is not <code>VPC_LINK</code>, or private integration, where <code>connectionType</code> is <code>VPC_LINK</code>. For a private HTTP integration, the URI is not used for routing. For <code>AWS</code> or <code>AWS_PROXY</code> integrations, the URI is of the form <code>arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api</code>}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of <code>GetObject</code>, the <code>uri</code> can be either <code>arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}</code> or <code>arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</code>.</p>
69 pub fn uri(&self) -> ::std::option::Option<&str> {
70 self.uri.as_deref()
71 }
72 /// <p>The type of the network connection to the integration endpoint. The valid value is <code>INTERNET</code> for connections through the public routable internet or <code>VPC_LINK</code> for private connections between API Gateway and a network load balancer in a VPC. The default value is <code>INTERNET</code>.</p>
73 pub fn connection_type(&self) -> ::std::option::Option<&crate::types::ConnectionType> {
74 self.connection_type.as_ref()
75 }
76 /// <p>The ID of the VpcLink used for the integration. Specify this value only if you specify <code>VPC_LINK</code> as the connection type.</p>
77 pub fn connection_id(&self) -> ::std::option::Option<&str> {
78 self.connection_id.as_deref()
79 }
80 /// <p>Specifies whether credentials are required for a put integration.</p>
81 pub fn credentials(&self) -> ::std::option::Option<&str> {
82 self.credentials.as_deref()
83 }
84 /// <p>A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> must be a valid and unique method request parameter name.</p>
85 pub fn request_parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
86 self.request_parameters.as_ref()
87 }
88 /// <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.</p>
89 pub fn request_templates(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
90 self.request_templates.as_ref()
91 }
92 /// <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 <code>requestTemplates</code> property on the Integration resource. There are three valid values: <code>WHEN_NO_MATCH</code>, <code>WHEN_NO_TEMPLATES</code>, and <code>NEVER</code>.</p>
93 pub fn passthrough_behavior(&self) -> ::std::option::Option<&str> {
94 self.passthrough_behavior.as_deref()
95 }
96 /// <p>Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the <code>cacheNamespace</code>. You can specify the same <code>cacheNamespace</code> across resources to return the same cached data for requests to different resources.</p>
97 pub fn cache_namespace(&self) -> ::std::option::Option<&str> {
98 self.cache_namespace.as_deref()
99 }
100 /// <p>A list of request parameters whose values API Gateway caches. To be valid values for <code>cacheKeyParameters</code>, these parameters must also be specified for Method <code>requestParameters</code>.</p>
101 ///
102 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.cache_key_parameters.is_none()`.
103 pub fn cache_key_parameters(&self) -> &[::std::string::String] {
104 self.cache_key_parameters.as_deref().unwrap_or_default()
105 }
106 /// <p>Specifies how to handle request payload content type conversions. Supported values are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following behaviors:</p>
107 /// <p>If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the <code>passthroughBehavior</code> is configured to support payload pass-through.</p>
108 pub fn content_handling(&self) -> ::std::option::Option<&crate::types::ContentHandlingStrategy> {
109 self.content_handling.as_ref()
110 }
111 /// <p>Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.</p>
112 pub fn timeout_in_millis(&self) -> ::std::option::Option<i32> {
113 self.timeout_in_millis
114 }
115 /// <p>Specifies the TLS configuration for an integration.</p>
116 pub fn tls_config(&self) -> ::std::option::Option<&crate::types::TlsConfig> {
117 self.tls_config.as_ref()
118 }
119 /// <p>The response transfer mode of the integration.</p>
120 pub fn response_transfer_mode(&self) -> ::std::option::Option<&crate::types::ResponseTransferMode> {
121 self.response_transfer_mode.as_ref()
122 }
123 /// <p>The ALB or NLB listener to send the request to.</p>
124 pub fn integration_target(&self) -> ::std::option::Option<&str> {
125 self.integration_target.as_deref()
126 }
127}
128impl PutIntegrationInput {
129 /// Creates a new builder-style object to manufacture [`PutIntegrationInput`](crate::operation::put_integration::PutIntegrationInput).
130 pub fn builder() -> crate::operation::put_integration::builders::PutIntegrationInputBuilder {
131 crate::operation::put_integration::builders::PutIntegrationInputBuilder::default()
132 }
133}
134
135/// A builder for [`PutIntegrationInput`](crate::operation::put_integration::PutIntegrationInput).
136#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
137#[non_exhaustive]
138pub struct PutIntegrationInputBuilder {
139 pub(crate) rest_api_id: ::std::option::Option<::std::string::String>,
140 pub(crate) resource_id: ::std::option::Option<::std::string::String>,
141 pub(crate) http_method: ::std::option::Option<::std::string::String>,
142 pub(crate) r#type: ::std::option::Option<crate::types::IntegrationType>,
143 pub(crate) integration_http_method: ::std::option::Option<::std::string::String>,
144 pub(crate) uri: ::std::option::Option<::std::string::String>,
145 pub(crate) connection_type: ::std::option::Option<crate::types::ConnectionType>,
146 pub(crate) connection_id: ::std::option::Option<::std::string::String>,
147 pub(crate) credentials: ::std::option::Option<::std::string::String>,
148 pub(crate) request_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
149 pub(crate) request_templates: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
150 pub(crate) passthrough_behavior: ::std::option::Option<::std::string::String>,
151 pub(crate) cache_namespace: ::std::option::Option<::std::string::String>,
152 pub(crate) cache_key_parameters: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
153 pub(crate) content_handling: ::std::option::Option<crate::types::ContentHandlingStrategy>,
154 pub(crate) timeout_in_millis: ::std::option::Option<i32>,
155 pub(crate) tls_config: ::std::option::Option<crate::types::TlsConfig>,
156 pub(crate) response_transfer_mode: ::std::option::Option<crate::types::ResponseTransferMode>,
157 pub(crate) integration_target: ::std::option::Option<::std::string::String>,
158}
159impl PutIntegrationInputBuilder {
160 /// <p>The string identifier of the associated RestApi.</p>
161 /// This field is required.
162 pub fn rest_api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163 self.rest_api_id = ::std::option::Option::Some(input.into());
164 self
165 }
166 /// <p>The string identifier of the associated RestApi.</p>
167 pub fn set_rest_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168 self.rest_api_id = input;
169 self
170 }
171 /// <p>The string identifier of the associated RestApi.</p>
172 pub fn get_rest_api_id(&self) -> &::std::option::Option<::std::string::String> {
173 &self.rest_api_id
174 }
175 /// <p>Specifies a put integration request's resource ID.</p>
176 /// This field is required.
177 pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178 self.resource_id = ::std::option::Option::Some(input.into());
179 self
180 }
181 /// <p>Specifies a put integration request's resource ID.</p>
182 pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183 self.resource_id = input;
184 self
185 }
186 /// <p>Specifies a put integration request's resource ID.</p>
187 pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
188 &self.resource_id
189 }
190 /// <p>Specifies the HTTP method for the integration.</p>
191 /// This field is required.
192 pub fn http_method(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193 self.http_method = ::std::option::Option::Some(input.into());
194 self
195 }
196 /// <p>Specifies the HTTP method for the integration.</p>
197 pub fn set_http_method(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198 self.http_method = input;
199 self
200 }
201 /// <p>Specifies the HTTP method for the integration.</p>
202 pub fn get_http_method(&self) -> &::std::option::Option<::std::string::String> {
203 &self.http_method
204 }
205 /// <p>Specifies a put integration input's type.</p>
206 /// This field is required.
207 pub fn r#type(mut self, input: crate::types::IntegrationType) -> Self {
208 self.r#type = ::std::option::Option::Some(input);
209 self
210 }
211 /// <p>Specifies a put integration input's type.</p>
212 pub fn set_type(mut self, input: ::std::option::Option<crate::types::IntegrationType>) -> Self {
213 self.r#type = input;
214 self
215 }
216 /// <p>Specifies a put integration input's type.</p>
217 pub fn get_type(&self) -> &::std::option::Option<crate::types::IntegrationType> {
218 &self.r#type
219 }
220 /// <p>The HTTP method for the integration.</p>
221 pub fn integration_http_method(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222 self.integration_http_method = ::std::option::Option::Some(input.into());
223 self
224 }
225 /// <p>The HTTP method for the integration.</p>
226 pub fn set_integration_http_method(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227 self.integration_http_method = input;
228 self
229 }
230 /// <p>The HTTP method for the integration.</p>
231 pub fn get_integration_http_method(&self) -> &::std::option::Option<::std::string::String> {
232 &self.integration_http_method
233 }
234 /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where <code>connectionType</code> is not <code>VPC_LINK</code>, or private integration, where <code>connectionType</code> is <code>VPC_LINK</code>. For a private HTTP integration, the URI is not used for routing. For <code>AWS</code> or <code>AWS_PROXY</code> integrations, the URI is of the form <code>arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api</code>}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of <code>GetObject</code>, the <code>uri</code> can be either <code>arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}</code> or <code>arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</code>.</p>
235 pub fn uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
236 self.uri = ::std::option::Option::Some(input.into());
237 self
238 }
239 /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where <code>connectionType</code> is not <code>VPC_LINK</code>, or private integration, where <code>connectionType</code> is <code>VPC_LINK</code>. For a private HTTP integration, the URI is not used for routing. For <code>AWS</code> or <code>AWS_PROXY</code> integrations, the URI is of the form <code>arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api</code>}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of <code>GetObject</code>, the <code>uri</code> can be either <code>arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}</code> or <code>arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</code>.</p>
240 pub fn set_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
241 self.uri = input;
242 self
243 }
244 /// <p>Specifies Uniform Resource Identifier (URI) of the integration endpoint. For HTTP or <code>HTTP_PROXY</code> integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where <code>connectionType</code> is not <code>VPC_LINK</code>, or private integration, where <code>connectionType</code> is <code>VPC_LINK</code>. For a private HTTP integration, the URI is not used for routing. For <code>AWS</code> or <code>AWS_PROXY</code> integrations, the URI is of the form <code>arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api</code>}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated Amazon Web Services service (e.g., s3); and {subdomain} is a designated subdomain supported by certain Amazon Web Services service for fast host-name lookup. action can be used for an Amazon Web Services service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an Amazon Web Services service path-based API. The ensuing service_api refers to the path to an Amazon Web Services service resource, including the region of the integrated Amazon Web Services service, if applicable. For example, for integration with the S3 API of <code>GetObject</code>, the <code>uri</code> can be either <code>arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key}</code> or <code>arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</code>.</p>
245 pub fn get_uri(&self) -> &::std::option::Option<::std::string::String> {
246 &self.uri
247 }
248 /// <p>The type of the network connection to the integration endpoint. The valid value is <code>INTERNET</code> for connections through the public routable internet or <code>VPC_LINK</code> for private connections between API Gateway and a network load balancer in a VPC. The default value is <code>INTERNET</code>.</p>
249 pub fn connection_type(mut self, input: crate::types::ConnectionType) -> Self {
250 self.connection_type = ::std::option::Option::Some(input);
251 self
252 }
253 /// <p>The type of the network connection to the integration endpoint. The valid value is <code>INTERNET</code> for connections through the public routable internet or <code>VPC_LINK</code> for private connections between API Gateway and a network load balancer in a VPC. The default value is <code>INTERNET</code>.</p>
254 pub fn set_connection_type(mut self, input: ::std::option::Option<crate::types::ConnectionType>) -> Self {
255 self.connection_type = input;
256 self
257 }
258 /// <p>The type of the network connection to the integration endpoint. The valid value is <code>INTERNET</code> for connections through the public routable internet or <code>VPC_LINK</code> for private connections between API Gateway and a network load balancer in a VPC. The default value is <code>INTERNET</code>.</p>
259 pub fn get_connection_type(&self) -> &::std::option::Option<crate::types::ConnectionType> {
260 &self.connection_type
261 }
262 /// <p>The ID of the VpcLink used for the integration. Specify this value only if you specify <code>VPC_LINK</code> as the connection type.</p>
263 pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
264 self.connection_id = ::std::option::Option::Some(input.into());
265 self
266 }
267 /// <p>The ID of the VpcLink used for the integration. Specify this value only if you specify <code>VPC_LINK</code> as the connection type.</p>
268 pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269 self.connection_id = input;
270 self
271 }
272 /// <p>The ID of the VpcLink used for the integration. Specify this value only if you specify <code>VPC_LINK</code> as the connection type.</p>
273 pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
274 &self.connection_id
275 }
276 /// <p>Specifies whether credentials are required for a put integration.</p>
277 pub fn credentials(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
278 self.credentials = ::std::option::Option::Some(input.into());
279 self
280 }
281 /// <p>Specifies whether credentials are required for a put integration.</p>
282 pub fn set_credentials(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283 self.credentials = input;
284 self
285 }
286 /// <p>Specifies whether credentials are required for a put integration.</p>
287 pub fn get_credentials(&self) -> &::std::option::Option<::std::string::String> {
288 &self.credentials
289 }
290 /// Adds a key-value pair to `request_parameters`.
291 ///
292 /// To override the contents of this collection use [`set_request_parameters`](Self::set_request_parameters).
293 ///
294 /// <p>A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> must be a valid and unique method request parameter name.</p>
295 pub fn request_parameters(
296 mut self,
297 k: impl ::std::convert::Into<::std::string::String>,
298 v: impl ::std::convert::Into<::std::string::String>,
299 ) -> Self {
300 let mut hash_map = self.request_parameters.unwrap_or_default();
301 hash_map.insert(k.into(), v.into());
302 self.request_parameters = ::std::option::Option::Some(hash_map);
303 self
304 }
305 /// <p>A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> must be a valid and unique method request parameter name.</p>
306 pub fn set_request_parameters(
307 mut self,
308 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
309 ) -> Self {
310 self.request_parameters = input;
311 self
312 }
313 /// <p>A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of <code>method.request.{location}.{name}</code>, where <code>location</code> is <code>querystring</code>, <code>path</code>, or <code>header</code> and <code>name</code> must be a valid and unique method request parameter name.</p>
314 pub fn get_request_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
315 &self.request_parameters
316 }
317 /// Adds a key-value pair to `request_templates`.
318 ///
319 /// To override the contents of this collection use [`set_request_templates`](Self::set_request_templates).
320 ///
321 /// <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.</p>
322 pub fn request_templates(
323 mut self,
324 k: impl ::std::convert::Into<::std::string::String>,
325 v: impl ::std::convert::Into<::std::string::String>,
326 ) -> Self {
327 let mut hash_map = self.request_templates.unwrap_or_default();
328 hash_map.insert(k.into(), v.into());
329 self.request_templates = ::std::option::Option::Some(hash_map);
330 self
331 }
332 /// <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.</p>
333 pub fn set_request_templates(
334 mut self,
335 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
336 ) -> Self {
337 self.request_templates = input;
338 self
339 }
340 /// <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.</p>
341 pub fn get_request_templates(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
342 &self.request_templates
343 }
344 /// <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 <code>requestTemplates</code> property on the Integration resource. There are three valid values: <code>WHEN_NO_MATCH</code>, <code>WHEN_NO_TEMPLATES</code>, and <code>NEVER</code>.</p>
345 pub fn passthrough_behavior(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
346 self.passthrough_behavior = ::std::option::Option::Some(input.into());
347 self
348 }
349 /// <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 <code>requestTemplates</code> property on the Integration resource. There are three valid values: <code>WHEN_NO_MATCH</code>, <code>WHEN_NO_TEMPLATES</code>, and <code>NEVER</code>.</p>
350 pub fn set_passthrough_behavior(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
351 self.passthrough_behavior = input;
352 self
353 }
354 /// <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 <code>requestTemplates</code> property on the Integration resource. There are three valid values: <code>WHEN_NO_MATCH</code>, <code>WHEN_NO_TEMPLATES</code>, and <code>NEVER</code>.</p>
355 pub fn get_passthrough_behavior(&self) -> &::std::option::Option<::std::string::String> {
356 &self.passthrough_behavior
357 }
358 /// <p>Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the <code>cacheNamespace</code>. You can specify the same <code>cacheNamespace</code> across resources to return the same cached data for requests to different resources.</p>
359 pub fn cache_namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
360 self.cache_namespace = ::std::option::Option::Some(input.into());
361 self
362 }
363 /// <p>Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the <code>cacheNamespace</code>. You can specify the same <code>cacheNamespace</code> across resources to return the same cached data for requests to different resources.</p>
364 pub fn set_cache_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
365 self.cache_namespace = input;
366 self
367 }
368 /// <p>Specifies a group of related cached parameters. By default, API Gateway uses the resource ID as the <code>cacheNamespace</code>. You can specify the same <code>cacheNamespace</code> across resources to return the same cached data for requests to different resources.</p>
369 pub fn get_cache_namespace(&self) -> &::std::option::Option<::std::string::String> {
370 &self.cache_namespace
371 }
372 /// Appends an item to `cache_key_parameters`.
373 ///
374 /// To override the contents of this collection use [`set_cache_key_parameters`](Self::set_cache_key_parameters).
375 ///
376 /// <p>A list of request parameters whose values API Gateway caches. To be valid values for <code>cacheKeyParameters</code>, these parameters must also be specified for Method <code>requestParameters</code>.</p>
377 pub fn cache_key_parameters(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
378 let mut v = self.cache_key_parameters.unwrap_or_default();
379 v.push(input.into());
380 self.cache_key_parameters = ::std::option::Option::Some(v);
381 self
382 }
383 /// <p>A list of request parameters whose values API Gateway caches. To be valid values for <code>cacheKeyParameters</code>, these parameters must also be specified for Method <code>requestParameters</code>.</p>
384 pub fn set_cache_key_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
385 self.cache_key_parameters = input;
386 self
387 }
388 /// <p>A list of request parameters whose values API Gateway caches. To be valid values for <code>cacheKeyParameters</code>, these parameters must also be specified for Method <code>requestParameters</code>.</p>
389 pub fn get_cache_key_parameters(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
390 &self.cache_key_parameters
391 }
392 /// <p>Specifies how to handle request payload content type conversions. Supported values are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following behaviors:</p>
393 /// <p>If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the <code>passthroughBehavior</code> is configured to support payload pass-through.</p>
394 pub fn content_handling(mut self, input: crate::types::ContentHandlingStrategy) -> Self {
395 self.content_handling = ::std::option::Option::Some(input);
396 self
397 }
398 /// <p>Specifies how to handle request payload content type conversions. Supported values are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following behaviors:</p>
399 /// <p>If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the <code>passthroughBehavior</code> is configured to support payload pass-through.</p>
400 pub fn set_content_handling(mut self, input: ::std::option::Option<crate::types::ContentHandlingStrategy>) -> Self {
401 self.content_handling = input;
402 self
403 }
404 /// <p>Specifies how to handle request payload content type conversions. Supported values are <code>CONVERT_TO_BINARY</code> and <code>CONVERT_TO_TEXT</code>, with the following behaviors:</p>
405 /// <p>If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the <code>passthroughBehavior</code> is configured to support payload pass-through.</p>
406 pub fn get_content_handling(&self) -> &::std::option::Option<crate::types::ContentHandlingStrategy> {
407 &self.content_handling
408 }
409 /// <p>Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.</p>
410 pub fn timeout_in_millis(mut self, input: i32) -> Self {
411 self.timeout_in_millis = ::std::option::Option::Some(input);
412 self
413 }
414 /// <p>Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.</p>
415 pub fn set_timeout_in_millis(mut self, input: ::std::option::Option<i32>) -> Self {
416 self.timeout_in_millis = input;
417 self
418 }
419 /// <p>Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds. You can increase the default value to longer than 29 seconds for Regional or private APIs only.</p>
420 pub fn get_timeout_in_millis(&self) -> &::std::option::Option<i32> {
421 &self.timeout_in_millis
422 }
423 /// <p>Specifies the TLS configuration for an integration.</p>
424 pub fn tls_config(mut self, input: crate::types::TlsConfig) -> Self {
425 self.tls_config = ::std::option::Option::Some(input);
426 self
427 }
428 /// <p>Specifies the TLS configuration for an integration.</p>
429 pub fn set_tls_config(mut self, input: ::std::option::Option<crate::types::TlsConfig>) -> Self {
430 self.tls_config = input;
431 self
432 }
433 /// <p>Specifies the TLS configuration for an integration.</p>
434 pub fn get_tls_config(&self) -> &::std::option::Option<crate::types::TlsConfig> {
435 &self.tls_config
436 }
437 /// <p>The response transfer mode of the integration.</p>
438 pub fn response_transfer_mode(mut self, input: crate::types::ResponseTransferMode) -> Self {
439 self.response_transfer_mode = ::std::option::Option::Some(input);
440 self
441 }
442 /// <p>The response transfer mode of the integration.</p>
443 pub fn set_response_transfer_mode(mut self, input: ::std::option::Option<crate::types::ResponseTransferMode>) -> Self {
444 self.response_transfer_mode = input;
445 self
446 }
447 /// <p>The response transfer mode of the integration.</p>
448 pub fn get_response_transfer_mode(&self) -> &::std::option::Option<crate::types::ResponseTransferMode> {
449 &self.response_transfer_mode
450 }
451 /// <p>The ALB or NLB listener to send the request to.</p>
452 pub fn integration_target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
453 self.integration_target = ::std::option::Option::Some(input.into());
454 self
455 }
456 /// <p>The ALB or NLB listener to send the request to.</p>
457 pub fn set_integration_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
458 self.integration_target = input;
459 self
460 }
461 /// <p>The ALB or NLB listener to send the request to.</p>
462 pub fn get_integration_target(&self) -> &::std::option::Option<::std::string::String> {
463 &self.integration_target
464 }
465 /// Consumes the builder and constructs a [`PutIntegrationInput`](crate::operation::put_integration::PutIntegrationInput).
466 pub fn build(
467 self,
468 ) -> ::std::result::Result<crate::operation::put_integration::PutIntegrationInput, ::aws_smithy_types::error::operation::BuildError> {
469 ::std::result::Result::Ok(crate::operation::put_integration::PutIntegrationInput {
470 rest_api_id: self.rest_api_id,
471 resource_id: self.resource_id,
472 http_method: self.http_method,
473 r#type: self.r#type,
474 integration_http_method: self.integration_http_method,
475 uri: self.uri,
476 connection_type: self.connection_type,
477 connection_id: self.connection_id,
478 credentials: self.credentials,
479 request_parameters: self.request_parameters,
480 request_templates: self.request_templates,
481 passthrough_behavior: self.passthrough_behavior,
482 cache_namespace: self.cache_namespace,
483 cache_key_parameters: self.cache_key_parameters,
484 content_handling: self.content_handling,
485 timeout_in_millis: self.timeout_in_millis,
486 tls_config: self.tls_config,
487 response_transfer_mode: self.response_transfer_mode,
488 integration_target: self.integration_target,
489 })
490 }
491}