updateResourceDataSync method

Future<void> updateResourceDataSync({
  1. required String syncName,
  2. required ResourceDataSyncSource syncSource,
  3. required String syncType,
})

Update a resource data sync. After you create a resource data sync for a Region, you can't change the account options for that sync. For example, if you create a sync in the us-east-2 (Ohio) Region and you choose the Include only the current account option, you can't edit that sync later and choose the Include all accounts from my AWS Organizations configuration option. Instead, you must delete the first resource data sync, and create a new one.

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

Parameter syncName : The name of the resource data sync you want to update.

Parameter syncSource : Specify information about the data sources to synchronize.

Parameter syncType : The type of resource data sync. The supported SyncType is SyncFromSource.

Implementation

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