service

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 17 Imported by: 5

Documentation

Overview

Example (Service_Client_CreateContainer)
package main

import (
	"context"
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/filesystem"
	"log"
	"os"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	accountName, ok := os.LookupEnv("AZURE_STORAGE_ACCOUNT_NAME")
	if !ok {
		panic("AZURE_STORAGE_ACCOUNT_NAME could not be found")
	}
	serviceURL := fmt.Sprintf("https://%s.dfs.core.windows.net/", accountName)

	cred, err := azidentity.NewDefaultAzureCredential(nil)
	handleError(err)

	serviceClient, err := service.NewClient(serviceURL, cred, nil)
	handleError(err)

	_, err = serviceClient.CreateFileSystem(context.TODO(), "testfs", nil)
	handleError(err)

	// ======== 2. Delete a container ========
	defer func(serviceClient1 *service.Client, ctx context.Context, fsName string, options *filesystem.DeleteOptions) {
		_, err = serviceClient1.DeleteFileSystem(ctx, fsName, options)
		if err != nil {
			log.Fatal(err)
		}
	}(serviceClient, context.TODO(), "testfs", nil)
}
Output:

Example (Service_Client_DeleteFileSystem)
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	accountName, ok := os.LookupEnv("AZURE_STORAGE_ACCOUNT_NAME")
	if !ok {
		panic("AZURE_STORAGE_ACCOUNT_NAME could not be found")
	}
	serviceURL := fmt.Sprintf("https://%s.dfs.core.windows.net/", accountName)

	cred, err := azidentity.NewDefaultAzureCredential(nil)
	handleError(err)
	serviceClient, err := service.NewClient(serviceURL, cred, nil)
	handleError(err)

	_, err = serviceClient.DeleteFileSystem(context.TODO(), "testfs", nil)
	handleError(err)
}
Output:

Example (Service_Client_GetProperties)
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	accountName, ok := os.LookupEnv("AZURE_STORAGE_ACCOUNT_NAME")
	if !ok {
		panic("AZURE_STORAGE_ACCOUNT_NAME could not be found")
	}
	serviceURL := fmt.Sprintf("https://%s.dfs.core.windows.net/", accountName)

	cred, err := azidentity.NewDefaultAzureCredential(nil)
	handleError(err)

	serviceClient, err := service.NewClient(serviceURL, cred, nil)
	handleError(err)

	serviceGetPropertiesResponse, err := serviceClient.GetProperties(context.TODO(), nil)
	handleError(err)

	fmt.Println(serviceGetPropertiesResponse)
}
Output:

Example (Service_Client_GetSASURL)
package main

import (
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake"
	"log"
	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/sas"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	cred, err := azdatalake.NewSharedKeyCredential("myAccountName", "myAccountKey")
	handleError(err)
	serviceClient, err := service.NewClientWithSharedKeyCredential("https://<myAccountName>.dfs.core.windows.net", cred, nil)
	handleError(err)

	resources := sas.AccountResourceTypes{Service: true}
	permission := sas.AccountPermissions{Read: true}
	start := time.Now()
	expiry := start.AddDate(1, 0, 0)
	options := service.GetSASURLOptions{StartTime: &start}
	sasURL, err := serviceClient.GetSASURL(resources, permission, expiry, &options)
	handleError(err)

	serviceURL := fmt.Sprintf("https://<myAccountName>.dfs.core.windows.net/?%s", sasURL)
	serviceClientWithSAS, err := service.NewClientWithNoCredential(serviceURL, nil)
	handleError(err)
	_ = serviceClientWithSAS
}
Output:

Example (Service_Client_ListFileSystems)
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	accountName, ok := os.LookupEnv("AZURE_STORAGE_ACCOUNT_NAME")
	if !ok {
		panic("AZURE_STORAGE_ACCOUNT_NAME could not be found")
	}
	serviceURL := fmt.Sprintf("https://%s.dfs.core.windows.net/", accountName)

	cred, err := azidentity.NewDefaultAzureCredential(nil)
	handleError(err)
	serviceClient, err := service.NewClient(serviceURL, cred, nil)
	handleError(err)

	listFSOptions := service.ListFileSystemsOptions{
		Include: service.ListFileSystemsInclude{
			Metadata: to.Ptr(true), // Include Metadata
			Deleted:  to.Ptr(true), // Include deleted containers in the result as well
		},
	}
	pager := serviceClient.NewListFileSystemsPager(&listFSOptions)

	for pager.More() {
		resp, err := pager.NextPage(context.TODO())
		if err != nil {
			log.Fatal(err)
		}
		for _, fs := range resp.FileSystemItems {
			fmt.Println(*fs.Name)
		}
	}
}
Output:

