getRepositorySyncStatus method

Future<GetRepositorySyncStatusOutput> getRepositorySyncStatus({
  1. required String branch,
  2. required String repositoryName,
  3. required RepositoryProvider repositoryProvider,
  4. required SyncType syncType,
})

Get the sync status of a repository used for Proton template sync. For more information about template sync, see .

For more information about ABAC, see ABAC in the Proton User Guide.

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

Parameter branch : The repository branch.

Parameter repositoryName : The repository name.

Parameter repositoryProvider : The repository provider.

Parameter syncType : The repository sync type.

Implementation

Future<GetRepositorySyncStatusOutput> getRepositorySyncStatus({
  required String branch,
  required String repositoryName,
  required RepositoryProvider repositoryProvider,
  required SyncType syncType,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AwsProton20200720.GetRepositorySyncStatus'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'branch': branch,
      'repositoryName': repositoryName,
      'repositoryProvider': repositoryProvider.value,
      'syncType': syncType.value,
    },
  );

  return GetRepositorySyncStatusOutput.fromJson(jsonResponse.body);
}