public class SendFileRequest
extends com.aliyun.tea.TeaModel
限定符和类型 | 类和说明 |
---|---|
static class |
SendFileRequest.SendFileRequestTag |
限定符和类型 | 字段和说明 |
---|---|
String |
content
The content of the file.
|
String |
contentType
The content type of the file.
|
String |
description
The description of the file.
|
String |
fileGroup
The group of the file.
|
String |
fileMode
The permissions on the file.
|
String |
fileOwner
The owner of the file.
|
List<String> |
instanceId
The IDs of instances to which to send the file.
|
String |
name
The name of the file.
|
Boolean |
overwrite
Specifies whether to overwrite a file in the destination directory if the file has the same name as the sent file.
|
String |
ownerAccount |
Long |
ownerId |
String |
regionId
The region ID of the instance to which to send the file.
|
String |
resourceGroupId
The ID of the resource group.
|
String |
resourceOwnerAccount |
Long |
resourceOwnerId |
List<SendFileRequest.SendFileRequestTag> |
tag
The tags to add to the file sending task.
|
String |
targetDir
The destination directory on the instance to which to send the file.
|
Long |
timeout
The timeout period for the file sending task.
|
构造器和说明 |
---|
SendFileRequest() |
@NameInMap(value="Content") public String content
The content of the file. The file must not exceed 32 KB in size after it is encoded in Base64.
ContentType
is set to PlainText
, the value of Content is in plaintext.ContentType
is set to Base64
, the value of Content is Base64-encoded.This parameter is required.
example:#!/bin/bash echo "Current User is :" echo $(ps | grep "$$" | awk \"{print $2}\") -------- oss://bucketName/objectName
@NameInMap(value="ContentType") public String contentType
The content type of the file. Valid values:
Default value: PlainText.
example:PlainText
@NameInMap(value="Description") public String description
The description of the file. The description can be up to 512 characters in length and can contain any characters.
example:This is a test file.
@NameInMap(value="FileGroup") public String fileGroup
The group of the file. This parameter takes effect only on Linux instances. Default value: root. The value can be up to 64 characters in length.
example:If you want to use a non-root user group, make sure that the user group exists in the instances.
test
@NameInMap(value="FileMode") public String fileMode
The permissions on the file. This parameter takes effect only on Linux instances. You can configure this parameter in the same way as you configure the chmod command.
Default value: 0644, which indicates that the owner of the file has the read and write permissions on the file and that the user group of the file and other users have the read-only permissions on the file.
example:0644
@NameInMap(value="FileOwner") public String fileOwner
The owner of the file. This parameter takes effect only on Linux instances. Default value: root. The value can be up to 64 characters in length.
example:If you want to use a non-root user, make sure that the user exists in the instances.
test
@NameInMap(value="InstanceId") public List<String> instanceId
The IDs of instances to which to send the file. You can specify up to 50 instance IDs in each request. Valid values of N: 1 to 50.
This parameter is required.
example:i-bp185dy2o3o6n****
@NameInMap(value="Name") public String name
The name of the file. The name can be up to 255 characters in length and can contain any characters.
This parameter is required.
example:file.txt
@NameInMap(value="Overwrite") public Boolean overwrite
Specifies whether to overwrite a file in the destination directory if the file has the same name as the sent file.
Default value: false.
example:true
@NameInMap(value="OwnerAccount") public String ownerAccount
@NameInMap(value="OwnerId") public Long ownerId
@NameInMap(value="RegionId") public String regionId
The region ID of the instance to which to send the file. You can call the DescribeRegions operation to query the most recent region list.
This parameter is required.
example:cn-hangzhou
@NameInMap(value="ResourceGroupId") public String resourceGroupId
The ID of the resource group. When you specify this parameter, take note of the following items:
rg-bp67acfmxazb4p****
@NameInMap(value="ResourceOwnerAccount") public String resourceOwnerAccount
@NameInMap(value="ResourceOwnerId") public Long resourceOwnerId
@NameInMap(value="Tag") public List<SendFileRequest.SendFileRequestTag> tag
The tags to add to the file sending task.
@NameInMap(value="TargetDir") public String targetDir
The destination directory on the instance to which to send the file. If the specified directory does not exist, the system creates the directory on the instance. The value cannot exceed 255 characters in length.
This parameter is required.
example:/home
@NameInMap(value="Timeout") public Long timeout
The timeout period for the file sending task. Unit: seconds.
Default value: 60.
example:60
public static SendFileRequest build(Map<String,?> map) throws Exception
Exception
public SendFileRequest setContent(String content)
public String getContent()
public SendFileRequest setContentType(String contentType)
public String getContentType()
public SendFileRequest setDescription(String description)
public String getDescription()
public SendFileRequest setFileGroup(String fileGroup)
public String getFileGroup()
public SendFileRequest setFileMode(String fileMode)
public String getFileMode()
public SendFileRequest setFileOwner(String fileOwner)
public String getFileOwner()
public SendFileRequest setInstanceId(List<String> instanceId)
public SendFileRequest setName(String name)
public String getName()
public SendFileRequest setOverwrite(Boolean overwrite)
public Boolean getOverwrite()
public SendFileRequest setOwnerAccount(String ownerAccount)
public String getOwnerAccount()
public SendFileRequest setOwnerId(Long ownerId)
public Long getOwnerId()
public SendFileRequest setRegionId(String regionId)
public String getRegionId()
public SendFileRequest setResourceGroupId(String resourceGroupId)
public String getResourceGroupId()
public SendFileRequest setResourceOwnerAccount(String resourceOwnerAccount)
public String getResourceOwnerAccount()
public SendFileRequest setResourceOwnerId(Long resourceOwnerId)
public Long getResourceOwnerId()
public SendFileRequest setTag(List<SendFileRequest.SendFileRequestTag> tag)
public List<SendFileRequest.SendFileRequestTag> getTag()
public SendFileRequest setTargetDir(String targetDir)
public String getTargetDir()
public SendFileRequest setTimeout(Long timeout)
public Long getTimeout()
Copyright © 2024. All rights reserved.