updateObjectAttributes method

Future<UpdateObjectAttributesResponse> updateObjectAttributes({
  1. required List<ObjectAttributeUpdate> attributeUpdates,
  2. required String directoryArn,
  3. required ObjectReference objectReference,
})

Updates a given object's attributes.

May throw InternalServiceException. May throw InvalidArnException. May throw RetryableConflictException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw DirectoryNotEnabledException. May throw ResourceNotFoundException. May throw LinkNameAlreadyInUseException. May throw FacetValidationException.

Parameter attributeUpdates : The attributes update structure.

Parameter directoryArn : The Amazon Resource Name (ARN) that is associated with the Directory where the object resides. For more information, see arns.

Parameter objectReference : The reference that identifies the object.

Implementation

Future<UpdateObjectAttributesResponse> updateObjectAttributes({
  required List<ObjectAttributeUpdate> attributeUpdates,
  required String directoryArn,
  required ObjectReference objectReference,
}) async {
  ArgumentError.checkNotNull(attributeUpdates, 'attributeUpdates');
  ArgumentError.checkNotNull(directoryArn, 'directoryArn');
  ArgumentError.checkNotNull(objectReference, 'objectReference');
  final headers = <String, String>{
    'x-amz-data-partition': directoryArn.toString(),
  };
  final $payload = <String, dynamic>{
    'AttributeUpdates': attributeUpdates,
    'ObjectReference': objectReference,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/object/update',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return UpdateObjectAttributesResponse.fromJson(response);
}