Skip to main content

sync_configurations

Creates, updates, deletes, gets or lists a sync_configurations resource.

Overview

Namesync_configurations
TypeResource
Idaws.codestar_connections.sync_configurations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
branchstringThe branch associated with a specific sync configuration. (pattern: <code>^.*$</code>)
config_filestringThe 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_idstringThe owner ID for the repository associated with a specific sync configuration, such as the owner ID in GitHub. (pattern: <code>^.*$</code>)
provider_typestringThe connection provider type associated with a specific sync configuration, such as GitHub. (Bitbucket, GitHub, GitHubEnterpriseServer, GitLab, GitLabSelfManaged)
publish_deployment_statusstringWhether to enable or disable publishing of deployment status to source providers. (ENABLED, DISABLED)
repository_link_idstringThe 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_namestringThe name of the repository associated with a specific sync configuration. (pattern: <code>^.*$</code>)
resource_namestringThe name of the connection resource associated with a specific sync configuration. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_\-]*$</code>)
role_arnstringThe 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_typestringThe type of sync for a specific sync configuration. (CFN_STACK_SYNC)
trigger_resource_update_onstringWhen to trigger Git sync to begin the stack update. (ANY_CHANGE, FILE_CHANGE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_sync_configurationselectregionReturns 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_configurationsselectregionReturns a list of sync configurations for a specified repository.
create_sync_configurationinsertregion, Branch, ConfigFile, RepositoryLinkId, ResourceName, RoleArn, SyncTypeCreates 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_configurationupdateregion, ResourceName, SyncTypeUpdates the sync configuration for your connection and a specified external Git repository.
delete_sync_configurationdeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

Deletes the sync configuration for a specified repository and connection.

DELETE FROM aws.codestar_connections.sync_configurations
WHERE region = '{{ region }}' --required
;