2015/07/09 - AWS CodeCommit - 11 new api methods
Gets information about one or more repositories.
Request Syntax
client.list_repositories( nextToken='string', sortBy='repositoryName'|'lastModifiedDate', order='ascending'|'descending' )
string
An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to AWS CodeCommit, another page of 1,000 records is retrieved.
string
The criteria used to sort the results of a list repositories operation.
string
The order in which to sort the results of a list repositories operation.
dict
Response Syntax
{ 'repositories': [ { 'repositoryName': 'string', 'repositoryId': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
Represents the output of a list repositories operation.
repositories (list) --
Lists the repositories called by the list repositories operation.
(dict) --
Information about a repository name and ID.
repositoryName (string) -- Repository name is restricted to alphanumeric characters (a-z, A-Z, 0-9), ".", "_", and "-". Additionally, the suffix ".git" is prohibited in a repository name.
repositoryId (string) --
The ID associated with the repository name.
nextToken (string) --
An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to AWS CodeCommit, another page of 1,000 records is retrieved.
Gets information about a repository.
Request Syntax
client.get_repository( repositoryName='string' )
string
[REQUIRED]
The name of the repository to get information about.
dict
Response Syntax
{ 'repositoryMetadata': { 'accountId': 'string', 'repositoryId': 'string', 'repositoryName': 'string', 'repositoryDescription': 'string', 'defaultBranch': 'string', 'lastModifiedDate': datetime(2015, 1, 1), 'creationDate': datetime(2015, 1, 1), 'cloneUrlHttp': 'string', 'cloneUrlSsh': 'string', 'Arn': 'string' } }
Response Structure
(dict) --
Represents the output of a get repository operation.
repositoryMetadata (dict) --
Information about the repository.
accountId (string) --
The ID of the AWS account associated with the repository.
repositoryId (string) --
The ID of the repository.
repositoryName (string) --
The repository's name.
repositoryDescription (string) --
A comment or description about the repository.
defaultBranch (string) --
The repository's default branch name.
lastModifiedDate (datetime) --
The date and time the repository was last modified, in timestamp format.
creationDate (datetime) --
The date and time the repository was created, in timestamp format.
cloneUrlHttp (string) --
The URL to use for cloning the repository over HTTPS.
cloneUrlSsh (string) --
The URL to use for cloning the repository over SSH.
Arn (string) --
The Amazon Resource Name (ARN) of the repository.
Creates a new branch in a repository and points the branch to a commit.
Request Syntax
client.create_branch( repositoryName='string', branchName='string', commitId='string' )
string
[REQUIRED]
The name of the repository in which you want to create the new branch.
string
[REQUIRED]
The name of the new branch to create.
string
[REQUIRED]
The ID of the commit to point the new branch to.
None
Retrieves information about a repository branch, including its name and the last commit ID.
Request Syntax
client.get_branch( repositoryName='string', branchName='string' )
string
Repository name is restricted to alphanumeric characters (a-z, A-Z, 0-9), ".", "_", and "-". Additionally, the suffix ".git" is prohibited in a repository name.
string
The name of the branch for which you want to retrieve information.
dict
Response Syntax
{ 'branch': { 'branchName': 'string', 'commitId': 'string' } }
Response Structure
(dict) --
Represents the output of a get branch operation.
branch (dict) --
The name of the branch.
branchName (string) --
The name of the branch.
commitId (string) --
The ID of the last commit made to the branch.
Sets or changes the comment or description for a repository.
Request Syntax
client.update_repository_description( repositoryName='string', repositoryDescription='string' )
string
[REQUIRED]
The name of the repository to set or change the comment or description for.
string
The new comment or description for the specified repository.
None
Renames a repository.
Request Syntax
client.update_repository_name( oldName='string', newName='string' )
string
[REQUIRED] Repository name is restricted to alphanumeric characters (a-z, A-Z, 0-9), ".", "_", and "-". Additionally, the suffix ".git" is prohibited in a repository name.
string
[REQUIRED] Repository name is restricted to alphanumeric characters (a-z, A-Z, 0-9), ".", "_", and "-". Additionally, the suffix ".git" is prohibited in a repository name.
None
Sets or changes the default branch name for the specified repository.
Request Syntax
client.update_default_branch( repositoryName='string', defaultBranchName='string' )
string
[REQUIRED]
The name of the repository to set or change the default branch for.
string
[REQUIRED]
The name of the branch to set as the default.
None
Creates a new, empty repository.
Request Syntax
client.create_repository( repositoryName='string', repositoryDescription='string' )
string
[REQUIRED]
The name of the new repository to be created.
string
A comment or description about the new repository.
dict
Response Syntax
{ 'repositoryMetadata': { 'accountId': 'string', 'repositoryId': 'string', 'repositoryName': 'string', 'repositoryDescription': 'string', 'defaultBranch': 'string', 'lastModifiedDate': datetime(2015, 1, 1), 'creationDate': datetime(2015, 1, 1), 'cloneUrlHttp': 'string', 'cloneUrlSsh': 'string', 'Arn': 'string' } }
Response Structure
(dict) --
Represents the output of a create repository operation.
repositoryMetadata (dict) --
Information about the newly created repository.
accountId (string) --
The ID of the AWS account associated with the repository.
repositoryId (string) --
The ID of the repository.
repositoryName (string) --
The repository's name.
repositoryDescription (string) --
A comment or description about the repository.
defaultBranch (string) --
The repository's default branch name.
lastModifiedDate (datetime) --
The date and time the repository was last modified, in timestamp format.
creationDate (datetime) --
The date and time the repository was created, in timestamp format.
cloneUrlHttp (string) --
The URL to use for cloning the repository over HTTPS.
cloneUrlSsh (string) --
The URL to use for cloning the repository over SSH.
Arn (string) --
The Amazon Resource Name (ARN) of the repository.
Deletes a repository. If a specified repository was already deleted, a null repository ID will be returned.
Request Syntax
client.delete_repository( repositoryName='string' )
string
[REQUIRED]
The name of the repository to delete.
dict
Response Syntax
{ 'repositoryId': 'string' }
Response Structure
(dict) --
Represents the output of a delete repository operation.
repositoryId (string) --
The ID of the repository that was deleted.
Gets information about one or more repositories.
Request Syntax
client.batch_get_repositories( repositoryNames=[ 'string', ] )
list
[REQUIRED]
The names of the repositories to get information about.
(string) -- Repository name is restricted to alphanumeric characters (a-z, A-Z, 0-9), ".", "_", and "-". Additionally, the suffix ".git" is prohibited in a repository name.
dict
Response Syntax
{ 'repositories': [ { 'accountId': 'string', 'repositoryId': 'string', 'repositoryName': 'string', 'repositoryDescription': 'string', 'defaultBranch': 'string', 'lastModifiedDate': datetime(2015, 1, 1), 'creationDate': datetime(2015, 1, 1), 'cloneUrlHttp': 'string', 'cloneUrlSsh': 'string', 'Arn': 'string' }, ], 'repositoriesNotFound': [ 'string', ] }
Response Structure
(dict) --
Represents the output of a batch get repositories operation.
repositories (list) --
A list of repositories returned by the batch get repositories operation.
(dict) --
Information about a repository.
accountId (string) --
The ID of the AWS account associated with the repository.
repositoryId (string) --
The ID of the repository.
repositoryName (string) --
The repository's name.
repositoryDescription (string) --
A comment or description about the repository.
defaultBranch (string) --
The repository's default branch name.
lastModifiedDate (datetime) --
The date and time the repository was last modified, in timestamp format.
creationDate (datetime) --
The date and time the repository was created, in timestamp format.
cloneUrlHttp (string) --
The URL to use for cloning the repository over HTTPS.
cloneUrlSsh (string) --
The URL to use for cloning the repository over SSH.
Arn (string) --
The Amazon Resource Name (ARN) of the repository.
repositoriesNotFound (list) --
Returns a list of repository names for which information could not be found.
(string) -- Repository name is restricted to alphanumeric characters (a-z, A-Z, 0-9), ".", "_", and "-". Additionally, the suffix ".git" is prohibited in a repository name.
Gets information about one or more branches in a repository.
Request Syntax
client.list_branches( repositoryName='string', nextToken='string' )
string
[REQUIRED]
The name of the repository that contains the branches.
string
An enumeration token that allows the operation to batch the results.
dict
Response Syntax
{ 'branches': [ 'string', ], 'nextToken': 'string' }
Response Structure
(dict) --
Represents the output of a list branches operation.
branches (list) --
The list of branch names.
(string) --
nextToken (string) --
An enumeration token that returns the batch of the results.