Service/WindowsAzure/Management/Client.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Service_WindowsAzure  
Subpackage
Management  
Version
$Id$  

\Zend_Service_WindowsAzure_Management_Client

Package: Zend\Service\WindowsAzure\Management

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  URL_MANAGEMENT = "https://management.core.windows.net"

Management service URL

Constant  OP_OPERATIONS = "operations"

Operations

Constant  OP_STORAGE_ACCOUNTS = "services/storageservices"
Constant  OP_HOSTED_SERVICES = "services/hostedservices"
Constant  OP_AFFINITYGROUPS = "affinitygroups"
Constant  OP_LOCATIONS = "locations"
Constant  OP_OPERATINGSYSTEMS = "operatingsystems"
Constant  OP_OPERATINGSYSTEMFAMILIES = "operatingsystemfamilies"

Properties

Propertyprotectedstring $_apiVersion = '2011-02-25'

Current API version

Default value'2011-02-25'Details
Type
string
Propertyprotectedstring $_certificatePassphrase = ''

Management certificate passphrase

Default value''Details
Type
string
Propertyprotectedstring $_certificatePath = ''

Management certificate path (.PEM)

Default value''Details
Type
string
Propertyprotected\Zend_Http_Client $_httpClientChannel = null

Zend_Http_Client channel used for communication with REST services

Default valuenullDetails
Type
\Zend_Http_Client
Propertyprotectedstring $_lastRequestId = null

Returns the last request ID

Default valuenullDetails
Type
string
Propertyprotected\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $_retryPolicy = null

Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract instance

Propertyprotectedstring $_subscriptionId = ''

Subscription ID

Default value''Details
Type
string

Methods

methodpublic__construct(string $subscriptionId, string $certificatePath, string $certificatePassphrase, \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null) : void

Creates a new Zend_Service_WindowsAzure_Management instance

Parameters
Name Type Description
$subscriptionId string

Subscription ID

$certificatePath string

Management certificate path (.PEM)

$certificatePassphrase string

Management certificate passphrase

$retryPolicy \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

methodpublic_cleanConfiguration(string $configuration) : string

Clean configuration

Parameters
Name Type Description
$configuration string

Configuration to clean.

Returns
Type Description
string
methodprotected_configureDeployment(string $operationUrl, string $configuration) : void

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
Name Type Description
$operationUrl string

The operation url

$configuration string

XML configuration represented as a string

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodprotected_convertXmlElementToDeploymentInstance(object $xmlService) : \Zend_Service_WindowsAzure_Management_DeploymentInstance

Converts an XmlElement into a Zend_Service_WindowsAzure_Management_DeploymentInstance

Parameters
Name Type Description
$xmlService object

The XML Element

Returns
Type Description
\Zend_Service_WindowsAzure_Management_DeploymentInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodprotected_deleteDeployment(string $operationUrl) : void

The Delete Deployment operation deletes the specified deployment.

Parameters
Name Type Description
$operationUrl string

The operation url

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodprotected_getDeployment(string $operationUrl) : \Zend_Service_WindowsAzure_Management_DeploymentInstance

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

Parameters
Name Type Description
$operationUrl string

The operation url

Returns
Type Description
\Zend_Service_WindowsAzure_Management_DeploymentInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodprotected_getErrorMessage(\Zend_Http_Response $response, string $alternativeError = 'Unknown error.') : string

Get error message from Zend_Http_Response

Parameters
Name Type Description
$response \Zend_Http_Response

Repsonse

$alternativeError string

Alternative error message

Returns
Type Description
string
methodprotected_parseResponse(\Zend_Http_Response $response = null) : object

Parse result from Zend_Http_Response

Parameters
Name Type Description
$response \Zend_Http_Response

Response from HTTP call

Returns
Type Description
object
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodprotected_performRequest(string $path = '/', string $queryString = '', string $httpVerb = \Zend_Http_Client::GET, array $headers = array(), mixed $rawData = null) : \Zend_Http_Response

Perform request using Zend_Http_Client channel

Parameters
Name Type Description
$path string

Path

$queryString string

Query string

$httpVerb string

HTTP verb the request will use

$headers array

x-ms headers to add

$rawData mixed

Optional RAW HTTP data to be sent over the wire

Returns
Type Description
\Zend_Http_Response
methodprotected_rebootOrReimageRoleInstance(string $operationUrl, string $operation = 'reboot') : void

