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 | aws.codestarconnections.sync_configurations |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Branch, ConfigFile, RepositoryLinkId, ResourceName, SyncType, RoleArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.codestarconnections.sync_configurations (
ResourceName,
Branch,
ConfigFile,
SyncType,
RoleArn,
RepositoryLinkId,
region
)
SELECT
'{{ ResourceName }}',
'{{ Branch }}',
'{{ ConfigFile }}',
'{{ SyncType }}',
'{{ RoleArn }}',
'{{ RepositoryLinkId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.codestarconnections.sync_configurations (
ResourceName,
Branch,
ConfigFile,
SyncType,
RoleArn,
PublishDeploymentStatus,
TriggerResourceUpdateOn,
RepositoryLinkId,
region
)
SELECT
'{{ ResourceName }}',
'{{ Branch }}',
'{{ ConfigFile }}',
'{{ SyncType }}',
'{{ RoleArn }}',
'{{ PublishDeploymentStatus }}',
'{{ TriggerResourceUpdateOn }}',
'{{ RepositoryLinkId }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: sync_configuration
props:
- name: ResourceName
value: '{{ ResourceName }}'
- name: Branch
value: '{{ Branch }}'
- name: ConfigFile
value: '{{ ConfigFile }}'
- name: SyncType
value: '{{ SyncType }}'
- name: RoleArn
value: '{{ RoleArn }}'
- name: PublishDeploymentStatus
value: '{{ PublishDeploymentStatus }}'
- name: TriggerResourceUpdateOn
value: '{{ TriggerResourceUpdateOn }}'
- name: RepositoryLinkId
value: '{{ RepositoryLinkId }}'
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