Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Service_WindowsAzure_Management_Client Class Reference

Public Member Functions

 __construct ($subscriptionId, $certificatePath, $certificatePassphrase, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy=null)
 Creates a new Zend_Service_WindowsAzure_Management instance.
 
 setHttpClientChannel ($adapterInstance= 'Zend_Http_Client_Adapter_Socket')
 Set the HTTP client channel to use.
 
 getHttpClientChannel ()
 Retrieve HTTP client channel.
 
 getSubscriptionId ()
 Returns the Windows Azure subscription ID.
 
 getLastRequestId ()
 Returns the last request ID.
 
 getBaseUrl ()
 Get base URL for creating requests.
 
 getOperationStatus ($requestId= '')
 The Get Operation Status operation returns the status of the specified operation.
 
 listSubscriptionOperations ($startTime, $endTime, $objectIdFilter=null, $operationResultFilter=null, $continuationToken=null)
 The List Subscription Operations operation returns a list of create, update, and delete operations that were performed on a subscription during the specified timeframe.
 
 waitForOperation ($requestId= '', $sleepInterval=250)
 Wait for an operation to complete.
 
 createBlobClientForService ($serviceName, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy=null)
 Creates a new Zend_Service_WindowsAzure_Storage_Blob instance for the current account.
 
 createTableClientForService ($serviceName, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy=null)
 Creates a new Zend_Service_WindowsAzure_Storage_Table instance for the current account.
 
 createQueueClientForService ($serviceName, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy=null)
 Creates a new Zend_Service_WindowsAzure_Storage_Queue instance for the current account.
 
 listStorageAccounts ()
 The List Storage Accounts operation lists the storage accounts available under the current subscription.
 
 getStorageAccountProperties ($serviceName)
 The Get Storage Account Properties operation returns the system properties for the specified storage account.
 
 getStorageAccountKeys ($serviceName)
 The Get Storage Keys operation returns the primary and secondary access keys for the specified storage account.
 
 regenerateStorageAccountKey ($serviceName, $key= 'primary')
 The Regenerate Keys operation regenerates the primary or secondary access key for the specified storage account.
 
 listHostedServices ()
 The List Hosted Services operation lists the hosted services available under the current subscription.
 
 createHostedService ($serviceName, $label, $description= '', $location=null, $affinityGroup=null)
 The Create Hosted Service operation creates a new hosted service in Windows Azure.
 
 updateHostedService ($serviceName, $label, $description= '')
 The Update Hosted Service operation updates the label and/or the description for a hosted service in Windows Azure.
 
 deleteHostedService ($serviceName)
 The Delete Hosted Service operation deletes the specified hosted service in Windows Azure.
 
 getHostedServiceProperties ($serviceName)
 The Get Hosted Service Properties operation retrieves system properties for the specified hosted service.
 
 createDeployment ($serviceName, $deploymentSlot, $name, $label, $packageUrl, $configuration, $startDeployment=false, $treatWarningsAsErrors=false)
 The Create Deployment operation uploads a new service package and creates a new deployment on staging or production.
 
 getDeploymentBySlot ($serviceName, $deploymentSlot)
 The Get Deployment operation returns configuration information, status, and system properties for the specified deployment.
 
 getDeploymentByDeploymentId ($serviceName, $deploymentId)
 The Get Deployment operation returns configuration information, status, and system properties for the specified deployment.
 
 swapDeployment ($serviceName, $productionDeploymentName, $sourceDeploymentName)
 The Swap Deployment operation initiates a virtual IP swap between the staging and production deployment environments for a service.
 
 deleteDeploymentBySlot ($serviceName, $deploymentSlot)
 The Delete Deployment operation deletes the specified deployment.
 
 deleteDeploymentByDeploymentId ($serviceName, $deploymentId)
 The Delete Deployment operation deletes the specified deployment.
 
 updateDeploymentStatusBySlot ($serviceName, $deploymentSlot, $status= 'running')
 The Update Deployment Status operation initiates a change in deployment status.
 
 updateDeploymentStatusByDeploymentId ($serviceName, $deploymentId, $status= 'running')
 The Update Deployment Status operation initiates a change in deployment status.
 
 setInstanceCountBySlot ($serviceName, $deploymentSlot, $roleName, $instanceCount)
 Updates a deployment's role instance count.
 
 setInstanceCountByDeploymentId ($serviceName, $deploymentId, $roleName, $instanceCount)
 Updates a deployment's role instance count.
 
 configureDeploymentBySlot ($serviceName, $deploymentSlot, $configuration)
 The Change Deployment Configuration request may be specified as follows.
 
 configureDeploymentByDeploymentId ($serviceName, $deploymentId, $configuration)
 The Change Deployment Configuration request may be specified as follows.
 
 upgradeDeploymentBySlot ($serviceName, $deploymentSlot, $label, $packageUrl, $configuration, $mode= 'auto', $roleToUpgrade=null)
 The Upgrade Deployment operation initiates an upgrade.
 
 upgradeDeploymentByDeploymentId ($serviceName, $deploymentId, $label, $packageUrl, $configuration, $mode= 'auto', $roleToUpgrade=null)
 The Upgrade Deployment operation initiates an upgrade.
 
 walkUpgradeDomainBySlot ($serviceName, $deploymentSlot, $upgradeDomain=0)
 The Walk Upgrade Domain operation specifies the next upgrade domain to be walked during an in-place upgrade.
 
 walkUpgradeDomainByDeploymentId ($serviceName, $deploymentId, $upgradeDomain=0)
 The Walk Upgrade Domain operation specifies the next upgrade domain to be walked during an in-place upgrade.
 
 rebootRoleInstanceBySlot ($serviceName, $deploymentSlot, $roleInstanceName)
 The Reboot Role Instance operation requests a reboot of a role instance that is running in a deployment.
 
 rebootRoleInstanceByDeploymentId ($serviceName, $deploymentId, $roleInstanceName)
 The Reboot Role Instance operation requests a reboot of a role instance that is running in a deployment.
 
 reimageRoleInstanceBySlot ($serviceName, $deploymentSlot, $roleInstanceName)
 The Reimage Role Instance operation requests a reimage of a role instance that is running in a deployment.
 
 reimageRoleInstanceByDeploymentId ($serviceName, $deploymentId, $roleInstanceName)
 The Reimage Role Instance operation requests a reimage of a role instance that is running in a deployment.
 
 listCertificates ($serviceName)
 The List Certificates operation lists all certificates associated with the specified hosted service.
 
 getCertificate ($serviceName, $algorithm= '', $thumbprint= '')
 The Get Certificate operation returns the public data for the specified certificate.
 
 addCertificate ($serviceName, $certificateData, $certificatePassword, $certificateFormat= 'pfx')
 The Add Certificate operation adds a certificate to the subscription.
 
 deleteCertificate ($serviceName, $algorithm= '', $thumbprint= '')
 The Delete Certificate operation deletes a certificate from the subscription's certificate store.
 
 listAffinityGroups ()
 The List Affinity Groups operation lists the affinity groups associated with the specified subscription.
 
 createAffinityGroup ($name, $label, $description= '', $location= '')
 The Create Affinity Group operation creates a new affinity group for the specified subscription.
 
 updateAffinityGroup ($name, $label, $description= '')
 The Update Affinity Group operation updates the label and/or the description for an affinity group for the specified subscription.
 
 deleteAffinityGroup ($name)
 The Delete Affinity Group operation deletes an affinity group in the specified subscription.
 
 getAffinityGroupProperties ($affinityGroupName)
 The Get Affinity Group Properties operation returns the system properties associated with the specified affinity group.
 
 listLocations ()
 The List Locations operation lists all of the data center locations that are valid for your subscription.
 
 listOperatingSystems ()
 The List Operating Systems operation lists the versions of the guest operating system that are currently available in Windows Azure.
 
 listOperatingSystemFamilies ()
 The List OS Families operation lists the guest operating system families available in Windows Azure, and also lists the operating system versions available for each family.
 
 _cleanConfiguration ($configuration)
 Clean configuration.
 

Static Public Member Functions

static urlencode ($value)
 URL encode function.
 
static createQueryStringFromArray ($queryString)
 Builds a query string from an array of elements.
 

Public Attributes

const URL_MANAGEMENT = "https://management.core.windows.net"
 Management service URL.
 
const OP_OPERATIONS = "operations"
 Operations.
 
const OP_STORAGE_ACCOUNTS = "services/storageservices"
 
const OP_HOSTED_SERVICES = "services/hostedservices"
 
const OP_AFFINITYGROUPS = "affinitygroups"
 
const OP_LOCATIONS = "locations"
 
const OP_OPERATINGSYSTEMS = "operatingsystems"
 
const OP_OPERATINGSYSTEMFAMILIES = "operatingsystemfamilies"
 

Protected Member Functions

 _performRequest ($path= '/', $queryString= '', $httpVerb=Zend_Http_Client::GET, $headers=array(), $rawData=null)
 Perform request using Zend_Http_Client channel.
 
 _parseResponse (Zend_Http_Response $response=null)
 Parse result from Zend_Http_Response.
 
 _getErrorMessage (Zend_Http_Response $response, $alternativeError= 'Unknown error.')
 Get error message from Zend_Http_Response.
 
 _getDeployment ($operationUrl)
 The Get Deployment operation returns configuration information, status, and system properties for the specified deployment.
 
 _deleteDeployment ($operationUrl)
 The Delete Deployment operation deletes the specified deployment.
 
 _updateDeploymentStatus ($operationUrl, $status= 'running')
 The Update Deployment Status operation initiates a change in deployment status.
 
 _convertXmlElementToDeploymentInstance ($xmlService)
 Converts an XmlElement into a Zend_Service_WindowsAzure_Management_DeploymentInstance.
 
 _updateInstanceCountInConfiguration ($roleName, $instanceCount, $configuration)
 Updates instance count in configuration XML.
 
 _configureDeployment ($operationUrl, $configuration)
 The Change Deployment Configuration request may be specified as follows.
 
 _upgradeDeployment ($operationUrl, $label, $packageUrl, $configuration, $mode, $roleToUpgrade)
 The Upgrade Deployment operation initiates an upgrade.
 
 _walkUpgradeDomain ($operationUrl, $upgradeDomain=0)
 The Walk Upgrade Domain operation specifies the next upgrade domain to be walked during an in-place upgrade.
 
 _rebootOrReimageRoleInstance ($operationUrl, $operation= 'reboot')
 Reboots or reimages a role instance.
 

