Response

class Response : KotlinCustomResource

Provides an API Gateway Gateway Response for a REST API Gateway.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigateway.RestApi;
import com.pulumi.aws.apigateway.Response;
import com.pulumi.aws.apigateway.ResponseArgs;
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 main = new RestApi("main");
var test = new Response("test", ResponseArgs.builder()
.restApiId(main.id())
.statusCode("401")
.responseType("UNAUTHORIZED")
.responseTemplates(Map.of("application/json", "{\"message\":$context.error.messageString}"))
.responseParameters(Map.of("gatewayresponse.header.Authorization", "'Basic'"))
.build());
}
}

Import

aws_api_gateway_gateway_response can be imported using REST-API-ID/RESPONSE-TYPE, e.g.,

$ pulumi import aws:apigateway/response:Response example 12345abcde/UNAUTHORIZED

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Map of parameters (paths, query strings and headers) of the Gateway Response.

Link copied to clipboard

Map of templates used to transform the response body.

Link copied to clipboard
val responseType: Output<String>

Response type of the associated GatewayResponse.

Link copied to clipboard
val restApiId: Output<String>

String identifier of the associated REST API.

Link copied to clipboard
val statusCode: Output<String>?

HTTP status code of the Gateway Response.

Link copied to clipboard
val urn: Output<String>