getSyncConfiguration method

Future<GetSyncConfigurationOutput> getSyncConfiguration({
  1. required String resourceName,
  2. required SyncConfigurationType syncType,
})

Returns details about a sync configuration, including the sync type and resource name. A sync configuration allows the configuration to sync (push and pull) changes from the remote repository for a specified branch in a Git repository.

May throw AccessDeniedException. May throw InternalServerException. May throw InvalidInputException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter resourceName : The name of the Amazon Web Services resource for the sync configuration for which you want to retrieve information.

Parameter syncType : The sync type for the sync configuration for which you want to retrieve information.

Implementation

Future<GetSyncConfigurationOutput> getSyncConfiguration({
  required String resourceName,
  required SyncConfigurationType syncType,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'CodeStar_connections_20191201.GetSyncConfiguration'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceName': resourceName,
      'SyncType': syncType.value,
    },
  );

  return GetSyncConfigurationOutput.fromJson(jsonResponse.body);
}