batchPutAttributesMetadata method

Future<BatchPutAttributesMetadataOutput> batchPutAttributesMetadata({
  1. required List<AttributeInput> attributes,
  2. required String domainIdentifier,
  3. required String entityIdentifier,
  4. required AttributeEntityType entityType,
  5. String? clientToken,
})

Writes the attribute metadata.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter attributes : The attributes of the metadata.

Parameter domainIdentifier : The domain ID where you want to write the attribute metadata.

Parameter entityIdentifier : The entity ID for which you want to write the attribute metadata.

Parameter entityType : The entity type for which you want to write the attribute metadata.

Parameter clientToken : A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.

Implementation

Future<BatchPutAttributesMetadataOutput> batchPutAttributesMetadata({
  required List<AttributeInput> attributes,
  required String domainIdentifier,
  required String entityIdentifier,
  required AttributeEntityType entityType,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'attributes': attributes,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/entities/${Uri.encodeComponent(entityType.value)}/${Uri.encodeComponent(entityIdentifier)}/attributes-metadata',
    exceptionFnMap: _exceptionFns,
  );
  return BatchPutAttributesMetadataOutput.fromJson(response);
}