func (a *AccountHandle) Get(ctx context.Context) (*storage.Account, error) {
	acct, err := a.client.GetProperties(ctx, a.groupName, a.accountName)
	if err != nil {
		return nil, err
	}
	return &acct, nil
}
Get retrieves storage account resource
package storage
import (
	"context"
	"encoding/json"
	"fmt"
	"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-06-01/storage"
	"github.com/Azure/go-autorest/autorest/azure/auth"
	"github.com/Azure/go-autorest/autorest/to"
	"github.com/pkg/errors"
	azure "github.com/crossplane/provider-azure/pkg/clients"
)
func NewStorageAccountClient(data []byte) (*storage.AccountsClient, error) {
	creds := &azure.Credentials{}
	if err := json.Unmarshal(data, creds); err != nil {
		return nil, errors.Wrap(err, "cannot unmarshal Azure client secret data")
	}
	config := auth.NewClientCredentialsConfig(creds.ClientID, creds.ClientSecret, creds.TenantID)
	config.AADEndpoint = creds.ActiveDirectoryEndpointURL
	config.Resource = creds.ResourceManagerEndpointURL
	authorizer, err := config.Authorizer()
	if err != nil {
		return nil, fmt.Errorf("failed to get authorizer from config: %+v", err)
	}
	client := storage.NewAccountsClient(creds.SubscriptionID)
	client.Authorizer = authorizer
	if err := client.AddToUserAgent(azure.UserAgent); err != nil {
		return nil, errors.Wrap(err, "cannot add to Azure client user agent")
	}
	return &client, nil
}
type AccountOperations interface {
	Create(context.Context, storage.AccountCreateParameters) (*storage.Account, error)
	Update(context.Context, storage.AccountUpdateParameters) (*storage.Account, error)
	Get(ctx context.Context) (*storage.Account, error)
	Delete(ctx context.Context) error
	IsAccountNameAvailable(context.Context, string) error
	ListKeys(context.Context) ([]storage.AccountKey, error)
}
type AccountHandle struct {
	client      *storage.AccountsClient
	groupName   string
	accountName string
}
var _ AccountOperations = &AccountHandle{}
func NewAccountHandle(client *storage.AccountsClient, groupName, accountName string) *AccountHandle {
	return &AccountHandle{
		client:      client,
		groupName:   groupName,
		accountName: accountName,
	}
}
func (a *AccountHandle) Create(ctx context.Context, params storage.AccountCreateParameters) (*storage.Account, error) {
	if err := a.IsAccountNameAvailable(ctx, a.accountName); err != nil {
		return nil, errors.Wrapf(err, "failed to check account name availability")
	}
	future, err := a.client.Create(ctx, a.groupName, a.accountName, params)
	if err != nil {
		return nil, errors.Wrapf(err, "failed to start creating storage account")
	}
	err = future.WaitForCompletionRef(ctx, a.client.Client)
	if err != nil {
		return nil, errors.Wrapf(err, "failed to finish creating storage account")
	}
	acct, err := future.Result(*a.client)
	if err != nil {
		return nil, err
	}
	return &acct, nil
}
func (a *AccountHandle) Update(ctx context.Context, params storage.AccountUpdateParameters) (*storage.Account, error) {
	acct, err := a.client.Update(ctx, a.groupName, a.accountName, params)
	if err != nil {
		return nil, err
	}
	return &acct, nil
}