modifyEndpointAccess method

Future<EndpointAccess> modifyEndpointAccess({
  1. required String endpointName,
  2. List<String>? vpcSecurityGroupIds,
})

Modifies a Redshift-managed VPC endpoint.

May throw ClusterNotFoundFault. May throw EndpointNotFoundFault. May throw InvalidClusterSecurityGroupStateFault. May throw InvalidClusterStateFault. May throw InvalidEndpointStateFault. May throw UnauthorizedOperation.

Parameter endpointName : The endpoint to be modified.

Parameter vpcSecurityGroupIds : The complete list of VPC security groups associated with the endpoint after the endpoint is modified.

Implementation

Future<EndpointAccess> modifyEndpointAccess({
  required String endpointName,
  List<String>? vpcSecurityGroupIds,
}) async {
  final $request = <String, String>{
    'EndpointName': endpointName,
    if (vpcSecurityGroupIds != null)
      if (vpcSecurityGroupIds.isEmpty)
        'VpcSecurityGroupIds': ''
      else
        for (var i1 = 0; i1 < vpcSecurityGroupIds.length; i1++)
          'VpcSecurityGroupIds.VpcSecurityGroupId.${i1 + 1}':
              vpcSecurityGroupIds[i1],
  };
  final $result = await _protocol.send(
    $request,
    action: 'ModifyEndpointAccess',
    version: '2012-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'ModifyEndpointAccessResult',
  );
  return EndpointAccess.fromXml($result);
}