Class CfnModel
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
A CloudFormation AWS::ApiGateway::Model
.
public class CfnModel : CfnResource, IInspectable
- Inheritance
-
CfnModel
- Implements
-
IInspectable
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 schema;
var cfnModel = new CfnModel(this, "MyCfnModel", new CfnModelProps {
RestApiId = "restApiId",
// the properties below are optional
ContentType = "contentType",
Description = "description",
Name = "name",
Schema = schema
});
Remarks
The AWS::ApiGateway::Model
resource defines the structure of a request or response payload for an API method.
CloudformationResource: AWS::ApiGateway::Model
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html
ExampleMetadata: fixture=_generated
Constructors
CfnModel(Construct, string, ICfnModelProps)
Create a new AWS::ApiGateway::Model
.
public CfnModel(Construct scope, string id, ICfnModelProps props)
Parameters
scope
Construct- scope in which this resource is defined.
id
string- scoped id of the resource.
props
ICfnModelProps- resource properties.
Properties
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
ContentType
The content-type for the model.
public virtual string? ContentType { get; set; }
Property Value
Remarks
Description
The description of the model.
public virtual string? Description { get; set; }
Property Value
Remarks
Name
A name for the model.
public virtual string? Name { get; set; }
Property Value
Remarks
If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the model name. For more information, see Name Type .
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.
RestApiId
The string identifier of the associated RestApi.
public virtual string RestApiId { get; set; }
Property Value
Remarks
Schema
The schema for the model.
public virtual object Schema { get; set; }
Property Value
Remarks
For application/json
models, this should be JSON schema draft 4 model. Do not include "* /" characters in the description of any properties because such "* /" characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API's SDK generated by API Gateway to fail.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
inspector
TreeInspector- tree inspector to collect and process attributes.
RenderProperties(IDictionary<string, object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props
IDictionary<string, object>