Skip to content

Template

This class encapsulates and extends the ROS resource type ALIYUN::AgentRun::Template.

Initializers

import com.aliyun.ros.cdk.agentrun.Template;
Template.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .templateName(java.lang.String)
    .templateName(IResolvable)
//  .allowAnonymousManage(java.lang.Boolean)
//  .allowAnonymousManage(IResolvable)
//  .armsConfiguration(IResolvable)
//  .armsConfiguration(ArmsConfigurationProperty)
//  .containerConfiguration(IResolvable)
//  .containerConfiguration(ContainerConfigurationProperty)
//  .cpu(java.lang.Number)
//  .cpu(IResolvable)
//  .credentialConfiguration(IResolvable)
//  .credentialConfiguration(CredentialConfigurationProperty)
//  .description(java.lang.String)
//  .description(IResolvable)
//  .diskSize(java.lang.Number)
//  .diskSize(IResolvable)
//  .enableAgent(java.lang.Boolean)
//  .enableAgent(IResolvable)
//  .environmentVariables(IResolvable)
//  .environmentVariables(java.util.Map<java.lang.String, java.lang.Object>)
//  .executionRoleArn(java.lang.String)
//  .executionRoleArn(IResolvable)
//  .logConfiguration(IResolvable)
//  .logConfiguration(LogConfigurationProperty)
//  .memory(java.lang.Number)
//  .memory(IResolvable)
//  .nasConfig(IResolvable)
//  .nasConfig(NasConfigProperty)
//  .networkConfiguration(IResolvable)
//  .networkConfiguration(NetworkConfigurationProperty)
//  .ossConfiguration(IResolvable)
//  .ossConfiguration(java.util.List<IResolvable)
//  .ossConfiguration(OssConfigurationProperty>)
//  .sandboxIdleTimeoutInSeconds(java.lang.Number)
//  .sandboxIdleTimeoutInSeconds(IResolvable)
//  .templateConfiguration(IResolvable)
//  .templateConfiguration(java.util.Map<java.lang.String, java.lang.Object>)
//  .templateType(java.lang.String)
//  .templateType(IResolvable)
//  .workspaceId(java.lang.String)
//  .workspaceId(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.
templateName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property templateName: The name of the template.
allowAnonymousManage java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property allowAnonymousManage: Whether to allow anonymous management.
armsConfiguration com.aliyun.ros.cdk.core.IResolvable OR ArmsConfigurationProperty Property armsConfiguration: The ARMS configuration.
containerConfiguration com.aliyun.ros.cdk.core.IResolvable OR ContainerConfigurationProperty Property containerConfiguration: The container configuration.
cpu java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property cpu: The CPU resource configuration (unit: cores).
credentialConfiguration com.aliyun.ros.cdk.core.IResolvable OR CredentialConfigurationProperty Property credentialConfiguration: The credential configuration.
description java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property description: The description of the template.
diskSize java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property diskSize: The disk size (unit: MB).
enableAgent java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property enableAgent: Whether to enable the sandbox agent.
environmentVariables com.aliyun.ros.cdk.core.IResolvable OR java.util.Map Property environmentVariables: The environment variables.
executionRoleArn java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property executionRoleArn: The execution role ARN.
logConfiguration com.aliyun.ros.cdk.core.IResolvable OR LogConfigurationProperty Property logConfiguration: The log configuration.
memory java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property memory: The memory resource configuration (unit: MB).
nasConfig com.aliyun.ros.cdk.core.IResolvable OR NasConfigProperty Property nasConfig: The NAS configuration.
networkConfiguration com.aliyun.ros.cdk.core.IResolvable OR NetworkConfigurationProperty Property networkConfiguration: The network configuration.
ossConfiguration com.aliyun.ros.cdk.core.IResolvable OR java.util.ListOssConfigurationProperty> Property ossConfiguration: The OSS configuration.
sandboxIdleTimeoutInSeconds java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property sandboxIdleTimeoutInSeconds: The sandbox idle timeout in seconds.
templateConfiguration com.aliyun.ros.cdk.core.IResolvable OR java.util.Map Property templateConfiguration: The template configuration (flexible object structure, varies by templateType).
templateType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property templateType: The type of the template.
workspaceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property workspaceId: The workspace ID.

scopeRequired

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

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

templateNameRequired

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

Property templateName: The name of the template.


allowAnonymousManageOptional

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

Property allowAnonymousManage: Whether to allow anonymous management.


armsConfigurationOptional

Property armsConfiguration: The ARMS configuration.


containerConfigurationOptional

Property containerConfiguration: The container configuration.

Only images based on Browser/Code Interpreter base images are allowed.


cpuOptional

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

Property cpu: The CPU resource configuration (unit: cores).


credentialConfigurationOptional

Property credentialConfiguration: The credential configuration.


descriptionOptional

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

Property description: The description of the template.


diskSizeOptional

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

Property diskSize: The disk size (unit: MB).


enableAgentOptional

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

Property enableAgent: Whether to enable the sandbox agent.


environmentVariablesOptional

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

Property environmentVariables: The environment variables.


executionRoleArnOptional

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

Property executionRoleArn: The execution role ARN.


logConfigurationOptional

Property logConfiguration: The log configuration.


memoryOptional

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

Property memory: The memory resource configuration (unit: MB).


nasConfigOptional

Property nasConfig: The NAS configuration.


networkConfigurationOptional

Property networkConfiguration: The network configuration.


ossConfigurationOptional

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

Property ossConfiguration: The OSS configuration.


sandboxIdleTimeoutInSecondsOptional

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

Property sandboxIdleTimeoutInSeconds: The sandbox idle timeout in seconds.


templateConfigurationOptional

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

Property templateConfiguration: The template configuration (flexible object structure, varies by templateType).


templateTypeOptional

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

Property templateType: The type of the template.


workspaceIdOptional

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

Property workspaceId: The workspace ID.


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.agentrun.Template;
Template.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.
attrTemplateArn java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute TemplateArn: The ARN of the template.
attrTemplateId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute TemplateId: The ID of the template.
attrTemplateName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute TemplateName: The name of the template.
props TemplateProps 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

attrTemplateArnRequired

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

Attribute TemplateArn: The ARN of the template.


attrTemplateIdRequired

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

Attribute TemplateId: The ID of the template.


attrTemplateNameRequired

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

Attribute TemplateName: The name of the template.


propsRequired

public TemplateProps getProps();

Structs