文档

alicloud_api_gateway_model

更新时间:
一键部署

Provides a Api Gateway Model resource.

For information about Api Gateway Model and how to use it, see What is Model.

-> NOTE: Available since v1.187.0.

Example Usage

Basic Usage

resource "alicloud_api_gateway_group" "default" {
  name        = "example_value"
  description = "example_value"
}

resource "alicloud_api_gateway_model" "default" {
  group_id    = alicloud_api_gateway_group.default.id
  model_name  = "example_value"
  schema      = "{\"type\":\"object\",\"properties\":{\"id\":{\"format\":\"int64\",\"maximum\":100,\"exclusiveMaximum\":true,\"type\":\"integer\"},\"name\":{\"maxLength\":10,\"type\":\"string\"}}}"
  description = "example_value"
}

Argument Reference

The following arguments are supported:

  • group_id - (Required, ForceNew) The group of the model belongs to.
  • model_name - (Required, ForceNew) The name of the model.
  • schema - (Required) The schema of the model.
  • description - (Optional) The description of the model.

Attributes Reference

The following attributes are exported:

  • id - The resource ID of Model. The value formats as <group_id>:<model_name>.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 3 mins) Used when create the Api Gateway Model.
  • update - (Defaults to 3 mins) Used when update the Api Gateway Model.
  • delete - (Defaults to 3 mins) Used when delete the Api Gateway Model.

Import

Api Gateway Model can be imported using the id, e.g.

$ terraform import alicloud_api_gateway_model.example <group_id>:<model_name>

  • 本页导读 (0)
文档反馈