Reboots or reimages a role instance.

Parameters
Name Type Description
$operationUrl string

The operation url

$operation string

The operation (reboot|reimage)

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodprotected_updateDeploymentStatus(string $operationUrl, string $status = 'running') : void

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

Parameters
Name Type Description
$operationUrl string

The operation url

$status string

The deployment status (running|suspended)

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodprotected_updateInstanceCountInConfiguration(string | array $roleName, string | array $instanceCount, string $configuration) : void

Updates instance count in configuration XML.

Parameters
Name Type Description
$roleName string | array

The role name

$instanceCount string | array

The instance count

$configuration string

XML configuration represented as a string

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodprotected_upgradeDeployment(string $operationUrl, string $label, string $packageUrl, string $configuration, string $mode, string $roleToUpgrade) : void

The Upgrade Deployment operation initiates an upgrade.

Parameters
Name Type Description
$operationUrl string

The operation url

$label string

A 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.

$packageUrl string

The service configuration file for the deployment.

$configuration string

A label for this deployment, up to 100 characters in length.

$mode string

The type of upgrade to initiate. Possible values are Auto or Manual.

$roleToUpgrade string

The name of the specific role to upgrade.

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodprotected_walkUpgradeDomain(string $operationUrl, int $upgradeDomain = 0) : void

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

Parameters
Name Type Description
$operationUrl string

The operation url

$upgradeDomain int

An 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.

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicaddCertificate(string $serviceName, string $certificateData, string $certificatePassword, string $certificateFormat = 'pfx') : void

The Add Certificate operation adds a certificate to the subscription.

Parameters
Name Type Description
$serviceName string

The service name

$certificateData string

Certificate data

$certificatePassword string

The certificate password

$certificateFormat string

The certificate format. Currently, only 'pfx' is supported.

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicconfigureDeploymentByDeploymentId(string $serviceName, string $deploymentId, string $configuration) : void

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
Name Type Description
$serviceName string

The service name

$deploymentId string

The deployment ID as listed on the Windows Azure management portal

$configuration string

XML configuration represented as a string

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicconfigureDeploymentBySlot(string $serviceName, string $deploymentSlot, string $configuration) : void

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
Name Type Description
$serviceName string

The service name

$deploymentSlot string

The deployment slot (production or staging)

$configuration string

XML configuration represented as a string

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpubliccreateAffinityGroup(string $name, string $label, string $description = '', string $location = '') : void

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

Parameters
Name Type Description
$name string

A name for the affinity group that is unique to the subscription.

$label string

A label for the affinity group. The label may be up to 100 characters in length.

$description string

A description for the affinity group. The description may be up to 1024 characters in length.

$location string

The location where the affinity group will be created. To list available locations, use the List Locations operation.

methodpubliccreateBlobClientForService(string $serviceName, \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null) : \Zend_Service_WindowsAzure_Storage_Blob

Creates a new Zend_Service_WindowsAzure_Storage_Blob instance for the current account

Parameters
Name Type Description
$serviceName string

the service name to create a storage client for.

$retryPolicy \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

Returns
Type Description
\Zend_Service_WindowsAzure_Storage_Blob
methodpubliccreateDeployment(string $serviceName, string $deploymentSlot, string $name, string $label, string $packageUrl, string $configuration, boolean $startDeployment = false, boolean $treatWarningsAsErrors = false) : void

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

Parameters
Name Type Description
$serviceName string

The service name

$deploymentSlot string

The deployment slot (production or staging)

$name string

The 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.

$label string

A 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.

$packageUrl string

The service configuration file for the deployment.

$configuration string

A label for this deployment, up to 100 characters in length.

$startDeployment boolean

Indicates whether to start the deployment immediately after it is created.

$treatWarningsAsErrors boolean

Indicates whether to treat package validation warnings as errors.

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpubliccreateHostedService(string $serviceName, string $label, string $description = '', string $location = null, string $affinityGroup = null) : void

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

Parameters
Name Type Description
$serviceName string

A name for the hosted service that is unique to the subscription.

$label string

A label for the hosted service. The label may be up to 100 characters in length.

$description string

A description for the hosted service. The description may be up to 1024 characters in length.

$location string

Required if AffinityGroup is not specified. The location where the hosted service will be created.

$affinityGroup string

Required if Location is not specified. The name of an existing affinity group associated with this subscription.

