You can call DescribeJob to retrieve the configuration of a job template.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sae:DescribeJob |
get |
*All Resource
|
None | None |
Request syntax
GET /pop/v1/sam/job/describeJob HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
ID of the job template. |
7171a6ca-d1cd-4928-8642-7d5cfe69**** |
| JobId |
string |
No |
ID of the job. |
event-b798157b-40a2-4388-b578-71fb897103**-** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response data. |
||
| RequestId |
string |
ID of the request. |
01CF26C7-00A3-4AA6-BA76-7E95F2A3**** |
| Message |
string |
Additional information about the call result. |
success |
| TraceId |
string |
ID of the trace. Use this ID to perform term queries on call details. |
ac1a0b2215622246421415014e**** |
| Data |
object |
Information about the job template. |
|
| VpcId |
string |
ID of the VPC. |
vpc-2ze0i263cnn311nvj**** |
| ConfigMapMountDesc |
array<object> |
ConfigMap information. |
|
|
object |
ConfigMap information. |
||
| Key |
string |
Key-value pair in the ConfigMap. |
k1 |
| ConfigMapName |
string |
Name of the ConfigMap. |
test |
| MountPath |
string |
Mount path in the container. |
/tmp |
| ConfigMapId |
integer |
ID of the ConfigMap. |
1 |
| SecurityGroupId |
string |
ID of the security group. |
sg-wz969ngg2e49q5i4**** |
| Jdk |
string |
JDK version required by the deployment package. Supported versions include the following:
This parameter is not supported when Package Type is Image. |
Open JDK 8 |
| ImageUrl |
string |
Registry address. Required when Package Type is Image. |
docker.io/library/nginx:1.14.2 |
| SlsConfigs |
string |
Configuration for log collection to Simple Log Service (SLS).
Parameter descriptions:
If your SLS collection configuration does not change between deployments, omit this parameter. If you no longer need SLS log collection, set this field to an empty string (""). |
[{"logDir":"","logType":"stdout"},{"logDir":"/tmp/a.log"}] |
| Tags |
array<object> |
Tag information. |
|
|
object |
Tag information. |
||
| Key |
string |
Tag key. |
k1 |
| Value |
string |
Tag value. |
v1 |
| PackageUrl |
string |
URL of the deployment package. Required when Package Type is FatJar or War. |
https://edas-bj.oss-cn-beijing.aliyuncs.com/apps/K8s_APP_ID/d4c97c37-aba3-403e-ae1e-6f7d8742****/hello-sae.war |
| PackageType |
string |
Type of the deployment package. Valid values:
|
War |
| PreStop |
string |
Script to run before stopping the container. This script runs just before the container is deleted. Example format: |
{"exec":{"command":["cat","/etc/group"]}} |
| PackageVersion |
string |
Version number of the deployment package. Required when Package Type is FatJar or War. |
1.0 |
| JarStartArgs |
string |
Startup arguments for JAR packages. Default startup command: |
start |
| AppName |
string |
Name of the job template. |
demo-app |
| AppId |
string |
ID of the job template. |
7171a6ca-d1cd-4928-8642-7d5cfe69**** |
| JarStartOptions |
string |
Startup options for JAR packages. Default startup command: |
-Dtest=true |
| Replicas |
integer |
Number of task instances. |
2 |
| Memory |
integer |
Memory required per instance, in MB. Cannot be zero. Memory and CPU are paired. Supported defined specifications:
|
2048 |
| PhpConfig |
string |
Content of the PHP configuration file. |
k1=v1 |
| PhpConfigLocation |
string |
Mount path for the PHP startup configuration. Ensure your PHP server uses this configuration file to start. |
/usr/local/etc/php/php.ini |
| PostStart |
string |
Script to run after starting the container. This script runs immediately after the container starts. Example format: |
{"exec":{"command":["cat","/etc/group"]}} |
| TerminationGracePeriodSeconds |
integer |
Timeout for graceful shutdown, in seconds. Default is 30. Valid range: 1 to 300. |
10 |
| CommandArgs |
string |
Arguments for the image startup command. Format:
In the Command example, |
["a","b"] |
| NamespaceId |
string |
ID of the namespace. |
cn-beijing:test |
| MountHost |
string |
Mount target of NAS in the VPC of the job template. Omit this field if the NAS configuration does not change. To clear the NAS configuration, set this field to an empty string (""). |
example.com |
| TomcatConfig |
string |
Tomcat configuration. Set to "" or "{}" to delete the configuration.
|
{"port":8080,"contextPath":"/","maxThreads":400,"uriEncoding":"ISO-8859-1","useBodyEncodingForUri":true} |
| RegionId |
string |
ID of the region. |
cn-beijing |
| VSwitchId |
string |
ID of the vSwitch. |
vsw-2ze559r1z1bpwqxwp**** |
| Cpu |
integer |
CPU required per instance, in milli-cores. Cannot be zero. Supported defined specifications:
|
1000 |
| Envs |
string |
Environment variables for the container. You can define them directly or reference configuration items. To reference configuration items, first create a ConfigMap instance. For more information, see CreateConfigMap. Options:
|
[{"name":"TEST_ENV_KEY","value":"TEST_ENV_VAR"}] |
| MountDesc |
array<object> |
Mount description. |
|
|
object |
Mount description. |
||
| MountPath |
string |
Mount path in the container. |
/tmp |
| NasPath |
string |
Relative path in NAS. |
/ |
| CustomHostAlias |
string |
Custom host mapping inside the container. Options:
|
[{"hostName":"test.host.name","ip":"0.0.0.0"}] |
| WebContainer |
string |
Tomcat version required by the deployment package. Supported versions:
This parameter is not supported when Package Type is Image. |
apache-tomcat-7.0.91 |
| Command |
string |
Startup command for the image. Must be an executable object in the container. Example:
Based on this example, Command="echo" and |
echo |
| WarStartOptions |
string |
Startup options for WAR packages. Default startup command: |
custom-option |
| NasId |
string |
ID of the NAS. |
AKSN89** |
| OssAkId |
string |
AccessKey ID for OSS read and write operations. |
xxxxxx |
| OssAkSecret |
string |
AccessKey secret for OSS read and write operations. |
xxxxxx |
| OssMountDescs |
array<object> |
OSS mount description. |
|
|
object |
OSS mount description. |
||
| bucketName |
string |
Name of the bucket. |
oss-bucket |
| bucketPath |
string |
Directory or object in OSS. If the directory does not exist, an error occurs. |
data/user.data |
| mountPath |
string |
Path in the SAE container. If the path exists, it is overwritten. If it does not exist, it is created. |
/usr/data/user.data |
| readOnly |
boolean |
Whether the container path has read-only access to the mounted resource. Valid values:
|
true |
| EdasContainerVersion |
string |
Runtime environment version for HSF frameworks, such as Ali-Tomcat containers. |
3.5.3 |
| Timezone |
string |
Time zone. Default is Asia/Shanghai. |
Asia/Shanghai |
| AppDescription |
string |
Description of the job template. |
示例应用 |
| AcrInstanceId |
string |
ID of the ACR Enterprise instance. |
cri-xxxxxx |
| AcrAssumeRoleArn |
string |
ARN of the RAM role required to pull images across accounts. For more information, see Pull Alibaba Cloud images across accounts and Grant cross-account permissions using RAM roles. |
acs:ram::123456789012****:role/adminrole |
| ImagePullSecrets |
string |
ID of the secret. |
10 |
| TriggerConfig |
string |
Trigger configuration for jobs. Configure based on job type.
|
{"type":"time","config":"0 1 */1 * ?","timezone":"GMT+8:00"} |
| ConcurrencyPolicy |
string |
Concurrency policy for jobs. Valid values:
|
Allow |
| Suspend |
boolean |
Whether to suspend the job template. |
false |
| Timeout |
integer |
Timeout for the job, in seconds. |
3600 |
| BackoffLimit |
integer |
Maximum number of retries for the job. |
3 |
| Slice |
boolean |
Enable job sharding. |
true |
| SliceEnvs |
string |
Sharding parameters for the job. |
SliceEnvs |
| RefAppId |
string |
ID of the referenced job template. |
7171a6ca-d1cd-4928-8642-7d5cfe69**** |
| RefedAppIds |
array |
List of IDs of job templates that reference this job template. |
|
|
string |
ID of the job template. |
8621a6ca-d1cd-4928-8642-7d5cfe69**** |
|
| PublicWebHookUrls |
array |
List of public URLs for manually triggered node instances. |
|
|
string |
Public URL. |
http://***/webhook/putEvents?token=*** |
|
| VpcWebHookUrls |
array |
List of private network URLs for manually triggered node instances. |
|
|
string |
Private network URL. |
http://***/webhook/putEvents?token=*** |
|
| ProgrammingLanguage |
string |
Programming language used to create the job template. Valid values:
|
java |
| NasConfigs |
string |
Configuration for mounting NAS. |
[{"mountPath":"/test1","readOnly":false,"nasId":"nasId1","mountDomain":"nasId1.cn-shenzhen.nas.aliyuncs.com","nasPath":"/test1"},{"nasId":"nasId2","mountDomain":"nasId2.cn-shenzhen.nas.aliyuncs.com","readOnly":false,"nasPath":"/test2","mountPath":"/test2"}] |
| Python |
string |
Python environment. Supports PYTHON 3.9.15. |
PYTHON 3.9.15 |
| PythonModules |
string |
Custom installation modules. By default, dependencies in requirements.txt at the root directory are installed. If no custom package is specified, list the dependencies to install. |
Flask==2.0 |
| BestEffortType |
string |
||
| ErrorCode |
string |
Error code. Valid values:
|
空 |
| Code |
string |
Status code or POP error code. Valid values:
|
200 |
| Success |
boolean |
Indicates whether the job template configuration was retrieved successfully. Valid values:
|
true |
Examples
Success response
JSON format
{
"RequestId": "01CF26C7-00A3-4AA6-BA76-7E95F2A3****",
"Message": "success",
"TraceId": "ac1a0b2215622246421415014e****",
"Data": {
"VpcId": "vpc-2ze0i263cnn311nvj****",
"ConfigMapMountDesc": [
{
"Key": "k1",
"ConfigMapName": "test",
"MountPath": "/tmp",
"ConfigMapId": 1
}
],
"SecurityGroupId": "sg-wz969ngg2e49q5i4****",
"Jdk": "Open JDK 8",
"ImageUrl": "docker.io/library/nginx:1.14.2",
"SlsConfigs": "[{\"logDir\":\"\",\"logType\":\"stdout\"},{\"logDir\":\"/tmp/a.log\"}]",
"Tags": [
{
"Key": "k1",
"Value": "v1"
}
],
"PackageUrl": "https://edas-bj.oss-cn-beijing.aliyuncs.com/apps/K8s_APP_ID/d4c97c37-aba3-403e-ae1e-6f7d8742****/hello-sae.war",
"PackageType": "War",
"PreStop": "{\"exec\":{\"command\":[\"cat\",\"/etc/group\"]}}",
"PackageVersion": "1.0",
"JarStartArgs": "start",
"AppName": "demo-app",
"AppId": "7171a6ca-d1cd-4928-8642-7d5cfe69****",
"JarStartOptions": "-Dtest=true",
"Replicas": 2,
"Memory": 2048,
"PhpConfig": "k1=v1",
"PhpConfigLocation": "/usr/local/etc/php/php.ini",
"PostStart": "{\"exec\":{\"command\":[\"cat\",\"/etc/group\"]}}",
"TerminationGracePeriodSeconds": 10,
"CommandArgs": "[\"a\",\"b\"]",
"NamespaceId": "cn-beijing:test",
"MountHost": "example.com",
"TomcatConfig": "{\"port\":8080,\"contextPath\":\"/\",\"maxThreads\":400,\"uriEncoding\":\"ISO-8859-1\",\"useBodyEncodingForUri\":true}",
"RegionId": "cn-beijing",
"VSwitchId": "vsw-2ze559r1z1bpwqxwp****",
"Cpu": 1000,
"Envs": "[{\"name\":\"TEST_ENV_KEY\",\"value\":\"TEST_ENV_VAR\"}]",
"MountDesc": [
{
"MountPath": "/tmp",
"NasPath": "/"
}
],
"CustomHostAlias": "[{\"hostName\":\"test.host.name\",\"ip\":\"0.0.0.0\"}]",
"WebContainer": "apache-tomcat-7.0.91",
"Command": "echo",
"WarStartOptions": "custom-option",
"NasId": "AKSN89**",
"OssAkId": "xxxxxx",
"OssAkSecret": "xxxxxx",
"OssMountDescs": [
{
"bucketName": "oss-bucket",
"bucketPath": "data/user.data",
"mountPath": "/usr/data/user.data",
"readOnly": true
}
],
"EdasContainerVersion": "3.5.3",
"Timezone": "Asia/Shanghai",
"AppDescription": "示例应用",
"AcrInstanceId": "cri-xxxxxx",
"AcrAssumeRoleArn": "acs:ram::123456789012****:role/adminrole",
"ImagePullSecrets": "10",
"TriggerConfig": "{\"type\":\"time\",\"config\":\"0 1 */1 * ?\",\"timezone\":\"GMT+8:00\"}",
"ConcurrencyPolicy": "Allow",
"Suspend": false,
"Timeout": 3600,
"BackoffLimit": 3,
"Slice": true,
"SliceEnvs": "SliceEnvs",
"RefAppId": "7171a6ca-d1cd-4928-8642-7d5cfe69****",
"RefedAppIds": [
"8621a6ca-d1cd-4928-8642-7d5cfe69****"
],
"PublicWebHookUrls": [
"http://***/webhook/putEvents?token=***"
],
"VpcWebHookUrls": [
"http://***/webhook/putEvents?token=***"
],
"ProgrammingLanguage": "java",
"NasConfigs": "[{\"mountPath\":\"/test1\",\"readOnly\":false,\"nasId\":\"nasId1\",\"mountDomain\":\"nasId1.cn-shenzhen.nas.aliyuncs.com\",\"nasPath\":\"/test1\"},{\"nasId\":\"nasId2\",\"mountDomain\":\"nasId2.cn-shenzhen.nas.aliyuncs.com\",\"readOnly\":false,\"nasPath\":\"/test2\",\"mountPath\":\"/test2\"}]",
"Python": "PYTHON 3.9.15",
"PythonModules": "Flask==2.0",
"BestEffortType": ""
},
"ErrorCode": "空",
"Code": "200",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | InvalidAppId.NotFound | The specified AppId does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.