2020/11/20 - Amazon CodeGuru Reviewer - 3 new 6 updated api methods
Changes This release supports tagging repository association resources in Amazon CodeGuru Reviewer.
Removes a tag from an associated repository.
See also: AWS API Documentation
Request Syntax
client.untag_resource( resourceArn='string', TagKeys=[ 'string', ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the ` RepositoryAssociation https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ object. You can retrieve this ARN by calling ` ListRepositoryAssociations https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ .
list
[REQUIRED]
A list of the keys for each tag you want to remove from an associated repository.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
Adds one or more tags to an associated repository.
See also: AWS API Documentation
Request Syntax
client.tag_resource( resourceArn='string', Tags={ 'string': 'string' } )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the ` RepositoryAssociation https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ object. You can retrieve this ARN by calling ` ListRepositoryAssociations https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ .
dict
[REQUIRED]
An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:
A tag key (for example, CostCenter , Environment , Project , or Secret ). Tag keys are case sensitive.
An optional field known as a tag value (for example, 111122223333 , Production , or a team name). Omitting the tag value is the same as using an empty string. Like tag keys, tag values are case sensitive.
(string) --
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
Returns the list of tags associated with an associated repository resource.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( resourceArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the ` RepositoryAssociation https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ object. You can retrieve this ARN by calling ` ListRepositoryAssociations https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ .
dict
Response Syntax
{ 'Tags': { 'string': 'string' } }
Response Structure
(dict) --
Tags (dict) --
An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:
A tag key (for example, CostCenter , Environment , Project , or Secret ). Tag keys are case sensitive.
An optional field known as a tag value (for example, 111122223333 , Production , or a team name). Omitting the tag value is the same as using an empty string. Like tag keys, tag values are case sensitive.
(string) --
(string) --
{'Tags': {'string': 'string'}}Response
{'RepositoryAssociation': {'State': {'Disassociated'}}, 'Tags': {'string': 'string'}}
Use to associate an AWS CodeCommit repository or a repostory managed by AWS CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a repository, CodeGuru Reviewer reviews source code changes in the repository's pull requests and provides automatic recommendations. You can view recommendations using the CodeGuru Reviewer console. For more information, see Recommendations in Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User Guide.
If you associate a CodeCommit repository, it must be in the same AWS Region and AWS account where its CodeGuru Reviewer code reviews are configured.
Bitbucket and GitHub Enterprise Server repositories are managed by AWS CodeStar Connections to connect to CodeGuru Reviewer. For more information, see Connect to a repository source provider in the Amazon CodeGuru Reviewer User Guide.
Note
You cannot use the CodeGuru Reviewer SDK or the AWS CLI to associate a GitHub repository with Amazon CodeGuru Reviewer. To associate a GitHub repository, use the console. For more information, see Getting started with CodeGuru Reviewer in the CodeGuru Reviewer User Guide.
See also: AWS API Documentation
Request Syntax
client.associate_repository( Repository={ 'CodeCommit': { 'Name': 'string' }, 'Bitbucket': { 'Name': 'string', 'ConnectionArn': 'string', 'Owner': 'string' }, 'GitHubEnterpriseServer': { 'Name': 'string', 'ConnectionArn': 'string', 'Owner': 'string' } }, ClientRequestToken='string', Tags={ 'string': 'string' } )
dict
[REQUIRED]
The repository to associate.
CodeCommit (dict) --
Information about an AWS CodeCommit repository.
Name (string) -- [REQUIRED]
The name of the AWS CodeCommit repository. For more information, see repositoryName in the AWS CodeCommit API Reference .
Bitbucket (dict) --
Information about a Bitbucket repository.
Name (string) -- [REQUIRED]
The name of the third party source repository.
ConnectionArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id . For more information, see ` Connection https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html`__ in the AWS CodeStar Connections API Reference .
Owner (string) -- [REQUIRED]
The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket repository, this is the username for the account that owns the repository.
GitHubEnterpriseServer (dict) --
Information about a GitHub Enterprise Server repository.
Name (string) -- [REQUIRED]
The name of the third party source repository.
ConnectionArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id . For more information, see ` Connection https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html`__ in the AWS CodeStar Connections API Reference .
Owner (string) -- [REQUIRED]
The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket repository, this is the username for the account that owns the repository.
string
Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate repository associations if there are failures and retries.
This field is autopopulated if not provided.
dict
An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:
A tag key (for example, CostCenter , Environment , Project , or Secret ). Tag keys are case sensitive.
An optional field known as a tag value (for example, 111122223333 , Production , or a team name). Omitting the tag value is the same as using an empty string. Like tag keys, tag values are case sensitive.
(string) --
(string) --
dict
Response Syntax
{ 'RepositoryAssociation': { 'AssociationId': 'string', 'AssociationArn': 'string', 'ConnectionArn': 'string', 'Name': 'string', 'Owner': 'string', 'ProviderType': 'CodeCommit'|'GitHub'|'Bitbucket'|'GitHubEnterpriseServer', 'State': 'Associated'|'Associating'|'Failed'|'Disassociating'|'Disassociated', 'StateReason': 'string', 'LastUpdatedTimeStamp': datetime(2015, 1, 1), 'CreatedTimeStamp': datetime(2015, 1, 1) }, 'Tags': { 'string': 'string' } }
Response Structure
(dict) --
RepositoryAssociation (dict) --
Information about the repository association.
AssociationId (string) --
The ID of the repository association.
AssociationArn (string) --
The Amazon Resource Name (ARN) identifying the repository association.
ConnectionArn (string) --
The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id . For more information, see ` Connection https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html`__ in the AWS CodeStar Connections API Reference .
Name (string) --
The name of the repository.
Owner (string) --
The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.
ProviderType (string) --
The provider type of the repository association.
State (string) --
The state of the repository association.
The valid repository association states are:
Associated : The repository association is complete.
Associating : CodeGuru Reviewer is:
Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.
Note
If your repository ProviderType is GitHub , GitHub Enterprise Server , or Bitbucket , CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.
Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.
Failed : The repository failed to associate or disassociate.
Disassociating : CodeGuru Reviewer is removing the repository's pull request notifications and source code access.
Disassociated : CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in an associated repository with tags after it has been disassociated. For more information, see Using tags to control access to associated repositories in the Amazon CodeGuru Reviewer User Guide .
StateReason (string) --
A description of why the repository association is in the current state.
LastUpdatedTimeStamp (datetime) --
The time, in milliseconds since the epoch, when the repository association was last updated.
CreatedTimeStamp (datetime) --
The time, in milliseconds since the epoch, when the repository association was created.
Tags (dict) --
An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:
A tag key (for example, CostCenter , Environment , Project , or Secret ). Tag keys are case sensitive.
An optional field known as a tag value (for example, 111122223333 , Production , or a team name). Omitting the tag value is the same as using an empty string. Like tag keys, tag values are case sensitive.
(string) --
(string) --
{'CodeReview': {'AssociationArn': 'string'}}
Use to create a code review with a ` CodeReviewType https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html`__ of RepositoryAnalysis . This type of code review analyzes all code under a specified branch in an associated repository. PullRequest code reviews are automatically triggered by a pull request so cannot be created using this method.
See also: AWS API Documentation
Request Syntax
client.create_code_review( Name='string', RepositoryAssociationArn='string', Type={ 'RepositoryAnalysis': { 'RepositoryHead': { 'BranchName': 'string' } } }, ClientRequestToken='string' )
string
[REQUIRED]
The name of the code review. The name of each code review in your AWS account must be unique.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the ` RepositoryAssociation https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ object. You can retrieve this ARN by calling ` ListRepositoryAssociations https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ .
A code review can only be created on an associated repository. This is the ARN of the associated repository.
dict
[REQUIRED]
The type of code review to create. This is specified using a ` CodeReviewType https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html`__ object. You can create a code review only of type RepositoryAnalysis .
RepositoryAnalysis (dict) -- [REQUIRED]
A code review that analyzes all code under a specified branch in an associated respository. The assocated repository is specified using its ARN in ` CreateCodeReview https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview`__ .
RepositoryHead (dict) -- [REQUIRED]
A ` SourceCodeType https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType`__ that specifies the tip of a branch in an associated repository.
BranchName (string) -- [REQUIRED]
The name of the branch in an associated repository. The RepositoryHeadSourceCodeType specifies the tip of this branch.
string
Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate code reviews if there are failures and retries.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'CodeReview': { 'Name': 'string', 'CodeReviewArn': 'string', 'RepositoryName': 'string', 'Owner': 'string', 'ProviderType': 'CodeCommit'|'GitHub'|'Bitbucket'|'GitHubEnterpriseServer', 'State': 'Completed'|'Pending'|'Failed'|'Deleting', 'StateReason': 'string', 'CreatedTimeStamp': datetime(2015, 1, 1), 'LastUpdatedTimeStamp': datetime(2015, 1, 1), 'Type': 'PullRequest'|'RepositoryAnalysis', 'PullRequestId': 'string', 'SourceCodeType': { 'CommitDiff': { 'SourceCommit': 'string', 'DestinationCommit': 'string' }, 'RepositoryHead': { 'BranchName': 'string' } }, 'AssociationArn': 'string', 'Metrics': { 'MeteredLinesOfCodeCount': 123, 'FindingsCount': 123 } } }
Response Structure
(dict) --
CodeReview (dict) --
Information about a code review. A code review belongs to the associated repository that contains the reviewed code.
Name (string) --
The name of the code review.
CodeReviewArn (string) --
The Amazon Resource Name (ARN) of the ` CodeReview https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html`__ object.
RepositoryName (string) --
The name of the repository.
Owner (string) --
The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.
ProviderType (string) --
The type of repository that contains the reviewed code (for example, GitHub or Bitbucket).
State (string) --
The valid code review states are:
Completed : The code review is complete.
Pending : The code review started and has not completed or failed.
Failed : The code review failed.
Deleting : The code review is being deleted.
StateReason (string) --
The reason for the state of the code review.
CreatedTimeStamp (datetime) --
The time, in milliseconds since the epoch, when the code review was created.
LastUpdatedTimeStamp (datetime) --
The time, in milliseconds since the epoch, when the code review was last updated.
Type (string) --
The type of code review.
PullRequestId (string) --
The pull request ID for the code review.
SourceCodeType (dict) --
The type of the source code for the code review.
CommitDiff (dict) --
A ` SourceCodeType https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType`__ that specifies a commit diff created by a pull request on an associated repository.
SourceCommit (string) --
The SHA of the source commit used to generate a commit diff.
DestinationCommit (string) --
The SHA of the destination commit used to generate a commit diff.
RepositoryHead (dict) --
A ` SourceCodeType https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType`__ that specifies the tip of a branch in an associated repository.
BranchName (string) --
The name of the branch in an associated repository. The RepositoryHeadSourceCodeType specifies the tip of this branch.
AssociationArn (string) --
The Amazon Resource Name (ARN) of the ` RepositoryAssociation https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ that contains the reviewed source code. You can retrieve associated repository ARNs by calling ` ListRepositoryAssociations https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ .
Metrics (dict) --
The statistics from the code review.
MeteredLinesOfCodeCount (integer) --
Lines of code metered in the code review. For the initial code review pull request and all subsequent revisions, this includes all lines of code in the files added to the pull request. In subsequent revisions, for files that already existed in the pull request, this includes only the changed lines of code. In both cases, this does not include non-code lines such as comments and import statements. For example, if you submit a pull request containing 5 files, each with 500 lines of code, and in a subsequent revision you added a new file with 200 lines of code, and also modified a total of 25 lines across the initial 5 files, MeteredLinesOfCodeCount includes the first 5 files (5 * 500 = 2,500 lines), the new file (200 lines) and the 25 changed lines of code for a total of 2,725 lines of code.
FindingsCount (integer) --
Total number of recommendations found in the code review.
{'CodeReview': {'AssociationArn': 'string'}}
Returns the metadata associated with the code review along with its status.
See also: AWS API Documentation
Request Syntax
client.describe_code_review( CodeReviewArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the ` CodeReview https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html`__ object.
dict
Response Syntax
{ 'CodeReview': { 'Name': 'string', 'CodeReviewArn': 'string', 'RepositoryName': 'string', 'Owner': 'string', 'ProviderType': 'CodeCommit'|'GitHub'|'Bitbucket'|'GitHubEnterpriseServer', 'State': 'Completed'|'Pending'|'Failed'|'Deleting', 'StateReason': 'string', 'CreatedTimeStamp': datetime(2015, 1, 1), 'LastUpdatedTimeStamp': datetime(2015, 1, 1), 'Type': 'PullRequest'|'RepositoryAnalysis', 'PullRequestId': 'string', 'SourceCodeType': { 'CommitDiff': { 'SourceCommit': 'string', 'DestinationCommit': 'string' }, 'RepositoryHead': { 'BranchName': 'string' } }, 'AssociationArn': 'string', 'Metrics': { 'MeteredLinesOfCodeCount': 123, 'FindingsCount': 123 } } }
Response Structure
(dict) --
CodeReview (dict) --
Information about the code review.
Name (string) --
The name of the code review.
CodeReviewArn (string) --
The Amazon Resource Name (ARN) of the ` CodeReview https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html`__ object.
RepositoryName (string) --
The name of the repository.
Owner (string) --
The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.
ProviderType (string) --
The type of repository that contains the reviewed code (for example, GitHub or Bitbucket).
State (string) --
The valid code review states are:
Completed : The code review is complete.
Pending : The code review started and has not completed or failed.
Failed : The code review failed.
Deleting : The code review is being deleted.
StateReason (string) --
The reason for the state of the code review.
CreatedTimeStamp (datetime) --
The time, in milliseconds since the epoch, when the code review was created.
LastUpdatedTimeStamp (datetime) --
The time, in milliseconds since the epoch, when the code review was last updated.
Type (string) --
The type of code review.
PullRequestId (string) --
The pull request ID for the code review.
SourceCodeType (dict) --
The type of the source code for the code review.
CommitDiff (dict) --
A ` SourceCodeType https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType`__ that specifies a commit diff created by a pull request on an associated repository.
SourceCommit (string) --
The SHA of the source commit used to generate a commit diff.
DestinationCommit (string) --
The SHA of the destination commit used to generate a commit diff.
RepositoryHead (dict) --
A ` SourceCodeType https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType`__ that specifies the tip of a branch in an associated repository.
BranchName (string) --
The name of the branch in an associated repository. The RepositoryHeadSourceCodeType specifies the tip of this branch.
AssociationArn (string) --
The Amazon Resource Name (ARN) of the ` RepositoryAssociation https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ that contains the reviewed source code. You can retrieve associated repository ARNs by calling ` ListRepositoryAssociations https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ .
Metrics (dict) --
The statistics from the code review.
MeteredLinesOfCodeCount (integer) --
Lines of code metered in the code review. For the initial code review pull request and all subsequent revisions, this includes all lines of code in the files added to the pull request. In subsequent revisions, for files that already existed in the pull request, this includes only the changed lines of code. In both cases, this does not include non-code lines such as comments and import statements. For example, if you submit a pull request containing 5 files, each with 500 lines of code, and in a subsequent revision you added a new file with 200 lines of code, and also modified a total of 25 lines across the initial 5 files, MeteredLinesOfCodeCount includes the first 5 files (5 * 500 = 2,500 lines), the new file (200 lines) and the 25 changed lines of code for a total of 2,725 lines of code.
FindingsCount (integer) --
Total number of recommendations found in the code review.
{'RepositoryAssociation': {'State': {'Disassociated'}}, 'Tags': {'string': 'string'}}
Returns a ` RepositoryAssociation https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ object that contains information about the requested repository association.
See also: AWS API Documentation
Request Syntax
client.describe_repository_association( AssociationArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the ` RepositoryAssociation https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ object. You can retrieve this ARN by calling ` ListRepositoryAssociations https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ .
dict
Response Syntax
{ 'RepositoryAssociation': { 'AssociationId': 'string', 'AssociationArn': 'string', 'ConnectionArn': 'string', 'Name': 'string', 'Owner': 'string', 'ProviderType': 'CodeCommit'|'GitHub'|'Bitbucket'|'GitHubEnterpriseServer', 'State': 'Associated'|'Associating'|'Failed'|'Disassociating'|'Disassociated', 'StateReason': 'string', 'LastUpdatedTimeStamp': datetime(2015, 1, 1), 'CreatedTimeStamp': datetime(2015, 1, 1) }, 'Tags': { 'string': 'string' } }
Response Structure
(dict) --
RepositoryAssociation (dict) --
Information about the repository association.
AssociationId (string) --
The ID of the repository association.
AssociationArn (string) --
The Amazon Resource Name (ARN) identifying the repository association.
ConnectionArn (string) --
The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id . For more information, see ` Connection https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html`__ in the AWS CodeStar Connections API Reference .
Name (string) --
The name of the repository.
Owner (string) --
The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.
ProviderType (string) --
The provider type of the repository association.
State (string) --
The state of the repository association.
The valid repository association states are:
Associated : The repository association is complete.
Associating : CodeGuru Reviewer is:
Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.
Note
If your repository ProviderType is GitHub , GitHub Enterprise Server , or Bitbucket , CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.
Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.
Failed : The repository failed to associate or disassociate.
Disassociating : CodeGuru Reviewer is removing the repository's pull request notifications and source code access.
Disassociated : CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in an associated repository with tags after it has been disassociated. For more information, see Using tags to control access to associated repositories in the Amazon CodeGuru Reviewer User Guide .
StateReason (string) --
A description of why the repository association is in the current state.
LastUpdatedTimeStamp (datetime) --
The time, in milliseconds since the epoch, when the repository association was last updated.
CreatedTimeStamp (datetime) --
The time, in milliseconds since the epoch, when the repository association was created.
Tags (dict) --
An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:
A tag key (for example, CostCenter , Environment , Project , or Secret ). Tag keys are case sensitive.
An optional field known as a tag value (for example, 111122223333 , Production , or a team name). Omitting the tag value is the same as using an empty string. Like tag keys, tag values are case sensitive.
(string) --
(string) --
{'RepositoryAssociation': {'State': {'Disassociated'}}, 'Tags': {'string': 'string'}}
Removes the association between Amazon CodeGuru Reviewer and a repository.
See also: AWS API Documentation
Request Syntax
client.disassociate_repository( AssociationArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the ` RepositoryAssociation https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ object. You can retrieve this ARN by calling ` ListRepositoryAssociations https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ .
dict
Response Syntax
{ 'RepositoryAssociation': { 'AssociationId': 'string', 'AssociationArn': 'string', 'ConnectionArn': 'string', 'Name': 'string', 'Owner': 'string', 'ProviderType': 'CodeCommit'|'GitHub'|'Bitbucket'|'GitHubEnterpriseServer', 'State': 'Associated'|'Associating'|'Failed'|'Disassociating'|'Disassociated', 'StateReason': 'string', 'LastUpdatedTimeStamp': datetime(2015, 1, 1), 'CreatedTimeStamp': datetime(2015, 1, 1) }, 'Tags': { 'string': 'string' } }
Response Structure
(dict) --
RepositoryAssociation (dict) --
Information about the disassociated repository.
AssociationId (string) --
The ID of the repository association.
AssociationArn (string) --
The Amazon Resource Name (ARN) identifying the repository association.
ConnectionArn (string) --
The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id . For more information, see ` Connection https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html`__ in the AWS CodeStar Connections API Reference .
Name (string) --
The name of the repository.
Owner (string) --
The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.
ProviderType (string) --
The provider type of the repository association.
State (string) --
The state of the repository association.
The valid repository association states are:
Associated : The repository association is complete.
Associating : CodeGuru Reviewer is:
Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.
Note
If your repository ProviderType is GitHub , GitHub Enterprise Server , or Bitbucket , CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.
Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.
Failed : The repository failed to associate or disassociate.
Disassociating : CodeGuru Reviewer is removing the repository's pull request notifications and source code access.
Disassociated : CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in an associated repository with tags after it has been disassociated. For more information, see Using tags to control access to associated repositories in the Amazon CodeGuru Reviewer User Guide .
StateReason (string) --
A description of why the repository association is in the current state.
LastUpdatedTimeStamp (datetime) --
The time, in milliseconds since the epoch, when the repository association was last updated.
CreatedTimeStamp (datetime) --
The time, in milliseconds since the epoch, when the repository association was created.
Tags (dict) --
An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:
A tag key (for example, CostCenter , Environment , Project , or Secret ). Tag keys are case sensitive.
An optional field known as a tag value (for example, 111122223333 , Production , or a team name). Omitting the tag value is the same as using an empty string. Like tag keys, tag values are case sensitive.
(string) --
(string) --
{'States': {'Disassociated'}}Response
{'RepositoryAssociationSummaries': {'State': {'Disassociated'}}}
Returns a list of ` RepositoryAssociationSummary https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html`__ objects that contain summary information about a repository association. You can filter the returned list by ` ProviderType https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-ProviderType`__ , ` Name https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-Name`__ , ` State https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-State`__ , and ` Owner https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-Owner`__ .
See also: AWS API Documentation
Request Syntax
client.list_repository_associations( ProviderTypes=[ 'CodeCommit'|'GitHub'|'Bitbucket'|'GitHubEnterpriseServer', ], States=[ 'Associated'|'Associating'|'Failed'|'Disassociating'|'Disassociated', ], Names=[ 'string', ], Owners=[ 'string', ], MaxResults=123, NextToken='string' )
list
List of provider types to use as a filter.
(string) --
list
List of repository association states to use as a filter.
The valid repository association states are:
Associated : The repository association is complete.
Associating : CodeGuru Reviewer is:
Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.
Note
If your repository ProviderType is GitHub , GitHub Enterprise Server , or Bitbucket , CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.
Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.
Failed : The repository failed to associate or disassociate.
Disassociating : CodeGuru Reviewer is removing the repository's pull request notifications and source code access.
Disassociated : CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in an associated repository with tags after it has been disassociated. For more information, see Using tags to control access to associated repositories in the Amazon CodeGuru Reviewer User Guide .
(string) --
list
List of repository names to use as a filter.
(string) --
list
List of owners to use as a filter. For AWS CodeCommit, it is the name of the CodeCommit account that was used to associate the repository. For other repository source providers, such as Bitbucket and GitHub Enterprise Server, this is name of the account that was used to associate the repository.
(string) --
integer
The maximum number of repository association results returned by ListRepositoryAssociations in paginated output. When this parameter is used, ListRepositoryAssociations only returns maxResults results in a single page with a nextToken response element. The remaining results of the initial request can be seen by sending another ListRepositoryAssociations request with the returned nextToken value. This value can be between 1 and 100. If this parameter is not used, ListRepositoryAssociations returns up to 100 results and a nextToken value if applicable.
string
The nextToken value returned from a previous paginated ListRepositoryAssociations request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value.
Note
Treat this token as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
dict
Response Syntax
{ 'RepositoryAssociationSummaries': [ { 'AssociationArn': 'string', 'ConnectionArn': 'string', 'LastUpdatedTimeStamp': datetime(2015, 1, 1), 'AssociationId': 'string', 'Name': 'string', 'Owner': 'string', 'ProviderType': 'CodeCommit'|'GitHub'|'Bitbucket'|'GitHubEnterpriseServer', 'State': 'Associated'|'Associating'|'Failed'|'Disassociating'|'Disassociated' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
RepositoryAssociationSummaries (list) --
A list of repository associations that meet the criteria of the request.
(dict) --
Summary information about a repository association. The ` ListRepositoryAssociations https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ operation returns a list of RepositoryAssociationSummary objects.
AssociationArn (string) --
The Amazon Resource Name (ARN) of the ` RepositoryAssociation https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html`__ object. You can retrieve this ARN by calling ` ListRepositoryAssociations https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html`__ .
ConnectionArn (string) --
The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id . For more information, see ` Connection https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html`__ in the AWS CodeStar Connections API Reference .
LastUpdatedTimeStamp (datetime) --
The time, in milliseconds since the epoch, since the repository association was last updated.
AssociationId (string) --
The repository association ID.
Name (string) --
The name of the repository association.
Owner (string) --
The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.
ProviderType (string) --
The provider type of the repository association.
State (string) --
The state of the repository association.
The valid repository association states are:
Associated : The repository association is complete.
Associating : CodeGuru Reviewer is:
Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.
Note
If your repository ProviderType is GitHub , GitHub Enterprise Server , or Bitbucket , CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered.
Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.
Failed : The repository failed to associate or disassociate.
Disassociating : CodeGuru Reviewer is removing the repository's pull request notifications and source code access.
Disassociated : CodeGuru Reviewer successfully disassociated the repository. You can create a new association with this repository if you want to review source code in it later. You can control access to code reviews created in an associated repository with tags after it has been disassociated. For more information, see Using tags to control access to associated repositories in the Amazon CodeGuru Reviewer User Guide .
NextToken (string) --
The nextToken value to include in a future ListRecommendations request. When the results of a ListRecommendations request exceed maxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.