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 AccessDeniedException. May throw DirectoryNotEnabledException. May throw FacetValidationException. May throw InternalServiceException. May throw InvalidArnException. May throw LimitExceededException. May throw LinkNameAlreadyInUseException. May throw ResourceNotFoundException. May throw RetryableConflictException. May throw ValidationException.

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 {
  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);
}