Model

class Model : KotlinCustomResource

Provides a Model 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.RestApiArgs;
import com.pulumi.aws.apigateway.Model;
import com.pulumi.aws.apigateway.ModelArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 myDemoAPI = new RestApi("myDemoAPI", RestApiArgs.builder()
.description("This is my API for demonstration purposes")
.build());
var myDemoModel = new Model("myDemoModel", ModelArgs.builder()
.restApi(myDemoAPI.id())
.description("a JSON schema")
.contentType("application/json")
.schema(serializeJson(
jsonObject(
jsonProperty("type", "object")
)))
.build());
}
}

Import

aws_api_gateway_model can be imported using REST-API-ID/NAME, e.g.,

$ pulumi import aws:apigateway/model:Model example 12345abcde/example

Properties

Link copied to clipboard
val contentType: Output<String>

Content type of the model

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

Description of the model

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

Name of the model

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

ID of the associated REST API

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

Schema of the model in a JSON form

Link copied to clipboard
val urn: Output<String>