Show / Hide Table of Contents

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""
}

",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Model
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
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 Source

Model(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 Source

ContentType

The content type of the model

Declaration
public Output<string> ContentType { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

The description of the model

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the model

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

RestApi

The ID of the associated REST API

Declaration
public Output<string> RestApi { get; }
Property Value
Type Description
Output<System.String>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.