Debian Codegraph @

storage/2020-08-04/file/shares/README.md

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