equinix_fabric_stream_subscription(资源)
Fabric V4 API兼容资源允许创建和管理Equinix Fabric Stream订阅
补充文件:
- 入门指南:https://docs.equinix.com/observability/streaming-data/integratewithsink/
- API:https://docs.equinix.com/api-catalog/fabricv4/#tag/Stream-Subscriptions
用法示例
resource "equinix_fabric_stream_subscription" "SPLUNK" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
event_selector = {
include = ["equinix.fabric.connection.*"]
}
metric_selector = {
include = ["equinix.fabric.connection.*"]
}
sink = {
type = "SPLUNK_HEC"
uri = "<splunk_uri>"
settings = {
event_index = "<splunk_event_index>"
metric_index = "<splunk_metric_index>"
source = "<splunk_source>"
}
credential = {
type = "ACCESS_TOKEN"
access_token = "<splunk_access_token>"
}
}
}
resource "equinix_fabric_stream_subscription" "SLACK" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "SLACK"
uri = "<slack_uri>"
}
}
resource "equinix_fabric_stream_subscription" "PAGER_DUTY" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "PAGERDUTY"
host = "<pager_duty_host"
settings = {
change_uri = "<pager_duty_change_uri>"
alert_uri = "<pager_duty_alert_uri>"
}
credential = {
type = "INTEGRATION_KEY"
integration_key = "<pager_duty_integration_key>"
}
}
}
resource "equinix_fabric_stream_subscription" "DATADOG" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "DATADOG"
host = "<datadog_host>"
settings = {
source = "Equinix"
application_key = "<datadog_application_key>"
event_uri = "<datadog_event_uri>"
metric_uri = "<datadog_metric_uri>"
}
credential = {
type = "API_KEY"
api_key = "<datadog_api_key>"
}
}
}
resource "equinix_fabric_stream_subscription" "MSTEAMS" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "TEAMS"
uri = "<msteams_uri>"
}
}
resource "equinix_fabric_stream_subscription" "servicenow" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "SERVICENOW"
host = "<servicenow_host>"
settings = {
source = "Equinix"
}
credential = {
type = "USERNAME_PASSWORD"
username = "<servicenow_username>"
password = "<servicenow_password>"
}
}
}
resource "equinix_fabric_stream_subscription" "webhook" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "WEBHOOK"
settings = {
format = "<webhook_format>"
event_uri = "<webhook_event_uri>"
metric_uri = "<webhook_metric_uri>"
}
}
}
resource "equinix_fabric_stream_subscription" "grafana" {
type = "STREAM_SUBSCRIPTION"
name = "<name>"
description = "<description>"
stream_id = "<stream_id>"
enabled = true
sink = {
type = "WEBHOOK"
settings = {
format = "OPENTELEMETRY"
event_uri = "<grafana_event_uri>"
metric_uri = "<grafana_metric_uri>"
}
}
}
模式
需要
description(字符串)客户提供的流媒体订阅描述enabled(布尔值)流媒体订阅已启用状态name(字符串)客户提供的流媒体订阅名称sink(属性)Equinix Stream 订阅者的详细信息(有关嵌套架构,请参见下文)stream_id(字符串)流订阅的目标流的 UUIDtype(字符串)流订阅请求的类型
可选
event_selector(属性)要在流订阅中包含/排除的事件列表(有关嵌套架构,请参见下面的)metric_selector(属性)要在流订阅中包含/排除的指标列表(有关嵌套架构,请参见下面的)timeouts(属性)(有关嵌套模式,请参见下文)
只读
change_log(属性)流资源上次更改的详细信息(有关嵌套模式,请参见下面的)href(字符串)Equinix 分配的流订阅资源的 URIid(字符串)资源的唯一标识符state(字符串)表示流资源配置状态的值uuid(字符串)Equinix 分配的流订阅资源的唯一标识符
sink 的嵌套模式
必需的:
type(字符串)订阅者类型
选修的:
batch_enabled(布尔值)布尔开关,启用批量数据交付batch_size_max(数字)启用时,批量交付的最大大小batch_wait_time_max(数字)启用后等待批量交付的最长时间credential(属性)指定接收器类型的访问详细信息(有关嵌套架构,请参见下面的嵌套架构)host(字符串)某些数据流订阅产品的已知主机名。请勿与可变 URI 混淆。settings(属性)流订阅接收器设置(有关嵌套架构,请参见下面的)uri(字符串)数据流的公开可访问的 HTTP 端点目标
sink.credential 的嵌套模式
必需的:
type(字符串)传递的凭据类型
选修的:
access_token(字符串)作为授权标头值传递api_key(字符串)作为授权标头值传递integration_key(字符串)作为授权标头值传递password(字符串)作为授权标头值传递username(字符串)作为授权标头值传递
sink.settings 的嵌套模式
选修的:
application_key(字符串)event_index(字符串)event_uri(字符串)format(字符串)metric_index(字符串)metric_uri(字符串)source(字符串)
event_selector 的嵌套模式
必需的:
include(字符串列表)要包含的事件列表
选修的:
except(字符串列表)要排除的事件列表
metric_selector 的嵌套模式
必需的:
include(字符串列表)要包含的指标列表
选修的:
except(字符串列表)要排除的指标列表
timeouts 的嵌套模式
选修的:
create(字符串)一个可以解析为持续时间的字符串,由数字和单位后缀组成,例如“30s”或“2h45m”。有效的时间单位为“s”(秒)、“m”(分钟)、“h”(小时)。delete(字符串)一个可解析为持续时间的字符串(https://pkg.go.dev/time#ParseDuration),由数字和单位后缀组成,例如“30s”或“2h45m”。有效的时间单位为“s”(秒)、“m”(分钟)和“h”(小时)。设置删除操作的超时时间仅在销毁操作发生之前将更改保存到状态时才适用。read(字符串)一个可解析为持续时间的字符串(https://pkg.go.dev/time#ParseDuration),由数字和单位后缀组成,例如“30s”或“2h45m”。有效的时间单位为“s”(秒)、“m”(分钟)和“h”(小时)。当刷新功能启用时,读取操作会在任何刷新或计划操作期间发生。update(字符串)一个可以解析为持续时间的字符串,由数字和单位后缀组成,例如“30s”或“2h45m”。有效的时间单位为“s”(秒)、“m”(分钟)、“h”(小时)。
change_log 的嵌套模式
只读:
created_by(字符串)流资源创建者的用户名created_by_email(字符串)流资源创建者的电子邮件地址created_by_full_name(字符串)流资源创建者的法定名称created_date_time(字符串)流资源的创建时间deleted_by(字符串)流资源删除者的用户名deleted_by_email(字符串)流资源删除者的电子邮件地址deleted_by_full_name(字符串)流资源删除器的法定名称deleted_date_time(字符串)流资源的删除时间updated_by(字符串)流资源的最后更新者的用户名updated_by_email(字符串)流资源最后更新者的电子邮件地址updated_by_full_name(字符串)流资源的最后更新者的法定名称updated_date_time(字符串)流资源的最后更新时间