Protected Attributes

 $_apiVersion = '2011-02-25'
 
 $_subscriptionId = ''
 
 $_certificatePath = ''
 
 $_certificatePassphrase = ''
 
 $_httpClientChannel = null
 
 $_retryPolicy = null
 
 $_lastRequestId = null
 

Constructor & Destructor Documentation

__construct (   $subscriptionId,
  $certificatePath,
  $certificatePassphrase,
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract  $retryPolicy = null 
)

Creates a new Zend_Service_WindowsAzure_Management instance.

Parameters
string$subscriptionIdSubscription ID
string$certificatePathManagement certificate path (.PEM)
string$certificatePassphraseManagement certificate passphrase
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract$retryPolicyRetry policy to use when making requests

Member Function Documentation

_cleanConfiguration (   $configuration)

Clean configuration.

Parameters
string$configurationConfiguration to clean.
Returns
string
_configureDeployment (   $operationUrl,
  $configuration 
)
protected

The Change Deployment Configuration request may be specified as follows.

Note that you can change a deployment's configuration either by specifying the deployment environment (staging or production), or by specifying the deployment's unique name.

Parameters
string$operationUrlThe operation url
string$configurationXML configuration represented as a string
Exceptions
Zend_Service_WindowsAzure_Management_Exception
_convertXmlElementToDeploymentInstance (   $xmlService)
protected
_deleteDeployment (   $operationUrl)
protected

The Delete Deployment operation deletes the specified deployment.

Parameters
string$operationUrlThe operation url
Exceptions
Zend_Service_WindowsAzure_Management_Exception
_getDeployment (   $operationUrl)
protected

The Get Deployment operation returns configuration information, status, and system properties for the specified deployment.

Parameters
string$operationUrlThe operation url
Returns
Zend_Service_WindowsAzure_Management_DeploymentInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
_getErrorMessage ( Zend_Http_Response  $response,
  $alternativeError = 'Unknown error.' 
)
protected

Get error message from Zend_Http_Response.

Parameters
Zend_Http_Response$responseRepsonse
string$alternativeErrorAlternative error message
Returns
string
_parseResponse ( Zend_Http_Response  $response = null)
protected

Parse result from Zend_Http_Response.

Parameters
Zend_Http_Response$responseResponse from HTTP call
Returns
object
Exceptions
Zend_Service_WindowsAzure_Exception
_performRequest (   $path = '/',
  $queryString = '',
  $httpVerb = Zend_Http_Client::GET,
  $headers = array(),
  $rawData = null 
)
protected

Perform request using Zend_Http_Client channel.

Parameters
string$pathPath
string$queryStringQuery string
string$httpVerbHTTP verb the request will use
array$headersx-ms headers to add
mixed$rawDataOptional RAW HTTP data to be sent over the wire
Returns
Zend_Http_Response
_rebootOrReimageRoleInstance (   $operationUrl,
  $operation = 'reboot' 
)
protected

Reboots or reimages a role instance.

Parameters
string$operationUrlThe operation url
string$operationThe operation (reboot|reimage)
Exceptions
Zend_Service_WindowsAzure_Management_Exception
_updateDeploymentStatus (   $operationUrl,
  $status = 'running' 
)
protected

The Update Deployment Status operation initiates a change in deployment status.

