![]() The share package’s Create method creates a new share under the specified account. The share.Client type exposes share operations that manipulate the lifecycle of the Azure Files share. ServiceClient, err := service.NewClientWithNoCredential(" nil) } Use the Shared Access Signature (SAS) tokenĪzure Files supports authentication using SAS token, which you can get from the Azure portal. ServiceClient, err := service.NewClientWithSharedKe圜redential(" cred, nil) create service.Client for the specified storage account that uses the above credential create a credential for authenticating using shared keyĬred, err := service.NewSharedKe圜redential("", "") ServiceClient, err := service.NewClientFromConnectionString("", nil)Īzure Files supports authentication using access key, which you can get from the Azure portal. Import "/Azure/azure-sdk-for-go/sdk/storage/azfile/service" Use Azure Files connection stringĪzure Files supports authentication using a connection string, which you can get from the Azure portal. You can create a client using an Azure Files connection string or access key or with a Shared Access Signature(SAS) (obtained via the Azure portal). You must specify the storage account when you create a client. Instances of the service.Client, share.Client, directory.Client, and file.Client types provide methods to manipulate shares, directories, and files within a storage account. A Client type is shareable between multiple goroutines simultaneously and safely.Īzure Files offers four types of resources: the storage account, the shares within the account, and the directories and files within a share. A working development environment for Go version 1.18 or above.Ĭlient is a type that exposes methods that invoke service operations.To install the latest version of azfile, use the following go get command: go get /Azure/azure-sdk-for-go/sdk/storage/azfile The Azure Files client library is named azfile. To upgrade from the legacy Azure Files library for Go, see the migration guide. Azure Files shares can also be cached on Windows Servers with Azure File Sync for fast access near where the data is being used. ![]() Azure Files shares can be mounted concurrently by cloud or on-premises deployments of Windows, Linux, and macOS. Azure Files offers fully managed file shares in the cloud that are accessible via the industry standard Server Message Block (SMB) protocol. The Azure SDK for Go team at Microsoft is excited to announce the stable release of the Azure Files client library for Go. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |