// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; export class CreateSnapshotRequestTag extends $dara.Model { /** * @remarks * The key of tag N to add to the snapshot. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 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 snapshot. 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 CreateSnapshotRequest extends $dara.Model { /** * @remarks * The category of the snapshot. Valid values: * * * Standard: standard snapshot * * Flash: local snapshot * * > This parameter is no longer used. By default, new standard snapshots of ESSDs are upgraded to instant access snapshots free of charge without the need for additional configurations. For more information, see [Use the instant access feature](https://help.aliyun.com/document_detail/193667.html). * * @example * Standard */ category?: string; /** * @remarks * The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but make sure that the token is unique among requests. The **ClientToken** value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](https://help.aliyun.com/document_detail/25693.html). * * @example * 123e4567-e89b-12d3-a456-426655440000 */ clientToken?: string; /** * @remarks * The description of the snapshot. The description must be 2 to 256 characters in length and cannot start with `http:// `or `https://`. * * By default, this parameter is left empty. * * @example * testDescription */ description?: string; /** * @remarks * The ID of the cloud disk. * * This parameter is required. * * @example * d-bp1s5fnvk4gn2tws0**** */ diskId?: string; /** * @remarks * Specifies whether to enable the instant access feature. Valid values: * * * true: enables the instant access feature. This feature can be enabled only for ESSDs. * * false: does not enable the instant access feature. If InstantAccess is set to false, a standard snapshot is created. * * Default value: false. * * > This parameter is no longer used. By default, new standard snapshots of ESSDs are upgraded to instant access snapshots free of charge without the need for additional configurations. For more information, see [Use the instant access feature](https://help.aliyun.com/document_detail/193667.html). * * @example * false */ instantAccess?: boolean; /** * @remarks * The validity period of the instant access feature. When the validity period ends, the feature is disabled and the instant access snapshot is automatically released. This parameter takes effect only when `InstantAccess` is set to true. Unit: days. Valid values: 1 to 65535. * * By default, the value of this parameter is the same as that of `RetentionDays`. * * > This parameter is no longer used. By default, new standard snapshots of ESSDs are upgraded to instant access snapshots free of charge without the need for additional configurations. For more information, see [Use the instant access feature](https://help.aliyun.com/document_detail/193667.html). * * @example * 1 */ instantAccessRetentionDays?: number; ownerAccount?: string; ownerId?: number; /** * @remarks * The snapshot type. Valid values: * * * Standard: standard snapshot * * Flash: local snapshot * * > This parameter will be removed in the future. We recommend that you use the `InstantAccess` parameter to ensure future compatibility. This parameter and the `InstantAccess` parameter cannot be specified at the same time. For more information, see the "Description" section of this topic. * * @example * rg-bp67acfmxazb4p**** */ resourceGroupId?: string; resourceOwnerAccount?: string; resourceOwnerId?: number; /** * @remarks * The retention period of the snapshot. Unit: days. Valid values: 1 to 65536. After the retention period ends, the snapshot is automatically released. * * This parameter is left empty by default, which indicates that the snapshot is not automatically released. * * @example * 30 */ retentionDays?: number; /** * @remarks * The name of the snapshot. The name must be 2 to 128 characters in length and start with a letter. The name can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). * * > The name cannot start with http:// or https://. The name cannot start with `auto` because the names of automatic snapshots start with auto. * * @example * testSnapshotName */ snapshotName?: string; /** * @remarks * > This parameter is unavailable for public use. * * @example * null */ storageLocationArn?: string; /** * @remarks * The tags to add to the snapshot. */ tag?: CreateSnapshotRequestTag[]; static names(): { [key: string]: string } { return { category: 'Category', clientToken: 'ClientToken', description: 'Description', diskId: 'DiskId', instantAccess: 'InstantAccess', instantAccessRetentionDays: 'InstantAccessRetentionDays', ownerAccount: 'OwnerAccount', ownerId: 'OwnerId', resourceGroupId: 'ResourceGroupId', resourceOwnerAccount: 'ResourceOwnerAccount', resourceOwnerId: 'ResourceOwnerId', retentionDays: 'RetentionDays', snapshotName: 'SnapshotName', storageLocationArn: 'StorageLocationArn', tag: 'Tag', }; } static types(): { [key: string]: any } { return { category: 'string', clientToken: 'string', description: 'string', diskId: 'string', instantAccess: 'boolean', instantAccessRetentionDays: 'number', ownerAccount: 'string', ownerId: 'number', resourceGroupId: 'string', resourceOwnerAccount: 'string', resourceOwnerId: 'number', retentionDays: 'number', snapshotName: 'string', storageLocationArn: 'string', tag: { 'type': 'array', 'itemType': CreateSnapshotRequestTag }, }; } validate() { if(Array.isArray(this.tag)) { $dara.Model.validateArray(this.tag); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } }