Skip to main content

sync_configurations

Creates, updates, deletes or gets a sync_configuration resource or lists sync_configurations in a region

Overview

Namesync_configurations
TypeResource
DescriptionSchema for AWS::CodeStarConnections::SyncConfiguration resource which is used to enables an AWS resource to be synchronized from a source-provider.
Idaws.codestarconnections.sync_configurations

Fields

NameDatatypeDescription
owner_idstringthe ID of the entity that owns the repository.
resource_namestringThe name of the resource that is being synchronized to the repository.
repository_namestringThe name of the repository that is being synced to.
provider_typestringThe name of the external provider where your third-party code repository is configured.
branchstringThe name of the branch of the repository from which resources are to be synchronized,
config_filestringThe source provider repository path of the sync configuration file of the respective SyncType.
sync_typestringThe type of resource synchronization service that is to be configured, for example, CFN_STACK_SYNC.
role_arnstringThe IAM Role that allows AWS to update CloudFormation stacks based on content in the specified repository.
publish_deployment_statusstringWhether to enable or disable publishing of deployment status to source providers.
trigger_resource_update_onstringWhen to trigger Git sync to begin the stack update.
repository_link_idstringA UUID that uniquely identifies the RepositoryLink that the SyncConfig is associated with.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTBranch, ConfigFile, RepositoryLinkId, ResourceName, SyncType, RoleArn, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all sync_configurations in a region.

SELECT
region,
owner_id,
resource_name,
repository_name,
provider_type,
branch,
config_file,
sync_type,
role_arn,
publish_deployment_status,
trigger_resource_update_on,
repository_link_id
FROM aws.codestarconnections.sync_configurations
WHERE region = 'us-east-1';

Gets all properties from an individual sync_configuration.

SELECT
region,
owner_id,
resource_name,
repository_name,
provider_type,
branch,
config_file,
sync_type,
role_arn,
publish_deployment_status,
trigger_resource_update_on,
repository_link_id
FROM aws.codestarconnections.sync_configurations
WHERE region = 'us-east-1' AND data__Identifier = '<ResourceName>|<SyncType>';

INSERT example

Use the following StackQL query and manifest file to create a new sync_configuration resource, using stack-deploy.

/*+ create */
INSERT INTO aws.codestarconnections.sync_configurations (
ResourceName,
Branch,
ConfigFile,
SyncType,
RoleArn,
RepositoryLinkId,
region
)
SELECT
'{{ ResourceName }}',
'{{ Branch }}',
'{{ ConfigFile }}',
'{{ SyncType }}',
'{{ RoleArn }}',
'{{ RepositoryLinkId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.codestarconnections.sync_configurations
WHERE data__Identifier = '<ResourceName|SyncType>'
AND region = 'us-east-1';

Permissions

To operate on the sync_configurations resource, the following permissions are required:

Create

codestar-connections:CreateSyncConfiguration,
codestar-connections:PassRepository,
iam:PassRole

Read

codestar-connections:GetSyncConfiguration

Update

codestar-connections:UpdateSyncConfiguration,
codestar-connections:PassRepository,
iam:PassRole

Delete

codestar-connections:DeleteSyncConfiguration,
codestar-connections:GetSyncConfiguration

List

codestar-connections:ListSyncConfigurations,
codestar-connections:ListRepositoryLinks