A TypeScript/Node.js library for interacting with Aruba Cloud's SOAP API. This library provides a fully typed interface to manage Aruba Cloud resources programmatically.
- 🚀 Full TypeScript Support - Auto-generated types from WSDL files
- 🌍 Multi-Region Support - Connect to multiple Aruba Cloud data centers
- 🔐 Secure Authentication - WS-Security implementation with username/password
- 📋 Complete API Coverage - Access to all Aruba Cloud SOAP API endpoints
- 🛠️ Easy Setup - Simple configuration and initialization
- 📖 Rich Examples - Comprehensive usage examples included
- 🇮🇹 Italy DC1 - api.dc1.computing.cloud.it
- 🇮🇹 Italy DC2 - api.dc2.computing.cloud.it
- 🇮🇹 Italy DC3 - api.dc7.computing.cloud.it
- 🇨🇿 Czech Republic - api.dc3.computing.cloud.it
- 🇫🇷 France - api.dc4.computing.cloud.it
- 🇩🇪 Germany - api.dc5.computing.cloud.it
- 🇬🇧 United Kingdom - api.dc6.computing.cloud.it
- 🇵🇱 Poland - api.dc8.computing.cloud.it
npm install aruba-admin- Node.js >= 12
- Aruba Cloud account with API access
- Valid username and password for Aruba Cloud
Create a .env file in your project root:
ARUBA_USERNAME=your_username
ARUBA_PASSWORD=your_passwordimport { createArubaAdmin, DATA_CENTERS } from 'aruba-admin';
const client = await createArubaAdmin({
username: process.env.ARUBA_USERNAME!,
password: process.env.ARUBA_PASSWORD!,
dataCenter: DATA_CENTERS.ITALY1
});
// Get list of servers
const result = await client.GetServersListAsync({
operationRequest: { LightData: true }
});
console.log(result[0].GetServersListResult?.Value);Creates an authenticated SOAP client for Aruba Cloud API.
options(ArubaAdminOptions): Configuration objectusername(string): Your Aruba Cloud usernamepassword(string): Your Aruba Cloud passworddataCenter(DataCenter): Target data center
Promise - Authenticated SOAP client with all API methods
import { DATA_CENTERS } from 'aruba-admin';
// Available data centers
DATA_CENTERS.ITALY1 // Italy DC1
DATA_CENTERS.ITALY2 // Italy DC2
DATA_CENTERS.ITALY3 // Italy DC3
DATA_CENTERS.CZECH // Czech Republic
DATA_CENTERS.FRANCE // France
DATA_CENTERS.GERMANY // Germany
DATA_CENTERS.UK // United Kingdom
DATA_CENTERS.POLAND // Poland
DATA_CENTERS.DEFAULT // Default (Italy DC1)import dotenv from 'dotenv';
import { createArubaAdmin, DATA_CENTERS } from 'aruba-admin';
dotenv.config();
const client = await createArubaAdmin({
username: process.env.ARUBA_USERNAME!,
password: process.env.ARUBA_PASSWORD!,
dataCenter: DATA_CENTERS.CZECH
});
const response = await client.GetServersListAsync({
operationRequest: { LightData: true }
});
if (response[0].GetServersListResult?.Success) {
console.log('Servers:', response[0].GetServersListResult.Value);
} else {
console.error('Failed to get servers list');
}const vmResponse = await client.CreateVirtualMachineAsync({
operationRequest: {
Name: "my-new-vm",
CpuQuantity: 2,
RamQuantity: 4096,
OSTemplateId: 1, // Ubuntu template
PackageId: 1
}
});
console.log('VM Creation:', vmResponse[0]);const creditResponse = await client.GetCreditAsync({});
if (creditResponse[0].GetCreditResult?.Success) {
const credit = creditResponse[0].GetCreditResult.Value;
console.log(`Available Credit: ${credit.Credit} ${credit.Currency}`);
}const templatesResponse = await client.GetHypervisorTemplatesAsync({
operationRequest: {
HypervisorType: 4 // VMware
}
});
if (templatesResponse[0].GetHypervisorTemplatesResult?.Success) {
const templates = templatesResponse[0].GetHypervisorTemplatesResult.Value;
console.log('Available Templates:', templates);
}try {
const client = await createArubaAdmin({
username: process.env.ARUBA_USERNAME!,
password: process.env.ARUBA_PASSWORD!,
dataCenter: DATA_CENTERS.GERMANY
});
const result = await client.GetServersListAsync({
operationRequest: { LightData: true }
});
if (!result[0].GetServersListResult?.Success) {
console.error('API Error:', result[0].GetServersListResult?.ResultMessage);
}
} catch (error) {
console.error('Connection Error:', error);
}To regenerate TypeScript types from WSDL files:
npm run generateSoapApiThis will:
- Download WSDL files from all supported data centers
- Generate TypeScript interfaces and client code
- Fix namespace issues in WSDL files
aruba-admin/
├── lib/ # Core library files
│ ├── ArubaAdmin.ts # Main entry point
│ ├── constants.ts # Data center configurations
│ └── utils/ # Utility functions
├── generatedSoapApi/ # Auto-generated SOAP client
├── examples/ # Usage examples
└── package.json
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the BSD-2-Clause License - see the LICENSE file for details.
Roman A. Nosov - GitHub Profile
This is an unofficial library for Aruba Cloud API. It is not affiliated with or endorsed by Aruba S.p.A.
Keywords: aruba, aruba-cloud, soap-api, typescript, cloud-management, virtual-machines, infrastructure