public final class IntegrationTrait extends AbstractTrait implements ToSmithyBuilder<IntegrationTrait>
Modifier and Type | Class and Description |
---|---|
static class |
IntegrationTrait.Builder |
static class |
IntegrationTrait.Provider |
Modifier and Type | Method and Description |
---|---|
static IntegrationTrait.Builder |
builder() |
protected ObjectNode |
createNode()
The result of toNode is used for hashCodes and equality.
|
static java.lang.String |
formatComponent(ToShapeId service,
ToShapeId operation,
java.lang.String component)
Replaces templated placeholders in an Integration trait.
|
java.util.List<java.lang.String> |
getCacheKeyParameters()
A list of request parameters whose values are to be cached.
|
java.util.Optional<java.lang.String> |
getCacheNamespace()
Gets an API-specific tag group of related cached parameters.
|
java.util.Optional<java.lang.String> |
getConnectionId()
Gets the ID of a VpcLink when using a private integration.
|
java.util.Optional<java.lang.String> |
getConnectionType()
Gets the connection type used by this integration.
|
java.util.Optional<java.lang.String> |
getContentHandling()
Get the Request payload encoding conversion types.
|
java.util.Optional<java.lang.String> |
getCredentials()
Gets the credentials required for the integration, if any.
|
java.lang.String |
getHttpMethod()
Gets the integration's HTTP method type.
|
java.util.Optional<java.lang.String> |
getPassThroughBehavior()
Gets the pass through behavior of the integration.
|
java.util.Optional<java.lang.String> |
getPayloadFormatVersion()
Gets the payload format version.
|
java.util.Optional<java.lang.String> |
getRequestParameter(java.lang.String expression)
Get a specific request parameter by input expression.
|
java.util.Map<java.lang.String,java.lang.String> |
getRequestParameters()
Gets the request parameter mappings of the integration.
|
java.util.Optional<java.lang.String> |
getRequestTemplate(java.lang.String mimeType)
Gets a specific request template by MIME type.
|
java.util.Map<java.lang.String,java.lang.String> |
getRequestTemplates()
Gets all request templates of the integration.
|
java.util.Optional<IntegrationResponse> |
getResponse(java.lang.String statusCode)
Get a specific integration response by status code expression.
|
java.util.Map<java.lang.String,IntegrationResponse> |
getResponses()
Gets all integration responses.
|
java.util.Optional<java.lang.Integer> |
getTimeoutInMillis()
Get the timeout in milliseconds.
|
java.lang.String |
getType()
Gets the integration type.
|
java.lang.String |
getUri()
Gets the Uniform Resource Identifier (URI) of the integration endpoint.
|
IntegrationTrait.Builder |
toBuilder()
Take this object and create a builder that contains all of the
current property values of this object.
|
ObjectNode |
toExpandedNode(ToShapeId service,
ToShapeId operation)
Converts the trait an ObjectNode that finds and replaces the templated
serviceName and operationName labels in the "uri" and "credentials"
key-value pairs.
|
equals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
flatMapStream, getIdiomaticTraitName, getIdiomaticTraitName, isSynthetic, makeAbsoluteName, makeAbsoluteName
public static final ShapeId ID
public static IntegrationTrait.Builder builder()
public java.lang.String getType()
public java.lang.String getUri()
public java.util.Optional<java.lang.String> getCredentials()
For AWS integrations, three options are available. To specify an
IAM Role for 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/*
. Resource-based permissions are used if
no credentials are provided.
public java.lang.String getHttpMethod()
public java.util.Optional<java.lang.String> getPassThroughBehavior()
Specifies how a request payload of unmapped content type is passed through the integration request without modification. Supported values are when_no_templates, when_no_match, and never.
public java.util.Optional<java.lang.String> getContentHandling()
Valid values are:
public java.util.Optional<java.lang.Integer> getTimeoutInMillis()
Integration timeouts between 50 ms and 29,000 ms. The default setting used by API Gateway is 29,000 (or, 29 seconds).
public java.util.Optional<java.lang.String> getConnectionId()
public java.util.Optional<java.lang.String> getConnectionType()
public java.util.Optional<java.lang.String> getCacheNamespace()
public java.util.Optional<java.lang.String> getPayloadFormatVersion()
public java.util.List<java.lang.String> getCacheKeyParameters()
public java.util.Map<java.lang.String,java.lang.String> getRequestParameters()
Each key is an expression used to extract a value from the request, and each value is an expression of where to place the value in the downstream request. Supported request parameters are querystring, path, header, and body.
public java.util.Optional<java.lang.String> getRequestParameter(java.lang.String expression)
expression
- Expression to get.public java.util.Map<java.lang.String,java.lang.String> getRequestTemplates()
public java.util.Optional<java.lang.String> getRequestTemplate(java.lang.String mimeType)
mimeType
- MIME type to get.public java.util.Map<java.lang.String,IntegrationResponse> getResponses()
public java.util.Optional<IntegrationResponse> getResponse(java.lang.String statusCode)
statusCode
- Status code regular expression to search for.public ObjectNode toExpandedNode(ToShapeId service, ToShapeId operation)
service
- Service shape ID to use when replacing {serviceName}
.operation
- Operation shape ID to use when replacing {operationName}
.public static java.lang.String formatComponent(ToShapeId service, ToShapeId operation, java.lang.String component)
service
- Service shape ID to use when replacing {serviceName}
.operation
- Operation shape ID to use when replacing {operationName}
.component
- Templatized component to expand.protected ObjectNode createNode()
AbstractTrait
createNode
in class AbstractTrait
public IntegrationTrait.Builder toBuilder()
ToSmithyBuilder
toBuilder
in interface ToSmithyBuilder<IntegrationTrait>