org.mule.modules

mule-module-cloudhub

config

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 ValueDescriptionJava TypeMIME TypeEncoding
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 ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
message The contents of the notification. String */* UTF-8
priority The notification priority. Notification.Priority */*
domain Optional. The application domain. String */* UTF-8
payload #[payload] Optional. The payload of the message. If it's an exception, it'll get appended to the message. Object */*
Child Elements
NameDefault ValueDescriptionJava Type
<cloudhub:custom-properties> Optional. A map to represent custom placeholders on the notification template Map<String, String>
Returns
Return Type Description
Notification 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 ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
message The contents of the notification. String */* UTF-8
priority The notification priority. Notification.Priority */*
payload #[payload] Optional. The payload of the message. If it's an exception, it'll get appended to the message. Object */*
includeStacktrace true Optional. If the message payload contains an Exception, whether or not to include the stacktrace. True by default. boolean */*
Child Elements
NameDefault ValueDescriptionJava Type
<cloudhub:custom-properties> Optional. A map to represent custom placeholders on the notification template Map<String, String>

<cloudhub:delete-application>

Delete an application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
domain The application domain. String */* UTF-8

<cloudhub:deploy-application>

Deploy specified application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
file #[payload] Optional. Mule application to deploy, Input Object type: java.io.InputStream InputStream */*
domain The application domain. String */* UTF-8
muleVersion 3.2.2 Optional. The version of Mule, e.g. 3.2.2. String */* UTF-8
workerCount 1 Optional. The number of workers to deploy. int */*
Child Elements
NameDefault ValueDescriptionJava Type
<cloudhub:environment-variables> Optional. Environment variables for you application. Map<String, String>

<cloudhub:dismiss-notification>

Dismiss an individual notification.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
href The href property of the Notification object. String */* UTF-8

<cloudhub:get-application>

Get an application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
domain The application domain. String */* UTF-8
Returns
Return Type Description
Application An application.

<cloudhub:list-applications>

List applications.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
Returns
Return Type Description
List<Application> A list of applications.

<cloudhub:list-notifications>

List a user's notifications.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
maxResults Optional. The maximum number of results to retrieve. Integer */*
offset Optional. The offset to start listing alerts from. Integer */*
Returns
Return Type Description
NotificationResults A List of notifications.

<cloudhub:start-application>

Start an application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
domain The application domain. String */* UTF-8

<cloudhub:stop-application>

Stop an application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
domain The application domain. String */* UTF-8

<cloudhub:update-application>

Update an application.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
application #[payload] Optional. The application to update. Application */*

Message Sources

Transformers