// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; export class ListRulesResponseBodyRulesRuleActionsCorsConfig extends $dara.Model { /** * @remarks * Specifies whether the browser can send credentials. Valid values: * * - **on** * * - **off** * * @example * on */ allowCredentials?: string; /** * @remarks * The allowed headers for cross-origin requests. */ allowHeaders?: string[]; /** * @remarks * The allowed HTTP methods for cross-origin requests. */ allowMethods?: string[]; /** * @remarks * The allowed origins. */ allowOrigin?: string[]; /** * @remarks * The headers that can be exposed to the browser. */ exposeHeaders?: string[]; /** * @remarks * The maximum cache time of preflight requests in the browser. Unit: seconds. * * Valid values: **-1** to **172800**. * * @example * 1000 */ maxAge?: number; static names(): { [key: string]: string } { return { allowCredentials: 'AllowCredentials', allowHeaders: 'AllowHeaders', allowMethods: 'AllowMethods', allowOrigin: 'AllowOrigin', exposeHeaders: 'ExposeHeaders', maxAge: 'MaxAge', }; } static types(): { [key: string]: any } { return { allowCredentials: 'string', allowHeaders: { 'type': 'array', 'itemType': 'string' }, allowMethods: { 'type': 'array', 'itemType': 'string' }, allowOrigin: { 'type': 'array', 'itemType': 'string' }, exposeHeaders: { 'type': 'array', 'itemType': 'string' }, maxAge: 'number', }; } validate() { if(Array.isArray(this.allowHeaders)) { $dara.Model.validateArray(this.allowHeaders); } if(Array.isArray(this.allowMethods)) { $dara.Model.validateArray(this.allowMethods); } if(Array.isArray(this.allowOrigin)) { $dara.Model.validateArray(this.allowOrigin); } if(Array.isArray(this.exposeHeaders)) { $dara.Model.validateArray(this.exposeHeaders); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsFixedResponseConfig extends $dara.Model { /** * @remarks * The fixed response. The response can be up to 1 KB in length and can contain only ASCII characters. * * @example * dssacav */ content?: string; /** * @remarks * The format of the fixed response. * * Valid values: **text/plain**, **text/css**, **text/html**, **application/javascript**, and **application/json**. * * @example * text/plain */ contentType?: string; /** * @remarks * The HTTP status code of the response. Only **HTTP_2xx**, **HTTP_4xx**, and **HTTP_5xx** are supported. **x** is a digit. * * @example * HTTP_2xx */ httpCode?: string; static names(): { [key: string]: string } { return { content: 'Content', contentType: 'ContentType', httpCode: 'HttpCode', }; } static types(): { [key: string]: any } { return { content: 'string', contentType: 'string', httpCode: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsForwardGroupConfigServerGroupStickySession extends $dara.Model { /** * @remarks * Specifies whether to enable session persistence among server groups. This parameter is available when multiple server groups are specified in \\`ServerGroupTuples\\`. */ enabled?: boolean; /** * @remarks * The timeout period for session persistence. This parameter is available when \\`Enabled\\` is set to \\`true\\`. * * @example * 100 */ timeout?: number; static names(): { [key: string]: string } { return { enabled: 'Enabled', timeout: 'Timeout', }; } static types(): { [key: string]: any } { return { enabled: 'boolean', timeout: 'number', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsForwardGroupConfigServerGroupTuples extends $dara.Model { /** * @remarks * The ID of the destination server group. * * @example * sgp-atstuj3rtoptyui**** */ serverGroupId?: string; /** * @remarks * The weight. Valid values: **0** to **100**. * * @example * 2 */ weight?: number; static names(): { [key: string]: string } { return { serverGroupId: 'ServerGroupId', weight: 'Weight', }; } static types(): { [key: string]: any } { return { serverGroupId: 'string', weight: 'number', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsForwardGroupConfig extends $dara.Model { /** * @remarks * The session persistence settings for the server groups. */ serverGroupStickySession?: ListRulesResponseBodyRulesRuleActionsForwardGroupConfigServerGroupStickySession; /** * @remarks * The destination server groups. */ serverGroupTuples?: ListRulesResponseBodyRulesRuleActionsForwardGroupConfigServerGroupTuples[]; static names(): { [key: string]: string } { return { serverGroupStickySession: 'ServerGroupStickySession', serverGroupTuples: 'ServerGroupTuples', }; } static types(): { [key: string]: any } { return { serverGroupStickySession: ListRulesResponseBodyRulesRuleActionsForwardGroupConfigServerGroupStickySession, serverGroupTuples: { 'type': 'array', 'itemType': ListRulesResponseBodyRulesRuleActionsForwardGroupConfigServerGroupTuples }, }; } validate() { if(this.serverGroupStickySession && typeof (this.serverGroupStickySession as any).validate === 'function') { (this.serverGroupStickySession as any).validate(); } if(Array.isArray(this.serverGroupTuples)) { $dara.Model.validateArray(this.serverGroupTuples); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsInsertHeaderConfig extends $dara.Model { /** * @remarks * The key of the header to be inserted. The key must be 1 to 40 characters in length. It can contain letters, digits, underscores (_), and hyphens (-). The header key in `InsertHeader` cannot be the same as the key of a header that has been inserted. * * > You cannot set the key to **Cookie** or **Host**. * * @example * key */ key?: string; /** * @remarks * The value of the header to be inserted. * * - **ValueType** is set to **SystemDefined**, you can set the value to: * * - **ClientSrcPort**: the client port. * * - **ClientSrcIp**: the client IP address. * * - **Protocol**: the protocol of the client request (HTTP or HTTPS). * * - **SLBId**: the ID of the Application Load Balancer instance. * * - **SLBPort**: the listening port of the Application Load Balancer instance. * * - If **ValueType** is set to **UserDefined**: you can specify a custom header value. The value must be 1 to 128 characters in length. It can contain printable characters with ASCII values from `ch >= 32 && ch < 127`. It can also contain wildcard characters, including asterisks (\\*) and question marks (?). The value cannot start or end with a space. * * - If **ValueType** is set to **ReferenceHeader**: you can reference a field in the request header. The value must be 1 to 128 characters in length. It can contain lowercase letters, digits, hyphens (-), and underscores (_). * * @example * ClientSrcPort */ value?: string; /** * @remarks * The type of the header value. Valid values: * * - **UserDefined**: a user-defined value. * * - **ReferenceHeader**: a value that is referenced from a field in the request header. * * - **SystemDefined**: a system-defined value. * * @example * SystemDefined */ valueType?: string; static names(): { [key: string]: string } { return { key: 'Key', value: 'Value', valueType: 'ValueType', }; } static types(): { [key: string]: any } { return { key: 'string', value: 'string', valueType: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsRedirectConfig extends $dara.Model { /** * @remarks * The destination host to which requests are redirected. Valid values: * * - **${host}** (default): If you set the value to ${host}, you cannot add other characters to the value. * * - A value that meets the following requirements: * * - The host must be 3 to 128 characters in length. It can contain lowercase letters, digits, hyphens (-), periods (.), asterisks (\\*), and question marks (?). * * - The host must contain at least one period (.). A period (.) cannot be the first or last character. * * - The rightmost domain label can contain only letters and wildcard characters. It cannot contain digits or hyphens (-). * * - The domain labels cannot start or end with a hyphen (-). * * - You can use asterisks (\\*) and question marks (?) anywhere in a domain label. * * @example * www.example.com */ host?: string; /** * @remarks * The redirection method. Valid values: **301**, **302**, **303**, **307**, and **308**. * * @example * 301 */ httpCode?: string; /** * @remarks * The destination path to which requests are redirected. Valid values: * * - **${path}** (default): You can reference **${host}**, **${protocol}**, and **${port}**. Each variable can be used at most once. You can use these variables together or combine them with a string. * * - A value that meets the following requirements: * * - The value must be 1 to 128 characters in length. * * - It must start with a forward slash (/). It can contain letters, digits, and the following special characters: `$-_.+/&~@:`. It cannot contain the following special characters: `“%#;!()[]^,” `. It can contain asterisks (\\*) and question marks (?). * * @example * /test */ path?: string; /** * @remarks * The destination port to which requests are redirected. Valid values: * * - **${port}** (default): If you set the value to ${port}, you cannot add other characters to the value. * * - 1 to **63335**. * * @example * 10 */ port?: string; /** * @remarks * The destination protocol to which requests are redirected. Valid values: * * - **${protocol}** (default): If you set the value to ${protocol}, you cannot add other characters to the value. * * - **HTTP** or **HTTPS**. * * > HTTPS listeners support only HTTPS. * * @example * HTTP */ protocol?: string; /** * @remarks * The query string of the destination to which requests are redirected. The query string must be 1 to 128 characters in length. It can contain lowercase letters and printable characters. It cannot contain `#[]{}\\|<>&`. * * @example * quert */ query?: string; static names(): { [key: string]: string } { return { host: 'Host', httpCode: 'HttpCode', path: 'Path', port: 'Port', protocol: 'Protocol', query: 'Query', }; } static types(): { [key: string]: any } { return { host: 'string', httpCode: 'string', path: 'string', port: 'string', protocol: 'string', query: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsRemoveHeaderConfig extends $dara.Model { /** * @remarks * The key of the header to be removed. The key must be 1 to 40 characters in length. It can contain letters, digits, underscores (_), and hyphens (-). The header key in RemoveHeader cannot be the same as the key of a header that has been removed. * * - If Direction is set to Request, you cannot remove the following headers (case-insensitive): `slb-id`, `slb-ip`, `x-forwarded-for`, `x-forwarded-proto`, `x-forwarded-eip`, `x-forwarded-port`, `x-forwarded-client-srcport`, `connection`, `upgrade`, `content-length`, `transfer-encoding`, `keep-alive`, `te`, `host`, `cookie`, `remoteip`, and `authority`. * * - If Direction is set to Response, you cannot remove the following headers (case-insensitive): `connection`, `upgrade`, `content-length`, and `transfer-encoding`. * * @example * key */ key?: string; static names(): { [key: string]: string } { return { key: 'Key', }; } static types(): { [key: string]: any } { return { key: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsRewriteConfig extends $dara.Model { /** * @remarks * The destination host to which requests are redirected. Valid values: * * - **${host}** (default): If you set the value to ${host}, you cannot add other characters to the value. * * - A value that meets the following requirements: * * - The host must be 3 to 128 characters in length. It can contain lowercase letters, digits, hyphens (-), periods (.), asterisks (\\*), and question marks (?). * * - The host must contain at least one period (.). A period (.) cannot be the first or last character. * * - The rightmost domain label can contain only letters and wildcard characters. It cannot contain digits or hyphens (-). * * - The domain labels cannot start or end with a hyphen (-). * * - You can use asterisks (\\*) and question marks (?) anywhere in a domain label. * * @example * www.example.com */ host?: string; /** * @remarks * The destination path to which requests are redirected. The path must be 1 to 128 characters in length. It must start with a forward slash (/). It can contain letters, digits, asterisks (\\*), question marks (?), and the following special characters: `$-_.+/&~@:`. It cannot contain `“%#;!()[]^,” `. * * @example * /tsdf */ path?: string; /** * @remarks * The query string of the destination to which requests are redirected. The query string must be 1 to 128 characters in length. It can contain lowercase letters and printable characters. It cannot contain `#[]{}\\|<>&`. * * @example * quedsa */ query?: string; static names(): { [key: string]: string } { return { host: 'Host', path: 'Path', query: 'Query', }; } static types(): { [key: string]: any } { return { host: 'string', path: 'string', query: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsTrafficLimitConfig extends $dara.Model { /** * @remarks * The QPS of a single IP address. Valid values: 1 to **100000**. * * > If you set both QPS and **PerIpQps**, the value of **PerIpQps** must be smaller than the value of **QPS**. * * @example * 80 */ perIpQps?: number; /** * @remarks * The queries per second (QPS). Valid values: **1** to **100000**. * * @example * 4 */ QPS?: number; static names(): { [key: string]: string } { return { perIpQps: 'PerIpQps', QPS: 'QPS', }; } static types(): { [key: string]: any } { return { perIpQps: 'number', QPS: 'number', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsTrafficMirrorConfigMirrorGroupConfigServerGroupTuples extends $dara.Model { /** * @remarks * The server group ID. * * @example * sgp-00mkgijak0w4qgz9**** */ serverGroupId?: string; /** * @remarks * The weight. Valid values: **0** to **100**. * * @example * 2 */ weight?: number; static names(): { [key: string]: string } { return { serverGroupId: 'ServerGroupId', weight: 'Weight', }; } static types(): { [key: string]: any } { return { serverGroupId: 'string', weight: 'number', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsTrafficMirrorConfigMirrorGroupConfig extends $dara.Model { /** * @remarks * The server groups to which traffic is mirrored. */ serverGroupTuples?: ListRulesResponseBodyRulesRuleActionsTrafficMirrorConfigMirrorGroupConfigServerGroupTuples[]; static names(): { [key: string]: string } { return { serverGroupTuples: 'ServerGroupTuples', }; } static types(): { [key: string]: any } { return { serverGroupTuples: { 'type': 'array', 'itemType': ListRulesResponseBodyRulesRuleActionsTrafficMirrorConfigMirrorGroupConfigServerGroupTuples }, }; } validate() { if(Array.isArray(this.serverGroupTuples)) { $dara.Model.validateArray(this.serverGroupTuples); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActionsTrafficMirrorConfig extends $dara.Model { /** * @remarks * The server group to which traffic is mirrored. */ mirrorGroupConfig?: ListRulesResponseBodyRulesRuleActionsTrafficMirrorConfigMirrorGroupConfig; /** * @remarks * The destination of traffic mirroring. The value can be \\`ForwardGroupMirror\\`. * * @example * ForwardGroupMirror */ targetType?: string; static names(): { [key: string]: string } { return { mirrorGroupConfig: 'MirrorGroupConfig', targetType: 'TargetType', }; } static types(): { [key: string]: any } { return { mirrorGroupConfig: ListRulesResponseBodyRulesRuleActionsTrafficMirrorConfigMirrorGroupConfig, targetType: 'string', }; } validate() { if(this.mirrorGroupConfig && typeof (this.mirrorGroupConfig as any).validate === 'function') { (this.mirrorGroupConfig as any).validate(); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleActions extends $dara.Model { /** * @remarks * The CORS configuration. */ corsConfig?: ListRulesResponseBodyRulesRuleActionsCorsConfig; /** * @remarks * The configuration of the fixed response. */ fixedResponseConfig?: ListRulesResponseBodyRulesRuleActionsFixedResponseConfig; /** * @remarks * The configuration of the forwarding group. */ forwardGroupConfig?: ListRulesResponseBodyRulesRuleActionsForwardGroupConfig; /** * @remarks * The configuration of the header to be inserted. */ insertHeaderConfig?: ListRulesResponseBodyRulesRuleActionsInsertHeaderConfig; /** * @remarks * The order of the action. Valid values: 1 to 50000. A smaller value indicates a higher priority. The value of this parameter cannot be the same as the value of **Order** for other actions of the same rule. * * @example * 1 */ order?: number; /** * @remarks * The configuration of the redirection. */ redirectConfig?: ListRulesResponseBodyRulesRuleActionsRedirectConfig; /** * @remarks * The configuration for removing a header. */ removeHeaderConfig?: ListRulesResponseBodyRulesRuleActionsRemoveHeaderConfig; /** * @remarks * The configuration of the rewrite. */ rewriteConfig?: ListRulesResponseBodyRulesRuleActionsRewriteConfig; /** * @remarks * The configuration of throttling. */ trafficLimitConfig?: ListRulesResponseBodyRulesRuleActionsTrafficLimitConfig; /** * @remarks * The configuration of traffic mirroring. */ trafficMirrorConfig?: ListRulesResponseBodyRulesRuleActionsTrafficMirrorConfig; /** * @remarks * The type of the action. Valid values: * * - **ForwardGroup**: forwards requests to multiple vServer groups. * * - **Redirect**: redirects requests. * * - **FixedResponse**: returns a fixed response. * * - **Rewrite**: rewrites a request. * * - **InsertHeader**: inserts a header. * * - **RemoveHeaderConfig**: removes a header. * * - **TrafficLimitConfig**: throttles traffic. * * - **TrafficMirrorConfig**: mirrors traffic. * * - **CorsConfig**: enables cross-origin resource sharing (CORS). * * @example * ForwardGroup */ type?: string; static names(): { [key: string]: string } { return { corsConfig: 'CorsConfig', fixedResponseConfig: 'FixedResponseConfig', forwardGroupConfig: 'ForwardGroupConfig', insertHeaderConfig: 'InsertHeaderConfig', order: 'Order', redirectConfig: 'RedirectConfig', removeHeaderConfig: 'RemoveHeaderConfig', rewriteConfig: 'RewriteConfig', trafficLimitConfig: 'TrafficLimitConfig', trafficMirrorConfig: 'TrafficMirrorConfig', type: 'Type', }; } static types(): { [key: string]: any } { return { corsConfig: ListRulesResponseBodyRulesRuleActionsCorsConfig, fixedResponseConfig: ListRulesResponseBodyRulesRuleActionsFixedResponseConfig, forwardGroupConfig: ListRulesResponseBodyRulesRuleActionsForwardGroupConfig, insertHeaderConfig: ListRulesResponseBodyRulesRuleActionsInsertHeaderConfig, order: 'number', redirectConfig: ListRulesResponseBodyRulesRuleActionsRedirectConfig, removeHeaderConfig: ListRulesResponseBodyRulesRuleActionsRemoveHeaderConfig, rewriteConfig: ListRulesResponseBodyRulesRuleActionsRewriteConfig, trafficLimitConfig: ListRulesResponseBodyRulesRuleActionsTrafficLimitConfig, trafficMirrorConfig: ListRulesResponseBodyRulesRuleActionsTrafficMirrorConfig, type: 'string', }; } validate() { if(this.corsConfig && typeof (this.corsConfig as any).validate === 'function') { (this.corsConfig as any).validate(); } if(this.fixedResponseConfig && typeof (this.fixedResponseConfig as any).validate === 'function') { (this.fixedResponseConfig as any).validate(); } if(this.forwardGroupConfig && typeof (this.forwardGroupConfig as any).validate === 'function') { (this.forwardGroupConfig as any).validate(); } if(this.insertHeaderConfig && typeof (this.insertHeaderConfig as any).validate === 'function') { (this.insertHeaderConfig as any).validate(); } if(this.redirectConfig && typeof (this.redirectConfig as any).validate === 'function') { (this.redirectConfig as any).validate(); } if(this.removeHeaderConfig && typeof (this.removeHeaderConfig as any).validate === 'function') { (this.removeHeaderConfig as any).validate(); } if(this.rewriteConfig && typeof (this.rewriteConfig as any).validate === 'function') { (this.rewriteConfig as any).validate(); } if(this.trafficLimitConfig && typeof (this.trafficLimitConfig as any).validate === 'function') { (this.trafficLimitConfig as any).validate(); } if(this.trafficMirrorConfig && typeof (this.trafficMirrorConfig as any).validate === 'function') { (this.trafficMirrorConfig as any).validate(); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleConditionsCookieConfigValues extends $dara.Model { /** * @remarks * The key of the cookie. The key must be 1 to 100 characters in length. It can contain lowercase letters, printable characters, asterisks (\\*), and question marks (?). It cannot contain spaces or the following special characters: `#[]{}\\|<>&`. * * @example * test */ key?: string; /** * @remarks * The value of the cookie. The value must be 1 to 128 characters in length. It can contain lowercase letters, printable characters, asterisks (\\*), and question marks (?). It cannot contain spaces or the following special characters: `#[]{}\\|<>&`. * * @example * test */ 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 ListRulesResponseBodyRulesRuleConditionsCookieConfig extends $dara.Model { /** * @remarks * The cookie values. */ values?: ListRulesResponseBodyRulesRuleConditionsCookieConfigValues[]; static names(): { [key: string]: string } { return { values: 'Values', }; } static types(): { [key: string]: any } { return { values: { 'type': 'array', 'itemType': ListRulesResponseBodyRulesRuleConditionsCookieConfigValues }, }; } validate() { if(Array.isArray(this.values)) { $dara.Model.validateArray(this.values); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleConditionsHeaderConfig extends $dara.Model { /** * @remarks * The key of the header. The key must be 1 to 40 characters in length. It can contain letters, digits, hyphens (-), and underscores (_). You cannot set the key to Cookie or Host. * * @example * Port */ key?: string; /** * @remarks * The header values. */ values?: string[]; static names(): { [key: string]: string } { return { key: 'Key', values: 'Values', }; } static types(): { [key: string]: any } { return { key: 'string', values: { 'type': 'array', 'itemType': 'string' }, }; } validate() { if(Array.isArray(this.values)) { $dara.Model.validateArray(this.values); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleConditionsHostConfig extends $dara.Model { /** * @remarks * The hostnames. */ values?: string[]; static names(): { [key: string]: string } { return { values: 'Values', }; } static types(): { [key: string]: any } { return { values: { 'type': 'array', 'itemType': 'string' }, }; } validate() { if(Array.isArray(this.values)) { $dara.Model.validateArray(this.values); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleConditionsMethodConfig extends $dara.Model { /** * @remarks * The request methods. */ values?: string[]; static names(): { [key: string]: string } { return { values: 'Values', }; } static types(): { [key: string]: any } { return { values: { 'type': 'array', 'itemType': 'string' }, }; } validate() { if(Array.isArray(this.values)) { $dara.Model.validateArray(this.values); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleConditionsPathConfig extends $dara.Model { /** * @remarks * The paths. */ values?: string[]; static names(): { [key: string]: string } { return { values: 'Values', }; } static types(): { [key: string]: any } { return { values: { 'type': 'array', 'itemType': 'string' }, }; } validate() { if(Array.isArray(this.values)) { $dara.Model.validateArray(this.values); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleConditionsQueryStringConfigValues extends $dara.Model { /** * @remarks * The key of the query string. The key must be 1 to 100 characters in length. It can contain lowercase letters, printable characters, asterisks (\\*), and question marks (?). It cannot contain spaces or the following special characters: `#[]{}\\|<>&`. * * @example * test */ key?: string; /** * @remarks * The value of the query string. The value must be 1 to 128 characters in length. It can contain lowercase letters, printable characters, asterisks (\\*), and question marks (?). It cannot contain spaces or the following special characters: `#[]{}\\|<>&`. * * @example * test */ 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 ListRulesResponseBodyRulesRuleConditionsQueryStringConfig extends $dara.Model { /** * @remarks * The query strings. */ values?: ListRulesResponseBodyRulesRuleConditionsQueryStringConfigValues[]; static names(): { [key: string]: string } { return { values: 'Values', }; } static types(): { [key: string]: any } { return { values: { 'type': 'array', 'itemType': ListRulesResponseBodyRulesRuleConditionsQueryStringConfigValues }, }; } validate() { if(Array.isArray(this.values)) { $dara.Model.validateArray(this.values); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleConditionsResponseHeaderConfig extends $dara.Model { /** * @remarks * The key of the response HTTP header. The key must be 1 to 40 characters in length. It can contain letters, digits, hyphens (-), and underscores (_). You cannot set the key to Cookie or Host. * * @example * key */ key?: string; /** * @remarks * The values of the response HTTP header. */ values?: string[]; static names(): { [key: string]: string } { return { key: 'Key', values: 'Values', }; } static types(): { [key: string]: any } { return { key: 'string', values: { 'type': 'array', 'itemType': 'string' }, }; } validate() { if(Array.isArray(this.values)) { $dara.Model.validateArray(this.values); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleConditionsResponseStatusCodeConfig extends $dara.Model { /** * @remarks * The response status codes. */ values?: string[]; static names(): { [key: string]: string } { return { values: 'Values', }; } static types(): { [key: string]: any } { return { values: { 'type': 'array', 'itemType': 'string' }, }; } validate() { if(Array.isArray(this.values)) { $dara.Model.validateArray(this.values); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleConditionsSourceIpConfig extends $dara.Model { /** * @remarks * The source IP addresses to match. */ values?: string[]; static names(): { [key: string]: string } { return { values: 'Values', }; } static types(): { [key: string]: any } { return { values: { 'type': 'array', 'itemType': 'string' }, }; } validate() { if(Array.isArray(this.values)) { $dara.Model.validateArray(this.values); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesRuleConditions extends $dara.Model { /** * @remarks * The configuration of the cookie. */ cookieConfig?: ListRulesResponseBodyRulesRuleConditionsCookieConfig; /** * @remarks * The configuration of the header. */ headerConfig?: ListRulesResponseBodyRulesRuleConditionsHeaderConfig; /** * @remarks * The configuration of the host. */ hostConfig?: ListRulesResponseBodyRulesRuleConditionsHostConfig; /** * @remarks * The configuration of the request method. */ methodConfig?: ListRulesResponseBodyRulesRuleConditionsMethodConfig; /** * @remarks * The configuration of the path. */ pathConfig?: ListRulesResponseBodyRulesRuleConditionsPathConfig; /** * @remarks * The configuration of the query string. */ queryStringConfig?: ListRulesResponseBodyRulesRuleConditionsQueryStringConfig; /** * @remarks * The configuration of the response HTTP header. */ responseHeaderConfig?: ListRulesResponseBodyRulesRuleConditionsResponseHeaderConfig; /** * @remarks * The configuration of the response status code. */ responseStatusCodeConfig?: ListRulesResponseBodyRulesRuleConditionsResponseStatusCodeConfig; /** * @remarks * The configuration of the source IP address. */ sourceIpConfig?: ListRulesResponseBodyRulesRuleConditionsSourceIpConfig; /** * @remarks * The type of the forwarding rule. Valid values: * * - **Host**: a host. * * - **Path**: a path. * * - **Header**: an HTTP header. * * - **QueryString**: a query string. * * - **Method**: a request method. * * - **Cookie**: a cookie. * * - **SourceIp**: a source IP address. * * @example * Host */ type?: string; static names(): { [key: string]: string } { return { cookieConfig: 'CookieConfig', headerConfig: 'HeaderConfig', hostConfig: 'HostConfig', methodConfig: 'MethodConfig', pathConfig: 'PathConfig', queryStringConfig: 'QueryStringConfig', responseHeaderConfig: 'ResponseHeaderConfig', responseStatusCodeConfig: 'ResponseStatusCodeConfig', sourceIpConfig: 'SourceIpConfig', type: 'Type', }; } static types(): { [key: string]: any } { return { cookieConfig: ListRulesResponseBodyRulesRuleConditionsCookieConfig, headerConfig: ListRulesResponseBodyRulesRuleConditionsHeaderConfig, hostConfig: ListRulesResponseBodyRulesRuleConditionsHostConfig, methodConfig: ListRulesResponseBodyRulesRuleConditionsMethodConfig, pathConfig: ListRulesResponseBodyRulesRuleConditionsPathConfig, queryStringConfig: ListRulesResponseBodyRulesRuleConditionsQueryStringConfig, responseHeaderConfig: ListRulesResponseBodyRulesRuleConditionsResponseHeaderConfig, responseStatusCodeConfig: ListRulesResponseBodyRulesRuleConditionsResponseStatusCodeConfig, sourceIpConfig: ListRulesResponseBodyRulesRuleConditionsSourceIpConfig, type: 'string', }; } validate() { if(this.cookieConfig && typeof (this.cookieConfig as any).validate === 'function') { (this.cookieConfig as any).validate(); } if(this.headerConfig && typeof (this.headerConfig as any).validate === 'function') { (this.headerConfig as any).validate(); } if(this.hostConfig && typeof (this.hostConfig as any).validate === 'function') { (this.hostConfig as any).validate(); } if(this.methodConfig && typeof (this.methodConfig as any).validate === 'function') { (this.methodConfig as any).validate(); } if(this.pathConfig && typeof (this.pathConfig as any).validate === 'function') { (this.pathConfig as any).validate(); } if(this.queryStringConfig && typeof (this.queryStringConfig as any).validate === 'function') { (this.queryStringConfig as any).validate(); } if(this.responseHeaderConfig && typeof (this.responseHeaderConfig as any).validate === 'function') { (this.responseHeaderConfig as any).validate(); } if(this.responseStatusCodeConfig && typeof (this.responseStatusCodeConfig as any).validate === 'function') { (this.responseStatusCodeConfig as any).validate(); } if(this.sourceIpConfig && typeof (this.sourceIpConfig as any).validate === 'function') { (this.sourceIpConfig as any).validate(); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBodyRulesTags extends $dara.Model { /** * @remarks * The tag key. The tag key can be up to 128 characters in length. It cannot start with \\`aliyun\\` or \\`acs:\\`, and cannot contain \\`http\\://\\` or \\`https\\://\\`. * * @example * env */ key?: string; /** * @remarks * The tag value. The tag value can be up to 128 characters in length. It 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 ListRulesResponseBodyRules extends $dara.Model { /** * @remarks * The direction of the forwarding rule. Valid values: * * - Request (default): The forwarding rule is applied to requests. ALB matches conditions in the requests sent from clients and performs the specified actions. * * - Response: The forwarding rule is applied to responses. ALB matches conditions in the responses sent from backend servers and performs the specified actions. * * > Basic ALB instances do not support the Response type. * * @example * Request */ direction?: string; /** * @remarks * The ID of the listener to which the forwarding rule belongs. * * @example * lsn-i35udpz3pxsmnf**** */ listenerId?: string; /** * @remarks * The ID of the SLB instance to which the forwarding rule belongs. * * @example * alb-x30o38azsuj0sx**** */ loadBalancerId?: string; /** * @remarks * The priority of the rule. A smaller value indicates a higher priority. Valid values: 1 to **10000**. * * > The priority of each rule must be unique within a listener. * * @example * 1 */ priority?: number; /** * @remarks * The actions of the forwarding rule. */ ruleActions?: ListRulesResponseBodyRulesRuleActions[]; /** * @remarks * The conditions of the forwarding rule. */ ruleConditions?: ListRulesResponseBodyRulesRuleConditions[]; /** * @remarks * The forwarding rule ID. * * @example * rule-bpn0kn908w4nbw**** */ ruleId?: string; /** * @remarks * The name of the forwarding rule. The name must be 2 to 128 characters in length, start with a letter or a Chinese character, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). * * @example * rule-instance-test */ ruleName?: string; /** * @remarks * The status of the forwarding rule. Valid values: * * - **Provisioning**: The rule is being created. * * - **Configuring**: The rule is being modified. * * - **Available**: The rule is running. * * @example * Available */ ruleStatus?: string; /** * @remarks * The tags. */ tags?: ListRulesResponseBodyRulesTags[]; static names(): { [key: string]: string } { return { direction: 'Direction', listenerId: 'ListenerId', loadBalancerId: 'LoadBalancerId', priority: 'Priority', ruleActions: 'RuleActions', ruleConditions: 'RuleConditions', ruleId: 'RuleId', ruleName: 'RuleName', ruleStatus: 'RuleStatus', tags: 'Tags', }; } static types(): { [key: string]: any } { return { direction: 'string', listenerId: 'string', loadBalancerId: 'string', priority: 'number', ruleActions: { 'type': 'array', 'itemType': ListRulesResponseBodyRulesRuleActions }, ruleConditions: { 'type': 'array', 'itemType': ListRulesResponseBodyRulesRuleConditions }, ruleId: 'string', ruleName: 'string', ruleStatus: 'string', tags: { 'type': 'array', 'itemType': ListRulesResponseBodyRulesTags }, }; } validate() { if(Array.isArray(this.ruleActions)) { $dara.Model.validateArray(this.ruleActions); } if(Array.isArray(this.ruleConditions)) { $dara.Model.validateArray(this.ruleConditions); } if(Array.isArray(this.tags)) { $dara.Model.validateArray(this.tags); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class ListRulesResponseBody extends $dara.Model { /** * @remarks * The maximum number of entries returned per page. * * @example * 50 */ maxResults?: number; /** * @remarks * The token that is used to retrieve the next page of results. Valid values: * * - If **NextToken** is empty, no more results are returned. * * - If **NextToken** has a value, it is the token for the next query. * * @example * FFmyTO70tTpLG6I3FmYAXGKPd**** */ nextToken?: string; /** * @remarks * The request ID. * * @example * CEF72CEB-54B6-4AE8-B225-F876F****** */ requestId?: string; /** * @remarks * The list of forwarding rules. */ rules?: ListRulesResponseBodyRules[]; /** * @remarks * The total number of entries returned. * * @example * 1000 */ totalCount?: number; static names(): { [key: string]: string } { return { maxResults: 'MaxResults', nextToken: 'NextToken', requestId: 'RequestId', rules: 'Rules', totalCount: 'TotalCount', }; } static types(): { [key: string]: any } { return { maxResults: 'number', nextToken: 'string', requestId: 'string', rules: { 'type': 'array', 'itemType': ListRulesResponseBodyRules }, totalCount: 'number', }; } validate() { if(Array.isArray(this.rules)) { $dara.Model.validateArray(this.rules); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } }