Queries the files sent by Cloud Assistant and their status.

Description

  • When you send a file, the file may fail to be sent to specified instances. You must 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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 Elastic Compute Service (ECS) instance. You can call the DescribeRegions operation to query the most recent region list.

InvokeId String No f-hz0jdfwd9f****

The ID of the execution.

Name String No test.txt

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

InstanceId String No i-hz0jdfwd9f****

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

PageNumber Long No 1

The number of the page to return.

Pages start from page 1.

Default value: 1.

PageSize Long No. 10

The number of entries to return on each page.

Maximum value: 50.

Default value: 10.

Response parameters

Parameter Type Example Description
PageSize Long 10

The number of entries returned per page.

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

PageNumber Long 1

The page number of the returned page.

TotalCount Long 2

The total number of file sending tasks.

Invocations Array of Invocation

Details about 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 status of the file. The overall sending status of the file depends on its sending status on all destination instances. Valid values:

  • Pending: The file is being verified or sent. If the sending status of the file on at least one instance is Pending, the overall sending status of the file is Pending.
  • Running: The file creation task is running on the instances. If the sending status of the file on at least one instance is Running, the overall sending status of the file is Running.
  • Success: If the sending status of the file on all the instances is Success, the overall sending status of the file is Success.
  • Failed: If the sending status of the file on all the instances is Failed, the overall sending status of the file is Failed. If the sending status of the file on one or more instances is one of the following values, the overall sending status of the file is Failed:
    • Invalid: The file is invalid.
    • Aborted: The file failed to be sent.
    • Failed: The file failed to be created.
    • Timeout: The file sending task timed out.
    • Error: An error occurred while the file is being sent.
  • PartialFailed: The file was sent to some of the specified instances and failed to be sent to the others. The overall sending status of the file is PartialFailed only when its sending status is Success on some instances and is Failed on the others.
ContentType String PlainText

The content type of the file. Valid values:

  • PlainText
  • Base64
TargetDir String /root

The destination directory.

FileOwner String root

The owner of the file.

Description String This is a test file.

The description of the file.

VmCount Integer 1

The number of instances to which you want to send the file.

FileMode String 777

The permissions on the file.

FileGroup String root

The user group of the file.

InvokeId String f-hz0jdfwd9f****

The ID of the execution.

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

Details about the destination instances.

InvokeInstance
CreationTime String 2019-12-20T06:15:54Z

The creation time of the file sending task.

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 status of the file sending task.

FinishTime String 2019-12-20T06:15:54Z

The time when the file sending task finished being executed.

UpdateTime String 2019-12-20T06:15:54Z

The time when the task status was updated.

ErrorInfo String the instance is not running when create task

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

  • Null: The file is sent to the instance.
  • the specified instance does not exists
  • the instance has released when create task
  • 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
  • Unexpected error during creating
  • File already exists
  • File content error
  • File name is invalid
  • File path is invalid
  • Owner not exists
  • Group not exists
  • Mode is invalid
ErrorCode String InstanceNotExists

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 was 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: The Cloud Assistant client is not running.
  • ClientNotResponse: The Cloud Assistant client is not responding.
  • ClientIsUpgrading: The Cloud Assistant client is being upgraded.
  • ClientNeedUpgrade: The Cloud Assistant client 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.
InstanceId String i-uf614fhehhz****

The ID of instance.

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 response

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>/root</TargetDir>
            <FileGroup>root</FileGroup>
            <FileOwner>root</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" : "/root",
      "FileGroup" : "root",
      "FileOwner" : "root",
      "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. The error message returned because the API operation cannot be called in the specified region. Check whether the RegionId parameter is valid.
403 InvalidParam.PageNumber The specified parameter is invalid. The error message returned because the specified PageNumber parameter is invalid.
403 InvalidParam.PageSize The specified parameter is invalid. The error message returned because the specified PageSize parameter is invalid.
403 Operation.Forbidden The operation is not permitted. The error message returned because the operation is not supported.
500 InternalError.Dispatch An error occurred when you dispatched the request. The error message returned because an error occurred when the request was being sent. Try again later.

For a list of error codes, visit the API Error Center.