create_sync_configuration
async
¶
create_sync_configuration(
branch: BranchName,
config_file: DeploymentFilePath,
repository_link_id: RepositoryLinkId,
resource_name: ResourceName,
role_arn: IamRoleArn,
sync_type: SyncConfigurationType,
*,
config_overrides: Optional[AsyncCodeConnectionsClientConfig] = 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.
-
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/async_code_connections.py
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 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 | |