createTypedLinkFacet method

Future<void> createTypedLinkFacet({
  1. required TypedLinkFacet facet,
  2. required String schemaArn,
})

Creates a TypedLinkFacet. For more information, see Typed link.

May throw InternalServiceException. May throw InvalidArnException. May throw RetryableConflictException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw FacetAlreadyExistsException. May throw InvalidRuleException. May throw FacetValidationException.

Parameter facet : Facet structure that is associated with the typed link facet.

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

Implementation

Future<void> createTypedLinkFacet({
  required TypedLinkFacet facet,
  required String schemaArn,
}) async {
  ArgumentError.checkNotNull(facet, 'facet');
  ArgumentError.checkNotNull(schemaArn, 'schemaArn');
  final headers = <String, String>{
    'x-amz-data-partition': schemaArn.toString(),
  };
  final $payload = <String, dynamic>{
    'Facet': facet,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/typedlink/facet/create',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}