Parameters
string$operationUrlThe operation url
string$statusThe deployment status (running|suspended)
Exceptions
Zend_Service_WindowsAzure_Management_Exception
_updateInstanceCountInConfiguration (   $roleName,
  $instanceCount,
  $configuration 
)
protected

Updates instance count in configuration XML.

Parameters
string | array$roleNameThe role name
string | array$instanceCountThe instance count
string$configurationXML configuration represented as a string
Exceptions
Zend_Service_WindowsAzure_Management_Exception
_upgradeDeployment (   $operationUrl,
  $label,
  $packageUrl,
  $configuration,
  $mode,
  $roleToUpgrade 
)
protected

The Upgrade Deployment operation initiates an upgrade.

Parameters
string$operationUrlThe operation url
string$labelA URL that refers to the location of the service package in the Blob service. The service package must be located in a storage account beneath the same subscription.
string$packageUrlThe service configuration file for the deployment.
string$configurationA label for this deployment, up to 100 characters in length.
string$modeThe type of upgrade to initiate. Possible values are Auto or Manual.
string$roleToUpgradeThe name of the specific role to upgrade.
Exceptions
Zend_Service_WindowsAzure_Management_Exception
_walkUpgradeDomain (   $operationUrl,
  $upgradeDomain = 0 
)
protected

The Walk Upgrade Domain operation specifies the next upgrade domain to be walked during an in-place upgrade.

Parameters
string$operationUrlThe operation url
int$upgradeDomainAn integer value that identifies the upgrade domain to walk. Upgrade domains are identified with a zero-based index: the first upgrade domain has an ID of 0, the second has an ID of 1, and so on.
Exceptions
Zend_Service_WindowsAzure_Management_Exception
addCertificate (   $serviceName,
  $certificateData,
  $certificatePassword,
  $certificateFormat = 'pfx' 
)

The Add Certificate operation adds a certificate to the subscription.

Parameters
string$serviceNameThe service name
string$certificateDataCertificate data
string$certificatePasswordThe certificate password
string$certificateFormatThe certificate format. Currently, only 'pfx' is supported.
Exceptions
Zend_Service_WindowsAzure_Management_Exception
configureDeploymentByDeploymentId (   $serviceName,
  $deploymentId,
  $configuration 
)

The Change Deployment Configuration request may be specified as follows.

Note that you can change a deployment's configuration either by specifying the deployment environment (staging or production), or by specifying the deployment's unique name.

Parameters
string$serviceNameThe service name
string$deploymentIdThe deployment ID as listed on the Windows Azure management portal
string$configurationXML configuration represented as a string
Exceptions
Zend_Service_WindowsAzure_Management_Exception
configureDeploymentBySlot (   $serviceName,
  $deploymentSlot,
  $configuration 
)

The Change Deployment Configuration request may be specified as follows.

Note that you can change a deployment's configuration either by specifying the deployment environment (staging or production), or by specifying the deployment's unique name.

Parameters
string$serviceNameThe service name
string$deploymentSlotThe deployment slot (production or staging)
string$configurationXML configuration represented as a string
Exceptions
Zend_Service_WindowsAzure_Management_Exception
createAffinityGroup (   $name,
  $label,
  $description = '',
  $location = '' 
)

The Create Affinity Group operation creates a new affinity group for the specified subscription.

Parameters
string$nameA name for the affinity group that is unique to the subscription.
string$labelA label for the affinity group. The label may be up to 100 characters in length.
string$descriptionA description for the affinity group. The description may be up to 1024 characters in length.
string$locationThe location where the affinity group will be created. To list available locations, use the List Locations operation.
createBlobClientForService (   $serviceName,
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract  $retryPolicy = null 
)

Creates a new Zend_Service_WindowsAzure_Storage_Blob instance for the current account.

Parameters
string$serviceNamethe service name to create a storage client for.
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract$retryPolicyRetry policy to use when making requests
Returns
Zend_Service_WindowsAzure_Storage_Blob
createDeployment (   $serviceName,
  $deploymentSlot,
  $name,
  $label,
  $packageUrl,
  $configuration,
  $startDeployment = false,
  $treatWarningsAsErrors = false 
)

The Create Deployment operation uploads a new service package and creates a new deployment on staging or production.

Parameters
string$serviceNameThe service name
string$deploymentSlotThe deployment slot (production or staging)
string$nameThe name for the deployment. The deployment ID as listed on the Windows Azure management portal must be unique among other deployments for the hosted service.
string$labelA URL that refers to the location of the service package in the Blob service. The service package must be located in a storage account beneath the same subscription.
string$packageUrlThe service configuration file for the deployment.
string$configurationA label for this deployment, up to 100 characters in length.
boolean$startDeploymentIndicates whether to start the deployment immediately after it is created.
boolean$treatWarningsAsErrorsIndicates whether to treat package validation warnings as errors.
Exceptions
Zend_Service_WindowsAzure_Management_Exception
createHostedService (   $serviceName,
  $label,
  $description = '',
  $location = null,
  $affinityGroup = null 
)

The Create Hosted Service operation creates a new hosted service in Windows Azure.

Parameters
string$serviceNameA name for the hosted service that is unique to the subscription.
string$labelA label for the hosted service. The label may be up to 100 characters in length.
string$descriptionA description for the hosted service. The description may be up to 1024 characters in length.
string$locationRequired if AffinityGroup is not specified. The location where the hosted service will be created.
string$affinityGroupRequired if Location is not specified. The name of an existing affinity group associated with this subscription.
static createQueryStringFromArray (   $queryString)
static

Builds a query string from an array of elements.

Parameters
arrayArray of elements
Returns
string Assembled query string
createQueueClientForService (   $serviceName,
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract  $retryPolicy = null 
)

Creates a new Zend_Service_WindowsAzure_Storage_Queue instance for the current account.

Parameters
string$serviceNamethe service name to create a storage client for.
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract$retryPolicyRetry policy to use when making requests
Returns
Zend_Service_WindowsAzure_Storage_Queue
createTableClientForService (   $serviceName,
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract  $retryPolicy = null 
)

Creates a new Zend_Service_WindowsAzure_Storage_Table instance for the current account.

Parameters
string$serviceNamethe service name to create a storage client for.
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract$retryPolicyRetry policy to use when making requests
Returns
Zend_Service_WindowsAzure_Storage_Table
deleteAffinityGroup (   $name)

The Delete Affinity Group operation deletes an affinity group in the specified subscription.

Parameters
string$nameThe name for the affinity group that should be deleted.
deleteCertificate (   $serviceName,
  $algorithm = '',
  $thumbprint = '' 
)

The Delete Certificate operation deletes a certificate from the subscription's certificate store.

Parameters
string$serviceName,|$certificateUrlThe service name -or- the certificate URL
string$algorithmAlgorithm
string$thumbprintThumbprint
Exceptions
Zend_Service_WindowsAzure_Management_Exception
deleteDeploymentByDeploymentId (   $serviceName,
  $deploymentId 
)

The Delete Deployment operation deletes the specified deployment.

Parameters
string$serviceNameThe service name
string$deploymentIdThe deployment ID as listed on the Windows Azure management portal
Exceptions
Zend_Service_WindowsAzure_Management_Exception
deleteDeploymentBySlot (   $serviceName,
  $deploymentSlot 
)

The Delete Deployment operation deletes the specified deployment.

Parameters
string$serviceNameThe service name
string$deploymentSlotThe deployment slot (production or staging)
Exceptions
Zend_Service_WindowsAzure_Management_Exception
deleteHostedService (   $serviceName)

The Delete Hosted Service operation deletes the specified hosted service in Windows Azure.

Parameters
string$serviceNameA name for the hosted service that is unique to the subscription.
getAffinityGroupProperties (   $affinityGroupName)

The Get Affinity Group Properties operation returns the system properties associated with the specified affinity group.

Parameters
string$affinityGroupNameThe affinity group name.
Returns
Zend_Service_WindowsAzure_Management_AffinityGroupInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
getBaseUrl ( )

Get base URL for creating requests.

Returns
string
getCertificate (   $serviceName,
  $algorithm = '',
  $thumbprint = '' 
)

The Get Certificate operation returns the public data for the specified certificate.

Parameters
string$serviceName,|$certificateUrlThe service name -or- the certificate URL
string$algorithmAlgorithm
string$thumbprintThumbprint
Returns
Zend_Service_WindowsAzure_Management_CertificateInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
getDeploymentByDeploymentId (   $serviceName,
  $deploymentId 
)

The Get Deployment operation returns configuration information, status, and system properties for the specified deployment.

Parameters
string$serviceNameThe service name
string$deploymentIdThe deployment ID as listed on the Windows Azure management portal
Returns
Zend_Service_WindowsAzure_Management_DeploymentInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
getDeploymentBySlot (   $serviceName,
  $deploymentSlot 
)

The Get Deployment operation returns configuration information, status, and system properties for the specified deployment.

Parameters
string$serviceNameThe service name
string$deploymentSlotThe deployment slot (production or staging)
Returns
Zend_Service_WindowsAzure_Management_DeploymentInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
getHostedServiceProperties (   $serviceName)

The Get Hosted Service Properties operation retrieves system properties for the specified hosted service.

These properties include the service name and service type; the name of the affinity group to which the service belongs, or its location if it is not part of an affinity group; and optionally, information on the service's deployments.

Parameters
string$serviceNameThe name of your service.
Returns
Zend_Service_WindowsAzure_Management_HostedServiceInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
getHttpClientChannel ( )

Retrieve HTTP client channel.

Returns
Zend_Http_Client_Adapter_Interface
getLastRequestId ( )

Returns the last request ID.

Returns
string
getOperationStatus (   $requestId = '')

The Get Operation Status operation returns the status of the specified operation.

After calling an asynchronous operation, you can call Get Operation Status to determine whether the operation has succeed, failed, or is still in progress.

Parameters
string$requestIdThe request ID. If omitted, the last request ID will be used.
Returns
Zend_Service_WindowsAzure_Management_OperationStatusInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
getStorageAccountKeys (   $serviceName)

The Get Storage Keys operation returns the primary and secondary access keys for the specified storage account.

Parameters
string$serviceNameThe name of your service.
Returns
array An array of strings
Exceptions
Zend_Service_WindowsAzure_Management_Exception
getStorageAccountProperties (   $serviceName)

The Get Storage Account Properties operation returns the system properties for the specified storage account.

These properties include: the address, description, and label of the storage account; and the name of the affinity group to which the service belongs, or its geo-location if it is not part of an affinity group.

Parameters
string$serviceNameThe name of your service.
Returns
Zend_Service_WindowsAzure_Management_StorageServiceInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
getSubscriptionId ( )

Returns the Windows Azure subscription ID.

Returns
string
listAffinityGroups ( )

The List Affinity Groups operation lists the affinity groups associated with the specified subscription.

Returns
array Array of Zend_Service_WindowsAzure_Management_AffinityGroupInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
listCertificates (   $serviceName)

The List Certificates operation lists all certificates associated with the specified hosted service.

Parameters
string$serviceNameThe service name
Returns
array Array of Zend_Service_WindowsAzure_Management_CertificateInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
listHostedServices ( )

The List Hosted Services operation lists the hosted services available under the current subscription.

Returns
array An array of Zend_Service_WindowsAzure_Management_HostedServiceInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
listLocations ( )

The List Locations operation lists all of the data center locations that are valid for your subscription.

Returns
array Array of Zend_Service_WindowsAzure_Management_LocationInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
listOperatingSystemFamilies ( )

The List OS Families operation lists the guest operating system families available in Windows Azure, and also lists the operating system versions available for each family.

Currently Windows Azure supports two operating system families: the Windows Azure guest operating system that is substantially compatible with Windows Server 2008 SP2, and the Windows Azure guest operating system that is substantially compatible with Windows Server 2008 R2.

Returns
array Array of Zend_Service_WindowsAzure_Management_OperatingSystemFamilyInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
listOperatingSystems ( )

The List Operating Systems operation lists the versions of the guest operating system that are currently available in Windows Azure.

The 2010-10-28 version of List Operating Systems also indicates what family an operating system version belongs to. Currently Windows Azure supports two operating system families: the Windows Azure guest operating system that is substantially compatible with Windows Server 2008 SP2, and the Windows Azure guest operating system that is substantially compatible with Windows Server 2008 R2.

Returns
array Array of Zend_Service_WindowsAzure_Management_OperatingSystemInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
listStorageAccounts ( )

The List Storage Accounts operation lists the storage accounts available under the current subscription.

Returns
array An array of Zend_Service_WindowsAzure_Management_StorageServiceInstance
listSubscriptionOperations (   $startTime,
  $endTime,
  $objectIdFilter = null,
  $operationResultFilter = null,
  $continuationToken = null 
)

The List Subscription Operations operation returns a list of create, update, and delete operations that were performed on a subscription during the specified timeframe.

Documentation on the parameters can be found at http://msdn.microsoft.com/en-us/library/gg715318.aspx.

Parameters
string$startTimeThe start of the timeframe to begin listing subscription operations in UTC format. This parameter and the $endTime parameter indicate the timeframe to retrieve subscription operations. This parameter cannot indicate a start date of more than 90 days in the past.
string$endTimeThe end of the timeframe to begin listing subscription operations in UTC format. This parameter and the $startTime parameter indicate the timeframe to retrieve subscription operations.
string$objectIdFilterReturns subscription operations only for the specified object type and object ID.
string$operationResultFilterReturns subscription operations only for the specified result status, either Succeeded, Failed, or InProgress.
string$continuationTokenInternal usage.
Returns
array Array of Zend_Service_WindowsAzure_Management_SubscriptionOperationInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
rebootRoleInstanceByDeploymentId (   $serviceName,
  $deploymentId,
  $roleInstanceName 
)

The Reboot Role Instance operation requests a reboot of a role instance that is running in a deployment.

Parameters
string$serviceNameThe service name
string$deploymentIdThe deployment ID as listed on the Windows Azure management portal
string$roleInstanceNameThe role instance name
Exceptions
Zend_Service_WindowsAzure_Management_Exception
rebootRoleInstanceBySlot (   $serviceName,
  $deploymentSlot,
  $roleInstanceName 
)

The Reboot Role Instance operation requests a reboot of a role instance that is running in a deployment.

Parameters
string$serviceNameThe service name
string$deploymentSlotThe deployment slot (production or staging)
string$roleInstanceNameThe role instance name
Exceptions
Zend_Service_WindowsAzure_Management_Exception
regenerateStorageAccountKey (   $serviceName,
  $key = 'primary' 
)

The Regenerate Keys operation regenerates the primary or secondary access key for the specified storage account.

Parameters
string$serviceNameThe name of your service.
string$keyThe key to regenerate (primary or secondary)
Returns
array An array of strings
Exceptions
Zend_Service_WindowsAzure_Management_Exception
reimageRoleInstanceByDeploymentId (   $serviceName,
  $deploymentId,
  $roleInstanceName 
)

The Reimage Role Instance operation requests a reimage of a role instance that is running in a deployment.

Parameters
string$serviceNameThe service name
string$deploymentIdThe deployment ID as listed on the Windows Azure management portal
string$roleInstanceNameThe role instance name
Exceptions
Zend_Service_WindowsAzure_Management_Exception
reimageRoleInstanceBySlot (   $serviceName,
  $deploymentSlot,
  $roleInstanceName 
)

The Reimage Role Instance operation requests a reimage of a role instance that is running in a deployment.

Parameters
string$serviceNameThe service name
string$deploymentSlotThe deployment slot (production or staging)
string$roleInstanceNameThe role instance name
Exceptions
Zend_Service_WindowsAzure_Management_Exception
setHttpClientChannel (   $adapterInstance = 'Zend_Http_Client_Adapter_Socket')

Set the HTTP client channel to use.

Parameters
Zend_Http_Client_Adapter_Interface | string$adapterInstanceAdapter instance or adapter class name.
setInstanceCountByDeploymentId (   $serviceName,
  $deploymentId,
  $roleName,
  $instanceCount 
)

Updates a deployment's role instance count.

Parameters
string$serviceNameThe service name
string$deploymentSlotThe deployment slot (production or staging)
string | array$roleNameThe role name
string | array$instanceCountThe instance count
Exceptions
Zend_Service_WindowsAzure_Management_Exception
setInstanceCountBySlot (   $serviceName,
  $deploymentSlot,
  $roleName,
  $instanceCount 
)

Updates a deployment's role instance count.

Parameters
string$serviceNameThe service name
string$deploymentSlotThe deployment slot (production or staging)
string | array$roleNameThe role name
string | array$instanceCountThe instance count
Exceptions
Zend_Service_WindowsAzure_Management_Exception
swapDeployment (   $serviceName,
  $productionDeploymentName,
  $sourceDeploymentName 
)

The Swap Deployment operation initiates a virtual IP swap between the staging and production deployment environments for a service.

If the service is currently running in the staging environment, it will be swapped to the production environment. If it is running in the production environment, it will be swapped to staging.

Parameters
string$serviceNameThe service name.
string$productionDeploymentNameThe name of the production deployment.
string$sourceDeploymentNameThe name of the source deployment.
Exceptions
Zend_Service_WindowsAzure_Management_Exception
updateAffinityGroup (   $name,
  $label,
  $description = '' 
)

The Update Affinity Group operation updates the label and/or the description for an affinity group for the specified subscription.

Parameters
string$nameThe name for the affinity group that should be updated.
string$labelA label for the affinity group. The label may be up to 100 characters in length.
string$descriptionA description for the affinity group. The description may be up to 1024 characters in length.
updateDeploymentStatusByDeploymentId (   $serviceName,
  $deploymentId,
  $status = 'running' 
)

The Update Deployment Status operation initiates a change in deployment status.

Parameters
string$serviceNameThe service name
string$deploymentIdThe deployment ID as listed on the Windows Azure management portal
string$statusThe deployment status (running|suspended)
Exceptions
Zend_Service_WindowsAzure_Management_Exception
updateDeploymentStatusBySlot (   $serviceName,
  $deploymentSlot,
  $status = 'running' 
)

The Update Deployment Status operation initiates a change in deployment status.

