updateFacet method
Does the following:
-
Adds new
Attributes,Rules, orObjectTypes. -
Updates existing
Attributes,Rules, orObjectTypes. -
Deletes existing
Attributes,Rules, orObjectTypes.
May throw AccessDeniedException.
May throw FacetNotFoundException.
May throw FacetValidationException.
May throw InternalServiceException.
May throw InvalidArnException.
May throw InvalidFacetUpdateException.
May throw InvalidRuleException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw RetryableConflictException.
May throw ValidationException.
Parameter name :
The name of the facet.
Parameter schemaArn :
The Amazon Resource Name (ARN) that is associated with the Facet.
For more information, see arns.
Parameter attributeUpdates :
List of attributes that need to be updated in a given schema Facet.
Each attribute is followed by AttributeAction, which
specifies the type of update operation to perform.
Parameter objectType :
The object type that is associated with the facet. See
CreateFacetRequest$ObjectType for more details.
Implementation
Future<void> updateFacet({
required String name,
required String schemaArn,
List<FacetAttributeUpdate>? attributeUpdates,
ObjectType? objectType,
}) async {
final headers = <String, String>{
'x-amz-data-partition': schemaArn.toString(),
};
final $payload = <String, dynamic>{
'Name': name,
if (attributeUpdates != null) 'AttributeUpdates': attributeUpdates,
if (objectType != null) 'ObjectType': objectType.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/amazonclouddirectory/2017-01-11/facet',
headers: headers,
exceptionFnMap: _exceptionFns,
);
}