sync_configurations
Creates, updates, deletes, gets or lists a sync_configurations resource.
Overview
| Name | sync_configurations |
| Type | Resource |
| Id | aws.codestar_connections.sync_configurations |
Fields
The following fields are returned by SELECT queries:
- get_sync_configuration
- list_sync_configurations
| Name | Datatype | Description |
|---|---|---|
branch | string | The branch associated with a specific sync configuration. (pattern: <code>^.*$</code>) |
config_file | string | The file path to the configuration file associated with a specific sync configuration. The path should point to an actual file in the sync configurations linked repository. |
owner_id | string | The owner ID for the repository associated with a specific sync configuration, such as the owner ID in GitHub. (pattern: <code>^.*$</code>) |
provider_type | string | The connection provider type associated with a specific sync configuration, such as GitHub. (Bitbucket, GitHub, GitHubEnterpriseServer, GitLab, GitLabSelfManaged) |
publish_deployment_status | string | Whether to enable or disable publishing of deployment status to source providers. (ENABLED, DISABLED) |
repository_link_id | string | The ID of the repository link associated with a specific sync configuration. (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 a specific sync configuration. (pattern: <code>^.*$</code>) |
resource_name | string | The name of the connection resource associated with a specific sync configuration. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_\-]*$</code>) |
role_arn | string | The Amazon Resource Name (ARN) of the IAM role associated with a specific sync configuration. (pattern: <code>arn:aws(-[\w]+)*:iam::\d{12}:role/[a-zA-Z_0-9+=,.@-_/]+</code>) |
sync_type | string | The type of sync for a specific sync configuration. (CFN_STACK_SYNC) |
trigger_resource_update_on | string | When to trigger Git sync to begin the stack update. (ANY_CHANGE, FILE_CHANGE) |
| Name | Datatype | Description |
|---|---|---|
next_token | string | An enumeration token that allows the operation to batch the next results of the operation. (pattern: <code>^.*$</code>) |
sync_configurations | array | The list of repository sync definitions returned by the request. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_sync_configuration | select | region | Returns details about a sync configuration, including the sync type and resource name. A sync configuration allows the configuration to sync (push and pull) changes from the remote repository for a specified branch in a Git repository. | |
list_sync_configurations | select | region | Returns a list of sync configurations for a specified repository. | |
create_sync_configuration | insert | region, Branch, ConfigFile, RepositoryLinkId, ResourceName, RoleArn, SyncType | Creates a sync configuration which allows Amazon Web Services to sync content from a Git repository to update a specified Amazon Web Services resource. Parameters for the sync configuration are determined by the sync type. | |
update_sync_configuration | update | region, ResourceName, SyncType | Updates the sync configuration for your connection and a specified external Git repository. | |
delete_sync_configuration | delete | region | Deletes the sync configuration for a specified repository and connection. |
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_sync_configuration
- list_sync_configurations
Returns details about a sync configuration, including the sync type and resource name. A sync configuration allows the configuration to sync (push and pull) changes from the remote repository for a specified branch in a Git repository.
SELECT
branch,
config_file,
owner_id,
provider_type,
publish_deployment_status,
repository_link_id,
repository_name,
resource_name,
role_arn,
sync_type,
trigger_resource_update_on
FROM aws.codestar_connections.sync_configurations
WHERE region = '{{ region }}' -- required
;
Returns a list of sync configurations for a specified repository.
SELECT
next_token,
sync_configurations
FROM aws.codestar_connections.sync_configurations
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_sync_configuration
- Manifest
Creates a sync configuration which allows Amazon Web Services to sync content from a Git repository to update a specified Amazon Web Services resource. Parameters for the sync configuration are determined by the sync type.
INSERT INTO aws.codestar_connections.sync_configurations (
Branch,
ConfigFile,
RepositoryLinkId,
ResourceName,
RoleArn,
SyncType,
PublishDeploymentStatus,
TriggerResourceUpdateOn,
region
)
SELECT
'{{ Branch }}' /* required */,
'{{ ConfigFile }}' /* required */,
'{{ RepositoryLinkId }}' /* required */,
'{{ ResourceName }}' /* required */,
'{{ RoleArn }}' /* required */,
'{{ SyncType }}' /* required */,
'{{ PublishDeploymentStatus }}',
'{{ TriggerResourceUpdateOn }}',
'{{ region }}'
RETURNING
sync_configuration
;
# Description fields are for documentation purposes
- name: sync_configurations
props:
- name: region
value: "{{ region }}"
description: Required parameter for the sync_configurations resource.
- name: Branch
value: "{{ Branch }}"
description: |
The branch in the repository from which changes will be synced.
- name: ConfigFile
value: "{{ ConfigFile }}"
description: |
The file name of the configuration file that manages syncing between the connection and the repository. This configuration file is stored in the repository.
- name: RepositoryLinkId
value: "{{ RepositoryLinkId }}"
description: |
The ID of the repository link created for the connection. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.
- name: ResourceName
value: "{{ ResourceName }}"
description: |
The name of the Amazon Web Services resource (for example, a CloudFormation stack in the case of CFN_STACK_SYNC) that will be synchronized from the linked repository.
- name: RoleArn
value: "{{ RoleArn }}"
description: |
The ARN of the IAM role that grants permission for Amazon Web Services to use Git sync to update a given Amazon Web Services resource on your behalf.
- name: SyncType
value: "{{ SyncType }}"
description: |
The type of sync configuration.
valid_values: ['CFN_STACK_SYNC']
- name: PublishDeploymentStatus
value: "{{ PublishDeploymentStatus }}"
description: |
Whether to enable or disable publishing of deployment status to source providers.
valid_values: ['ENABLED', 'DISABLED']
- name: TriggerResourceUpdateOn
value: "{{ TriggerResourceUpdateOn }}"
description: |
When to trigger Git sync to begin the stack update.
valid_values: ['ANY_CHANGE', 'FILE_CHANGE']
UPDATE examples
- update_sync_configuration
Updates the sync configuration for your connection and a specified external Git repository.
UPDATE aws.codestar_connections.sync_configurations
SET
Branch = '{{ Branch }}',
ConfigFile = '{{ ConfigFile }}',
RepositoryLinkId = '{{ RepositoryLinkId }}',
ResourceName = '{{ ResourceName }}',
RoleArn = '{{ RoleArn }}',
SyncType = '{{ SyncType }}',
PublishDeploymentStatus = '{{ PublishDeploymentStatus }}',
TriggerResourceUpdateOn = '{{ TriggerResourceUpdateOn }}'
WHERE
region = '{{ region }}' --required
AND ResourceName = '{{ ResourceName }}' --required
AND SyncType = '{{ SyncType }}' --required
RETURNING
sync_configuration;
DELETE examples
- delete_sync_configuration
Deletes the sync configuration for a specified repository and connection.
DELETE FROM aws.codestar_connections.sync_configurations
WHERE region = '{{ region }}' --required
;