Service
- Implements: com.aliyun.ros.cdk.pai.datasource.IService
This class encapsulates and extends the ROS resource type DATASOURCE::PAI::Service.
Initializers
import com.aliyun.ros.cdk.pai.datasource.Service;
Service.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.serviceName(java.lang.String)
.serviceName(IResolvable)
// .refreshOptions(java.lang.String)
// .refreshOptions(IResolvable)
.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. |
serviceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property serviceName: The name of the service. |
refreshOptions | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
serviceNameRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property serviceName: The name of the service.
refreshOptionsOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
Valid values:
- Never: Never refresh the datasource resource when the stack is updated.
- Always: Always refresh the datasource resource when the stack is updated. Default is Never.
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.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- 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)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct | Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.pai.datasource.Service;
Service.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- 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: The request token of the service. |
attrCallerUid | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CallerUid: The user ID of the account that is used to create the service. |
attrCpu | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Cpu: The CPU that you applied for each instance. |
attrCreateTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CreateTime: The time when the service was created. |
attrCurrentVersion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CurrentVersion: The current version of the model. |
attrExtraData | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ExtraData: The additional information about the service. |
attrGpu | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Gpu: The GPU that you applied for each instance. |
attrImage | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Image: The data image of the service. |
attrInternetEndpoint | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InternetEndpoint: The public endpoint of the service. |
attrIntranetEndpoint | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute IntranetEndpoint: The private endpoint of the service. |
attrLabels | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Labels: The tags of the service. |
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: The memory that you applied for each instance. |
attrMessage | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Message: The summary of the service. |
attrNamespace | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Namespace: The namespace of the service. |
attrParentUid | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ParentUid: The user ID of the Alibaba Cloud account that is used to create the service. |
attrPendingInstance | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute PendingInstance: The number of instances for the suspended service. |
attrReason | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Reason: The reason why the service is in the current state. |
attrResource | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Resource: The resource group to which the service belongs. |
attrResourceAlias | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ResourceAlias: The alias of the resource group to which the service belongs. |
attrRole | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Role: The role of the service. |
attrRoleAttrs | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute RoleAttrs: The additional attributes of the service role. |
attrRunningInstance | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute RunningInstance: The number of instances for the running service. |
attrSafetyLock | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute SafetyLock: The security lock of the service. |
attrServiceConfig | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ServiceConfig: The configurations of the service. |
attrServiceGroup | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ServiceGroup: The group to which the service belongs. |
attrServiceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ServiceName: The name of the service. |
attrServiceUid | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ServiceUid: The ID of the service. |
attrTotalInstance | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute TotalInstance: The total number of instances of the service. |
attrUpdateTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute UpdateTime: The time when the service was updated. |
attrWeight | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Weight: The weight of the canary release for the service. |
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: The request token of the service.
attrCallerUidRequired
public java.lang.Object getAttrCallerUid();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CallerUid: The user ID of the account that is used to create the service.
attrCpuRequired
public java.lang.Object getAttrCpu();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Cpu: The CPU that you applied for each instance.
attrCreateTimeRequired
public java.lang.Object getAttrCreateTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CreateTime: The time when the service was created.
attrCurrentVersionRequired
public java.lang.Object getAttrCurrentVersion();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CurrentVersion: The current version of the model.
attrExtraDataRequired
public java.lang.Object getAttrExtraData();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ExtraData: The additional information about the service.
attrGpuRequired
public java.lang.Object getAttrGpu();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Gpu: The GPU that you applied for each instance.
attrImageRequired
public java.lang.Object getAttrImage();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Image: The data image of the service.
attrInternetEndpointRequired
public java.lang.Object getAttrInternetEndpoint();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InternetEndpoint: The public endpoint of the service.
attrIntranetEndpointRequired
public java.lang.Object getAttrIntranetEndpoint();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute IntranetEndpoint: The private endpoint of the service.
attrLabelsRequired
public java.lang.Object getAttrLabels();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Labels: The tags of the service.
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: The memory that you applied for each instance.
attrMessageRequired
public java.lang.Object getAttrMessage();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Message: The summary of the service.
attrNamespaceRequired
public java.lang.Object getAttrNamespace();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Namespace: The namespace of the service.
attrParentUidRequired
public java.lang.Object getAttrParentUid();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ParentUid: The user ID of the Alibaba Cloud account that is used to create the service.
attrPendingInstanceRequired
public java.lang.Object getAttrPendingInstance();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute PendingInstance: The number of instances for the suspended service.
attrReasonRequired
public java.lang.Object getAttrReason();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Reason: The reason why the service is in the current state.
attrResourceRequired
public java.lang.Object getAttrResource();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Resource: 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: The alias of the resource group to which the service belongs.
attrRoleRequired
public java.lang.Object getAttrRole();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Role: The role of the service.
attrRoleAttrsRequired
public java.lang.Object getAttrRoleAttrs();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute RoleAttrs: The additional attributes of the service role.
attrRunningInstanceRequired
public java.lang.Object getAttrRunningInstance();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute RunningInstance: The number of instances for the running service.
attrSafetyLockRequired
public java.lang.Object getAttrSafetyLock();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute SafetyLock: The security lock of the service.
attrServiceConfigRequired
public java.lang.Object getAttrServiceConfig();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ServiceConfig: The configurations of the service.
attrServiceGroupRequired
public java.lang.Object getAttrServiceGroup();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ServiceGroup: The 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: The name of the service.
attrServiceUidRequired
public java.lang.Object getAttrServiceUid();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ServiceUid: The ID of the service.
The value of this property is the same as the value of ServiceId.
attrTotalInstanceRequired
public java.lang.Object getAttrTotalInstance();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute TotalInstance: The total number of instances of the service.
attrUpdateTimeRequired
public java.lang.Object getAttrUpdateTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute UpdateTime: The time when the service was updated.
attrWeightRequired
public java.lang.Object getAttrWeight();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Weight: The weight of the canary release for the service.
propsRequired
public ServiceProps getProps();
- Type: ServiceProps