Queries the list and status of files sent by Cloud Assistant.
Operation description
Operation description:
After you send a file, the file is not necessarily sent successfully. You must check the actual delivery result based on the return value of this operation. The actual output prevails.
You can query execution information from the last day. A maximum of 1,000 entries of execution information can be retained.
When you execute a paging query for the first page, set only
MaxResultsto limit the number of entries returned. TheNextTokenvalue in the response serves as the token for querying subsequent pages. When querying subsequent pages, set theNextTokenparameter to the value obtained from the previous response and setMaxResultsto limit the number of entries returned.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeSendFileResults |
get |
Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the ECS instance. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the file sending task belongs. After you specify this parameter, you must also specify ResourceGroupId when sending a file. This parameter allows you to filter file sending results by resource group. |
rg-bp67acfmxazb4p**** |
| InvokeId |
string |
No |
The execution ID. |
f-hz0jdfwd9f**** |
| Name |
string |
No |
The file name. If you specify this parameter, all sending records of the file with the specified name are queried. |
test.txt |
| InstanceId |
string |
No |
The instance ID. If you specify this parameter, all file sending records of the specified instance are queried. |
i-hz0jdfwd9f**** |
| PageNumber |
integer |
No |
Note
This parameter is about to go offline. Use NextToken and MaxResults to complete paging query operations. |
1 |
| PageSize |
integer |
No |
Note
This parameter is about to go offline. Use NextToken and MaxResults to complete paging query operations. |
10 |
| MaxResults |
integer |
No |
The maximum number of entries per page in a paging query. Maximum value: 50. Default value: 10. |
10 |
| NextToken |
string |
No |
The pagination token. Set this parameter to the NextToken value returned in the previous API call. |
AAAAAdDWBF2 |
| InvocationStatus |
string |
No |
The overall sending status of the file. The overall status depends on the combined execution status of all target instances. Valid values:
|
Success |
| Tag |
array<object> |
No |
The tags. |
|
|
object |
No |
The tags. |
||
| Key |
string |
No |
The tag key for the file sending task. Valid values of N: 1 to 20. The tag key cannot be an empty string. If you use a single tag to filter resources, the resource count with the specified tag cannot exceed 1,000. If you use multiple tags to filter resources, the resource count of resources that have all specified tags attached cannot exceed 1,000. If the resource count exceeds 1,000, call the ListTagResources operation to query resources. The tag key can be up to 64 characters in length and cannot start with |
TestKey |
| Value |
string |
No |
The tag value for the file sending task. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain |
TestValue |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageSize |
integer |
The number of entries per page. |
10 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| PageNumber |
integer |
The page number of the query result. |
1 |
| TotalCount |
integer |
The total number of scripts. |
2 |
| NextToken |
string |
The pagination token returned in this call. |
AAAAAdDWBF2 |
| Invocations |
object |
||
| Invocation |
array<object> |
The file sending records. |
|
|
array<object> |
|||
| CreationTime |
string |
The time when the file sending task was created. |
2019-12-20T06:15:54Z |
| InvocationStatus |
string |
The overall sending status of the file. The overall status depends on the combined execution status of all instances in the sending task. Valid values:
|
Success |
| ContentType |
string |
The content type of the file. Valid values:
|
PlainText |
| TargetDir |
string |
The destination path. |
/home/user |
| FileOwner |
string |
The owner of the file. |
test |
| Description |
string |
The description. |
This is a test file. |
| VmCount |
integer |
The number of instances to which the file was sent. |
1 |
| FileMode |
string |
The permissions on the file. |
777 |
| FileGroup |
string |
The user group of the file. |
test |
| InvokeId |
string |
The execution ID. |
f-hz0jdfwd9f**** |
| Name |
string |
The name of the file. |
test.txt |
| Content |
string |
The content of the file. |
#!/bin/bash echo "Current User is :" echo $(ps | grep "$$" | awk '{print $2}') |
| Overwrite |
string |
Indicates whether overwriting is allowed. |
false |
| InvokeInstances |
object |
||
| InvokeInstance |
array<object> |
The target instances for file sending. |
|
|
object |
|||
| CreationTime |
string |
The time when the file sending task was created. |
2019-12-20T06:15:54Z |
| StartTime |
string |
The time when the sending task started to run on the instance. |
2019-12-20T06:15:54Z |
| InvocationStatus |
string |
The sending status of the file on a single instance. Valid values:
|
Success |
| FinishTime |
string |
The time when the sending task ended. |
2019-12-20T06:15:54Z |
| UpdateTime |
string |
The time when the task status was updated. |
2019-12-20T06:15:54Z |
| ErrorInfo |
string |
The details of the file sending failure or execution failure. Valid values:
|
the instance is not running when create task |
| ErrorCode |
string |
The error code for the file sending failure. Valid values:
|
InstanceNotExists |
| InstanceId |
string |
The instance ID. |
i-uf614fhehhz**** |
| Tags |
object |
||
| Tag |
array<object> |
The tag information of the file sending task. |
|
|
object |
The tag information of the file sending task. |
||
| TagKey |
string |
The tag key of the file sending task. |
owner |
| TagValue |
string |
The tag value of the file sending task. |
zhangsan |
Examples
Success response
JSON format
{
"PageSize": 10,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PageNumber": 1,
"TotalCount": 2,
"NextToken": "AAAAAdDWBF2",
"Invocations": {
"Invocation": [
{
"CreationTime": "2019-12-20T06:15:54Z",
"InvocationStatus": "Success",
"ContentType": "PlainText",
"TargetDir": "/home/user",
"FileOwner": "test",
"Description": "This is a test file.",
"VmCount": 1,
"FileMode": "777",
"FileGroup": "test",
"InvokeId": "f-hz0jdfwd9f****",
"Name": "test.txt",
"Content": "#!/bin/bash echo \"Current User is :\" echo $(ps | grep \"$$\" | awk '{print $2}')",
"Overwrite": "false",
"InvokeInstances": {
"InvokeInstance": [
{
"CreationTime": "2019-12-20T06:15:54Z",
"StartTime": "2019-12-20T06:15:54Z",
"InvocationStatus": "Success",
"FinishTime": "2019-12-20T06:15:54Z",
"UpdateTime": "2019-12-20T06:15:54Z",
"ErrorInfo": "the instance is not running when create task",
"ErrorCode": "InstanceNotExists",
"InstanceId": "i-uf614fhehhz****"
}
]
},
"Tags": {
"Tag": [
{
"TagKey": "owner",
"TagValue": "zhangsan"
}
]
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | RegionId.ApiNotSupported | The api is not supported in this region. | The API operation cannot be called in the specified region. Check whether the specified RegionId parameter is valid. |
| 400 | NumberExceed.Tags | The Tags parameter number is exceed. | The number of tags exceeds the maximum limit. |
| 400 | MissingParameter.TagKey | You must specify Tag.N.Key. | The tag key is not specified. |
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | The specified tag key already exists. Tag keys must be unique. |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | The specified Tag.N.Key parameter is invalid. |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | The specified tag value is invalid. |
| 400 | InvalidParam.PageNumber | The specified parameter is invalid. | |
| 400 | InvalidParam.PageSize | The specified parameter is invalid. | |
| 400 | InvalidParameter.NextToken | The specified parameter NextToken is not valid. | The specified parameter NextToken is illegal. |
| 400 | InvalidParameter.MaxResults | The specified parameter MaxResults is not valid. | The specified parameter MaxResults is illegal. |
| 500 | InternalError.Dispatch | An error occurred when you dispatched the request. | An error occurred while the request is being sent. Try again later. |
| 403 | Operation.Forbidden | The operation is not permitted. | The operation is not supported. |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | Region information error |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.