1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. apigateway
  5. Model

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.apigateway.Model

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

The AWS::ApiGateway::Model resource defines the structure of a request or response payload for an API method.

Create Model Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Model(name: string, args: ModelArgs, opts?: CustomResourceOptions);
@overload
def Model(resource_name: str,
          args: ModelArgs,
          opts: Optional[ResourceOptions] = None)

@overload
def Model(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          rest_api_id: Optional[str] = None,
          content_type: Optional[str] = None,
          description: Optional[str] = None,
          name: Optional[str] = None,
          schema: Optional[Any] = None)
func NewModel(ctx *Context, name string, args ModelArgs, opts ...ResourceOption) (*Model, error)
public Model(string name, ModelArgs args, CustomResourceOptions? opts = null)
public Model(String name, ModelArgs args)
public Model(String name, ModelArgs args, CustomResourceOptions options)
type: aws-native:apigateway:Model
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ModelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ModelArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ModelArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ModelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ModelArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Model Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Model resource accepts the following input properties:

RestApiId This property is required. string
The string identifier of the associated RestApi.
ContentType string
The content-type for the model.
Description string
The description of the model.
Name string
A name for the model. If you don't specify a name, CFN 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.
Schema object

The schema for the model. 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.

Search the CloudFormation User Guide for AWS::ApiGateway::Model for more information about the expected schema for this property.

RestApiId This property is required. string
The string identifier of the associated RestApi.
ContentType string
The content-type for the model.
Description string
The description of the model.
Name string
A name for the model. If you don't specify a name, CFN 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.
Schema interface{}

The schema for the model. 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.

Search the CloudFormation User Guide for AWS::ApiGateway::Model for more information about the expected schema for this property.

restApiId This property is required. String
The string identifier of the associated RestApi.
contentType String
The content-type for the model.
description String
The description of the model.
name String
A name for the model. If you don't specify a name, CFN 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.
schema Object

The schema for the model. 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.

Search the CloudFormation User Guide for AWS::ApiGateway::Model for more information about the expected schema for this property.

restApiId This property is required. string
The string identifier of the associated RestApi.
contentType string
The content-type for the model.
description string
The description of the model.
name string
A name for the model. If you don't specify a name, CFN 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.
schema any

The schema for the model. 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.

Search the CloudFormation User Guide for AWS::ApiGateway::Model for more information about the expected schema for this property.

rest_api_id This property is required. str
The string identifier of the associated RestApi.
content_type str
The content-type for the model.
description str
The description of the model.
name str
A name for the model. If you don't specify a name, CFN 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.
schema Any

The schema for the model. 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.

Search the CloudFormation User Guide for AWS::ApiGateway::Model for more information about the expected schema for this property.

restApiId This property is required. String
The string identifier of the associated RestApi.
contentType String
The content-type for the model.
description String
The description of the model.
name String
A name for the model. If you don't specify a name, CFN 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.
schema Any

The schema for the model. 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.

Search the CloudFormation User Guide for AWS::ApiGateway::Model for more information about the expected schema for this property.

Outputs

All input properties are implicitly available as output properties. Additionally, the Model resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi