repository_links
Creates, updates, deletes, gets or lists a repository_links resource.
Overview
| Name | repository_links |
| Type | Resource |
| Id | aws.codestar_connections.repository_links |
Fields
The following fields are returned by SELECT queries:
- get_repository_link
- list_repository_links
| Name | Datatype | Description |
|---|---|---|
connection_arn | string | The Amazon Resource Name (ARN) of the connection associated with the repository link. (pattern: <code>arn:aws(-[\w]+)*:.+:.+:[0-9]{12}:.+</code>) |
encryption_key_arn | string | The 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_id | string | The owner ID for the repository associated with the repository link, such as the owner ID in GitHub. (pattern: <code>^.*$</code>) |
provider_type | string | The provider type for the connection, such as GitHub, associated with the repository link. (Bitbucket, GitHub, GitHubEnterpriseServer, GitLab, GitLabSelfManaged) |
repository_link_arn | string | The 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_id | string | The 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_name | string | The name of the repository associated with the repository link. (pattern: <code>^.*$</code>) |
| Name | Datatype | Description |
|---|---|---|
next_token | string | An enumeration token that allows the operation to batch the results of the operation. (pattern: <code>^.*$</code>) |
repository_links | array | Lists the repository links called by the list repository links operation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_repository_link | select | region | Returns 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_links | select | region | Lists the repository links created for connections in your account. | |
create_repository_link | insert | region, ConnectionArn, OwnerId, RepositoryName | 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. | |
update_repository_link | update | region, RepositoryLinkId | 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. | |
delete_repository_link | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_repository_link
- list_repository_links
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
;
Lists the repository links created for connections in your account.
SELECT
next_token,
repository_links
FROM aws.codestar_connections.repository_links
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_repository_link
- Manifest
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
;
# Description fields are for documentation purposes
- name: repository_links
props:
- name: region
value: "{{ region }}"
description: Required parameter for the repository_links resource.
- name: ConnectionArn
value: "{{ ConnectionArn }}"
description: |
The Amazon Resource Name (ARN) of the connection to be associated with the repository link.
- name: OwnerId
value: "{{ OwnerId }}"
description: |
The owner ID for the repository associated with a specific sync configuration, such as the owner ID in GitHub.
- name: RepositoryName
value: "{{ RepositoryName }}"
description: |
The name of the repository to be associated with the repository link.
- name: EncryptionKeyArn
value: "{{ EncryptionKeyArn }}"
description: |
The Amazon Resource Name (ARN) encryption key for the repository to be associated with the repository link.
- name: Tags
description: |
The tags for the repository to be associated with the repository link.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_repository_link
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
- delete_repository_link
Deletes the association between your connection and a specified external Git repository.
DELETE FROM aws.codestar_connections.repository_links
WHERE region = '{{ region }}' --required
;