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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.codestarconnections.sync_configurations
WHERE
Identifier = '{{ resource_name }}|{{ sync_type }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

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