@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.278Z") @Stability(value=Stable) public class CfnIntegrationResponse extends CfnResource implements IInspectable
The AWS::ApiGatewayV2::IntegrationResponse resource updates an integration response for an WebSocket API. For more information, see Set up WebSocket API Integration Responses in API Gateway in the API Gateway Developer Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigatewayv2.*;
Object responseParameters;
Object responseTemplates;
CfnIntegrationResponse cfnIntegrationResponse = CfnIntegrationResponse.Builder.create(this, "MyCfnIntegrationResponse")
.apiId("apiId")
.integrationId("integrationId")
.integrationResponseKey("integrationResponseKey")
// the properties below are optional
.contentHandlingStrategy("contentHandlingStrategy")
.responseParameters(responseParameters)
.responseTemplates(responseTemplates)
.templateSelectionExpression("templateSelectionExpression")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnIntegrationResponse.Builder
A fluent builder for
CfnIntegrationResponse. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnIntegrationResponse(software.constructs.Construct scope,
String id,
CfnIntegrationResponseProps props)
Create a new `AWS::ApiGatewayV2::IntegrationResponse`.
|
protected |
CfnIntegrationResponse(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnIntegrationResponse(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getApiId()
The API identifier.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getContentHandlingStrategy()
Supported only for WebSocket APIs.
|
String |
getIntegrationId()
The integration ID.
|
String |
getIntegrationResponseKey()
The integration response key.
|
Object |
getResponseParameters()
A key-value map specifying response parameters that are passed to the method response from the backend.
|
Object |
getResponseTemplates()
The collection of response templates for the integration response as a string-to-string map of key-value pairs.
|
String |
getTemplateSelectionExpression()
The template selection expression for the integration response.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setApiId(String value)
The API identifier.
|
void |
setContentHandlingStrategy(String value)
Supported only for WebSocket APIs.
|
void |
setIntegrationId(String value)
The integration ID.
|
void |
setIntegrationResponseKey(String value)
The integration response key.
|
void |
setResponseParameters(Object value)
A key-value map specifying response parameters that are passed to the method response from the backend.
|
void |
setResponseTemplates(Object value)
The collection of response templates for the integration response as a string-to-string map of key-value pairs.
|
void |
setTemplateSelectionExpression(String value)
The template selection expression for the integration response.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnIntegrationResponse(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnIntegrationResponse(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnIntegrationResponse(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnIntegrationResponseProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getApiId()
@Stability(value=Stable)
public void setApiId(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getIntegrationId()
@Stability(value=Stable)
public void setIntegrationId(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getIntegrationResponseKey()
@Stability(value=Stable)
public void setIntegrationResponseKey(@NotNull
String value)
@Stability(value=Stable) @NotNull public Object getResponseParameters()
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.
@Stability(value=Stable)
public void setResponseParameters(@NotNull
Object value)
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.
@Stability(value=Stable) @NotNull public Object getResponseTemplates()
Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
@Stability(value=Stable)
public void setResponseTemplates(@NotNull
Object value)
Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
@Stability(value=Stable) @Nullable public String getContentHandlingStrategy()
Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT , with the following behaviors:
CONVERT_TO_BINARY : Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT : Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
@Stability(value=Stable)
public void setContentHandlingStrategy(@Nullable
String value)
Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT , with the following behaviors:
CONVERT_TO_BINARY : Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT : Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
@Stability(value=Stable) @Nullable public String getTemplateSelectionExpression()
Supported only for WebSocket APIs.
@Stability(value=Stable)
public void setTemplateSelectionExpression(@Nullable
String value)
Supported only for WebSocket APIs.
Copyright © 2022. All rights reserved.