/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class RevokeSecurityGroupIngressRequest : public EC2Request { public: AWS_EC2_API RevokeSecurityGroupIngressRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "RevokeSecurityGroupIngress"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The CIDR IP address range. You can't specify this parameter when specifying a * source security group.

*/ inline const Aws::String& GetCidrIp() const{ return m_cidrIp; } /** *

The CIDR IP address range. You can't specify this parameter when specifying a * source security group.

*/ inline bool CidrIpHasBeenSet() const { return m_cidrIpHasBeenSet; } /** *

The CIDR IP address range. You can't specify this parameter when specifying a * source security group.

*/ inline void SetCidrIp(const Aws::String& value) { m_cidrIpHasBeenSet = true; m_cidrIp = value; } /** *

The CIDR IP address range. You can't specify this parameter when specifying a * source security group.

*/ inline void SetCidrIp(Aws::String&& value) { m_cidrIpHasBeenSet = true; m_cidrIp = std::move(value); } /** *

The CIDR IP address range. You can't specify this parameter when specifying a * source security group.

*/ inline void SetCidrIp(const char* value) { m_cidrIpHasBeenSet = true; m_cidrIp.assign(value); } /** *

The CIDR IP address range. You can't specify this parameter when specifying a * source security group.

*/ inline RevokeSecurityGroupIngressRequest& WithCidrIp(const Aws::String& value) { SetCidrIp(value); return *this;} /** *

The CIDR IP address range. You can't specify this parameter when specifying a * source security group.

*/ inline RevokeSecurityGroupIngressRequest& WithCidrIp(Aws::String&& value) { SetCidrIp(std::move(value)); return *this;} /** *

The CIDR IP address range. You can't specify this parameter when specifying a * source security group.

*/ inline RevokeSecurityGroupIngressRequest& WithCidrIp(const char* value) { SetCidrIp(value); return *this;} /** *

If the protocol is TCP or UDP, this is the start of the port range. If the * protocol is ICMP, this is the type number. A value of -1 indicates all ICMP * types.

*/ inline int GetFromPort() const{ return m_fromPort; } /** *

If the protocol is TCP or UDP, this is the start of the port range. If the * protocol is ICMP, this is the type number. A value of -1 indicates all ICMP * types.

*/ inline bool FromPortHasBeenSet() const { return m_fromPortHasBeenSet; } /** *

If the protocol is TCP or UDP, this is the start of the port range. If the * protocol is ICMP, this is the type number. A value of -1 indicates all ICMP * types.

*/ inline void SetFromPort(int value) { m_fromPortHasBeenSet = true; m_fromPort = value; } /** *

If the protocol is TCP or UDP, this is the start of the port range. If the * protocol is ICMP, this is the type number. A value of -1 indicates all ICMP * types.

*/ inline RevokeSecurityGroupIngressRequest& WithFromPort(int value) { SetFromPort(value); return *this;} /** *

The ID of the security group.

*/ inline const Aws::String& GetGroupId() const{ return m_groupId; } /** *

The ID of the security group.

*/ inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; } /** *

The ID of the security group.

*/ inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; } /** *

The ID of the security group.

*/ inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); } /** *

The ID of the security group.

*/ inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); } /** *

The ID of the security group.

*/ inline RevokeSecurityGroupIngressRequest& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;} /** *

The ID of the security group.

*/ inline RevokeSecurityGroupIngressRequest& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;} /** *

The ID of the security group.

*/ inline RevokeSecurityGroupIngressRequest& WithGroupId(const char* value) { SetGroupId(value); return *this;} /** *

[Default VPC] The name of the security group. You must specify either the * security group ID or the security group name in the request. For security groups * in a nondefault VPC, you must specify the security group ID.

*/ inline const Aws::String& GetGroupName() const{ return m_groupName; } /** *

[Default VPC] The name of the security group. You must specify either the * security group ID or the security group name in the request. For security groups * in a nondefault VPC, you must specify the security group ID.

*/ inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } /** *

[Default VPC] The name of the security group. You must specify either the * security group ID or the security group name in the request. For security groups * in a nondefault VPC, you must specify the security group ID.

*/ inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } /** *

[Default VPC] The name of the security group. You must specify either the * security group ID or the security group name in the request. For security groups * in a nondefault VPC, you must specify the security group ID.

*/ inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } /** *

[Default VPC] The name of the security group. You must specify either the * security group ID or the security group name in the request. For security groups * in a nondefault VPC, you must specify the security group ID.

*/ inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } /** *

[Default VPC] The name of the security group. You must specify either the * security group ID or the security group name in the request. For security groups * in a nondefault VPC, you must specify the security group ID.

*/ inline RevokeSecurityGroupIngressRequest& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} /** *

[Default VPC] The name of the security group. You must specify either the * security group ID or the security group name in the request. For security groups * in a nondefault VPC, you must specify the security group ID.

*/ inline RevokeSecurityGroupIngressRequest& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} /** *

[Default VPC] The name of the security group. You must specify either the * security group ID or the security group name in the request. For security groups * in a nondefault VPC, you must specify the security group ID.

*/ inline RevokeSecurityGroupIngressRequest& WithGroupName(const char* value) { SetGroupName(value); return *this;} /** *

The sets of IP permissions. You can't specify a source security group and a * CIDR IP address range in the same set of permissions.

*/ inline const Aws::Vector& GetIpPermissions() const{ return m_ipPermissions; } /** *

The sets of IP permissions. You can't specify a source security group and a * CIDR IP address range in the same set of permissions.

*/ inline bool IpPermissionsHasBeenSet() const { return m_ipPermissionsHasBeenSet; } /** *

The sets of IP permissions. You can't specify a source security group and a * CIDR IP address range in the same set of permissions.

*/ inline void SetIpPermissions(const Aws::Vector& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = value; } /** *

The sets of IP permissions. You can't specify a source security group and a * CIDR IP address range in the same set of permissions.

*/ inline void SetIpPermissions(Aws::Vector&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions = std::move(value); } /** *

The sets of IP permissions. You can't specify a source security group and a * CIDR IP address range in the same set of permissions.

*/ inline RevokeSecurityGroupIngressRequest& WithIpPermissions(const Aws::Vector& value) { SetIpPermissions(value); return *this;} /** *

The sets of IP permissions. You can't specify a source security group and a * CIDR IP address range in the same set of permissions.

*/ inline RevokeSecurityGroupIngressRequest& WithIpPermissions(Aws::Vector&& value) { SetIpPermissions(std::move(value)); return *this;} /** *

The sets of IP permissions. You can't specify a source security group and a * CIDR IP address range in the same set of permissions.

*/ inline RevokeSecurityGroupIngressRequest& AddIpPermissions(const IpPermission& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.push_back(value); return *this; } /** *

The sets of IP permissions. You can't specify a source security group and a * CIDR IP address range in the same set of permissions.

*/ inline RevokeSecurityGroupIngressRequest& AddIpPermissions(IpPermission&& value) { m_ipPermissionsHasBeenSet = true; m_ipPermissions.push_back(std::move(value)); return *this; } /** *

The IP protocol name (tcp, udp, icmp) * or number (see Protocol * Numbers). Use -1 to specify all.

*/ inline const Aws::String& GetIpProtocol() const{ return m_ipProtocol; } /** *

The IP protocol name (tcp, udp, icmp) * or number (see Protocol * Numbers). Use -1 to specify all.

*/ inline bool IpProtocolHasBeenSet() const { return m_ipProtocolHasBeenSet; } /** *

The IP protocol name (tcp, udp, icmp) * or number (see Protocol * Numbers). Use -1 to specify all.

*/ inline void SetIpProtocol(const Aws::String& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = value; } /** *

The IP protocol name (tcp, udp, icmp) * or number (see Protocol * Numbers). Use -1 to specify all.

*/ inline void SetIpProtocol(Aws::String&& value) { m_ipProtocolHasBeenSet = true; m_ipProtocol = std::move(value); } /** *

The IP protocol name (tcp, udp, icmp) * or number (see Protocol * Numbers). Use -1 to specify all.

*/ inline void SetIpProtocol(const char* value) { m_ipProtocolHasBeenSet = true; m_ipProtocol.assign(value); } /** *

The IP protocol name (tcp, udp, icmp) * or number (see Protocol * Numbers). Use -1 to specify all.

*/ inline RevokeSecurityGroupIngressRequest& WithIpProtocol(const Aws::String& value) { SetIpProtocol(value); return *this;} /** *

The IP protocol name (tcp, udp, icmp) * or number (see Protocol * Numbers). Use -1 to specify all.

*/ inline RevokeSecurityGroupIngressRequest& WithIpProtocol(Aws::String&& value) { SetIpProtocol(std::move(value)); return *this;} /** *

The IP protocol name (tcp, udp, icmp) * or number (see Protocol * Numbers). Use -1 to specify all.

*/ inline RevokeSecurityGroupIngressRequest& WithIpProtocol(const char* value) { SetIpProtocol(value); return *this;} /** *

[Default VPC] The name of the source security group. You can't specify this * parameter in combination with the following parameters: the CIDR IP address * range, the start of the port range, the IP protocol, and the end of the port * range. The source security group must be in the same VPC. To revoke a specific * rule for an IP protocol and port range, use a set of IP permissions instead.

*/ inline const Aws::String& GetSourceSecurityGroupName() const{ return m_sourceSecurityGroupName; } /** *

[Default VPC] The name of the source security group. You can't specify this * parameter in combination with the following parameters: the CIDR IP address * range, the start of the port range, the IP protocol, and the end of the port * range. The source security group must be in the same VPC. To revoke a specific * rule for an IP protocol and port range, use a set of IP permissions instead.

*/ inline bool SourceSecurityGroupNameHasBeenSet() const { return m_sourceSecurityGroupNameHasBeenSet; } /** *

[Default VPC] The name of the source security group. You can't specify this * parameter in combination with the following parameters: the CIDR IP address * range, the start of the port range, the IP protocol, and the end of the port * range. The source security group must be in the same VPC. To revoke a specific * rule for an IP protocol and port range, use a set of IP permissions instead.

*/ inline void SetSourceSecurityGroupName(const Aws::String& value) { m_sourceSecurityGroupNameHasBeenSet = true; m_sourceSecurityGroupName = value; } /** *

[Default VPC] The name of the source security group. You can't specify this * parameter in combination with the following parameters: the CIDR IP address * range, the start of the port range, the IP protocol, and the end of the port * range. The source security group must be in the same VPC. To revoke a specific * rule for an IP protocol and port range, use a set of IP permissions instead.

*/ inline void SetSourceSecurityGroupName(Aws::String&& value) { m_sourceSecurityGroupNameHasBeenSet = true; m_sourceSecurityGroupName = std::move(value); } /** *

[Default VPC] The name of the source security group. You can't specify this * parameter in combination with the following parameters: the CIDR IP address * range, the start of the port range, the IP protocol, and the end of the port * range. The source security group must be in the same VPC. To revoke a specific * rule for an IP protocol and port range, use a set of IP permissions instead.

*/ inline void SetSourceSecurityGroupName(const char* value) { m_sourceSecurityGroupNameHasBeenSet = true; m_sourceSecurityGroupName.assign(value); } /** *

[Default VPC] The name of the source security group. You can't specify this * parameter in combination with the following parameters: the CIDR IP address * range, the start of the port range, the IP protocol, and the end of the port * range. The source security group must be in the same VPC. To revoke a specific * rule for an IP protocol and port range, use a set of IP permissions instead.

*/ inline RevokeSecurityGroupIngressRequest& WithSourceSecurityGroupName(const Aws::String& value) { SetSourceSecurityGroupName(value); return *this;} /** *

[Default VPC] The name of the source security group. You can't specify this * parameter in combination with the following parameters: the CIDR IP address * range, the start of the port range, the IP protocol, and the end of the port * range. The source security group must be in the same VPC. To revoke a specific * rule for an IP protocol and port range, use a set of IP permissions instead.

*/ inline RevokeSecurityGroupIngressRequest& WithSourceSecurityGroupName(Aws::String&& value) { SetSourceSecurityGroupName(std::move(value)); return *this;} /** *

[Default VPC] The name of the source security group. You can't specify this * parameter in combination with the following parameters: the CIDR IP address * range, the start of the port range, the IP protocol, and the end of the port * range. The source security group must be in the same VPC. To revoke a specific * rule for an IP protocol and port range, use a set of IP permissions instead.

*/ inline RevokeSecurityGroupIngressRequest& WithSourceSecurityGroupName(const char* value) { SetSourceSecurityGroupName(value); return *this;} /** *

Not supported.

*/ inline const Aws::String& GetSourceSecurityGroupOwnerId() const{ return m_sourceSecurityGroupOwnerId; } /** *

Not supported.

*/ inline bool SourceSecurityGroupOwnerIdHasBeenSet() const { return m_sourceSecurityGroupOwnerIdHasBeenSet; } /** *

Not supported.

*/ inline void SetSourceSecurityGroupOwnerId(const Aws::String& value) { m_sourceSecurityGroupOwnerIdHasBeenSet = true; m_sourceSecurityGroupOwnerId = value; } /** *

Not supported.

*/ inline void SetSourceSecurityGroupOwnerId(Aws::String&& value) { m_sourceSecurityGroupOwnerIdHasBeenSet = true; m_sourceSecurityGroupOwnerId = std::move(value); } /** *

Not supported.

*/ inline void SetSourceSecurityGroupOwnerId(const char* value) { m_sourceSecurityGroupOwnerIdHasBeenSet = true; m_sourceSecurityGroupOwnerId.assign(value); } /** *

Not supported.

*/ inline RevokeSecurityGroupIngressRequest& WithSourceSecurityGroupOwnerId(const Aws::String& value) { SetSourceSecurityGroupOwnerId(value); return *this;} /** *

Not supported.

*/ inline RevokeSecurityGroupIngressRequest& WithSourceSecurityGroupOwnerId(Aws::String&& value) { SetSourceSecurityGroupOwnerId(std::move(value)); return *this;} /** *

Not supported.

*/ inline RevokeSecurityGroupIngressRequest& WithSourceSecurityGroupOwnerId(const char* value) { SetSourceSecurityGroupOwnerId(value); return *this;} /** *

If the protocol is TCP or UDP, this is the end of the port range. If the * protocol is ICMP, this is the code. A value of -1 indicates all ICMP codes.

*/ inline int GetToPort() const{ return m_toPort; } /** *

If the protocol is TCP or UDP, this is the end of the port range. If the * protocol is ICMP, this is the code. A value of -1 indicates all ICMP codes.

*/ inline bool ToPortHasBeenSet() const { return m_toPortHasBeenSet; } /** *

If the protocol is TCP or UDP, this is the end of the port range. If the * protocol is ICMP, this is the code. A value of -1 indicates all ICMP codes.

*/ inline void SetToPort(int value) { m_toPortHasBeenSet = true; m_toPort = value; } /** *

If the protocol is TCP or UDP, this is the end of the port range. If the * protocol is ICMP, this is the code. A value of -1 indicates all ICMP codes.

*/ inline RevokeSecurityGroupIngressRequest& WithToPort(int value) { SetToPort(value); return *this;} /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline RevokeSecurityGroupIngressRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

The IDs of the security group rules.

*/ inline const Aws::Vector& GetSecurityGroupRuleIds() const{ return m_securityGroupRuleIds; } /** *

The IDs of the security group rules.

*/ inline bool SecurityGroupRuleIdsHasBeenSet() const { return m_securityGroupRuleIdsHasBeenSet; } /** *

The IDs of the security group rules.

*/ inline void SetSecurityGroupRuleIds(const Aws::Vector& value) { m_securityGroupRuleIdsHasBeenSet = true; m_securityGroupRuleIds = value; } /** *

The IDs of the security group rules.

*/ inline void SetSecurityGroupRuleIds(Aws::Vector&& value) { m_securityGroupRuleIdsHasBeenSet = true; m_securityGroupRuleIds = std::move(value); } /** *

The IDs of the security group rules.

*/ inline RevokeSecurityGroupIngressRequest& WithSecurityGroupRuleIds(const Aws::Vector& value) { SetSecurityGroupRuleIds(value); return *this;} /** *

The IDs of the security group rules.

*/ inline RevokeSecurityGroupIngressRequest& WithSecurityGroupRuleIds(Aws::Vector&& value) { SetSecurityGroupRuleIds(std::move(value)); return *this;} /** *

The IDs of the security group rules.

*/ inline RevokeSecurityGroupIngressRequest& AddSecurityGroupRuleIds(const Aws::String& value) { m_securityGroupRuleIdsHasBeenSet = true; m_securityGroupRuleIds.push_back(value); return *this; } /** *

The IDs of the security group rules.

*/ inline RevokeSecurityGroupIngressRequest& AddSecurityGroupRuleIds(Aws::String&& value) { m_securityGroupRuleIdsHasBeenSet = true; m_securityGroupRuleIds.push_back(std::move(value)); return *this; } /** *

The IDs of the security group rules.

*/ inline RevokeSecurityGroupIngressRequest& AddSecurityGroupRuleIds(const char* value) { m_securityGroupRuleIdsHasBeenSet = true; m_securityGroupRuleIds.push_back(value); return *this; } private: Aws::String m_cidrIp; bool m_cidrIpHasBeenSet = false; int m_fromPort; bool m_fromPortHasBeenSet = false; Aws::String m_groupId; bool m_groupIdHasBeenSet = false; Aws::String m_groupName; bool m_groupNameHasBeenSet = false; Aws::Vector m_ipPermissions; bool m_ipPermissionsHasBeenSet = false; Aws::String m_ipProtocol; bool m_ipProtocolHasBeenSet = false; Aws::String m_sourceSecurityGroupName; bool m_sourceSecurityGroupNameHasBeenSet = false; Aws::String m_sourceSecurityGroupOwnerId; bool m_sourceSecurityGroupOwnerIdHasBeenSet = false; int m_toPort; bool m_toPortHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::Vector m_securityGroupRuleIds; bool m_securityGroupRuleIdsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws