All Products
Search
Document Center

Elastic Compute Service:DescribeSendFileResults

Last Updated:Apr 11, 2024

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 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.
  • 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 of NextToken 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, set NextToken to the NextToken value returned in the previous call and set MaxResults 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 use PageNumber to specify the number of the page to return. You can use only one of the preceding methods. If you specify MaxResults or NextToken, the PageSize and PageNumber request parameters do not take effect and the TotalCount response parameter is invalid.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the ECS instance. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ResourceGroupIdstringNo

The ID of the resource group. After you set this parameter, file sending results in the specified resource group are queried.

rg-bp67acfmxazb4p****
InvokeIdstringNo

The ID of the file sending task.

f-hz0jdfwd9f****
NamestringNo

The name of the file whose sending records you want to query.

test.txt
InstanceIdstringNo

The ID of the instance for which you want to query file sending records.

i-hz0jdfwd9f****
PageNumberlongNo

The page number.

Pages start from page 1.

Default value: 1.

1
PageSizelongNo

The number of entries per page.

Valid values: 1 to 50.

Default value: 10.

10
MaxResultsintegerNo

The maximum number of entries per page.

Valid values: 1 to 50.

Default value: 10.

10
NextTokenstringNo

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
InvocationStatusstringNo

The overall sending state of the file. The overall sending state of the file depends on its sending state on all the destination instances. Valid values:

  • Pending: The file is being verified or sent.
  • Invalid: The file is invalid.
  • Running: The file is being sent to the instances.
  • Aborted: The file failed to be sent to the instances. To send a file to an instance, make sure that the instance is in the Running state and the file can be sent within 1 minute.
  • Success: The file is sent.
  • Failed: The file failed to be created on the instances.
  • Error: An error occurs and interrupts the file sending task.
  • Timeout: The file sending task times out.
  • Cancelled: The file sending task is canceled.
  • Stopping: The file sending task is being stopped.
  • Terminated: The file sending task is terminated.
Success
Tagobject []No

The tags list.

KeystringNo

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 the ListTagResources operation.

The tag key can be up to 64 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

TestKey
ValuestringNo

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 http:// or https://.

TestValue

Response parameters

ParameterTypeDescriptionExample
object
PageSizelong

The number of entries per page.

10
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
PageNumberlong

The page number.

1
TotalCountlong

The total number of file sending tasks queried.

2
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results.

AAAAAdDWBF2
Invocationsobject []

The queried file sending records.

CreationTimestring

The time when the file sending task was created.

2019-12-20T06:15:54Z
InvocationStatusstring

The overall sending state of the file. The overall sending state of the file depends on its sending state on all the destination instances. Valid values:

  • Pending: The file is being verified or sent.
  • Invalid: The file is invalid.
  • Running: The file is being sent to the instances.
  • Aborted: The file failed to be sent to the instances. To send a file to an instance, make sure that the instance is in the Running state and the file can be sent within 1 minute.
  • Success: The file is sent.
  • Failed: The file failed to be created on the instances.
  • Error: An error occurs and interrupts the file sending task.
  • Timeout: The file sending task times out.
  • Cancelled: The file sending task is canceled.
  • Stopping: The file sending task is being stopped.
  • Terminated: The file sending task is terminated.
Success
ContentTypestring

The content type of the file. Valid values:

  • PlainText
  • Base64
PlainText
TargetDirstring

The destination directory.

/home/user
FileOwnerstring

The owner of the file.

test
Descriptionstring

The description of the file.

This is a test file.
VmCountinteger

The number of instances to which the file was sent.

1
FileModestring

The permissions on the file.

777
FileGroupstring

The user group of the file.

test
InvokeIdstring

The ID of the file sending task.

f-hz0jdfwd9f****
Namestring

The name of the file.

test.txt
Contentstring

The content of the file.

#!/bin/bash echo "Current User is :" echo $(ps | grep "$$" | awk '{print $2}')
Overwritestring

Indicates whether a file in the destination directory is overwritten if the file has the same name as the sent file.

false
InvokeInstancesobject []

The destination instances.

CreationTimestring

The time when the file sending task was created.

2019-12-20T06:15:54Z
StartTimestring

