DATASOURCE::FC::Services类型用于获取服务列表。
语法
{
  "Type": "DATASOURCE::FC::Services",
  "Properties": {
    "Prefix": String,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Prefix | String | 否 | 是 | 资源名称。 | 名称必须以Prefix作为前缀。 例如:Prefix是a,则返回的资源名均是以a开始的。 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回数据(Fn::GetAtt)
- Services:服务详情列表。 
- ServiceNames:服务名称列表。 
| 属性名称 | 类型 | 描述 | 约束 | 
| ServiceNames | List | 服务名称列表。 | 无 | 
| Services | List | 服务详情列表。 | 无 | 
| ServiceName | String | 服务的名称。 | 无 | 
| Description | String | 服务的描述。 | 无 | 
| LogConfig | Map | 日志配置。 | 函数产生的日志会被写入配置的LogConfig中。 | 
| ServiceId | String | 服务ID。 | 无 | 
| CreatedTime | String | 服务的创建时间。 | 无 | 
| LastModifiedTime | String | 服务上一次被更新的时间。 | 无 | 
| VpcConfig | Map | VPC配置。 | 配置VPCConfig后,函数可以访问指定的VPC资源。 | 
| InternetAccess | Boolean | 是否允许函数访问公网。 | 取值: 
 | 
| NasConfig | Map | NAS配置。 | 配置NASConfig后,函数可以访问指定的NAS资源。 | 
| VendorConfig | Map | Vendor配置。 | 无 | 
| TracingConfig | Map | 链路追踪配置。 | 当函数计算与链路追踪TracingConfig集成后,您可以记录请求在函数计算的耗时时间、查看函数的冷启动时间、记录函数内部时间的消耗等。 更多信息,请参见链路追踪简介。 | 
示例
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Prefix": {
      "Type": "String",
      "Description": "Qualified returned service names must be prefixed with Prefix. For example, if the Prefix is \"a\", the returned service names should be started with \"a\"."
    }
  },
  "Resources": {
    "Services": {
      "Type": "DATASOURCE::FC::Services",
      "Properties": {
        "Prefix": {
          "Ref": "Prefix"
        }
      }
    }
  },
  "Outputs": {
    "Services": {
      "Description": "The list of services.",
      "Value": {
        "Fn::GetAtt": [
          "Services",
          "Services"
        ]
      }
    },
    "ServiceNames": {
      "Description": "The list of service names.",
      "Value": {
        "Fn::GetAtt": [
          "Services",
          "ServiceNames"
        ]
      }
    }
  }
}ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Prefix:
    Type: String
    Description: Qualified returned service names must be prefixed with Prefix. For example, if the Prefix is "a", the returned service names should be started with "a".
Resources:
  Services:
    Type: DATASOURCE::FC::Services
    Properties:
      Prefix:
        Ref: Prefix
Outputs:
  Services:
    Description: The list of services.
    Value:
      Fn::GetAtt:
        - Services
        - Services
  ServiceNames:
    Description: The list of service names.
    Value:
      Fn::GetAtt:
        - Services
        - ServiceNames