# equinix\_fabric\_stream\_subscription(资源)
Fabric V4 API兼容资源允许创建和管理Equinix Fabric Stream订阅
补充文件:
* 入门指南:
* API:
## 用法示例[](#用法示例 "直接链接至用法示例")
```
resource "equinix_fabric_stream_subscription" "SPLUNK" {
type = "STREAM_SUBSCRIPTION"
name = ""
description = ""
stream_id = ""
enabled = true
event_selector = {
include = ["equinix.fabric.connection.*"]
}
metric_selector = {
include = ["equinix.fabric.connection.*"]
}
sink = {
type = "SPLUNK_HEC"
uri = ""
settings = {
event_index = ""
metric_index = ""
source = ""
}
credential = {
type = "ACCESS_TOKEN"
access_token = ""
}
}
}
resource "equinix_fabric_stream_subscription" "SLACK" {
type = "STREAM_SUBSCRIPTION"
name = ""
description = ""
stream_id = ""
enabled = true
sink = {
type = "SLACK"
uri = ""
}
}
resource "equinix_fabric_stream_subscription" "PAGER_DUTY" {
type = "STREAM_SUBSCRIPTION"
name = ""
description = ""
stream_id = ""
enabled = true
sink = {
type = "PAGERDUTY"
host = "
## 模式[](#模式 "直接链接至模式")
### 必填[](#必填 "直接链接至必填")
* `description`(字符串)客户提供的流订阅描述
* `enabled`(布尔值) Stream订阅已启用状态
* `name`(字符串)客户提供的流订阅名称
* `sink`(属性) Equinix流订阅者的详细信息([有关嵌套架构](#nestedatt--sink),请参阅[下文](#nestedatt--sink))
* `stream_id`(字符串)作为数据流订阅目标的数据流的uuid
* `type`(字符串)流订阅请求的类型
### 可选[](#可选 "直接链接至可选")
* `event_selector`(属性)数据流订阅中要包括/排除的事件列表([有关嵌套架构,](#nestedatt--event_selector)请参阅[下文](#nestedatt--event_selector))
* `metric_selector`(属性)数据流订阅中要包括/排除的指标列表([有关嵌套架构,](#nestedatt--metric_selector)请参阅[下文](#nestedatt--metric_selector))
* `timeouts`(属性)([有关嵌套架构](#nestedatt--timeouts),请参阅[下文](#nestedatt--timeouts))
### 只读[](#只读 "直接链接至只读")
* `change_log`(属性)数据流资源上次更改的详细信息([嵌套架构](#nestedatt--change_log)参见[下方](#nestedatt--change_log))
* `href`(字符串) Equinix分配的数据流订阅资源的URI
* `id`(字符串)资源的唯一标识符
* `state`(字符串)值,表示数据流资源的配置状态
* `uuid`(字符串) Equinix分配了数据流订阅资源的唯一标识符
[]()
### 的嵌套架构`sink`[](#的嵌套架构sink "直接链接至的嵌套架构sink")
必需的:
* `type` (字符串)订阅者的类型
可选:
* `batch_enabled`(布尔值)布尔切换器,启用数据批量交付
* `batch_size_max`(数量)批量交付的最大大小(如果启用)
* `batch_wait_time_max`(数字)启用后,等待批量交付的最长时间
* `credential`(属性)指定接收器类型的访问详情([有关嵌套架构](#nestedatt--sink--credential),请参阅[下文](#nestedatt--sink--credential))
* `host`(字符串)某些数据流订阅产品的已知主机名。请勿与可变URI混淆
* `settings`(属性)流订阅接收器设置([有关嵌套架构](#nestedatt--sink--settings),请参阅[下文](#nestedatt--sink--settings))
* `uri`(字符串)数据流的公开可达http端点目标
[]()
### 的嵌套架构`sink.credential`[](#的嵌套架构sinkcredential "直接链接至的嵌套架构sinkcredential")
必需的:
* `type` (字符串)要传递的凭据类型
可选:
* `access_token`(字符串,敏感)作为授权标头值传递
* `api_key`(字符串,敏感)作为授权标头值传递
* `integration_key`(字符串,敏感)作为授权标头值传递
* `password`(字符串,敏感)作为授权标头值传递
* `username`(字符串)作为授权标头值传递
[]()
### 的嵌套架构`sink.settings`[](#的嵌套架构sinksettings "直接链接至的嵌套架构sinksettings")
可选:
* `application_key` (字符串,敏感)
* `event_index`(字符串)
* `event_uri`(字符串)
* `format`(字符串)
* `metric_index`(字符串)
* `metric_uri`(字符串)
* `source`(字符串)
[]()
### 的嵌套架构`event_selector`[](#的嵌套架构event_selector "直接链接至的嵌套架构event_selector")
必需的:
* `include` (字符串列表)要包括的事件列表
可选:
* `except`(字符串列表)要排除的事件列表
[]()
### 的嵌套架构`metric_selector`[](#的嵌套架构metric_selector "直接链接至的嵌套架构metric_selector")
必需的:
* `include` (字符串列表)要包含的指标列表
可选:
* `except`(字符串列表)要排除的指标列表
[]()
### 的嵌套架构`timeouts`[](#的嵌套架构timeouts "直接链接至的嵌套架构timeouts")
可选:
* `create` (string)可[解析为持续时间的](https://pkg.go.dev/time#ParseDuration)字符串,由数字和单位后缀组成,例如“30s”或“2h45m”。有效时间单位为“s”(秒),“m”(分钟),“h”(小时)。
* `delete`(string)可[解析为持续时间的](https://pkg.go.dev/time#ParseDuration)字符串,由数字和单位后缀组成,例如“30s”或“2h45m”。有效时间单位为“s”(秒),“m”(分钟),“h”(小时)。仅当更改保存到销毁操作发生之前的状态时,删除操作的超时才适用。
* `read`(string)可[解析为持续时间的](https://pkg.go.dev/time#ParseDuration)字符串,由数字和单位后缀组成,例如“30s”或“2h45m”。有效时间单位为“s”(秒),“m”(分钟),“h”(小时)。启用刷新后,读取操作将在任何刷新或计划操作期间进行。
* `update`(string)可[解析为持续时间的](https://pkg.go.dev/time#ParseDuration)字符串,由数字和单位后缀组成,例如“30s”或“2h45m”。有效时间单位为“s”(秒),“m”(分钟),“h”(小时)。
[]()
### 的嵌套架构`change_log`[](#的嵌套架构change_log "直接链接至的嵌套架构change_log")
只读:
* `created_by` (字符串)流资源创建者的用户名
* `created_by_email`(字符串)流资源创建者的电子邮件
* `created_by_full_name`(字符串)流资源创建者的法定名称
* `created_date_time`(字符串)流资源的创建时间
* `deleted_by`(字符串)数据流资源删除器的用户名
* `deleted_by_email`(string)数据流资源删除器的电子邮件
* `deleted_by_full_name`(string)数据流资源删除器的法定名称
* `deleted_date_time`(字符串)数据流资源的删除时间
* `updated_by`(字符串)数据流资源上次更新器的用户名
* `updated_by_email`(字符串)数据流资源最后更新器的电子邮件
* `updated_by_full_name`(字符串)数据流资源最后更新器的法定名称
* `updated_date_time`(string)流资源的上次更新时间