category Zend
package Zend_Service_SqlAzure
subpackage Management
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Creates a new Zend_Service_SqlAzure_Management instance

__construct(string $subscriptionId, string $certificatePath, string $certificatePassphrase, \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null

Parameters

$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

The Set Server Firewall Rule operation updates an existing firewall rule or adds a new firewall rule for a SQL Azure server that belongs to a subscription.

createFirewallRule(string $serverName, string $ruleName, string $startIpAddress, string $endIpAddress) : \Zend_Service_SqlAzure_Management_FirewallRuleInstance

Parameters

$serverName

string

Server name.

$ruleName

string

Firewall rule name.

$startIpAddress

string

Start IP address.

$endIpAddress

string

End IP address.

Exceptions

\Zend_Service_SqlAzure_Management_Exception

Returns

\Zend_Service_SqlAzure_Management_FirewallRuleInstance

Creates a firewall rule for Microsoft Services. This is required if access to SQL Azure is required from other services like Windows Azure.

createFirewallRuleForMicrosoftServices(string $serverName, boolean $allowAccess) 

Parameters

$serverName

string

Server name.

$allowAccess

boolean

Allow access from other Microsoft Services?

Exceptions

\Zend_Service_SqlAzure_Management_Exception

Builds a query string from an array of elements

createQueryStringFromArray($queryString) : string
Static

Parameters

$queryString

Returns

stringAssembled query string

The Create Server operation adds a new SQL Azure server to a subscription.

createServer(string $administratorLogin, string $administratorPassword, string $location) : \Zend_Service_SqlAzure_Management_ServerInstance

Parameters

$administratorLogin

string

Administrator login.

$administratorPassword

string

Administrator password.

$location

string

Location of the server.

Exceptions

\Zend_Service_SqlAzure_Management_Exception

Returns

\Zend_Service_SqlAzure_Management_ServerInstanceServer information.

The Delete Server Firewall Rule operation deletes a firewall rule from a SQL Azure server that belongs to a subscription.

deleteFirewallRule(string $serverName, string $ruleName) 

Parameters

$serverName

string

Server name.

$ruleName

string

Rule name.

Exceptions

\Zend_Service_SqlAzure_Management_Exception

The Drop Server operation drops a SQL Azure server from a subscription.

dropServer(string $serverName) 

Parameters

$serverName

string

Server to drop.

Exceptions

\Zend_Service_SqlAzure_Management_Exception

Get base URL for creating requests

getBaseUrl() : string

Returns

string

Retrieve HTTP client channel

getHttpClientChannel() : \Zend_Http_Client_Adapter_Interface

Returns

\Zend_Http_Client_Adapter_Interface

Returns the last request ID.

getLastRequestId() : string

Returns

string

Returns the Windows Azure subscription ID

getSubscriptionId() : string

Returns

string

The Get Server Firewall Rules operation retrieves a list of all the firewall rules for a SQL Azure server that belongs to a subscription.

listFirewallRules(string $serverName) : Array

Parameters

$serverName

string

Server name.

Exceptions

\Zend_Service_SqlAzure_Management_Exception

Returns

Arrayof Zend_Service_SqlAzure_Management_FirewallRuleInstance.

The Get Servers operation enumerates SQL Azure servers that are provisioned for a subscription.

listServers() : array

Exceptions

\Zend_Service_SqlAzure_Management_Exception

Returns

arrayAn array of Zend_Service_SqlAzure_Management_ServerInstance.

The Set Server Administrator Password operation sets the administrative password of a SQL Azure server for a subscription.

setAdministratorPassword(string $serverName, string $administratorPassword) 

Parameters

$serverName

string

Server to set password for.

$administratorPassword

string

Administrator password.

Exceptions

\Zend_Service_SqlAzure_Management_Exception

Set the HTTP client channel to use

setHttpClientChannel(\Zend_Http_Client_Adapter_Interface|string $adapterInstance = 'Zend_Http_Client_Adapter_Socket'

Parameters

$adapterInstance

\Zend_Http_Client_Adapter_Interfacestring

Adapter instance or adapter class name.

URL encode function

urlencode(string $value) : string
Static

Parameters

$value

string

Value to encode

Returns

stringEncoded value

Get error message from Zend_Http_Response

_getErrorMessage(\Zend_Http_Response $response, string $alternativeError = 'Unknown error.') : string

Parameters

$response

\Zend_Http_Response

Repsonse

$alternativeError

string

Alternative error message

Returns

string

Parse result from Zend_Http_Response

_parseResponse(\Zend_Http_Response $response = null) : object

Parameters

$response

\Zend_Http_Response

Response from HTTP call

Exceptions

\Zend_Service_WindowsAzure_Exception

Returns

object

Perform request using Zend_Http_Client channel

_performRequest(string $path = '/', string $queryString = '', string $httpVerb = \Zend_Http_Client::GET, array $headers = array(), mixed $rawData = null) : \Zend_Http_Response

Parameters

$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

\Zend_Http_Response

 Properties

 

Current API version

$_apiVersion : string

Default

'1.0'
 

Management certificate passphrase

$_certificatePassphrase : string

Default

''
 

Management certificate path (.PEM)

$_certificatePath : string

Default

''
 

Zend_Http_Client channel used for communication with REST services

$_httpClientChannel : \Zend_Http_Client

Default

null
 

Returns the last request ID

$_lastRequestId : string

Default

null
 

Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract instance

$_retryPolicy : \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Default

null
 

Subscription ID

$_subscriptionId : string

Default

''

 Constants

 

OP_FIREWALLRULES

OP_FIREWALLRULES = "firewallrules" 
 

Operations

OP_OPERATIONS = "operations" 
 

OP_SERVERS

OP_SERVERS = "servers" 
 

Management service URL

URL_MANAGEMENT = "https://management.database.windows.net:8443"