All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::PAI::Service

Last Updated:Jul 05, 2023

ALIYUN::PAI::Service is used to create an Elastic Algorithm Service (EAS) service in Machine Learning Platform for AI (PAI).

Syntax

{
  "Type": "ALIYUN::PAI::Service",
  "Properties": {
    "Develop": String,
    "ServiceConfig": Map,
    "Labels": Map
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

Develop

String

No

No

Specifies whether to enter the development mode.

Valid values:

  • true

  • false

ServiceConfig

Map

Yes

Yes

The configurations of the service.

Example:

{ "metadata": { "cpu":1, "instance":1, "memory":1024 }, "name":"echo", "processor_entry":"libecho.so", "processor_path":"http://oss-cn-hangzhou-zmf.aliyuncs.com/059247/echo_processor_release.tar.gz", "processor_type":"cpp" }

Labels

Map

No

Yes

The tags of the service.

Example:

{"key":"value"}

Return values

Fn::GetAtt

  • ServiceGroup: the group to which the service belongs.

  • Message: the summary of the service.

  • Memory: the memory that you applied for each instance.

  • CurrentVersion: the current version of the model.

  • RunningInstance: the number of instances for the running service.

  • Cpu: the CPU that you applied for each instance.

  • Image: the data image of the service.

  • Gpu: the GPU that you applied for each instance.

  • CallerUid: the user ID of the account that is used to create the service.

  • Reason: the reason why the service is in the current state.

  • TotalInstance: the total number of instances of the service.

  • ServiceConfig: the configurations of the service.

  • AccessToken: the request token of the service.

  • InternetEndpoint: the public endpoint of the service.

  • ResourceAlias: the alias of the resource group to which the service belongs.

  • CreateTime: the time when the service was created.

  • Resource: the resource group to which the service belongs.

  • Labels: the tags of the service.

  • ExtraData: the additional information about the service.

  • Namespace: the namespace to which the service belongs.

  • Weight: the weight of the canary release for the service.

  • Role: the role of the service.

  • PendingInstance: the number of instances for the suspended service.

  • LatestVersion: the latest version of the service.

  • ServiceName: the name of the service.

  • SafetyLock: the security lock of the service.

  • UpdateTime: the time when the service was updated.

  • ServiceUid: the service ID. The value of this property is the same as the value of ServiceId.

  • RoleAttrs: the additional attributes of the service role.

  • ParentUid: the user ID of the Alibaba Cloud account that is used to create the service.

  • IntranetEndpoint: the private endpoint of the service.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ServiceConfig:
    Type: Json
    Description: Service configuration information.
    Default:
      metadata:
        cpu: 1
        instance: 1
        memory: 1024
      name: echo
      processor_entry: libecho.so
      processor_path: http://oss-cn-hangzhou-zmf.aliyuncs.com/059247/echo_processor_release.tar.gz
      processor_type: cpp
  Labels:
    Type: Json
    Description: Service Tag.
    Default:
      key: value
Resources:
  ExtensionResource:
    Type: ALIYUN::PAI::Service
    Properties:
      ServiceConfig:
        Ref: ServiceConfig
      Labels:
        Ref: Labels
Outputs:
  ServiceGroup:
    Description: Group to which the service belongs.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ServiceGroup
  Message:
    Description: Latest information on services.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Message
  Memory:
    Description: Memory of service (MB).
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Memory
  CurrentVersion:
    Description: Current running version of the service.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CurrentVersion
  RunningInstance:
    Description: Number of instances in service running.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RunningInstance
  Cpu:
    Description: Number of service CPU cores.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Cpu
  Image:
    Description: Service Deployment Mirroring.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Image
  Gpu:
    Description: Number of service GPU cards.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Gpu
  CallerUid:
    Description: The ID of the service creator, which can be the ID of the RAM account.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CallerUid
  Reason:
    Description: Service deployment failure reason.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Reason
  TotalInstance:
    Description: Total number of instances required by the service.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TotalInstance
  ServiceConfig:
    Description: Service configuration information.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ServiceConfig
  AccessToken:
    Description: Service Request authentication token.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AccessToken
  InternetEndpoint:
    Description: Public network Endpoint of the service.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InternetEndpoint
  ResourceAlias:
    Description: Name of the resource group where the service resides.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceAlias
  CreateTime:
    Description: Creation time of the service.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  Resource:
    Description: The ID of the resource group to which the service belongs.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Resource
  Labels:
    Description: Service Tag.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Labels
  ExtraData:
    Description: Service Extra Information.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ExtraData
  Namespace:
    Description: The namespace to which the service belongs.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Namespace
  Weight:
    Description: Packet Service Traffic Weight.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Weight
  Role:
    Description: Grouping Service Role.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Role
  PendingInstance:
    Description: Number of instances where the service is not currently ready.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PendingInstance
  LatestVersion:
    Description: The latest version of the service.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - LatestVersion
  ServiceName:
    Description: Service Name.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ServiceName
  SafetyLock:
    Description: Service Security Lock Status.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SafetyLock
  UpdateTime:
    Description: Service Last Updated.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - UpdateTime
  ServiceUid:
    Description: Unique Service ID.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ServiceUid
  RoleAttrs:
    Description: Grouping Service Role Properties.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RoleAttrs
  ParentUid:
    Description: Primary account ID of the creator.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ParentUid
  IntranetEndpoint:
    Description: The intranet Endpoint of the service.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - IntranetEndpoint

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ServiceConfig": {
      "Type": "Json",
      "Description": "Service configuration information.",
      "Default": {
        "metadata": {
          "cpu": 1,
          "instance": 1,
          "memory": 1024
        },
        "name": "echo",
        "processor_entry": "libecho.so",
        "processor_path": "http://oss-cn-hangzhou-zmf.aliyuncs.com/059247/echo_processor_release.tar.gz",
        "processor_type": "cpp"
      }
    },
    "Labels": {
      "Type": "Json",
      "Description": "Service Tag.",
      "Default": {"key":"value"}
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::PAI::Service",
      "Properties": {
        "ServiceConfig": {
          "Ref": "ServiceConfig"
        },
        "Labels": {
          "Ref": "Labels"
        }
      }
    }
  },
  "Outputs": {
    "ServiceGroup": {
      "Description": "Group to which the service belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ServiceGroup"
        ]
      }
    },
    "Message": {
      "Description": "Latest information on services.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Message"
        ]
      }
    },
    "Memory": {
      "Description": "Memory of service (MB).",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Memory"
        ]
      }
    },
    "CurrentVersion": {
      "Description": "Current running version of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CurrentVersion"
        ]
      }
    },
    "RunningInstance": {
      "Description": "Number of instances in service running.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RunningInstance"
        ]
      }
    },
    "Cpu": {
      "Description": "Number of service CPU cores.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Cpu"
        ]
      }
    },
    "Image": {
      "Description": "Service Deployment Mirroring.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Image"
        ]
      }
    },
    "Gpu": {
      "Description": "Number of service GPU cards.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Gpu"
        ]
      }
    },
    "CallerUid": {
      "Description": "The ID of the service creator, which can be the ID of the RAM account.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CallerUid"
        ]
      }
    },
    "Reason": {
      "Description": "Service deployment failure reason.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Reason"
        ]
      }
    },
    "TotalInstance": {
      "Description": "Total number of instances required by the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TotalInstance"
        ]
      }
    },
    "ServiceConfig": {
      "Description": "Service configuration information.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ServiceConfig"
        ]
      }
    },
    "AccessToken": {
      "Description": "Service Request authentication token.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AccessToken"
        ]
      }
    },
    "InternetEndpoint": {
      "Description": "Public network Endpoint of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InternetEndpoint"
        ]
      }
    },
    "ResourceAlias": {
      "Description": "Name of the resource group where the service resides.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceAlias"
        ]
      }
    },
    "CreateTime": {
      "Description": "Creation time of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "Resource": {
      "Description": "The ID of the resource group to which the service belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Resource"
        ]
      }
    },
    "Labels": {
      "Description": "Service Tag.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Labels"
        ]
      }
    },
    "ExtraData": {
      "Description": "Service Extra Information.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ExtraData"
        ]
      }
    },
    "Namespace": {
      "Description": "The namespace to which the service belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Namespace"
        ]
      }
    },
    "Weight": {
      "Description": "Packet Service Traffic Weight.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Weight"
        ]
      }
    },
    "Role": {
      "Description": "Grouping Service Role.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Role"
        ]
      }
    },
    "PendingInstance": {
      "Description": "Number of instances where the service is not currently ready.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PendingInstance"
        ]
      }
    },
    "LatestVersion": {
      "Description": "The latest version of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "LatestVersion"
        ]
      }
    },
    "ServiceName": {
      "Description": "Service Name.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ServiceName"
        ]
      }
    },
    "SafetyLock": {
      "Description": "Service Security Lock Status.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SafetyLock"
        ]
      }
    },
    "UpdateTime": {
      "Description": "Service Last Updated.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "UpdateTime"
        ]
      }
    },
    "ServiceUid": {
      "Description": "Unique Service ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ServiceUid"
        ]
      }
    },
    "RoleAttrs": {
      "Description": "Grouping Service Role Properties.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RoleAttrs"
        ]
      }
    },
    "ParentUid": {
      "Description": "Primary account ID of the creator.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ParentUid"
        ]
      }
    },
    "IntranetEndpoint": {
      "Description": "The intranet Endpoint of the service.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "IntranetEndpoint"
        ]
      }
    }
  }
}