Queries the files sent by Cloud Assistant and their sending states.
Usage notes
- When you send a file, the file may fail to be sent to specified 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.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | DescribeSendFileResults | The operation that you want to perform. Set the value to DescribeSendFileResults. |
RegionId | String | Yes | cn-hangzhou | The region ID of the ECS instance. You can call DescribeRegions to query the most recent region list. |
ResourceGroupId | String | No | rg-bp67acfmxazb4p**** | The ID of the resource group. After you set this parameter, file sending results in the specified resource group are queried. |
InvokeId | String | No | f-hz0jdfwd9f**** | The ID of the file sending task. |
Name | String | No | test.txt | The name of the file whose sending records you want to query. |
InstanceId | String | No | i-hz0jdfwd9f**** | The ID of the instance for which you want to query file sending records. |
PageNumber | Long | No | 1 | The page number. Pages start from page 1. Default value: 1. |
PageSize | Long | No | 10 | The number of entries per page. Valid values: 1 to 50. Default value: 10. |
InvocationStatus | String | No | Success | The overall sending state of the file. The overall sending state of the file varies based on the file sending states on all the destination instances. Valid values:
|
Tag.N.Key | String | No | TestKey | 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 these tags added can be displayed in the response. To query more than 1,000 resources that have specified tags, call ListTagResources. The tag key can be up to 64 characters in length and cannot start with |
Tag.N.Value | String | No | TestValue | 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. It can be up to 128 characters in length and cannot contain |
Response parameters
Parameter |
Type |
Example |
Description |
PageSize | Long | 10 | The number of entries per page. |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E | The ID of the request. |
PageNumber | Long | 1 | The page number. |
TotalCount | Long | 2 | The total number of file sending tasks returned. |
Invocations | Array of Invocation | The file sending records. |
|
Invocation | |||
CreationTime | String | 2019-12-20T06:15:54Z | The time when the file sending task was created. |
InvocationStatus | String | Success | The overall sending state of the file. The overall sending state of the file varies based on the file sending states on all the destination instances. Valid values:
|
ContentType | String | PlainText | The type of the file content. Valid values:
|
TargetDir | String | /home/user | The destination directory. |
FileOwner | String | test | The owner of the file. |
Description | String | This is a test file. | The description of the file. |
VmCount | Integer | 1 | The number of the destination instances. |
FileMode | String | 777 | The permissions on the file. |
FileGroup | String | test | The user group of the file. |
InvokeId | String | f-hz0jdfwd9f**** | The ID of the file sending task. |
Name | String | test.txt | The name of the file. |
Content | String | #!/bin/bash echo "Current User is :" echo $(ps | grep "$$" | awk '{print $2}') | The content of the file. |
Overwrite | String | false | Indicates whether a file in the destination directory is overwritten if the file has the same name as the sent file. |
InvokeInstances | Array of InvokeInstance | The destination instances. |
|
InvokeInstance | |||
CreationTime | String | 2019-12-20T06:15:54Z | The time when the file sending task was created. |
StartTime | String | 2019-12-20T06:15:54Z | The time when the file sending task started to be executed on the instance. |
InvocationStatus | String | Success | The state of the file sending task. Valid values:
|
FinishTime | String | 2019-12-20T06:15:54Z | The time when the file sending task was completed. |
UpdateTime | String | 2019-12-20T06:15:54Z | The time when the file sending task state was updated. |
ErrorInfo | String | the instance is not running when create task | The error message returned when the file failed to be sent or the file sending task failed to be executed. Valid values:
|
ErrorCode | String | InstanceNotExists | The error code returned when the file failed to be sent to the instance. Valid values:
|
InstanceId | String | i-uf614fhehhz**** | The ID of the instance. |
Tags | Array of Tag | The tags of the file sending task. |
|
Tag | |||
TagKey | String | owner | The tag key of the file sending task. |
TagValue | String | zhangsan | The tag value of the file sending task. |
Examples
Sample requests
https://ecs.aliyuncs.com/?Action=DescribeSendFileResults
&RegionId=cn-hangzhou
&InvokeId=f-hz0vk9****
&Name=test.txt
&InstanceId=i-bp1hsglsw****
&PageNumber=1
&PageSize=10
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeSendFileResultsResponse>
<TotalCount>1</TotalCount>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
<Invocations>
<Invocation>
<FileMode>0644</FileMode>
<Overwrite>false</Overwrite>
<InvocationStatus>Success</InvocationStatus>
<Description>This is a test file.</Description>
<ContentType>PlainText</ContentType>
<VmCount>1</VmCount>
<TargetDir>/home/user</TargetDir>
<FileGroup>test</FileGroup>
<FileOwner>test</FileOwner>
<InvokeInstances>
<InvokeInstance>
<InvocationStatus>Success</InvocationStatus>
<FinishTime>2020-09-11T08:30:55Z</FinishTime>
<InstanceId>i-bp1hsglsw****</InstanceId>
<ErrorInfo/>
<CreationTime>2020-09-11T08:30:55Z</CreationTime>
<StartTime>2020-09-11T08:30:55Z</StartTime>
<UpdateTime>2020-09-11T08:30:55Z</UpdateTime>
<ErrorCode/>
</InvokeInstance>
</InvokeInstances>
<Name>test.txt</Name>
<Content>ZWNobyBoZWxsbw==</Content>
<CreationTime>2020-09-11T08:30:55Z</CreationTime>
<InvokeId>f-hz0vk9****</InvokeId>
</Invocation>
</Invocations>
</DescribeSendFileResultsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalCount" : 1,
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PageSize" : 10,
"PageNumber" : 1,
"Invocations" : {
"Invocation" : [ {
"FileMode" : "0644",
"Overwrite" : false,
"InvocationStatus" : "Success",
"Description" : "This is a test file.",
"ContentType" : "PlainText",
"VmCount" : 1,
"TargetDir" : "/home/user",
"FileGroup" : "test",
"FileOwner" : "test",
"InvokeInstances" : {
"InvokeInstance" : [ {
"InvocationStatus" : "Success",
"FinishTime" : "2020-09-11T08:30:55Z",
"InstanceId" : "i-bp1hsglsw****",
"ErrorInfo" : "",
"CreationTime" : "2020-09-11T08:30:55Z",
"StartTime" : "2020-09-11T08:30:55Z",
"UpdateTime" : "2020-09-11T08:30:55Z",
"ErrorCode" : ""
} ]
},
"Name" : "test.txt",
"Content" : "ZWNobyBoZWxsbw==",
"CreationTime" : "2020-09-11T08:30:55Z",
"InvokeId" : "f-hz0vk9****"
} ]
}
}
Error codes
HTTP status code |
Error code |
Error message |
Description |
400 | RegionId.ApiNotSupported | The api is not supported in this region. | This operation cannot be performed in the specified region. Check whether the region ID is valid. |
400 | MissingParameter.TagKey | You must specify Tag.N.Key. | Tag.N.Key is required. |
400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | The tag key already exists. Tag keys must be unique. |
400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | Invalid Tag.N.Key value. |
400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | Invalid Tag.N.Value value. |
400 | InvalidParam.PageNumber | The specified parameter is invalid. | Invalid PageNumber value. |
400 | InvalidParam.PageSize | The specified parameter is invalid. | Invalid PageSize value. |
403 | Operation.Forbidden | The operation is not permitted. | The operation is not supported. |
500 | InternalError.Dispatch | An error occurred when you dispatched the request. | An error occurred when the request was being sent. Try again later. |
For a list of error codes, see Service error codes.