Package com.pulumi.aws.apigatewayv2
Class Model
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.apigatewayv2.Model
-
public class Model extends com.pulumi.resources.CustomResourceManages an Amazon API Gateway Version 2 [model](https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html#models-mappings-models). ## Example Usage ### Basic
## Import Using `pulumi import`, import `aws.apigatewayv2.Model` using the API identifier and model identifier. For example: ```sh $ pulumi import aws:apigatewayv2/model:Model example aabbccddee/1122334 ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.apigatewayv2.Model; import com.pulumi.aws.apigatewayv2.ModelArgs; import static com.pulumi.codegen.internal.Serialization.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var example = new Model("example", ModelArgs.builder() .apiId(exampleAwsApigatewayv2Api.id()) .contentType("application/json") .name("example") .schema(serializeJson( jsonObject( jsonProperty("$schema", "http://json-schema.org/draft-04/schema#"), jsonProperty("title", "ExampleModel"), jsonProperty("type", "object"), jsonProperty("properties", jsonObject( jsonProperty("id", jsonObject( jsonProperty("type", "string") )) )) ))) .build()); } }
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>apiId()com.pulumi.core.Output<java.lang.String>contentType()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()static Modelget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ModelState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>schema()
-
-
-
Constructor Detail
-
Model
public Model(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Model
public Model(java.lang.String name, ModelArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Model
public Model(java.lang.String name, ModelArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
apiId
public com.pulumi.core.Output<java.lang.String> apiId()
- Returns:
- API identifier.
-
contentType
public com.pulumi.core.Output<java.lang.String> contentType()
- Returns:
- Content-type for the model, for example, `application/json`. Must be between 1 and 256 characters in length.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- Description of the model. Must be between 1 and 128 characters in length.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name of the model. Must be alphanumeric. Must be between 1 and 128 characters in length.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
schema
public com.pulumi.core.Output<java.lang.String> schema()
- Returns:
- Schema for the model. This should be a [JSON schema draft 4](https://tools.ietf.org/html/draft-zyp-json-schema-04) model. Must be less than or equal to 32768 characters in length.
-
get
public static Model get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ModelState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-