com.aliyun.sdk.service.ecs20140526.models.RevokeSecurityGroupEgressRequest Maven / Gradle / Ivy
Show all versions of alibabacloud-ecs20140526 Show documentation
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;
import com.aliyun.core.annotation.*;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
* {@link RevokeSecurityGroupEgressRequest} extends {@link RequestModel}
*
* RevokeSecurityGroupEgressRequest
*/
public class RevokeSecurityGroupEgressRequest extends Request {
@Host
@NameInMap("SourceRegionId")
private String sourceRegionId;
@Query
@NameInMap("ClientToken")
private String clientToken;
@Query
@NameInMap("Description")
@Deprecated
private String description;
@Query
@NameInMap("DestCidrIp")
@Deprecated
private String destCidrIp;
@Query
@NameInMap("DestGroupId")
@Deprecated
private String destGroupId;
@Query
@NameInMap("DestGroupOwnerAccount")
@Deprecated
private String destGroupOwnerAccount;
@Query
@NameInMap("DestGroupOwnerId")
@Deprecated
private Long destGroupOwnerId;
@Query
@NameInMap("DestPrefixListId")
@Deprecated
private String destPrefixListId;
@Query
@NameInMap("IpProtocol")
@Deprecated
private String ipProtocol;
@Query
@NameInMap("Ipv6DestCidrIp")
@Deprecated
private String ipv6DestCidrIp;
@Query
@NameInMap("Ipv6SourceCidrIp")
@Deprecated
private String ipv6SourceCidrIp;
@Query
@NameInMap("NicType")
@Deprecated
private String nicType;
@Query
@NameInMap("OwnerAccount")
private String ownerAccount;
@Query
@NameInMap("OwnerId")
private Long ownerId;
@Query
@NameInMap("Permissions")
private java.util.List < Permissions> permissions;
@Query
@NameInMap("Policy")
@Deprecated
private String policy;
@Query
@NameInMap("PortRange")
@Deprecated
private String portRange;
@Query
@NameInMap("Priority")
@Deprecated
private String priority;
@Query
@NameInMap("RegionId")
@Validation(required = true)
private String regionId;
@Query
@NameInMap("ResourceOwnerAccount")
private String resourceOwnerAccount;
@Query
@NameInMap("ResourceOwnerId")
private Long resourceOwnerId;
@Query
@NameInMap("SecurityGroupId")
@Validation(required = true)
private String securityGroupId;
@Query
@NameInMap("SecurityGroupRuleId")
private java.util.List < String > securityGroupRuleId;
@Query
@NameInMap("SourceCidrIp")
@Deprecated
private String sourceCidrIp;
@Query
@NameInMap("SourcePortRange")
@Deprecated
private String sourcePortRange;
private RevokeSecurityGroupEgressRequest(Builder builder) {
super(builder);
this.sourceRegionId = builder.sourceRegionId;
this.clientToken = builder.clientToken;
this.description = builder.description;
this.destCidrIp = builder.destCidrIp;
this.destGroupId = builder.destGroupId;
this.destGroupOwnerAccount = builder.destGroupOwnerAccount;
this.destGroupOwnerId = builder.destGroupOwnerId;
this.destPrefixListId = builder.destPrefixListId;
this.ipProtocol = builder.ipProtocol;
this.ipv6DestCidrIp = builder.ipv6DestCidrIp;
this.ipv6SourceCidrIp = builder.ipv6SourceCidrIp;
this.nicType = builder.nicType;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.permissions = builder.permissions;
this.policy = builder.policy;
this.portRange = builder.portRange;
this.priority = builder.priority;
this.regionId = builder.regionId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
this.securityGroupId = builder.securityGroupId;
this.securityGroupRuleId = builder.securityGroupRuleId;
this.sourceCidrIp = builder.sourceCidrIp;
this.sourcePortRange = builder.sourcePortRange;
}
public static Builder builder() {
return new Builder();
}
public static RevokeSecurityGroupEgressRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return sourceRegionId
*/
public String getSourceRegionId() {
return this.sourceRegionId;
}
/**
* @return clientToken
*/
public String getClientToken() {
return this.clientToken;
}
/**
* @return description
*/
public String getDescription() {
return this.description;
}
/**
* @return destCidrIp
*/
public String getDestCidrIp() {
return this.destCidrIp;
}
/**
* @return destGroupId
*/
public String getDestGroupId() {
return this.destGroupId;
}
/**
* @return destGroupOwnerAccount
*/
public String getDestGroupOwnerAccount() {
return this.destGroupOwnerAccount;
}
/**
* @return destGroupOwnerId
*/
public Long getDestGroupOwnerId() {
return this.destGroupOwnerId;
}
/**
* @return destPrefixListId
*/
public String getDestPrefixListId() {
return this.destPrefixListId;
}
/**
* @return ipProtocol
*/
public String getIpProtocol() {
return this.ipProtocol;
}
/**
* @return ipv6DestCidrIp
*/
public String getIpv6DestCidrIp() {
return this.ipv6DestCidrIp;
}
/**
* @return ipv6SourceCidrIp
*/
public String getIpv6SourceCidrIp() {
return this.ipv6SourceCidrIp;
}
/**
* @return nicType
*/
public String getNicType() {
return this.nicType;
}
/**
* @return ownerAccount
*/
public String getOwnerAccount() {
return this.ownerAccount;
}
/**
* @return ownerId
*/
public Long getOwnerId() {
return this.ownerId;
}
/**
* @return permissions
*/
public java.util.List < Permissions> getPermissions() {
return this.permissions;
}
/**
* @return policy
*/
public String getPolicy() {
return this.policy;
}
/**
* @return portRange
*/
public String getPortRange() {
return this.portRange;
}
/**
* @return priority
*/
public String getPriority() {
return this.priority;
}
/**
* @return regionId
*/
public String getRegionId() {
return this.regionId;
}
/**
* @return resourceOwnerAccount
*/
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
/**
* @return resourceOwnerId
*/
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
/**
* @return securityGroupId
*/
public String getSecurityGroupId() {
return this.securityGroupId;
}
/**
* @return securityGroupRuleId
*/
public java.util.List < String > getSecurityGroupRuleId() {
return this.securityGroupRuleId;
}
/**
* @return sourceCidrIp
*/
public String getSourceCidrIp() {
return this.sourceCidrIp;
}
/**
* @return sourcePortRange
*/
public String getSourcePortRange() {
return this.sourcePortRange;
}
public static final class Builder extends Request.Builder {
private String sourceRegionId;
private String clientToken;
private String description;
private String destCidrIp;
private String destGroupId;
private String destGroupOwnerAccount;
private Long destGroupOwnerId;
private String destPrefixListId;
private String ipProtocol;
private String ipv6DestCidrIp;
private String ipv6SourceCidrIp;
private String nicType;
private String ownerAccount;
private Long ownerId;
private java.util.List < Permissions> permissions;
private String policy;
private String portRange;
private String priority;
private String regionId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private String securityGroupId;
private java.util.List < String > securityGroupRuleId;
private String sourceCidrIp;
private String sourcePortRange;
private Builder() {
super();
}
private Builder(RevokeSecurityGroupEgressRequest request) {
super(request);
this.sourceRegionId = request.sourceRegionId;
this.clientToken = request.clientToken;
this.description = request.description;
this.destCidrIp = request.destCidrIp;
this.destGroupId = request.destGroupId;
this.destGroupOwnerAccount = request.destGroupOwnerAccount;
this.destGroupOwnerId = request.destGroupOwnerId;
this.destPrefixListId = request.destPrefixListId;
this.ipProtocol = request.ipProtocol;
this.ipv6DestCidrIp = request.ipv6DestCidrIp;
this.ipv6SourceCidrIp = request.ipv6SourceCidrIp;
this.nicType = request.nicType;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.permissions = request.permissions;
this.policy = request.policy;
this.portRange = request.portRange;
this.priority = request.priority;
this.regionId = request.regionId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
this.securityGroupId = request.securityGroupId;
this.securityGroupRuleId = request.securityGroupRuleId;
this.sourceCidrIp = request.sourceCidrIp;
this.sourcePortRange = request.sourcePortRange;
}
/**
* SourceRegionId.
*/
public Builder sourceRegionId(String sourceRegionId) {
this.putHostParameter("SourceRegionId", sourceRegionId);
this.sourceRegionId = sourceRegionId;
return this;
}
/**
* The 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 **token** can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](~~25693~~).
*/
public Builder clientToken(String clientToken) {
this.putQueryParameter("ClientToken", clientToken);
this.clientToken = clientToken;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.Description` to specify the rule description.
*/
public Builder description(String description) {
this.putQueryParameter("Description", description);
this.description = description;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.DestCidrIp` to specify the destination IPv4 CIDR block.
*/
public Builder destCidrIp(String destCidrIp) {
this.putQueryParameter("DestCidrIp", destCidrIp);
this.destCidrIp = destCidrIp;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.DestGroupId` to specify the ID of the destination security group.
*/
public Builder destGroupId(String destGroupId) {
this.putQueryParameter("DestGroupId", destGroupId);
this.destGroupId = destGroupId;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.DestGroupOwnerAccount` to specify the Alibaba Cloud account that manages the destination security group.
*/
public Builder destGroupOwnerAccount(String destGroupOwnerAccount) {
this.putQueryParameter("DestGroupOwnerAccount", destGroupOwnerAccount);
this.destGroupOwnerAccount = destGroupOwnerAccount;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.DestGroupOwnerId` to specify the ID of the Alibaba Cloud account that manages the destination security group.
*/
public Builder destGroupOwnerId(Long destGroupOwnerId) {
this.putQueryParameter("DestGroupOwnerId", destGroupOwnerId);
this.destGroupOwnerId = destGroupOwnerId;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.DestPrefixListId` to specify the ID of the destination prefix list.
*/
public Builder destPrefixListId(String destPrefixListId) {
this.putQueryParameter("DestPrefixListId", destPrefixListId);
this.destPrefixListId = destPrefixListId;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.IpProtocol` to specify the transport layer protocol.
*/
public Builder ipProtocol(String ipProtocol) {
this.putQueryParameter("IpProtocol", ipProtocol);
this.ipProtocol = ipProtocol;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.Ipv6DestCidrIp` to specify the destination IPv6 CIDR block.
*/
public Builder ipv6DestCidrIp(String ipv6DestCidrIp) {
this.putQueryParameter("Ipv6DestCidrIp", ipv6DestCidrIp);
this.ipv6DestCidrIp = ipv6DestCidrIp;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.Ipv6SourceCidrIp` to specify the source IPv6 CIDR block.
*/
public Builder ipv6SourceCidrIp(String ipv6SourceCidrIp) {
this.putQueryParameter("Ipv6SourceCidrIp", ipv6SourceCidrIp);
this.ipv6SourceCidrIp = ipv6SourceCidrIp;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.NicType` to specify the network interface type.
*/
public Builder nicType(String nicType) {
this.putQueryParameter("NicType", nicType);
this.nicType = nicType;
return this;
}
/**
* OwnerAccount.
*/
public Builder ownerAccount(String ownerAccount) {
this.putQueryParameter("OwnerAccount", ownerAccount);
this.ownerAccount = ownerAccount;
return this;
}
/**
* OwnerId.
*/
public Builder ownerId(Long ownerId) {
this.putQueryParameter("OwnerId", ownerId);
this.ownerId = ownerId;
return this;
}
/**
* Security group rule N. Valid values of N: 1 to 100.
*/
public Builder permissions(java.util.List < Permissions> permissions) {
this.putQueryParameter("Permissions", permissions);
this.permissions = permissions;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.Policy` to specify whether to allow outbound access.
*/
public Builder policy(String policy) {
this.putQueryParameter("Policy", policy);
this.policy = policy;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.PortRange` to specify the range of destination ports.
*/
public Builder portRange(String portRange) {
this.putQueryParameter("PortRange", portRange);
this.portRange = portRange;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.Priority` to specify the rule priority.
*/
public Builder priority(String priority) {
this.putQueryParameter("Priority", priority);
this.priority = priority;
return this;
}
/**
* The region ID of the security group. You can call the [DescribeRegions](~~25609~~) operation to query the most recent region list.
*/
public Builder regionId(String regionId) {
this.putQueryParameter("RegionId", regionId);
this.regionId = regionId;
return this;
}
/**
* ResourceOwnerAccount.
*/
public Builder resourceOwnerAccount(String resourceOwnerAccount) {
this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount);
this.resourceOwnerAccount = resourceOwnerAccount;
return this;
}
/**
* ResourceOwnerId.
*/
public Builder resourceOwnerId(Long resourceOwnerId) {
this.putQueryParameter("ResourceOwnerId", resourceOwnerId);
this.resourceOwnerId = resourceOwnerId;
return this;
}
/**
* The ID of the security group.
*/
public Builder securityGroupId(String securityGroupId) {
this.putQueryParameter("SecurityGroupId", securityGroupId);
this.securityGroupId = securityGroupId;
return this;
}
/**
* The ID of security group rule N. Valid values of N: 1 to 100.
*/
public Builder securityGroupRuleId(java.util.List < String > securityGroupRuleId) {
this.putQueryParameter("SecurityGroupRuleId", securityGroupRuleId);
this.securityGroupRuleId = securityGroupRuleId;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.SourceCidrIp` to specify the source IPv4 CIDR block.
*/
public Builder sourceCidrIp(String sourceCidrIp) {
this.putQueryParameter("SourceCidrIp", sourceCidrIp);
this.sourceCidrIp = sourceCidrIp;
return this;
}
/**
* This parameter is deprecated. Use `Permissions.N.SourcePortRange` to specify the range of source ports.
*/
public Builder sourcePortRange(String sourcePortRange) {
this.putQueryParameter("SourcePortRange", sourcePortRange);
this.sourcePortRange = sourcePortRange;
return this;
}
@Override
public RevokeSecurityGroupEgressRequest build() {
return new RevokeSecurityGroupEgressRequest(this);
}
}
public static class Permissions extends TeaModel {
@NameInMap("Description")
private String description;
@NameInMap("DestCidrIp")
private String destCidrIp;
@NameInMap("DestGroupId")
private String destGroupId;
@NameInMap("DestGroupOwnerAccount")
private String destGroupOwnerAccount;
@NameInMap("DestGroupOwnerId")
private String destGroupOwnerId;
@NameInMap("DestPrefixListId")
private String destPrefixListId;
@NameInMap("IpProtocol")
private String ipProtocol;
@NameInMap("Ipv6DestCidrIp")
private String ipv6DestCidrIp;
@NameInMap("Ipv6SourceCidrIp")
private String ipv6SourceCidrIp;
@NameInMap("NicType")
private String nicType;
@NameInMap("Policy")
private String policy;
@NameInMap("PortRange")
private String portRange;
@NameInMap("Priority")
private String priority;
@NameInMap("SourceCidrIp")
private String sourceCidrIp;
@NameInMap("SourcePortRange")
private String sourcePortRange;
private Permissions(Builder builder) {
this.description = builder.description;
this.destCidrIp = builder.destCidrIp;
this.destGroupId = builder.destGroupId;
this.destGroupOwnerAccount = builder.destGroupOwnerAccount;
this.destGroupOwnerId = builder.destGroupOwnerId;
this.destPrefixListId = builder.destPrefixListId;
this.ipProtocol = builder.ipProtocol;
this.ipv6DestCidrIp = builder.ipv6DestCidrIp;
this.ipv6SourceCidrIp = builder.ipv6SourceCidrIp;
this.nicType = builder.nicType;
this.policy = builder.policy;
this.portRange = builder.portRange;
this.priority = builder.priority;
this.sourceCidrIp = builder.sourceCidrIp;
this.sourcePortRange = builder.sourcePortRange;
}
public static Builder builder() {
return new Builder();
}
public static Permissions create() {
return builder().build();
}
/**
* @return description
*/
public String getDescription() {
return this.description;
}
/**
* @return destCidrIp
*/
public String getDestCidrIp() {
return this.destCidrIp;
}
/**
* @return destGroupId
*/
public String getDestGroupId() {
return this.destGroupId;
}
/**
* @return destGroupOwnerAccount
*/
public String getDestGroupOwnerAccount() {
return this.destGroupOwnerAccount;
}
/**
* @return destGroupOwnerId
*/
public String getDestGroupOwnerId() {
return this.destGroupOwnerId;
}
/**
* @return destPrefixListId
*/
public String getDestPrefixListId() {
return this.destPrefixListId;
}
/**
* @return ipProtocol
*/
public String getIpProtocol() {
return this.ipProtocol;
}
/**
* @return ipv6DestCidrIp
*/
public String getIpv6DestCidrIp() {
return this.ipv6DestCidrIp;
}
/**
* @return ipv6SourceCidrIp
*/
public String getIpv6SourceCidrIp() {
return this.ipv6SourceCidrIp;
}
/**
* @return nicType
*/
public String getNicType() {
return this.nicType;
}
/**
* @return policy
*/
public String getPolicy() {
return this.policy;
}
/**
* @return portRange
*/
public String getPortRange() {
return this.portRange;
}
/**
* @return priority
*/
public String getPriority() {
return this.priority;
}
/**
* @return sourceCidrIp
*/
public String getSourceCidrIp() {
return this.sourceCidrIp;
}
/**
* @return sourcePortRange
*/
public String getSourcePortRange() {
return this.sourcePortRange;
}
public static final class Builder {
private String description;
private String destCidrIp;
private String destGroupId;
private String destGroupOwnerAccount;
private String destGroupOwnerId;
private String destPrefixListId;
private String ipProtocol;
private String ipv6DestCidrIp;
private String ipv6SourceCidrIp;
private String nicType;
private String policy;
private String portRange;
private String priority;
private String sourceCidrIp;
private String sourcePortRange;
/**
* The description of security group rule N. The description must be 1 to 512 characters in length.
*
*
* Valid values of N: 1 to 100.
*/
public Builder description(String description) {
this.description = description;
return this;
}
/**
* The destination IPv4 CIDR block for security group rule N. CIDR blocks and IPv4 addresses are supported.
*
*
* Valid values of N: 1 to 100.
*/
public Builder destCidrIp(String destCidrIp) {
this.destCidrIp = destCidrIp;
return this;
}
/**
* The ID of the source security group that is referenced in security group rule N.
*
*
* * At least one of `DestGroupId`, `DestCidrIp`, `Ipv6DestCidrIp`, and `DestPrefixListId` must be specified.
* * If `DestGroupId` is specified but `DestCidrIp` is not specified, the `NicType` parameter must be set to intranet.
* * If both `DestGroupId` and `DestCidrIp` are specified, `DestCidrIp` takes precedence.
*
* Take note of the following items:
*
* * For advanced security groups, security groups cannot be used as authorization objects.
* * For each basic security group, a maximum of 20 security groups can be used as authorization objects.
*
* Valid values of N: 1 to 100.
*/
public Builder destGroupId(String destGroupId) {
this.destGroupId = destGroupId;
return this;
}
/**
* The Alibaba Cloud account that manages the destination security group when you delete security group rules N across accounts.
*
*
* * If both `DestGroupOwnerAccount` and `DestGroupOwnerId` are not specified, the access control is revoked from another security group managed by your account.
* * If `DestCidrIp` is specified, `DestGroupOwnerAccount` is ignored.
*
* Valid values of N: 1 to 100.
*/
public Builder destGroupOwnerAccount(String destGroupOwnerAccount) {
this.destGroupOwnerAccount = destGroupOwnerAccount;
return this;
}
/**
* The ID of the Alibaba Cloud account that manages the destination security group when you delete security group rule N across accounts.
*
*
* * If both `DestGroupOwnerId` and `DestGroupOwnerAccount` are not specified, the access control is revoked from another security group managed by your account.
* * If `DestCidrIp` is specified, `DestGroupOwnerId` is invalid.
*
* Valid values of N: 1 to 100.
*/
public Builder destGroupOwnerId(String destGroupOwnerId) {
this.destGroupOwnerId = destGroupOwnerId;
return this;
}
/**
* The ID of the destination prefix list that is referenced in security group rule N. You can call the [DescribePrefixLists](~~205046~~) operation to query the IDs of available prefix lists.
*
*
* Take note of the following items:
*
* * If a security group is in the classic network, you cannot reference prefix lists in the security group rules. For information about the limits on security groups and prefix lists, see the "Security group limits" section in [Limits](~~25412#SecurityGroupQuota1~~).
* * If you specify `DestCidrIp`, `Ipv6DestCidrIp`, or `DestGroupId`, this parameter is ignored.
*
* Valid values of N: 1 to 100.
*/
public Builder destPrefixListId(String destPrefixListId) {
this.destPrefixListId = destPrefixListId;
return this;
}
/**
* The transport layer protocol of security group rule N. The value of this parameter is case-insensitive. Valid values:
*
*
* * TCP
* * UDP
* * ICMP
* * ICMPv6
* * GRE
* * ALL: All protocols are supported.
*
* Valid values of N: 1 to 100.
*/
public Builder ipProtocol(String ipProtocol) {
this.ipProtocol = ipProtocol;
return this;
}
/**
* The destination IPv6 CIDR block for security group rule N. CIDR blocks and IPv6 addresses are supported.
*
*
* Valid values of N: 1 to 100.
*
* > This parameter is valid only when the destination is Elastic Compute Service (ECS) instances that reside in virtual private clouds (VPCs) and support IPv6 CIDR blocks. You cannot specify both this parameter and the `DestCidrIp` parameter.
*/
public Builder ipv6DestCidrIp(String ipv6DestCidrIp) {
this.ipv6DestCidrIp = ipv6DestCidrIp;
return this;
}
/**
* The source IPv6 CIDR block. CIDR blocks and IPv6 addresses are supported.
*
*
* This parameter is specified to meet quintuple rules. For more information, see [Security group quintuple rules](~~97439~~).
*
* Valid values of N: 1 to 100.
*
* > This parameter is valid only when the source is ECS instances that reside in VPCs and support IPv6 CIDR blocks. You cannot specify both this parameter and the `SourceCidrIp` parameter.
*/
public Builder ipv6SourceCidrIp(String ipv6SourceCidrIp) {
this.ipv6SourceCidrIp = ipv6SourceCidrIp;
return this;
}
/**
* The network interface controller (NIC) type of security group rule N when the security group is in the classic network. Valid values:
*
*
* * internet: public NIC.
* * intranet: internal NIC.
*
* If the security group is in a VPC, this parameter is set to intranet by default and cannot be modified.
*
* If you specify only `SourceGroupId` when you configure access between security groups, this parameter must be set to intranet.
*
* Default value: internet.
*
* Valid values of N: 1 to 100.
*/
public Builder nicType(String nicType) {
this.nicType = nicType;
return this;
}
/**
* The action of security group rule N that determines whether to allow outbound access. Valid values:
*
*
* * accept: allows access.
* * drop: denies access and returns no responses. In this case, the request times out or the connection cannot be established.
*
* Default value: accept.
*
* Valid values of N: 1 to 100.
*/
public Builder policy(String policy) {
this.policy = policy;
return this;
}
/**
* The range of destination ports that correspond to the transport layer protocol for security group rule N. Valid values:
*
*
* * If you set IpProtocol to TCP or UDP, the port number range is 1 to 65535. Specify a port range in the format of \/\. Example: 1/200.
* * If you set IpProtocol to ICMP, the port number range is -1/-1.
* * If you set IpProtocol to GRE, the port number range is -1/-1.
* * If you set IpProtocol to ALL, the port number range is -1/-1.
*
* Valid values of N: 1 to 100.
*/
public Builder portRange(String portRange) {
this.portRange = portRange;
return this;
}
/**
* The priority of security group rule N. A smaller value indicates a higher priority. Valid values: 1 to 100.
*
*
* Default value: 1.
*
* Valid values of N: 1 to 100.
*/
public Builder priority(String priority) {
this.priority = priority;
return this;
}
/**
* The source IPv4 CIDR block for security group rule N. CIDR blocks and IPv4 addresses are supported.
*
*
* This parameter is specified to meet quintuple rules. For more information, see [Security group quintuple rules](~~97439~~).
*
* Valid values of N: 1 to 100.
*/
public Builder sourceCidrIp(String sourceCidrIp) {
this.sourceCidrIp = sourceCidrIp;
return this;
}
/**
* The range of source ports that correspond to the transport layer protocol for security group rule N. Valid values:
*
*
* * If you set IpProtocol to TCP or UDP, the port number range is 1 to 65535. Specify a port range in the format of \/\. Example: 1/200.
* * If you set IpProtocol to ICMP, the port number range is -1/-1.
* * If you set IpProtocol to GRE, the port number range is -1/-1.
* * If you set IpProtocol to ALL, the port number range is -1/-1.
*
* This parameter is specified to meet quintuple rules. For more information, see [Security group quintuple rules](~~97439~~).
*
* Valid values of N: 1 to 100.
*/
public Builder sourcePortRange(String sourcePortRange) {
this.sourcePortRange = sourcePortRange;
return this;
}
public Permissions build() {
return new Permissions(this);
}
}
}
}