All Products
Search
Document Center

:ALIYUN::AgentRun::Template

Last Updated:Jun 12, 2026

To create a sandbox template, use the ALIYUN::AgentRun::Template resource type.

Syntax

{
  "Type": "ALIYUN::AgentRun::Template",
  "Properties": {
    "TemplateName": String,
    "ArmsConfiguration": Map,
    "AllowAnonymousManage": Boolean,
    "Cpu": Integer,
    "CredentialConfiguration": Map,
    "ContainerConfiguration": Map,
    "Description": String,
    "DiskSize": Integer,
    "EnableAgent": Boolean,
    "ExecutionRoleArn": String,
    "EnvironmentVariables": Map,
    "LogConfiguration": Map,
    "Memory": Integer,
    "NetworkConfiguration": Map,
    "NasConfig": Map,
    "OssConfiguration": List,
    "SandboxIdleTimeoutInSeconds": Integer,
    "TemplateConfiguration": Map,
    "TemplateType": String,
    "WorkspaceId": String
  }
}

Properties

Parameter

Type

Required

Updatable

Description

Constraints

TemplateName

String

Yes

No

The template name.

None

AllowAnonymousManage

Boolean

No

Yes

Specifies whether to allow anonymous management.

None

ArmsConfiguration

Map

No

Yes

The ARMS configuration.

For more information, see ArmsConfiguration properties.

ContainerConfiguration

Map

No

Yes

The container configuration.

Only images based on the browser or code interpreter base images can be used. For more information, see ContainerConfiguration properties.

Cpu

Integer

No

Yes

The number of CPU cores.

Minimum value: 2 cores.

CredentialConfiguration

Map

No

Yes

The credential configuration.

For more information, see CredentialConfiguration properties.

Description

String

No

Yes

The template description.

None

DiskSize

Integer

No

Yes

The disk size.

Minimum value: 512 MB.

EnableAgent

Boolean

No

Yes

Specifies whether to enable the sandbox agent.

None

EnvironmentVariables

Map

No

Yes

The environment variables.

None

ExecutionRoleArn

String

No

Yes

The execution role ARN.

None

LogConfiguration

Map

No

Yes

The log configuration.

For more information, see LogConfiguration properties.

Memory

Integer

No

Yes

The amount of memory, in MB.

Minimum value: 2048 MB.

NasConfig

Map

No

Yes

The NAS configuration.

For more information, see NasConfig properties.

NetworkConfiguration

Map

No

Yes

The network configuration.

For more information, see NetworkConfiguration properties.

OssConfiguration

List

No

Yes

The OSS configuration.

Minimum length: 1. For more information, see OssConfiguration properties.

SandboxIdleTimeoutInSeconds

Integer

No

Yes

The sandbox idle timeout period, in seconds.

Minimum value: 0 seconds.

TemplateConfiguration

Map

No

Yes

The template configuration.

A flexible object structure that varies based on the template type.

TemplateType

String

No

No

The template type.

Valid values:

  • CodeInterpreter

  • AllInOne

  • CustomImage

  • ComputerUse

  • Browser

WorkspaceId

String

No

Yes

The workspace ID.

None

ArmsConfiguration

"ArmsConfiguration": {
  "CmsWorkspace": String,
  "EnableArms": Boolean,
  "ArmsLicenseKey": String
}

ArmsConfiguration properties

Parameter

Type

Required

Update allowed

Description

Constraints

ArmsLicenseKey

String

Yes

Yes

The ARMS license key.

None

EnableArms

Boolean

Yes

Yes

Specifies whether to enable ARMS.

None

CmsWorkspace

String

No

Yes

The workspace ID for CloudMonitor 2.0.

None

CredentialConfiguration syntax

"CredentialConfiguration": {
  "CredentialName": String
}

CredentialConfiguration properties

Parameter

Type

Required

Updatable

Description

Constraint

CredentialName

string

true

true

The name of the credential.

None

ContainerConfiguration

"ContainerConfiguration": {
  "AcrInstanceId": String,
  "Command": List,
  "Port": Integer,
  "Image": String,
  "ImageRegistryType": String
}

ContainerConfiguration parameters

Parameter

Type

Required

Updatable

Description

Constraints

ImageRegistryType

String

Yes

Yes

The image registry type.

Valid values:

  • ACR

  • ACREE

  • CUSTOM

AcrInstanceId

String

No

Yes

The ACR instance ID.

