Skip to main content

repository_links

Creates, updates, deletes or gets a repository_link resource or lists repository_links in a region

Overview

Namerepository_links
TypeResource
DescriptionSchema for AWS::CodeStarConnections::RepositoryLink resource which is used to aggregate repository metadata relevant to synchronizing source provider content to AWS Resources.
Idawscc.codestarconnections.repository_links

Fields

NameDatatypeDescription
connection_arnstringThe Amazon Resource Name (ARN) of the CodeStarConnection. The ARN is used as the connection reference when the connection is shared between AWS services.
provider_typestringThe name of the external provider where your third-party code repository is configured.
owner_idstringthe ID of the entity that owns the repository.
repository_namestringThe repository for which the link is being created.
encryption_key_arnstringThe ARN of the KMS key that the customer can optionally specify to use to encrypt RepositoryLink properties. If not specified, a default key will be used.
repository_link_idstringA UUID that uniquely identifies the RepositoryLink.
repository_link_arnstringA unique Amazon Resource Name (ARN) to designate the repository link.
tagsarraySpecifies the tags applied to a RepositoryLink.
regionstringAWS region.

For more information, see AWS::CodeStarConnections::RepositoryLink.

Methods

NameResourceAccessible byRequired Params
create_resourcerepository_linksINSERTRepositoryName, ConnectionArn, OwnerId, region
delete_resourcerepository_linksDELETEIdentifier, region
update_resourcerepository_linksUPDATEIdentifier, PatchDocument, region
list_resourcesrepository_links_list_onlySELECTregion
get_resourcerepository_linksSELECTIdentifier, region

SELECT examples

Gets all properties from an individual repository_link.

SELECT
region,
connection_arn,
provider_type,
owner_id,
repository_name,
encryption_key_arn,
repository_link_id,
repository_link_arn,
tags
FROM awscc.codestarconnections.repository_links
WHERE
region = 'us-east-1' AND
Identifier = '{{ repository_link_arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.codestarconnections.repository_links (
ConnectionArn,
OwnerId,
RepositoryName,
region
)
SELECT
'{{ connection_arn }}',
'{{ owner_id }}',
'{{ repository_name }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a repository_link resource, using stack-deploy.

/*+ update */
UPDATE awscc.codestarconnections.repository_links
SET PatchDocument = string('{{ {
"ConnectionArn": connection_arn,
"EncryptionKeyArn": encryption_key_arn,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ repository_link_arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.codestarconnections.repository_links
WHERE
Identifier = '{{ repository_link_arn }}' AND
region = 'us-east-1';

Permissions

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

codestar-connections:GetConnection,
codestar-connections:ListTagsForResource,
codestar-connections:PassConnection,
codestar-connections:UseConnection,
codestar-connections:TagResource,
codestar-connections:UntagResource,
codestar-connections:UpdateRepositoryLink