updateCodeRepository method
Future<UpdateCodeRepositoryOutput>
updateCodeRepository({
- required String codeRepositoryName,
- GitConfigForUpdate? gitConfig,
Updates the specified Git repository with the specified values.
May throw ConflictException.
Parameter codeRepositoryName :
The name of the Git repository to update.
Parameter gitConfig :
The configuration of the git repository, including the URL and the Amazon
Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that
contains the credentials used to access the repository. The secret must
have a staging label of AWSCURRENT and must be in the
following format:
{"username": UserName, "password": Password}
Implementation
Future<UpdateCodeRepositoryOutput> updateCodeRepository({
required String codeRepositoryName,
GitConfigForUpdate? gitConfig,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.UpdateCodeRepository'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'CodeRepositoryName': codeRepositoryName,
if (gitConfig != null) 'GitConfig': gitConfig,
},
);
return UpdateCodeRepositoryOutput.fromJson(jsonResponse.body);
}