Example (Service_Client_NewClient)
package main

import (
	"fmt"
	"log"
	"os"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	accountName, ok := os.LookupEnv("AZURE_STORAGE_ACCOUNT_NAME")
	if !ok {
		panic("AZURE_STORAGE_ACCOUNT_NAME could not be found")
	}
	serviceURL := fmt.Sprintf("https://%s.dfs.core.windows.net/", accountName)

	cred, err := azidentity.NewDefaultAzureCredential(nil)
	handleError(err)
	serviceClient, err := service.NewClient(serviceURL, cred, nil)
	handleError(err)
	fmt.Println(serviceClient.DFSURL())
	fmt.Println(serviceClient.BlobURL())
}
Output:

Example (Service_Client_NewClientFromConnectionString)
package main

import (
	"fmt"
	"log"
	"os"

	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	// Your connection string can be obtained from the Azure Portal.
	connectionString, ok := os.LookupEnv("AZURE_STORAGE_CONNECTION_STRING")
	if !ok {
		log.Fatal("the environment variable 'AZURE_STORAGE_CONNECTION_STRING' could not be found")
	}

	serviceClient, err := service.NewClientFromConnectionString(connectionString, nil)
	handleError(err)
	fmt.Println(serviceClient.DFSURL())
	fmt.Println(serviceClient.BlobURL())
}
Output:

Example (Service_Client_NewClientWithNoCredential)
package main

import (
	"fmt"
	"log"
	"os"

	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	accountName, ok := os.LookupEnv("AZURE_STORAGE_ACCOUNT_NAME")
	if !ok {
		panic("AZURE_STORAGE_ACCOUNT_NAME could not be found")
	}
	sharedAccessSignature, ok := os.LookupEnv("AZURE_STORAGE_SHARED_ACCESS_SIGNATURE")
	if !ok {
		panic("AZURE_STORAGE_SHARED_ACCESS_SIGNATURE could not be found")
	}
	serviceURL := fmt.Sprintf("https://%s.dfs.core.windows.net/?%s", accountName, sharedAccessSignature)

	serviceClient, err := service.NewClientWithNoCredential(serviceURL, nil)
	handleError(err)
	fmt.Println(serviceClient.DFSURL())
	fmt.Println(serviceClient.BlobURL())
}
Output:

Example (Service_Client_NewClientWithSharedKeyCredential)
package main

import (
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake"
	"log"
	"os"

	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	accountName, ok := os.LookupEnv("AZURE_STORAGE_ACCOUNT_NAME")
	if !ok {
		panic("AZURE_STORAGE_ACCOUNT_NAME could not be found")
	}
	accountKey, ok := os.LookupEnv("AZURE_STORAGE_ACCOUNT_KEY")
	if !ok {
		panic("AZURE_STORAGE_ACCOUNT_KEY could not be found")
	}
	serviceURL := fmt.Sprintf("https://%s.dfs.core.windows.net/", accountName)

	cred, err := azdatalake.NewSharedKeyCredential(accountName, accountKey)
	handleError(err)
	serviceClient, err := service.NewClientWithSharedKeyCredential(serviceURL, cred, nil)
	handleError(err)
	fmt.Println(serviceClient.DFSURL())
	fmt.Println(serviceClient.BlobURL())
}
Output:

Example (Service_Client_NewClientWithUserDelegationCredential)
package main

import (
	"context"
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake"
	"log"
	"os"
	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/sas"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	accountName, ok := os.LookupEnv("AZURE_STORAGE_ACCOUNT_NAME")
	if !ok {
		panic("AZURE_STORAGE_ACCOUNT_NAME could not be found")
	}
	const containerName = "testContainer"

	// Create Managed Identity (OAuth) Credentials using Client ID
	clientOptions := azcore.ClientOptions{} // Fill clientOptions as needed
	optsClientID := azidentity.ManagedIdentityCredentialOptions{ClientOptions: clientOptions, ID: azidentity.ClientID("7cf7db0d-...")}
	cred, err := azidentity.NewManagedIdentityCredential(&optsClientID)
	handleError(err)
	clientOptionsService := service.ClientOptions{} // Same as azcore.ClientOptions using service instead

	svcClient, err := service.NewClient(fmt.Sprintf("https://%s.dfs.core.windows.net/", accountName), cred, &clientOptionsService)
	handleError(err)

	// Set current and past time and create key
	currentTime := time.Now().UTC().Add(-10 * time.Second)
	pastTime := currentTime.Add(48 * time.Hour)
	info := service.KeyInfo{
		Start:  to.Ptr(currentTime.UTC().Format(sas.TimeFormat)),
		Expiry: to.Ptr(pastTime.UTC().Format(sas.TimeFormat)),
	}

	udc, err := svcClient.GetUserDelegationCredential(context.Background(), info, nil)
	handleError(err)

	fmt.Println("User Delegation Key has been created for ", accountName)

	// Create Blob Signature Values with desired permissions and sign with user delegation credential
	sasQueryParams, err := sas.DatalakeSignatureValues{
		Protocol:       sas.ProtocolHTTPS,
		StartTime:      time.Now().UTC().Add(time.Second * -10),
		ExpiryTime:     time.Now().UTC().Add(15 * time.Minute),
		Permissions:    to.Ptr(sas.FileSystemPermissions{Read: true, List: true}).String(),
		FileSystemName: containerName,
	}.SignWithUserDelegation(udc)
	handleError(err)

	sasURL := fmt.Sprintf("https://%s.dfs.core.windows.net/?%s", accountName, sasQueryParams.Encode())

	// This URL can be used to authenticate requests now
	serviceClient, err := service.NewClientWithNoCredential(sasURL, nil)
	handleError(err)

	// You can also break a blob URL up into it's constituent parts
	blobURLParts, _ := azdatalake.ParseURL(serviceClient.DFSURL())
	fmt.Printf("SAS expiry time = %s\n", blobURLParts.SAS.ExpiryTime())

	// Create Managed Identity (OAuth) Credentials using Resource ID
	optsResourceID := azidentity.ManagedIdentityCredentialOptions{ClientOptions: clientOptions, ID: azidentity.ResourceID("/subscriptions/...")}
	cred, err = azidentity.NewManagedIdentityCredential(&optsResourceID)
	handleError(err)

	svcClient, err = service.NewClient(fmt.Sprintf("https://%s.dfs.core.windows.net/", accountName), cred, &clientOptionsService)
	handleError(err)

	udc, err = svcClient.GetUserDelegationCredential(context.Background(), info, nil)
	handleError(err)
	fmt.Println("User Delegation Key has been created for ", accountName)

	// Create Blob Signature Values with desired permissions and sign with user delegation credential
	sasQueryParams, err = sas.DatalakeSignatureValues{
		Protocol:       sas.ProtocolHTTPS,
		StartTime:      time.Now().UTC().Add(time.Second * -10),
		ExpiryTime:     time.Now().UTC().Add(15 * time.Minute),
		Permissions:    to.Ptr(sas.FileSystemPermissions{Read: true, List: true}).String(),
		FileSystemName: containerName,
	}.SignWithUserDelegation(udc)
	handleError(err)

	sasURL = fmt.Sprintf("https://%s.dfs.core.windows.net/?%s", accountName, sasQueryParams.Encode())

	// This URL can be used to authenticate requests now
	serviceClient, err = service.NewClientWithNoCredential(sasURL, nil)
	handleError(err)

	// You can also break a blob URL up into it's constituent parts
	blobURLParts, _ = azdatalake.ParseURL(serviceClient.DFSURL())
	fmt.Printf("SAS expiry time = %s\n", blobURLParts.SAS.ExpiryTime())
}
Output:

Example (Service_Client_SetProperties)
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	accountName, ok := os.LookupEnv("AZURE_STORAGE_ACCOUNT_NAME")
	if !ok {
		panic("AZURE_STORAGE_ACCOUNT_NAME could not be found")
	}
	serviceURL := fmt.Sprintf("https://%s.dfs.core.windows.net/", accountName)

	cred, err := azidentity.NewDefaultAzureCredential(nil)
	handleError(err)
	serviceClient, err := service.NewClient(serviceURL, cred, nil)
	handleError(err)

	enabled := true  // enabling retention period
	days := int32(5) // setting retention period to 5 days
	serviceSetPropertiesResponse, err := serviceClient.SetProperties(context.TODO(), &service.SetPropertiesOptions{
		DeleteRetentionPolicy: &service.RetentionPolicy{Enabled: &enabled, Days: &days},
	})

	handleError(err)
	fmt.Println(serviceSetPropertiesResponse)
}
Output:

Example (Service_SASSignatureValues_Sign)

This example shows how to create and use an Azure Storage account Shared Access Signature (SAS).

package main

import (
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake"
	"log"
	"os"
	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/sas"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/service"
)

func handleError(err error) {
	if err != nil {
		log.Fatal(err.Error())
	}
}

func main() {
	accountName, accountKey := os.Getenv("AZURE_STORAGE_ACCOUNT_NAME"), os.Getenv("AZURE_STORAGE_ACCOUNT_KEY")

	credential, err := azdatalake.NewSharedKeyCredential(accountName, accountKey)
	handleError(err)

	sasQueryParams, err := sas.AccountSignatureValues{
		Protocol:      sas.ProtocolHTTPS,
		ExpiryTime:    time.Now().UTC().Add(48 * time.Hour),
		Permissions:   to.Ptr(sas.AccountPermissions{Read: true, List: true}).String(),
		ResourceTypes: to.Ptr(sas.AccountResourceTypes{Container: true, Object: true}).String(),
	}.SignWithSharedKey(credential)
	handleError(err)

	sasURL := fmt.Sprintf("https://%s.dfs.core.windows.net/?%s", accountName, sasQueryParams.Encode())

	// This URL can be used to authenticate requests now
	serviceClient, err := service.NewClientWithNoCredential(sasURL, nil)
	handleError(err)

	// You can also break a blob URL up into it's constituent parts
	blobURLParts, _ := azdatalake.ParseURL(serviceClient.DFSURL())
	fmt.Printf("SAS expiry time = %s\n", blobURLParts.SAS.ExpiryTime())
}
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessConditions

type AccessConditions = exported.AccessConditions

AccessConditions identifies blob-specific access conditions which you optionally set.

type CORSRule

type CORSRule = service.CORSRule

CORSRule - CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain.

type CPKScopeInfo

type CPKScopeInfo = filesystem.CPKScopeInfo

CPKScopeInfo contains a group of parameters for the FileSystemClient.Create method.

type Client

Client represents a URL to the Azure Datalake Storage service.

func NewClient

func NewClient(serviceURL string, cred azcore.TokenCredential, options *ClientOptions) (*Client, error)

NewClient creates an instance of Client with the specified values.

  • serviceURL - the URL of the blob e.g. https://<account>.dfs.core.windows.net/
  • cred - an Azure AD credential, typically obtained via the azidentity module
  • options - client options; pass nil to accept the default values

func NewClientFromConnectionString

func NewClientFromConnectionString(connectionString string, options *ClientOptions) (*Client, error)

NewClientFromConnectionString creates an instance of Client with the specified values.

  • connectionString - a connection string for the desired storage account
  • options - client options; pass nil to accept the default values

func NewClientWithNoCredential

func NewClientWithNoCredential(serviceURL string, options *ClientOptions) (*Client, error)

NewClientWithNoCredential creates an instance of Client with the specified values.

  • serviceURL - the URL of the storage account e.g. https://<account>.dfs.core.windows.net/
  • options - client options; pass nil to accept the default values.

func NewClientWithSharedKeyCredential

func NewClientWithSharedKeyCredential(serviceURL string, cred *SharedKeyCredential, options *ClientOptions) (*Client, error)

NewClientWithSharedKeyCredential creates an instance of Client with the specified values.

  • serviceURL - the URL of the storage account e.g. https://<account>.dfs.core.windows.net/
  • cred - a SharedKeyCredential created with the matching storage account and access key
  • options - client options; pass nil to accept the default values

func (*Client) BlobURL

func (s *Client) BlobURL() string

BlobURL returns the URL endpoint used by the Client object.

func (*Client) CreateFileSystem

func (s *Client) CreateFileSystem(ctx context.Context, filesystem string, options *CreateFileSystemOptions) (CreateFileSystemResponse, error)

CreateFileSystem creates a new filesystem under the specified account.

func (*Client) DFSURL

func (s *Client) DFSURL() string

DFSURL returns the URL endpoint used by the Client object.

func (*Client) DeleteFileSystem

func (s *Client) DeleteFileSystem(ctx context.Context, filesystem string, options *DeleteFileSystemOptions) (DeleteFileSystemResponse, error)

DeleteFileSystem deletes the specified filesystem.

func (*Client) GetProperties

func (s *Client) GetProperties(ctx context.Context, options *GetPropertiesOptions) (GetPropertiesResponse, error)

GetProperties gets properties for a storage account's Datalake service endpoint.

func (*Client) GetSASURL

func (s *Client) GetSASURL(resources sas.AccountResourceTypes, permissions sas.AccountPermissions, expiry time.Time, o *GetSASURLOptions) (string, error)

GetSASURL is a convenience method for generating a SAS token for the currently pointed at account. It can only be used if the credential supplied during creation was a SharedKeyCredential.

func (*Client) GetUserDelegationCredential

func (s *Client) GetUserDelegationCredential(ctx context.Context, info KeyInfo, o *GetUserDelegationCredentialOptions) (*UserDelegationCredential, error)

GetUserDelegationCredential obtains a UserDelegationKey object using the base ServiceURL object. OAuth is required for this call, as well as any role that can delegate access to the storage account.

func (*Client) NewFileSystemClient

func (s *Client) NewFileSystemClient(filesystemName string) *filesystem.Client

NewFileSystemClient creates a new filesystem.Client object by concatenating filesystemName to the end of this Client's URL. The new filesystem.Client uses the same request policy pipeline as the Client.

func (*Client) NewListFileSystemsPager

func (s *Client) NewListFileSystemsPager(o *ListFileSystemsOptions) *runtime.Pager[ListFileSystemsResponse]

NewListFileSystemsPager operation returns a pager of the shares under the specified account. For more information, see https://learn.microsoft.com/en-us/rest/api/storageservices/list-shares

func (*Client) SetProperties

func (s *Client) SetProperties(ctx context.Context, options *SetPropertiesOptions) (SetPropertiesResponse, error)

SetProperties sets properties for a storage account's Datalake service endpoint.

type ClientOptions

type ClientOptions base.ClientOptions

ClientOptions contains the optional parameters when creating a Client.

type CreateFileSystemOptions

type CreateFileSystemOptions = filesystem.CreateOptions

CreateFileSystemOptions contains the optional parameters for the FileSystem Create method.

type CreateFileSystemResponse

type CreateFileSystemResponse = filesystem.CreateResponse

CreateFileSystemResponse contains the response fields for the CreateFileSystem operation.

type DeleteFileSystemOptions

type DeleteFileSystemOptions = filesystem.DeleteOptions

DeleteFileSystemOptions contains the optional parameters for the FileSystem Delete method.

type DeleteFileSystemResponse

type DeleteFileSystemResponse = filesystem.DeleteResponse

DeleteFileSystemResponse contains the response fields for the DeleteFileSystem operation.

type DurationType

type DurationType = generated_blob.LeaseDurationType

DurationType defines values for DurationType

func PossibleDurationTypeValues

func PossibleDurationTypeValues() []DurationType

PossibleDurationTypeValues returns the possible values for the DurationType const type.

type FileSystemItem

type FileSystemItem = generated_blob.FileSystemItem

FileSystemItem contains fields from the ListFileSystems operation

type FileSystemProperties

type FileSystemProperties = generated_blob.FileSystemProperties

FileSystemProperties contains fields from the ListFileSystems operation

type GetPropertiesOptions

type GetPropertiesOptions struct {
}

GetPropertiesOptions contains the optional parameters for the Client.GetProperties method.

type GetPropertiesResponse

type GetPropertiesResponse = service.GetPropertiesResponse

GetPropertiesResponse contains the response fields for the GetProperties operation.

type GetSASURLOptions

type GetSASURLOptions struct {
	// StartTime is the time after which the SAS will become valid.
	StartTime *time.Time
}

GetSASURLOptions contains the optional parameters for the Client.GetSASURL method.

type GetUserDelegationCredentialOptions

type GetUserDelegationCredentialOptions struct {
}

GetUserDelegationCredentialOptions contains optional parameters for GetUserDelegationKey method.

type KeyInfo

type KeyInfo = generated_blob.KeyInfo

KeyInfo contains KeyInfo struct.

type LeaseAccessConditions

type LeaseAccessConditions = exported.LeaseAccessConditions

LeaseAccessConditions contains optional parameters to access leased entity.

type ListFileSystemsInclude

type ListFileSystemsInclude struct {
	// Metadata tells the service whether to return metadata for each filesystem.
	Metadata *bool
	// Deleted tells the service whether to return soft-deleted filesystems.
	Deleted *bool
	// System tells the service whether to return system filesystems.
	System *bool
}

ListFileSystemsInclude indicates what additional information the service should return with each filesystem.

type ListFileSystemsOptions

type ListFileSystemsOptions struct {
	// Include tells the service whether to return filesystem metadata.
	Include ListFileSystemsInclude
	// Marker is the continuation token to use when continuing the operation.
	Marker *string
	// MaxResults sets the maximum number of paths that will be returned per page.
	MaxResults *int32
	// Prefix filters the results to return only filesystems whose names begin with the specified prefix.
	Prefix *string
}

ListFileSystemsOptions contains the optional parameters for the ListFileSystems method.

type ListFileSystemsResponse

ListFileSystemsResponse contains the response fields for the ListFileSystems operation.

type ListFileSystemsSegmentResponse

type ListFileSystemsSegmentResponse = generated_blob.ListFileSystemsSegmentResponse

ListFileSystemsSegmentResponse contains fields from the ListFileSystems operation

type Logging

type Logging = service.Logging

Logging - Azure Analytics Logging settings.

type Metrics

type Metrics = service.Metrics

Metrics - a summary of request statistics grouped by API in hour or minute aggregates

type ModifiedAccessConditions

type ModifiedAccessConditions = exported.ModifiedAccessConditions

ModifiedAccessConditions contains a group of parameters for specifying access conditions.

type PublicAccessType

type PublicAccessType = filesystem.PublicAccessType

PublicAccessType defines values for AccessType - private (default) or file or filesystem.

type RetentionPolicy

type RetentionPolicy = service.RetentionPolicy

RetentionPolicy - the retention policy which determines how long the associated data should persist.

type SetPropertiesOptions

type SetPropertiesOptions struct {
	// CORS The set of CORS rules.
	CORS []*CORSRule
	// DefaultServiceVersion The default version to use for requests to the Datalake service if an incoming request's version is not specified. Possible
	// values include version 2008-10-27 and all more recent versions.
	DefaultServiceVersion *string
	// DeleteRetentionPolicy the retention policy which determines how long the associated data should persist.
	DeleteRetentionPolicy *RetentionPolicy
	// HourMetrics a summary of request statistics grouped by API in hour or minute aggregates
	// If version is not set - we default to "1.0"
	HourMetrics *Metrics
	// Logging Azure Analytics Logging settings.
	// If version is not set - we default to "1.0"
	Logging *Logging
	// MinuteMetrics a summary of request statistics grouped by API in hour or minute aggregates
	// If version is not set - we default to "1.0"
	MinuteMetrics *Metrics
	// StaticWebsite The properties that enable an account to host a static website.
	StaticWebsite *StaticWebsite
}

SetPropertiesOptions provides set of options for Client.SetProperties

type SetPropertiesResponse

type SetPropertiesResponse = service.SetPropertiesResponse

SetPropertiesResponse contains the response fields for the SetProperties operation.

type SharedKeyCredential

type SharedKeyCredential = exported.SharedKeyCredential

SharedKeyCredential contains an account's name and its primary or secondary key.

type StateType

type StateType = generated_blob.LeaseStateType

StateType defines values for StateType

type StaticWebsite

type StaticWebsite = service.StaticWebsite

StaticWebsite - The properties that enable an account to host a static website.

type StatusType

type StatusType = generated_blob.LeaseStatusType

StatusType defines values for StatusType

func PossibleStatusTypeValues

func PossibleStatusTypeValues() []StatusType

PossibleStatusTypeValues returns the possible values for the StatusType const type.

type StorageServiceProperties

type StorageServiceProperties = service.StorageServiceProperties

StorageServiceProperties - Storage Service Properties. Returned in GetServiceProperties call.

type UserDelegationCredential

type UserDelegationCredential = exported.UserDelegationCredential

UserDelegationCredential contains an account's name and its user delegation key.

type UserDelegationKey

type UserDelegationKey = exported.UserDelegationKey

UserDelegationKey contains UserDelegationKey.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL