disassociateResourceShare method

Future<DisassociateResourceShareResponse> disassociateResourceShare({
  1. required String resourceShareArn,
  2. String? clientToken,
  3. List<String>? principals,
  4. List<String>? resourceArns,
})

Disassociates the specified principals or resources from the specified resource share.

May throw IdempotentParameterMismatchException. May throw ResourceShareLimitExceededException. May throw MalformedArnException. May throw InvalidStateTransitionException. May throw InvalidClientTokenException. May throw InvalidParameterException. May throw OperationNotPermittedException. May throw ServerInternalException. May throw ServiceUnavailableException. May throw UnknownResourceException.

Parameter resourceShareArn : The Amazon Resource Name (ARN) of the resource share.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Parameter principals : The principals.

Parameter resourceArns : The Amazon Resource Names (ARNs) of the resources.

Implementation

Future<DisassociateResourceShareResponse> disassociateResourceShare({
  required String resourceShareArn,
  String? clientToken,
  List<String>? principals,
  List<String>? resourceArns,
}) async {
  ArgumentError.checkNotNull(resourceShareArn, 'resourceShareArn');
  final $payload = <String, dynamic>{
    'resourceShareArn': resourceShareArn,
    if (clientToken != null) 'clientToken': clientToken,
    if (principals != null) 'principals': principals,
    if (resourceArns != null) 'resourceArns': resourceArns,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/disassociateresourceshare',
    exceptionFnMap: _exceptionFns,
  );
  return DisassociateResourceShareResponse.fromJson(response);
}