Class PutIntegrationResponseResult

java.lang.Object
com.amazonaws.services.apigateway.model.PutIntegrationResponseResult
All Implemented Interfaces:
Serializable, Cloneable

public class PutIntegrationResponseResult extends Object implements Serializable, Cloneable

Represents an integration response. The status code must map to an existing MethodResponse, and parameters and templates can be used to transform the backend response.

See Also:
  • Constructor Details

    • PutIntegrationResponseResult

      public PutIntegrationResponseResult()
  • Method Details

    • setStatusCode

      public void setStatusCode(String statusCode)

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

      Parameters:
      statusCode - Specifies the status code that is used to map the integration response to an existing MethodResponse.
    • getStatusCode

      public String getStatusCode()

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

      Returns:
      Specifies the status code that is used to map the integration response to an existing MethodResponse.
    • withStatusCode

      public PutIntegrationResponseResult withStatusCode(String statusCode)

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

      Parameters:
      statusCode - Specifies the status code that is used to map the integration response to an existing MethodResponse.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setSelectionPattern

      public void setSelectionPattern(String selectionPattern)

      Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.

      Parameters:
      selectionPattern - Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.
    • getSelectionPattern

      public String getSelectionPattern()

      Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.

      Returns:
      Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.
    • withSelectionPattern

      public PutIntegrationResponseResult withSelectionPattern(String selectionPattern)

      Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.

      Parameters:
      selectionPattern - Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the backend. If the backend is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS backends, the HTTP status code is matched.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getResponseParameters

      public Map<String,String> getResponseParameters()

      Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the MethodResponse. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the pattern integration.response.header.{name}.

      Returns:
      Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the MethodResponse. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the pattern integration.response.header.{name}.
    • setResponseParameters

      public void setResponseParameters(Map<String,String> responseParameters)

      Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the MethodResponse. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the pattern integration.response.header.{name}.

      Parameters:
      responseParameters - Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the MethodResponse. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the pattern integration.response.header.{name}.
    • withResponseParameters

      public PutIntegrationResponseResult withResponseParameters(Map<String,String> responseParameters)

      Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the MethodResponse. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the pattern integration.response.header.{name}.

      Parameters:
      responseParameters - Represents response parameters that can be read from the backend response. Response parameters are represented as a key/value map, with a destination as the key and a source as the value. A destination must match an existing response parameter in the MethodResponse. The source can be a header from the backend response, or a static value. Static values are specified using enclosing single quotes, and backend response headers can be read using the pattern integration.response.header.{name}.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • addResponseParametersEntry

      public PutIntegrationResponseResult addResponseParametersEntry(String key, String value)
    • clearResponseParametersEntries

      public PutIntegrationResponseResult clearResponseParametersEntries()
      Removes all the entries added into ResponseParameters. <p> Returns a reference to this object so that method calls can be chained together.
    • getResponseTemplates

      public Map<String,String> getResponseTemplates()

      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.

      Returns:
      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.
    • setResponseTemplates

      public void setResponseTemplates(Map<String,String> responseTemplates)

      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.

      Parameters:
      responseTemplates - 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.
    • withResponseTemplates

      public PutIntegrationResponseResult withResponseTemplates(Map<String,String> responseTemplates)

      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.

      Parameters:
      responseTemplates - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • addResponseTemplatesEntry

      public PutIntegrationResponseResult addResponseTemplatesEntry(String key, String value)
    • clearResponseTemplatesEntries

      public PutIntegrationResponseResult clearResponseTemplatesEntries()
      Removes all the entries added into ResponseTemplates. <p> Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      Overrides:
      clone in class Object