tccli batch help
NAMEbatchDESCRIPTIONbatch-2017-03-12USEAGEtccli batch <action> [--param...]OPTIONShelpshow the tccli batch help info--versionspecify a batch api versionAVAILABLE ACTIONDescribeComputeEnv用于查询计算环境的详细信息CreateTaskTemplate用于创建任务模板
tccli batch CreateComputeEnv --version 2017-03-12 --ComputeEnv '{"EnvName": "test compute env", // 计算环境名称"EnvDescription": "test compute env", // 计算环境描述"EnvType": "MANAGED", // 计算环境类型,托管型"EnvData": { // 具体配置(可参照 CVM 创建实例说明)"InternetAccessible": {"PublicIpAssigned": "TRUE","InternetMaxBandwidthOut": 50},"LoginSettings": {"Password": "*****" // 登录密码(需替换)},"InstanceType": "S1.SMALL1", // CVM 实例类型"ImageId": "img-xxxxyyyy" // CVM 镜像 ID(需替换)},"DesiredComputeNodeCount": 2 // 计算节点期望个数}'--Placement'{"Zone": "ap-guangzhou-2" // 可用区(可能需替换)}'
tccli batch CreateComputeEnv --version 2017-03-12 --ComputeEnv '{"EnvName": "test compute env", "EnvDescription": "test compute env", "EnvType": "MANAGED", "EnvData": {"InstanceType": "S1.SMALL2", "ImageId": "待替换", "LoginSettings": {"Password": "待替换"}, "InternetAccessible": {"PublicIpAssigned": "TRUE", "InternetMaxBandwidthOut": 50}, "SystemDisk": {"DiskType": "CLOUD_BASIC", "DiskSize": 50 } }, "DesiredComputeNodeCount": 2 }' --Placement '{"Zone": "ap-guangzhou-2"}'
{"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": "待替换", "RedirectInfo": {"StdoutRedirectPath": "待替换", "StderrRedirectPath": "待替换"} } ] }' --Placement '{"Zone": "ap-guangzhou-2"}'
{"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"}
本页内容是否解决了您的问题?