methodpubliccreateQueryStringFromArray(array $queryString) : string
static

Builds a query string from an array of elements

Parameters
Name Type Description
$queryString array

Array of elements

Returns
Type Description
string Assembled query string
methodpubliccreateQueueClientForService(string $serviceName, \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null) : \Zend_Service_WindowsAzure_Storage_Queue

Creates a new Zend_Service_WindowsAzure_Storage_Queue instance for the current account

Parameters
Name Type Description
$serviceName string

the service name to create a storage client for.

$retryPolicy \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

Returns
Type Description
\Zend_Service_WindowsAzure_Storage_Queue
methodpubliccreateTableClientForService(string $serviceName, \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null) : \Zend_Service_WindowsAzure_Storage_Table

Creates a new Zend_Service_WindowsAzure_Storage_Table instance for the current account

Parameters
Name Type Description
$serviceName string

the service name to create a storage client for.

$retryPolicy \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

Returns
Type Description
\Zend_Service_WindowsAzure_Storage_Table
methodpublicdeleteAffinityGroup(string $name) : void

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

Parameters
Name Type Description
$name string

The name for the affinity group that should be deleted.

methodpublicdeleteCertificate( $serviceName, string $algorithm = '', string $thumbprint = '') : void

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

Parameters
Name Type Description
$serviceName
$algorithm string

Algorithm

$thumbprint string

Thumbprint

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicdeleteDeploymentByDeploymentId(string $serviceName, string $deploymentId) : void

The Delete Deployment operation deletes the specified deployment.

Parameters
Name Type Description
$serviceName string

The service name

$deploymentId string

The deployment ID as listed on the Windows Azure management portal

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicdeleteDeploymentBySlot(string $serviceName, string $deploymentSlot) : void

The Delete Deployment operation deletes the specified deployment.

Parameters
Name Type Description
$serviceName string

The service name

$deploymentSlot string

The deployment slot (production or staging)

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicdeleteHostedService(string $serviceName) : void

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

Parameters
Name Type Description
$serviceName string

A name for the hosted service that is unique to the subscription.

methodpublicgetAffinityGroupProperties(string $affinityGroupName) : \Zend_Service_WindowsAzure_Management_AffinityGroupInstance

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

Parameters
Name Type Description
$affinityGroupName string

The affinity group name.

Returns
Type Description
\Zend_Service_WindowsAzure_Management_AffinityGroupInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicgetBaseUrl() : string

Get base URL for creating requests

Returns
Type Description
string
methodpublicgetCertificate( $serviceName, string $algorithm = '', string $thumbprint = '') : \Zend_Service_WindowsAzure_Management_CertificateInstance

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

Parameters
Name Type Description
$serviceName
$algorithm string

Algorithm

$thumbprint string

Thumbprint

Returns
Type Description
\Zend_Service_WindowsAzure_Management_CertificateInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicgetDeploymentByDeploymentId(string $serviceName, string $deploymentId) : \Zend_Service_WindowsAzure_Management_DeploymentInstance

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

Parameters
Name Type Description
$serviceName string

The service name

$deploymentId string

The deployment ID as listed on the Windows Azure management portal

Returns
Type Description
\Zend_Service_WindowsAzure_Management_DeploymentInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicgetDeploymentBySlot(string $serviceName, string $deploymentSlot) : \Zend_Service_WindowsAzure_Management_DeploymentInstance

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

Parameters
Name Type Description
$serviceName string

The service name

$deploymentSlot string

The deployment slot (production or staging)

Returns
Type Description
\Zend_Service_WindowsAzure_Management_DeploymentInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicgetHostedServiceProperties(string $serviceName) : \Zend_Service_WindowsAzure_Management_HostedServiceInstance

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
Name Type Description
$serviceName string

The name of your service.

Returns
Type Description
\Zend_Service_WindowsAzure_Management_HostedServiceInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicgetHttpClientChannel() : \Zend_Http_Client_Adapter_Interface

Retrieve HTTP client channel

Returns
Type Description
\Zend_Http_Client_Adapter_Interface
methodpublicgetLastRequestId() : string

Returns the last request ID.

Returns
Type Description
string
methodpublicgetOperationStatus(string $requestId = '') : \Zend_Service_WindowsAzure_Management_OperationStatusInstance

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
Name Type Description
$requestId string

The request ID. If omitted, the last request ID will be used.

