source_repository_branches
Creates, updates, deletes, gets or lists a source_repository_branches resource.
Overview
| Name | source_repository_branches |
| Type | Resource |
| Id | aws.codecatalyst.source_repository_branches |
Fields
The following fields are returned by SELECT queries:
- list_source_repository_branches
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the branch. |
head_commit_id | string | The commit ID of the tip of the branch at the time of the request, also known as the head commit. |
last_updated_time | string (date-time) | The time the branch was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339. |
ref | string | The Git reference name of the branch. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_source_repository_branches | select | space_name, project_name, source_repository_name, region | Retrieves a list of branches in a specified source repository. | |
create_source_repository_branch | insert | space_name, project_name, source_repository_name, name, region | Creates a branch in a specified source repository in Amazon CodeCatalyst. This API only creates a branch in a source repository hosted in Amazon CodeCatalyst. You cannot use this API to create a branch in a linked 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 |
|---|---|---|
name | string | The name for the branch you're creating. |
project_name | string | The name of the project in the space. |
region | string | AWS region (default: us-east-1) |
source_repository_name | string | The name of the repository where you want to create a branch. |
space_name | string | The name of the space. |
SELECT examples
- list_source_repository_branches
Retrieves a list of branches in a specified source repository.
SELECT
name,
head_commit_id,
last_updated_time,
ref
FROM aws.codecatalyst.source_repository_branches
WHERE space_name = '{{ space_name }}' -- required
AND project_name = '{{ project_name }}' -- required
AND source_repository_name = '{{ source_repository_name }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_source_repository_branch
- Manifest
Creates a branch in a specified source repository in Amazon CodeCatalyst. This API only creates a branch in a source repository hosted in Amazon CodeCatalyst. You cannot use this API to create a branch in a linked repository.
INSERT INTO aws.codecatalyst.source_repository_branches (
headCommitId,
space_name,
project_name,
source_repository_name,
name,
region
)
SELECT
'{{ headCommitId }}',
'{{ space_name }}',
'{{ project_name }}',
'{{ source_repository_name }}',
'{{ name }}',
'{{ region }}'
RETURNING
name,
head_commit_id,
last_updated_time,
ref
;
# Description fields are for documentation purposes
- name: source_repository_branches
props:
- name: space_name
value: "{{ space_name }}"
description: Required parameter for the source_repository_branches resource.
- name: project_name
value: "{{ project_name }}"
description: Required parameter for the source_repository_branches resource.
- name: source_repository_name
value: "{{ source_repository_name }}"
description: Required parameter for the source_repository_branches resource.
- name: name
value: "{{ name }}"
description: Required parameter for the source_repository_branches resource.
- name: region
value: "{{ region }}"
description: Required parameter for the source_repository_branches resource.
- name: headCommitId
value: "{{ headCommitId }}"