DATASOURCE::PAI::Service

DATASOURCE::PAI::Service类型用于获取模型在线服务(EAS)详情。

语法

{
  "Type": "DATASOURCE::PAI::Service",
  "Properties": {
    "ServiceName": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ServiceName

String

EAS服务名称。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • ServiceGroup:服务所在的分组

  • Message:服务的摘要信息。

  • Memory:每个实例申请的内存。

  • CurrentVersion:当前运行的模型版本。

  • RunningInstance:正在运行的服务的实例个数。

  • Cpu:每个实例申请的CPU。

  • Image:服务的数据镜像。

  • Gpu:每个实例申请的GPU。

  • CallerUid:服务创建账号的UID。

  • Reason:服务的状态原因

  • TotalInstance:服务的所有实例总个数

  • ServiceConfig:服务的配置信息

  • AccessToken:服务的请求Token

  • InternetEndpoint:服务的公网Endpoint

  • ResourceAlias:服务所在的资源组别名

  • CreateTime:服务的创建时间。

  • Resource:服务所在的资源组

  • Labels:服务标签列表。

  • ExtraData:服务的额外信息

  • Namespace:服务所在的命名空间。

  • Weight:服务灰度发布的权重值。

  • Role:服务角色

  • PendingInstance:被挂起的服务的实例个数。

  • LatestVersion:服务最新版本号。

  • ServiceName:服务的名字。

  • SafetyLock:服务安全锁

  • UpdateTime:服务的更新时间

  • ServiceUid:服务ID,同ServiceId

  • RoleAttrs:服务角色额外属性

  • ParentUid:服务创建账号的阿里云账号UID。

  • IntranetEndpoint:服务内网endpoint。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ServiceName:
    Type: String
    Description:
      en: The name of the service.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::PAI::Service
    Properties:
      ServiceName:
        Ref: ServiceName
Outputs:
  ServiceGroup:
    Description: The group to which the service belongs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ServiceGroup
  Message:
    Description: The summary of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Message
  Memory:
    Description: The memory that you applied for each instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Memory
  CurrentVersion:
    Description: The current version of the model.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CurrentVersion
  RunningInstance:
    Description: The number of instances for the running service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - RunningInstance
  Cpu:
    Description: The CPU that you applied for each instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Cpu
  Image:
    Description: The data image of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Image
  Gpu:
    Description: The GPU that you applied for each instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Gpu
  CallerUid:
    Description: The user ID of the account that is used to create the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CallerUid
  Reason:
    Description: The reason why the service is in the current state.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Reason
  TotalInstance:
    Description: The total number of instances of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - TotalInstance
  ServiceConfig:
    Description: The configurations of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ServiceConfig
  AccessToken:
    Description: The request token of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AccessToken
  InternetEndpoint:
    Description: The public endpoint of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InternetEndpoint
  ResourceAlias:
    Description: The alias of the resource group to which the service belongs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ResourceAlias
  CreateTime:
    Description: The time when the service was created.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  Resource:
    Description: The resource group to which the service belongs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Resource
  Labels:
    Description: The tags of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Labels
  ExtraData:
    Description: The additional information about the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ExtraData
  Namespace:
    Description: The namespace of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Namespace
  Weight:
    Description: The weight of the canary release for the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Weight
  Role:
    Description: The role of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Role
  PendingInstance:
    Description: The number of instances for the suspended service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PendingInstance
  LatestVersion:
    Description: The latest version of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - LatestVersion
  ServiceName:
    Description: The name of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ServiceName
  SafetyLock:
    Description: The security lock of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SafetyLock
  UpdateTime:
    Description: The time when the service was updated.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - UpdateTime
  ServiceUid:
    Description: The ID of the service. The value of this property is the same as the value of ServiceId.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ServiceUid
  RoleAttrs:
    Description: The additional attributes of the service role.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - RoleAttrs
  ParentUid:
    Description: The user ID of the Alibaba Cloud account that is used to create the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ParentUid
  IntranetEndpoint:
    Description: The private endpoint of the service.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - IntranetEndpoint
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ServiceName": {
      "Type": "String",
      "Description": {
        "en": "The name of the service."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::PAI::Service",
      "Properties": {
        "ServiceName": {
          "Ref": "ServiceName"
        }
      }
    }
  },
  "Outputs": {
    "ServiceGroup": {
      "Description": "The group to which the service belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ServiceGroup"
        ]
      }
    },
    "Message": {
      "Description": "The summary of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Message"
        ]
      }
    },
    "Memory": {
      "Description": "The memory that you applied for each instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Memory"
        ]
      }
    },
    "CurrentVersion": {
      "Description": "The current version of the model.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CurrentVersion"
        ]
      }
    },
    "RunningInstance": {
      "Description": "The number of instances for the running service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RunningInstance"
        ]
      }
    },
    "Cpu": {
      "Description": "The CPU that you applied for each instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Cpu"
        ]
      }
    },
    "Image": {
      "Description": "The data image of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Image"
        ]
      }
    },
    "Gpu": {
      "Description": "The GPU that you applied for each instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Gpu"
        ]
      }
    },
    "CallerUid": {
      "Description": "The user ID of the account that is used to create the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CallerUid"
        ]
      }
    },
    "Reason": {
      "Description": "The reason why the service is in the current state.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Reason"
        ]
      }
    },
    "TotalInstance": {
      "Description": "The total number of instances of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TotalInstance"
        ]
      }
    },
    "ServiceConfig": {
      "Description": "The configurations of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ServiceConfig"
        ]
      }
    },
    "AccessToken": {
      "Description": "The request token of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AccessToken"
        ]
      }
    },
    "InternetEndpoint": {
      "Description": "The public endpoint of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InternetEndpoint"
        ]
      }
    },
    "ResourceAlias": {
      "Description": "The alias of the resource group to which the service belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceAlias"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the service was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "Resource": {
      "Description": "The resource group to which the service belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Resource"
        ]
      }
    },
    "Labels": {
      "Description": "The tags of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Labels"
        ]
      }
    },
    "ExtraData": {
      "Description": "The additional information about the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ExtraData"
        ]
      }
    },
    "Namespace": {
      "Description": "The namespace of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Namespace"
        ]
      }
    },
    "Weight": {
      "Description": "The weight of the canary release for the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Weight"
        ]
      }
    },
    "Role": {
      "Description": "The role of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Role"
        ]
      }
    },
    "PendingInstance": {
      "Description": "The number of instances for the suspended service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PendingInstance"
        ]
      }
    },
    "LatestVersion": {
      "Description": "The latest version of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "LatestVersion"
        ]
      }
    },
    "ServiceName": {
      "Description": "The name of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ServiceName"
        ]
      }
    },
    "SafetyLock": {
      "Description": "The security lock of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SafetyLock"
        ]
      }
    },
    "UpdateTime": {
      "Description": "The time when the service was updated.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "UpdateTime"
        ]
      }
    },
    "ServiceUid": {
      "Description": "The ID of the service. The value of this property is the same as the value of ServiceId.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ServiceUid"
        ]
      }
    },
    "RoleAttrs": {
      "Description": "The additional attributes of the service role.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RoleAttrs"
        ]
      }
    },
    "ParentUid": {
      "Description": "The user ID of the Alibaba Cloud account that is used to create the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ParentUid"
        ]
      }
    },
    "IntranetEndpoint": {
      "Description": "The private endpoint of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "IntranetEndpoint"
        ]
      }
    }
  }
}