sync_configurations
Creates, updates, deletes or gets a sync_configuration resource or lists sync_configurations in a region
Overview
| Name | sync_configurations |
| Type | Resource |
| Description | Schema for AWS::CodeStarConnections::SyncConfiguration resource which is used to enables an AWS resource to be synchronized from a source-provider. |
| Id | awscc.codestarconnections.sync_configurations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
owner_id | string | the ID of the entity that owns the repository. |
resource_name | string | The name of the resource that is being synchronized to the repository. |
repository_name | string | The name of the repository that is being synced to. |
provider_type | string | The name of the external provider where your third-party code repository is configured. |
branch | string | The name of the branch of the repository from which resources are to be synchronized, |
config_file | string | The source provider repository path of the sync configuration file of the respective SyncType. |
sync_type | string | The type of resource synchronization service that is to be configured, for example, CFN_STACK_SYNC. |
role_arn | string | The IAM Role that allows AWS to update CloudFormation stacks based on content in the specified repository. |
publish_deployment_status | string | Whether to enable or disable publishing of deployment status to source providers. |
trigger_resource_update_on | string | When to trigger Git sync to begin the stack update. |
repository_link_id | string | A UUID that uniquely identifies the RepositoryLink that the SyncConfig is associated with. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
resource_name | string | The name of the resource that is being synchronized to the repository. |
sync_type | string | The type of resource synchronization service that is to be configured, for example, CFN_STACK_SYNC. |
region | string | AWS region. |
For more information, see AWS::CodeStarConnections::SyncConfiguration.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | sync_configurations | INSERT | Branch, ConfigFile, RepositoryLinkId, ResourceName, SyncType, RoleArn, region |
delete_resource | sync_configurations | DELETE | Identifier, region |
update_resource | sync_configurations | UPDATE | Identifier, PatchDocument, region |
list_resources | sync_configurations_list_only | SELECT | region |
get_resource | sync_configurations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all sync_configurations in a region.
SELECT
region,
resource_name,
sync_type
FROM awscc.codestarconnections.sync_configurations_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new sync_configuration resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ 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 }}';
/*+ create */
INSERT INTO awscc.codestarconnections.sync_configurations (
ResourceName,
Branch,
ConfigFile,
SyncType,
RoleArn,
PublishDeploymentStatus,
TriggerResourceUpdateOn,
RepositoryLinkId,
region
)
SELECT
'{{ resource_name }}',
'{{ branch }}',
'{{ config_file }}',
'{{ sync_type }}',
'{{ role_arn }}',
'{{ publish_deployment_status }}',
'{{ trigger_resource_update_on }}',
'{{ repository_link_id }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: sync_configuration
props:
- name: resource_name
value: '{{ resource_name }}'
- name: branch
value: '{{ branch }}'
- name: config_file
value: '{{ config_file }}'
- name: sync_type
value: '{{ sync_type }}'
- name: role_arn
value: '{{ role_arn }}'
- name: publish_deployment_status
value: '{{ publish_deployment_status }}'
- name: trigger_resource_update_on
value: '{{ trigger_resource_update_on }}'
- name: repository_link_id
value: '{{ repository_link_id }}'
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:
- Create
- Read
- Update
- Delete
- List
codestar-connections:CreateSyncConfiguration,
codestar-connections:PassRepository,
iam:PassRole
codestar-connections:GetSyncConfiguration
codestar-connections:UpdateSyncConfiguration,
codestar-connections:PassRepository,
iam:PassRole
codestar-connections:DeleteSyncConfiguration,
codestar-connections:GetSyncConfiguration
codestar-connections:ListSyncConfigurations,
codestar-connections:ListRepositoryLinks