None

Command

List

No

Yes

The command to run in the container.

None

Image

String

No

Yes

The address of the container image.

None

Port

Integer

No

Yes

The port exposed by the container.

Minimum value: 1

Maximum value: 65535

LogConfiguration

"LogConfiguration": {
  "Project": String,
  "Logstore": String
}

LogConfiguration properties

Parameter

Type

Required

Updatable

Description

Constraints

Logstore

String

Yes

Yes

The name of the Logstore in Log Service.

None

Project

String

Yes

Yes

The name of the Project in Log Service.

None

OssConfiguration syntax

"OssConfiguration": [
  {
    "MountPoint": String,
    "BucketName": String,
    "Permission": String,
    "Region": String,
    "Prefix": String
  }
]

OssConfiguration properties

Parameter

Type

Required

Updatable

Description

Constraints

BucketName

String

Yes

Yes

The name of the OSS bucket.

None

MountPoint

String

Yes

Yes

The directory path for the mount point.

None

Permission

String

Yes

Yes

The access permission for the mount point.

Valid values:

  • READ_ONLY

  • READ_WRITE

Prefix

String

Yes

Yes

An object path prefix within the OSS bucket.

None

Region

String

Yes

Yes

The region where the OSS bucket is located.

None

NetworkConfiguration syntax

"NetworkConfiguration": {
  "VpcId": String,
  "VSwitchIds": List,
  "SecurityGroupId": String,
  "NetworkMode": String
}

NetworkConfiguration

Parameter

Type

Required

Updatable

Description

Constraints

NetworkMode

String

Yes

Yes

The network mode.

Valid values:

  • PRIVATE

  • PUBLIC

  • PUBLIC_AND_PRIVATE

SecurityGroupId

String

No

Yes

The security group ID.

None

VpcId

String

No

Yes

The VPC ID.

None

VSwitchIds

List

No

Yes

A list of vSwitch IDs.

Minimum length: 1

NasConfig syntax

"NasConfig": {
  "MountPoints": List,
  "UserId": Integer,
  "GroupId": Integer
}

NasConfig properties

Parameter

Type

Required

Updatable

Description

Constraint

GroupId

Integer

No

Yes

The ID of the NAS group.

None

MountPoints

List

No

Yes

The NAS mount points.

Minimum length: 1

UserId

Integer

No

Yes

The ID of the NAS user.

None

MountPoints syntax

"MountPoints": [
  {
    "EnableTLS": Boolean,
    "ServerAddr": String,
    "MountDir": String
  }
]

Mount point properties

Parameter

Type

Required

Updatable

Description

Constraints

EnableTLS

Boolean

No

Yes

Specifies whether to enable TLS for the mount point.

None

MountDir

String

No

Yes

The mount directory on the server.

None

ServerAddr

String

No

Yes

The server address of the NAS file system.

None

Return value

Fn::GetAtt

  • TemplateArn: The template ARN.

  • TemplateName: The template name.

  • TemplateId: The template ID.

