updateRepositoryName method
Renames a repository. The repository name must be unique across the calling AWS account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. The suffix .git is prohibited. For more information about the limits on repository names, see Limits in the AWS CodeCommit User Guide.
May throw RepositoryDoesNotExistException. May throw RepositoryNameExistsException. May throw RepositoryNameRequiredException. May throw InvalidRepositoryNameException.
Parameter newName
:
The new name for the repository.
Parameter oldName
:
The current name of the repository.
Implementation
Future<void> updateRepositoryName({
required String newName,
required String oldName,
}) async {
ArgumentError.checkNotNull(newName, 'newName');
_s.validateStringLength(
'newName',
newName,
1,
100,
isRequired: true,
);
ArgumentError.checkNotNull(oldName, 'oldName');
_s.validateStringLength(
'oldName',
oldName,
1,
100,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.UpdateRepositoryName'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'newName': newName,
'oldName': oldName,
},
);
}