This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pprint import pprint as pp | |
import SoftLayer | |
client = SoftLayer.Client() | |
mgr = SoftLayer.CCIManager(client) | |
serverId = 1234 | |
mask = ('mask[monitoringAgents[id,name,statusName]]') | |
server = mgr.get_instance(serverId, mask=mask) | |
pp(server) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import SoftLayer.API | |
from pprint import pprint as pp | |
api_username = '' | |
api_key = '' | |
client = SoftLayer.Client( | |
username=api_username, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('softlayer-api-php-client/SoftLayer/SoapClient.class.php'); | |
$apiUsername = ''; | |
$apiKey = ''; | |
$accountClient = SoftLayer_SoapClient::getClient('SoftLayer_Account', null, $apiUsername, $apiKey); | |
$mask = "mask[billingItem[recurringFee, id, orderItem[description, order[userRecord[id, username], id]]]]"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from SoftLayer import CCIManager, Client | |
api_username = '' | |
api_key = '' | |
object_mask = 'mask.provisionDate' | |
client = Client( | |
username=api_username, | |
api_key=api_key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SoftLayer | |
object_mask = 'mask.provisionDate' | |
client = SoftLayer.Client() | |
cci = client['Virtual_Guest'].getObject(id=12345, mask=object_mask) | |
if ( 'provisionDate' in cci and cci['provisionDate'] != ''): | |
print 'CCI %s is online' % cci['hostname'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parameters": [ | |
{ | |
"id": 1234, | |
"virtualServers": [ | |
{ | |
"virtualIpAddressId": 1234, | |
"port": 80, | |
"allocation": 100, | |
"serviceGroups": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SoftLayer.API | |
from pprint import pprint as pp | |
api_username = '' | |
api_key = '' | |
hostname = '' | |
domain_name = '' | |
client = SoftLayer.Client( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('softlayer-api-php-client/SoftLayer/SoapClient.class.php'); | |
$apiUsername = ''; | |
$apiKey = ''; | |
$client = SoftLayer_SoapClient::getClient('SoftLayer_Account', null, $apiUsername, $apiKey); | |
$client->setObjectMask("mask.users.userStatus"); | |
$users = $client->getObject(); | |
print_r($users); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('softlayer-api-php-client/SoftLayer/SoapClient.class.php'); | |
$apiUsername = ''; | |
$apiKey = ''; | |
$accountClient = SoftLayer_SoapClient::getClient('SoftLayer_Account', null, $apiUsername, $apiKey); | |
$userClient = SoftLayer_SoapClient::getClient('SoftLayer_User_Customer', null, $apiUsername, $apiKey); | |
$virtualGuestClient = SoftLayer_SoapClient::getClient('SoftLayer_Virtual_Guest', null, $apiUsername, $apiKey); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add new configuration for a monitoring agent. | |
* | |
* This example shows how to use the SoftLayer API to add new configuration for a monitoring agent for the hardware or virtual guest | |
* server instance. | |
* | |
* @license <http://sldn.softlayer.com/wiki/index.php/License> | |
* @author SoftLayer Technologies, Inc. <[email protected]> | |
*/ |