authorizeEndpointAccess method
Grants access to a cluster.
May throw ClusterNotFoundFault.
May throw EndpointAuthorizationAlreadyExistsFault.
May throw EndpointAuthorizationsPerClusterLimitExceededFault.
May throw InvalidAuthorizationStateFault.
May throw InvalidClusterStateFault.
May throw UnsupportedOperationFault.
Parameter account :
The Amazon Web Services account ID to grant access to.
Parameter clusterIdentifier :
The cluster identifier of the cluster to grant access to.
Parameter vpcIds :
The virtual private cloud (VPC) identifiers to grant access to.
Implementation
Future<EndpointAuthorization> authorizeEndpointAccess({
required String account,
String? clusterIdentifier,
List<String>? vpcIds,
}) async {
final $request = <String, String>{
'Account': account,
if (clusterIdentifier != null) 'ClusterIdentifier': clusterIdentifier,
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: 'AuthorizeEndpointAccess',
version: '2012-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'AuthorizeEndpointAccessResult',
);
return EndpointAuthorization.fromXml($result);
}