Debian Codegraph @

storage/2017-07-29/blob/containers/README.md

raw
1 ## Blob Storage Container SDK for API version 2017-07-29
2
3 This package allows you to interact with the Containers Blob Storage API
4
5 ### Supported Authorizers
6
7 * SharedKeyLite (Blob, File & Queue)
8
9 Note: when using the `ListBlobs` operation, only `SharedKeyLite` authentication is supported.
10
11 ### Example Usage
12
13 ```go
14 package main
15
16 import (
17 "context"
18 "fmt"
19 "time"
20
21 "github.com/Azure/go-autorest/autorest"
22 "github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/containers"
23 )
24
25 func Example() error {
26 accountName := "storageaccount1"
27 storageAccountKey := "ABC123...."
28 containerName := "mycontainer"
29
30 storageAuth := autorest.NewSharedKeyLiteAuthorizer(accountName, storageAccountKey)
31 containersClient := containers.New()
32 containersClient.Client.Authorizer = storageAuth
33
34 ctx := context.TODO()
35 createInput := containers.CreateInput{
36 AccessLevel: containers.Private,
37 }
38 if _, err := containersClient.Create(ctx, accountName, containerName, createInput); err != nil {
39 return fmt.Errorf("Error creating Container: %s", err)
40 }
41
42 return nil
43 }
44 ```