create_sync_configuration
¶
create_sync_configuration(
branch: BranchName,
config_file: DeploymentFilePath,
repository_link_id: RepositoryLinkId,
resource_name: ResourceName,
role_arn: IamRoleArn,
sync_type: SyncConfigurationType,
*,
config_overrides: Optional[CodeConnectionsClientConfig] = None,
publish_deployment_status: Optional[PublishDeploymentStatus] = None,
trigger_resource_update_on: Optional[TriggerResourceUpdateOn] = None,
pull_request_comment: Optional[PullRequestComment] = None,
) -> CreateSyncConfigurationOutput
Creates a sync configuration which allows Amazon Web Services to sync content from a Git repository to update a specified Amazon Web Services resource. Parameters for the sync configuration are determined by the sync type.
Parameters:
-
branch(BranchName) –The branch in the repository from which changes will be synced.
-
config_file(DeploymentFilePath) –The file name of the configuration file that manages syncing between the connection and the repository. This configuration file is stored in the repository.
-
repository_link_id(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.
-
resource_name(ResourceName) –The name of the Amazon Web Services resource (for example, a CloudFormation stack in the case of CFN_STACK_SYNC) that will be synchronized from the linked repository.
-
role_arn(IamRoleArn) –The ARN of the IAM role that grants permission for Amazon Web Services to use Git sync to update a given Amazon Web Services resource on your behalf.
-
sync_type(SyncConfigurationType) –The type of sync configuration.
-
publish_deployment_status(Optional[PublishDeploymentStatus], default:None) –Whether to enable or disable publishing of deployment status to source providers.
-
trigger_resource_update_on(Optional[TriggerResourceUpdateOn], default:None) –When to trigger Git sync to begin the stack update.
-
pull_request_comment(Optional[PullRequestComment], default:None) –A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
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.
-
InternalServerException–Received an internal server exception. Try again later.
-
InvalidInputException–The input is not valid. Verify that the action is typed correctly.
-
LimitExceededException–Exceeded the maximum limit for connections.
-
ResourceAlreadyExistsException–Unable to create resource. Resource already exists.
-
ResourceNotFoundException–Resource not found. Verify the connection resource ARN and try again.
-
ThrottlingException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codeconnections/_services/code_connections.py
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | |