Interface IModelProps
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
public interface IModelProps : IModelOptions
- Inherited Members
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;
var default_;
var enum_;
JsonSchema jsonSchema_;
RestApi restApi;
var modelProps = new ModelProps {
RestApi = restApi,
Schema = new JsonSchema {
AdditionalItems = new [] { jsonSchema_ },
AdditionalProperties = false,
AllOf = new [] { jsonSchema_ },
AnyOf = new [] { jsonSchema_ },
Contains = jsonSchema_,
Default = default_,
Definitions = new Dictionary<string, JsonSchema> {
{ "definitionsKey", jsonSchema_ }
},
Dependencies = new Dictionary<string, object> {
{ "dependenciesKey", new [] { "dependencies" } }
},
Description = "description",
Enum = new [] { enum_ },
ExclusiveMaximum = false,
ExclusiveMinimum = false,
Format = "format",
Id = "id",
Items = jsonSchema_,
Maximum = 123,
MaxItems = 123,
MaxLength = 123,
MaxProperties = 123,
Minimum = 123,
MinItems = 123,
MinLength = 123,
MinProperties = 123,
MultipleOf = 123,
Not = jsonSchema_,
OneOf = new [] { jsonSchema_ },
Pattern = "pattern",
PatternProperties = new Dictionary<string, JsonSchema> {
{ "patternPropertiesKey", jsonSchema_ }
},
Properties = new Dictionary<string, JsonSchema> {
{ "propertiesKey", jsonSchema_ }
},
PropertyNames = jsonSchema_,
Ref = "ref",
Required = new [] { "required" },
Schema = JsonSchemaVersion.DRAFT4,
Title = "title",
Type = JsonSchemaType.NULL,
UniqueItems = false
},
// the properties below are optional
ContentType = "contentType",
Description = "description",
ModelName = "modelName"
};
Remarks
ExampleMetadata: fixture=_generated
Properties
RestApi
The rest API that this model is part of.
IRestApi RestApi { get; }
Property Value
Remarks
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.