Parameters
string$serviceNameThe service name
string$deploymentSlotThe deployment slot (production or staging)
string$statusThe deployment status (running|suspended)
Exceptions
Zend_Service_WindowsAzure_Management_Exception
updateHostedService (   $serviceName,
  $label,
  $description = '' 
)

The Update Hosted Service operation updates the label and/or the description for a hosted service in Windows Azure.

Parameters
string$serviceNameA name for the hosted service that is unique to the subscription.
string$labelA label for the hosted service. The label may be up to 100 characters in length.
string$descriptionA description for the hosted service. The description may be up to 1024 characters in length.
upgradeDeploymentByDeploymentId (   $serviceName,
  $deploymentId,
  $label,
  $packageUrl,
  $configuration,
  $mode = 'auto',
  $roleToUpgrade = null 
)

The Upgrade Deployment operation initiates an upgrade.

Parameters
string$serviceNameThe service name
string$deploymentIdThe deployment ID as listed on the Windows Azure management portal
string$labelA URL that refers to the location of the service package in the Blob service. The service package must be located in a storage account beneath the same subscription.
string$packageUrlThe service configuration file for the deployment.
string$configurationA label for this deployment, up to 100 characters in length.
string$modeThe type of upgrade to initiate. Possible values are Auto or Manual.
string$roleToUpgradeThe name of the specific role to upgrade.
Exceptions
Zend_Service_WindowsAzure_Management_Exception
upgradeDeploymentBySlot (   $serviceName,
  $deploymentSlot,
  $label,
  $packageUrl,
  $configuration,
  $mode = 'auto',
  $roleToUpgrade = null 
)

The Upgrade Deployment operation initiates an upgrade.

Parameters
string$serviceNameThe service name
string$deploymentSlotThe deployment slot (production or staging)
string$labelA URL that refers to the location of the service package in the Blob service. The service package must be located in a storage account beneath the same subscription.
string$packageUrlThe service configuration file for the deployment.
string$configurationA label for this deployment, up to 100 characters in length.
string$modeThe type of upgrade to initiate. Possible values are Auto or Manual.
string$roleToUpgradeThe name of the specific role to upgrade.
Exceptions
Zend_Service_WindowsAzure_Management_Exception
static urlencode (   $value)
static

URL encode function.

Parameters
string$valueValue to encode
Returns
string Encoded value
waitForOperation (   $requestId = '',
  $sleepInterval = 250 
)

Wait for an operation to complete.

Parameters
string$requestIdThe request ID. If omitted, the last request ID will be used.
int$sleepIntervalSleep interval in milliseconds.
Returns
Zend_Service_WindowsAzure_Management_OperationStatusInstance
Exceptions
Zend_Service_WindowsAzure_Management_Exception
walkUpgradeDomainByDeploymentId (   $serviceName,
  $deploymentId,
  $upgradeDomain = 0 
)

The Walk Upgrade Domain operation specifies the next upgrade domain to be walked during an in-place upgrade.

Parameters
string$serviceNameThe service name
string$deploymentIdThe deployment ID as listed on the Windows Azure management portal
int$upgradeDomainAn integer value that identifies the upgrade domain to walk. Upgrade domains are identified with a zero-based index: the first upgrade domain has an ID of 0, the second has an ID of 1, and so on.
Exceptions
Zend_Service_WindowsAzure_Management_Exception
walkUpgradeDomainBySlot (   $serviceName,
  $deploymentSlot,
  $upgradeDomain = 0 
)

The Walk Upgrade Domain operation specifies the next upgrade domain to be walked during an in-place upgrade.

Parameters
string$serviceNameThe service name
string$deploymentSlotThe deployment slot (production or staging)
int$upgradeDomainAn integer value that identifies the upgrade domain to walk. Upgrade domains are identified with a zero-based index: the first upgrade domain has an ID of 0, the second has an ID of 1, and so on.
Exceptions
Zend_Service_WindowsAzure_Management_Exception

Member Data Documentation

$_apiVersion = '2011-02-25'
protected
$_certificatePassphrase = ''
protected
$_certificatePath = ''
protected
$_httpClientChannel = null
protected
$_lastRequestId = null
protected
$_retryPolicy = null
protected
$_subscriptionId = ''
protected
const OP_AFFINITYGROUPS = "affinitygroups"
const OP_HOSTED_SERVICES = "services/hostedservices"
const OP_LOCATIONS = "locations"
const OP_OPERATINGSYSTEMFAMILIES = "operatingsystemfamilies"
const OP_OPERATINGSYSTEMS = "operatingsystems"
const OP_OPERATIONS = "operations"

Operations.

const OP_STORAGE_ACCOUNTS = "services/storageservices"
const URL_MANAGEMENT = "https://management.core.windows.net"

Management service URL.