Skip to main content

repository_associations

Creates, updates, deletes or gets a repository_association resource or lists repository_associations in a region

Overview

Namerepository_associations
TypeResource
DescriptionThis resource schema represents the RepositoryAssociation resource in the Amazon CodeGuru Reviewer service.
Idawscc.codegurureviewer.repository_associations

Fields

NameDatatypeDescription
namestringName of the repository to be associated.
typestringThe type of repository to be associated.
ownerstringThe owner of the repository. For a Bitbucket repository, this is the username for the account that owns the repository.
bucket_namestringThe name of the S3 bucket associated with an associated S3 repository. It must start with `codeguru-reviewer-`.
connection_arnstringThe Amazon Resource Name (ARN) of an AWS CodeStar Connections connection.
association_arnstringThe Amazon Resource Name (ARN) of the repository association.
tagsarrayThe tags associated with a repository association.
regionstringAWS region.

For more information, see AWS::CodeGuruReviewer::RepositoryAssociation.

Methods

NameResourceAccessible byRequired Params
create_resourcerepository_associationsINSERTName, Type, region
delete_resourcerepository_associationsDELETEIdentifier, region
list_resourcesrepository_associations_list_onlySELECTregion
get_resourcerepository_associationsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual repository_association.

SELECT
region,
name,
type,
owner,
bucket_name,
connection_arn,
association_arn,
tags
FROM awscc.codegurureviewer.repository_associations
WHERE
region = 'us-east-1' AND
Identifier = '{{ association_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new repository_association resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.codegurureviewer.repository_associations (
Name,
Type,
region
)
SELECT
'{{ name }}',
'{{ type }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.codegurureviewer.repository_associations
WHERE
Identifier = '{{ association_arn }}' AND
region = 'us-east-1';

Permissions

To operate on the repository_associations resource, the following permissions are required:

codeguru-reviewer:DescribeRepositoryAssociation,
codeguru-reviewer:AssociateRepository,
codeguru-reviewer:TagResource,
iam:CreateServiceLinkedRole,
codecommit:TagResource,
codecommit:GitPull,
codecommit:TagResource,
events:PutRule,
events:PutTargets,
codestar-connections:ListBranches,
codestar-connections:ListRepositories,
codestar-connections:ListTagsForResource,
codestar-connections:PassConnection,
codestar-connections:TagResource,
codestar-connections:UseConnection,
s3:ListBucket