repository_links
Creates, updates, deletes or gets a repository_link
resource or lists repository_links
in a region
Overview
Name | repository_links |
Type | Resource |
Description | Schema for AWS::CodeStarConnections::RepositoryLink resource which is used to aggregate repository metadata relevant to synchronizing source provider content to AWS Resources. |
Id | aws.codestarconnections.repository_links |
Fields
Name | Datatype | Description |
---|---|---|
connection_arn | string | The Amazon Resource Name (ARN) of the CodeStarConnection. The ARN is used as the connection reference when the connection is shared between AWS services. |
provider_type | string | The name of the external provider where your third-party code repository is configured. |
owner_id | string | the ID of the entity that owns the repository. |
repository_name | string | The repository for which the link is being created. |
encryption_key_arn | string | The 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_id | string | A UUID that uniquely identifies the RepositoryLink. |
repository_link_arn | string | A unique Amazon Resource Name (ARN) to designate the repository link. |
tags | array | Specifies the tags applied to a RepositoryLink. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | RepositoryName, ConnectionArn, OwnerId, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all repository_links
in a region.
SELECT
region,
connection_arn,
provider_type,
owner_id,
repository_name,
encryption_key_arn,
repository_link_id,
repository_link_arn,
tags
FROM aws.codestarconnections.repository_links
WHERE region = 'us-east-1';
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 aws.codestarconnections.repository_links
WHERE region = 'us-east-1' AND data__Identifier = '<RepositoryLinkArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new repository_link
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.codestarconnections.repository_links (
ConnectionArn,
OwnerId,
RepositoryName,
region
)
SELECT
'{{ ConnectionArn }}',
'{{ OwnerId }}',
'{{ RepositoryName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.codestarconnections.repository_links (
ConnectionArn,
OwnerId,
RepositoryName,
EncryptionKeyArn,
Tags,
region
)
SELECT
'{{ ConnectionArn }}',
'{{ OwnerId }}',
'{{ RepositoryName }}',
'{{ EncryptionKeyArn }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: repository_link
props:
- name: ConnectionArn
value: '{{ ConnectionArn }}'
- name: OwnerId
value: '{{ OwnerId }}'
- name: RepositoryName
value: '{{ RepositoryName }}'
- name: EncryptionKeyArn
value: '{{ EncryptionKeyArn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.codestarconnections.repository_links
WHERE data__Identifier = '<RepositoryLinkArn>'
AND region = 'us-east-1';
Permissions
To operate on the repository_links
resource, the following permissions are required:
Update
codestar-connections:GetConnection,
codestar-connections:ListTagsForResource,
codestar-connections:PassConnection,
codestar-connections:UseConnection,
codestar-connections:TagResource,
codestar-connections:UntagResource,
codestar-connections:UpdateRepositoryLink
Create
codestar-connections:CreateRepositoryLink,
codestar-connections:TagResource,
codestar-connections:UseConnection,
codestar-connections:PassConnection,
codestar-connections:GetConnection,
iam:CreateServiceLinkedRole
Read
codestar-connections:GetRepositoryLink,
codestar-connections:ListTagsForResource,
codestar-connections:GetConnection
Delete
codestar-connections:GetRepositoryLink,
codestar-connections:DeleteRepositoryLink,
codestar-connections:GetConnection
List
codestar-connections:ListRepositoryLinks,
codestar-connections:ListTagsForResource