
com.pulumi.aws.apigatewayv2.IntegrationResponse Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.apigatewayv2;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.apigatewayv2.IntegrationResponseArgs;
import com.pulumi.aws.apigatewayv2.inputs.IntegrationResponseState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages an Amazon API Gateway Version 2 integration response.
* More information can be found in the [Amazon API Gateway Developer Guide](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api.html).
*
* ## Example Usage
*
* ### Basic
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.apigatewayv2.IntegrationResponse;
* import com.pulumi.aws.apigatewayv2.IntegrationResponseArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var example = new IntegrationResponse("example", IntegrationResponseArgs.builder()
* .apiId(exampleAwsApigatewayv2Api.id())
* .integrationId(exampleAwsApigatewayv2Integration.id())
* .integrationResponseKey("/200/")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import `aws_apigatewayv2_integration_response` using the API identifier, integration identifier and integration response identifier. For example:
*
* ```sh
* $ pulumi import aws:apigatewayv2/integrationResponse:IntegrationResponse example aabbccddee/1122334/998877
* ```
*
*/
@ResourceType(type="aws:apigatewayv2/integrationResponse:IntegrationResponse")
public class IntegrationResponse extends com.pulumi.resources.CustomResource {
/**
* API identifier.
*
*/
@Export(name="apiId", refs={String.class}, tree="[0]")
private Output apiId;
/**
* @return API identifier.
*
*/
public Output apiId() {
return this.apiId;
}
/**
* How to handle response payload content type conversions. Valid values: `CONVERT_TO_BINARY`, `CONVERT_TO_TEXT`.
*
*/
@Export(name="contentHandlingStrategy", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> contentHandlingStrategy;
/**
* @return How to handle response payload content type conversions. Valid values: `CONVERT_TO_BINARY`, `CONVERT_TO_TEXT`.
*
*/
public Output> contentHandlingStrategy() {
return Codegen.optional(this.contentHandlingStrategy);
}
/**
* Identifier of the `aws.apigatewayv2.Integration`.
*
*/
@Export(name="integrationId", refs={String.class}, tree="[0]")
private Output integrationId;
/**
* @return Identifier of the `aws.apigatewayv2.Integration`.
*
*/
public Output integrationId() {
return this.integrationId;
}
/**
* Integration response key.
*
*/
@Export(name="integrationResponseKey", refs={String.class}, tree="[0]")
private Output integrationResponseKey;
/**
* @return Integration response key.
*
*/
public Output integrationResponseKey() {
return this.integrationResponseKey;
}
/**
* Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
*
*/
@Export(name="responseTemplates", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> responseTemplates;
/**
* @return Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
*
*/
public Output>> responseTemplates() {
return Codegen.optional(this.responseTemplates);
}
/**
* The [template selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-template-selection-expressions) for the integration response.
*
*/
@Export(name="templateSelectionExpression", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> templateSelectionExpression;
/**
* @return The [template selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-template-selection-expressions) for the integration response.
*
*/
public Output> templateSelectionExpression() {
return Codegen.optional(this.templateSelectionExpression);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public IntegrationResponse(java.lang.String name) {
this(name, IntegrationResponseArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public IntegrationResponse(java.lang.String name, IntegrationResponseArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public IntegrationResponse(java.lang.String name, IntegrationResponseArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:apigatewayv2/integrationResponse:IntegrationResponse", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private IntegrationResponse(java.lang.String name, Output id, @Nullable IntegrationResponseState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:apigatewayv2/integrationResponse:IntegrationResponse", name, state, makeResourceOptions(options, id), false);
}
private static IntegrationResponseArgs makeArgs(IntegrationResponseArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? IntegrationResponseArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static IntegrationResponse get(java.lang.String name, Output id, @Nullable IntegrationResponseState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new IntegrationResponse(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy