Microsoft_SqlAzure
[ class tree: Microsoft_SqlAzure ] [ index: Microsoft_SqlAzure ] [ all elements ]

Class: Microsoft_SqlAzure_Management_Client

Source Location: /SqlAzure/Management/Client.php

Class Overview




Author(s):

Copyright:

  • Copyright (c) 2009 - 2011, RealDolmen (http://www.realdolmen.com)

Variables

Constants

Methods



Class Details

[line 48]


Tags:

copyright:  Copyright (c) 2009 - 2011, RealDolmen (http://www.realdolmen.com)
license:  http://phpazure.codeplex.com/license


[ Top ]


Class Variables

$_apiVersion =  '1.0'

[line 67]

Current API version



Tags:

access:  protected

Type:   string


[ Top ]

$_certificatePassphrase =  ''

[line 88]

Management certificate passphrase



Tags:

access:  protected

Type:   string


[ Top ]

$_certificatePath =  ''

[line 81]

Management certificate path (.PEM)



Tags:

access:  protected

Type:   string


[ Top ]

$_httpClientChannel =  null

[line 95]

Microsoft_Http_Client channel used for communication with REST services



Tags:

access:  protected



[ Top ]

$_lastRequestId =  null

[line 109]

Returns the last request ID



Tags:

access:  protected

Type:   string


[ Top ]

$_retryPolicy =  null

[line 102]

Microsoft_WindowsAzure_RetryPolicy_RetryPolicyAbstract instance



Tags:

access:  protected



[ Top ]

$_subscriptionId =  ''

[line 74]

Subscription ID



Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


constructor __construct [line 119]

Microsoft_SqlAzure_Management_Client __construct( string $subscriptionId, string $certificatePath, string $certificatePassphrase, [ $retryPolicy = null])

Creates a new Microsoft_SqlAzure_Management_Client instance



Tags:

access:  public


Parameters:

string   $subscriptionId   Subscription ID
string   $certificatePath   Management certificate path (.PEM)
string   $certificatePassphrase   Management certificate passphrase
Microsoft_WindowsAzure_RetryPolicy_RetryPolicyAbstract   $retryPolicy   Retry policy to use when making requests

[ Top ]

method createFirewallRule [line 449]

Microsoft_SqlAzure_Management_FirewallRuleInstance createFirewallRule( string $serverName, string $ruleName, string $startIpAddress, string $endIpAddress)

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.



Tags:

throws:  Microsoft_SqlAzure_Management_Exception
access:  public


Parameters:

string   $serverName   Server name.
string   $ruleName   Firewall rule name.
string   $startIpAddress   Start IP address.
string   $endIpAddress   End IP address.

[ Top ]

method createFirewallRuleForMicrosoftServices [line 555]

void createFirewallRuleForMicrosoftServices( string $serverName, boolean $allowAccess)

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



Tags:

throws:  Microsoft_SqlAzure_Management_Exception
access:  public


Parameters:

string   $serverName   Server name.
boolean   $allowAccess   Allow access from other Microsoft Services?

[ Top ]

method createServer [line 325]

Microsoft_SqlAzure_Management_ServerInstance createServer( string $administratorLogin, string $administratorPassword, string $location)

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



Tags:

return:  Server information.
throws:  Microsoft_SqlAzure_Management_Exception
access:  public


Parameters:

string   $administratorLogin   Administrator login.
string   $administratorPassword   Administrator password.
string   $location   Location of the server.

[ Top ]

method deleteFirewallRule [line 531]

void deleteFirewallRule( string $serverName, string $ruleName)

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



Tags:

throws:  Microsoft_SqlAzure_Management_Exception
access:  public


Parameters:

string   $serverName   Server name.
string   $ruleName   Rule name.

[ Top ]

method dropServer [line 400]

void dropServer( string $serverName)

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



Tags:

throws:  Microsoft_SqlAzure_Management_Exception
access:  public


Parameters:

string   $serverName   Server to drop.

[ Top ]

method getBaseUrl [line 197]

string getBaseUrl( )

Get base URL for creating requests



Tags:

access:  public


[ Top ]

method getHttpClientChannel [line 167]

Microsoft_Http_Client_Adapter_Interface getHttpClientChannel( )

Retrieve HTTP client channel



Tags:

access:  public


[ Top ]

method getLastRequestId [line 187]

string getLastRequestId( )

Returns the last request ID.



Tags:

access:  public


[ Top ]

method getSubscriptionId [line 177]

string getSubscriptionId( )

Returns the Windows Azure subscription ID



Tags:

access:  public


[ Top ]

method listFirewallRules [line 487]

Array listFirewallRules( string $serverName)

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



Tags:

return:  of Microsoft_SqlAzure_Management_FirewallRuleInstance.
throws:  Microsoft_SqlAzure_Management_Exception
access:  public


Parameters:

string   $serverName   Server name.

[ Top ]

method listServers [line 361]

array listServers( )

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



Tags:

return:  An array of Microsoft_SqlAzure_Management_ServerInstance.
throws:  Microsoft_SqlAzure_Management_Exception
access:  public


[ Top ]

method setAdministratorPassword [line 420]

void setAdministratorPassword( string $serverName, string $administratorPassword)

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



Tags:

throws:  Microsoft_SqlAzure_Management_Exception
access:  public


Parameters:

string   $serverName   Server to set password for.
string   $administratorPassword   Administrator password.

[ Top ]

method setHttpClientChannel [line 157]

void setHttpClientChannel( [Microsoft_Http_Client_Adapter_Interface|string $adapterInstance = 'Microsoft_Http_Client_Adapter_Socket'])

Set the HTTP client channel to use



Tags:

access:  public


Parameters:

Microsoft_Http_Client_Adapter_Interface|string   $adapterInstance   Adapter instance or adapter class name.

[ Top ]

method _getErrorMessage [line 306]

string _getErrorMessage( $response, [string $alternativeError = 'Unknown error.'])

Get error message from Microsoft_Http_Response



Tags:

access:  protected


Parameters:

Microsoft_Http_Response   $response   Repsonse
string   $alternativeError   Alternative error message

[ Top ]

method _parseResponse [line 276]

object _parseResponse( [ $response = null])

Parse result from Microsoft_Http_Response



Tags:

throws:  Microsoft_WindowsAzure_Exception
access:  protected


Parameters:

Microsoft_Http_Response   $response   Response from HTTP call

[ Top ]

method _performRequest [line 212]

Microsoft_Http_Response _performRequest( [string $path = '/'], [array $query = array()], [string $httpVerb = Microsoft_Http_Client::GET], [array $headers = array()], [mixed $rawData = null])

Perform request using Microsoft_Http_Client channel



Tags:

access:  protected


Parameters:

string   $path   Path
array   $query   Query parameters
string   $httpVerb   HTTP verb the request will use
array   $headers   x-ms headers to add
mixed   $rawData   Optional RAW HTTP data to be sent over the wire

[ Top ]


Class Constants

OP_FIREWALLRULES =  "firewallrules"

[line 60]


[ Top ]

OP_OPERATIONS =  "operations"

[line 58]

Operations


[ Top ]

OP_SERVERS =  "servers"

[line 59]


[ Top ]

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

[line 53]

Management service URL


[ Top ]



Documentation generated on Sat, 03 Dec 2011 13:59:12 +0100 by phpDocumentor 1.4.3