Example

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  TemplateName:
    Type: String
    Description:
      en: The name of the template.
    Required: true
  TemplateType:
    Type: String
    Description:
      en: The type of the template.
    AllowedValues:
      - CodeInterpreter
      - AllInOne
      - CustomImage
      - ComputerUse
      - Browser
    Default: Null
    Required: false
  Description:
    Type: String
    Description:
      en: The description of the template.
    AssociationProperty: TextArea
    Default: Null
    Required: false
  Cpu:
    Type: Number
    Description:
      en: 'The number of CPU cores.'
    MinValue: 2
    Default: Null
    Required: false
  Memory:
    Type: Number
    Description:
      en: 'The memory size, in MB.'
    MinValue: 2048
    Default: Null
    Required: false
  DiskSize:
    Type: Number
    Description:
      en: 'The disk size, in MB.'
    MinValue: 512
    Default: Null
    Required: false
  ContainerConfiguration:
    Description:
      en: The container configuration. Only images based on the Browser or Code Interpreter base images are allowed.
    Required: false
    Default: Null
    Type: Json
    AssociationPropertyMetadata:
      Parameters:
        Image:
          Type: String
          Description:
            en: The address of the container image.
          Default: Null
          Required: false
        ImageRegistryType:
          Type: String
          Description:
            en: The type of the image registry.
          AllowedValues:
            - ACR
            - ACREE
            - CUSTOM
          Required: true
        AcrInstanceId:
          Type: String
          Description:
            en: The ID of the ACR instance.
          Default: Null
          Required: false
        Command:
          Description:
            en: The command to run in the container.
          Required: false
          Default: Null
          Type: Json
          AssociationProperty: List[Parameter]
          AssociationPropertyMetadata:
            Parameter:
              Type: String
              Default: Null
              Required: false
        Port:
          Type: Number
          Description:
            en: The port of the container.
          MinValue: 1
          MaxValue: 65535
          Default: Null
          Required: false
  NetworkConfiguration:
    Description:
      en: The network configuration.
    Required: false
    Default: Null
    Type: Json
    AssociationPropertyMetadata:
      Parameters:
        NetworkMode:
          Type: String
          Description:
            en: The network mode.
          AllowedValues:
            - PRIVATE
            - PUBLIC
            - PUBLIC_AND_PRIVATE
          Required: true
        VpcId:
          Type: String
          Description:
            en: The ID of the VPC.
          AssociationProperty: ALIYUN::ECS::VPC::VPCId
          Default: Null
          Required: false
        SecurityGroupId:
          Type: String
          Description:
            en: The ID of the security group.
          AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
          AssociationPropertyMetadata:
            VpcId: ${VpcId}
          Default: Null
          Required: false
        VSwitchIds:
          Description:
            en: The list of vSwitch IDs.
          Required: false
          Default: Null
          Type: Json
          MinLength: 1
          AssociationProperty: List[Parameter]
          AssociationPropertyMetadata:
            Parameter:
              Type: String
              AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
              AssociationPropertyMetadata:
                ZoneId: ${ZoneId}
                VpcId: ${VpcId}
              Default: Null
              Required: false
  CredentialConfiguration:
    Description:
      en: The credential configuration.
    Required: false
    Default: Null
    Type: Json
    AssociationPropertyMetadata:
      Parameters:
        CredentialName:
          Type: String
          Description:
            en: The name of the credential.
          Required: true
  LogConfiguration:
    Description:
      en: The log configuration.
    Required: false
    Default: Null
    Type: Json
    AssociationPropertyMetadata:
      Parameters:
        Project:
          Type: String
          Description:
            en: The name of the SLS Project.
          Required: true
        Logstore:
          Type: String
          Description:
            en: The name of the SLS Logstore.
          Required: true
  ExecutionRoleArn:
    Type: String
    Description:
      en: The ARN of the execution role.
    Default: Null
    Required: false
  SandboxIdleTimeoutInSeconds:
    Type: Number
    Description:
      en: The sandbox idle timeout, in seconds.
    MinValue: 0
    Default: Null
    Required: false
  ArmsConfiguration:
    Description:
      en: The ARMS configuration.
    Required: false
    Default: Null
    Type: Json
    AssociationPropertyMetadata:
      Parameters:
        EnableArms:
          Type: Boolean
          Description:
            en: Whether to enable ARMS.
          Required: true
        ArmsLicenseKey:
          Type: String
          Description:
            en: The license key for ARMS.
          Required: true
        CmsWorkspace:
          Type: String
          Description:
            en: The ID of the CloudMonitor 2.0 workspace.
          Default: Null
          Required: false
  AllowAnonymousManage:
    Type: Boolean
    Description:
      en: Whether to allow anonymous management.
    Default: Null
    Required: false
  NasConfig:
    Description:
      en: The NAS configuration.
    Required: false
    Default: Null
    Type: Json
    AssociationPropertyMetadata:
      Parameters:
        GroupId:
          Type: Number
          Description:
            en: The ID of the NAS group.
          Default: Null
          Required: false
        UserId:
          Type: Number
          Description:
            en: The ID of the NAS user.
          Default: Null
          Required: false
        MountPoints:
          Description:
            en: The NAS mount points.
          Required: false
          Default: Null
          Type: Json
          MinLength: 1
          AssociationProperty: List[Parameters]
          AssociationPropertyMetadata:
            Parameters:
              EnableTLS:
                Type: Boolean
                Description:
                  en: Whether to enable TLS.
                Default: Null
                Required: false
              MountDir:
                Type: String
                Description:
                  en: The mount directory.
                Default: Null
                Required: false
              ServerAddr:
                Type: String
                Description:
                  en: The server address of the NAS file system.
                Default: Null
                Required: false
  EnableAgent:
    Type: Boolean
    Description:
      en: Whether to enable the sandbox agent.
    Default: Null
    Required: false
  WorkspaceId:
    Type: String
    Description:
      en: The ID of the workspace.
    Default: Null
    Required: false
  OssConfiguration:
    Description:
      en: The OSS configuration.
    Required: false
    Default: Null
    Type: Json
    MinLength: 1
    AssociationProperty: List[Parameters]
    AssociationPropertyMetadata:
      Parameters:
        BucketName:
          Type: String
          Description:
            en: The name of the OSS bucket.
          Required: true
        Prefix:
          Type: String
          Description:
            en: The OSS prefix.
          Required: true
        MountPoint:
          Type: String
          Description:
            en: The mount point.
          Required: true
        Permission:
          Type: String
          Description:
            en: The permission.
          AllowedValues:
            - READ_ONLY
            - READ_WRITE
          Required: true
        Region:
          Type: String
          Description:
            en: The region.
          Required: true
  EnvironmentVariables:
    Description:
      en: The environment variables.
    Required: false
    Default: Null
    Type: Json
  TemplateConfiguration:
    Description:
      en: The template configuration. The object structure is flexible and depends on the templateType value.
    Required: false
    Default: Null
    Type: Json
