updateAnalysisPermissions method
Updates the read and write permissions for an analysis.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnsupportedUserEditionException.
Parameter analysisId :
The ID of the analysis whose permissions you're updating. The ID is part
of the analysis URL.
Parameter awsAccountId :
The ID of the Amazon Web Services account that contains the analysis whose
permissions you're updating. You must be using the Amazon Web Services
account that the analysis is in.
Parameter grantPermissions :
A structure that describes the permissions to add and the principal to add
them to.
Parameter revokePermissions :
A structure that describes the permissions to remove and the principal to
remove them from.
Implementation
Future<UpdateAnalysisPermissionsResponse> updateAnalysisPermissions({
required String analysisId,
required String awsAccountId,
List<ResourcePermission>? grantPermissions,
List<ResourcePermission>? revokePermissions,
}) async {
final $payload = <String, dynamic>{
if (grantPermissions != null) 'GrantPermissions': grantPermissions,
if (revokePermissions != null) 'RevokePermissions': revokePermissions,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/analyses/${Uri.encodeComponent(analysisId)}/permissions',
exceptionFnMap: _exceptionFns,
);
return UpdateAnalysisPermissionsResponse.fromJson(response);
}