Modifier and Type | Method and Description |
---|---|
Model |
build() |
Model.Builder |
contentType(String contentType)
(experimental) The content type for the model.
|
static Model.Builder |
create(software.constructs.Construct scope,
String id) |
Model.Builder |
description(String description)
(experimental) A description that identifies this model.
|
Model.Builder |
modelName(String modelName)
(experimental) A name for the model.
|
Model.Builder |
restApi(IRestApi restApi)
(experimental) The rest API that this model is part of.
|
Model.Builder |
schema(JsonSchema schema)
(experimental) The schema to use to transform data to one or more output formats.
|
@Stability(value=Experimental) public static Model.Builder create(software.constructs.Construct scope, String id)
scope
- This parameter is required.id
- This parameter is required.Model.Builder
.@Stability(value=Experimental) public Model.Builder schema(JsonSchema schema)
Specify null ({}) if you don't want to specify a schema.
schema
- The schema to use to transform data to one or more output formats. This parameter is required.this
@Stability(value=Experimental) public Model.Builder contentType(String contentType)
You can also force a content type in the request or response model mapping.
Default: 'application/json'
contentType
- The content type for the model. This parameter is required.this
@Stability(value=Experimental) public Model.Builder description(String description)
Default: None
description
- A description that identifies this model. This parameter is required.this
@Stability(value=Experimental) public Model.Builder modelName(String modelName)
Important If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
Default:
modelName
- A name for the model. This parameter is required.this
@Stability(value=Experimental) public Model.Builder restApi(IRestApi restApi)
The reason we need the RestApi object itself and not just the ID is because the model is being tracked by the top-level RestApi object for the purpose of calculating it's hash to determine the ID of the deployment. This allows us to automatically update the deployment when the model of the REST API changes.
restApi
- The rest API that this model is part of. This parameter is required.this
Copyright © 2021. All rights reserved.