updateDataSetPermissions method
Future<UpdateDataSetPermissionsResponse>
updateDataSetPermissions({
- required String awsAccountId,
- required String dataSetId,
- List<
ResourcePermission> ? grantPermissions, - List<
ResourcePermission> ? revokePermissions,
Updates the permissions on a dataset.
The permissions resource is
arn:aws:quicksight:region:aws-account-id:dataset/data-set-id
.
May throw AccessDeniedException. May throw ConflictException. May throw InvalidParameterValueException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw InternalFailureException.
Parameter awsAccountId
:
The AWS account ID.
Parameter dataSetId
:
The ID for the dataset whose permissions you want to update. This ID is
unique per AWS Region for each AWS account.
Parameter grantPermissions
:
The resource permissions that you want to grant to the dataset.
Parameter revokePermissions
:
The resource permissions that you want to revoke from the dataset.
Implementation
Future<UpdateDataSetPermissionsResponse> updateDataSetPermissions({
required String awsAccountId,
required String dataSetId,
List<ResourcePermission>? grantPermissions,
List<ResourcePermission>? revokePermissions,
}) async {
ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
_s.validateStringLength(
'awsAccountId',
awsAccountId,
12,
12,
isRequired: true,
);
ArgumentError.checkNotNull(dataSetId, 'dataSetId');
final $payload = <String, dynamic>{
if (grantPermissions != null) 'GrantPermissions': grantPermissions,
if (revokePermissions != null) 'RevokePermissions': revokePermissions,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/data-sets/${Uri.encodeComponent(dataSetId)}/permissions',
exceptionFnMap: _exceptionFns,
);
return UpdateDataSetPermissionsResponse.fromJson(response);
}