updateFacet method
- required String name,
- required String schemaArn,
- List<
FacetAttributeUpdate> ? attributeUpdates, - ObjectType? objectType,
Does the following:
-
Adds new
Attributes
,Rules
, orObjectTypes
. -
Updates existing
Attributes
,Rules
, orObjectTypes
. -
Deletes existing
Attributes
,Rules
, orObjectTypes
.
May throw InternalServiceException. May throw InvalidArnException. May throw RetryableConflictException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw InvalidFacetUpdateException. May throw ResourceNotFoundException. May throw FacetNotFoundException. May throw InvalidRuleException.
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 {
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,
if (attributeUpdates != null) 'AttributeUpdates': attributeUpdates,
if (objectType != null) 'ObjectType': objectType.toValue(),
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/amazonclouddirectory/2017-01-11/facet',
headers: headers,
exceptionFnMap: _exceptionFns,
);
}