Class Model
Manages an Amazon API Gateway Version 2 model.
Example Usage
Basic
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.ApiGatewayV2.Model("example", new Aws.ApiGatewayV2.ModelArgs
{
ApiId = aws_apigatewayv2_api.Example.Id,
ContentType = "application/json",
Schema = @"{
""$$schema"": ""http://json-schema.org/draft-04/schema#"",
""title"": ""ExampleModel"",
""type"": ""object"",
""properties"": {
""id"": { ""type"": ""string"" }
}
}
",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.ApiGatewayV2
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 SourceApiId
The API identifier.
Declaration
public Output<string> ApiId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ContentType
The content-type for the model, for example, application/json.
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. Must be alphanumeric.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Schema
The schema for the model. This should be a JSON schema draft 4 model.
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 |