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.
Idawscc.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.

For more information, see AWS::CodeStarConnections::SyncConfiguration.

Methods

NameResourceAccessible byRequired Params
create_resourcesync_configurationsINSERTBranch, ConfigFile, RepositoryLinkId, ResourceName, SyncType, RoleArn, region
delete_resourcesync_configurationsDELETEIdentifier, region
update_resourcesync_configurationsUPDATEIdentifier, PatchDocument, region
list_resourcessync_configurations_list_onlySELECTregion
get_resourcesync_configurationsSELECTIdentifier, region

SELECT examples

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 awscc.codestarconnections.sync_configurations
WHERE
region = 'us-east-1' AND
Identifier = '{{ resource_name }}|{{ sync_type }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.codestarconnections.sync_configurations (
ResourceName,
Branch,
ConfigFile,
SyncType,
RoleArn,
RepositoryLinkId,
region
)
SELECT
'{{ resource_name }}',
'{{ branch }}',
'{{ config_file }}',
'{{ sync_type }}',
'{{ role_arn }}',
'{{ repository_link_id }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.codestarconnections.sync_configurations
SET PatchDocument = string('{{ {
"Branch": branch,
"ConfigFile": config_file,
"RoleArn": role_arn,
"PublishDeploymentStatus": publish_deployment_status,
"TriggerResourceUpdateOn": trigger_resource_update_on,
"RepositoryLinkId": repository_link_id
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ resource_name }}|{{ sync_type }}';

DELETE example

/*+ delete */
DELETE FROM awscc.codestarconnections.sync_configurations
WHERE
Identifier = '{{ resource_name }}|{{ sync_type }}' AND
region = 'us-east-1';

Permissions

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

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