// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; export class CreateImagePipelineRequestAdvancedOptions extends $dara.Model { /** * @remarks * Specifies whether to disable the feature that automatically appends a suffix to the destination image name. Valid values: * * - disable: Disables the feature. * * @example * disable */ imageNameSuffix?: string; /** * @remarks * Specifies whether to retain Cloud Assistant in the destination image. During the image building process, Cloud Assistant is automatically installed on the intermediate instance to run commands. You can select whether to retain Cloud Assistant after the process is complete. Valid values: * * - true: Retain Cloud Assistant. * * - false: Do not retain Cloud Assistant. * * Default value: false. * * > This setting does not affect the Cloud Assistant client that is already installed in your image. * * @example * true */ retainCloudAssistant?: boolean; static names(): { [key: string]: string } { return { imageNameSuffix: 'ImageNameSuffix', retainCloudAssistant: 'RetainCloudAssistant', }; } static types(): { [key: string]: any } { return { imageNameSuffix: 'string', retainCloudAssistant: 'boolean', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateImagePipelineRequestImageOptionsImageFeatures extends $dara.Model { /** * @remarks * Specifies whether the destination image supports NVMe. Valid values: * * - supported: Instances created from this image support the NVMe protocol. * * - unsupported: Instances created from this image do not support the NVMe protocol. * * - auto: The system automatically checks whether the NVMe driver is installed on your image. This check is performed before the build phase. If you install or uninstall the NVMe driver during the build, the result may be inaccurate. We recommend that you set this parameter to supported or unsupported based on the build content. * * @example * auto */ nvmeSupport?: string; static names(): { [key: string]: string } { return { nvmeSupport: 'NvmeSupport', }; } static types(): { [key: string]: any } { return { nvmeSupport: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateImagePipelineRequestImageOptionsImageTags extends $dara.Model { /** * @remarks * The key of the tag. The tag key must be 1 to 128 characters in length, cannot start with `aliyun` or `acs:`, and cannot contain `http://` or `https://`. * * @example * TestKey */ key?: string; /** * @remarks * The value of the tag. The tag value can be empty or up to 128 characters long. It cannot start with `acs:` 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 CreateImagePipelineRequestImageOptions extends $dara.Model { /** * @remarks * The description of the destination image. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. * * @example * This is description. */ description?: string; /** * @remarks * The name of the destination image family. The name must be 2 to 128 characters long and start with a letter or a Chinese character. It cannot start with `aliyun` or `acs:` or contain `http://` or `https://`. Allowed characters include letters, digits, Chinese characters, colons (:), underscores (_), and hyphens (-). * * @example * family */ imageFamily?: string; /** * @remarks * The feature attributes of the destination image. */ imageFeatures?: CreateImagePipelineRequestImageOptionsImageFeatures; /** * @remarks * The prefix of the destination image name. The prefix must be 2 to 64 characters in length. It must start with a letter or a Chinese character. It cannot start with `http://` or `https://`. It can contain Chinese characters, letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). * * The complete image name is automatically generated by concatenating the prefix and the build task ID (`ExecutionId`) in the `{ImageName}_{ExecutionId}` format. * * @example * testImageName */ imageName?: string; /** * @remarks * The tags of the destination image. */ imageTags?: CreateImagePipelineRequestImageOptionsImageTags[]; static names(): { [key: string]: string } { return { description: 'Description', imageFamily: 'ImageFamily', imageFeatures: 'ImageFeatures', imageName: 'ImageName', imageTags: 'ImageTags', }; } static types(): { [key: string]: any } { return { description: 'string', imageFamily: 'string', imageFeatures: CreateImagePipelineRequestImageOptionsImageFeatures, imageName: 'string', imageTags: { 'type': 'array', 'itemType': CreateImagePipelineRequestImageOptionsImageTags }, }; } validate() { if(this.imageFeatures && typeof (this.imageFeatures as any).validate === 'function') { (this.imageFeatures as any).validate(); } if(Array.isArray(this.imageTags)) { $dara.Model.validateArray(this.imageTags); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateImagePipelineRequestImportImageOptionsDiskDeviceMappings extends $dara.Model { /** * @remarks * The size of the disk to create from the image file, in GiB. For the system disk, this value must be greater than or equal to the size of the image file. * * Valid values: * * - When N is 1, the disk is the system disk. The size of the system disk can range from 1 GiB to 2,048 GiB. * * - When N is a value from 2 to 17, the disk is a data disk. The size of a data disk can range from 1 GiB to 2,048 GiB. * * After you upload the base image file to an OSS bucket, you can view the size of the image file in the bucket. * * @example * 40 */ diskImageSize?: number; /** * @remarks * The format of the image. Valid values: * * - RAW * * - VHD * * - QCOW2 * * Default value: If left empty, the system automatically detects the image format. * * @example * RAW */ format?: string; /** * @remarks * The OSS bucket that contains the image file. * * @example * ecsimageos */ OSSBucket?: string; /** * @remarks * The name (key) of the image file that is stored in the OSS bucket. * * @example * CentOS_5.4_32.raw */ OSSObject?: string; static names(): { [key: string]: string } { return { diskImageSize: 'DiskImageSize', format: 'Format', OSSBucket: 'OSSBucket', OSSObject: 'OSSObject', }; } static types(): { [key: string]: any } { return { diskImageSize: 'number', format: 'string', OSSBucket: 'string', OSSObject: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateImagePipelineRequestImportImageOptionsFeatures extends $dara.Model { imdsSupport?: string; /** * @remarks * Specifies whether the base image to be imported supports NVMe. Valid values: * * - supported: Instances created from this image support the NVMe protocol. * * - unsupported: Instances created from this image do not support the NVMe protocol. * * Default value: unsupported. * * @example * supported */ nvmeSupport?: string; static names(): { [key: string]: string } { return { imdsSupport: 'ImdsSupport', nvmeSupport: 'NvmeSupport', }; } static types(): { [key: string]: any } { return { imdsSupport: 'string', nvmeSupport: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateImagePipelineRequestImportImageOptionsImportImageTags extends $dara.Model { key?: string; 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 CreateImagePipelineRequestImportImageOptions extends $dara.Model { /** * @remarks * The architecture of the image to import. Valid values: * * - x86_64 * * - arm64 * * Default value: x86_64. * * @example * x86_64 */ architecture?: string; /** * @remarks * The boot mode of the image. Valid values: * * - BIOS: BIOS boot mode. * * - UEFI: UEFI boot mode. * * Default value: BIOS. If `Architecture` is set to `arm64`, the default value is UEFI and this parameter can be set only to UEFI. * * >Notice: * * To prevent startup failures, ensure the boot mode is supported by the image. * * @example * BIOS */ bootMode?: string; description?: string; /** * @remarks * The information about the disks of the custom image. * * - When N is 1, the disk is a system disk. * * - When N is a value from 2 to 17, the disk is a data disk. */ diskDeviceMappings?: CreateImagePipelineRequestImportImageOptionsDiskDeviceMappings[]; /** * @remarks * The image feature attributes. */ features?: CreateImagePipelineRequestImportImageOptionsFeatures; imageName?: string; importImageTags?: CreateImagePipelineRequestImportImageOptionsImportImageTags[]; /** * @remarks * The license type used to activate the operating system after the image is imported. Valid values: * * - Auto: Alibaba Cloud attempts to assign a license based on the detected operating system. If an official Alibaba Cloud license for the specified `Platform` is unavailable, the system defaults to BYOL. * * - Aliyun: A license from an official Alibaba Cloud channel is used based on the specified `Platform`. * * - BYOL: The license that comes with the base operating system is used. When you use the BYOL mode, you must make sure that your license key is supported in Alibaba Cloud. * * Default value: Auto. * * @example * Auto */ licenseType?: string; /** * @remarks * The type of the operating system. Valid values: * * - windows * * - linux * * Default value: linux. * * @example * linux */ OSType?: string; /** * @remarks * The operating system distribution. Valid values: * * - Aliyun * * - Anolis * * - CentOS * * - Ubuntu * * - CoreOS * * - SUSE * * - Debian * * - OpenSUSE * * - FreeBSD * * - RedHat * * - Kylin * * - UOS * * - Fedora * * - Fedora CoreOS * * - CentOS Stream * * - AlmaLinux * * - Rocky Linux * * - Gentoo * * - Customized Linux * * - Others Linux * * - Windows Server 2022 * * - Windows Server 2019 * * - Windows Server 2016 * * - Windows Server 2012 * * - Windows Server 2008 * * - Windows Server 2003 * * - Other Windows * * Default value: Others Linux if OSType is set to Linux, or Other Windows if OSType is set to Windows. * * @example * Aliyun */ platform?: string; /** * @remarks * > This parameter is in invitational preview. * * @example * false */ retainImportedImage?: boolean; retentionStrategy?: string; roleName?: string; static names(): { [key: string]: string } { return { architecture: 'Architecture', bootMode: 'BootMode', description: 'Description', diskDeviceMappings: 'DiskDeviceMappings', features: 'Features', imageName: 'ImageName', importImageTags: 'ImportImageTags', licenseType: 'LicenseType', OSType: 'OSType', platform: 'Platform', retainImportedImage: 'RetainImportedImage', retentionStrategy: 'RetentionStrategy', roleName: 'RoleName', }; } static types(): { [key: string]: any } { return { architecture: 'string', bootMode: 'string', description: 'string', diskDeviceMappings: { 'type': 'array', 'itemType': CreateImagePipelineRequestImportImageOptionsDiskDeviceMappings }, features: CreateImagePipelineRequestImportImageOptionsFeatures, imageName: 'string', importImageTags: { 'type': 'array', 'itemType': CreateImagePipelineRequestImportImageOptionsImportImageTags }, licenseType: 'string', OSType: 'string', platform: 'string', retainImportedImage: 'boolean', retentionStrategy: 'string', roleName: 'string', }; } validate() { if(Array.isArray(this.diskDeviceMappings)) { $dara.Model.validateArray(this.diskDeviceMappings); } if(this.features && typeof (this.features as any).validate === 'function') { (this.features as any).validate(); } if(Array.isArray(this.importImageTags)) { $dara.Model.validateArray(this.importImageTags); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateImagePipelineRequestTag extends $dara.Model { /** * @remarks * The key of tag N, where N is from 1 to 20. The tag key must be 1 to 128 characters in length. It cannot start with `aliyun` or `acs:` or contain `http://` or `https://`. * * @example * TestKey */ key?: string; /** * @remarks * The value of tag N, where N is from 1 to 20. The tag value can be empty or up to 128 characters long. It cannot start with `acs:` or 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 CreateImagePipelineRequest extends $dara.Model { /** * @remarks * The IDs of the Alibaba Cloud accounts to share the destination images with. You can specify up to 20 account IDs. * * @example * 1234567890 */ addAccount?: number[]; /** * @remarks * The advanced settings. */ advancedOptions?: CreateImagePipelineRequestAdvancedOptions; /** * @remarks * The base image. The value of this parameter varies based on the value of `BaseImageType`: * * - If `BaseImageType` is `IMAGE`, specify the ID of the base image. * * - If `BaseImageType` is `IMAGE_FAMILY`, specify the name of the base image family. * * - If `BaseImageType` is `OSS`, this parameter is not required. * * @example * m-bp67acfmxazb4p**** */ baseImage?: string; /** * @remarks * The type of the base image. Valid values: * * - IMAGE: An ECS image. * * - IMAGE_FAMILY: An image family. * * - OSS: An OSS object. * * This parameter is required. * * @example * IMAGE */ baseImageType?: string; /** * @remarks * The content of the image build template. The content can be up to 16 KB in size. For more information about the supported commands, see [Command reference for Image Builder](https://help.aliyun.com/document_detail/200206.html). * * @example * COMPONENT ic-bp12dvdzvr9k9***** * COMPONENT acs:ecs:cn-hangzhou:18689161186*****:imagecomponent/ComponentName/1.*.* */ buildContent?: string; /** * @remarks * A client-generated, globally unique token to ensure the idempotence of the request. 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 * Determines whether to release the intermediate instance when the image build fails. Valid values: * * - true: The instance is released. * * - false: The instance is not released. * * Default value: true. * * > If an intermediate instance cannot be started, it is not retained by default. * * @example * true */ deleteInstanceOnFailure?: boolean; /** * @remarks * The description of the image pipeline template. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. * * @example * This is description. */ description?: string; /** * @remarks * The name of the destination image family. * >Notice: This parameter is deprecated. Use `ImageOptions.ImageFamily` instead. * * @example * family * * @deprecated */ imageFamily?: string; /** * @remarks * The prefix of the destination image name. * >Notice: This parameter is deprecated. Use `ImageOptions.ImageName` instead. * * @example * testImageName * * @deprecated */ imageName?: string; /** * @remarks * The properties of the destination image. */ imageOptions?: CreateImagePipelineRequestImageOptions; /** * @remarks * The settings for importing an image. This parameter is required when `BaseImageType` is set to `OSS`. */ importImageOptions?: CreateImagePipelineRequestImportImageOptions; /** * @remarks * The instance type of the intermediate instance. You can call the [DescribeInstanceTypes](https://help.aliyun.com/document_detail/25620.html) operation to query instance types. * * If you do not specify this parameter, the system automatically selects an instance type with the minimum vCPUs and memory, subject to inventory. For example, `ecs.g6.large` is selected by default. If `ecs.g6.large` is out of stock, `ecs.g6.xlarge` is selected. * * @example * ecs.g6.large */ instanceType?: string; /** * @remarks * The outbound public bandwidth of the intermediate instance. Unit: Mbit/s. Valid values: 0 to 100. * * Default value: 0. * * @example * 0 */ internetMaxBandwidthOut?: number; /** * @remarks * The name of the image pipeline. It must be 2 to 128 characters long, start with a letter or a Chinese character, and cannot start with `http://` or `https://`. Allowed characters include letters, digits, Chinese characters, colons (:), underscores (_), periods (.), and hyphens (-). * * > If you do not specify this parameter, the value of `ImagePipelineId` is used as the name. * * @example * testImagePipeline */ name?: string; /** * @remarks * Specifies whether the destination image supports NVMe. * >Notice: This parameter is deprecated. Use `ImageOptions.ImageFeatures.NvmeSupport` instead. * * @example * auto * * @deprecated */ nvmeSupport?: string; ownerAccount?: string; ownerId?: number; /** * @remarks * The ID of the region. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) operation to query the latest list of Alibaba Cloud regions. * * This parameter is required. * * @example * cn-hangzhou */ regionId?: string; /** * @remarks * The image repair mode in the image template. * * Valid values: * * - Standard: The standard mode. * * The check items for Linux systems include the following: * * - GUESTOS.CloudInit * * - GUESTOS.Dhcp * * - GUESTOS.Virtio * * - GUESTOS.OnlineResizeFS * * - GUESTOS.Grub * * - GUESTOS.Fstab * * The check items for Windows systems include the following: * * - GUESTOS.Virtio * * - GUESTOS.Update * * - GUESTOS.Hotfix * * - GUESTOS.Server * * > The repair items may change as the check and repair capabilities are improved. For more information about each repair item, see [Image check overview](https://help.aliyun.com/document_detail/439819.html). * * @example * Standard */ repairMode?: string; /** * @remarks * The ID of the resource group. * * @example * rg-bp67acfmxazb4p**** */ resourceGroupId?: string; resourceOwnerAccount?: string; resourceOwnerId?: number; /** * @remarks * The size of the system disk of the intermediate instance. Unit: GiB. Valid values: 20 to 500. * * Default value: 40. * * @example * 40 */ systemDiskSize?: number; /** * @remarks * The tags to add to the image pipeline. */ tag?: CreateImagePipelineRequestTag[]; /** * @remarks * The content of the image test template. The content can be up to 16 KB in size. For more information about the supported commands, see [Command reference for Image Builder](https://help.aliyun.com/document_detail/200206.html). * * @example * COMPONENT ic-bp12dvdzvr9k9***** * COMPONENT acs:ecs:cn-hangzhou:18689161186*****:imagecomponent/ComponentName/1.*.* */ testContent?: string; /** * @remarks * The IDs of destination regions for image distribution. You can specify up to 20 region IDs. * * If you do not specify this parameter, the images are created only in the current region. * * @example * cn-hangzhou */ toRegionId?: string[]; /** * @remarks * The ID of the VSwitch in the VPC that is used to launch the intermediate instance. * * If you do not specify this parameter, a new VPC and VSwitch are created. Ensure that you have a sufficient quota of VPC resources. For more information, see [Usage limits](https://help.aliyun.com/document_detail/27750.html). * * @example * vsw-bp67acfmxazb4p**** */ vSwitchId?: string; static names(): { [key: string]: string } { return { addAccount: 'AddAccount', advancedOptions: 'AdvancedOptions', baseImage: 'BaseImage', baseImageType: 'BaseImageType', buildContent: 'BuildContent', clientToken: 'ClientToken', deleteInstanceOnFailure: 'DeleteInstanceOnFailure', description: 'Description', imageFamily: 'ImageFamily', imageName: 'ImageName', imageOptions: 'ImageOptions', importImageOptions: 'ImportImageOptions', instanceType: 'InstanceType', internetMaxBandwidthOut: 'InternetMaxBandwidthOut', name: 'Name', nvmeSupport: 'NvmeSupport', ownerAccount: 'OwnerAccount', ownerId: 'OwnerId', regionId: 'RegionId', repairMode: 'RepairMode', resourceGroupId: 'ResourceGroupId', resourceOwnerAccount: 'ResourceOwnerAccount', resourceOwnerId: 'ResourceOwnerId', systemDiskSize: 'SystemDiskSize', tag: 'Tag', testContent: 'TestContent', toRegionId: 'ToRegionId', vSwitchId: 'VSwitchId', }; } static types(): { [key: string]: any } { return { addAccount: { 'type': 'array', 'itemType': 'number' }, advancedOptions: CreateImagePipelineRequestAdvancedOptions, baseImage: 'string', baseImageType: 'string', buildContent: 'string', clientToken: 'string', deleteInstanceOnFailure: 'boolean', description: 'string', imageFamily: 'string', imageName: 'string', imageOptions: CreateImagePipelineRequestImageOptions, importImageOptions: CreateImagePipelineRequestImportImageOptions, instanceType: 'string', internetMaxBandwidthOut: 'number', name: 'string', nvmeSupport: 'string', ownerAccount: 'string', ownerId: 'number', regionId: 'string', repairMode: 'string', resourceGroupId: 'string', resourceOwnerAccount: 'string', resourceOwnerId: 'number', systemDiskSize: 'number', tag: { 'type': 'array', 'itemType': CreateImagePipelineRequestTag }, testContent: 'string', toRegionId: { 'type': 'array', 'itemType': 'string' }, vSwitchId: 'string', }; } validate() { if(Array.isArray(this.addAccount)) { $dara.Model.validateArray(this.addAccount); } if(this.advancedOptions && typeof (this.advancedOptions as any).validate === 'function') { (this.advancedOptions as any).validate(); } if(this.imageOptions && typeof (this.imageOptions as any).validate === 'function') { (this.imageOptions as any).validate(); } if(this.importImageOptions && typeof (this.importImageOptions as any).validate === 'function') { (this.importImageOptions as any).validate(); } if(Array.isArray(this.tag)) { $dara.Model.validateArray(this.tag); } if(Array.isArray(this.toRegionId)) { $dara.Model.validateArray(this.toRegionId); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } }