Class Model
Provides a Model for a REST API Gateway.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var myDemoAPI = new Aws.ApiGateway.RestApi("myDemoAPI", new Aws.ApiGateway.RestApiArgs
{
Description = "This is my API for demonstration purposes",
});
var myDemoModel = new Aws.ApiGateway.Model("myDemoModel", new Aws.ApiGateway.ModelArgs
{
ContentType = "application/json",
Description = "a JSON schema",
RestApi = myDemoAPI.Id,
Schema = @"{
""type"": ""object""
}
",
});
}
}
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.ApiGateway
Assembly: Pulumi.Aws.dll
Syntax
public class Model : CustomResource
Constructors
View SourceModel(String, ModelArgs, CustomResourceOptions)
Create a Model resource with the given unique name, arguments, and options.
Declaration
public Model(string name, ModelArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ModelArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceContentType
The content type of the model
Declaration
public Output<string> ContentType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The description of the model
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the model
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RestApi
The ID of the associated REST API
Declaration
public Output<string> RestApi { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Schema
The schema of the model in a JSON form
Declaration
public Output<string> Schema { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ModelState, CustomResourceOptions)
Get an existing Model resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Model Get(string name, Input<string> id, ModelState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ModelState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Model |