org.mule.modules

mule-module-cloudhub


Namespacehttp://www.mulesoft.org/schema/mule/cloudhub
Schema Locationhttp://www.mulesoft.org/schema/mule/cloudhub/current/mule-cloudhub.xsd  (View Schema)
Schema Version1.0
Minimum Mule Version3.2

Module Overview

Provides the ability to interact with Mule CloudHub from within a Mule application. There are operations to deploy, start, stop, and update applications as well as send notifications from your application to CloudHub.

When running this connector in an application inside CloudHub, it will use token based authentication to access the API. This will allow access and usage of the CloudHub APIs without the need to specify your username and password.

Summary

Configuration
<cloudhub:config>
Configure an instance of this module
Message Processors
<cloudhub:create-notification>
Create a notification inside CloudHub.
<cloudhub:create-notification-from-flow>
Create a notification inside CloudHub for your flow.
<cloudhub:delete-application>
Delete an application.
<cloudhub:deploy-application>
Deploy specified application.
<cloudhub:dismiss-notification>
Dismiss an individual notification.
<cloudhub:get-application>
Get an application.
<cloudhub:list-applications>
List applications.
<cloudhub:list-notifications>
List a user's notifications.
<cloudhub:start-application>
Start an application.
<cloudhub:stop-application>
Stop an application.
<cloudhub:update-application>
Update an application.

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:cloudhub="http://www.mulesoft.org/schema/mule/cloudhub"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/cloudhub
               http://www.mulesoft.org/schema/mule/cloudhub/current/mule-cloudhub.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescription
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:long maxWaitTime 0 Optional. Maximum time allowed to deplpoy/undeploy.
xs:string password Optional. CloudHub password.
xs:string url https://muleion.com/ Optional. CloudHub URL.
xs:string username Optional. CloudHub username.

Message Processors

<cloudhub:create-notification>

Create a notification inside CloudHub.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
message The contents of the notification.
priority The notification priority.
domain Optional. The application domain.
payload The payload of the message. If it's an exception, it'll get appended to the message.
Child Elements
Return Payload
  • The notification that was created.

<cloudhub:create-notification-from-flow>

Create a notification inside CloudHub for your flow. If not running in an CloudHub environment, this will log to the console.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
message The contents of the notification.
priority The notification priority.
payload The payload of the message. If it's an exception, it'll get appended to the message.
includeStacktrace true Optional. If the message payload contains an Exception, whether or not to include the stacktrace. True by default.
Child Elements

<cloudhub:delete-application>

Delete an application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
domain The application domain.
Child Elements

<cloudhub:deploy-application>

Deploy specified application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
file Mule application to deploy, Input Object type: java.io.InputStream
domain The application domain.
muleVersion 3.2.2 Optional. The version of Mule, e.g. 3.2.2.
workerCount 1 Optional. The number of workers to deploy.
Child Elements
<cloudhub:environment-variables>
Optional. Environment variables for you application.

<cloudhub:dismiss-notification>

Dismiss an individual notification.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
href The href property of the Notification object.
Child Elements

<cloudhub:get-application>

Get an application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
domain The application domain.
Child Elements
Return Payload
  • An application.

<cloudhub:list-applications>

List applications.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
Child Elements
Return Payload
  • A list of applications.

<cloudhub:list-notifications>

List a user's notifications.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
maxResults Optional. The maximum number of results to retrieve.
offset Optional. The offset to start listing alerts from.
Child Elements
Return Payload
  • A List of notifications.

<cloudhub:start-application>

Start an application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
domain The application domain.
Child Elements

<cloudhub:stop-application>

Stop an application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
domain The application domain.
Child Elements

<cloudhub:update-application>

Update an application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
application The application to update.
Child Elements