We recommend new projects start with resources from the AWS provider.
aws-native.apigateway.Model
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
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)
type: aws-native:apigateway:Model
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ModelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args ModelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ModelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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:
- Rest
Api stringId - The string identifier of the associated RestApi.
- Content
Type 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.
- Rest
Api stringId - The string identifier of the associated RestApi.
- Content
Type 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.
- rest
Api StringId - The string identifier of the associated RestApi.
- content
Type 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.
- rest
Api stringId - The string identifier of the associated RestApi.
- content
Type 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_ strid - 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.
- rest
Api StringId - The string identifier of the associated RestApi.
- content
Type 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.