Struct aws_sdk_apigateway::operation::get_integration_response::builders::GetIntegrationResponseOutputBuilder
source · #[non_exhaustive]pub struct GetIntegrationResponseOutputBuilder { /* private fields */ }
Expand description
A builder for GetIntegrationResponseOutput
.
Implementations§
source§impl GetIntegrationResponseOutputBuilder
impl GetIntegrationResponseOutputBuilder
sourcepub fn status_code(self, input: impl Into<String>) -> Self
pub fn status_code(self, input: impl Into<String>) -> Self
Specifies the status code that is used to map the integration response to an existing MethodResponse.
sourcepub fn set_status_code(self, input: Option<String>) -> Self
pub fn set_status_code(self, input: Option<String>) -> Self
Specifies the status code that is used to map the integration response to an existing MethodResponse.
sourcepub fn get_status_code(&self) -> &Option<String>
pub fn get_status_code(&self) -> &Option<String>
Specifies the status code that is used to map the integration response to an existing MethodResponse.
sourcepub fn selection_pattern(self, input: impl Into<String>) -> Self
pub fn selection_pattern(self, input: impl Into<String>) -> Self
Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+
regex to match error response. However, make sure that the error response does not contain any newline (\n
) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.
sourcepub fn set_selection_pattern(self, input: Option<String>) -> Self
pub fn set_selection_pattern(self, input: Option<String>) -> Self
Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+
regex to match error response. However, make sure that the error response does not contain any newline (\n
) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.
sourcepub fn get_selection_pattern(&self) -> &Option<String>
pub fn get_selection_pattern(&self) -> &Option<String>
Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+
regex to match error response. However, make sure that the error response does not contain any newline (\n
) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.
sourcepub fn response_parameters(
self,
k: impl Into<String>,
v: impl Into<String>
) -> Self
pub fn response_parameters( self, k: impl Into<String>, v: impl Into<String> ) -> Self
Adds a key-value pair to response_parameters
.
To override the contents of this collection use set_response_parameters
.
A key-value map specifying response parameters that are passed to the method response from the back end. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name}
, where name
is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name}
or integration.response.body.{JSON-expression}
, where name
is a valid and unique response header name and JSON-expression
is a valid JSON expression without the $
prefix.
sourcepub fn set_response_parameters(
self,
input: Option<HashMap<String, String>>
) -> Self
pub fn set_response_parameters( self, input: Option<HashMap<String, String>> ) -> Self
A key-value map specifying response parameters that are passed to the method response from the back end. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name}
, where name
is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name}
or integration.response.body.{JSON-expression}
, where name
is a valid and unique response header name and JSON-expression
is a valid JSON expression without the $
prefix.
sourcepub fn get_response_parameters(&self) -> &Option<HashMap<String, String>>
pub fn get_response_parameters(&self) -> &Option<HashMap<String, String>>
A key-value map specifying response parameters that are passed to the method response from the back end. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name}
, where name
is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name}
or integration.response.body.{JSON-expression}
, where name
is a valid and unique response header name and JSON-expression
is a valid JSON expression without the $
prefix.
sourcepub fn response_templates(
self,
k: impl Into<String>,
v: impl Into<String>
) -> Self
pub fn response_templates( self, k: impl Into<String>, v: impl Into<String> ) -> Self
Adds a key-value pair to response_templates
.
To override the contents of this collection use set_response_templates
.
Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
sourcepub fn set_response_templates(
self,
input: Option<HashMap<String, String>>
) -> Self
pub fn set_response_templates( self, input: Option<HashMap<String, String>> ) -> Self
Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
sourcepub fn get_response_templates(&self) -> &Option<HashMap<String, String>>
pub fn get_response_templates(&self) -> &Option<HashMap<String, String>>
Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
sourcepub fn content_handling(self, input: ContentHandlingStrategy) -> Self
pub fn content_handling(self, input: ContentHandlingStrategy) -> Self
Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.
sourcepub fn set_content_handling(
self,
input: Option<ContentHandlingStrategy>
) -> Self
pub fn set_content_handling( self, input: Option<ContentHandlingStrategy> ) -> Self
Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.
sourcepub fn get_content_handling(&self) -> &Option<ContentHandlingStrategy>
pub fn get_content_handling(&self) -> &Option<ContentHandlingStrategy>
Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY
and CONVERT_TO_TEXT
, with the following behaviors:
If this property is not defined, the response payload will be passed through from the integration response to the method response without modification.
sourcepub fn build(self) -> GetIntegrationResponseOutput
pub fn build(self) -> GetIntegrationResponseOutput
Consumes the builder and constructs a GetIntegrationResponseOutput
.
Trait Implementations§
source§impl Clone for GetIntegrationResponseOutputBuilder
impl Clone for GetIntegrationResponseOutputBuilder
source§fn clone(&self) -> GetIntegrationResponseOutputBuilder
fn clone(&self) -> GetIntegrationResponseOutputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for GetIntegrationResponseOutputBuilder
impl Default for GetIntegrationResponseOutputBuilder
source§fn default() -> GetIntegrationResponseOutputBuilder
fn default() -> GetIntegrationResponseOutputBuilder
source§impl PartialEq<GetIntegrationResponseOutputBuilder> for GetIntegrationResponseOutputBuilder
impl PartialEq<GetIntegrationResponseOutputBuilder> for GetIntegrationResponseOutputBuilder
source§fn eq(&self, other: &GetIntegrationResponseOutputBuilder) -> bool
fn eq(&self, other: &GetIntegrationResponseOutputBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.