getObjectAttributes method

Future<GetObjectAttributesResponse> getObjectAttributes({
  1. required List<String> attributeNames,
  2. required String directoryArn,
  3. required ObjectReference objectReference,
  4. required SchemaFacet schemaFacet,
  5. ConsistencyLevel? consistencyLevel,
})

Retrieves attributes within a facet that are associated with an object.

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 FacetValidationException.

Parameter attributeNames : List of attribute names whose values will be retrieved.

Parameter directoryArn : The Amazon Resource Name (ARN) that is associated with the Directory where the object resides.

Parameter objectReference : Reference that identifies the object whose attributes will be retrieved.

Parameter schemaFacet : Identifier for the facet whose attributes will be retrieved. See SchemaFacet for details.

Parameter consistencyLevel : The consistency level at which to retrieve the attributes on an object.

Implementation

Future<GetObjectAttributesResponse> getObjectAttributes({
  required List<String> attributeNames,
  required String directoryArn,
  required ObjectReference objectReference,
  required SchemaFacet schemaFacet,
  ConsistencyLevel? consistencyLevel,
}) async {
  ArgumentError.checkNotNull(attributeNames, 'attributeNames');
  ArgumentError.checkNotNull(directoryArn, 'directoryArn');
  ArgumentError.checkNotNull(objectReference, 'objectReference');
  ArgumentError.checkNotNull(schemaFacet, 'schemaFacet');
  final headers = <String, String>{
    'x-amz-data-partition': directoryArn.toString(),
    if (consistencyLevel != null)
      'x-amz-consistency-level': consistencyLevel.toValue(),
  };
  final $payload = <String, dynamic>{
    'AttributeNames': attributeNames,
    'ObjectReference': objectReference,
    'SchemaFacet': schemaFacet,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/amazonclouddirectory/2017-01-11/object/attributes/get',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return GetObjectAttributesResponse.fromJson(response);
}