Skip to content

update_sync_configuration

update_sync_configuration(
    resource_name: ResourceName,
    sync_type: SyncConfigurationType,
    *,
    config_overrides: Optional[CodeConnectionsClientConfig] = None,
    branch: Optional[BranchName] = None,
    config_file: Optional[DeploymentFilePath] = None,
    repository_link_id: Optional[RepositoryLinkId] = None,
    role_arn: Optional[IamRoleArn] = None,
    publish_deployment_status: Optional[PublishDeploymentStatus] = None,
    trigger_resource_update_on: Optional[TriggerResourceUpdateOn] = None,
    pull_request_comment: Optional[PullRequestComment] = None,
) -> UpdateSyncConfigurationOutput

Updates the sync configuration for your connection and a specified external Git repository.

Parameters:

  • branch (Optional[BranchName], default: None ) –

    The branch for the sync configuration to be updated.

  • config_file (Optional[DeploymentFilePath], default: None ) –

    The configuration file for the sync configuration to be updated.

  • repository_link_id (Optional[RepositoryLinkId], default: None ) –

    The ID of the repository link for the sync configuration to be updated.

  • resource_name (ResourceName) –

    The name of the Amazon Web Services resource for the sync configuration to be updated.

  • role_arn (Optional[IamRoleArn], default: None ) –

    The ARN of the IAM role for the sync configuration to be updated.

  • sync_type (SyncConfigurationType) –

    The sync type for the sync configuration to be updated.

  • 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 ) –

    TA toggle that specifies whether to enable or disable pull request comments for the sync configuration to be updated.

Raises:

Source code in docs_src/capo_codeconnections/_services/code_connections.py
def update_sync_configuration(
    self,
    resource_name: "capo_codeconnections.types.resource_name.ResourceName",
    sync_type: "capo_codeconnections.types.sync_configuration_type.SyncConfigurationType",
    *,
    config_overrides: Optional[CodeConnectionsClientConfig] = None,
    branch: Optional["capo_codeconnections.types.branch_name.BranchName"] = None,
    config_file: Optional[
        "capo_codeconnections.types.deployment_file_path.DeploymentFilePath"
    ] = None,
    repository_link_id: Optional[
        "capo_codeconnections.types.repository_link_id.RepositoryLinkId"
    ] = None,
    role_arn: Optional["capo_codeconnections.types.iam_role_arn.IamRoleArn"] = None,
    publish_deployment_status: Optional[
        "capo_codeconnections.types.publish_deployment_status.PublishDeploymentStatus"
    ] = None,
    trigger_resource_update_on: Optional[
        "capo_codeconnections.types.trigger_resource_update_on.TriggerResourceUpdateOn"
    ] = None,
    pull_request_comment: Optional[
        "capo_codeconnections.types.pull_request_comment.PullRequestComment"
    ] = None,
) -> "capo_codeconnections.types.update_sync_configuration_output.UpdateSyncConfigurationOutput":
    """<p>Updates the sync configuration for your connection and a specified external Git repository.</p>

    Args:
        branch: <p>The branch for the sync configuration to be updated.</p>
        config_file: <p>The configuration file for the sync configuration to be updated.</p>
        repository_link_id: <p>The ID of the repository link for the sync configuration to be updated.</p>
        resource_name: <p>The name of the Amazon Web Services resource for the sync configuration to be updated.</p>
        role_arn: <p>The ARN of the IAM role for the sync configuration to be updated.</p>
        sync_type: <p>The sync type for the sync configuration to be updated.</p>
        publish_deployment_status: <p>Whether to enable or disable publishing of deployment status to source providers.</p>
        trigger_resource_update_on: <p>When to trigger Git sync to begin the stack update.</p>
        pull_request_comment: <p>TA toggle that specifies whether to enable or disable pull request comments for the sync configuration to be updated.</p>

    Raises:
        capo_codeconnections.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_codeconnections.errors.concurrent_modification_exception.ConcurrentModificationException: <p>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. </p>
        capo_codeconnections.errors.internal_server_exception.InternalServerException: <p>Received an internal server exception. Try again later.</p>
        capo_codeconnections.errors.invalid_input_exception.InvalidInputException: <p>The input is not valid. Verify that the action is typed correctly.</p>
        capo_codeconnections.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found. Verify the connection resource ARN and try again.</p>
        capo_codeconnections.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_codeconnections.errors.update_out_of_sync_exception.UpdateOutOfSyncException: <p>The update is out of sync. Try syncing again.</p>
        capo_codeconnections.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codeconnections.types.update_sync_configuration_input.UpdateSyncConfigurationInput]",
    ) -> OperationResponse[
        "capo_codeconnections.types.update_sync_configuration_output.UpdateSyncConfigurationOutput"
    ]:
        import capo_codeconnections._operations.code_connections_20231201.update_sync_configuration

        output, http_response = (
            capo_codeconnections._operations.code_connections_20231201.update_sync_configuration.update_sync_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSyncConfiguration")
    )
    input_: capo_codeconnections.types.update_sync_configuration_input.UpdateSyncConfigurationInput = {
        "resource_name": resource_name,
        "sync_type": sync_type,
    }
    if branch is not None:
        input_["branch"] = branch
    if config_file is not None:
        input_["config_file"] = config_file
    if repository_link_id is not None:
        input_["repository_link_id"] = repository_link_id
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if publish_deployment_status is not None:
        input_["publish_deployment_status"] = publish_deployment_status
    if trigger_resource_update_on is not None:
        input_["trigger_resource_update_on"] = trigger_resource_update_on
    if pull_request_comment is not None:
        input_["pull_request_comment"] = pull_request_comment

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output