removeFacetFromObject method

Future<void> removeFacetFromObject({
  1. required String directoryArn,
  2. required ObjectReference objectReference,
  3. required SchemaFacet schemaFacet,
})

Removes the specified facet from the specified 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 directoryArn : The ARN of the directory in which the object resides.

Parameter objectReference : A reference to the object to remove the facet from.

Parameter schemaFacet : The facet to remove. See SchemaFacet for details.

Implementation

Future<void> removeFacetFromObject({
  required String directoryArn,
  required ObjectReference objectReference,
  required SchemaFacet schemaFacet,
}) async {
  ArgumentError.checkNotNull(directoryArn, 'directoryArn');
  ArgumentError.checkNotNull(objectReference, 'objectReference');
  ArgumentError.checkNotNull(schemaFacet, 'schemaFacet');
  final headers = <String, String>{
    'x-amz-data-partition': directoryArn.toString(),
  };
  final $payload = <String, dynamic>{
    'ObjectReference': objectReference,
    'SchemaFacet': schemaFacet,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/object/facets/delete',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}