Resources:
  Template:
    Type: ALIYUN::AgentRun::Template
    Properties:
      TemplateName:
        Ref: TemplateName
      TemplateType:
        Ref: TemplateType
      Description:
        Ref: Description
      Cpu:
        Ref: Cpu
      Memory:
        Ref: Memory
      DiskSize:
        Ref: DiskSize
      ContainerConfiguration:
        Ref: ContainerConfiguration
      NetworkConfiguration:
        Ref: NetworkConfiguration
      CredentialConfiguration:
        Ref: CredentialConfiguration
      LogConfiguration:
        Ref: LogConfiguration
      ExecutionRoleArn:
        Ref: ExecutionRoleArn
      SandboxIdleTimeoutInSeconds:
        Ref: SandboxIdleTimeoutInSeconds
      ArmsConfiguration:
        Ref: ArmsConfiguration
      AllowAnonymousManage:
        Ref: AllowAnonymousManage
      NasConfig:
        Ref: NasConfig
      EnableAgent:
        Ref: EnableAgent
      WorkspaceId:
        Ref: WorkspaceId
      OssConfiguration:
        Ref: OssConfiguration
      EnvironmentVariables:
        Ref: EnvironmentVariables
      TemplateConfiguration:
        Ref: TemplateConfiguration
Outputs:
  TemplateId:
    Value:
      Fn::GetAtt:
        - Template
        - TemplateId
    Description: The ID of the template.
  TemplateName:
    Value:
      Fn::GetAtt:
        - Template
        - TemplateName
    Description: The name of the template.
  TemplateArn:
    Value:
      Fn::GetAtt:
        - Template
        - TemplateArn
    Description: The ARN of the template.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "TemplateName": {
      "Type": "String",
      "Description": {
        "en": "The name of the template."
      },
      "Required": true
    },
    "TemplateType": {
      "Type": "String",
      "Description": {
        "en": "The type of the template."
      },
      "AllowedValues": [
        "CodeInterpreter",
        "AllInOne",
        "CustomImage",
        "ComputerUse",
        "Browser"
      ],
      "Default": null,
      "Required": false
    },
    "Description": {
      "Type": "String",
      "Description": {
        "en": "The description of the template."
      },
      "AssociationProperty": "TextArea",
      "Default": null,
      "Required": false
    },
    "Cpu": {
      "Type": "Number",
      "Description": {
        "en": "The number of CPU cores."
      },
      "MinValue": 2,
      "Default": null,
      "Required": false
    },
    "Memory": {
      "Type": "Number",
      "Description": {
        "en": "The memory size, in MB."
      },
      "MinValue": 2048,
      "Default": null,
      "Required": false
    },
    "DiskSize": {
      "Type": "Number",
      "Description": {
        "en": "The disk size, in MB."
      },
      "MinValue": 512,
      "Default": null,
      "Required": false
    },
    "ContainerConfiguration": {
      "Description": {
        "en": "The container configuration. Only images based on the Browser or Code Interpreter base images are allowed."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Image": {
            "Type": "String",
            "Description": {
              "en": "The address of the container image."
            },
            "Default": null,
            "Required": false
          },
          "ImageRegistryType": {
            "Type": "String",
            "Description": {
              "en": "The type of the image registry."
            },
            "AllowedValues": [
              "ACR",
              "ACREE",
              "CUSTOM"
            ],
            "Required": true
          },
          "AcrInstanceId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the ACR instance."
            },
            "Default": null,
            "Required": false
          },
          "Command": {
            "Description": {
              "en": "The command to run in the container."
            },
            "Required": false,
            "Default": null,
            "Type": "Json",
            "AssociationProperty": "List[Parameter]",
            "AssociationPropertyMetadata": {
              "Parameter": {
                "Type": "String",
                "Default": null,
                "Required": false
              }
            }
          },
          "Port": {
            "Type": "Number",
            "Description": {
              "en": "The port of the container."
            },
            "MinValue": 1,
            "MaxValue": 65535,
            "Default": null,
            "Required": false
          }
        }
      }
    },
    "NetworkConfiguration": {
      "Description": {
        "en": "The network configuration."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "NetworkMode": {
            "Type": "String",
            "Description": {
              "en": "The network mode."
            },
            "AllowedValues": [
              "PRIVATE",
              "PUBLIC",
              "PUBLIC_AND_PRIVATE"
            ],
            "Required": true
          },
          "VpcId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the VPC."
            },
            "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
            "Default": null,
            "Required": false
          },
          "SecurityGroupId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the security group."
            },
            "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
            "AssociationPropertyMetadata": {
              "VpcId": "${VpcId}"
            },
            "Default": null,
            "Required": false
          },
          "VSwitchIds": {
            "Description": {
              "en": "The list of vSwitch IDs."
            },
            "Required": false,
            "Default": null,
            "Type": "Json",
            "MinLength": 1,
            "AssociationProperty": "List[Parameter]",
            "AssociationPropertyMetadata": {
              "Parameter": {
                "Type": "String",
                "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
                "AssociationPropertyMetadata": {
                  "ZoneId": "${ZoneId}",
                  "VpcId": "${VpcId}"
                },
                "Default": null,
                "Required": false
              }
            }
          }
        }
      }
    },
    "CredentialConfiguration": {
      "Description": {
        "en": "The credential configuration."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "CredentialName": {
            "Type": "String",
            "Description": {
              "en": "The name of the credential."
            },
            "Required": true
          }
        }
      }
    },
    "LogConfiguration": {
      "Description": {
        "en": "The log configuration."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Project": {
            "Type": "String",
            "Description": {
              "en": "The name of the SLS Project."
            },
            "Required": true
          },
          "Logstore": {
            "Type": "String",
            "Description": {
              "en": "The name of the SLS Logstore."
            },
            "Required": true
          }
        }
      }
    },
    "ExecutionRoleArn": {
      "Type": "String",
      "Description": {
        "en": "The ARN of the execution role."
      },
      "Default": null,
      "Required": false
    },
    "SandboxIdleTimeoutInSeconds": {
      "Type": "Number",
      "Description": {
        "en": "The sandbox idle timeout, in seconds."
      },
      "MinValue": 0,
      "Default": null,
      "Required": false
    },
    "ArmsConfiguration": {
      "Description": {
        "en": "The ARMS configuration."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "EnableArms": {
            "Type": "Boolean",
            "Description": {
              "en": "Whether to enable ARMS."
            },
            "Required": true
          },
          "ArmsLicenseKey": {
            "Type": "String",
            "Description": {
              "en": "The license key for ARMS."
            },
            "Required": true
          },
          "CmsWorkspace": {
            "Type": "String",
            "Description": {
              "en": "The ID of the CloudMonitor 2.0 workspace."
            },
            "Default": null,
            "Required": false
          }
        }
      }
    },
    "AllowAnonymousManage": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether to allow anonymous management."
      },
      "Default": null,
      "Required": false
    },
    "NasConfig": {
      "Description": {
        "en": "The NAS configuration."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "GroupId": {
            "Type": "Number",
            "Description": {
              "en": "The ID of the NAS group."
            },
            "Default": null,
            "Required": false
          },
          "UserId": {
            "Type": "Number",
            "Description": {
              "en": "The ID of the NAS user."
            },
            "Default": null,
            "Required": false
          },
          "MountPoints": {
            "Description": {
              "en": "The NAS mount points."
            },
            "Required": false,
            "Default": null,
            "Type": "Json",
            "MinLength": 1,
            "AssociationProperty": "List[Parameters]",
            "AssociationPropertyMetadata": {
              "Parameters": {
                "EnableTLS": {
                  "Type": "Boolean",
                  "Description": {
                    "en": "Whether to enable TLS."
                  },
                  "Default": null,
                  "Required": false
                },
                "MountDir": {
                  "Type": "String",
                  "Description": {
                    "en": "The mount directory."
                  },
                  "Default": null,
                  "Required": false
                },
                "ServerAddr": {
                  "Type": "String",
                  "Description": {
                    "en": "The server address of the NAS file system."
                  },
                  "Default": null,
                  "Required": false
                }
              }
            }
          }
        }
      }
    },
    "EnableAgent": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether to enable the sandbox agent."
      },
      "Default": null,
      "Required": false
    },
    "WorkspaceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the workspace."
      },
      "Default": null,
      "Required": false
    },
    "OssConfiguration": {
      "Description": {
        "en": "The OSS configuration."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "MinLength": 1,
      "AssociationProperty": "List[Parameters]",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "BucketName": {
            "Type": "String",
            "Description": {
              "en": "The name of the OSS bucket."
            },
            "Required": true
          },
          "Prefix": {
            "Type": "String",
            "Description": {
              "en": "The OSS prefix."
            },
            "Required": true
          },
          "MountPoint": {
            "Type": "String",
            "Description": {
              "en": "The mount point."
            },
            "Required": true
          },
          "Permission": {
            "Type": "String",
            "Description": {
              "en": "The permission."
            },
            "AllowedValues": [
              "READ_ONLY",
              "READ_WRITE"
            ],
            "Required": true
          },
          "Region": {
            "Type": "String",
            "Description": {
              "en": "The region."
            },
            "Required": true
          }
        }
      }
    },
    "EnvironmentVariables": {
      "Description": {
        "en": "The environment variables."
      },
      "Required": false,
      "Default": null,
      "Type": "Json"
    },
    "TemplateConfiguration": {
      "Description": {
        "en": "The template configuration. The object structure is flexible and depends on the templateType value."
      },
      "Required": false,
      "Default": null,
      "Type": "Json"
    }
  },
  "Resources": {
    "Template": {
      "Type": "ALIYUN::AgentRun::Template",
      "Properties": {
        "TemplateName": {
          "Ref": "TemplateName"
        },
        "TemplateType": {
          "Ref": "TemplateType"
        },
        "Description": {
          "Ref": "Description"
        },
        "Cpu": {
          "Ref": "Cpu"
        },
        "Memory": {
          "Ref": "Memory"
        },
        "DiskSize": {
          "Ref": "DiskSize"
        },
        "ContainerConfiguration": {
          "Ref": "ContainerConfiguration"
        },
        "NetworkConfiguration": {
          "Ref": "NetworkConfiguration"
        },
        "CredentialConfiguration": {
          "Ref": "CredentialConfiguration"
        },
        "LogConfiguration": {
          "Ref": "LogConfiguration"
        },
        "ExecutionRoleArn": {
          "Ref": "ExecutionRoleArn"
        },
        "SandboxIdleTimeoutInSeconds": {
          "Ref": "SandboxIdleTimeoutInSeconds"
        },
        "ArmsConfiguration": {
          "Ref": "ArmsConfiguration"
        },
        "AllowAnonymousManage": {
          "Ref": "AllowAnonymousManage"
        },
        "NasConfig": {
          "Ref": "NasConfig"
        },
        "EnableAgent": {
          "Ref": "EnableAgent"
        },
        "WorkspaceId": {
          "Ref": "WorkspaceId"
        },
        "OssConfiguration": {
          "Ref": "OssConfiguration"
        },
        "EnvironmentVariables": {
          "Ref": "EnvironmentVariables"
        },
        "TemplateConfiguration": {
          "Ref": "TemplateConfiguration"
        }
      }
    }
  },
  "Outputs": {
    "TemplateId": {
      "Value": {
        "Fn::GetAtt": [
          "Template",
          "TemplateId"
        ]
      },
      "Description": "The ID of the template."
    },
    "TemplateName": {
      "Value": {
        "Fn::GetAtt": [
          "Template",
          "TemplateName"
        ]
      },
      "Description": "The name of the template."
    },
    "TemplateArn": {
      "Value": {
        "Fn::GetAtt": [
          "Template",
          "TemplateArn"
        ]
      },
      "Description": "The ARN of the template."
    }
  }
}