Class PutIntegrationResult
- java.lang.Object
-
- com.amazonaws.services.apigateway.model.PutIntegrationResult
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class PutIntegrationResult extends Object implements Serializable, Cloneable
Represents a HTTP, AWS, or Mock integration.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PutIntegrationResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PutIntegrationResult
addIntegrationResponsesEntry(String key, IntegrationResponse value)
PutIntegrationResult
addRequestParametersEntry(String key, String value)
PutIntegrationResult
addRequestTemplatesEntry(String key, String value)
PutIntegrationResult
clearIntegrationResponsesEntries()
Removes all the entries added into IntegrationResponses.PutIntegrationResult
clearRequestParametersEntries()
Removes all the entries added into RequestParameters.PutIntegrationResult
clearRequestTemplatesEntries()
Removes all the entries added into RequestTemplates.PutIntegrationResult
clone()
boolean
equals(Object obj)
List<String>
getCacheKeyParameters()
Specifies the integration's cache key parameters.String
getCacheNamespace()
Specifies the integration's cache namespace.String
getCredentials()
Specifies the credentials required for the integration, if any.String
getHttpMethod()
Specifies the integration's HTTP method type.Map<String,IntegrationResponse>
getIntegrationResponses()
Specifies the integration's responses.String
getPassthroughBehavior()
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration.Map<String,String>
getRequestParameters()
Represents requests parameters that are sent with the backend request.Map<String,String>
getRequestTemplates()
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.String
getType()
Specifies the integration's type.String
getUri()
Specifies the integration's Uniform Resource Identifier (URI).int
hashCode()
void
setCacheKeyParameters(Collection<String> cacheKeyParameters)
Specifies the integration's cache key parameters.void
setCacheNamespace(String cacheNamespace)
Specifies the integration's cache namespace.void
setCredentials(String credentials)
Specifies the credentials required for the integration, if any.void
setHttpMethod(String httpMethod)
Specifies the integration's HTTP method type.void
setIntegrationResponses(Map<String,IntegrationResponse> integrationResponses)
Specifies the integration's responses.void
setPassthroughBehavior(String passthroughBehavior)
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration.void
setRequestParameters(Map<String,String> requestParameters)
Represents requests parameters that are sent with the backend request.void
setRequestTemplates(Map<String,String> requestTemplates)
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.void
setType(IntegrationType type)
Specifies the integration's type.void
setType(String type)
Specifies the integration's type.void
setUri(String uri)
Specifies the integration's Uniform Resource Identifier (URI).String
toString()
Returns a string representation of this object; useful for testing and debugging.PutIntegrationResult
withCacheKeyParameters(String... cacheKeyParameters)
Specifies the integration's cache key parameters.PutIntegrationResult
withCacheKeyParameters(Collection<String> cacheKeyParameters)
Specifies the integration's cache key parameters.PutIntegrationResult
withCacheNamespace(String cacheNamespace)
Specifies the integration's cache namespace.PutIntegrationResult
withCredentials(String credentials)
Specifies the credentials required for the integration, if any.PutIntegrationResult
withHttpMethod(String httpMethod)
Specifies the integration's HTTP method type.PutIntegrationResult
withIntegrationResponses(Map<String,IntegrationResponse> integrationResponses)
Specifies the integration's responses.PutIntegrationResult
withPassthroughBehavior(String passthroughBehavior)
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration.PutIntegrationResult
withRequestParameters(Map<String,String> requestParameters)
Represents requests parameters that are sent with the backend request.PutIntegrationResult
withRequestTemplates(Map<String,String> requestTemplates)
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.PutIntegrationResult
withType(IntegrationType type)
Specifies the integration's type.PutIntegrationResult
withType(String type)
Specifies the integration's type.PutIntegrationResult
withUri(String uri)
Specifies the integration's Uniform Resource Identifier (URI).
-
-
-
Method Detail
-
setType
public void setType(String type)
Specifies the integration's type. The valid value is
HTTP
,AWS
, orMOCK
.- Parameters:
type
- Specifies the integration's type. The valid value isHTTP
,AWS
, orMOCK
.- See Also:
IntegrationType
-
getType
public String getType()
Specifies the integration's type. The valid value is
HTTP
,AWS
, orMOCK
.- Returns:
- Specifies the integration's type. The valid value is
HTTP
,AWS
, orMOCK
. - See Also:
IntegrationType
-
withType
public PutIntegrationResult withType(String type)
Specifies the integration's type. The valid value is
HTTP
,AWS
, orMOCK
.- Parameters:
type
- Specifies the integration's type. The valid value isHTTP
,AWS
, orMOCK
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
IntegrationType
-
setType
public void setType(IntegrationType type)
Specifies the integration's type. The valid value is
HTTP
,AWS
, orMOCK
.- Parameters:
type
- Specifies the integration's type. The valid value isHTTP
,AWS
, orMOCK
.- See Also:
IntegrationType
-
withType
public PutIntegrationResult withType(IntegrationType type)
Specifies the integration's type. The valid value is
HTTP
,AWS
, orMOCK
.- Parameters:
type
- Specifies the integration's type. The valid value isHTTP
,AWS
, orMOCK
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
IntegrationType
-
setHttpMethod
public void setHttpMethod(String httpMethod)
Specifies the integration's HTTP method type.
- Parameters:
httpMethod
- Specifies the integration's HTTP method type.
-
getHttpMethod
public String getHttpMethod()
Specifies the integration's HTTP method type.
- Returns:
- Specifies the integration's HTTP method type.
-
withHttpMethod
public PutIntegrationResult withHttpMethod(String httpMethod)
Specifies the integration's HTTP method type.
- Parameters:
httpMethod
- Specifies the integration's HTTP method type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setUri
public void setUri(String uri)
Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form
arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}
.Region
,subdomain
andservice
are used to determine the right endpoint. For AWS services that use theAction=
query string parameter,service_api
should be a valid action for the desired service. For RESTful AWS service APIs,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
.- Parameters:
uri
- Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the formarn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}
.Region
,subdomain
andservice
are used to determine the right endpoint. For AWS services that use theAction=
query string parameter,service_api
should be a valid action for the desired service. For RESTful AWS service APIs,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
.
-
getUri
public String getUri()
Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form
arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}
.Region
,subdomain
andservice
are used to determine the right endpoint. For AWS services that use theAction=
query string parameter,service_api
should be a valid action for the desired service. For RESTful AWS service APIs,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
.- Returns:
- Specifies the integration's Uniform Resource Identifier (URI).
For HTTP integrations, the URI must be a fully formed, encoded
HTTP(S) URL according to the RFC-3986 specification. For AWS integrations,
the URI should be of the form
arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}
.Region
,subdomain
andservice
are used to determine the right endpoint. For AWS services that use theAction=
query string parameter,service_api
should be a valid action for the desired service. For RESTful AWS service APIs,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
.
-
withUri
public PutIntegrationResult withUri(String uri)
Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form
arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}
.Region
,subdomain
andservice
are used to determine the right endpoint. For AWS services that use theAction=
query string parameter,service_api
should be a valid action for the desired service. For RESTful AWS service APIs,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
.- Parameters:
uri
- Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the formarn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}
.Region
,subdomain
andservice
are used to determine the right endpoint. For AWS services that use theAction=
query string parameter,service_api
should be a valid action for the desired service. For RESTful AWS service APIs,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCredentials
public void setCredentials(String credentials)
Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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.- Parameters:
credentials
- Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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 stringarn:aws:iam::\*:user/\*
. To use resource-based permissions on supported AWS services, specify null.
-
getCredentials
public String getCredentials()
Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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.- Returns:
- Specifies the credentials required for the integration, if any.
For AWS integrations, three options are available. To specify an
IAM Role for Amazon 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.
-
withCredentials
public PutIntegrationResult withCredentials(String credentials)
Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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.- Parameters:
credentials
- Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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 stringarn:aws:iam::\*:user/\*
. To use resource-based permissions on supported AWS services, specify null.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getRequestParameters
public Map<String,String> getRequestParameters()
Represents requests parameters that are sent with the backend request. Request parameters are represented as a key/value map, with a destination as the key and a source as the value. A source must match an existing method request parameter, or a static value. Static values must be enclosed with single quotes, and be pre-encoded based on their destination in the request. The destination must match the pattern
integration.request.{location}.{name}
, wherelocation
is either querystring, path, or header.name
must be a valid, unique parameter name.- Returns:
- Represents requests parameters that are sent with the backend
request. Request parameters are represented as a key/value map,
with a destination as the key and a source as the value. A source
must match an existing method request parameter, or a static
value. Static values must be enclosed with single quotes, and be
pre-encoded based on their destination in the request. The
destination must match the pattern
integration.request.{location}.{name}
, wherelocation
is either querystring, path, or header.name
must be a valid, unique parameter name.
-
setRequestParameters
public void setRequestParameters(Map<String,String> requestParameters)
Represents requests parameters that are sent with the backend request. Request parameters are represented as a key/value map, with a destination as the key and a source as the value. A source must match an existing method request parameter, or a static value. Static values must be enclosed with single quotes, and be pre-encoded based on their destination in the request. The destination must match the pattern
integration.request.{location}.{name}
, wherelocation
is either querystring, path, or header.name
must be a valid, unique parameter name.- Parameters:
requestParameters
- Represents requests parameters that are sent with the backend request. Request parameters are represented as a key/value map, with a destination as the key and a source as the value. A source must match an existing method request parameter, or a static value. Static values must be enclosed with single quotes, and be pre-encoded based on their destination in the request. The destination must match the patternintegration.request.{location}.{name}
, wherelocation
is either querystring, path, or header.name
must be a valid, unique parameter name.
-
withRequestParameters
public PutIntegrationResult withRequestParameters(Map<String,String> requestParameters)
Represents requests parameters that are sent with the backend request. Request parameters are represented as a key/value map, with a destination as the key and a source as the value. A source must match an existing method request parameter, or a static value. Static values must be enclosed with single quotes, and be pre-encoded based on their destination in the request. The destination must match the pattern
integration.request.{location}.{name}
, wherelocation
is either querystring, path, or header.name
must be a valid, unique parameter name.- Parameters:
requestParameters
- Represents requests parameters that are sent with the backend request. Request parameters are represented as a key/value map, with a destination as the key and a source as the value. A source must match an existing method request parameter, or a static value. Static values must be enclosed with single quotes, and be pre-encoded based on their destination in the request. The destination must match the patternintegration.request.{location}.{name}
, wherelocation
is either querystring, path, or header.name
must be a valid, unique parameter name.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addRequestParametersEntry
public PutIntegrationResult addRequestParametersEntry(String key, String value)
-
clearRequestParametersEntries
public PutIntegrationResult clearRequestParametersEntries()
Removes all the entries added into RequestParameters. <p> Returns a reference to this object so that method calls can be chained together.
-
getRequestTemplates
public Map<String,String> getRequestTemplates()
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.
- Returns:
- 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.
-
setRequestTemplates
public void setRequestTemplates(Map<String,String> requestTemplates)
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.
- Parameters:
requestTemplates
- 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.
-
withRequestTemplates
public PutIntegrationResult withRequestTemplates(Map<String,String> requestTemplates)
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.
- Parameters:
requestTemplates
- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addRequestTemplatesEntry
public PutIntegrationResult addRequestTemplatesEntry(String key, String value)
-
clearRequestTemplatesEntries
public PutIntegrationResult clearRequestTemplatesEntries()
Removes all the entries added into RequestTemplates. <p> Returns a reference to this object so that method calls can be chained together.
-
setPassthroughBehavior
public void setPassthroughBehavior(String passthroughBehavior)
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. There are three valid values:
WHEN_NO_MATCH
,WHEN_NO_TEMPLATES
, andNEVER
.WHEN_NO_MATCH
passes the request body for unmapped content types through to the Integration backend without transformation.NEVER
rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.WHEN_NO_TEMPLATES
will allow 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 415 response.- Parameters:
passthroughBehavior
- Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. There are three valid values:WHEN_NO_MATCH
,WHEN_NO_TEMPLATES
, andNEVER
.WHEN_NO_MATCH
passes the request body for unmapped content types through to the Integration backend without transformation.NEVER
rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.WHEN_NO_TEMPLATES
will allow 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 415 response.
-
getPassthroughBehavior
public String getPassthroughBehavior()
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. There are three valid values:
WHEN_NO_MATCH
,WHEN_NO_TEMPLATES
, andNEVER
.WHEN_NO_MATCH
passes the request body for unmapped content types through to the Integration backend without transformation.NEVER
rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.WHEN_NO_TEMPLATES
will allow 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 415 response.- Returns:
- Specifies the pass-through behavior for incoming requests based
on the Content-Type header in the request, and the available
requestTemplates defined on the Integration. There are three
valid values:
WHEN_NO_MATCH
,WHEN_NO_TEMPLATES
, andNEVER
.WHEN_NO_MATCH
passes the request body for unmapped content types through to the Integration backend without transformation.NEVER
rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.WHEN_NO_TEMPLATES
will allow 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 415 response.
-
withPassthroughBehavior
public PutIntegrationResult withPassthroughBehavior(String passthroughBehavior)
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. There are three valid values:
WHEN_NO_MATCH
,WHEN_NO_TEMPLATES
, andNEVER
.WHEN_NO_MATCH
passes the request body for unmapped content types through to the Integration backend without transformation.NEVER
rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.WHEN_NO_TEMPLATES
will allow 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 415 response.- Parameters:
passthroughBehavior
- Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available requestTemplates defined on the Integration. There are three valid values:WHEN_NO_MATCH
,WHEN_NO_TEMPLATES
, andNEVER
.WHEN_NO_MATCH
passes the request body for unmapped content types through to the Integration backend without transformation.NEVER
rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response.WHEN_NO_TEMPLATES
will allow 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 415 response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCacheNamespace
public void setCacheNamespace(String cacheNamespace)
Specifies the integration's cache namespace.
- Parameters:
cacheNamespace
- Specifies the integration's cache namespace.
-
getCacheNamespace
public String getCacheNamespace()
Specifies the integration's cache namespace.
- Returns:
- Specifies the integration's cache namespace.
-
withCacheNamespace
public PutIntegrationResult withCacheNamespace(String cacheNamespace)
Specifies the integration's cache namespace.
- Parameters:
cacheNamespace
- Specifies the integration's cache namespace.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getCacheKeyParameters
public List<String> getCacheKeyParameters()
Specifies the integration's cache key parameters.
- Returns:
- Specifies the integration's cache key parameters.
-
setCacheKeyParameters
public void setCacheKeyParameters(Collection<String> cacheKeyParameters)
Specifies the integration's cache key parameters.
- Parameters:
cacheKeyParameters
- Specifies the integration's cache key parameters.
-
withCacheKeyParameters
public PutIntegrationResult withCacheKeyParameters(String... cacheKeyParameters)
Specifies the integration's cache key parameters.
NOTE: This method appends the values to the existing list (if any). Use
setCacheKeyParameters(java.util.Collection)
orwithCacheKeyParameters(java.util.Collection)
if you want to override the existing values.- Parameters:
cacheKeyParameters
- Specifies the integration's cache key parameters.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withCacheKeyParameters
public PutIntegrationResult withCacheKeyParameters(Collection<String> cacheKeyParameters)
Specifies the integration's cache key parameters.
- Parameters:
cacheKeyParameters
- Specifies the integration's cache key parameters.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getIntegrationResponses
public Map<String,IntegrationResponse> getIntegrationResponses()
Specifies the integration's responses.
- Returns:
- Specifies the integration's responses.
-
setIntegrationResponses
public void setIntegrationResponses(Map<String,IntegrationResponse> integrationResponses)
Specifies the integration's responses.
- Parameters:
integrationResponses
- Specifies the integration's responses.
-
withIntegrationResponses
public PutIntegrationResult withIntegrationResponses(Map<String,IntegrationResponse> integrationResponses)
Specifies the integration's responses.
- Parameters:
integrationResponses
- Specifies the integration's responses.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addIntegrationResponsesEntry
public PutIntegrationResult addIntegrationResponsesEntry(String key, IntegrationResponse value)
-
clearIntegrationResponsesEntries
public PutIntegrationResult clearIntegrationResponsesEntries()
Removes all the entries added into IntegrationResponses. <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 classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public PutIntegrationResult clone()
-
-