Skip to content

Service

This class encapsulates and extends the ROS resource type ALIYUN::PAI::Service, which is used to create an Elastic Algorithm Service (EAS) service in Machine Learning Platform for AI (PAI).

Initializers

import com.aliyun.ros.cdk.pai.Service;
Service.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .serviceConfig(IResolvable)
    .serviceConfig(java.util.Map<java.lang.String, java.lang.Object>)
//  .develop(java.lang.String)
//  .develop(IResolvable)
//  .labels(IResolvable)
//  .labels(java.util.Map<java.lang.String, java.lang.Object>)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
serviceConfig com.aliyun.ros.cdk.core.IResolvable OR java.util.Map Property serviceConfig: Service configuration information.
develop java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property develop: Whether to enter the development mode.
labels com.aliyun.ros.cdk.core.IResolvable OR java.util.Map Property labels: Service Tag.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

serviceConfigRequired

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map

Property serviceConfig: Service configuration information.


developOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property develop: Whether to enter the development mode.


labelsOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map

Property labels: Service Tag.


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
fetchCondition No description.
fetchDependency No description.
fetchResourceDesc No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

fetchCondition

public RosCondition fetchCondition()

fetchDependency

public java.util.List<java.lang.String> fetchDependency()

fetchResourceDesc

public java.lang.String fetchResourceDesc()

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.pai.Service;
Service.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
env com.aliyun.ros.cdk.core.IResourceEnvironment The environment this resource belongs to.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrAccessToken java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute AccessToken: Service Request authentication token.
attrCallerUid java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute CallerUid: The ID of the service creator, which can be the ID of the RAM account.
attrCpu java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Cpu: Number of service CPU cores.
attrCreateTime java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute CreateTime: Creation time of the service.
attrCurrentVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute CurrentVersion: Current running version of the service.
attrExtraData java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ExtraData: Service Extra Information.
attrGpu java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Gpu: Number of service GPU cards.
attrImage java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Image: Service Deployment Mirroring.
attrInternetEndpoint java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute InternetEndpoint: Public network Endpoint of the service.
attrIntranetEndpoint java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute IntranetEndpoint: The intranet Endpoint of the service.
attrLabels java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Labels: Service Tag.
attrLatestVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute LatestVersion: The latest version of the service.
attrMemory java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Memory: Memory of service (MB).
attrMessage java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Message: Latest information on services.
attrNamespace java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Namespace: The namespace to which the service belongs.
attrParentUid java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ParentUid: Primary account ID of the creator.
attrPendingInstance java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute PendingInstance: Number of instances where the service is not currently ready.
attrReason java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Reason: Service deployment failure reason.
attrResource java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Resource: The ID of the resource group to which the service belongs.
attrResourceAlias java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ResourceAlias: Name of the resource group where the service resides.
attrRole java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Role: Grouping Service Role.
attrRoleAttrs java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute RoleAttrs: Grouping Service Role Properties.
attrRunningInstance java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute RunningInstance: Number of instances in service running.
attrSafetyLock java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute SafetyLock: Service Security Lock Status.
attrServiceConfig java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ServiceConfig: Service configuration information.
attrServiceGroup java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ServiceGroup: Group to which the service belongs.
attrServiceName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ServiceName: Service Name.
attrServiceUid java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ServiceUid: Unique Service ID.
attrTotalInstance java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute TotalInstance: Total number of instances required by the service.
attrUpdateTime java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute UpdateTime: Service Last Updated.
attrWeight java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Weight: Packet Service Traffic Weight.
props ServiceProps No description.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


envRequired

public IResourceEnvironment getEnv();
  • Type: com.aliyun.ros.cdk.core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrAccessTokenRequired

public java.lang.Object getAttrAccessToken();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute AccessToken: Service Request authentication token.


attrCallerUidRequired

public java.lang.Object getAttrCallerUid();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute CallerUid: The ID of the service creator, which can be the ID of the RAM account.


attrCpuRequired

public java.lang.Object getAttrCpu();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Cpu: Number of service CPU cores.


attrCreateTimeRequired

public java.lang.Object getAttrCreateTime();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute CreateTime: Creation time of the service.


attrCurrentVersionRequired

public java.lang.Object getAttrCurrentVersion();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute CurrentVersion: Current running version of the service.


attrExtraDataRequired

public java.lang.Object getAttrExtraData();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ExtraData: Service Extra Information.


attrGpuRequired

public java.lang.Object getAttrGpu();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Gpu: Number of service GPU cards.


attrImageRequired

public java.lang.Object getAttrImage();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Image: Service Deployment Mirroring.


attrInternetEndpointRequired

public java.lang.Object getAttrInternetEndpoint();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute InternetEndpoint: Public network Endpoint of the service.


attrIntranetEndpointRequired

public java.lang.Object getAttrIntranetEndpoint();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute IntranetEndpoint: The intranet Endpoint of the service.


attrLabelsRequired

public java.lang.Object getAttrLabels();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Labels: Service Tag.


attrLatestVersionRequired

public java.lang.Object getAttrLatestVersion();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute LatestVersion: The latest version of the service.


attrMemoryRequired

public java.lang.Object getAttrMemory();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Memory: Memory of service (MB).


attrMessageRequired

public java.lang.Object getAttrMessage();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Message: Latest information on services.


attrNamespaceRequired

public java.lang.Object getAttrNamespace();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Namespace: The namespace to which the service belongs.


attrParentUidRequired

public java.lang.Object getAttrParentUid();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ParentUid: Primary account ID of the creator.


attrPendingInstanceRequired

public java.lang.Object getAttrPendingInstance();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute PendingInstance: Number of instances where the service is not currently ready.


attrReasonRequired

public java.lang.Object getAttrReason();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Reason: Service deployment failure reason.


attrResourceRequired

public java.lang.Object getAttrResource();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Resource: The ID of the resource group to which the service belongs.


attrResourceAliasRequired

public java.lang.Object getAttrResourceAlias();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ResourceAlias: Name of the resource group where the service resides.


attrRoleRequired

public java.lang.Object getAttrRole();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Role: Grouping Service Role.


attrRoleAttrsRequired

public java.lang.Object getAttrRoleAttrs();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute RoleAttrs: Grouping Service Role Properties.


attrRunningInstanceRequired

public java.lang.Object getAttrRunningInstance();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute RunningInstance: Number of instances in service running.


attrSafetyLockRequired

public java.lang.Object getAttrSafetyLock();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute SafetyLock: Service Security Lock Status.


attrServiceConfigRequired

public java.lang.Object getAttrServiceConfig();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ServiceConfig: Service configuration information.


attrServiceGroupRequired

public java.lang.Object getAttrServiceGroup();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ServiceGroup: Group to which the service belongs.


attrServiceNameRequired

public java.lang.Object getAttrServiceName();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ServiceName: Service Name.


attrServiceUidRequired

public java.lang.Object getAttrServiceUid();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ServiceUid: Unique Service ID.


attrTotalInstanceRequired

public java.lang.Object getAttrTotalInstance();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute TotalInstance: Total number of instances required by the service.


attrUpdateTimeRequired

public java.lang.Object getAttrUpdateTime();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute UpdateTime: Service Last Updated.


attrWeightRequired

public java.lang.Object getAttrWeight();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Weight: Packet Service Traffic Weight.


propsRequired

public ServiceProps getProps();