The time when the file sending task started to be executed on the instance.

2019-12-20T06:15:54Z
InvocationStatusstring

The state of the file sending task.

Success
FinishTimestring

The time when the file sending task was completed.

2019-12-20T06:15:54Z
UpdateTimestring

The time when the task status was updated.

2019-12-20T06:15:54Z
ErrorInfostring

The error message returned when the file failed to be sent or the file sending task failed to be executed. Valid values:

  • Null: The file is sent to the instance.
  • the specified instance does not exists
  • the specified instance has been released
  • the instance is not running when create task
  • the specified account does not exists
  • the aliyun service is not running on the instance
  • the aliyun service in the instance does not response
  • the aliyun service in the instance is upgrading now
  • the aliyun service in the instance need upgrade
  • the command delivery has been timeout
  • the file creation is failed due to unknown error
  • the authority of file is invalid
  • File content is empty
  • the content of file is invalid
  • File already exists
  • File name is invalid
  • File path is invalid
  • Owner not exists
  • Group not exists
  • Mode is invalid
the instance is not running when create task
ErrorCodestring

The error code returned when the file failed to be sent to the instance. Valid values:

  • Null: The file is sent to the instance.
  • InstanceNotExists: The instance does not exist or has been released.
  • InstanceReleased: The instance is released while the file is being sent.
  • InstanceNotRunning: The instance is not running when the file sending task is being created.
  • AccountNotExists: The specified account does not exist.
  • ClientNotRunning: Cloud Assistant Agent is not running.
  • ClientNotResponse: Cloud Assistant Agent does not respond.
  • ClientIsUpgrading: Cloud Assistant Agent is being upgraded.
  • ClientNeedUpgrade: Cloud Assistant Agent needs to be upgraded.
  • DeliveryTimeout: The file sending task timed out.
  • FileCreateFail: The file failed to be created.
  • FileAlreadyExists: A file with the same name already exists in the specified directory.
  • FileContentInvalid: The file content is invalid.
  • FileNameInvalid: The file name is invalid.
  • FilePathInvalid: The specified directory is invalid.
  • FileAuthorityInvalid: The specified permissions on the file are invalid.
  • UserGroupNotExists: The specified user group does not exist.
InstanceNotExists
InstanceIdstring

The ID of the instance

i-uf614fhehhz****
Tagsobject []

The tags of the file sending task.

TagKeystring

The tag key of the file sending task.

owner
TagValuestring

The tag value of the file sending task.

zhangsan

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400RegionId.ApiNotSupportedThe 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.
400NumberExceed.TagsThe Tags parameter number is exceed.The number of tags exceeds the maximum limit.
400MissingParameter.TagKeyYou must specify Tag.N.Key.The tag key is not specified.
400Duplicate.TagKeyThe Tag.N.Key contain duplicate key.The specified tag key already exists. Tag keys must be unique.
400InvalidTagKey.MalformedThe specified Tag.n.Key is not valid.The specified Tag.N.Key parameter is invalid.
400InvalidTagValue.MalformedThe specified Tag.n.Value is not valid.The specified tag value is invalid.
400InvalidParam.PageNumberThe specified parameter is invalid.The specified PageNumber parameter is invalid.
400InvalidParam.PageSizeThe specified parameter is invalid.The specified PageSize parameter is invalid.
400InvalidParameter.NextTokenThe specified parameter NextToken is not valid.The specified parameter NextToken is illegal.
400InvalidParameter.MaxResultsThe specified parameter MaxResults is not valid.The specified parameter MaxResults is illegal.
403Operation.ForbiddenThe operation is not permitted.The operation is not supported.
404InvalidRegionId.NotFoundThe RegionId provided does not exist in our records.The RegionId provided does not exist
500InternalError.DispatchAn 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 timeSummary of changesOperation
2023-12-21The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: MaxResults
    Added Input Parameters: NextToken
Output ParametersThe response structure of the API has changed.
2023-09-19The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: InvocationStatus
2023-05-12The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 403 change
    delete Error Codes: 404
    delete Error Codes: 500
2022-02-25The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
    Error Codes 404 change
    delete Error Codes: 400
    delete Error Codes: 500