revokeClusterSecurityGroupIngress method
Revokes an ingress rule in an Amazon Redshift security group for a previously authorized IP range or Amazon EC2 security group. To add an ingress rule, see AuthorizeClusterSecurityGroupIngress. For information about managing security groups, go to Amazon Redshift Cluster Security Groups in the Amazon Redshift Cluster Management Guide.
May throw ClusterSecurityGroupNotFoundFault. May throw AuthorizationNotFoundFault. May throw InvalidClusterSecurityGroupStateFault.
Parameter clusterSecurityGroupName
:
The name of the security Group from which to revoke the ingress rule.
Parameter cidrip
:
The IP range for which to revoke access. This range must be a valid
Classless Inter-Domain Routing (CIDR) block of IP addresses. If
CIDRIP
is specified, EC2SecurityGroupName
and
EC2SecurityGroupOwnerId
cannot be provided.
Parameter eC2SecurityGroupName
:
The name of the EC2 Security Group whose access is to be revoked. If
EC2SecurityGroupName
is specified,
EC2SecurityGroupOwnerId
must also be provided and
CIDRIP
cannot be provided.
Parameter eC2SecurityGroupOwnerId
:
The AWS account number of the owner of the security group specified in the
EC2SecurityGroupName
parameter. The AWS access key ID is not
an acceptable value. If EC2SecurityGroupOwnerId
is specified,
EC2SecurityGroupName
must also be provided. and
CIDRIP
cannot be provided.
Example: 111122223333
Implementation
Future<RevokeClusterSecurityGroupIngressResult>
revokeClusterSecurityGroupIngress({
required String clusterSecurityGroupName,
String? cidrip,
String? eC2SecurityGroupName,
String? eC2SecurityGroupOwnerId,
}) async {
ArgumentError.checkNotNull(
clusterSecurityGroupName, 'clusterSecurityGroupName');
_s.validateStringLength(
'clusterSecurityGroupName',
clusterSecurityGroupName,
0,
2147483647,
isRequired: true,
);
_s.validateStringLength(
'cidrip',
cidrip,
0,
2147483647,
);
_s.validateStringLength(
'eC2SecurityGroupName',
eC2SecurityGroupName,
0,
2147483647,
);
_s.validateStringLength(
'eC2SecurityGroupOwnerId',
eC2SecurityGroupOwnerId,
0,
2147483647,
);
final $request = <String, dynamic>{};
$request['ClusterSecurityGroupName'] = clusterSecurityGroupName;
cidrip?.also((arg) => $request['CIDRIP'] = arg);
eC2SecurityGroupName?.also((arg) => $request['EC2SecurityGroupName'] = arg);
eC2SecurityGroupOwnerId
?.also((arg) => $request['EC2SecurityGroupOwnerId'] = arg);
final $result = await _protocol.send(
$request,
action: 'RevokeClusterSecurityGroupIngress',
version: '2012-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['RevokeClusterSecurityGroupIngressMessage'],
shapes: shapes,
resultWrapper: 'RevokeClusterSecurityGroupIngressResult',
);
return RevokeClusterSecurityGroupIngressResult.fromXml($result);
}