createServiceSyncConfig method
Create the Proton Ops configuration file.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter branch :
The repository branch for your Proton Ops file.
Parameter filePath :
The path to the Proton Ops file.
Parameter repositoryName :
The repository name.
Parameter repositoryProvider :
The provider type for your repository.
Parameter serviceName :
The name of the service the Proton Ops file is for.
Implementation
Future<CreateServiceSyncConfigOutput> createServiceSyncConfig({
required String branch,
required String filePath,
required String repositoryName,
required RepositoryProvider repositoryProvider,
required String serviceName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AwsProton20200720.CreateServiceSyncConfig'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'branch': branch,
'filePath': filePath,
'repositoryName': repositoryName,
'repositoryProvider': repositoryProvider.value,
'serviceName': serviceName,
},
);
return CreateServiceSyncConfigOutput.fromJson(jsonResponse.body);
}