alicloud_api_gateway_group
更新时间:
Provides an api group resource.To create an API, you must firstly create a group which is a basic attribute of the API.
For information about Api Gateway Group and how to use it, see Create An Api Group
-> NOTE: Available since v1.19.0.
-> NOTE: Terraform will auto build api group while it uses alicloud_api_gateway_group
to build api group.
Example Usage
Basic Usage
resource "alicloud_api_gateway_group" "default" {
name = "tf_example"
description = "tf_example"
base_path = "/"
user_log_config {
request_body = true
response_body = true
query_string = "*"
request_headers = "*"
response_headers = "*"
jwt_claims = "*"
}
}
Argument Reference
The following arguments are supported:
name
- (Required) The name of the api gateway group. Defaults to null.description
- (Optional) The description of the api gateway group. Defaults to null.instance_id
- (Optional, ForceNew, Available in 1.179.0+) The id of the api gateway.base_path
- (Optional, Computed, Available since v1.228.0) The base path of the api gateway group. Defaults to/
.user_log_config
- (Optional, Available since v1.246.0) user_log_config defines the config of user log of the group. Seeuser_log_config
below.vpc_intranet_enable
- (Optional, Available since v1.247.0) Whether to enablevpc_domain
. Defaults tofalse
.
user_log_config
The user_log_config mapping supports the following:
request_body
- (Optional, Type: bool) Whether to record the request body.response_body
- (Optional, Type: bool) Whether to record the response body.query_string
- (Optional) The query params to be record, support multi query params split by,
. Set*
to record all.request_headers
- (Optional) The request headers to be record, support multi request headers split by,
. Set*
to record all.response_headers
- (Optional) The response headers to be record, support multi response headers split by,
. Set*
to record all.jwt_claims
- (Optional) The jwt claims to be record, support multi jwt claims split by,
. Set*
to record all.
Attributes Reference
The following attributes are exported:
id
- The ID of the api group of api gateway.sub_domain
- (Available in 1.69.0+) Second-level domain name automatically assigned to the API group.vpc_domain
- (Available in 1.69.0+) Second-level VPC domain name automatically assigned to the API group.
Import
Api gateway group can be imported using the id, e.g.
$ terraform import alicloud_api_gateway_group.example "ab2351f2ce904edaa8d92a0510832b91"
该文章对您有帮助吗?