@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:47.530Z") public class CfnModel extends CfnResource implements IInspectable
The AWS::ApiGateway::Model
resource defines the structure of a request or response payload for an API method.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.apigateway.*; Object schema; CfnModel cfnModel = CfnModel.Builder.create(this, "MyCfnModel") .restApiId("restApiId") // the properties below are optional .contentType("contentType") .description("description") .name("name") .schema(schema) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnModel.Builder
A fluent builder for
CfnModel . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnModel(Construct scope,
java.lang.String id,
CfnModelProps props)
Create a new `AWS::ApiGateway::Model`.
|
protected |
CfnModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnModel(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getContentType()
The content-type for the model.
|
java.lang.String |
getDescription()
The description of the model.
|
java.lang.String |
getName()
A name for the model.
|
java.lang.String |
getRestApiId()
The string identifier of the associated RestApi.
|
java.lang.Object |
getSchema()
The schema for the model.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setContentType(java.lang.String value)
The content-type for the model.
|
void |
setDescription(java.lang.String value)
The description of the model.
|
void |
setName(java.lang.String value)
A name for the model.
|
void |
setRestApiId(java.lang.String value)
The string identifier of the associated RestApi.
|
void |
setSchema(java.lang.Object value)
The schema for the model.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnModel(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnModel(Construct scope, java.lang.String id, CfnModelProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getRestApiId()
public void setRestApiId(java.lang.String value)
public java.lang.Object getSchema()
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.
public void setSchema(java.lang.Object value)
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.
public java.lang.String getContentType()
public void setContentType(java.lang.String value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getName()
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.
public void setName(java.lang.String value)
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.