1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
## File Storage Shares SDK for API version 2020-08-04
This package allows you to interact with the Shares File Storage API
### Supported Authorizers
* Azure Active Directory (for the Resource Endpoint `https://storage.azure.com`)
* SharedKeyLite (Blob, File & Queue)
### Example Usage
```go
package main
import (
"context"
"fmt"
"time"
"github.com/Azure/go-autorest/autorest"
"github.com/tombuildsstuff/giovanni/storage/2020-08-04/file/shares"
)
func Example() error {
accountName := "storageaccount1"
storageAccountKey := "ABC123...."
shareName := "myshare"
storageAuth := autorest.NewSharedKeyLiteAuthorizer(accountName, storageAccountKey)
sharesClient := shares.New()
sharesClient.Client.Authorizer = storageAuth
ctx := context.TODO()
input := shares.CreateInput{
QuotaInGB: 2,
}
if _, err := sharesClient.Create(ctx, accountName, shareName, input); err != nil {
return fmt.Errorf("Error creating Share: %s", err)
}
return nil
}
```
|