// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; export class AuthorizeSecurityGroupRequestPermissions extends $dara.Model { /** * @remarks * The description of the security group rule. The description must be 1 to 512 characters in length. * * @example * This is description. */ description?: string; /** * @remarks * The destination IPv4 CIDR block. CIDR blocks and IPv4 address ranges are supported. * * This parameter is used to support quintuple rules. For more information, see [Security group quintuple rules](https://help.aliyun.com/document_detail/97439.html). * * @example * 10.0.0.0/8 */ destCidrIp?: string; /** * @remarks * The network layer or transport layer protocol. Two types of values are supported: * 1. Case-insensitive protocol names. Valid values: * - ICMP * - GRE * - TCP * - UDP * - ALL: all protocols. * 2. Protocol numbers that comply with IANA specifications, which are integers from 0 to 255. The following regions currently support this feature: * - Philippines * - UK * - Malaysia * - China (Hohhot) * - China (Qingdao) * - US (Virginia) * - Singapore * * @example * ALL */ ipProtocol?: string; /** * @remarks * The destination IPv6 CIDR block. CIDR format and IPv6 format address ranges are supported. * * This parameter is used to support quintuple rules. For more information, see [Security group quintuple rules](https://help.aliyun.com/document_detail/97439.html). * * > This parameter is valid only for VPC-connected ECS instances that support IPv6. This parameter and `DestCidrIp` cannot be specified at the same time. * * @example * 2001:250:6000::*** */ ipv6DestCidrIp?: string; /** * @remarks * The source IPv6 CIDR block for which you want to set access permissions. Settings for CIDR format and IPv6 format address ranges are supported. * * > This parameter is valid only for VPC-connected ECS instances that support IPv6. This parameter and `SourceCidrIp` cannot be specified at the same time. * * @example * 2001:250:6000::*** */ ipv6SourceCidrIp?: string; /** * @remarks * The network interface controller (NIC) type for a classic network type security group rule. Valid values: * * - internet: public network interface controller (NIC). * * - intranet: internal network interface controller (NIC). * * For VPC security group rules, you do not need to set the network interface controller (NIC) type parameter. The default value is intranet, and only intranet is supported. * * When you set security groups to access each other (only DestGroupId is specified), only intranet is supported. * * Default value: internet. * * @example * intranet */ nicType?: string; /** * @remarks * Settings for access permissions. Valid values: * * - accept: accepts access. * * - drop: denies access and does not return a deny message. The request appears to timeout or the connection cannot be established. * * Default value: accept. * * @example * accept */ policy?: string; /** * @remarks * The range of destination ports that correspond to the protocol for the security group. Valid values: * * - TCP/UDP: Valid values are 1 to 65535. Separate the start port and the stop port with a forward slash (/). Example: 1/200. * - ICMP: -1/-1. * - GRE: -1/-1. * - ALL: -1/-1. * * For more information about common ports, see [Common scenarios for ports](https://help.aliyun.com/document_detail/40724.html). * * @example * 80/80 */ portRange?: string; /** * @remarks * The port address book ID. * You can invoke `DescribePortRangeLists` to query available port address book IDs. * - If you specify `Permissions.N.PortRange`, this parameter is ignored. * - Port address books are not supported for security groups with the classic network type. For more information about security group and port address book limits, see [Security group limits](~~25412#SecurityGroupQuota1~~). Settings for port address books are not available for classic network security groups. * * @example * prl-2ze9743**** */ portRangeListId?: string; /** * @remarks * The priority of the security group rule. A smaller value indicates a higher priority. Valid values: 1 to 100. * * Default value: 1. * * @example * 1 */ priority?: string; /** * @remarks * The source IPv4 CIDR block for which you want to set access permissions. Settings for CIDR format and IPv4 format address ranges are supported. * * @example * 10.0.0.0/8 */ sourceCidrIp?: string; /** * @remarks * The ID of the source security group for which you want to set access permissions. * * - You must specify at least one of the following parameters: `SourceGroupId`, `SourceCidrIp`, `Ipv6SourceCidrIp`, or `SourcePrefixListId`. * * - If `SourceGroupId` is specified but `SourceCidrIp` or `Ipv6SourceCidrIp` is not specified, the `NicType` parameter can only be set to `intranet`. * * - If both `SourceGroupId` and `SourceCidrIp` are specified, `SourceCidrIp` takes precedence. * * @example * sg-bp67acfmxazb4p**** */ sourceGroupId?: string; /** * @remarks * The Alibaba Cloud account that owns the source security group when you set a cross-account security group rule. * * - If neither `SourceGroupOwnerAccount` nor `SourceGroupOwnerId` is set, access permissions are configured for another security group within your account. * * - If the `SourceCidrIp` parameter is set, the `SourceGroupOwnerAccount` parameter is ignored. * * @example * test@aliyun.com */ sourceGroupOwnerAccount?: string; /** * @remarks * The ID of the Alibaba Cloud account that owns the source security group when you set a cross-account security group rule. * * - If neither `SourceGroupOwnerAccount` nor `SourceGroupOwnerId` is set, access permissions are configured for another security group within your account. * * - If the `SourceCidrIp` parameter is set, the `SourceGroupOwnerAccount` parameter is ignored. * * @example * 1234567890 */ sourceGroupOwnerId?: number; /** * @remarks * The range of source ports that correspond to the protocol for the security group. Valid values: * * - TCP/UDP: Valid values are 1 to 65535. Separate the start port and the end port with a forward slash (/). Example: 1/200. * - ICMP: -1/-1. * - GRE: -1/-1. * - ALL: -1/-1. * * This parameter is used to support quintuple rules. For more information, see [Security group quintuple rules](https://help.aliyun.com/document_detail/97439.html). * * @example * 7000/8000 */ sourcePortRange?: string; /** * @remarks * The ID of the source prefix list for which you want to set access permissions. You can call [DescribePrefixLists](https://help.aliyun.com/document_detail/205046.html) to query available prefix list IDs. * * Notes: * * If you specify `SourceCidrIp`, `Ipv6SourceCidrIp`, or `SourceGroupId`, this parameter is ignored. * * For more information, see [Security group limits](~~25412#SecurityGroupQuota1~~). * * @example * pl-x1j1k5ykzqlixdcy**** */ sourcePrefixListId?: string; static names(): { [key: string]: string } { return { description: 'Description', destCidrIp: 'DestCidrIp', ipProtocol: 'IpProtocol', ipv6DestCidrIp: 'Ipv6DestCidrIp', ipv6SourceCidrIp: 'Ipv6SourceCidrIp', nicType: 'NicType', policy: 'Policy', portRange: 'PortRange', portRangeListId: 'PortRangeListId', priority: 'Priority', sourceCidrIp: 'SourceCidrIp', sourceGroupId: 'SourceGroupId', sourceGroupOwnerAccount: 'SourceGroupOwnerAccount', sourceGroupOwnerId: 'SourceGroupOwnerId', sourcePortRange: 'SourcePortRange', sourcePrefixListId: 'SourcePrefixListId', }; } static types(): { [key: string]: any } { return { description: 'string', destCidrIp: 'string', ipProtocol: 'string', ipv6DestCidrIp: 'string', ipv6SourceCidrIp: 'string', nicType: 'string', policy: 'string', portRange: 'string', portRangeListId: 'string', priority: 'string', sourceCidrIp: 'string', sourceGroupId: 'string', sourceGroupOwnerAccount: 'string', sourceGroupOwnerId: 'number', sourcePortRange: 'string', sourcePrefixListId: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class AuthorizeSecurityGroupRequest extends $dara.Model { /** * @remarks * A client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different 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 * Deprecated. Use `Permissions.N.Description` to specify the description of the security group rule. * * @example * This is description. * * @deprecated */ description?: string; /** * @remarks * Deprecated. Use `Permissions.N.DestCidrIp` to specify the destination IPv4 CIDR block. * * @example * 10.0.0.0/8 * * @deprecated */ destCidrIp?: string; /** * @remarks * Deprecated. Use `Permissions.N.IpProtocol` to specify the protocol type. * * @example * ALL * * @deprecated */ ipProtocol?: string; /** * @remarks * Deprecated. Use `Permissions.N.Ipv6DestCidrIp` to specify the destination IPv6 CIDR block. * * @example * null * * @deprecated */ ipv6DestCidrIp?: string; /** * @remarks * Deprecated. Use `Permissions.N.Ipv6SourceCidrIp` to specify the source IPv6 Classless Inter-Domain Routing block. * * @example * 2001:250:6000::*** * * @deprecated */ ipv6SourceCidrIp?: string; /** * @remarks * Deprecated. Use `Permissions.N.NicType` to specify the NIC type. * * @example * intranet * * @deprecated */ nicType?: string; ownerAccount?: string; ownerId?: number; /** * @remarks * The security group rules. Array length: 1 to 100. */ permissions?: AuthorizeSecurityGroupRequestPermissions[]; /** * @remarks * Deprecated. Use `Permissions.N.Policy` to set access permissions. * * @example * accept * * @deprecated */ policy?: string; /** * @remarks * Deprecated. Use `Permissions.N.PortRange` to specify the port range. * * @example * 22/22 * * @deprecated */ portRange?: string; /** * @remarks * Deprecated. Use `Permissions.N.Priority` to specify the security group rule priority. * * @example * 1 * * @deprecated */ priority?: string; /** * @remarks * The region ID of the security group. You can call [DescribeRegions](https://help.aliyun.com/document_detail/25609.html) to query the most recent region list. * * This parameter is required. * * @example * cn-hangzhou */ regionId?: string; resourceOwnerAccount?: string; resourceOwnerId?: number; /** * @remarks * The security group ID. * * This parameter is required. * * @example * sg-bp67acfmxazb4p**** */ securityGroupId?: string; /** * @remarks * Deprecated. Use `Permissions.N.SourceCidrIp` to specify the source IPv4 Classless Inter-Domain Routing block. * * @example * 10.0.0.0/8 * * @deprecated */ sourceCidrIp?: string; /** * @remarks * Deprecated. Use `Permissions.N.SourceGroupId` to specify the source security group ID. * * @example * sg-bp67acfmxazb4p**** * * @deprecated */ sourceGroupId?: string; /** * @remarks * Deprecated. Use `Permissions.N.SourceGroupOwnerAccount` to specify the Alibaba Cloud account that owns the source security group. * * @example * test@aliyun.com * * @deprecated */ sourceGroupOwnerAccount?: string; /** * @remarks * Deprecated. Use `Permissions.N.SourceGroupOwnerId` to specify the ID of the Alibaba Cloud account that owns the source security group. * * @example * 1234567890 * * @deprecated */ sourceGroupOwnerId?: number; /** * @remarks * Deprecated. Use `Permissions.N.SourcePortRange` to specify the source port range. * * @example * 22/22 * * @deprecated */ sourcePortRange?: string; /** * @remarks * Deprecated. Use `Permissions.N.SourcePrefixListId` to specify the source prefix list ID. * * @example * pl-x1j1k5ykzqlixdcy**** * * @deprecated */ sourcePrefixListId?: string; static names(): { [key: string]: string } { return { clientToken: 'ClientToken', description: 'Description', destCidrIp: 'DestCidrIp', ipProtocol: 'IpProtocol', ipv6DestCidrIp: 'Ipv6DestCidrIp', ipv6SourceCidrIp: 'Ipv6SourceCidrIp', nicType: 'NicType', ownerAccount: 'OwnerAccount', ownerId: 'OwnerId', permissions: 'Permissions', policy: 'Policy', portRange: 'PortRange', priority: 'Priority', regionId: 'RegionId', resourceOwnerAccount: 'ResourceOwnerAccount', resourceOwnerId: 'ResourceOwnerId', securityGroupId: 'SecurityGroupId', sourceCidrIp: 'SourceCidrIp', sourceGroupId: 'SourceGroupId', sourceGroupOwnerAccount: 'SourceGroupOwnerAccount', sourceGroupOwnerId: 'SourceGroupOwnerId', sourcePortRange: 'SourcePortRange', sourcePrefixListId: 'SourcePrefixListId', }; } static types(): { [key: string]: any } { return { clientToken: 'string', description: 'string', destCidrIp: 'string', ipProtocol: 'string', ipv6DestCidrIp: 'string', ipv6SourceCidrIp: 'string', nicType: 'string', ownerAccount: 'string', ownerId: 'number', permissions: { 'type': 'array', 'itemType': AuthorizeSecurityGroupRequestPermissions }, policy: 'string', portRange: 'string', priority: 'string', regionId: 'string', resourceOwnerAccount: 'string', resourceOwnerId: 'number', securityGroupId: 'string', sourceCidrIp: 'string', sourceGroupId: 'string', sourceGroupOwnerAccount: 'string', sourceGroupOwnerId: 'number', sourcePortRange: 'string', sourcePrefixListId: 'string', }; } validate() { if(Array.isArray(this.permissions)) { $dara.Model.validateArray(this.permissions); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } }