fileservice

package
v0.20250213.1092825 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/storage/2024-01-01/fileservice Documentation

The fileservice SDK allows for interaction with Azure Resource Manager storage (API Version 2024-01-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/storage/2024-01-01/fileservice"

Client Initialization

client := fileservice.NewFileServiceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: FileServiceClient.GetServiceProperties

ctx := context.TODO()
id := commonids.NewStorageAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountName")

read, err := client.GetServiceProperties(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: FileServiceClient.GetServiceUsage

ctx := context.TODO()
id := commonids.NewStorageAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountName")

read, err := client.GetServiceUsage(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: FileServiceClient.List

ctx := context.TODO()
id := commonids.NewStorageAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountName")

read, err := client.List(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: FileServiceClient.ListServiceUsages

ctx := context.TODO()
id := commonids.NewStorageAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountName")

// alternatively `client.ListServiceUsages(ctx, id, fileservice.DefaultListServiceUsagesOperationOptions())` can be used to do batched pagination
items, err := client.ListServiceUsagesComplete(ctx, id, fileservice.DefaultListServiceUsagesOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: FileServiceClient.SetServiceProperties

ctx := context.TODO()
id := commonids.NewStorageAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageAccountName")

payload := fileservice.FileServiceProperties{
	// ...
}


read, err := client.SetServiceProperties(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAllowedMethods

func PossibleValuesForAllowedMethods() []string

func PossibleValuesForSkuName

func PossibleValuesForSkuName() []string

func PossibleValuesForSkuTier

func PossibleValuesForSkuTier() []string

Types

type AccountLimits

type AccountLimits struct {
	MaxFileShares                    *int64 `json:"maxFileShares,omitempty"`
	MaxProvisionedBandwidthMiBPerSec *int64 `json:"maxProvisionedBandwidthMiBPerSec,omitempty"`
	MaxProvisionedIOPS               *int64 `json:"maxProvisionedIOPS,omitempty"`
	MaxProvisionedStorageGiB         *int64 `json:"maxProvisionedStorageGiB,omitempty"`
}

type AccountUsage

type AccountUsage struct {
	LiveShares        *AccountUsageElements `json:"liveShares,omitempty"`
	SoftDeletedShares *AccountUsageElements `json:"softDeletedShares,omitempty"`
}

type AccountUsageElements

type AccountUsageElements struct {
	FileShareCount                *int64 `json:"fileShareCount,omitempty"`
	ProvisionedBandwidthMiBPerSec *int64 `json:"provisionedBandwidthMiBPerSec,omitempty"`
	ProvisionedIOPS               *int64 `json:"provisionedIOPS,omitempty"`
	ProvisionedStorageGiB         *int64 `json:"provisionedStorageGiB,omitempty"`
}

type AllowedMethods

type AllowedMethods string
const (
	AllowedMethodsCONNECT AllowedMethods = "CONNECT"
	AllowedMethodsDELETE  AllowedMethods = "DELETE"
	AllowedMethodsGET     AllowedMethods = "GET"
	AllowedMethodsHEAD    AllowedMethods = "HEAD"
	AllowedMethodsMERGE   AllowedMethods = "MERGE"
	AllowedMethodsOPTIONS AllowedMethods = "OPTIONS"
	AllowedMethodsPATCH   AllowedMethods = "PATCH"
	AllowedMethodsPOST    AllowedMethods = "POST"
	AllowedMethodsPUT     AllowedMethods = "PUT"
	AllowedMethodsTRACE   AllowedMethods = "TRACE"
)

func (*AllowedMethods) UnmarshalJSON

func (s *AllowedMethods) UnmarshalJSON(bytes []byte) error

type BurstingConstants

type BurstingConstants struct {
	BurstFloorIOPS        *int64   `json:"burstFloorIOPS,omitempty"`
	BurstIOScalar         *float64 `json:"burstIOScalar,omitempty"`
	BurstTimeframeSeconds *int64   `json:"burstTimeframeSeconds,omitempty"`
}

type CorsRule

type CorsRule struct {
	AllowedHeaders  []string         `json:"allowedHeaders"`
	AllowedMethods  []AllowedMethods `json:"allowedMethods"`
	AllowedOrigins  []string         `json:"allowedOrigins"`
	ExposedHeaders  []string         `json:"exposedHeaders"`
	MaxAgeInSeconds int64            `json:"maxAgeInSeconds"`
}

type CorsRules

type CorsRules struct {
	CorsRules *[]CorsRule `json:"corsRules,omitempty"`
}

type DeleteRetentionPolicy

type DeleteRetentionPolicy struct {
	AllowPermanentDelete *bool  `json:"allowPermanentDelete,omitempty"`
	Days                 *int64 `json:"days,omitempty"`
	Enabled              *bool  `json:"enabled,omitempty"`
}

type FileServiceClient

type FileServiceClient struct {
	Client *resourcemanager.Client
}

func NewFileServiceClientWithBaseURI

func NewFileServiceClientWithBaseURI(sdkApi sdkEnv.Api) (*FileServiceClient, error)

func (FileServiceClient) GetServiceProperties

GetServiceProperties ...

func (FileServiceClient) GetServiceUsage

GetServiceUsage ...

func (FileServiceClient) List

List ...

func (FileServiceClient) ListServiceUsages

ListServiceUsages ...

func (FileServiceClient) ListServiceUsagesComplete

ListServiceUsagesComplete retrieves all the results into a single object

func (FileServiceClient) ListServiceUsagesCompleteMatchingPredicate

ListServiceUsagesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (FileServiceClient) SetServiceProperties

SetServiceProperties ...

type FileServiceItems

type FileServiceItems struct {
	Value *[]FileServiceProperties `json:"value,omitempty"`
}

type FileServiceProperties

type FileServiceProperties struct {
	Id         *string                          `json:"id,omitempty"`
	Name       *string                          `json:"name,omitempty"`
	Properties *FileServicePropertiesProperties `json:"properties,omitempty"`
	Sku        *Sku                             `json:"sku,omitempty"`
	Type       *string                          `json:"type,omitempty"`
}

type FileServicePropertiesProperties

type FileServicePropertiesProperties struct {
	Cors                       *CorsRules             `json:"cors,omitempty"`
	ProtocolSettings           *ProtocolSettings      `json:"protocolSettings,omitempty"`
	ShareDeleteRetentionPolicy *DeleteRetentionPolicy `json:"shareDeleteRetentionPolicy,omitempty"`
}

type FileServiceUsage

type FileServiceUsage struct {
	Id         *string                     `json:"id,omitempty"`
	Name       *string                     `json:"name,omitempty"`
	Properties *FileServiceUsageProperties `json:"properties,omitempty"`
	Type       *string                     `json:"type,omitempty"`
}

type FileServiceUsageOperationPredicate

type FileServiceUsageOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (FileServiceUsageOperationPredicate) Matches

type FileServiceUsageProperties

type FileServiceUsageProperties struct {
	BurstingConstants        *BurstingConstants        `json:"burstingConstants,omitempty"`
	FileShareLimits          *FileShareLimits          `json:"fileShareLimits,omitempty"`
	FileShareRecommendations *FileShareRecommendations `json:"fileShareRecommendations,omitempty"`
	StorageAccountLimits     *AccountLimits            `json:"storageAccountLimits,omitempty"`
	StorageAccountUsage      *AccountUsage             `json:"storageAccountUsage,omitempty"`
}

type FileShareLimits

type FileShareLimits struct {
	MaxProvisionedBandwidthMiBPerSec *int64 `json:"maxProvisionedBandwidthMiBPerSec,omitempty"`
	MaxProvisionedIOPS               *int64 `json:"maxProvisionedIOPS,omitempty"`
	MaxProvisionedStorageGiB         *int64 `json:"maxProvisionedStorageGiB,omitempty"`
	MinProvisionedBandwidthMiBPerSec *int64 `json:"minProvisionedBandwidthMiBPerSec,omitempty"`
	MinProvisionedIOPS               *int64 `json:"minProvisionedIOPS,omitempty"`
	MinProvisionedStorageGiB         *int64 `json:"minProvisionedStorageGiB,omitempty"`
}

type FileShareRecommendations

type FileShareRecommendations struct {
	BandwidthScalar        *float64 `json:"bandwidthScalar,omitempty"`
	BaseBandwidthMiBPerSec *int64   `json:"baseBandwidthMiBPerSec,omitempty"`
	BaseIOPS               *int64   `json:"baseIOPS,omitempty"`
	IoScalar               *float64 `json:"ioScalar,omitempty"`
}

type GetServicePropertiesOperationResponse

type GetServicePropertiesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FileServiceProperties
}

type GetServiceUsageOperationResponse

type GetServiceUsageOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FileServiceUsage
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FileServiceItems
}

type ListServiceUsagesCompleteResult

type ListServiceUsagesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []FileServiceUsage
}

type ListServiceUsagesCustomPager

type ListServiceUsagesCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListServiceUsagesCustomPager) NextPageLink() *odata.Link

type ListServiceUsagesOperationOptions

type ListServiceUsagesOperationOptions struct {
	Maxpagesize *int64
}

func DefaultListServiceUsagesOperationOptions

func DefaultListServiceUsagesOperationOptions() ListServiceUsagesOperationOptions

func (ListServiceUsagesOperationOptions) ToHeaders

func (ListServiceUsagesOperationOptions) ToOData

func (ListServiceUsagesOperationOptions) ToQuery

type ListServiceUsagesOperationResponse

type ListServiceUsagesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]FileServiceUsage
}

type Multichannel

type Multichannel struct {
	Enabled *bool `json:"enabled,omitempty"`
}

type ProtocolSettings

type ProtocolSettings struct {
	Smb *SmbSetting `json:"smb,omitempty"`
}

type SetServicePropertiesOperationResponse

type SetServicePropertiesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FileServiceProperties
}

type Sku

type Sku struct {
	Name SkuName  `json:"name"`
	Tier *SkuTier `json:"tier,omitempty"`
}

type SkuName

type SkuName string
const (
	SkuNamePremiumLRS       SkuName = "Premium_LRS"
	SkuNamePremiumVTwoLRS   SkuName = "PremiumV2_LRS"
	SkuNamePremiumVTwoZRS   SkuName = "PremiumV2_ZRS"
	SkuNamePremiumZRS       SkuName = "Premium_ZRS"
	SkuNameStandardGRS      SkuName = "Standard_GRS"
	SkuNameStandardGZRS     SkuName = "Standard_GZRS"
	SkuNameStandardLRS      SkuName = "Standard_LRS"
	SkuNameStandardRAGRS    SkuName = "Standard_RAGRS"
	SkuNameStandardRAGZRS   SkuName = "Standard_RAGZRS"
	SkuNameStandardVTwoGRS  SkuName = "StandardV2_GRS"
	SkuNameStandardVTwoGZRS SkuName = "StandardV2_GZRS"
	SkuNameStandardVTwoLRS  SkuName = "StandardV2_LRS"
	SkuNameStandardVTwoZRS  SkuName = "StandardV2_ZRS"
	SkuNameStandardZRS      SkuName = "Standard_ZRS"
)

func (*SkuName) UnmarshalJSON

func (s *SkuName) UnmarshalJSON(bytes []byte) error

type SkuTier

type SkuTier string
const (
	SkuTierPremium  SkuTier = "Premium"
	SkuTierStandard SkuTier = "Standard"
)

func (*SkuTier) UnmarshalJSON

func (s *SkuTier) UnmarshalJSON(bytes []byte) error

type SmbSetting

type SmbSetting struct {
	AuthenticationMethods    *string       `json:"authenticationMethods,omitempty"`
	ChannelEncryption        *string       `json:"channelEncryption,omitempty"`
	KerberosTicketEncryption *string       `json:"kerberosTicketEncryption,omitempty"`
	Multichannel             *Multichannel `json:"multichannel,omitempty"`
	Versions                 *string       `json:"versions,omitempty"`
}

Jump to

Keyboard shortcuts

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