文档

alicloud_event_bridge_api_destination

更新时间:
一键部署

Provides a Event Bridge Api Destination resource.

For information about Event Bridge Api Destination and how to use it, see What is Api Destination.

-> NOTE: Available since v1.211.0.

Example Usage

Basic Usage

provider "alicloud" {
  region = var.region
}

variable "region" {
  default = "cn-chengdu"
}

variable "name" {
  default = "terraform-example"
}

resource "alicloud_event_bridge_connection" "default" {
  connection_name = var.name
  network_parameters {
    network_type = "PublicNetwork"
  }
}

resource "alicloud_event_bridge_api_destination" "default" {
  connection_name      = alicloud_event_bridge_connection.default.connection_name
  api_destination_name = var.name
  description          = "test-api-destination-connection"
  http_api_parameters {
    endpoint = "http://127.0.0.1:8001"
    method   = "POST"
  }
}

Argument Reference

The following arguments are supported:

  • connection_name - (Required, ForceNew) The name of the connection.
  • api_destination_name - (Required, ForceNew) The name of the API destination.
  • description - (Optional) The description of the API destination.
  • http_api_parameters - (Required, Set) The parameters that are configured for the API destination. See http_api_parameters below.

http_api_parameters

The http_api_parameters supports the following:

  • endpoint - (Required) The endpoint of the API destination.
  • method - (Required) The HTTP request method. Valid values: GET, POST, HEAD, DELETE, PUT, PATCH.

Attributes Reference

The following attributes are exported:

  • id - The resource ID in terraform of Api Destination.
  • create_time - The creation time of the Api Destination.

Timeouts

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

  • create - (Defaults to 5 mins) Used when create the Api Destination.
  • update - (Defaults to 5 mins) Used when update the Api Destination.
  • delete - (Defaults to 5 mins) Used when delete the Api Destination.

Import

Event Bridge Api Destination can be imported using the id, e.g.

$ terraform import alicloud_event_bridge_api_destination.example <id>

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