// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; export class CreateLoadBalancerRequestLoadBalancerBillingConfig extends $dara.Model { /** * @remarks * The ID of the shared bandwidth package that is associated with the public-facing instance. * * @example * cbwp-bp1vevu8h3ieh**** */ bandwidthPackageId?: string; /** * @remarks * The billing method of the instance. * * Set the value to **PostPay** for pay-as-you-go. * * This parameter is required. * * @example * PostPay */ payType?: string; static names(): { [key: string]: string } { return { bandwidthPackageId: 'BandwidthPackageId', payType: 'PayType', }; } static types(): { [key: string]: any } { return { bandwidthPackageId: 'string', payType: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateLoadBalancerRequestModificationProtectionConfig extends $dara.Model { /** * @remarks * The reason for enabling modification protection. * * The reason must be 2 to 128 characters long. It must start with a letter or a Chinese character, and can contain digits, periods (.), underscores (_), and hyphens (-). * * > This parameter is effective only when **Status** is set to **ConsoleProtection**. * * @example * Managed Instance */ reason?: string; /** * @remarks * The modification protection status of the Application Load Balancer instance. Valid values: * * - **NonProtection**: Modification protection is disabled. If you specify a value for **Reason**, the value is cleared. * * - **ConsoleProtection**: Console-based modification protection is enabled. If you specify a value for **Reason**, the value takes effect. * * > If you set the value to **ConsoleProtection**, you cannot modify the instance in the Application Load Balancer console. However, you can still modify it by calling API operations. * * @example * ConsoleProtection */ status?: string; static names(): { [key: string]: string } { return { reason: 'Reason', status: 'Status', }; } static types(): { [key: string]: any } { return { reason: 'string', status: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateLoadBalancerRequestSecurityGroupIds extends $dara.Model { /** * @remarks * The ID of the security group. * * @example * sg-gw82chzr7ru23iwbn9mu */ securityGroupId?: string; static names(): { [key: string]: string } { return { securityGroupId: 'SecurityGroupId', }; } static types(): { [key: string]: any } { return { securityGroupId: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateLoadBalancerRequestTag extends $dara.Model { /** * @remarks * The tag key. The key can be up to 128 characters long, cannot start with aliyun or acs:, and cannot contain http\\:// or https\\://. * * @example * env */ key?: string; /** * @remarks * The tag value. The value can be up to 128 characters long, cannot start with aliyun or acs:, and cannot contain http\\:// or https\\://. * * @example * product */ 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 CreateLoadBalancerRequestZoneMappings extends $dara.Model { /** * @remarks * The ID of the Elastic IP address (EIP) to associate with the public-facing instance. * * @example * eip-bp1aedxso6u80u0qf**** */ allocationId?: string; /** * @remarks * The type of the Elastic IP address. Valid values: * * - **Common** (default): an Elastic IP address. * * - **Anycast**: an Anycast EIP. * * > For regions that support binding Anycast EIPs to an Application Load Balancer instance, see [Limitations](https://help.aliyun.com/document_detail/460727.html). * * @example * Common */ eipType?: string; /** * @remarks * The private IPv4 address. * * @example * 192.168.10.1 */ intranetAddress?: string; /** * @remarks * The ID of the subnet in the specified availability zone. Each availability zone can be mapped to only one subnet. * * This parameter is required. * * @example * vsw-sersdf**** */ vSwitchId?: string; /** * @remarks * The ID of the availability zone. * You can call the [DescribeZones](https://help.aliyun.com/document_detail/36064.html) operation to query for available zones. * * This parameter is required. * * @example * cn-hangzhou-a */ zoneId?: string; static names(): { [key: string]: string } { return { allocationId: 'AllocationId', eipType: 'EipType', intranetAddress: 'IntranetAddress', vSwitchId: 'VSwitchId', zoneId: 'ZoneId', }; } static types(): { [key: string]: any } { return { allocationId: 'string', eipType: 'string', intranetAddress: 'string', vSwitchId: 'string', zoneId: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateLoadBalancerRequest extends $dara.Model { /** * @remarks * The address allocation mode. Valid values: * * - **Fixed** (default): A static IP address is assigned to each availability zone. * * - **Dynamic**: An IP address is dynamically assigned to each availability zone. * * > Starting from 00:00:00 on February 25, 2025 (Beijing time)00:00:00 on February 25, 2025 (UTC+8), all instances created by calling this API will be [upgraded ALB instances](https://help.aliyun.com/document_detail/2864070.html) regardless of the mode you specify. IP modes are no longer distinguished, and the allocated IP addresses scale automatically. Existing ALB instances created before the upgrade are not affected. * * @example * Fixed */ addressAllocatedMode?: string; /** * @remarks * The protocol version. Valid values: * * - **IPv4**: IPv4. * * - **DualStack**: The instance supports both IPv4 and IPv6. * * @example * IPv4 */ addressIpVersion?: string; /** * @remarks * The address type of the Application Load Balancer. Valid values: * * - **Internet**: The load balancer is assigned a public IP address. Its domain name is resolved to the public IP address, allowing access from the public network. * * - **Intranet**: The load balancer is assigned a private IP address. Its domain name is resolved to the private IP address, allowing access only from the private network of the VPC where the load balancer is deployed. * * This parameter is required. * * @example * Internet */ addressType?: string; /** * @remarks * A client token to ensure the idempotency of the request. * * You can generate a unique value from your client for each request. The `ClientToken` parameter supports only ASCII characters. * * > If you omit this parameter, the system uses the **RequestId** of the request as the **ClientToken**. * * @example * 5A2CFF0E-5718-45B5-9D4D-70B3FF3898 */ clientToken?: string; /** * @remarks * Specifies whether to enable deletion protection. Valid values: * * - **true**: Enables deletion protection. * * - **false** (default): Disables deletion protection. * * @example * false */ deletionProtectionEnabled?: boolean; /** * @remarks * Specifies whether to perform a dry run. Valid values: * * - **true**: performs a dry run without creating the Application Load Balancer instance. The system checks for required parameters, the request format, and service limits. If the request fails the check, an error is returned. If the request passes the check, the system returns the `DryRunOperation` error code. * * - **false** (default): sends a normal request. If the request passes the check, the system returns an HTTP 2xx status code and performs the operation. * * @example * false */ dryRun?: boolean; /** * @remarks * The billing configuration of the Application Load Balancer instance. * * This parameter is required. */ loadBalancerBillingConfig?: CreateLoadBalancerRequestLoadBalancerBillingConfig; /** * @remarks * The edition of the Application Load Balancer. Different editions have different features and billing policies. Valid values: * * - **Basic**: Basic edition. * * - **Standard**: Standard edition. * * - **StandardWithWaf**: WAF-enabled edition. * * This parameter is required. * * @example * Standard */ loadBalancerEdition?: string; /** * @remarks * The name of the Application Load Balancer instance. * * The name must be 2 to 128 characters long. It must start with a letter, a Chinese character, or a digit, and can contain digits, periods (.), underscores (_), hyphens (-), and spaces. * * @example * alb1 */ loadBalancerName?: string; /** * @remarks * The modification protection settings. */ modificationProtectionConfig?: CreateLoadBalancerRequestModificationProtectionConfig; /** * @remarks * The ID of the resource group. * * @example * rg-atstuj3rtop**** */ resourceGroupId?: string; /** * @remarks * The IDs of the security groups to associate with the instance. */ securityGroupIds?: CreateLoadBalancerRequestSecurityGroupIds[]; /** * @remarks * The tags to add to the instance. */ tag?: CreateLoadBalancerRequestTag[]; /** * @remarks * The ID of the VPC for the Application Load Balancer instance. * * This parameter is required. * * @example * vpc-bp1b49rqrybk45nio**** */ vpcId?: string; /** * @remarks * The mappings between availability zones and subnets. You can specify up to 10 availability zones. If the region has two or more availability zones, you must specify at least two. * * This parameter is required. */ zoneMappings?: CreateLoadBalancerRequestZoneMappings[]; static names(): { [key: string]: string } { return { addressAllocatedMode: 'AddressAllocatedMode', addressIpVersion: 'AddressIpVersion', addressType: 'AddressType', clientToken: 'ClientToken', deletionProtectionEnabled: 'DeletionProtectionEnabled', dryRun: 'DryRun', loadBalancerBillingConfig: 'LoadBalancerBillingConfig', loadBalancerEdition: 'LoadBalancerEdition', loadBalancerName: 'LoadBalancerName', modificationProtectionConfig: 'ModificationProtectionConfig', resourceGroupId: 'ResourceGroupId', securityGroupIds: 'SecurityGroupIds', tag: 'Tag', vpcId: 'VpcId', zoneMappings: 'ZoneMappings', }; } static types(): { [key: string]: any } { return { addressAllocatedMode: 'string', addressIpVersion: 'string', addressType: 'string', clientToken: 'string', deletionProtectionEnabled: 'boolean', dryRun: 'boolean', loadBalancerBillingConfig: CreateLoadBalancerRequestLoadBalancerBillingConfig, loadBalancerEdition: 'string', loadBalancerName: 'string', modificationProtectionConfig: CreateLoadBalancerRequestModificationProtectionConfig, resourceGroupId: 'string', securityGroupIds: { 'type': 'array', 'itemType': CreateLoadBalancerRequestSecurityGroupIds }, tag: { 'type': 'array', 'itemType': CreateLoadBalancerRequestTag }, vpcId: 'string', zoneMappings: { 'type': 'array', 'itemType': CreateLoadBalancerRequestZoneMappings }, }; } validate() { if(this.loadBalancerBillingConfig && typeof (this.loadBalancerBillingConfig as any).validate === 'function') { (this.loadBalancerBillingConfig as any).validate(); } if(this.modificationProtectionConfig && typeof (this.modificationProtectionConfig as any).validate === 'function') { (this.modificationProtectionConfig as any).validate(); } if(Array.isArray(this.securityGroupIds)) { $dara.Model.validateArray(this.securityGroupIds); } if(Array.isArray(this.tag)) { $dara.Model.validateArray(this.tag); } if(Array.isArray(this.zoneMappings)) { $dara.Model.validateArray(this.zoneMappings); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } }