/** * 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 AWS_EC2_API RevokeSecurityGroupIngressRequest : public EC2Request { public: 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::String SerializePayload() const override; protected: 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;} /** *

The start of port range for the TCP and UDP protocols, or an ICMP type * number. For the ICMP type number, use -1 to specify all ICMP * types.

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

The start of port range for the TCP and UDP protocols, or an ICMP type * number. For the ICMP type number, use -1 to specify all ICMP * types.

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

The start of port range for the TCP and UDP protocols, or an ICMP type * number. For the ICMP type number, use -1 to specify all ICMP * types.

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

The start of port range for the TCP and UDP protocols, or an ICMP type * number. For the ICMP type number, use -1 to specify all ICMP * types.

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

The ID 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& GetGroupId() const{ return m_groupId; } /** *

The ID 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 GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; } /** *

The ID 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 SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; } /** *

The ID 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 SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); } /** *

The ID 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 SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); } /** *

The ID 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& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;} /** *

The ID 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& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;} /** *

The ID 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& WithGroupId(const char* value) { SetGroupId(value); return *this;} /** *

[EC2-Classic, default VPC] The name of the security group. You must specify * either the security group ID or the security group name in the request.

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

[EC2-Classic, default VPC] The name of the security group. You must specify * either the security group ID or the security group name in the request.

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

[EC2-Classic, default VPC] The name of the security group. You must specify * either the security group ID or the security group name in the request.

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

[EC2-Classic, default VPC] The name of the security group. You must specify * either the security group ID or the security group name in the request.

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

[EC2-Classic, default VPC] The name of the security group. You must specify * either the security group ID or the security group name in the request.

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

[EC2-Classic, default VPC] The name of the security group. You must specify * either the security group ID or the security group name in the request.

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

[EC2-Classic, default VPC] The name of the security group. You must specify * either the security group ID or the security group name in the request.

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

[EC2-Classic, default VPC] The name of the security group. You must specify * either the security group ID or the security group name in the request.

*/ 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;} /** *

[EC2-Classic, 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. For EC2-VPC, 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; } /** *

[EC2-Classic, 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. For EC2-VPC, 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; } /** *

[EC2-Classic, 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. For EC2-VPC, 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; } /** *

[EC2-Classic, 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. For EC2-VPC, 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); } /** *

[EC2-Classic, 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. For EC2-VPC, 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); } /** *

[EC2-Classic, 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. For EC2-VPC, 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;} /** *

[EC2-Classic, 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. For EC2-VPC, 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;} /** *

[EC2-Classic, 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. For EC2-VPC, 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;} /** *

[EC2-Classic] The AWS account ID of the source security group, if the source * security group is in a different account. You can't specify this parameter in * combination with the following parameters: the CIDR IP address range, the IP * protocol, the start of the port range, and the end of the port range. To revoke * a specific rule for an IP protocol and port range, use a set of IP permissions * instead.

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

[EC2-Classic] The AWS account ID of the source security group, if the source * security group is in a different account. You can't specify this parameter in * combination with the following parameters: the CIDR IP address range, the IP * protocol, the start of the port range, and the end of the port range. To revoke * a specific rule for an IP protocol and port range, use a set of IP permissions * instead.

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

[EC2-Classic] The AWS account ID of the source security group, if the source * security group is in a different account. You can't specify this parameter in * combination with the following parameters: the CIDR IP address range, the IP * protocol, the start of the port range, and the end of the port range. To revoke * a specific rule for an IP protocol and port range, use a set of IP permissions * instead.

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

[EC2-Classic] The AWS account ID of the source security group, if the source * security group is in a different account. You can't specify this parameter in * combination with the following parameters: the CIDR IP address range, the IP * protocol, the start of the port range, and the end of the port range. To revoke * a specific rule for an IP protocol and port range, use a set of IP permissions * instead.

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

[EC2-Classic] The AWS account ID of the source security group, if the source * security group is in a different account. You can't specify this parameter in * combination with the following parameters: the CIDR IP address range, the IP * protocol, the start of the port range, and the end of the port range. To revoke * a specific rule for an IP protocol and port range, use a set of IP permissions * instead.

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

[EC2-Classic] The AWS account ID of the source security group, if the source * security group is in a different account. You can't specify this parameter in * combination with the following parameters: the CIDR IP address range, the IP * protocol, the start of the port range, and the end of the port range. To revoke * a specific rule for an IP protocol and port range, use a set of IP permissions * instead.

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

[EC2-Classic] The AWS account ID of the source security group, if the source * security group is in a different account. You can't specify this parameter in * combination with the following parameters: the CIDR IP address range, the IP * protocol, the start of the port range, and the end of the port range. To revoke * a specific rule for an IP protocol and port range, use a set of IP permissions * instead.

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

[EC2-Classic] The AWS account ID of the source security group, if the source * security group is in a different account. You can't specify this parameter in * combination with the following parameters: the CIDR IP address range, the IP * protocol, the start of the port range, and the end of the port range. To revoke * a specific rule for an IP protocol and port range, use a set of IP permissions * instead.

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

The end of port range for the TCP and UDP protocols, or an ICMP code number. * For the ICMP code number, use -1 to specify all ICMP codes for the * ICMP type.

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

The end of port range for the TCP and UDP protocols, or an ICMP code number. * For the ICMP code number, use -1 to specify all ICMP codes for the * ICMP type.

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

The end of port range for the TCP and UDP protocols, or an ICMP code number. * For the ICMP code number, use -1 to specify all ICMP codes for the * ICMP type.

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

The end of port range for the TCP and UDP protocols, or an ICMP code number. * For the ICMP code number, use -1 to specify all ICMP codes for the * ICMP type.

*/ 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;} private: Aws::String m_cidrIp; bool m_cidrIpHasBeenSet; int m_fromPort; bool m_fromPortHasBeenSet; Aws::String m_groupId; bool m_groupIdHasBeenSet; Aws::String m_groupName; bool m_groupNameHasBeenSet; Aws::Vector m_ipPermissions; bool m_ipPermissionsHasBeenSet; Aws::String m_ipProtocol; bool m_ipProtocolHasBeenSet; Aws::String m_sourceSecurityGroupName; bool m_sourceSecurityGroupNameHasBeenSet; Aws::String m_sourceSecurityGroupOwnerId; bool m_sourceSecurityGroupOwnerIdHasBeenSet; int m_toPort; bool m_toPortHasBeenSet; bool m_dryRun; bool m_dryRunHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws