CreateSyncConfiguration - AWS CodeConnections

CreateSyncConfiguration

Creates a sync configuration which allows AWS to sync content from a Git repository to update a specified AWS resource. Parameters for the sync configuration are determined by the sync type.

Request Syntax

{ "Branch": "string", "ConfigFile": "string", "PublishDeploymentStatus": "string", "RepositoryLinkId": "string", "ResourceName": "string", "RoleArn": "string", "SyncType": "string", "TriggerResourceUpdateOn": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Branch

The branch in the repository from which changes will be synced.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: ^.*$

Required: Yes

ConfigFile

The file name of the configuration file that manages syncing between the connection and the repository. This configuration file is stored in the repository.

Type: String

Required: Yes

PublishDeploymentStatus

Whether to enable or disable publishing of deployment status to source providers.

Type: String

Valid Values: ENABLED | DISABLED

Required: No

RepositoryLinkId

The ID of the repository link created for the connection. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.

Type: String

Pattern: ^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$

Required: Yes

ResourceName

The name of the AWS resource (for example, a CloudFormation stack in the case of CFN_STACK_SYNC) that will be synchronized from the linked repository.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: ^[0-9A-Za-z]+[0-9A-Za-z_\\-]*$

Required: Yes

RoleArn

The ARN of the IAM role that grants permission for AWS to use Git sync to update a given AWS resource on your behalf.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: arn:aws(-[\w]+)*:iam::\d{12}:role/[a-zA-Z_0-9+=,.@\-_/]+

Required: Yes

SyncType

The type of sync configuration.

Type: String

Valid Values: CFN_STACK_SYNC

Required: Yes

TriggerResourceUpdateOn

When to trigger Git sync to begin the stack update.

Type: String

Valid Values: ANY_CHANGE | FILE_CHANGE

Required: No

Response Syntax

{ "SyncConfiguration": { "Branch": "string", "ConfigFile": "string", "OwnerId": "string", "ProviderType": "string", "PublishDeploymentStatus": "string", "RepositoryLinkId": "string", "RepositoryName": "string", "ResourceName": "string", "RoleArn": "string", "SyncType": "string", "TriggerResourceUpdateOn": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

SyncConfiguration

The created sync configuration for the connection. A sync configuration allows AWS to sync content from a Git repository to update a specified AWS resource.

Type: SyncConfiguration object

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 400

ConcurrentModificationException

Exception thrown as a result of concurrent modification to an application. For example, two individuals attempting to edit the same application at the same time.

HTTP Status Code: 400

InternalServerException

Received an internal server exception. Try again later.

HTTP Status Code: 400

InvalidInputException

The input is not valid. Verify that the action is typed correctly.

HTTP Status Code: 400

LimitExceededException

Exceeded the maximum limit for connections.

HTTP Status Code: 400

ResourceAlreadyExistsException

Unable to create resource. Resource already exists.

HTTP Status Code: 400

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: