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.
-
You can use one of the following methods to check the responses:
- Method 1: During a paged query, when you call the DescribeSendFileResults operation to retrieve the first page of results, set
MaxResults
to specify the maximum number of entries to return in the call. The return value ofNextToken
is a pagination token, which can be used in the next request to retrieve a new page of results. When you call the DescribeSendFileResults operation to retrieve a new page of results, setNextToken
to theNextToken
value returned in the previous call and setMaxResults
to specify the maximum number of entries to return in this call. - Method 2: Use
PageSize
to specify the number of entries to return on each page and then usePageNumber
to specify the number of the page to return. You can use only one of the preceding methods. If you specifyMaxResults
orNextToken
, thePageSize
andPageNumber
request parameters do not take effect and theTotalCount
response parameter is invalid.
- Method 1: During a paged query, when you call the DescribeSendFileResults operation to retrieve the first page of results, set
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ecs:DescribeSendFileResults | get | *Instance acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId} |
| 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**** |
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 | long | No | The page number. Pages start from page 1. Default value: 1. | 1 |
PageSize | long | No | The number of entries per page. Valid values: 1 to 50. Default value: 10. | 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 parameters
Examples
Sample success responses
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. | The specified PageNumber parameter is invalid. |
400 | InvalidParam.PageSize | The specified parameter is invalid. | The specified PageSize 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. |
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. | The RegionId provided does not exist |
500 | InternalError.Dispatch | An error occurred when you dispatched the request. | An error occurred while the request is being sent. Try again later. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-12-05 | API Description Update. The Error code has changed | View Change Details |
2023-12-21 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2023-09-19 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-05-12 | The Error code has changed | View Change Details |
2022-02-25 | The Error code has changed | View Change Details |