revokeDBSecurityGroupIngress method
Revokes ingress from a DBSecurityGroup for previously authorized IP ranges or EC2 or VPC Security Groups. Required parameters for this API are one of CIDRIP, EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either EC2SecurityGroupName or EC2SecurityGroupId).
May throw DBSecurityGroupNotFoundFault. May throw AuthorizationNotFoundFault. May throw InvalidDBSecurityGroupStateFault.
Parameter dBSecurityGroupName
:
The name of the DB security group to revoke ingress from.
Parameter cidrip
:
The IP range to revoke access from. Must be a valid CIDR range. If
CIDRIP
is specified, EC2SecurityGroupName
,
EC2SecurityGroupId
and EC2SecurityGroupOwnerId
can't be provided.
Parameter eC2SecurityGroupId
:
The id of the EC2 security group to revoke access from. For VPC DB
security groups, EC2SecurityGroupId
must be provided.
Otherwise, EC2SecurityGroupOwnerId and either
EC2SecurityGroupName
or EC2SecurityGroupId
must
be provided.
Parameter eC2SecurityGroupName
:
The name of the EC2 security group to revoke access from. For VPC DB
security groups, EC2SecurityGroupId
must be provided.
Otherwise, EC2SecurityGroupOwnerId and either
EC2SecurityGroupName
or EC2SecurityGroupId
must
be provided.
Parameter eC2SecurityGroupOwnerId
:
The AWS account number of the owner of the EC2 security group specified in
the EC2SecurityGroupName
parameter. The AWS access key ID
isn't an acceptable value. For VPC DB security groups,
EC2SecurityGroupId
must be provided. Otherwise,
EC2SecurityGroupOwnerId and either EC2SecurityGroupName
or
EC2SecurityGroupId
must be provided.
Implementation
Future<RevokeDBSecurityGroupIngressResult> revokeDBSecurityGroupIngress({
required String dBSecurityGroupName,
String? cidrip,
String? eC2SecurityGroupId,
String? eC2SecurityGroupName,
String? eC2SecurityGroupOwnerId,
}) async {
ArgumentError.checkNotNull(dBSecurityGroupName, 'dBSecurityGroupName');
final $request = <String, dynamic>{};
$request['DBSecurityGroupName'] = dBSecurityGroupName;
cidrip?.also((arg) => $request['CIDRIP'] = arg);
eC2SecurityGroupId?.also((arg) => $request['EC2SecurityGroupId'] = arg);
eC2SecurityGroupName?.also((arg) => $request['EC2SecurityGroupName'] = arg);
eC2SecurityGroupOwnerId
?.also((arg) => $request['EC2SecurityGroupOwnerId'] = arg);
final $result = await _protocol.send(
$request,
action: 'RevokeDBSecurityGroupIngress',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['RevokeDBSecurityGroupIngressMessage'],
shapes: shapes,
resultWrapper: 'RevokeDBSecurityGroupIngressResult',
);
return RevokeDBSecurityGroupIngressResult.fromXml($result);
}