updateRegistryRecord method

Future<UpdateRegistryRecordResponse> updateRegistryRecord({
  1. required String recordId,
  2. required String registryId,
  3. UpdatedDescription? description,
  4. UpdatedDescriptors? descriptors,
  5. UpdatedDisplayName? displayName,
  6. String? name,
  7. RecordType? recordType,
  8. String? recordVersion,
  9. bool? triggerSynchronization,
})

Updates a registry record. The update is asynchronous: the record is returned with the UPDATING status while it is processed. Fields that use update wrappers follow PATCH semantics: omit the field to leave it unchanged.

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

Parameter recordId : The identifier of the registry record to update (ARN or ID)

Parameter registryId : The identifier of the registry containing the record (ARN or ID)

Parameter description : The updated description of the registry record. Omit to leave the description unchanged; provide an empty wrapper to unset it.

Parameter descriptors : The updated typed descriptor content for the registry record. Omit to leave the descriptors unchanged.

Parameter displayName : The updated display name of the registry record. Omit to leave the display name unchanged; provide an empty wrapper to unset it.

Parameter name : The updated name of the registry record. Omit to leave the name unchanged.

Parameter recordType : The updated type of the registry record. Omit to leave the record type unchanged.

Parameter recordVersion : The updated version of the registry record. Omit to leave the version unchanged.

Parameter triggerSynchronization : Whether to trigger synchronization of the record's descriptor content from its source

Implementation

Future<UpdateRegistryRecordResponse> updateRegistryRecord({
  required String recordId,
  required String registryId,
  UpdatedDescription? description,
  UpdatedDescriptors? descriptors,
  UpdatedDisplayName? displayName,
  String? name,
  RecordType? recordType,
  String? recordVersion,
  bool? triggerSynchronization,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'description': description,
    if (descriptors != null) 'descriptors': descriptors,
    if (displayName != null) 'displayName': displayName,
    if (name != null) 'name': name,
    if (recordType != null) 'recordType': recordType.value,
    if (recordVersion != null) 'recordVersion': recordVersion,
    if (triggerSynchronization != null)
      'triggerSynchronization': triggerSynchronization,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/registries/${Uri.encodeComponent(registryId)}/records/${Uri.encodeComponent(recordId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateRegistryRecordResponse.fromJson(response);
}