All Products
Search
Document Center

:DescribeSendFileResults

更新時間:Nov 15, 2023

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

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 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:

  • Pending: The file is being verified or sent. If the sending state of the file on one or more instances is Pending, the overall sending state of the file is Pending.
  • Running: The file is being sent. If the sending state of the file on one or more instances is Running, the overall sending state of the file is Running.
  • Success: The file is sent. Success: If the sending state of the file on all the instances is Success, the overall sending state of the file is Success.
  • Failed: The file fails to be sent. Failed: If the sending state of the file on all the instances is Failed, the overall sending state of the file is Failed.
  • PartialFailed: The file is sent to some instances and fails to be sent to other instances. If the sending state of the file on some instances is Success and the state on other instances is Failed, the overall sending state of the file is PartialFailed.
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 acs: or aliyun. It cannot contain http:// or https://.

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

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:

  • Pending: The file was being verified or sent. If the sending state of the file on one or more instances is Pending, the overall sending state of the file is Pending.
  • Running: The file was being sent. If the sending state of the file on one or more instances is Running, the overall sending state of the file is Running.
  • Success: The file was sent. If the sending state of the file on all the instances is Success, the overall sending state of the file is Success.
  • Failed: The file failed to be sent. If the sending state of the file on all the instances is Failed, the overall sending state of the file is Failed. If the sending state of the file on one or more instances is one of the following values, the overall sending state of the file is Failed:
    • Invalid: The file is invalid.
    • Aborted: The file failed to sent to the instances.
    • Failed: The file failed to be created on the instances.
    • Timeout: The file sending task timed out.
    • Error: An error occurred and interrupted the file sending task.
  • PartialFailed: The file was sent to some instances and failed to be sent to other instances. If the sending state of the file on some instances is Success and the state on other instances is Failed, the overall sending state of the file is PartialFailed.
ContentType String PlainText

The type of the file content. Valid values:

  • PlainText: The file content is plaintext.
  • Base64: The file content is Base64-encoded.
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:

  • Pending: The file was being verified or sent.
  • Invalid: The file was invalid.
  • Running: The file was being sent.
  • Aborted: The file failed to be sent.
  • Success: The file was sent.
  • Failed: The file failed to be created on the instance.
  • Error: An error occurred and interrupted the file sending task.
  • Timeout: The file sending task timed out.
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:

  • 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 exist
  • 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
ErrorCode String InstanceNotExists

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

  • Null: The file was sent to the instance.
  • InstanceNotExists: The instance did not exist or was released.
  • InstanceReleased: The instance was released while the file was being sent.
  • InstanceNotRunning: The instance was not running when the file sending task was being created.
  • AccountNotExists: The specified account did not exist.
  • ClientNotRunning: Cloud Assistant Agent was not running.
  • ClientNotResponse: Cloud Assistant Agent did not respond.
  • ClientIsUpgrading: Cloud Assistant Agent was being upgraded.
  • ClientNeedUpgrade: Cloud Assistant Agent needed 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 existed in the specified directory.
  • FileContentInvalid: The file content was invalid.
  • FileNameInvalid: The file name was invalid.
  • FilePathInvalid: The specified directory was invalid.
  • FileAuthorityInvalid: The specified permissions on the file were invalid.
  • UserGroupNotExists: The specified user group did not exist.
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.