SendFile

Updated at:

Delivers a remote file to one or more Lingjun nodes.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

eflo:SendFile

get

*Node

acs:eflo:{#regionId}:{#accountId}:node/{#NodeId}

None None

Request parameters

Parameter

Type

Required

Description

Example

Name

string

Yes

The file name. The name supports all character sets and can be up to 255 characters in length.

file.txt

Description

string

No

The description. The description supports all character sets and can be up to 512 characters in length.

This is a test file.

TargetDir

string

Yes

The target folder on the Lingjun nodes to which the file is delivered. If the folder does not exist, automatic creation is performed.

/home

ContentType

string

No

The content type of the file. Valid values:

  • PlainText: plain text.

  • Base64: Base64-encoded text. Default value: PlainText.

PlainText

Content

string

Yes

The file content. The size of the file content cannot exceed 32 KB after Base64 encoding.

  • If the ContentType parameter is set to PlainText, this field contains plain text.

  • If the ContentType parameter is set to Base64, this field contains Base64-encoded text.

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

FileMode

string

No

The file permissions. This parameter takes effect only on Linux instances. The setting method is the same as that of the chmod command. Default value: 0644, which indicates that the owner has read and write permissions, and the group and others have read-only permissions.

0644

FileOwner

string

No

The file owner. This parameter takes effect only on Linux instances. Default value: root.

root

FileGroup

string

No

The file group. This parameter takes effect only on Linux instances. Default value: root. The value can be up to 64 characters in length. Note When you use a different group, make sure that the group exists on the instance.

test

NodeIdList

array

Yes

The list of node IDs. The node IDs must belong to created Lingjun nodes. You can call the ListClusterNodes or ListFreeNodes operation to query the node IDs.

string

No

The Lingjun node ID.

e01-cn-zvp2tgykr08

Overwrite

boolean

No

Specifies whether to overwrite the file if a file with the same name already exists in the target directory. Valid values:

  • true: Overwrites the file.

  • false: Does not overwrite the file. Default value: false.

True

Timeout

integer

No

The timeout period for delivering the file. Unit: seconds.

  • A timeout occurs if the file cannot be delivered due to process issues, missing modules, or a missing Cloud Assistant Agent.

  • If the specified timeout period is less than 10 seconds, the system automatically sets it to 10 seconds to ensure successful delivery. Default value: 60.

600

Response elements

Element

Type

Description

Example

object

RequestId

string

Id of the request

3C683243-7915-57FB-9570-A2932C1C0F78

InvokeId

string

The command execution ID.

t-hz03la52z1zkvls

Examples

Success response

JSON format

{
  "RequestId": "3C683243-7915-57FB-9570-A2932C1C0F78",
  "InvokeId": "t-hz03la52z1zkvls"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.