Scalr\Service\Azure::deleteRoleAssignment PHP Method

deleteRoleAssignment() public method

Delete role assignment.
public deleteRoleAssignment ( string $subscriptionId, string $roleAssignmentId ) : boolean
$subscriptionId string subscription::subscriptionId value of one of user's subscriptions
$roleAssignmentId string Role assignment id
return boolean
    public function deleteRoleAssignment($subscriptionId, $roleAssignmentId)
    {
        $result = null;
        $path = '/subscriptions/' . $subscriptionId . '/providers/Microsoft.Authorization/roleAssignments/' . $roleAssignmentId;
        $headers = ['Authorization' => 'Bearer ' . $this->getAccessToken()->token];
        $request = $this->getClient()->prepareRequest($path, 'DELETE', self::RESOURCE_API_VERSION, Azure::URL_MANAGEMENT_WINDOWS, [], [], $headers);
        $response = $this->getClient()->call($request);
        return !$response->hasError() && $response->getResponseCode() == 200 ? true : false;
    }