authorizeDataShare method

Future<DataShare> authorizeDataShare({
  1. required String consumerIdentifier,
  2. required String dataShareArn,
  3. bool? allowWrites,
})

From a data producer account, authorizes the sharing of a datashare with one or more consumer accounts or managing entities. To authorize a datashare for a data consumer, the producer account must have the correct access permissions.

May throw InvalidDataShareFault.

Parameter consumerIdentifier : The identifier of the data consumer that is authorized to access the datashare. This identifier is an Amazon Web Services account ID or a keyword, such as ADX.

Parameter dataShareArn : The Amazon Resource Name (ARN) of the datashare namespace that producers are to authorize sharing for.

Parameter allowWrites : If set to true, allows write operations for a datashare.

Implementation

Future<DataShare> authorizeDataShare({
  required String consumerIdentifier,
  required String dataShareArn,
  bool? allowWrites,
}) async {
  final $request = <String, String>{
    'ConsumerIdentifier': consumerIdentifier,
    'DataShareArn': dataShareArn,
    if (allowWrites != null) 'AllowWrites': allowWrites.toString(),
  };
  final $result = await _protocol.send(
    $request,
    action: 'AuthorizeDataShare',
    version: '2012-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'AuthorizeDataShareResult',
  );
  return DataShare.fromXml($result);
}