authorizeCacheSecurityGroupIngress method

Future<AuthorizeCacheSecurityGroupIngressResult> authorizeCacheSecurityGroupIngress({
  1. required String cacheSecurityGroupName,
  2. required String eC2SecurityGroupName,
  3. required String eC2SecurityGroupOwnerId,
})

Allows network ingress to a cache security group. Applications using ElastiCache must be running on Amazon EC2, and Amazon EC2 security groups are used as the authorization mechanism.

May throw CacheSecurityGroupNotFoundFault. May throw InvalidCacheSecurityGroupStateFault. May throw AuthorizationAlreadyExistsFault. May throw InvalidParameterValueException. May throw InvalidParameterCombinationException.

Parameter cacheSecurityGroupName : The cache security group that allows network ingress.

Parameter eC2SecurityGroupName : The Amazon EC2 security group to be authorized for ingress to the cache security group.

Parameter eC2SecurityGroupOwnerId : The AWS account number of the Amazon EC2 security group owner. Note that this is not the same thing as an AWS access key ID - you must provide a valid AWS account number for this parameter.

Implementation

Future<AuthorizeCacheSecurityGroupIngressResult>
    authorizeCacheSecurityGroupIngress({
  required String cacheSecurityGroupName,
  required String eC2SecurityGroupName,
  required String eC2SecurityGroupOwnerId,
}) async {
  ArgumentError.checkNotNull(
      cacheSecurityGroupName, 'cacheSecurityGroupName');
  ArgumentError.checkNotNull(eC2SecurityGroupName, 'eC2SecurityGroupName');
  ArgumentError.checkNotNull(
      eC2SecurityGroupOwnerId, 'eC2SecurityGroupOwnerId');
  final $request = <String, dynamic>{};
  $request['CacheSecurityGroupName'] = cacheSecurityGroupName;
  $request['EC2SecurityGroupName'] = eC2SecurityGroupName;
  $request['EC2SecurityGroupOwnerId'] = eC2SecurityGroupOwnerId;
  final $result = await _protocol.send(
    $request,
    action: 'AuthorizeCacheSecurityGroupIngress',
    version: '2015-02-02',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['AuthorizeCacheSecurityGroupIngressMessage'],
    shapes: shapes,
    resultWrapper: 'AuthorizeCacheSecurityGroupIngressResult',
  );
  return AuthorizeCacheSecurityGroupIngressResult.fromXml($result);
}