Метод | Описание | |
---|---|---|
__construct ( string $appClientId, string $appSecretKey, string $tenantName ) | Constructor. | |
__get ( string $name ) : Scalr\Service\Azure\AbstractService | Magic getter. | |
assignContributorRoleToApp ( string $subscriptionId, string $roleAssignmentId, string $appObjectId, string $contributorRoleId ) : Scalr\Service\Azure\DataType\RoleAssignmentData | Assign Contributor Role Id to specified app. | |
deleteRoleAssignment ( string $subscriptionId, string $roleAssignmentId ) : boolean | Delete role assignment. | |
getAccessToken ( ) : object | Gets Access Token. | |
getAccessTokenByAuthCode ( string $authorizationCode ) : object | Receive access token from server using Authorisation Code. | |
getAppObjectId ( ) : string | Receive from server Application Object ID for app with specified App Client ID using Client Token (AuthClient::getClientToken()). | |
getAuthorizationCodeLocation ( ) : string | Retrieve location where user must go to receive redirect-callback from Azure with authorization code. | |
getAvailableServices ( ) : array | List of all available services. | |
getClient ( ) : |
Gets Client | |
getClientToken ( string $resource = self::URL_GRAPH_WINDOWS ) : object | Receive short-time-live client token to use in GraphClient. | |
getContributorRoleAssignmentInfo ( string $subscriptionId, string $appObjectId, string $contributorRoleId ) : Scalr\Service\Azure\DataType\RoleAssignmentData | Get Role Assignment list in specified subscription. | |
getContributorRoleId ( string $subscriptionId ) : string | Get Contributor Role Id for specified subscription. | |
getEnvironment ( ) : Scalr_Environment | Gets an Scalr Environment object which is associated with the Azure client instance | |
getLocationsList ( string $namespace = GeoLocationData::RESOURCE_PROVIDER_COMPUTE ) : Scalr\Service\Azure\DataType\GeoLocationData | List all of the available geo-locations where user can create resource groups and resources. | |
getProvidersList ( string $subscriptionId ) : Scalr\Service\Azure\DataType\ProviderList | List information about all of the available resource providers and whether they are registered with the subscription. | |
getProxy ( ) : array | boolean | Gets proxy configuration | |
getRefreshToken ( ) : object | Getter for Refresh Token. | |
getRoleAssignmentInfo ( string $subscriptionId, string $roleAssignmentId ) : Scalr\Service\Azure\DataType\RoleAssignmentData | Get Role Assignment info in specified subscription. | |
getSubscriptionsList ( ) : Scalr\Service\Azure\DataType\SubscriptionList | Get list of all user subscriptions. | |
registerSubscription ( string $subscriptionId, string $resourceProvider ) : Scalr\Service\Azure\DataType\ProviderData | Register a subscription with a resource provider. | |
setAccessToken ( string $token, string $expireDate, string $error = null ) | Setter for Access Token. | |
setEnvironment ( Scalr_Environment $environment = null ) : |
Sets an Scalr environment object which is associated with the Azure client instance | |
setProxy ( string $host, integer $port = 3128, string $user = null, string $pass = null, integer $type, integer $authType = 1 ) | Set proxy configuration to connect to AWS services | |
unregisterSubscription ( string $subscriptionId, string $resourceProvider ) : Scalr\Service\Azure\DataType\ProviderData | Unregister a subscription from a resource provider. | |
validateTenantName ( ) : boolean | Validate tenant name. |
Метод | Описание | |
---|---|---|
getToken ( string $grantType, string $resource, string $refreshToken = null, string $authorizationCode = null ) : object | Receive token. |
Метод | Описание | |
---|---|---|
loadToken ( string $type ) : object | Load token from storage (DB in future). |
public assignContributorRoleToApp ( string $subscriptionId, string $roleAssignmentId, string $appObjectId, string $contributorRoleId ) : Scalr\Service\Azure\DataType\RoleAssignmentData | ||
$subscriptionId | string | subscription::subscriptionId value of one of user's subscriptions |
$roleAssignmentId | string | New role assignment id |
$appObjectId | string | Application Object Id |
$contributorRoleId | string | Contributor Role Id |
Результат | Scalr\Service\Azure\DataType\RoleAssignmentData | Server response body (JSON) |
public getAccessToken ( ) : object | ||
Результат | object | stdClass with next properties : token, expireDate and error. $accesToken is invalid, when error is not null |
public getAccessTokenByAuthCode ( string $authorizationCode ) : object | ||
$authorizationCode | string | Code, received from server |
Результат | object | stdClass with next properties : token, expireDate and error. $accesToken is invalid, when error is not null |
public getAppObjectId ( ) : string | ||
Результат | string | Application Object ID |
public getAuthorizationCodeLocation ( ) : string | ||
Результат | string | URL for access code request |
public getAvailableServices ( ) : array | ||
Результат | array | Service names |
public getClient ( ) : |
||
Результат | Returns QueryClient |
public getClientToken ( string $resource = self::URL_GRAPH_WINDOWS ) : object | ||
$resource | string | |
Результат | object | stdClass with next properties : token, expireDate and error. $clientToken is invalid, when error is not null |
public getContributorRoleAssignmentInfo ( string $subscriptionId, string $appObjectId, string $contributorRoleId ) : Scalr\Service\Azure\DataType\RoleAssignmentData | ||
$subscriptionId | string | subscription::subscriptionId value of one of user's subscriptions |
$appObjectId | string | Application Object Id |
$contributorRoleId | string | Contributor Role Id |
Результат | Scalr\Service\Azure\DataType\RoleAssignmentData | Server response body (JSON) |
public getContributorRoleId ( string $subscriptionId ) : string | ||
$subscriptionId | string | subscription::subscriptionId value of one of user's subscriptions |
Результат | string | Contributor Role Id |
public getEnvironment ( ) : Scalr_Environment | ||
Результат | Scalr_Environment | Returns Scalr Environment object |
public getLocationsList ( string $namespace = GeoLocationData::RESOURCE_PROVIDER_COMPUTE ) : Scalr\Service\Azure\DataType\GeoLocationData | ||
$namespace | string | Resource provider |
Результат | Scalr\Service\Azure\DataType\GeoLocationData | Object described on https://msdn.microsoft.com/en-us/library/azure/dn790540.aspx |
public getProvidersList ( string $subscriptionId ) : Scalr\Service\Azure\DataType\ProviderList | ||
$subscriptionId | string | subscription::subscriptionId value of one of user's subscriptions |
Результат | Scalr\Service\Azure\DataType\ProviderList |
public getRefreshToken ( ) : object | ||
Результат | object | stdClass with next properties : token, expireDate and error. |
public getRoleAssignmentInfo ( string $subscriptionId, string $roleAssignmentId ) : Scalr\Service\Azure\DataType\RoleAssignmentData | ||
$subscriptionId | string | subscription::subscriptionId value of one of user's subscriptions |
$roleAssignmentId | string | Role assignment id |
Результат | Scalr\Service\Azure\DataType\RoleAssignmentData | Server response body (JSON) |
public getSubscriptionsList ( ) : Scalr\Service\Azure\DataType\SubscriptionList | ||
Результат | Scalr\Service\Azure\DataType\SubscriptionList | List of subscription objects |
protected getToken ( string $grantType, string $resource, string $refreshToken = null, string $authorizationCode = null ) : object | ||
$grantType | string | Grant type |
$resource | string | Resource |
$refreshToken | string | optional Refresh Token value |
$authorizationCode | string | |
Результат | object | Object with next properties : token, expireDate and error. Token is invalid, when error is not null |
public registerSubscription ( string $subscriptionId, string $resourceProvider ) : Scalr\Service\Azure\DataType\ProviderData | ||
$subscriptionId | string | subscription::subscriptionId value of one of user's subscriptions |
$resourceProvider | string | The namespace of the resource provider with which you want to register your subscription |
Результат | Scalr\Service\Azure\DataType\ProviderData |
public setEnvironment ( Scalr_Environment $environment = null ) : |
||
$environment | Scalr_Environment | An environment object |
Результат |
public setProxy ( string $host, integer $port = 3128, string $user = null, string $pass = null, integer $type, integer $authType = 1 ) | ||
$host | string | |
$port | integer | |
$user | string | |
$pass | string | |
$type | integer | Allowed values 4 - SOCKS4, 5 - SOCKS5, 0 - HTTP |
$authType | integer | Allowed authtypes: 1 - Basic, Digest - 2, GSSNeg - 4, NTLM - 8, any - -1 |
public unregisterSubscription ( string $subscriptionId, string $resourceProvider ) : Scalr\Service\Azure\DataType\ProviderData | ||
$subscriptionId | string | subscription::subscriptionId value of one of user's subscriptions |
$resourceProvider | string | The namespace of the resource provider with which you want to unregister from your subscription |
Результат | Scalr\Service\Azure\DataType\ProviderData |
public validateTenantName ( ) : boolean | ||
Результат | boolean | Return true, if tenantName is valid, else return false |