deleteFacet method

Future<void> deleteFacet({
  1. required String name,
  2. required String schemaArn,
})

Deletes a given Facet. All attributes and Rules that are associated with the facet will be deleted. Only development schema facets are allowed deletion.

May throw InternalServiceException. May throw InvalidArnException. May throw RetryableConflictException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw FacetNotFoundException. May throw FacetInUseException.

Parameter name : The name of the facet to delete.

Parameter schemaArn : The Amazon Resource Name (ARN) that is associated with the Facet. For more information, see arns.

Implementation

Future<void> deleteFacet({
  required String name,
  required String schemaArn,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    64,
    isRequired: true,
  );
  ArgumentError.checkNotNull(schemaArn, 'schemaArn');
  final headers = <String, String>{
    'x-amz-data-partition': schemaArn.toString(),
  };
  final $payload = <String, dynamic>{
    'Name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/facet/delete',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}