Returns
Type Description
\Zend_Service_WindowsAzure_Management_OperationStatusInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicgetStorageAccountKeys(string $serviceName) : array

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

Parameters
Name Type Description
$serviceName string

The name of your service.

Returns
Type Description
array An array of strings
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicgetStorageAccountProperties(string $serviceName) : \Zend_Service_WindowsAzure_Management_StorageServiceInstance

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
Name Type Description
$serviceName string

The name of your service.

Returns
Type Description
\Zend_Service_WindowsAzure_Management_StorageServiceInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicgetSubscriptionId() : string

Returns the Windows Azure subscription ID

Returns
Type Description
string
methodpubliclistAffinityGroups() : array

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

Returns
Type Description
array Array of Zend_Service_WindowsAzure_Management_AffinityGroupInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpubliclistCertificates(string $serviceName) : array

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

Parameters
Name Type Description
$serviceName string

The service name

Returns
Type Description
array Array of Zend_Service_WindowsAzure_Management_CertificateInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpubliclistHostedServices() : array

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

Returns
Type Description
array An array of Zend_Service_WindowsAzure_Management_HostedServiceInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpubliclistLocations() : array

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

Returns
Type Description
array Array of Zend_Service_WindowsAzure_Management_LocationInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpubliclistOperatingSystemFamilies() : array

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
Type Description
array Array of Zend_Service_WindowsAzure_Management_OperatingSystemFamilyInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpubliclistOperatingSystems() : array

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
Type Description
array Array of Zend_Service_WindowsAzure_Management_OperatingSystemInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpubliclistStorageAccounts() : array

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

Returns
Type Description
array An array of Zend_Service_WindowsAzure_Management_StorageServiceInstance
methodpubliclistSubscriptionOperations(string $startTime, string $endTime, string $objectIdFilter = null, string $operationResultFilter = null, string $continuationToken = null) : array

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
Name Type Description
$startTime string

The 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.

$endTime string

The 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.

$objectIdFilter string

Returns subscription operations only for the specified object type and object ID.

$operationResultFilter string

Returns subscription operations only for the specified result status, either Succeeded, Failed, or InProgress.

$continuationToken string

Internal usage.

Returns
Type Description
array Array of Zend_Service_WindowsAzure_Management_SubscriptionOperationInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicrebootRoleInstanceByDeploymentId(string $serviceName, string $deploymentId, string $roleInstanceName) : void

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

Parameters
Name Type Description
$serviceName string

The service name

$deploymentId string

The deployment ID as listed on the Windows Azure management portal

$roleInstanceName string

The role instance name

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicrebootRoleInstanceBySlot(string $serviceName, string $deploymentSlot, string $roleInstanceName) : void

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

Parameters
Name Type Description
$serviceName string

The service name

$deploymentSlot string

The deployment slot (production or staging)

$roleInstanceName string

The role instance name

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicregenerateStorageAccountKey(string $serviceName, string $key = 'primary') : array

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

Parameters
Name Type Description
$serviceName string

The name of your service.

$key string

The key to regenerate (primary or secondary)

Returns
Type Description
array An array of strings
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicreimageRoleInstanceByDeploymentId(string $serviceName, string $deploymentId, string $roleInstanceName) : void

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

Parameters
Name Type Description
$serviceName string

The service name

$deploymentId string

The deployment ID as listed on the Windows Azure management portal

$roleInstanceName string

The role instance name

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicreimageRoleInstanceBySlot(string $serviceName, string $deploymentSlot, string $roleInstanceName) : void

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

Parameters
Name Type Description
$serviceName string

The service name

$deploymentSlot string

The deployment slot (production or staging)

$roleInstanceName string

The role instance name

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicsetHttpClientChannel(\Zend_Http_Client_Adapter_Interface | string $adapterInstance = 'Zend_Http_Client_Adapter_Socket') : void

Set the HTTP client channel to use

Parameters
Name Type Description
$adapterInstance \Zend_Http_Client_Adapter_Interface | string

Adapter instance or adapter class name.

methodpublicsetInstanceCountByDeploymentId(string $serviceName,  $deploymentId, string | array $roleName, string | array $instanceCount) : void

Updates a deployment's role instance count.

Parameters
Name Type Description
$serviceName string

The service name

$deploymentId
$roleName string | array

The role name

$instanceCount string | array

The instance count

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicsetInstanceCountBySlot(string $serviceName, string $deploymentSlot, string | array $roleName, string | array $instanceCount) : void

Updates a deployment's role instance count.

Parameters
Name Type Description
$serviceName string

The service name

$deploymentSlot string

The deployment slot (production or staging)

$roleName string | array

The role name

$instanceCount string | array

The instance count

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicswapDeployment(string $serviceName, string $productionDeploymentName, string $sourceDeploymentName) : void

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
Name Type Description
$serviceName string

The service name.

$productionDeploymentName string

The name of the production deployment.

$sourceDeploymentName string

The name of the source deployment.

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicupdateAffinityGroup(string $name, string $label, string $description = '') : void

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

Parameters
Name Type Description
$name string

The name for the affinity group that should be updated.

$label string

A label for the affinity group. The label may be up to 100 characters in length.

$description string

A description for the affinity group. The description may be up to 1024 characters in length.

methodpublicupdateDeploymentStatusByDeploymentId(string $serviceName, string $deploymentId, string $status = 'running') : void

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

Parameters
Name Type Description
$serviceName string

The service name

$deploymentId string

The deployment ID as listed on the Windows Azure management portal

$status string

The deployment status (running|suspended)

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicupdateDeploymentStatusBySlot(string $serviceName, string $deploymentSlot, string $status = 'running') : void

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

Parameters
Name Type Description
$serviceName string

The service name

$deploymentSlot string

The deployment slot (production or staging)

$status string

The deployment status (running|suspended)

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicupdateHostedService(string $serviceName, string $label, string $description = '') : void

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

Parameters
Name Type Description
$serviceName string

A name for the hosted service that is unique to the subscription.

$label string

A label for the hosted service. The label may be up to 100 characters in length.

$description string

A description for the hosted service. The description may be up to 1024 characters in length.

methodpublicupgradeDeploymentByDeploymentId(string $serviceName, string $deploymentId, string $label, string $packageUrl, string $configuration, string $mode = 'auto', string $roleToUpgrade = null) : void

The Upgrade Deployment operation initiates an upgrade.

Parameters
Name Type Description
$serviceName string

The service name

$deploymentId string

The deployment ID as listed on the Windows Azure management portal

$label string

A 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.

$packageUrl string

The service configuration file for the deployment.

$configuration string

A label for this deployment, up to 100 characters in length.

$mode string

The type of upgrade to initiate. Possible values are Auto or Manual.

$roleToUpgrade string

The name of the specific role to upgrade.

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicupgradeDeploymentBySlot(string $serviceName, string $deploymentSlot, string $label, string $packageUrl, string $configuration, string $mode = 'auto', string $roleToUpgrade = null) : void

The Upgrade Deployment operation initiates an upgrade.

Parameters
Name Type Description
$serviceName string

The service name

$deploymentSlot string

The deployment slot (production or staging)

$label string

A 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.

$packageUrl string

The service configuration file for the deployment.

$configuration string

A label for this deployment, up to 100 characters in length.

$mode string

The type of upgrade to initiate. Possible values are Auto or Manual.

$roleToUpgrade string

The name of the specific role to upgrade.

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicurlencode(string $value) : string
static

URL encode function

Parameters
Name Type Description
$value string

Value to encode

Returns
Type Description
string Encoded value
methodpublicwaitForOperation(string $requestId = '', int $sleepInterval = 250) : \Zend_Service_WindowsAzure_Management_OperationStatusInstance

Wait for an operation to complete

Parameters
Name Type Description
$requestId string

The request ID. If omitted, the last request ID will be used.

$sleepInterval int

Sleep interval in milliseconds.

Returns
Type Description
\Zend_Service_WindowsAzure_Management_OperationStatusInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicwalkUpgradeDomainByDeploymentId(string $serviceName, string $deploymentId, int $upgradeDomain = 0) : void

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

Parameters
Name Type Description
$serviceName string

The service name

$deploymentId string

The deployment ID as listed on the Windows Azure management portal

$upgradeDomain int

An 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.

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
methodpublicwalkUpgradeDomainBySlot(string $serviceName, string $deploymentSlot, int $upgradeDomain = 0) : void

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

Parameters
Name Type Description
$serviceName string

The service name

$deploymentSlot string

The deployment slot (production or staging)

$upgradeDomain int

An 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.

Throws
Exception Description
\Zend_Service_WindowsAzure_Management_Exception
Documentation was generated by phpDocumentor 2.0.0a8.