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: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://cloudhub.io/ Optional. CloudHub URL.
xs:string username Optional. CloudHub username.

Message Processors

<cloudhub:create-notification>

Create a notification inside CloudHub.

If the notification is sent after an exception, it attaches the exception.message and exception.stacktrace as as custom properties of the notification. Those custom properties can be accessed from Cloudhub console with the names 'exception.message' and 'exception.stacktrace'

In the case of multitenant applications the connector will create a notification for a particular tenant. (the one that is executing the flow)

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 */*
muleEvent

Processed mule event

MuleEvent */*
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.

This operation does not depend on the tenant environment.

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.

In the case of a multitenant application it searches for the notifications registered for the current tenant.

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 */*
muleEvent

Processed mule event

MuleEvent */*
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