getLinkAttributes method

Future<GetLinkAttributesResponse> getLinkAttributes({
  1. required List<String> attributeNames,
  2. required String directoryArn,
  3. required TypedLinkSpecifier typedLinkSpecifier,
  4. ConsistencyLevel? consistencyLevel,
})

Retrieves attributes that are associated with a typed link.

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 : A list of attribute names whose values will be retrieved.

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

Parameter typedLinkSpecifier : Allows a typed link specifier to be accepted as input.

Parameter consistencyLevel : The consistency level at which to retrieve the attributes on a typed link.

Implementation

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