revokeEndpointAccess method

Future<EndpointAuthorization> revokeEndpointAccess({
  1. String? account,
  2. String? clusterIdentifier,
  3. bool? force,
  4. List<String>? vpcIds,
})

Revokes access to a cluster.

May throw ClusterNotFoundFault. May throw EndpointAuthorizationNotFoundFault. May throw EndpointNotFoundFault. May throw InvalidAuthorizationStateFault. May throw InvalidClusterSecurityGroupStateFault. May throw InvalidClusterStateFault. May throw InvalidEndpointStateFault.

Parameter account : The Amazon Web Services account ID whose access is to be revoked.

Parameter clusterIdentifier : The cluster to revoke access from.

Parameter force : Indicates whether to force the revoke action. If true, the Redshift-managed VPC endpoints associated with the endpoint authorization are also deleted.

Parameter vpcIds : The virtual private cloud (VPC) identifiers for which access is to be revoked.

Implementation

Future<EndpointAuthorization> revokeEndpointAccess({
  String? account,
  String? clusterIdentifier,
  bool? force,
  List<String>? vpcIds,
}) async {
  final $request = <String, String>{
    if (account != null) 'Account': account,
    if (clusterIdentifier != null) 'ClusterIdentifier': clusterIdentifier,
    if (force != null) 'Force': force.toString(),
    if (vpcIds != null)
      if (vpcIds.isEmpty)
        'VpcIds': ''
      else
        for (var i1 = 0; i1 < vpcIds.length; i1++)
          'VpcIds.VpcIdentifier.${i1 + 1}': vpcIds[i1],
  };
  final $result = await _protocol.send(
    $request,
    action: 'RevokeEndpointAccess',
    version: '2012-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'RevokeEndpointAccessResult',
  );
  return EndpointAuthorization.fromXml($result);
}