Skip to main content

repository_links

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

Overview

Namerepository_links
TypeResource
Idaws.codestar_connections.repository_links

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
connection_arnstringThe Amazon Resource Name (ARN) of the connection associated with the repository link. (pattern: <code>arn:aws(-[\w]+)*:.+:.+:[0-9]{12}:.+</code>)
encryption_key_arnstringThe Amazon Resource Name (ARN) of the encryption key for the repository associated with the repository link. (pattern: <code>arn:aws(-[\w]+)*:kms:[a-z-0-9]+:\d{12}:key/[a-zA-Z0-9-]+</code>)
owner_idstringThe owner ID for the repository associated with the repository link, such as the owner ID in GitHub. (pattern: <code>^.*$</code>)
provider_typestringThe provider type for the connection, such as GitHub, associated with the repository link. (Bitbucket, GitHub, GitHubEnterpriseServer, GitLab, GitLabSelfManaged)
repository_link_arnstringThe Amazon Resource Name (ARN) of the repository link. (pattern: <code>^arn:aws(?:-[a-z]+)*:codestar-connections:[a-z-0-9]+:\d{12}:repository-link/[a-zA-Z0-9-:/]+</code>)
repository_link_idstringThe ID of the repository link. (pattern: <code>^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$</code>)
repository_namestringThe name of the repository associated with the repository link. (pattern: <code>^.*$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_repository_linkselectregionReturns details about a repository link. A repository link allows Git sync to monitor and sync changes from files in a specified Git repository.
list_repository_linksselectregionLists the repository links created for connections in your account.
create_repository_linkinsertregion, ConnectionArn, OwnerId, RepositoryNameCreates a link to a specified external Git repository. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.
update_repository_linkupdateregion, RepositoryLinkIdUpdates the association between your connection and a specified external Git repository. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.
delete_repository_linkdeleteregionDeletes the association between your connection and a specified external Git repository.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Returns details about a repository link. A repository link allows Git sync to monitor and sync changes from files in a specified Git repository.

SELECT
connection_arn,
encryption_key_arn,
owner_id,
provider_type,
repository_link_arn,
repository_link_id,
repository_name
FROM aws.codestar_connections.repository_links
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a link to a specified external Git repository. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.

INSERT INTO aws.codestar_connections.repository_links (
ConnectionArn,
OwnerId,
RepositoryName,
EncryptionKeyArn,
Tags,
region
)
SELECT
'{{ ConnectionArn }}' /* required */,
'{{ OwnerId }}' /* required */,
'{{ RepositoryName }}' /* required */,
'{{ EncryptionKeyArn }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
repository_link_info
;

UPDATE examples

Updates the association between your connection and a specified external Git repository. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.

UPDATE aws.codestar_connections.repository_links
SET
ConnectionArn = '{{ ConnectionArn }}',
EncryptionKeyArn = '{{ EncryptionKeyArn }}',
RepositoryLinkId = '{{ RepositoryLinkId }}'
WHERE
region = '{{ region }}' --required
AND RepositoryLinkId = '{{ RepositoryLinkId }}' --required
RETURNING
repository_link_info;

DELETE examples

Deletes the association between your connection and a specified external Git repository.

DELETE FROM aws.codestar_connections.repository_links
WHERE region = '{{ region }}' --required
;