Class Integration
- All Implemented Interfaces:
Serializable
,Cloneable
Represents a HTTP, AWS, or Mock integration.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddIntegrationResponsesEntry
(String key, IntegrationResponse value) addRequestParametersEntry
(String key, String value) addRequestTemplatesEntry
(String key, String value) Removes all the entries added into IntegrationResponses.Removes all the entries added into RequestParameters.Removes all the entries added into RequestTemplates.clone()
boolean
Specifies the integration's cache key parameters.Specifies the integration's cache namespace.Specifies the credentials required for the integration, if any.Specifies the integration's HTTP method type.Specifies the integration's responses.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.Represents requests parameters that are sent with the backend request.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.getType()
Specifies the integration's type.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
Specifies the integration's type.void
Specifies the integration's Uniform Resource Identifier (URI).toString()
Returns a string representation of this object; useful for testing and debugging.withCacheKeyParameters
(String... cacheKeyParameters) Specifies the integration's cache key parameters.withCacheKeyParameters
(Collection<String> cacheKeyParameters) Specifies the integration's cache key parameters.withCacheNamespace
(String cacheNamespace) Specifies the integration's cache namespace.withCredentials
(String credentials) Specifies the credentials required for the integration, if any.withHttpMethod
(String httpMethod) Specifies the integration's HTTP method type.withIntegrationResponses
(Map<String, IntegrationResponse> integrationResponses) Specifies the integration's responses.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.withRequestParameters
(Map<String, String> requestParameters) Represents requests parameters that are sent with the backend request.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.withType
(IntegrationType type) Specifies the integration's type.Specifies the integration's type.Specifies the integration's Uniform Resource Identifier (URI).
-
Constructor Details
-
Integration
public Integration()
-
-
Method Details
-
setType
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:
-
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:
-
withType
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:
-
setType
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:
-
withType
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:
-
setHttpMethod
Specifies the integration's HTTP method type.
- Parameters:
httpMethod
- Specifies the integration's HTTP method type.
-
getHttpMethod
Specifies the integration's HTTP method type.
- Returns:
- Specifies the integration's HTTP method type.
-
withHttpMethod
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
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
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
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
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
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
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
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
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
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
-
clearRequestParametersEntries
Removes all the entries added into RequestParameters. <p> Returns a reference to this object so that method calls can be chained together. -
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
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
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
-
clearRequestTemplatesEntries
Removes all the entries added into RequestTemplates. <p> Returns a reference to this object so that method calls can be chained together. -
setPassthroughBehavior
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
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
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
Specifies the integration's cache namespace.
- Parameters:
cacheNamespace
- Specifies the integration's cache namespace.
-
getCacheNamespace
Specifies the integration's cache namespace.
- Returns:
- Specifies the integration's cache namespace.
-
withCacheNamespace
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
Specifies the integration's cache key parameters.
- Returns:
- Specifies the integration's cache key parameters.
-
setCacheKeyParameters
Specifies the integration's cache key parameters.
- Parameters:
cacheKeyParameters
- Specifies the integration's cache key parameters.
-
withCacheKeyParameters
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
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
Specifies the integration's responses.
- Returns:
- Specifies the integration's responses.
-
setIntegrationResponses
Specifies the integration's responses.
- Parameters:
integrationResponses
- Specifies the integration's responses.
-
withIntegrationResponses
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
-
clearIntegrationResponsesEntries
Removes all the entries added into IntegrationResponses. <p> Returns a reference to this object so that method calls can be chained together. -
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-