addFacetToObject method
Adds a new Facet to an object. An object can have more than one facet applied on it.
May throw AccessDeniedException.
May throw DirectoryNotEnabledException.
May throw FacetValidationException.
May throw InternalServiceException.
May throw InvalidArnException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw RetryableConflictException.
May throw ValidationException.
Parameter directoryArn :
The Amazon Resource Name (ARN) that is associated with the
Directory where the object resides. For more information, see
arns.
Parameter objectReference :
A reference to the object you are adding the specified facet to.
Parameter schemaFacet :
Identifiers for the facet that you are adding to the object. See
SchemaFacet for details.
Parameter objectAttributeList :
Attributes on the facet that you are adding to the object.
Implementation
Future<void> addFacetToObject({
required String directoryArn,
required ObjectReference objectReference,
required SchemaFacet schemaFacet,
List<AttributeKeyAndValue>? objectAttributeList,
}) async {
final headers = <String, String>{
'x-amz-data-partition': directoryArn.toString(),
};
final $payload = <String, dynamic>{
'ObjectReference': objectReference,
'SchemaFacet': schemaFacet,
if (objectAttributeList != null)
'ObjectAttributeList': objectAttributeList,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/amazonclouddirectory/2017-01-11/object/facets',
headers: headers,
exceptionFnMap: _exceptionFns,
);
}