updateResource method

Future<void> updateResource({
  1. required String resourceArn,
  2. required String roleArn,
})

Updates the data access role used for vending access to the given (registered) resource in AWS Lake Formation.

May throw InvalidInputException. May throw InternalServiceException. May throw OperationTimeoutException. May throw EntityNotFoundException.

Parameter resourceArn : The resource ARN.

Parameter roleArn : The new role to use for the given resource registered in AWS Lake Formation.

Implementation

Future<void> updateResource({
  required String resourceArn,
  required String roleArn,
}) async {
  ArgumentError.checkNotNull(resourceArn, 'resourceArn');
  ArgumentError.checkNotNull(roleArn, 'roleArn');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSLakeFormation.UpdateResource'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceArn': resourceArn,
      'RoleArn': roleArn,
    },
  );
}