updateResourceProfile method

Future<void> updateResourceProfile({
  1. required String resourceArn,
  2. int? sensitivityScoreOverride,
})

Updates the sensitivity score for an S3 bucket.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the S3 bucket that the request applies to.

Parameter sensitivityScoreOverride : The new sensitivity score for the bucket. Valid values are: 100, assign the maximum score and apply the Sensitive label to the bucket; and, null (empty), assign a score that Amazon Macie calculates automatically after you submit the request.

Implementation

Future<void> updateResourceProfile({
  required String resourceArn,
  int? sensitivityScoreOverride,
}) async {
  final $query = <String, List<String>>{
    'resourceArn': [resourceArn],
  };
  final $payload = <String, dynamic>{
    if (sensitivityScoreOverride != null)
      'sensitivityScoreOverride': sensitivityScoreOverride,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/resource-profiles',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}