Skip to main content

repository_associations

Creates, updates, deletes, gets or lists a repository_associations resource.

Overview

Namerepository_associations
TypeResource
Idaws.codeguru_reviewer.repository_associations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
repository_associationobjectInformation about the repository association.
tagsobjectAn 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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_repository_associationselectassociation_arn, regionReturns a RepositoryAssociation object that contains information about the requested repository association.
list_repository_associationsselectregionProviderType, State, Name, Owner, MaxResults, NextTokenReturns a list of RepositoryAssociationSummary objects that contain summary information about a repository association. You can filter the returned list by ProviderType, Name, State, and Owner.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
association_arnstringThe Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations.
regionstringAWS region (default: us-east-1)
MaxResultsintegerThe 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.
NamearrayList of repository names to use as a filter.
NextTokenstringThe 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. 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.
OwnerarrayList of owners to use as a filter. For Amazon Web Services 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.
ProviderTypearrayList of provider types to use as a filter.
StatearrayList 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. 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 anassociated 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.

SELECT examples

Returns a RepositoryAssociation object that contains information about the requested repository association.

SELECT
repository_association,
tags
FROM aws.codeguru_reviewer.repository_associations
WHERE association_arn = '{{ association_arn }}' -- required
AND region = '{{ region }}' -- required
;