repositories
Creates, updates, deletes, gets or lists a repositories resource.
Overview
| Name | repositories |
| Type | Resource |
| Id | aws.proton.repositories |
Fields
The following fields are returned by SELECT queries:
- get_repository
- list_repositories
| Name | Datatype | Description |
|---|---|---|
name | string | The repository name. (pattern: <code>[A-Za-z0-9_.-]./[A-Za-z0-9_.-].</code>) |
arn | string | The Amazon Resource Name (ARN) of the linked repository. |
connection_arn | string | The Amazon Resource Name (ARN) of your AWS CodeStar connection that connects Proton to your repository provider account. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov):[a-zA-Z0-9-]+:[a-zA-Z0-9-]:\d{12}:([\w+=,.@-]+[/:])[\w+=,.@-]+$</code>) |
encryption_key | string | Your customer Amazon Web Services KMS encryption key. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov):[a-zA-Z0-9-]+:[a-zA-Z0-9-]:\d{12}:([\w+=,.@-]+[/:])[\w+=,.@-]+$</code>) |
provider | string | The repository provider. (GITHUB, GITHUB_ENTERPRISE, BITBUCKET) |
| Name | Datatype | Description |
|---|---|---|
name | string | The repository name. (pattern: <code>[A-Za-z0-9_.-]./[A-Za-z0-9_.-].</code>) |
arn | string | The Amazon Resource Name (ARN) of the linked repository. |
connection_arn | string | The Amazon Resource Name (ARN) of the of your connection that connects Proton to your repository. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov):[a-zA-Z0-9-]+:[a-zA-Z0-9-]:\d{12}:([\w+=,.@-]+[/:])[\w+=,.@-]+$</code>) |
provider | string | The repository provider. (GITHUB, GITHUB_ENTERPRISE, BITBUCKET) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_repository | select | region | Get detail data for a linked repository. | |
list_repositories | select | region | List linked repositories with detail data. | |
create_repository | insert | region, connectionArn, name, provider | Create and register a link to a repository. Proton uses the link to repeatedly access the repository, to either push to it (self-managed provisioning) or pull from it (template sync). You can share a linked repository across multiple resources (like environments using self-managed provisioning, or synced templates). When you create a repository link, Proton creates a service-linked role for you. For more information, see Self-managed provisioning, Template bundles, and Template sync configurations in the Proton User Guide. | |
delete_repository | delete | region | De-register and unlink your 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
- list_repositories
Get detail data for a linked repository.
SELECT
name,
arn,
connection_arn,
encryption_key,
provider
FROM aws.proton.repositories
WHERE region = '{{ region }}' -- required
;
List linked repositories with detail data.
SELECT
name,
arn,
connection_arn,
provider
FROM aws.proton.repositories
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_repository
- Manifest
Create and register a link to a repository. Proton uses the link to repeatedly access the repository, to either push to it (self-managed provisioning) or pull from it (template sync). You can share a linked repository across multiple resources (like environments using self-managed provisioning, or synced templates). When you create a repository link, Proton creates a service-linked role for you. For more information, see Self-managed provisioning, Template bundles, and Template sync configurations in the Proton User Guide.
INSERT INTO aws.proton.repositories (
connectionArn,
encryptionKey,
name,
provider,
tags,
region
)
SELECT
'{{ connectionArn }}' /* required */,
'{{ encryptionKey }}',
'{{ name }}' /* required */,
'{{ provider }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
repository
;
# Description fields are for documentation purposes
- name: repositories
props:
- name: region
value: "{{ region }}"
description: Required parameter for the repositories resource.
- name: connectionArn
value: "{{ connectionArn }}"
description: |
The Amazon Resource Name (ARN) of your AWS CodeStar connection that connects Proton to your repository provider account. For more information, see Setting up for Proton in the Proton User Guide.
- name: encryptionKey
value: "{{ encryptionKey }}"
description: |
The ARN of your customer Amazon Web Services Key Management Service (Amazon Web Services KMS) key.
- name: name
value: "{{ name }}"
description: |
The repository name (for example, myrepos/myrepo).
- name: provider
value: "{{ provider }}"
description: |
The repository provider.
valid_values: ['GITHUB', 'GITHUB_ENTERPRISE', 'BITBUCKET']
- name: tags
description: |
An optional list of metadata items that you can associate with the Proton repository. A tag is a key-value pair. For more information, see Proton resources and tagging in the Proton User Guide.
value:
- key: "{{ key }}"
value: "{{ value }}"
DELETE examples
- delete_repository
De-register and unlink your repository.
DELETE FROM aws.proton.repositories
WHERE region = '{{ region }}' --required
;