Skip to content

update_repository_link async

update_repository_link(
    repository_link_id: RepositoryLinkId,
    *,
    config_overrides: Optional[AsyncCodeConnectionsClientConfig] = None,
    connection_arn: Optional[ConnectionArn] = None,
    encryption_key_arn: Optional[KmsKeyArn] = None,
) -> UpdateRepositoryLinkOutput

Updates the association between your connection and a specified external Git repository. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.

Parameters:

  • connection_arn (Optional[ConnectionArn], default: None ) –

    The Amazon Resource Name (ARN) of the connection for the repository link to be updated. The updated connection ARN must have the same providerType (such as GitHub) as the original connection ARN for the repo link.

  • encryption_key_arn (Optional[KmsKeyArn], default: None ) –

    The Amazon Resource Name (ARN) of the encryption key for the repository link to be updated.

  • repository_link_id (RepositoryLinkId) –

    The ID of the repository link to be updated.

Raises:

Source code in docs_src/capo_codeconnections/_services/async_code_connections.py
async def update_repository_link(
    self,
    repository_link_id: "capo_codeconnections.types.repository_link_id.RepositoryLinkId",
    *,
    config_overrides: Optional[AsyncCodeConnectionsClientConfig] = None,
    connection_arn: Optional[
        "capo_codeconnections.types.connection_arn.ConnectionArn"
    ] = None,
    encryption_key_arn: Optional[
        "capo_codeconnections.types.kms_key_arn.KmsKeyArn"
    ] = None,
) -> "capo_codeconnections.types.update_repository_link_output.UpdateRepositoryLinkOutput":
    """<p>Updates the association between your connection and a specified external Git repository. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.</p>

    Args:
        connection_arn: <p>The Amazon Resource Name (ARN) of the connection for the repository link to be updated. The updated connection ARN must have the same providerType (such as GitHub) as the original connection ARN for the repo link.</p>
        encryption_key_arn: <p>The Amazon Resource Name (ARN) of the encryption key for the repository link to be updated.</p>
        repository_link_id: <p>The ID of the repository link 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.conditional_check_failed_exception.ConditionalCheckFailedException: <p>The conditional check failed. Try again later.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codeconnections.types.update_repository_link_input.UpdateRepositoryLinkInput]",
    ) -> AsyncOperationResponse[
        "capo_codeconnections.types.update_repository_link_output.UpdateRepositoryLinkOutput"
    ]:
        import capo_codeconnections._operations.code_connections_20231201.update_repository_link

        (
            output,
            http_response,
        ) = await capo_codeconnections._operations.code_connections_20231201.update_repository_link.async_update_repository_link(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRepositoryLink")
    )
    input_: capo_codeconnections.types.update_repository_link_input.UpdateRepositoryLinkInput = {
        "repository_link_id": repository_link_id
    }
    if connection_arn is not None:
        input_["connection_arn"] = connection_arn
    if encryption_key_arn is not None:
        input_["encryption_key_arn"] = encryption_key_arn

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output