DATASOURCE::PAI::Services类型用于查询EAS服务列表信息。
语法
{
  "Type": "DATASOURCE::PAI::Services",
  "Properties": {
    "ServiceName": String,
    "Labels": Map,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| ServiceName | String | 否 | 是 | 服务名称。 | 无 | 
| Labels | Map | 否 | 是 | 服务标签列表。 | 无 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回值
Fn::GetAtt
- Services:服务详情列表。 
- ServiceNames:服务名称列表。 
| 属性名称 | 类型 | 描述 | 约束 | 
| ServiceNames | List | 服务名称列表。 | 无 | 
| Services | List | 服务详情列表。 | 无 | 
| SafetyLock | String | 服务安全锁。 | 无 | 
| RegionId | String | 地域ID。 | 无 | 
| AccessToken | String | 服务的请求Token。 | 无 | 
| ExtraData | String | 服务的额外信息。 | 无 | 
| Namespace | String | 服务所在的命名空间。 | 无 | 
| CallerUid | String | 服务创建账号的UID。 | 无 | 
| Role | String | 服务角色。 | 无 | 
| Memory | String | 每个实例申请的内存。 | 单位为MB。 | 
| Gpu | String | 每个实例申请的GPU。 | 无 | 
| Status | String | 实例的状态。 | 无 | 
| UpdateTime | String | 服务的更新时间。 | 无 | 
| RoleAttrs | String | 服务角色额外属性。 | 无 | 
| TotalInstance | String | 服务的所有实例总个数。 | 无 | 
| RunningInstance | String | 正在运行的服务的实例个数。 | 无 | 
| ServiceUid | String | 服务ID,同ServiceId。 | 无 | 
| Reason | String | 服务的状态原因。 | 无 | 
| LatestVersion | String | 服务最新版本号。 | 无 | 
| Resource | String | 服务所在的资源组。 | 无 | 
| ParentUid | String | 服务创建账号的阿里云账号UID。 | 无 | 
| IntranetEndpoint | String | 服务内网endpoint。 | 无 | 
| CurrentVersion | String | 当前运行的模型版本。 | 无 | 
| PendingInstance | String | 被挂起的服务的实例个数。 | 无 | 
| InternetEndpoint | String | 服务的公网Endpoint。 | 无 | 
| Cpu | String | 每个实例申请的CPU。 | 无 | 
| ServiceGroup | String | 服务所在的分组。 | 无 | 
| Weight | String | 服务灰度发布的权重值。 | 无 | 
| ServiceConfig | String | 服务的配置信息。 | 无 | 
| Image | String | 服务的数据镜像。 | 无 | 
| Labels | String | 服务标签列表。 | 无 | 
| CreateTime | String | 服务的创建时间。 | 无 | 
| ServiceName | String | 服务的名字。 | 无 | 
| Message | String | 服务的摘要信息。 | 无 | 
| ResourceAlias | String | 服务所在的资源组别名。 | 无 | 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ServiceName:
    Description: Service Name.
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      ServiceName:
        Ref: ServiceName
    Type: DATASOURCE::PAI::Services
Outputs:
  ServiceNames:
    Description: The list of service names.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - ServiceNames
  Services:
    Description: The list of services.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - Services{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ServiceName": {
      "Type": "String",
      "Description": "Service Name."
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::PAI::Services",
      "Properties": {
        "ServiceName": {
          "Ref": "ServiceName"
        }
      }
    }
  },
  "Outputs": {
    "Services": {
      "Description": "The list of services.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Services"
        ]
      }
    },
    "ServiceNames": {
      "Description": "The list of service names.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ServiceNames"
        ]
      }
    }
  }
}