tccli batch help
NAMEbatchDESCRIPTIONbatch-2017-03-12USEAGEtccli batch <action> [--param...]OPTIONShelpshow the tccli batch help info--versionspecify a batch api versionAVAILABLE ACTIONDescribeComputeEnvUsed to query details of the computing environmentCreateTaskTemplateUsed to create a task template
tccli batch CreateComputeEnv --version 2017-03-12 --ComputeEnv '{"EnvName": "batch-env", // Computing environment name"EnvDescription": "batch env demo", // Computing environment description"EnvType": "MANAGED", // Computing environment type: MANAGED"EnvData": { // Specific configuration (Refer to the CVM instance creation description.)"InstanceType": "BS1.LARGE8", // CVM instance type in a computing environment"ImageId": "img-m4q71qnf", // CVM image ID in a computing environment, which can be replaced by a custom image ID"LoginSettings": {"Password": "B1[habcd" // CVM login password in a computing environment},"InternetAccessible": {"PublicIpAssigned": "TRUE", // Whether the CVM requires a public IP address in a computing environment"InternetMaxBandwidthOut": 10 // CVM bandwidth cap in a computing environment},"SystemDisk": {"DiskType": "CLOUD_BASIC", // Type of a CVM disk in a computing environment (HDD cloud disk is used now)"DiskSize": 50 // Size of a CVM disk in a computing environment}},"DesiredComputeNodeCount": 10 // Number of desired compute nodes}'--Placement'{"Zone": "ap-guangzhou-6" // Availability zone (Guangzhou Zone 6 now, you can change it if necessary)}'
tccli batch CreateComputeEnv --version 2017-03-12 --ComputeEnv '{"EnvName":"batch-env","EnvDescription":"batch env demo","EnvType":"MANAGED","EnvData":{"InstanceType":"BS1.LARGE8","ImageId":"img-m4q71qnf","LoginSettings":{"Password":"B1[habcd"},"InternetAccessible":{"PublicIpAssigned":"TRUE","InternetMaxBandwidthOut":50},"SystemDisk":{"DiskType":"CLOUD_BASIC","DiskSize":50}},"DesiredComputeNodeCount":1}' --Placement '{"Zone": "ap-guangzhou-6"}'
EnvId indicates the unique ID of a Batch computing environment.
The following will describe how to use Batch command line interface (CLI) to check the computing environment and instance information within it, and EnvId will be used. You need to record the returned value of EnvId.{"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 DeleteComputeEnv --version 2017-03-12 --EnvId env-jlatqfkn
{"RequestId": "029becda-2a4e-4989-aa77-6fbb5a873555"}
Feedback