Interface CloudClient

    • Method Detail

      • isInitialized

        default boolean isInitialized()
        Checks if the client data is fully ready to be queried by the system. Actually, it may take some time to communicate to the cloud service.

        All interface members may not return full information if false was returned from this method.

        Returns:
        true if the cloud is fully initialized.
      • findImageById

        @Nullable
        CloudImage findImageById​(@NotNull
                                 String imageId)
                          throws CloudException
        Looks for an image with the specified identifier and returns its handle.
        Parameters:
        imageId - idetifier of the image to look for. See CloudImage.getId().
        Returns:
        image handle.
        Throws:
        CloudException - on error
      • findInstanceByAgent

        @Nullable
        CloudInstance findInstanceByAgent​(@NotNull
                                          AgentDescription agent)
        Checks if the agent is an instnce of one of the running instances of that cloud profile.
        Parameters:
        agent - agent description of an agent that is going to connect
        Returns:
        corresponding CloudInstance if found or null
      • getImages

        @NotNull
        Collection<? extends CloudImage> getImages()
                                            throws CloudException
        Lists all user selected images. The method should either return an unmodifiable snapshot of the images or a thread-safe collection.
        Returns:
        list of all available images; their order is undefined.
        Throws:
        CloudException - on error
      • getErrorInfo

        @Nullable
        default CloudErrorInfo getErrorInfo()
        Returns currect error info if there was any or null. Can be null. Returning error info marks this profile as error-containing and not relayable.
        Specified by:
        getErrorInfo in interface CloudErrorProvider
        Returns:
        error info or null
      • canStartNewInstance

        @Deprecated
        default boolean canStartNewInstance​(@NotNull
                                            CloudImage image)
        Deprecated.
        since 2018.1
        Call this method to check if it is possible (in theory) to start new instance of a given image in this profile. Deprecated since 2018.1. jetbrains.buildServer.clouds.CloudClient#canStartNewInstanceWithDetails(jetbrains.buildServer.clouds.CloudImage) is being used instead.
        Parameters:
        image - image to start new instance from
        Returns:
        can start new instance or not
      • canStartNewInstanceWithDetails

        @NotNull
        default CanStartNewInstanceResult canStartNewInstanceWithDetails​(@NotNull
                                                                         CloudImage image)
        Call this method to check if it is possible (in theory) to start new instance of a given image in this profile.
        Parameters:
        image - image to start new instance from
        Returns:
        can start new instance result with details
        Since:
        2018.1
      • generateAgentName

        @Nullable
        String generateAgentName​(@NotNull
                                 AgentDescription agent)
        Generated name for build agent that is thought to be running as instance of this cloud client.
        Parameters:
        agent - agent instance
        Returns:
        proposed build agent name or null
        Since:
        6.0
      • getInstancesLimit

        @Nullable
        default Integer getInstancesLimit()
        The maximum number of instances associated to the profile.

        A positive number will represent the true limit of instances. Null will represent if the information is not available, undefined, or an unlimited number of instances is allowed.

        Returns:
        see above
        Since:
        2022.12