Skip to content

list_repository_sync_definitions

list_repository_sync_definitions(
    repository_link_id: RepositoryLinkId,
    sync_type: SyncConfigurationType,
    *,
    config_overrides: Optional[CodeConnectionsClientConfig] = None,
) -> ListRepositorySyncDefinitionsOutput

Lists the repository sync definitions for repository links in your account.

Parameters:

  • repository_link_id (RepositoryLinkId) –

    The ID of the repository link for the sync definition for which you want to retrieve information.

  • sync_type (SyncConfigurationType) –

    The sync type of the repository link for the the sync definition for which you want to retrieve information.

Raises:

Source code in docs_src/capo_codeconnections/_services/code_connections.py
def list_repository_sync_definitions(
    self,
    repository_link_id: "capo_codeconnections.types.repository_link_id.RepositoryLinkId",
    sync_type: "capo_codeconnections.types.sync_configuration_type.SyncConfigurationType",
    *,
    config_overrides: Optional[CodeConnectionsClientConfig] = None,
) -> "capo_codeconnections.types.list_repository_sync_definitions_output.ListRepositorySyncDefinitionsOutput":
    """<p>Lists the repository sync definitions for repository links in your account.</p>

    Args:
        repository_link_id: <p>The ID of the repository link for the sync definition for which you want to retrieve information.</p>
        sync_type: <p>The sync type of the repository link for the the sync definition for which you want to retrieve information.</p>

    Raises:
        capo_codeconnections.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</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.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codeconnections.types.list_repository_sync_definitions_input.ListRepositorySyncDefinitionsInput]",
    ) -> OperationResponse[
        "capo_codeconnections.types.list_repository_sync_definitions_output.ListRepositorySyncDefinitionsOutput"
    ]:
        import capo_codeconnections._operations.code_connections_20231201.list_repository_sync_definitions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListRepositorySyncDefinitions")
    )
    input_: capo_codeconnections.types.list_repository_sync_definitions_input.ListRepositorySyncDefinitionsInput = {
        "repository_link_id": repository_link_id,
        "sync_type": sync_type,
    }

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