updateSpaceResources method

Future<UpdateSpaceResourcesResponse> updateSpaceResources({
  1. required String awsAccountId,
  2. required String spaceId,
  3. List<SpaceResourceOperation>? addResources,
  4. List<SpaceResourceOperation>? removeResources,
})

Adds or removes resources from an Amazon QuickSight space.

May throw AccessDeniedException. May throw ConflictException. May throw InternalFailureException. May throw InvalidParameterValueException. May throw LimitExceededException. May throw ResourceExistsException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter awsAccountId : The ID of the Amazon Web Services account that contains the space.

Parameter spaceId : The ID of the space that you want to update resources for.

Parameter addResources : A list of resources to add to the space.

Parameter removeResources : A list of resources to remove from the space.

Implementation

Future<UpdateSpaceResourcesResponse> updateSpaceResources({
  required String awsAccountId,
  required String spaceId,
  List<SpaceResourceOperation>? addResources,
  List<SpaceResourceOperation>? removeResources,
}) async {
  final $payload = <String, dynamic>{
    if (addResources != null) 'AddResources': addResources,
    if (removeResources != null) 'RemoveResources': removeResources,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v1/accounts/${Uri.encodeComponent(awsAccountId)}/spaces/${Uri.encodeComponent(spaceId)}/resources',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateSpaceResourcesResponse.fromJson(response);
}