tccli batch help
NAMEbatchDESCRIPTIONbatch-2017-03-12USEAGEtccli batch <action> [--param...]OPTIONShelpshow the tccli batch help info--versionspecify a batch api versionAVAILABLE ACTIONDescribeComputeEnvThis API is used to query compute environment detailsCreateTaskTemplateThis API is used to create a task template
stdout and stderr from the standard output and upload them to the specified COS bucket upon task completion. You need to create a bucket and a subfolder for storage in advance.tccli batch CreateComputeEnv --version 2017-03-12 --ComputeEnv '{"EnvName": "test compute env", // Compute environment name"EnvDescription": "test compute env", // Compute environment description"EnvType": "MANAGED", // Compute environment type, which is `managed` here"EnvData": { // Specific configuration (please see the CVM instance creation description)"InternetAccessible": {"PublicIpAssigned": "TRUE","InternetMaxBandwidthOut": 50},"LoginSettings": {"Password": "*****" // Login password (to be replaced)},"InstanceType": "S1.SMALL1", // CVM instance type"ImageId": "img-xxxxyyyy" // CVM image ID (to be replaced)},"DesiredComputeNodeCount": 2 // Number of desired compute nodes}'--Placement'{"Zone": "ap-guangzhou-6" // AZ (to be replaced)}'
tccli batch CreateComputeEnv --version 2017-03-12 --ComputeEnv '{"EnvName": "test compute env", "EnvDescription": "test compute env", "EnvType": "MANAGED", "EnvData": {"InstanceType": "S1.SMALL2", "ImageId": "to be replaced", "LoginSettings": {"Password": "to be replaced"}, "InternetAccessible": {"PublicIpAssigned": "TRUE", "InternetMaxBandwidthOut": 50}, "SystemDisk": {"DiskType": "CLOUD_BASIC", "DiskSize": 50 } }, "DesiredComputeNodeCount": 2 }' --Placement '{"Zone": "ap-guangzhou-6"}'
EnvId indicates the unique ID of a BatchCompute compute environment.{"EnvId": "env-jlatqfkn","RequestId": "297ed003-7373-4950-9721-242d3d40b3ca"}
tccli batch DescribeComputeEnvs --version 2017-03-12
{"TotalCount": 1,"ComputeEnvSet": [{"EnvId": "env-jlatqfkn","ComputeNodeMetrics": {...},"EnvType": "MANAGED","DesiredComputeNodeCount": 2,"EnvName": "test compute env","Placement": {...},"CreateTime": "2019-10-08T08:55:12Z"}],"RequestId": "7a1f9338-0118-46bf-b59f-60ace9f154f5"}
tccli batch DescribeComputeEnv --version 2017-03-12 --EnvId env-jlatqfkn
{"EnvId": "env-jlatqfkn","ComputeNodeMetrics": {...},"EnvType": "MANAGED","DesiredComputeNodeCount": 2,"ComputeNodeSet": [...],"RequestId": "407de39c-1c3d-489e-9a35-5257ae561e87","Placement": {...},"EnvName": "test compute env","CreateTime": "2019-10-08T08:55:12Z"}
tccli batch SubmitJob --version 2017-03-12 --Job '{"JobName": "test job", "JobDescription": "xxx", "Priority": "1", "Tasks": [{"TaskName": "hello2", "TaskInstanceNum": 1, "Application": {"DeliveryForm": "LOCAL", "Command": "python -c \\"fib=lambda n:1 if n<=2 else fib(n-1)+fib(n-2); print(fib(20))\\" "}, "EnvId": "to be replaced", "RedirectInfo": {"StdoutRedirectPath": "to be replaced", "StderrRedirectPath": "to be replaced"} } ] }' --Placement '{"Zone": "ap-guangzhou-6"}'
{"RequestId": "d6903404-5765-474b-b516-39137456fa5a","JobId": "job-qjq3mqp7"}
tccli batch DeleteComputeEnv --version 2017-03-12 --EnvId env-jlatqfkn
{"RequestId": "029becda-2a4e-4989-aa77-6fbb5a873555"}
Feedback