// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; export class SendFileRequestTag extends $dara.Model { /** * @remarks * 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 the tags added can be displayed in the response. To query more than 1,000 resources that have specified tags, call the [ListTagResources](https://help.aliyun.com/document_detail/110425.html) operation. * * The tag key can be up to 64 characters in length and cannot contain `http://` or `https://`. The tag key cannot start with `acs:` or `aliyun`. * * @example * TestKey */ key?: string; /** * @remarks * The value of tag N to add to 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://`. * * @example * TestValue */ value?: string; static names(): { [key: string]: string } { return { key: 'Key', value: 'Value', }; } static types(): { [key: string]: any } { return { key: 'string', value: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class SendFileRequest extends $dara.Model { clientToken?: string; /** * @remarks * The content of the file. The file must not exceed 32 KB in size after it is encoded in Base64. * * * If `ContentType` is set to `PlainText`, the value of Content is in plaintext. * * If `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 */ content?: string; /** * @remarks * The content type of the file. Valid values: * * * PlainText: The file content is not encoded. * * Base64: The file content is encoded in Base64. * * Default value: PlainText. * * @example * PlainText */ contentType?: string; /** * @remarks * 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. */ description?: string; /** * @remarks * 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. * * > If you want to use a non-root user group, make sure that the user group exists in the instances. * * @example * test */ fileGroup?: string; /** * @remarks * 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 */ fileMode?: string; /** * @remarks * 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. * * > If you want to use a non-root user, make sure that the user exists in the instances. * * @example * test */ fileOwner?: string; /** * @remarks * 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**** */ instanceId?: string[]; /** * @remarks * 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 */ name?: string; /** * @remarks * Specifies whether to overwrite a file in the destination directory if the file has the same name as the sent file. * * * true * * false * * Default value: false. * * @example * true */ overwrite?: boolean; ownerAccount?: string; ownerId?: number; /** * @remarks * The region ID of the instance to which to send the file. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the most recent region list. * * This parameter is required. * * @example * cn-hangzhou */ regionId?: string; /** * @remarks * The ID of the resource group. When you specify this parameter, take note of the following items: * * * The instance specified by the InstanceId parameter must belong to the specified resource group. * * If you specify this parameter, you can call the [DescribeSendFileResults](https://help.aliyun.com/document_detail/184117.html) operation to query file sending results in the specified resource group. * * @example * rg-bp67acfmxazb4p**** */ resourceGroupId?: string; resourceOwnerAccount?: string; resourceOwnerId?: number; /** * @remarks * The tags to add to the file sending task. */ tag?: SendFileRequestTag[]; /** * @remarks * 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 */ targetDir?: string; /** * @remarks * The timeout period for the file sending task. Unit: seconds. * * * A timeout error occurs when a file cannot be sent because the process slows down or because a specific module or Cloud Assistant Agent does not exist. * * If the specified timeout period is less than 10 seconds, the system sets the timeout period to 10 seconds to ensure that the file can be sent to the instances. * * Default value: 60. * * @example * 60 */ timeout?: number; static names(): { [key: string]: string } { return { clientToken: 'ClientToken', content: 'Content', contentType: 'ContentType', description: 'Description', fileGroup: 'FileGroup', fileMode: 'FileMode', fileOwner: 'FileOwner', instanceId: 'InstanceId', name: 'Name', overwrite: 'Overwrite', ownerAccount: 'OwnerAccount', ownerId: 'OwnerId', regionId: 'RegionId', resourceGroupId: 'ResourceGroupId', resourceOwnerAccount: 'ResourceOwnerAccount', resourceOwnerId: 'ResourceOwnerId', tag: 'Tag', targetDir: 'TargetDir', timeout: 'Timeout', }; } static types(): { [key: string]: any } { return { clientToken: 'string', content: 'string', contentType: 'string', description: 'string', fileGroup: 'string', fileMode: 'string', fileOwner: 'string', instanceId: { 'type': 'array', 'itemType': 'string' }, name: 'string', overwrite: 'boolean', ownerAccount: 'string', ownerId: 'number', regionId: 'string', resourceGroupId: 'string', resourceOwnerAccount: 'string', resourceOwnerId: 'number', tag: { 'type': 'array', 'itemType': SendFileRequestTag }, targetDir: 'string', timeout: 'number', }; } validate() { if(Array.isArray(this.instanceId)) { $dara.Model.validateArray(this.instanceId); } if(Array.isArray(this.tag)) { $dara.Model.validateArray(this.tag); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } }