Queries the files sent by Cloud Assistant and their status.
Operation description
Usage notes
When you send a file, the file may fail to be sent to specific Elastic Compute Service (ECS) instances. You can call this operation to check the file sending results.
You can call this operation to query the file sending records within the last six weeks.
During a paged query, when you call the DescribeSendFileResults operation to retrieve the first page of results, set
MaxResultsto specify the maximum number of entries to return in the call. The return value ofNextTokenis a pagination token that can be used in the next call to retrieve a new page of results. When you call the DescribeSendFileResults operation to retrieve a new page of results, setNextTokento theNextTokenvalue returned in the previous call and setMaxResultsto specify the maximum number of entries to return in this call.
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 the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| ResourceGroupId |
string |
No |
The ID of the resource group. After you set this parameter, file sending results in the specified resource group are queried. |
rg-bp67acfmxazb4p**** |
| RegionId |
string |
Yes |
The region ID of the ECS instance. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| InvokeId |
string |
No |
The ID of the file sending task. |
f-hz0jdfwd9f**** |
| Name |
string |
No |
The name of the file whose sending records you want to query. |
test.txt |
| InstanceId |
string |
No |
The ID of the instance for which you want to query file sending records. |
i-hz0jdfwd9f**** |
| PageNumber |
integer |
No |
Note
This parameter will be removed in the future. We recommend that you use NextToken and MaxResults for a paged query. |
1 |
| PageSize |
integer |
No |
Note
This parameter will be removed in the future. We recommend that you use NextToken and MaxResults for a paged query. |
10 |
| MaxResults |
integer |
No |
The maximum number of entries per page. Valid values: 1 to 50. Default value: 10. |
10 |
| NextToken |
string |
No |
The pagination token that is used in the next request to retrieve a new page of results. You must specify the token that is obtained from the previous query as the value of NextToken. |
AAAAAdDWBF2 |
| InvocationStatus |
string |
No |
The overall sending status of the file. The overall sending status of the file varies based on the sending status of the file on all destination instances. Valid values:
|
Success |
| Tag |
array<object> |
No |
The tags of the file sending task. |
|
|
object |
No |
The tags list. |
||
| Key |
string |
No |
The key of tag N of the file sending task. Valid values of N: 1 to 20. The tag key cannot be an empty string. If a single tag is specified to query resources, up to 1,000 resources that have this tag added can be displayed in the response. If multiple tags are specified to query resources, up to 1,000 resources that have all the tags added can be displayed in the response. To query more than 1,000 resources that have specified tags, call the ListTagResources operation. The tag key can be up to 64 characters in length and cannot contain |
TestKey |
| Value |
string |
No |
The value of tag N of 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. |
1 |
| TotalCount |
integer |
The total number of file sending tasks queried. |
2 |
| NextToken |
string |
A pagination token. It can be used in the next request to retrieve a new page of results. |
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 sending status of the file varies based on the sending status of the file on all destination instances. Valid values:
|
Success |
| ContentType |
string |
The type of the file content. Valid values:
|
PlainText |
| TargetDir |
string |
The destination directory. |
/home/user |
| FileOwner |
string |
The owner of the file. |
test |
| Description |
string |
The description of the file. |
This is a test file. |
| VmCount |
integer |
The number of the destination instances. |
1 |
| FileMode |
string |
The permissions on the file. |
777 |
| FileGroup |
string |
The group of the file. |
test |
| InvokeId |
string |
The ID of the file sending task. |
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 a file in the destination directory is overwritten if the file has the same name as the sent file. |
false |
| InvokeInstances |
object |
||
| InvokeInstance |
array<object> |
The destination instances. |
|
|
object |
|||
| CreationTime |
string |
The creation time of the file sending task. |
2019-12-20T06:15:54Z |
| StartTime |
string |
The time when the file sending task started to be executed on the instance. |
2019-12-20T06:15:54Z |
| InvocationStatus |
string |
The status of the file sending task. Valid values:
|
Success |
| FinishTime |
string |
The time when the file sending task was completed. |
2019-12-20T06:15:54Z |
| UpdateTime |
string |
The time when the task status was last updated. |
2019-12-20T06:15:54Z |
| ErrorInfo |
string |
The error message returned when the file failed to be sent or the file sending task failed to be executed. Valid values:
|
the instance is not running when create task |
| ErrorCode |
string |
The error code returned when the file failed to be sent to the instance. Valid values:
|
InstanceNotExists |
| InstanceId |
string |
The ID of the instance. |
i-uf614fhehhz**** |
| Tags |
object |
||
| Tag |
array<object> |
The tags of the file sending task. |
|
|
object |
The tags 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.