Service/SqlAzure/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 [email protected] 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_SqlAzure_Management_Client

Package: Zend_Service_SqlAzure\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.database.windows.net:8443"
Management service URL
>VConstant  OP_OPERATIONS = "operations"
Operations
>VConstant  OP_SERVERS = "servers"
>VConstant  OP_FIREWALLRULES = "firewallrules"

Properties

>VPropertyprotectedstring $_apiVersion = '1.0'
Current API version
Default value'1.0'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_SqlAzure_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

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
methodpubliccreateFirewallRule(string $serverName, string $ruleName, string $startIpAddress, string $endIpAddress) : \Zend_Service_SqlAzure_Management_FirewallRuleInstance

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.

Parameters
NameTypeDescription
$serverNamestring

Server name.

$ruleNamestring

Firewall rule name.

$startIpAddressstring

Start IP address.

$endIpAddressstring

End IP address.

Returns
TypeDescription
\Zend_Service_SqlAzure_Management_FirewallRuleInstance
Throws
ExceptionDescription
\Zend_Service_SqlAzure_Management_Exception
methodpubliccreateFirewallRuleForMicrosoftServices(string $serverName, boolean $allowAccess) : void

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

Parameters
NameTypeDescription
$serverNamestring

Server name.

$allowAccessboolean

Allow access from other Microsoft Services?

Throws
ExceptionDescription
\Zend_Service_SqlAzure_Management_Exception
methodpubliccreateQueryStringFromArray( $queryString) : string
static

Builds a query string from an array of elements

Parameters
NameTypeDescription
$queryString
Returns
TypeDescription
stringAssembled query string
methodpubliccreateServer(string $administratorLogin, string $administratorPassword, string $location) : \Zend_Service_SqlAzure_Management_ServerInstance

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

Parameters
NameTypeDescription
$administratorLoginstring

Administrator login.

$administratorPasswordstring

Administrator password.

$locationstring

Location of the server.

Returns
TypeDescription
\Zend_Service_SqlAzure_Management_ServerInstanceServer information.
Throws
ExceptionDescription
\Zend_Service_SqlAzure_Management_Exception
methodpublicdeleteFirewallRule(string $serverName, string $ruleName) : void

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

Parameters
NameTypeDescription
$serverNamestring

Server name.

$ruleNamestring

Rule name.

Throws
ExceptionDescription
\Zend_Service_SqlAzure_Management_Exception
methodpublicdropServer(string $serverName) : void

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

Parameters
NameTypeDescription
$serverNamestring

Server to drop.

Throws
ExceptionDescription
\Zend_Service_SqlAzure_Management_Exception
methodpublicgetBaseUrl() : string

Get base URL for creating requests

Returns
TypeDescription
string
methodpublicgetHttpClientChannel() : \Zend_Http_Client_Adapter_Interface

Retrieve HTTP client channel

methodpublicgetLastRequestId() : string

Returns the last request ID.

Returns
TypeDescription
string
methodpublicgetSubscriptionId() : string

Returns the Windows Azure subscription ID

Returns
TypeDescription
string
methodpubliclistFirewallRules(string $serverName) : Array

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

Parameters
NameTypeDescription
$serverNamestring

Server name.

Returns
TypeDescription
Arrayof Zend_Service_SqlAzure_Management_FirewallRuleInstance.
Throws
ExceptionDescription
\Zend_Service_SqlAzure_Management_Exception
methodpubliclistServers() : array

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

Returns
TypeDescription
arrayAn array of Zend_Service_SqlAzure_Management_ServerInstance.
Throws
ExceptionDescription
\Zend_Service_SqlAzure_Management_Exception
methodpublicsetAdministratorPassword(string $serverName, string $administratorPassword) : void

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

Parameters
NameTypeDescription
$serverNamestring

Server to set password for.

$administratorPasswordstring

Administrator password.

Throws
ExceptionDescription
\Zend_Service_SqlAzure_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.

methodpublicurlencode(string $value) : string
static

URL encode function

Parameters
NameTypeDescription
$valuestring

Value to encode

Returns
TypeDescription
stringEncoded value
Documentation was generated by phpDocumentor 2.2.0 .