deleteResourceDataSync method

Future<void> deleteResourceDataSync({
  1. required String syncName,
  2. String? syncType,
})

Deletes a Resource Data Sync configuration. After the configuration is deleted, changes to data on managed instances are no longer synced to or from the target. Deleting a sync configuration does not delete data.

May throw InternalServerError. May throw ResourceDataSyncNotFoundException. May throw ResourceDataSyncInvalidConfigurationException.

Parameter syncName : The name of the configuration to delete.

Parameter syncType : Specify the type of resource data sync to delete.

Implementation

Future<void> deleteResourceDataSync({
  required String syncName,
  String? syncType,
}) async {
  ArgumentError.checkNotNull(syncName, 'syncName');
  _s.validateStringLength(
    'syncName',
    syncName,
    1,
    64,
    isRequired: true,
  );
  _s.validateStringLength(
    'syncType',
    syncType,
    1,
    64,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonSSM.DeleteResourceDataSync'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'SyncName': syncName,
      if (syncType != null) 'SyncType': syncType,
    },
  );
}