# equinix\_fabric\_service\_profiles（数据源）

兼容 Fabric V4 API 的数据资源，允许用户按名称筛选条件获取服务配置文件。

补充文件：

* 入门指南：<https://docs.equinix.com/fabric/service-providers/fabric-spo-intro/>
* API：<https://docs.equinix.com/api-catalog/fabricv4/#tag/Service-Profiles>

## 用法示例[​](#用法示例 "Direct link to 用法示例")

```
data "equinix_fabric_service_profiles" "test" {

  and_filters = true

  filter {

    property = "/type"

    operator = "="

    values 	 = ["L2_PROFILE"]

  }

  filter {

    property = "/name"

    operator = "="

    values   = ["SP_ResourceCreation_PFCR"]

  }

  pagination {

    offset = 0

    limit = 5

  }

  sort {

    direction = "ASC"

    property = "/name"

  }

}



output "number_of_returned_service_profiles" {

  value = length(data.equinix_fabric_service_profiles.test.data)

}



output "first_service_profile_name" {

  value = data.equinix_fabric_service_profiles.test.data.0.name

}



output "first_service_profile_uuid" {

  value = data.equinix_fabric_service_profiles.test.data.0.uuid

}



output "first_service_profile_description" {

  value = data.equinix_fabric_service_profiles.test.data.0.description

}



output "first_service_profile_state" {

  value = data.equinix_fabric_service_profiles.test.data.0.state

}



output "first_service_profile_visibility" {

  value = data.equinix_fabric_service_profiles.test.data.0.visibility

}



output "first_service_profile_metros_code" {

  value = data.equinix_fabric_service_profiles.test.data.0.metros.0.code

}



output "first_service_profile_metros_name" {

  value = data.equinix_fabric_service_profiles.test.data.0.metros.0.name

}



output "first_service_profile_metros_display_name" {

  value = data.equinix_fabric_service_profiles.test.data.0.metros.0.display_name

}



output "first_service_profile_type" {

  value = data.equinix_fabric_service_profiles.test.data.0.type

}
```

<!-- -->

## 模式[​](#模式 "Direct link to 模式")

### 需要[​](#需要 "Direct link to 需要")

* `filter`（块列表，最小值：1，最大值：10）数据源搜索请求的过滤器（如果 and\_filters 未设置为 true，则不能提供多个过滤器块）（有关嵌套架构，请参见[下文](#nestedblock--filter)）

### 可选[​](#可选 "Direct link to 可选")

* `and_filters`（布尔值）可选的布尔标志，指示过滤器是否将以“与”运算方式连接在一起。默认为 false
* `pagination`（块集，最大值：1）数据源搜索请求的分页详细信息（有关嵌套架构，请参见[下文](#nestedblock--pagination)）
* `sort`（阻止列表）数据源搜索请求的过滤器（有关嵌套架构，请参见[下文](#nestedblock--sort)）
* `view_point`（字符串）在买方和卖方视图之间切换。可用值：aSide、zSide。默认值：aSide

### 只读[​](#只读 "Direct link to 只读")

* `data`（对象列表）服务配置文件列表（有关嵌套架构，请参见[下文](#nestedatt--data)）
* `id`（字符串）此资源的 ID。

[]()

### `filter` 的嵌套模式[​](#filter-的嵌套模式 "Direct link to filter-的嵌套模式")

必需的：

* `operator`（字符串）运算符，用于对已筛选字段使用给定的值。可以是 \[=]
* `property`（字符串）要应用运算符和值的属性。可以是 \[/name /uuid /state /metros/code /visibility /type /project/projectId] 之一。
* `values`（字符串列表）要应用属性+运算符组合以筛选数据搜索的值

[]()

### `pagination` 的嵌套模式[​](#pagination-的嵌套模式 "Direct link to pagination-的嵌套模式")

选修的：

* `limit`（数字）每页请求的元素数量。数字必须介于 1 和 100 之间。默认值为 20。
* `offset`（数字）分页请求的页面偏移量。第一个元素的索引。默认值为 0。

[]()

### `sort` 的嵌套模式[​](#sort-的嵌套模式 "Direct link to sort-的嵌套模式")

选修的：

* `direction`（字符串）排序方向。可以是以下值之一：\[DESC, ASC]，默认为 DESC。
* `property`（字符串）用于排序的属性名称。取值范围为 \[/name /uuid /state /location/metroCode /location/metroName /package/code /changeLog/createdDateTime /changeLog/updatedDateTime]。默认为 /changeLog/updatedDateTime。

[]()

### `data` 的嵌套模式[​](#data-的嵌套模式 "Direct link to data-的嵌套模式")

只读：

* `access_point_type_configs`（对象列表）（有关嵌套模式，请参见[下文](#nestedobjatt--data--access_point_type_configs)）
* `account`（对象集合）（有关嵌套模式，请参见[下文](#nestedobjatt--data--account)）
* `allowed_emails`（字符串列表）
* `change_log`（对象集合）（有关嵌套模式，请参见[下文](#nestedobjatt--data--change_log)）
* `custom_fields`（对象列表）（有关嵌套模式，请参见[下方](#nestedobjatt--data--custom_fields)）
* `description`（字符串）
* `href`（字符串）
* `marketing_info`（对象集合）（有关嵌套模式，请参见[下文](#nestedobjatt--data--marketing_info)）
* `metros`（对象列表）（有关嵌套模式，请参见[下方](#nestedobjatt--data--metros)）
* `name`（字符串）
* `notifications`（对象列表）（有关嵌套模式，请参见[下方](#nestedobjatt--data--notifications)）
* `ports`（对象列表）（嵌套模式请参见[下方](#nestedobjatt--data--ports)）
* `project`（对象集合）（有关嵌套模式，请参见[下文](#nestedobjatt--data--project)）
* `self_profile`（布尔值）
* `state`（字符串）
* `tags`（字符串列表）
* `type`（字符串）
* `uuid`（字符串）
* `view_point`（字符串）
* `virtual_devices`（对象列表）（有关嵌套模式，请参见[下方](#nestedobjatt--data--virtual_devices)）
* `visibility`（字符串）

[]()

### `data.access_point_type_configs` 的嵌套模式[​](#dataaccess_point_type_configs-的嵌套模式 "Direct link to dataaccess_point_type_configs-的嵌套模式")

只读：

* `allow_bandwidth_auto_approval`（布尔值）
* `allow_bandwidth_upgrade`（布尔值）
* `allow_custom_bandwidth`（布尔值）
* `allow_remote_connections`（布尔值）
* `api_config`（对象集合）（有关嵌套模式，请参见[下方](#nestedobjatt--data--access_point_type_configs--api_config)）
* `authentication_key`（对象集合）（有关嵌套模式，请参见[下文](#nestedobjatt--data--access_point_type_configs--authentication_key)）
* `bandwidth_alert_threshold`（数字）
* `connection_label`（字符串）
* `connection_redundancy_required`（布尔值）
* `enable_auto_generate_service_key`（布尔值）
* `link_protocol_config`（对象集合）（有关嵌套模式，请参见[下文](#nestedobjatt--data--access_point_type_configs--link_protocol_config)）
* `selective_redundancy`（布尔值）
* `supported_bandwidths`（数字列表）
* `type`（字符串）
* `uuid`（字符串）

[]()

### `data.access_point_type_configs.api_config` 的嵌套模式[​](#dataaccess_point_type_configsapi_config-的嵌套模式 "Direct link to dataaccess_point_type_configsapi_config-的嵌套模式")

只读：

* `allow_over_subscription`（布尔值）
* `api_available`（布尔值）
* `bandwidth_from_api`（布尔值）
* `equinix_managed_port`（布尔值）
* `equinix_managed_vlan`（布尔值）
* `integration_id`（字符串）
* `over_subscription_limit`（数字）

[]()

### `data.access_point_type_configs.authentication_key` 的嵌套模式[​](#dataaccess_point_type_configsauthentication_key-的嵌套模式 "Direct link to dataaccess_point_type_configsauthentication_key-的嵌套模式")

只读：

* `description`（字符串）
* `label`（字符串）
* `required`（布尔值）

[]()

### `data.access_point_type_configs.link_protocol_config` 的嵌套模式[​](#dataaccess_point_type_configslink_protocol_config-的嵌套模式 "Direct link to dataaccess_point_type_configslink_protocol_config-的嵌套模式")

只读：

* `encapsulation`（字符串）
* `encapsulation_strategy`（字符串）
* `reuse_vlan_s_tag`（布尔值）

[]()

### `data.account` 的嵌套模式[​](#dataaccount-的嵌套模式 "Direct link to dataaccount-的嵌套模式")

只读：

* `account_name`（字符串）
* `account_number`（数字）
* `global_cust_id`（字符串）
* `global_org_id`（字符串）
* `global_organization_name`（字符串）
* `org_id`（数字）
* `organization_name`（字符串）
* `ucm_id`（字符串）

[]()

### `data.change_log` 的嵌套模式[​](#datachange_log-的嵌套模式 "Direct link to datachange_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`（字符串）

[]()

### `data.custom_fields` 的嵌套模式[​](#datacustom_fields-的嵌套模式 "Direct link to datacustom_fields-的嵌套模式")

只读：

* `capture_in_email`（布尔值）
* `data_type`（字符串）
* `description`（字符串）
* `label`（字符串）
* `options`（字符串列表）
* `required`（布尔值）

[]()

### `data.marketing_info` 的嵌套模式[​](#datamarketing_info-的嵌套模式 "Direct link to datamarketing_info-的嵌套模式")

只读：

* `logo`（字符串）
* `process_step`（对象列表）（有关嵌套模式，请参见[下方](#nestedobjatt--data--marketing_info--process_step)）
* `promotion`（布尔值）

[]()

### `data.marketing_info.process_step` 的嵌套模式[​](#datamarketing_infoprocess_step-的嵌套模式 "Direct link to datamarketing_infoprocess_step-的嵌套模式")

只读：

* `description`（字符串）
* `sub_title`（字符串）
* `title`（字符串）

[]()

### `data.metros` 的嵌套模式[​](#datametros-的嵌套模式 "Direct link to datametros-的嵌套模式")

只读：

* `code`（字符串）
* `display_name`（字符串）
* `ibxs`（字符串列表）
* `in_trail`（布尔值）
* `name`（字符串）
* `seller_regions`（字符串映射）

[]()

### `data.notifications` 的嵌套模式[​](#datanotifications-的嵌套模式 "Direct link to datanotifications-的嵌套模式")

只读：

* `emails`（字符串列表）
* `send_interval`（字符串）
* `type`（字符串）

[]()

### `data.ports` 的嵌套模式[​](#dataports-的嵌套模式 "Direct link to dataports-的嵌套模式")

只读：

* `cross_connect_id`（字符串）
* `location`（对象集合）（有关嵌套模式，请参见[下方](#nestedobjatt--data--ports--location)）
* `seller_region`（字符串）
* `seller_region_description`（字符串）
* `type`（字符串）
* `uuid`（字符串）

[]()

### `data.ports.location` 的嵌套模式[​](#dataportslocation-的嵌套模式 "Direct link to dataportslocation-的嵌套模式")

只读：

* `ibx`（字符串）
* `metro_code`（字符串）
* `metro_name`（字符串）
* `region`（字符串）

[]()

### `data.project` 的嵌套模式[​](#dataproject-的嵌套模式 "Direct link to dataproject-的嵌套模式")

只读：

* `href`（字符串）
* `project_id`（字符串）

[]()

### `data.virtual_devices` 的嵌套模式[​](#datavirtual_devices-的嵌套模式 "Direct link to datavirtual_devices-的嵌套模式")

只读：

* `interface_uuid`（字符串）
* `location`（对象集合）（有关嵌套模式，请参见[下方](#nestedobjatt--data--virtual_devices--location)）
* `type`（字符串）
* `uuid`（字符串）

[]()

### `data.virtual_devices.location` 的嵌套模式[​](#datavirtual_deviceslocation-的嵌套模式 "Direct link to datavirtual_deviceslocation-的嵌套模式")

只读：

* `ibx`（字符串）
* `metro_code`（字符串）
* `metro_name`（字符串）
* `region`（字符串）
