Service/WindowsAzure/Management/Client.php

Show: PublicProtectedPrivateinherited
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 license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

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

Properties

>VPropertyprotectedstring $_apiVersion = '2011-02-25'
Current API version
Default value'2011-02-25'Details
Type
string
>VPropertyprotectedstring $_certificatePassphrase = ''
Management certificate passphrase
Default value''Details
Type
string
>VPropertyprotectedstring $_certificatePath = ''
Management certificate path (.PEM)
Default value''Details
Type
string
>VPropertyprotected\Zend_Http_Client $_httpClientChannel = null
Zend_Http_Client channel used for communication with REST services
Default valuenullDetails
Type
\Zend_Http_Client
>VPropertyprotectedstring $_lastRequestId = null
Returns the last request ID
Default valuenullDetails
Type
string
>VPropertyprotected\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $_retryPolicy = null
Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract instance
>VPropertyprotectedstring $_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
NameTypeDescription
$subscriptionIdstring

Subscription ID

$certificatePathstring

Management certificate path (.PEM)

$certificatePassphrasestring

Management certificate passphrase

$retryPolicy\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

methodpublic_cleanConfiguration(string $configuration) : string

Clean configuration

Parameters
NameTypeDescription
$configurationstring

Configuration to clean.

Returns
TypeDescription
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
NameTypeDescription
$operationUrlstring

The operation url

$configurationstring

XML configuration represented as a string

Throws
ExceptionDescription
\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
NameTypeDescription
$xmlServiceobject

The XML Element

Returns
TypeDescription
\Zend_Service_WindowsAzure_Management_DeploymentInstance
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Management_Exception
methodprotected_deleteDeployment(string $operationUrl) : void

The Delete Deployment operation deletes the specified deployment.

Parameters
NameTypeDescription
$operationUrlstring

The operation url

Throws
ExceptionDescription
\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
NameTypeDescription
$operationUrlstring

The operation url

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

Get error message from Zend_Http_Response

Parameters
NameTypeDescription
$response\Zend_Http_Response

Repsonse

$alternativeErrorstring

Alternative error message

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

Parse result from Zend_Http_Response

Parameters
NameTypeDescription
$response\Zend_Http_Response

Response from HTTP call

Returns
TypeDescription
object
Throws
ExceptionDescription
\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
NameTypeDescription
$pathstring

Path

$queryStringstring

Query string

$httpVerbstring

HTTP verb the request will use

$headersarray

x-ms headers to add

$rawDatamixed

Optional RAW HTTP data to be sent over the wire

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

Reboots or reimages a role instance.

Parameters
NameTypeDescription
$operationUrlstring

The operation url

$operationstring

The operation (reboot|reimage)

Throws
ExceptionDescription
\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
NameTypeDescription
$operationUrlstring

The operation url

$statusstring

The deployment status (running|suspended)

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

Updates instance count in configuration XML.

Parameters
NameTypeDescription
$roleNamestring | array

The role name

$instanceCountstring | array

The instance count

$configurationstring

XML configuration represented as a string

Throws
ExceptionDescription
\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
NameTypeDescription
$operationUrlstring

The operation url

$labelstring

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.

$packageUrlstring

The service configuration file for the deployment.

$configurationstring

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

$modestring

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

$roleToUpgradestring

The name of the specific role to upgrade.

Throws
ExceptionDescription
\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
NameTypeDescription
$operationUrlstring

The operation url

$upgradeDomainint

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
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$certificateDatastring

Certificate data

$certificatePasswordstring

The certificate password

$certificateFormatstring

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

Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentIdstring

The deployment ID as listed on the Windows Azure management portal

$configurationstring

XML configuration represented as a string

Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentSlotstring

The deployment slot (production or staging)

$configurationstring

XML configuration represented as a string

Throws
ExceptionDescription
\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
NameTypeDescription
$namestring

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

$labelstring

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

$descriptionstring

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

$locationstring

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
NameTypeDescription
$serviceNamestring

the service name to create a storage client for.

$retryPolicy\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

Returns
TypeDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentSlotstring

The deployment slot (production or staging)

$namestring

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.

$labelstring

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.

$packageUrlstring

The service configuration file for the deployment.

$configurationstring

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

$startDeploymentboolean

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

$treatWarningsAsErrorsboolean

Indicates whether to treat package validation warnings as errors.

Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

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

$labelstring

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

$descriptionstring

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

$locationstring

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

$affinityGroupstring

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

methodpubliccreateQueryStringFromArray( $queryString) : string
static

Builds a query string from an array of elements

Parameters
NameTypeDescription
$queryString
Returns
TypeDescription
stringAssembled 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
NameTypeDescription
$serviceNamestring

the service name to create a storage client for.

$retryPolicy\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

Returns
TypeDescription
\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
NameTypeDescription
$serviceNamestring

the service name to create a storage client for.

$retryPolicy\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_Table
methodpublicdeleteAffinityGroup(string $name) : void

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

Parameters
NameTypeDescription
$namestring

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
NameTypeDescription
$serviceName
$algorithmstring

Algorithm

$thumbprintstring

Thumbprint

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

The Delete Deployment operation deletes the specified deployment.

Parameters
NameTypeDescription
$serviceNamestring

The service name

$deploymentIdstring

The deployment ID as listed on the Windows Azure management portal

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

The Delete Deployment operation deletes the specified deployment.

Parameters
NameTypeDescription
$serviceNamestring

The service name

$deploymentSlotstring

The deployment slot (production or staging)

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Management_Exception
methodpublicdeleteHostedService(string $serviceName) : void

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

Parameters
NameTypeDescription
$serviceNamestring

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
NameTypeDescription
$affinityGroupNamestring

The affinity group name.

Returns
TypeDescription
\Zend_Service_WindowsAzure_Management_AffinityGroupInstance
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Management_Exception
methodpublicgetBaseUrl() : string

Get base URL for creating requests

Returns
TypeDescription
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
NameTypeDescription
$serviceName
$algorithmstring

Algorithm

$thumbprintstring

Thumbprint

Returns
TypeDescription
\Zend_Service_WindowsAzure_Management_CertificateInstance
Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentIdstring

The deployment ID as listed on the Windows Azure management portal

Returns
TypeDescription
\Zend_Service_WindowsAzure_Management_DeploymentInstance
Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentSlotstring

The deployment slot (production or staging)

Returns
TypeDescription
\Zend_Service_WindowsAzure_Management_DeploymentInstance
Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The name of your service.

Returns
TypeDescription
\Zend_Service_WindowsAzure_Management_HostedServiceInstance
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Management_Exception
methodpublicgetHttpClientChannel() : \Zend_Http_Client_Adapter_Interface

Retrieve HTTP client channel

methodpublicgetLastRequestId() : string

Returns the last request ID.

Returns
TypeDescription
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
NameTypeDescription
$requestIdstring

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

Returns
TypeDescription
\Zend_Service_WindowsAzure_Management_OperationStatusInstance
Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The name of your service.

Returns
TypeDescription
arrayAn array of strings
Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The name of your service.

Returns
TypeDescription
\Zend_Service_WindowsAzure_Management_StorageServiceInstance
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Management_Exception
methodpublicgetSubscriptionId() : string

Returns the Windows Azure subscription ID

Returns
TypeDescription
string
methodpubliclistAffinityGroups() : array

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

Returns
TypeDescription
arrayArray of Zend_Service_WindowsAzure_Management_AffinityGroupInstance
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Management_Exception
methodpubliclistCertificates(string $serviceName) : array

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

Parameters
NameTypeDescription
$serviceNamestring

The service name

Returns
TypeDescription
arrayArray of Zend_Service_WindowsAzure_Management_CertificateInstance
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Management_Exception
methodpubliclistHostedServices() : array

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

Returns
TypeDescription
arrayAn array of Zend_Service_WindowsAzure_Management_HostedServiceInstance
Throws
ExceptionDescription
\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
TypeDescription
arrayArray of Zend_Service_WindowsAzure_Management_LocationInstance
Throws
ExceptionDescription
\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
TypeDescription
arrayArray of Zend_Service_WindowsAzure_Management_OperatingSystemFamilyInstance
Throws
ExceptionDescription
\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
TypeDescription
arrayArray of Zend_Service_WindowsAzure_Management_OperatingSystemInstance
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Management_Exception
methodpubliclistStorageAccounts() : array

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

Returns
TypeDescription
arrayAn 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
NameTypeDescription
$startTimestring

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.

$endTimestring

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.

$objectIdFilterstring

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

$operationResultFilterstring

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

$continuationTokenstring

Internal usage.

Returns
TypeDescription
arrayArray of Zend_Service_WindowsAzure_Management_SubscriptionOperationInstance
Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentIdstring

The deployment ID as listed on the Windows Azure management portal

$roleInstanceNamestring

The role instance name

Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentSlotstring

The deployment slot (production or staging)

$roleInstanceNamestring

The role instance name

Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The name of your service.

$keystring

The key to regenerate (primary or secondary)

Returns
TypeDescription
arrayAn array of strings
Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentIdstring

The deployment ID as listed on the Windows Azure management portal

$roleInstanceNamestring

The role instance name

Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentSlotstring

The deployment slot (production or staging)

$roleInstanceNamestring

The role instance name

Throws
ExceptionDescription
\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
NameTypeDescription
$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
NameTypeDescription
$serviceNamestring

The service name

$deploymentId
$roleNamestring | array

The role name

$instanceCountstring | array

The instance count

Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentSlotstring

The deployment slot (production or staging)

$roleNamestring | array

The role name

$instanceCountstring | array

The instance count

Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name.

$productionDeploymentNamestring

The name of the production deployment.

$sourceDeploymentNamestring

The name of the source deployment.

Throws
ExceptionDescription
\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
NameTypeDescription
$namestring

The name for the affinity group that should be updated.

$labelstring

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

$descriptionstring

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
NameTypeDescription
$serviceNamestring

The service name

$deploymentIdstring

The deployment ID as listed on the Windows Azure management portal

$statusstring

The deployment status (running|suspended)

Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentSlotstring

The deployment slot (production or staging)

$statusstring

The deployment status (running|suspended)

Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

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

$labelstring

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

$descriptionstring

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
NameTypeDescription
$serviceNamestring

The service name

$deploymentIdstring

The deployment ID as listed on the Windows Azure management portal

$labelstring

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.

$packageUrlstring

The service configuration file for the deployment.

$configurationstring

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

$modestring

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

$roleToUpgradestring

The name of the specific role to upgrade.

Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentSlotstring

The deployment slot (production or staging)

$labelstring

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.

$packageUrlstring

The service configuration file for the deployment.

$configurationstring

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

$modestring

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

$roleToUpgradestring

The name of the specific role to upgrade.

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Management_Exception
methodpublicurlencode(string $value) : string
static

URL encode function

Parameters
NameTypeDescription
$valuestring

Value to encode

Returns
TypeDescription
stringEncoded value
methodpublicwaitForOperation(string $requestId = '', int $sleepInterval = 250) : \Zend_Service_WindowsAzure_Management_OperationStatusInstance

Wait for an operation to complete

Parameters
NameTypeDescription
$requestIdstring

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

$sleepIntervalint

Sleep interval in milliseconds.

Returns
TypeDescription
\Zend_Service_WindowsAzure_Management_OperationStatusInstance
Throws
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentIdstring

The deployment ID as listed on the Windows Azure management portal

$upgradeDomainint

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
ExceptionDescription
\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
NameTypeDescription
$serviceNamestring

The service name

$deploymentSlotstring

The deployment slot (production or staging)

$upgradeDomainint

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
ExceptionDescription
\Zend_Service_WindowsAzure_Management_Exception
Documentation was generated by phpDocumentor 2.2.0 .