armstoragecache

package module
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: MIT Imports: 16 Imported by: 2

README

Azure Storage Caches Module for Go

PkgGoDev

The armstoragecache module provides operations for working with Azure Storage Caches.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Storage Caches module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Storage Caches. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Clients

Azure Storage Caches modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armstoragecache.NewStorageTargetClient(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
client, err := armstoragecache.NewStorageTargetClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Storage Caches label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIOperation

type APIOperation struct {
	// The object that represents the operation.
	Display *APIOperationDisplay `json:"display,omitempty"`

	// The flag that indicates whether the operation applies to data plane.
	IsDataAction *bool `json:"isDataAction,omitempty"`

	// Operation name: {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty"`

	// Origin of the operation.
	Origin *string `json:"origin,omitempty"`

	// Additional details about an operation.
	Properties *APIOperationProperties `json:"properties,omitempty"`
}

APIOperation - REST API operation description: see https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/openapi-authoring-automated-guidelines.md#r3023-operationsapiimplementation

func (APIOperation) MarshalJSON

func (a APIOperation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type APIOperation.

func (*APIOperation) UnmarshalJSON

func (a *APIOperation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type APIOperation.

type APIOperationDisplay

type APIOperationDisplay struct {
	// The description of the operation
	Description *string `json:"description,omitempty"`

	// Operation type: Read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`

	// Service provider: Microsoft.StorageCache
	Provider *string `json:"provider,omitempty"`

	// Resource on which the operation is performed: Cache, etc.
	Resource *string `json:"resource,omitempty"`
}

APIOperationDisplay - The object that represents the operation.

func (APIOperationDisplay) MarshalJSON

func (a APIOperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type APIOperationDisplay.

func (*APIOperationDisplay) UnmarshalJSON

func (a *APIOperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationDisplay.

type APIOperationListResult

type APIOperationListResult struct {
	// URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`

	// List of Resource Provider operations supported by the Microsoft.StorageCache resource provider.
	Value []*APIOperation `json:"value,omitempty"`
}

APIOperationListResult - Result of the request to list Resource Provider operations. It contains a list of operations and a URL link to get the next set of results.

func (APIOperationListResult) MarshalJSON

func (a APIOperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type APIOperationListResult.

func (*APIOperationListResult) UnmarshalJSON

func (a *APIOperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationListResult.

type APIOperationProperties

type APIOperationProperties struct {
	// Specification of the all the metrics provided for a resource type.
	ServiceSpecification *APIOperationPropertiesServiceSpecification `json:"serviceSpecification,omitempty"`
}

APIOperationProperties - Additional details about an operation.

func (APIOperationProperties) MarshalJSON

func (a APIOperationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type APIOperationProperties.

func (*APIOperationProperties) UnmarshalJSON

func (a *APIOperationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationProperties.

type APIOperationPropertiesServiceSpecification

type APIOperationPropertiesServiceSpecification struct {
	// Details about operations related to logs.
	LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty"`

	// Details about operations related to metrics.
	MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"`
}

APIOperationPropertiesServiceSpecification - Specification of the all the metrics provided for a resource type.

func (APIOperationPropertiesServiceSpecification) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type APIOperationPropertiesServiceSpecification.

func (*APIOperationPropertiesServiceSpecification) UnmarshalJSON

func (a *APIOperationPropertiesServiceSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationPropertiesServiceSpecification.

type AscOperation

type AscOperation struct {
	// The end time of the operation.
	EndTime *string `json:"endTime,omitempty"`

	// The error detail of the operation if any.
	Error *ErrorResponse `json:"error,omitempty"`

	// The operation Id.
	ID *string `json:"id,omitempty"`

	// The operation name.
	Name *string `json:"name,omitempty"`

	// Additional operation-specific properties
	Properties *AscOperationProperties `json:"properties,omitempty"`

	// The start time of the operation.
	StartTime *string `json:"startTime,omitempty"`

	// The status of the operation.
	Status *string `json:"status,omitempty"`
}

AscOperation - The status of operation.

func (AscOperation) MarshalJSON

func (a AscOperation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AscOperation.

func (*AscOperation) UnmarshalJSON

func (a *AscOperation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AscOperation.

type AscOperationProperties

type AscOperationProperties struct {
	// Additional operation-specific output.
	Output map[string]interface{} `json:"output,omitempty"`
}

AscOperationProperties - Additional operation-specific output.

func (AscOperationProperties) MarshalJSON

func (a AscOperationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AscOperationProperties.

func (*AscOperationProperties) UnmarshalJSON

func (a *AscOperationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AscOperationProperties.

type AscOperationsClient

type AscOperationsClient struct {
	// contains filtered or unexported fields
}

AscOperationsClient contains the methods for the AscOperations group. Don't use this type directly, use NewAscOperationsClient() instead.

func NewAscOperationsClient

func NewAscOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AscOperationsClient, error)

NewAscOperationsClient creates a new instance of AscOperationsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AscOperationsClient) Get

Get - Gets the status of an asynchronous operation for the Azure HPC Cache If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 location - The name of the region used to look up the operation. operationID - The operation id which uniquely identifies the asynchronous operation. options - AscOperationsClientGetOptions contains the optional parameters for the AscOperationsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/AscOperations_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewAscOperationsClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
	"westus",
	"testoperationid",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

type AscOperationsClientGetOptions

type AscOperationsClientGetOptions struct {
}

AscOperationsClientGetOptions contains the optional parameters for the AscOperationsClient.Get method.

type AscOperationsClientGetResponse

type AscOperationsClientGetResponse struct {
	AscOperation
}

AscOperationsClientGetResponse contains the response from method AscOperationsClient.Get.

type AscUsagesClient

type AscUsagesClient struct {
	// contains filtered or unexported fields
}

AscUsagesClient contains the methods for the AscUsages group. Don't use this type directly, use NewAscUsagesClient() instead.

func NewAscUsagesClient

func NewAscUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AscUsagesClient, error)

NewAscUsagesClient creates a new instance of AscUsagesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AscUsagesClient) NewListPager

NewListPager - Gets the quantity used and quota limit for resources If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 location - The name of the region to query for usage information. options - AscUsagesClientListOptions contains the optional parameters for the AscUsagesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/AscResourceUsages_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewAscUsagesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager("eastus",
	nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type AscUsagesClientListOptions

type AscUsagesClientListOptions struct {
}

AscUsagesClientListOptions contains the optional parameters for the AscUsagesClient.List method.

type AscUsagesClientListResponse

type AscUsagesClientListResponse struct {
	ResourceUsagesListResult
}

AscUsagesClientListResponse contains the response from method AscUsagesClient.List.

type BlobNfsTarget

type BlobNfsTarget struct {
	// Resource ID of the storage container.
	Target *string `json:"target,omitempty"`

	// Identifies the StorageCache usage model to be used for this storage target.
	UsageModel *string `json:"usageModel,omitempty"`
}

BlobNfsTarget - Properties pertaining to the BlobNfsTarget.

func (BlobNfsTarget) MarshalJSON

func (b BlobNfsTarget) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BlobNfsTarget.

func (*BlobNfsTarget) UnmarshalJSON

func (b *BlobNfsTarget) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BlobNfsTarget.

type Cache

type Cache struct {
	// The identity of the cache, if configured.
	Identity *CacheIdentity `json:"identity,omitempty"`

	// Region name string.
	Location *string `json:"location,omitempty"`

	// Properties of the Cache.
	Properties *CacheProperties `json:"properties,omitempty"`

	// SKU for the Cache.
	SKU *CacheSKU `json:"sku,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource ID of the Cache.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Name of Cache.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Type of the Cache; Microsoft.StorageCache/Cache
	Type *string `json:"type,omitempty" azure:"ro"`
}

Cache - A Cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md

func (Cache) MarshalJSON

func (c Cache) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Cache.

func (*Cache) UnmarshalJSON

func (c *Cache) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Cache.

type CacheActiveDirectorySettings

type CacheActiveDirectorySettings struct {
	// REQUIRED; The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server. Length must
	// 1-15 characters from the class [-0-9a-zA-Z].
	CacheNetBiosName *string `json:"cacheNetBiosName,omitempty"`

	// REQUIRED; The fully qualified domain name of the Active Directory domain controller.
	DomainName *string `json:"domainName,omitempty"`

	// REQUIRED; The Active Directory domain's NetBIOS name.
	DomainNetBiosName *string `json:"domainNetBiosName,omitempty"`

	// REQUIRED; Primary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name.
	PrimaryDNSIPAddress *string `json:"primaryDnsIpAddress,omitempty"`

	// Active Directory admin credentials used to join the HPC Cache to a domain.
	Credentials *CacheActiveDirectorySettingsCredentials `json:"credentials,omitempty"`

	// Secondary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name.
	SecondaryDNSIPAddress *string `json:"secondaryDnsIpAddress,omitempty"`

	// READ-ONLY; True if the HPC Cache is joined to the Active Directory domain.
	DomainJoined *DomainJoinedType `json:"domainJoined,omitempty" azure:"ro"`
}

CacheActiveDirectorySettings - Active Directory settings used to join a cache to a domain.

func (CacheActiveDirectorySettings) MarshalJSON

func (c CacheActiveDirectorySettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheActiveDirectorySettings.

func (*CacheActiveDirectorySettings) UnmarshalJSON

func (c *CacheActiveDirectorySettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheActiveDirectorySettings.

type CacheActiveDirectorySettingsCredentials

type CacheActiveDirectorySettingsCredentials struct {
	// REQUIRED; Plain text password of the Active Directory domain administrator. This value is stored encrypted and not returned
	// on response.
	Password *string `json:"password,omitempty"`

	// REQUIRED; Username of the Active Directory domain administrator. This value is stored encrypted and not returned on response.
	Username *string `json:"username,omitempty"`
}

CacheActiveDirectorySettingsCredentials - Active Directory admin credentials used to join the HPC Cache to a domain.

func (CacheActiveDirectorySettingsCredentials) MarshalJSON

func (c CacheActiveDirectorySettingsCredentials) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheActiveDirectorySettingsCredentials.

func (*CacheActiveDirectorySettingsCredentials) UnmarshalJSON

func (c *CacheActiveDirectorySettingsCredentials) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheActiveDirectorySettingsCredentials.

type CacheDirectorySettings

type CacheDirectorySettings struct {
	// Specifies settings for joining the HPC Cache to an Active Directory domain.
	ActiveDirectory *CacheActiveDirectorySettings `json:"activeDirectory,omitempty"`

	// Specifies settings for Extended Groups. Extended Groups allows users to be members of more than 16 groups.
	UsernameDownload *CacheUsernameDownloadSettings `json:"usernameDownload,omitempty"`
}

CacheDirectorySettings - Cache Directory Services settings.

func (CacheDirectorySettings) MarshalJSON

func (c CacheDirectorySettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheDirectorySettings.

func (*CacheDirectorySettings) UnmarshalJSON

func (c *CacheDirectorySettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheDirectorySettings.

type CacheEncryptionSettings

type CacheEncryptionSettings struct {
	// Specifies the location of the key encryption key in Key Vault.
	KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"`

	// Specifies whether the service will automatically rotate to the newest version of the key in the Key Vault.
	RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"`
}

CacheEncryptionSettings - Cache encryption settings.

func (CacheEncryptionSettings) MarshalJSON

func (c CacheEncryptionSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheEncryptionSettings.

func (*CacheEncryptionSettings) UnmarshalJSON

func (c *CacheEncryptionSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheEncryptionSettings.

type CacheHealth

type CacheHealth struct {
	// List of Cache health states.
	State *HealthStateType `json:"state,omitempty"`

	// Describes explanation of state.
	StatusDescription *string `json:"statusDescription,omitempty"`

	// READ-ONLY; Outstanding conditions that need to be investigated and resolved.
	Conditions []*Condition `json:"conditions,omitempty" azure:"ro"`
}

CacheHealth - An indication of Cache health. Gives more information about health than just that related to provisioning.

func (CacheHealth) MarshalJSON

func (c CacheHealth) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheHealth.

func (*CacheHealth) UnmarshalJSON

func (c *CacheHealth) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheHealth.

type CacheIdentity

type CacheIdentity struct {
	// The type of identity used for the cache
	Type *CacheIdentityType `json:"type,omitempty"`

	// A dictionary where each key is a user assigned identity resource ID, and each key's value is an empty dictionary.
	UserAssignedIdentities map[string]*UserAssignedIdentitiesValue `json:"userAssignedIdentities,omitempty"`

	// READ-ONLY; The principal ID for the system-assigned identity of the cache.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant ID associated with the cache.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

CacheIdentity - Cache identity properties.

func (CacheIdentity) MarshalJSON

func (c CacheIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheIdentity.

func (*CacheIdentity) UnmarshalJSON

func (c *CacheIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheIdentity.

type CacheIdentityType

type CacheIdentityType string

CacheIdentityType - The type of identity used for the cache

const (
	CacheIdentityTypeSystemAssigned             CacheIdentityType = "SystemAssigned"
	CacheIdentityTypeUserAssigned               CacheIdentityType = "UserAssigned"
	CacheIdentityTypeSystemAssignedUserAssigned CacheIdentityType = "SystemAssigned, UserAssigned"
	CacheIdentityTypeNone                       CacheIdentityType = "None"
)

func PossibleCacheIdentityTypeValues

func PossibleCacheIdentityTypeValues() []CacheIdentityType

PossibleCacheIdentityTypeValues returns the possible values for the CacheIdentityType const type.

type CacheNetworkSettings

type CacheNetworkSettings struct {
	// DNS search domain
	DNSSearchDomain *string `json:"dnsSearchDomain,omitempty"`

	// DNS servers for the cache to use. It will be set from the network configuration if no value is provided.
	DNSServers []*string `json:"dnsServers,omitempty"`

	// The IPv4 maximum transmission unit configured for the subnet.
	Mtu *int32 `json:"mtu,omitempty"`

	// NTP server IP Address or FQDN for the cache to use. The default is time.windows.com.
	NtpServer *string `json:"ntpServer,omitempty"`

	// READ-ONLY; Array of additional IP addresses used by this Cache.
	UtilityAddresses []*string `json:"utilityAddresses,omitempty" azure:"ro"`
}

CacheNetworkSettings - Cache network settings.

func (CacheNetworkSettings) MarshalJSON

func (c CacheNetworkSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheNetworkSettings.

func (*CacheNetworkSettings) UnmarshalJSON

func (c *CacheNetworkSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheNetworkSettings.

type CacheProperties

type CacheProperties struct {
	// The size of this Cache, in GB.
	CacheSizeGB *int32 `json:"cacheSizeGB,omitempty"`

	// Specifies Directory Services settings of the cache.
	DirectoryServicesSettings *CacheDirectorySettings `json:"directoryServicesSettings,omitempty"`

	// Specifies encryption settings of the cache.
	EncryptionSettings *CacheEncryptionSettings `json:"encryptionSettings,omitempty"`

	// Specifies network settings of the cache.
	NetworkSettings *CacheNetworkSettings `json:"networkSettings,omitempty"`

	// Specifies security settings of the cache.
	SecuritySettings *CacheSecuritySettings `json:"securitySettings,omitempty"`

	// Subnet used for the Cache.
	Subnet *string `json:"subnet,omitempty"`

	// Upgrade settings of the Cache.
	UpgradeSettings *CacheUpgradeSettings `json:"upgradeSettings,omitempty"`

	// Availability zones for resources. This field should only contain a single element in the array.
	Zones []*string `json:"zones,omitempty"`

	// READ-ONLY; Health of the Cache.
	Health *CacheHealth `json:"health,omitempty" azure:"ro"`

	// READ-ONLY; Array of IP addresses that can be used by clients mounting this Cache.
	MountAddresses []*string `json:"mountAddresses,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the priming jobs defined in the cache.
	PrimingJobs []*PrimingJob `json:"primingJobs,omitempty" azure:"ro"`

	// READ-ONLY; ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property
	ProvisioningState *ProvisioningStateType `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Specifies the space allocation percentage for each storage target in the cache.
	SpaceAllocation []*StorageTargetSpaceAllocation `json:"spaceAllocation,omitempty" azure:"ro"`

	// READ-ONLY; Upgrade status of the Cache.
	UpgradeStatus *CacheUpgradeStatus `json:"upgradeStatus,omitempty" azure:"ro"`
}

CacheProperties - Properties of the Cache.

func (CacheProperties) MarshalJSON

func (c CacheProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheProperties.

func (*CacheProperties) UnmarshalJSON

func (c *CacheProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheProperties.

type CacheSKU

type CacheSKU struct {
	// SKU name for this Cache.
	Name *string `json:"name,omitempty"`
}

CacheSKU - SKU for the Cache.

func (CacheSKU) MarshalJSON

func (c CacheSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheSKU.

func (*CacheSKU) UnmarshalJSON

func (c *CacheSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheSKU.

type CacheSecuritySettings

type CacheSecuritySettings struct {
	// NFS access policies defined for this cache.
	AccessPolicies []*NfsAccessPolicy `json:"accessPolicies,omitempty"`
}

CacheSecuritySettings - Cache security settings.

func (CacheSecuritySettings) MarshalJSON

func (c CacheSecuritySettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheSecuritySettings.

func (*CacheSecuritySettings) UnmarshalJSON

func (c *CacheSecuritySettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheSecuritySettings.

type CacheUpgradeSettings

type CacheUpgradeSettings struct {
	// When upgradeScheduleEnabled is true, this field holds the user-chosen upgrade time. At the user-chosen time, the firmware
	// update will automatically be installed on the cache.
	ScheduledTime *time.Time `json:"scheduledTime,omitempty"`

	// True if the user chooses to select an installation time between now and firmwareUpdateDeadline. Else the firmware will
	// automatically be installed after firmwareUpdateDeadline if not triggered earlier
	// via the upgrade operation.
	UpgradeScheduleEnabled *bool `json:"upgradeScheduleEnabled,omitempty"`
}

CacheUpgradeSettings - Cache Upgrade Settings.

func (CacheUpgradeSettings) MarshalJSON

func (c CacheUpgradeSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheUpgradeSettings.

func (*CacheUpgradeSettings) UnmarshalJSON

func (c *CacheUpgradeSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpgradeSettings.

type CacheUpgradeStatus

type CacheUpgradeStatus struct {
	// READ-ONLY; Version string of the firmware currently installed on this Cache.
	CurrentFirmwareVersion *string `json:"currentFirmwareVersion,omitempty" azure:"ro"`

	// READ-ONLY; Time at which the pending firmware update will automatically be installed on the Cache.
	FirmwareUpdateDeadline *time.Time `json:"firmwareUpdateDeadline,omitempty" azure:"ro"`

	// READ-ONLY; True if there is a firmware update ready to install on this Cache. The firmware will automatically be installed
	// after firmwareUpdateDeadline if not triggered earlier via the upgrade operation.
	FirmwareUpdateStatus *FirmwareStatusType `json:"firmwareUpdateStatus,omitempty" azure:"ro"`

	// READ-ONLY; Time of the last successful firmware update.
	LastFirmwareUpdate *time.Time `json:"lastFirmwareUpdate,omitempty" azure:"ro"`

	// READ-ONLY; When firmwareUpdateAvailable is true, this field holds the version string for the update.
	PendingFirmwareVersion *string `json:"pendingFirmwareVersion,omitempty" azure:"ro"`
}

CacheUpgradeStatus - Properties describing the software upgrade state of the Cache.

func (CacheUpgradeStatus) MarshalJSON

func (c CacheUpgradeStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheUpgradeStatus.

func (*CacheUpgradeStatus) UnmarshalJSON

func (c *CacheUpgradeStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpgradeStatus.

type CacheUsernameDownloadSettings

type CacheUsernameDownloadSettings struct {
	// Determines if the certificate should be automatically downloaded. This applies to 'caCertificateURI' only if 'requireValidCertificate'
	// is true.
	AutoDownloadCertificate *bool `json:"autoDownloadCertificate,omitempty"`

	// The URI of the CA certificate to validate the LDAP secure connection. This field must be populated when 'requireValidCertificate'
	// is set to true.
	CaCertificateURI *string `json:"caCertificateURI,omitempty"`

	// When present, these are the credentials for the secure LDAP connection.
	Credentials *CacheUsernameDownloadSettingsCredentials `json:"credentials,omitempty"`

	// Whether or not the LDAP connection should be encrypted.
	EncryptLdapConnection *bool `json:"encryptLdapConnection,omitempty"`

	// Whether or not Extended Groups is enabled.
	ExtendedGroups *bool `json:"extendedGroups,omitempty"`

	// The URI of the file containing group information (in /etc/group file format). This field must be populated when 'usernameSource'
	// is set to 'File'.
	GroupFileURI *string `json:"groupFileURI,omitempty"`

	// The base distinguished name for the LDAP domain.
	LdapBaseDN *string `json:"ldapBaseDN,omitempty"`

	// The fully qualified domain name or IP address of the LDAP server to use.
	LdapServer *string `json:"ldapServer,omitempty"`

	// Determines if the certificates must be validated by a certificate authority. When true, caCertificateURI must be provided.
	RequireValidCertificate *bool `json:"requireValidCertificate,omitempty"`

	// The URI of the file containing user information (in /etc/passwd file format). This field must be populated when 'usernameSource'
	// is set to 'File'.
	UserFileURI *string `json:"userFileURI,omitempty"`

	// This setting determines how the cache gets username and group names for clients.
	UsernameSource *UsernameSource `json:"usernameSource,omitempty"`

	// READ-ONLY; Indicates whether or not the HPC Cache has performed the username download successfully.
	UsernameDownloaded *UsernameDownloadedType `json:"usernameDownloaded,omitempty" azure:"ro"`
}

CacheUsernameDownloadSettings - Settings for Extended Groups username and group download.

func (CacheUsernameDownloadSettings) MarshalJSON

func (c CacheUsernameDownloadSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CacheUsernameDownloadSettings.

func (*CacheUsernameDownloadSettings) UnmarshalJSON

func (c *CacheUsernameDownloadSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheUsernameDownloadSettings.

type CacheUsernameDownloadSettingsCredentials

type CacheUsernameDownloadSettingsCredentials struct {
	// The Bind Distinguished Name identity to be used in the secure LDAP connection. This value is stored encrypted and not returned
	// on response.
	BindDn *string `json:"bindDn,omitempty"`

	// The Bind password to be used in the secure LDAP connection. This value is stored encrypted and not returned on response.
	BindPassword *string `json:"bindPassword,omitempty"`
}

CacheUsernameDownloadSettingsCredentials - When present, these are the credentials for the secure LDAP connection.

func (CacheUsernameDownloadSettingsCredentials) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type CacheUsernameDownloadSettingsCredentials.

func (*CacheUsernameDownloadSettingsCredentials) UnmarshalJSON

func (c *CacheUsernameDownloadSettingsCredentials) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CacheUsernameDownloadSettingsCredentials.

type CachesClient

type CachesClient struct {
	// contains filtered or unexported fields
}

CachesClient contains the methods for the Caches group. Don't use this type directly, use NewCachesClient() instead.

func NewCachesClient

func NewCachesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CachesClient, error)

NewCachesClient creates a new instance of CachesClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*CachesClient) BeginCreateOrUpdate

func (client *CachesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CachesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a Cache. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. cache - Object containing the user-selectable properties of the new Cache. If read-only properties are included, they must match the existing values of those properties. options - CachesClientBeginCreateOrUpdateOptions contains the optional parameters for the CachesClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_CreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx,
	"scgroup",
	"sc1",
	armstoragecache.Cache{
		Identity: &armstoragecache.CacheIdentity{
			Type: to.Ptr(armstoragecache.CacheIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{
				"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {},
			},
		},
		Location: to.Ptr("westus"),
		Properties: &armstoragecache.CacheProperties{
			CacheSizeGB: to.Ptr[int32](3072),
			DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{
				ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{
					CacheNetBiosName: to.Ptr("contosoSmb"),
					Credentials: &armstoragecache.CacheActiveDirectorySettingsCredentials{
						Password: to.Ptr("<password>"),
						Username: to.Ptr("consotoAdmin"),
					},
					DomainName:            to.Ptr("contosoAd.contoso.local"),
					DomainNetBiosName:     to.Ptr("contosoAd"),
					PrimaryDNSIPAddress:   to.Ptr("192.0.2.10"),
					SecondaryDNSIPAddress: to.Ptr("192.0.2.11"),
				},
				UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{
					Credentials: &armstoragecache.CacheUsernameDownloadSettingsCredentials{
						BindDn:       to.Ptr("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local"),
						BindPassword: to.Ptr("<bindPassword>"),
					},
					ExtendedGroups: to.Ptr(true),
					LdapBaseDN:     to.Ptr("dc=contosoad,dc=contoso,dc=local"),
					LdapServer:     to.Ptr("192.0.2.12"),
					UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP),
				},
			},
			EncryptionSettings: &armstoragecache.CacheEncryptionSettings{
				KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{
					KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2047/test"),
					SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{
						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"),
					},
				},
			},
			SecuritySettings: &armstoragecache.CacheSecuritySettings{
				AccessPolicies: []*armstoragecache.NfsAccessPolicy{
					{
						Name: to.Ptr("default"),
						AccessRules: []*armstoragecache.NfsAccessRule{
							{
								Access:         to.Ptr(armstoragecache.NfsAccessRuleAccessRw),
								RootSquash:     to.Ptr(false),
								Scope:          to.Ptr(armstoragecache.NfsAccessRuleScopeDefault),
								SubmountAccess: to.Ptr(true),
								Suid:           to.Ptr(false),
							}},
					}},
			},
			Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"),
			UpgradeSettings: &armstoragecache.CacheUpgradeSettings{
				ScheduledTime:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t }()),
				UpgradeScheduleEnabled: to.Ptr(true),
			},
		},
		SKU: &armstoragecache.CacheSKU{
			Name: to.Ptr("Standard_2G"),
		},
		Tags: map[string]*string{
			"Dept": to.Ptr("Contoso"),
		},
	},
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*CachesClient) BeginDebugInfo

func (client *CachesClient) BeginDebugInfo(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDebugInfoOptions) (*runtime.Poller[CachesClientDebugInfoResponse], error)

BeginDebugInfo - Tells a Cache to write generate debug info for support to process. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientBeginDebugInfoOptions contains the optional parameters for the CachesClient.BeginDebugInfo method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_DebugInfo.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginDebugInfo(ctx,
	"scgroup",
	"sc",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CachesClient) BeginDelete

func (client *CachesClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDeleteOptions) (*runtime.Poller[CachesClientDeleteResponse], error)

BeginDelete - Schedules a Cache for deletion. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientBeginDeleteOptions contains the optional parameters for the CachesClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginDelete(ctx,
	"scgroup",
	"sc",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CachesClient) BeginFlush

func (client *CachesClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginFlushOptions) (*runtime.Poller[CachesClientFlushResponse], error)

BeginFlush - Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors returned until the flush is complete. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientBeginFlushOptions contains the optional parameters for the CachesClient.BeginFlush method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Flush.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginFlush(ctx,
	"scgroup",
	"sc",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CachesClient) BeginPausePrimingJob

func (client *CachesClient) BeginPausePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginPausePrimingJobOptions) (*runtime.Poller[CachesClientPausePrimingJobResponse], error)

BeginPausePrimingJob - Schedule a priming job to be paused. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientBeginPausePrimingJobOptions contains the optional parameters for the CachesClient.BeginPausePrimingJob method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/PausePrimingJob.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginPausePrimingJob(ctx,
	"scgroup",
	"sc1",
	&armstoragecache.CachesClientBeginPausePrimingJobOptions{PrimingJobID: &armstoragecache.PrimingJobIDParameter{
		PrimingJobID: to.Ptr("00000000000_0000000000"),
	},
	})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CachesClient) BeginResumePrimingJob

func (client *CachesClient) BeginResumePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginResumePrimingJobOptions) (*runtime.Poller[CachesClientResumePrimingJobResponse], error)

BeginResumePrimingJob - Resumes a paused priming job. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientBeginResumePrimingJobOptions contains the optional parameters for the CachesClient.BeginResumePrimingJob method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/ResumePrimingJob.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginResumePrimingJob(ctx,
	"scgroup",
	"sc1",
	&armstoragecache.CachesClientBeginResumePrimingJobOptions{PrimingJobID: &armstoragecache.PrimingJobIDParameter{
		PrimingJobID: to.Ptr("00000000000_0000000000"),
	},
	})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CachesClient) BeginSpaceAllocation

func (client *CachesClient) BeginSpaceAllocation(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginSpaceAllocationOptions) (*runtime.Poller[CachesClientSpaceAllocationResponse], error)

BeginSpaceAllocation - Update cache space allocation. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientBeginSpaceAllocationOptions contains the optional parameters for the CachesClient.BeginSpaceAllocation method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/SpaceAllocation_Post.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginSpaceAllocation(ctx,
	"scgroup",
	"sc1",
	&armstoragecache.CachesClientBeginSpaceAllocationOptions{SpaceAllocation: []*armstoragecache.StorageTargetSpaceAllocation{
		{
			Name:                 to.Ptr("st1"),
			AllocationPercentage: to.Ptr[int32](25),
		},
		{
			Name:                 to.Ptr("st2"),
			AllocationPercentage: to.Ptr[int32](50),
		},
		{
			Name:                 to.Ptr("st3"),
			AllocationPercentage: to.Ptr[int32](25),
		}},
	})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CachesClient) BeginStart

func (client *CachesClient) BeginStart(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartOptions) (*runtime.Poller[CachesClientStartResponse], error)

BeginStart - Tells a Stopped state Cache to transition to Active state. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientBeginStartOptions contains the optional parameters for the CachesClient.BeginStart method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Start.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginStart(ctx,
	"scgroup",
	"sc",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CachesClient) BeginStartPrimingJob

func (client *CachesClient) BeginStartPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartPrimingJobOptions) (*runtime.Poller[CachesClientStartPrimingJobResponse], error)

BeginStartPrimingJob - Create a priming job. This operation is only allowed when the cache is healthy. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientBeginStartPrimingJobOptions contains the optional parameters for the CachesClient.BeginStartPrimingJob method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StartPrimingJob.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginStartPrimingJob(ctx,
	"scgroup",
	"sc1",
	&armstoragecache.CachesClientBeginStartPrimingJobOptions{Primingjob: &armstoragecache.PrimingJob{
		PrimingJobName:     to.Ptr("contosoJob"),
		PrimingManifestURL: to.Ptr("https://contosostorage.blob.core.windows.net/contosoblob/00000000_00000000000000000000000000000000.00000000000.FFFFFFFF.00000000?sp=r&st=2021-08-11T19:33:35Z&se=2021-08-12T03:33:35Z&spr=https&sv=2020-08-04&sr=b&sig=<secret-value-from-key>"),
	},
	})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CachesClient) BeginStop

func (client *CachesClient) BeginStop(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopOptions) (*runtime.Poller[CachesClientStopResponse], error)

BeginStop - Tells an Active Cache to transition to Stopped state. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientBeginStopOptions contains the optional parameters for the CachesClient.BeginStop method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Stop.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginStop(ctx,
	"scgroup",
	"sc",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CachesClient) BeginStopPrimingJob

func (client *CachesClient) BeginStopPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopPrimingJobOptions) (*runtime.Poller[CachesClientStopPrimingJobResponse], error)

BeginStopPrimingJob - Schedule a priming job for deletion. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientBeginStopPrimingJobOptions contains the optional parameters for the CachesClient.BeginStopPrimingJob method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StopPrimingJob.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginStopPrimingJob(ctx,
	"scgroup",
	"sc1",
	&armstoragecache.CachesClientBeginStopPrimingJobOptions{PrimingJobID: &armstoragecache.PrimingJobIDParameter{
		PrimingJobID: to.Ptr("00000000000_0000000000"),
	},
	})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CachesClient) BeginUpgradeFirmware

func (client *CachesClient) BeginUpgradeFirmware(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginUpgradeFirmwareOptions) (*runtime.Poller[CachesClientUpgradeFirmwareResponse], error)

BeginUpgradeFirmware - Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientBeginUpgradeFirmwareOptions contains the optional parameters for the CachesClient.BeginUpgradeFirmware method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_UpgradeFirmware.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginUpgradeFirmware(ctx,
	"scgroup",
	"sc1",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CachesClient) Get

func (client *CachesClient) Get(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientGetOptions) (CachesClientGetResponse, error)

Get - Returns a Cache. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - CachesClientGetOptions contains the optional parameters for the CachesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
	"scgroup",
	"sc1",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*CachesClient) NewListByResourceGroupPager

func (client *CachesClient) NewListByResourceGroupPager(resourceGroupName string, options *CachesClientListByResourceGroupOptions) *runtime.Pager[CachesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Returns all Caches the user has access to under a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. options - CachesClientListByResourceGroupOptions contains the optional parameters for the CachesClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_ListByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListByResourceGroupPager("scgroup",
	nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*CachesClient) NewListPager

NewListPager - Returns all Caches the user has access to under a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 options - CachesClientListOptions contains the optional parameters for the CachesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager(nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

func (*CachesClient) Update

func (client *CachesClient) Update(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientUpdateOptions) (CachesClientUpdateResponse, error)

Update - Update a Cache instance. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. cache - Object containing the user-selectable properties of the Cache. If read-only properties are included, they must match the existing values of those properties. options - CachesClientUpdateOptions contains the optional parameters for the CachesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewCachesClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Update(ctx,
	"scgroup",
	"sc1",
	armstoragecache.Cache{
		Location: to.Ptr("westus"),
		Properties: &armstoragecache.CacheProperties{
			CacheSizeGB: to.Ptr[int32](3072),
			DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{
				ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{
					CacheNetBiosName:      to.Ptr("contosoSmb"),
					DomainName:            to.Ptr("contosoAd.contoso.local"),
					DomainNetBiosName:     to.Ptr("contosoAd"),
					PrimaryDNSIPAddress:   to.Ptr("192.0.2.10"),
					SecondaryDNSIPAddress: to.Ptr("192.0.2.11"),
				},
				UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{
					ExtendedGroups: to.Ptr(true),
					UsernameSource: to.Ptr(armstoragecache.UsernameSourceAD),
				},
			},
			NetworkSettings: &armstoragecache.CacheNetworkSettings{
				DNSSearchDomain: to.Ptr("contoso.com"),
				DNSServers: []*string{
					to.Ptr("10.1.22.33"),
					to.Ptr("10.1.12.33")},
				Mtu:       to.Ptr[int32](1500),
				NtpServer: to.Ptr("time.contoso.com"),
			},
			SecuritySettings: &armstoragecache.CacheSecuritySettings{
				AccessPolicies: []*armstoragecache.NfsAccessPolicy{
					{
						Name: to.Ptr("default"),
						AccessRules: []*armstoragecache.NfsAccessRule{
							{
								Access:         to.Ptr(armstoragecache.NfsAccessRuleAccessRw),
								RootSquash:     to.Ptr(false),
								Scope:          to.Ptr(armstoragecache.NfsAccessRuleScopeDefault),
								SubmountAccess: to.Ptr(true),
								Suid:           to.Ptr(false),
							}},
					},
					{
						Name: to.Ptr("restrictive"),
						AccessRules: []*armstoragecache.NfsAccessRule{
							{
								Access:         to.Ptr(armstoragecache.NfsAccessRuleAccessRw),
								Filter:         to.Ptr("10.99.3.145"),
								RootSquash:     to.Ptr(false),
								Scope:          to.Ptr(armstoragecache.NfsAccessRuleScopeHost),
								SubmountAccess: to.Ptr(true),
								Suid:           to.Ptr(true),
							},
							{
								Access:         to.Ptr(armstoragecache.NfsAccessRuleAccessRw),
								Filter:         to.Ptr("10.99.1.0/24"),
								RootSquash:     to.Ptr(false),
								Scope:          to.Ptr(armstoragecache.NfsAccessRuleScopeNetwork),
								SubmountAccess: to.Ptr(true),
								Suid:           to.Ptr(true),
							},
							{
								Access:         to.Ptr(armstoragecache.NfsAccessRuleAccessNo),
								AnonymousGID:   to.Ptr("65534"),
								AnonymousUID:   to.Ptr("65534"),
								RootSquash:     to.Ptr(true),
								Scope:          to.Ptr(armstoragecache.NfsAccessRuleScopeDefault),
								SubmountAccess: to.Ptr(true),
								Suid:           to.Ptr(false),
							}},
					}},
			},
			Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"),
			UpgradeSettings: &armstoragecache.CacheUpgradeSettings{
				ScheduledTime:          to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t }()),
				UpgradeScheduleEnabled: to.Ptr(true),
			},
		},
		SKU: &armstoragecache.CacheSKU{
			Name: to.Ptr("Standard_2G"),
		},
		Tags: map[string]*string{
			"Dept": to.Ptr("Contoso"),
		},
	},
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

type CachesClientBeginCreateOrUpdateOptions

type CachesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CachesClientBeginCreateOrUpdateOptions contains the optional parameters for the CachesClient.BeginCreateOrUpdate method.

type CachesClientBeginDebugInfoOptions

type CachesClientBeginDebugInfoOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CachesClientBeginDebugInfoOptions contains the optional parameters for the CachesClient.BeginDebugInfo method.

type CachesClientBeginDeleteOptions

type CachesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CachesClientBeginDeleteOptions contains the optional parameters for the CachesClient.BeginDelete method.

type CachesClientBeginFlushOptions

type CachesClientBeginFlushOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CachesClientBeginFlushOptions contains the optional parameters for the CachesClient.BeginFlush method.

type CachesClientBeginPausePrimingJobOptions

type CachesClientBeginPausePrimingJobOptions struct {
	// Object containing the priming job ID.
	PrimingJobID *PrimingJobIDParameter
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CachesClientBeginPausePrimingJobOptions contains the optional parameters for the CachesClient.BeginPausePrimingJob method.

type CachesClientBeginResumePrimingJobOptions

type CachesClientBeginResumePrimingJobOptions struct {
	// Object containing the priming job ID.
	PrimingJobID *PrimingJobIDParameter
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CachesClientBeginResumePrimingJobOptions contains the optional parameters for the CachesClient.BeginResumePrimingJob method.

type CachesClientBeginSpaceAllocationOptions

type CachesClientBeginSpaceAllocationOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// List containing storage target cache space percentage allocations.
	SpaceAllocation []*StorageTargetSpaceAllocation
}

CachesClientBeginSpaceAllocationOptions contains the optional parameters for the CachesClient.BeginSpaceAllocation method.

type CachesClientBeginStartOptions

type CachesClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CachesClientBeginStartOptions contains the optional parameters for the CachesClient.BeginStart method.

type CachesClientBeginStartPrimingJobOptions

type CachesClientBeginStartPrimingJobOptions struct {
	// Object containing the definition of a priming job.
	Primingjob *PrimingJob
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CachesClientBeginStartPrimingJobOptions contains the optional parameters for the CachesClient.BeginStartPrimingJob method.

type CachesClientBeginStopOptions

type CachesClientBeginStopOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CachesClientBeginStopOptions contains the optional parameters for the CachesClient.BeginStop method.

type CachesClientBeginStopPrimingJobOptions

type CachesClientBeginStopPrimingJobOptions struct {
	// Object containing the priming job ID.
	PrimingJobID *PrimingJobIDParameter
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CachesClientBeginStopPrimingJobOptions contains the optional parameters for the CachesClient.BeginStopPrimingJob method.

type CachesClientBeginUpgradeFirmwareOptions

type CachesClientBeginUpgradeFirmwareOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

CachesClientBeginUpgradeFirmwareOptions contains the optional parameters for the CachesClient.BeginUpgradeFirmware method.

type CachesClientCreateOrUpdateResponse

type CachesClientCreateOrUpdateResponse struct {
	Cache
}

CachesClientCreateOrUpdateResponse contains the response from method CachesClient.CreateOrUpdate.

type CachesClientDebugInfoResponse

type CachesClientDebugInfoResponse struct {
}

CachesClientDebugInfoResponse contains the response from method CachesClient.DebugInfo.

type CachesClientDeleteResponse

type CachesClientDeleteResponse struct {
}

CachesClientDeleteResponse contains the response from method CachesClient.Delete.

type CachesClientFlushResponse

type CachesClientFlushResponse struct {
}

CachesClientFlushResponse contains the response from method CachesClient.Flush.

type CachesClientGetOptions

type CachesClientGetOptions struct {
}

CachesClientGetOptions contains the optional parameters for the CachesClient.Get method.

type CachesClientGetResponse

type CachesClientGetResponse struct {
	Cache
}

CachesClientGetResponse contains the response from method CachesClient.Get.

type CachesClientListByResourceGroupOptions

type CachesClientListByResourceGroupOptions struct {
}

CachesClientListByResourceGroupOptions contains the optional parameters for the CachesClient.ListByResourceGroup method.

type CachesClientListByResourceGroupResponse

type CachesClientListByResourceGroupResponse struct {
	CachesListResult
}

CachesClientListByResourceGroupResponse contains the response from method CachesClient.ListByResourceGroup.

type CachesClientListOptions

type CachesClientListOptions struct {
}

CachesClientListOptions contains the optional parameters for the CachesClient.List method.

type CachesClientListResponse

type CachesClientListResponse struct {
	CachesListResult
}

CachesClientListResponse contains the response from method CachesClient.List.

type CachesClientPausePrimingJobResponse

type CachesClientPausePrimingJobResponse struct {
}

CachesClientPausePrimingJobResponse contains the response from method CachesClient.PausePrimingJob.

type CachesClientResumePrimingJobResponse

type CachesClientResumePrimingJobResponse struct {
}

CachesClientResumePrimingJobResponse contains the response from method CachesClient.ResumePrimingJob.

type CachesClientSpaceAllocationResponse

type CachesClientSpaceAllocationResponse struct {
}

CachesClientSpaceAllocationResponse contains the response from method CachesClient.SpaceAllocation.

type CachesClientStartPrimingJobResponse

type CachesClientStartPrimingJobResponse struct {
}

CachesClientStartPrimingJobResponse contains the response from method CachesClient.StartPrimingJob.

type CachesClientStartResponse

type CachesClientStartResponse struct {
}

CachesClientStartResponse contains the response from method CachesClient.Start.

type CachesClientStopPrimingJobResponse

type CachesClientStopPrimingJobResponse struct {
}

CachesClientStopPrimingJobResponse contains the response from method CachesClient.StopPrimingJob.

type CachesClientStopResponse

type CachesClientStopResponse struct {
}

CachesClientStopResponse contains the response from method CachesClient.Stop.

type CachesClientUpdateOptions

type CachesClientUpdateOptions struct {
}

CachesClientUpdateOptions contains the optional parameters for the CachesClient.Update method.

type CachesClientUpdateResponse

type CachesClientUpdateResponse struct {
	Cache
}

CachesClientUpdateResponse contains the response from method CachesClient.Update.

type CachesClientUpgradeFirmwareResponse

type CachesClientUpgradeFirmwareResponse struct {
}

CachesClientUpgradeFirmwareResponse contains the response from method CachesClient.UpgradeFirmware.

type CachesListResult

type CachesListResult struct {
	// URL to get the next set of Cache list results, if there are any.
	NextLink *string `json:"nextLink,omitempty"`

	// List of Caches.
	Value []*Cache `json:"value,omitempty"`
}

CachesListResult - Result of the request to list Caches. It contains a list of Caches and a URL link to get the next set of results.

func (CachesListResult) MarshalJSON

func (c CachesListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CachesListResult.

func (*CachesListResult) UnmarshalJSON

func (c *CachesListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CachesListResult.

type ClfsTarget

type ClfsTarget struct {
	// Resource ID of storage container.
	Target *string `json:"target,omitempty"`
}

ClfsTarget - Properties pertaining to the ClfsTarget

func (ClfsTarget) MarshalJSON

func (c ClfsTarget) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClfsTarget.

func (*ClfsTarget) UnmarshalJSON

func (c *ClfsTarget) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClfsTarget.

type CloudError

type CloudError struct {
	// The body of the error.
	Error *CloudErrorBody `json:"error,omitempty"`
}

CloudError - An error response.

func (CloudError) MarshalJSON

func (c CloudError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudError.

func (*CloudError) UnmarshalJSON

func (c *CloudError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudError.

type CloudErrorBody

type CloudErrorBody struct {
	// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code *string `json:"code,omitempty"`

	// A list of additional details about the error.
	Details []*CloudErrorBody `json:"details,omitempty"`

	// A message describing the error, intended to be suitable for display in a user interface.
	Message *string `json:"message,omitempty"`

	// The target of the particular error. For example, the name of the property in error.
	Target *string `json:"target,omitempty"`
}

CloudErrorBody - An error response.

func (CloudErrorBody) MarshalJSON

func (c CloudErrorBody) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudErrorBody.

func (*CloudErrorBody) UnmarshalJSON

func (c *CloudErrorBody) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudErrorBody.

type Condition

type Condition struct {
	// READ-ONLY; The issue requiring attention.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; The time when the condition was raised.
	Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"`
}

Condition - Outstanding conditions that will need to be resolved.

func (Condition) MarshalJSON

func (c Condition) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Condition.

func (*Condition) UnmarshalJSON

func (c *Condition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Condition.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DomainJoinedType

type DomainJoinedType string

DomainJoinedType - True if the HPC Cache is joined to the Active Directory domain.

const (
	DomainJoinedTypeError DomainJoinedType = "Error"
	DomainJoinedTypeNo    DomainJoinedType = "No"
	DomainJoinedTypeYes   DomainJoinedType = "Yes"
)

func PossibleDomainJoinedTypeValues

func PossibleDomainJoinedTypeValues() []DomainJoinedType

PossibleDomainJoinedTypeValues returns the possible values for the DomainJoinedType const type.

type ErrorResponse

type ErrorResponse struct {
	// Error code
	Code *string `json:"code,omitempty"`

	// Error message indicating why the operation failed.
	Message *string `json:"message,omitempty"`
}

ErrorResponse - Describes the format of Error response.

func (ErrorResponse) MarshalJSON

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type FirmwareStatusType

type FirmwareStatusType string

FirmwareStatusType - True if there is a firmware update ready to install on this Cache. The firmware will automatically be installed after firmwareUpdateDeadline if not triggered earlier via the upgrade operation.

const (
	FirmwareStatusTypeAvailable   FirmwareStatusType = "available"
	FirmwareStatusTypeUnavailable FirmwareStatusType = "unavailable"
)

func PossibleFirmwareStatusTypeValues

func PossibleFirmwareStatusTypeValues() []FirmwareStatusType

PossibleFirmwareStatusTypeValues returns the possible values for the FirmwareStatusType const type.

type HealthStateType

type HealthStateType string

HealthStateType - List of Cache health states.

const (
	HealthStateTypeDegraded      HealthStateType = "Degraded"
	HealthStateTypeDown          HealthStateType = "Down"
	HealthStateTypeFlushing      HealthStateType = "Flushing"
	HealthStateTypeHealthy       HealthStateType = "Healthy"
	HealthStateTypeStartFailed   HealthStateType = "StartFailed"
	HealthStateTypeStopped       HealthStateType = "Stopped"
	HealthStateTypeStopping      HealthStateType = "Stopping"
	HealthStateTypeTransitioning HealthStateType = "Transitioning"
	HealthStateTypeUnknown       HealthStateType = "Unknown"
	HealthStateTypeUpgradeFailed HealthStateType = "UpgradeFailed"
	HealthStateTypeUpgrading     HealthStateType = "Upgrading"
	HealthStateTypeWaitingForKey HealthStateType = "WaitingForKey"
)

func PossibleHealthStateTypeValues

func PossibleHealthStateTypeValues() []HealthStateType

PossibleHealthStateTypeValues returns the possible values for the HealthStateType const type.

type KeyVaultKeyReference

type KeyVaultKeyReference struct {
	// REQUIRED; The URL referencing a key encryption key in Key Vault.
	KeyURL *string `json:"keyUrl,omitempty"`

	// REQUIRED; Describes a resource Id to source Key Vault.
	SourceVault *KeyVaultKeyReferenceSourceVault `json:"sourceVault,omitempty"`
}

KeyVaultKeyReference - Describes a reference to Key Vault Key.

func (KeyVaultKeyReference) MarshalJSON

func (k KeyVaultKeyReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultKeyReference.

func (*KeyVaultKeyReference) UnmarshalJSON

func (k *KeyVaultKeyReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultKeyReference.

type KeyVaultKeyReferenceSourceVault

type KeyVaultKeyReferenceSourceVault struct {
	// Resource Id.
	ID *string `json:"id,omitempty"`
}

KeyVaultKeyReferenceSourceVault - Describes a resource Id to source Key Vault.

func (KeyVaultKeyReferenceSourceVault) MarshalJSON

func (k KeyVaultKeyReferenceSourceVault) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultKeyReferenceSourceVault.

func (*KeyVaultKeyReferenceSourceVault) UnmarshalJSON

func (k *KeyVaultKeyReferenceSourceVault) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultKeyReferenceSourceVault.

type LogSpecification

type LogSpecification struct {
	// Localized display name of the log.
	DisplayName *string `json:"displayName,omitempty"`

	// The name of the log.
	Name *string `json:"name,omitempty"`
}

LogSpecification - Details about operation related to logs.

func (LogSpecification) MarshalJSON

func (l LogSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LogSpecification.

func (*LogSpecification) UnmarshalJSON

func (l *LogSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification.

type MetricAggregationType

type MetricAggregationType string
const (
	MetricAggregationTypeAverage      MetricAggregationType = "Average"
	MetricAggregationTypeCount        MetricAggregationType = "Count"
	MetricAggregationTypeMaximum      MetricAggregationType = "Maximum"
	MetricAggregationTypeMinimum      MetricAggregationType = "Minimum"
	MetricAggregationTypeNone         MetricAggregationType = "None"
	MetricAggregationTypeNotSpecified MetricAggregationType = "NotSpecified"
	MetricAggregationTypeTotal        MetricAggregationType = "Total"
)

func PossibleMetricAggregationTypeValues

func PossibleMetricAggregationTypeValues() []MetricAggregationType

PossibleMetricAggregationTypeValues returns the possible values for the MetricAggregationType const type.

type MetricDimension

type MetricDimension struct {
	// Localized friendly display name of the dimension
	DisplayName *string `json:"displayName,omitempty"`

	// Internal name of the dimension.
	InternalName *string `json:"internalName,omitempty"`

	// Name of the dimension
	Name *string `json:"name,omitempty"`

	// To be exported to shoe box.
	ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"`
}

MetricDimension - Specifications of the Dimension of metrics.

func (MetricDimension) MarshalJSON

func (m MetricDimension) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricDimension.

func (*MetricDimension) UnmarshalJSON

func (m *MetricDimension) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricDimension.

type MetricSpecification

type MetricSpecification struct {
	// The type of metric aggregation.
	AggregationType *string `json:"aggregationType,omitempty"`

	// Dimensions of the metric
	Dimensions []*MetricDimension `json:"dimensions,omitempty"`

	// The description of the metric.
	DisplayDescription *string `json:"displayDescription,omitempty"`

	// Localized display name of the metric.
	DisplayName *string `json:"displayName,omitempty"`

	// Type of metrics.
	MetricClass *string `json:"metricClass,omitempty"`

	// The name of the metric.
	Name *string `json:"name,omitempty"`

	// Support metric aggregation type.
	SupportedAggregationTypes []*MetricAggregationType `json:"supportedAggregationTypes,omitempty"`

	// The unit that the metric is measured in.
	Unit *string `json:"unit,omitempty"`
}

MetricSpecification - Details about operation related to metrics.

func (MetricSpecification) MarshalJSON

func (m MetricSpecification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricSpecification.

func (*MetricSpecification) UnmarshalJSON

func (m *MetricSpecification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification.

type NamespaceJunction

type NamespaceJunction struct {
	// Namespace path on a Cache for a Storage Target.
	NamespacePath *string `json:"namespacePath,omitempty"`

	// Name of the access policy applied to this junction.
	NfsAccessPolicy *string `json:"nfsAccessPolicy,omitempty"`

	// NFS export where targetPath exists.
	NfsExport *string `json:"nfsExport,omitempty"`

	// Path in Storage Target to which namespacePath points.
	TargetPath *string `json:"targetPath,omitempty"`
}

NamespaceJunction - A namespace junction.

func (NamespaceJunction) MarshalJSON

func (n NamespaceJunction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NamespaceJunction.

func (*NamespaceJunction) UnmarshalJSON

func (n *NamespaceJunction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceJunction.

type Nfs3Target

type Nfs3Target struct {
	// IP address or host name of an NFSv3 host (e.g., 10.0.44.44).
	Target *string `json:"target,omitempty"`

	// Identifies the StorageCache usage model to be used for this storage target.
	UsageModel *string `json:"usageModel,omitempty"`
}

Nfs3Target - Properties pertaining to the Nfs3Target

func (Nfs3Target) MarshalJSON

func (n Nfs3Target) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Nfs3Target.

func (*Nfs3Target) UnmarshalJSON

func (n *Nfs3Target) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Nfs3Target.

type NfsAccessPolicy

type NfsAccessPolicy struct {
	// REQUIRED; The set of rules describing client accesses allowed under this policy.
	AccessRules []*NfsAccessRule `json:"accessRules,omitempty"`

	// REQUIRED; Name identifying this policy. Access Policy names are not case sensitive.
	Name *string `json:"name,omitempty"`
}

NfsAccessPolicy - A set of rules describing access policies applied to NFSv3 clients of the cache.

func (NfsAccessPolicy) MarshalJSON

func (n NfsAccessPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NfsAccessPolicy.

func (*NfsAccessPolicy) UnmarshalJSON

func (n *NfsAccessPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NfsAccessPolicy.

type NfsAccessRule

type NfsAccessRule struct {
	// REQUIRED; Access allowed by this rule.
	Access *NfsAccessRuleAccess `json:"access,omitempty"`

	// REQUIRED; Scope for this rule. The scope and filter determine which clients match the rule.
	Scope *NfsAccessRuleScope `json:"scope,omitempty"`

	// GID value that replaces 0 when rootSquash is true. This will use the value of anonymousUID if not provided.
	AnonymousGID *string `json:"anonymousGID,omitempty"`

	// UID value that replaces 0 when rootSquash is true. 65534 will be used if not provided.
	AnonymousUID *string `json:"anonymousUID,omitempty"`

	// Filter applied to the scope for this rule. The filter's format depends on its scope. 'default' scope matches all clients
	// and has no filter value. 'network' scope takes a filter in CIDR format (for
	// example, 10.99.1.0/24). 'host' takes an IP address or fully qualified domain name as filter. If a client does not match
	// any filter rule and there is no default rule, access is denied.
	Filter *string `json:"filter,omitempty"`

	// Map root accesses to anonymousUID and anonymousGID.
	RootSquash *bool `json:"rootSquash,omitempty"`

	// For the default policy, allow access to subdirectories under the root export. If this is set to no, clients can only mount
	// the path '/'. If set to yes, clients can mount a deeper path, like '/a/b'.
	SubmountAccess *bool `json:"submountAccess,omitempty"`

	// Allow SUID semantics.
	Suid *bool `json:"suid,omitempty"`
}

NfsAccessRule - Rule to place restrictions on portions of the cache namespace being presented to clients.

func (NfsAccessRule) MarshalJSON

func (n NfsAccessRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NfsAccessRule.

func (*NfsAccessRule) UnmarshalJSON

func (n *NfsAccessRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NfsAccessRule.

type NfsAccessRuleAccess

type NfsAccessRuleAccess string

NfsAccessRuleAccess - Access allowed by this rule.

const (
	NfsAccessRuleAccessNo NfsAccessRuleAccess = "no"
	NfsAccessRuleAccessRo NfsAccessRuleAccess = "ro"
	NfsAccessRuleAccessRw NfsAccessRuleAccess = "rw"
)

func PossibleNfsAccessRuleAccessValues

func PossibleNfsAccessRuleAccessValues() []NfsAccessRuleAccess

PossibleNfsAccessRuleAccessValues returns the possible values for the NfsAccessRuleAccess const type.

type NfsAccessRuleScope

type NfsAccessRuleScope string

NfsAccessRuleScope - Scope for this rule. The scope and filter determine which clients match the rule.

const (
	NfsAccessRuleScopeDefault NfsAccessRuleScope = "default"
	NfsAccessRuleScopeHost    NfsAccessRuleScope = "host"
	NfsAccessRuleScopeNetwork NfsAccessRuleScope = "network"
)

func PossibleNfsAccessRuleScopeValues

func PossibleNfsAccessRuleScopeValues() []NfsAccessRuleScope

PossibleNfsAccessRuleScopeValues returns the possible values for the NfsAccessRuleScope const type.

type OperationalStateType

type OperationalStateType string

OperationalStateType - Storage target operational state.

const (
	OperationalStateTypeBusy      OperationalStateType = "Busy"
	OperationalStateTypeFlushing  OperationalStateType = "Flushing"
	OperationalStateTypeReady     OperationalStateType = "Ready"
	OperationalStateTypeSuspended OperationalStateType = "Suspended"
)

func PossibleOperationalStateTypeValues

func PossibleOperationalStateTypeValues() []OperationalStateType

PossibleOperationalStateTypeValues returns the possible values for the OperationalStateType const type.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*OperationsClient) NewListPager

NewListPager - Lists all of the available Resource Provider operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Operations_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewOperationsClient(cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager(nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	APIOperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type PrimingJob

type PrimingJob struct {
	// REQUIRED; The priming job name.
	PrimingJobName *string `json:"primingJobName,omitempty"`

	// REQUIRED; The URL for the priming manifest file to download. This file must be readable from the HPC Cache. When the file
	// is in Azure blob storage the URL should include a Shared Access Signature (SAS) granting
	// read permissions on the blob.
	PrimingManifestURL *string `json:"primingManifestUrl,omitempty"`

	// READ-ONLY; The job details or error information if any.
	PrimingJobDetails *string `json:"primingJobDetails,omitempty" azure:"ro"`

	// READ-ONLY; The unique identifier of the priming job.
	PrimingJobID *string `json:"primingJobId,omitempty" azure:"ro"`

	// READ-ONLY; The current progress of the priming job, as a percentage.
	PrimingJobPercentComplete *float64 `json:"primingJobPercentComplete,omitempty" azure:"ro"`

	// READ-ONLY; The state of the priming operation.
	PrimingJobState *PrimingJobState `json:"primingJobState,omitempty" azure:"ro"`

	// READ-ONLY; The status code of the priming job.
	PrimingJobStatus *string `json:"primingJobStatus,omitempty" azure:"ro"`
}

PrimingJob - A priming job instance.

func (PrimingJob) MarshalJSON

func (p PrimingJob) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrimingJob.

func (*PrimingJob) UnmarshalJSON

func (p *PrimingJob) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrimingJob.

type PrimingJobIDParameter

type PrimingJobIDParameter struct {
	// REQUIRED; The unique identifier of the priming job.
	PrimingJobID *string `json:"primingJobId,omitempty"`
}

PrimingJobIDParameter - Object containing the priming job ID.

func (PrimingJobIDParameter) MarshalJSON

func (p PrimingJobIDParameter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrimingJobIDParameter.

func (*PrimingJobIDParameter) UnmarshalJSON

func (p *PrimingJobIDParameter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrimingJobIDParameter.

type PrimingJobState

type PrimingJobState string

PrimingJobState - The state of the priming operation.

const (
	PrimingJobStateComplete PrimingJobState = "Complete"
	PrimingJobStatePaused   PrimingJobState = "Paused"
	PrimingJobStateQueued   PrimingJobState = "Queued"
	PrimingJobStateRunning  PrimingJobState = "Running"
)

func PossiblePrimingJobStateValues

func PossiblePrimingJobStateValues() []PrimingJobState

PossiblePrimingJobStateValues returns the possible values for the PrimingJobState const type.

type ProvisioningStateType

type ProvisioningStateType string

ProvisioningStateType - ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property

const (
	ProvisioningStateTypeCancelled ProvisioningStateType = "Cancelled"
	ProvisioningStateTypeCreating  ProvisioningStateType = "Creating"
	ProvisioningStateTypeDeleting  ProvisioningStateType = "Deleting"
	ProvisioningStateTypeFailed    ProvisioningStateType = "Failed"
	ProvisioningStateTypeSucceeded ProvisioningStateType = "Succeeded"
	ProvisioningStateTypeUpdating  ProvisioningStateType = "Updating"
)

func PossibleProvisioningStateTypeValues

func PossibleProvisioningStateTypeValues() []ProvisioningStateType

PossibleProvisioningStateTypeValues returns the possible values for the ProvisioningStateType const type.

type ReasonCode

type ReasonCode string

ReasonCode - The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". "QuotaId" is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. "NotAvailableForSubscription" is related to capacity at the datacenter.

const (
	ReasonCodeNotAvailableForSubscription ReasonCode = "NotAvailableForSubscription"
	ReasonCodeQuotaID                     ReasonCode = "QuotaId"
)

func PossibleReasonCodeValues

func PossibleReasonCodeValues() []ReasonCode

PossibleReasonCodeValues returns the possible values for the ReasonCode const type.

type ResourceSKU

type ResourceSKU struct {
	// A list of capabilities of this SKU, such as throughput or ops/sec.
	Capabilities []*ResourceSKUCapabilities `json:"capabilities,omitempty"`

	// The set of locations where the SKU is available.
	LocationInfo []*ResourceSKULocationInfo `json:"locationInfo,omitempty"`

	// The name of this SKU.
	Name *string `json:"name,omitempty"`

	// The restrictions preventing this SKU from being used. This is empty if there are no restrictions.
	Restrictions []*Restriction `json:"restrictions,omitempty"`

	// READ-ONLY; The set of locations where the SKU is available. This is the supported and registered Azure Geo Regions (e.g.,
	// West US, East US, Southeast Asia, etc.).
	Locations []*string `json:"locations,omitempty" azure:"ro"`

	// READ-ONLY; The type of resource the SKU applies to.
	ResourceType *string `json:"resourceType,omitempty" azure:"ro"`
}

ResourceSKU - A resource SKU.

func (ResourceSKU) MarshalJSON

func (r ResourceSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceSKU.

func (*ResourceSKU) UnmarshalJSON

func (r *ResourceSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU.

type ResourceSKUCapabilities

type ResourceSKUCapabilities struct {
	// Name of a capability, such as ops/sec.
	Name *string `json:"name,omitempty"`

	// Quantity, if the capability is measured by quantity.
	Value *string `json:"value,omitempty"`
}

ResourceSKUCapabilities - A resource SKU capability.

func (ResourceSKUCapabilities) MarshalJSON

func (r ResourceSKUCapabilities) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapabilities.

func (*ResourceSKUCapabilities) UnmarshalJSON

func (r *ResourceSKUCapabilities) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapabilities.

type ResourceSKULocationInfo

type ResourceSKULocationInfo struct {
	// Location where this SKU is available.
	Location *string `json:"location,omitempty"`

	// Zones if any.
	Zones []*string `json:"zones,omitempty"`
}

ResourceSKULocationInfo - Resource SKU location information.

func (ResourceSKULocationInfo) MarshalJSON

func (r ResourceSKULocationInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceSKULocationInfo.

func (*ResourceSKULocationInfo) UnmarshalJSON

func (r *ResourceSKULocationInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKULocationInfo.

type ResourceSKUsResult

type ResourceSKUsResult struct {
	// The URI to fetch the next page of Cache SKUs.
	NextLink *string `json:"nextLink,omitempty"`

	// READ-ONLY; The list of SKUs available for the subscription.
	Value []*ResourceSKU `json:"value,omitempty" azure:"ro"`
}

ResourceSKUsResult - The response from the List Cache SKUs operation.

func (ResourceSKUsResult) MarshalJSON

func (r ResourceSKUsResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceSKUsResult.

func (*ResourceSKUsResult) UnmarshalJSON

func (r *ResourceSKUsResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUsResult.

type ResourceUsage

type ResourceUsage struct {
	// READ-ONLY; The current usage of this resource.
	CurrentValue *int32 `json:"currentValue,omitempty" azure:"ro"`

	// READ-ONLY; The limit (quota) for this resource.
	Limit *int32 `json:"limit,omitempty" azure:"ro"`

	// READ-ONLY; Naming information for this resource type.
	Name *ResourceUsageName `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Unit that the limit and usages are expressed in, such as 'Count'.
	Unit *string `json:"unit,omitempty" azure:"ro"`
}

ResourceUsage - The usage and limit (quota) for a resource.

func (ResourceUsage) MarshalJSON

func (r ResourceUsage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceUsage.

func (*ResourceUsage) UnmarshalJSON

func (r *ResourceUsage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsage.

type ResourceUsageName

type ResourceUsageName struct {
	// Localized name for this resource type.
	LocalizedValue *string `json:"localizedValue,omitempty"`

	// Canonical name for this resource type.
	Value *string `json:"value,omitempty"`
}

ResourceUsageName - Naming information for this resource type.

func (ResourceUsageName) MarshalJSON

func (r ResourceUsageName) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceUsageName.

func (*ResourceUsageName) UnmarshalJSON

func (r *ResourceUsageName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsageName.

type ResourceUsagesListResult

type ResourceUsagesListResult struct {
	// READ-ONLY; URL to get the next set of resource usage list results if there are any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; List of usages and limits for resources controlled by the Microsoft.StorageCache resource provider.
	Value []*ResourceUsage `json:"value,omitempty" azure:"ro"`
}

ResourceUsagesListResult - Result of the request to list resource usages. It contains a list of resource usages & limits and a URL link to get the next set of results.

func (ResourceUsagesListResult) MarshalJSON

func (r ResourceUsagesListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceUsagesListResult.

func (*ResourceUsagesListResult) UnmarshalJSON

func (r *ResourceUsagesListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsagesListResult.

type Restriction

type Restriction struct {
	// The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". "QuotaId" is set when
	// the SKU has requiredQuotas parameter as the subscription does not belong to that
	// quota. "NotAvailableForSubscription" is related to capacity at the datacenter.
	ReasonCode *ReasonCode `json:"reasonCode,omitempty"`

	// READ-ONLY; The type of restrictions. In this version, the only possible value for this is location.
	Type *string `json:"type,omitempty" azure:"ro"`

	// READ-ONLY; The value of restrictions. If the restriction type is set to location, then this would be the different locations
	// where the SKU is restricted.
	Values []*string `json:"values,omitempty" azure:"ro"`
}

Restriction - The restrictions preventing this SKU from being used.

func (Restriction) MarshalJSON

func (r Restriction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Restriction.

func (*Restriction) UnmarshalJSON

func (r *Restriction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Restriction.

type SKUsClient

type SKUsClient struct {
	// contains filtered or unexported fields
}

SKUsClient contains the methods for the SKUs group. Don't use this type directly, use NewSKUsClient() instead.

func NewSKUsClient

func NewSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUsClient, error)

NewSKUsClient creates a new instance of SKUsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SKUsClient) NewListPager

func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]

NewListPager - Get the list of StorageCache.Cache SKUs available to this subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 options - SKUsClientListOptions contains the optional parameters for the SKUsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Skus_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewSKUsClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager(nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type SKUsClientListOptions

type SKUsClientListOptions struct {
}

SKUsClientListOptions contains the optional parameters for the SKUsClient.List method.

type SKUsClientListResponse

type SKUsClientListResponse struct {
	ResourceSKUsResult
}

SKUsClientListResponse contains the response from method SKUsClient.List.

type StorageTarget

type StorageTarget struct {
	// StorageTarget properties
	Properties *StorageTargetProperties `json:"properties,omitempty"`

	// READ-ONLY; Resource ID of the Storage Target.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Region name string.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Name of the Storage Target.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget
	Type *string `json:"type,omitempty" azure:"ro"`
}

StorageTarget - Type of the Storage Target.

func (StorageTarget) MarshalJSON

func (s StorageTarget) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StorageTarget.

func (*StorageTarget) UnmarshalJSON

func (s *StorageTarget) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StorageTarget.

type StorageTargetClient

type StorageTargetClient struct {
	// contains filtered or unexported fields
}

StorageTargetClient contains the methods for the StorageTarget group. Don't use this type directly, use NewStorageTargetClient() instead.

func NewStorageTargetClient

func NewStorageTargetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageTargetClient, error)

NewStorageTargetClient creates a new instance of StorageTargetClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*StorageTargetClient) BeginFlush

func (client *StorageTargetClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginFlushOptions) (*runtime.Poller[StorageTargetClientFlushResponse], error)

BeginFlush - Tells the cache to write all dirty data to the Storage Target's backend storage. Client requests to this storage target's namespace will return errors until the flush operation completes. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. storageTargetName - Name of Storage Target. options - StorageTargetClientBeginFlushOptions contains the optional parameters for the StorageTargetClient.BeginFlush method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Flush.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewStorageTargetClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginFlush(ctx,
	"scgroup",
	"sc",
	"st1",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*StorageTargetClient) BeginInvalidate

func (client *StorageTargetClient) BeginInvalidate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginInvalidateOptions) (*runtime.Poller[StorageTargetClientInvalidateResponse], error)

BeginInvalidate - Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the next request. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. storageTargetName - Name of Storage Target. options - StorageTargetClientBeginInvalidateOptions contains the optional parameters for the StorageTargetClient.BeginInvalidate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Invalidate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewStorageTargetClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginInvalidate(ctx,
	"scgroup",
	"sc",
	"st1",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*StorageTargetClient) BeginResume

func (client *StorageTargetClient) BeginResume(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginResumeOptions) (*runtime.Poller[StorageTargetClientResumeResponse], error)

BeginResume - Resumes client access to a previously suspended storage target. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. storageTargetName - Name of Storage Target. options - StorageTargetClientBeginResumeOptions contains the optional parameters for the StorageTargetClient.BeginResume method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Resume.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewStorageTargetClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginResume(ctx,
	"scgroup",
	"sc",
	"st1",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*StorageTargetClient) BeginSuspend

func (client *StorageTargetClient) BeginSuspend(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginSuspendOptions) (*runtime.Poller[StorageTargetClientSuspendResponse], error)

BeginSuspend - Suspends client access to a storage target. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. storageTargetName - Name of Storage Target. options - StorageTargetClientBeginSuspendOptions contains the optional parameters for the StorageTargetClient.BeginSuspend method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Suspend.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewStorageTargetClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginSuspend(ctx,
	"scgroup",
	"sc",
	"st1",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

type StorageTargetClientBeginFlushOptions

type StorageTargetClientBeginFlushOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StorageTargetClientBeginFlushOptions contains the optional parameters for the StorageTargetClient.BeginFlush method.

type StorageTargetClientBeginInvalidateOptions

type StorageTargetClientBeginInvalidateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StorageTargetClientBeginInvalidateOptions contains the optional parameters for the StorageTargetClient.BeginInvalidate method.

type StorageTargetClientBeginResumeOptions

type StorageTargetClientBeginResumeOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StorageTargetClientBeginResumeOptions contains the optional parameters for the StorageTargetClient.BeginResume method.

type StorageTargetClientBeginSuspendOptions

type StorageTargetClientBeginSuspendOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StorageTargetClientBeginSuspendOptions contains the optional parameters for the StorageTargetClient.BeginSuspend method.

type StorageTargetClientFlushResponse

type StorageTargetClientFlushResponse struct {
}

StorageTargetClientFlushResponse contains the response from method StorageTargetClient.Flush.

type StorageTargetClientInvalidateResponse

type StorageTargetClientInvalidateResponse struct {
}

StorageTargetClientInvalidateResponse contains the response from method StorageTargetClient.Invalidate.

type StorageTargetClientResumeResponse

type StorageTargetClientResumeResponse struct {
}

StorageTargetClientResumeResponse contains the response from method StorageTargetClient.Resume.

type StorageTargetClientSuspendResponse

type StorageTargetClientSuspendResponse struct {
}

StorageTargetClientSuspendResponse contains the response from method StorageTargetClient.Suspend.

type StorageTargetProperties

type StorageTargetProperties struct {
	// REQUIRED; Type of the Storage Target.
	TargetType *StorageTargetType `json:"targetType,omitempty"`

	// Properties when targetType is blobNfs.
	BlobNfs *BlobNfsTarget `json:"blobNfs,omitempty"`

	// Properties when targetType is clfs.
	Clfs *ClfsTarget `json:"clfs,omitempty"`

	// List of Cache namespace junctions to target for namespace associations.
	Junctions []*NamespaceJunction `json:"junctions,omitempty"`

	// Properties when targetType is nfs3.
	Nfs3 *Nfs3Target `json:"nfs3,omitempty"`

	// Storage target operational state.
	State *OperationalStateType `json:"state,omitempty"`

	// Properties when targetType is unknown.
	Unknown *UnknownTarget `json:"unknown,omitempty"`

	// READ-ONLY; The percentage of cache space allocated for this storage target
	AllocationPercentage *int32 `json:"allocationPercentage,omitempty" azure:"ro"`

	// READ-ONLY; ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property
	ProvisioningState *ProvisioningStateType `json:"provisioningState,omitempty" azure:"ro"`
}

StorageTargetProperties - Properties of the Storage Target.

func (StorageTargetProperties) MarshalJSON

func (s StorageTargetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StorageTargetProperties.

func (*StorageTargetProperties) UnmarshalJSON

func (s *StorageTargetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StorageTargetProperties.

type StorageTargetResource

type StorageTargetResource struct {
	// READ-ONLY; Resource ID of the Storage Target.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Region name string.
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; Name of the Storage Target.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget
	Type *string `json:"type,omitempty" azure:"ro"`
}

StorageTargetResource - Resource used by a Cache.

func (StorageTargetResource) MarshalJSON

func (s StorageTargetResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StorageTargetResource.

func (*StorageTargetResource) UnmarshalJSON

func (s *StorageTargetResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StorageTargetResource.

type StorageTargetSpaceAllocation

type StorageTargetSpaceAllocation struct {
	// The percentage of cache space allocated for this storage target
	AllocationPercentage *int32 `json:"allocationPercentage,omitempty"`

	// Name of the storage target.
	Name *string `json:"name,omitempty"`
}

StorageTargetSpaceAllocation - Storage Target space allocation properties.

func (StorageTargetSpaceAllocation) MarshalJSON

func (s StorageTargetSpaceAllocation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StorageTargetSpaceAllocation.

func (*StorageTargetSpaceAllocation) UnmarshalJSON

func (s *StorageTargetSpaceAllocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StorageTargetSpaceAllocation.

type StorageTargetType

type StorageTargetType string

StorageTargetType - Type of the Storage Target.

const (
	StorageTargetTypeBlobNfs StorageTargetType = "blobNfs"
	StorageTargetTypeClfs    StorageTargetType = "clfs"
	StorageTargetTypeNfs3    StorageTargetType = "nfs3"
	StorageTargetTypeUnknown StorageTargetType = "unknown"
)

func PossibleStorageTargetTypeValues

func PossibleStorageTargetTypeValues() []StorageTargetType

PossibleStorageTargetTypeValues returns the possible values for the StorageTargetType const type.

type StorageTargetsClient

type StorageTargetsClient struct {
	// contains filtered or unexported fields
}

StorageTargetsClient contains the methods for the StorageTargets group. Don't use this type directly, use NewStorageTargetsClient() instead.

func NewStorageTargetsClient

func NewStorageTargetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageTargetsClient, error)

NewStorageTargetsClient creates a new instance of StorageTargetsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*StorageTargetsClient) BeginCreateOrUpdate

func (client *StorageTargetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, storagetarget StorageTarget, options *StorageTargetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[StorageTargetsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down or unhealthy, the actual creation/modification of the Storage Target may be delayed until the Cache is healthy again. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. storageTargetName - Name of Storage Target. storagetarget - Object containing the definition of a Storage Target. options - StorageTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageTargetsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_CreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewStorageTargetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginCreateOrUpdate(ctx,
	"scgroup",
	"sc1",
	"st1",
	armstoragecache.StorageTarget{
		Properties: &armstoragecache.StorageTargetProperties{
			Junctions: []*armstoragecache.NamespaceJunction{
				{
					NamespacePath:   to.Ptr("/path/on/cache"),
					NfsAccessPolicy: to.Ptr("default"),
					NfsExport:       to.Ptr("exp1"),
					TargetPath:      to.Ptr("/path/on/exp1"),
				},
				{
					NamespacePath:   to.Ptr("/path2/on/cache"),
					NfsAccessPolicy: to.Ptr("rootSquash"),
					NfsExport:       to.Ptr("exp2"),
					TargetPath:      to.Ptr("/path2/on/exp2"),
				}},
			Nfs3: &armstoragecache.Nfs3Target{
				Target:     to.Ptr("10.0.44.44"),
				UsageModel: to.Ptr("READ_HEAVY_INFREQ"),
			},
			TargetType: to.Ptr(armstoragecache.StorageTargetTypeNfs3),
		},
	},
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*StorageTargetsClient) BeginDNSRefresh

func (client *StorageTargetsClient) BeginDNSRefresh(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDNSRefreshOptions) (*runtime.Poller[StorageTargetsClientDNSRefreshResponse], error)

BeginDNSRefresh - Tells a storage target to refresh its DNS information. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. storageTargetName - Name of Storage Target. options - StorageTargetsClientBeginDNSRefreshOptions contains the optional parameters for the StorageTargetsClient.BeginDNSRefresh method.

func (*StorageTargetsClient) BeginDelete

func (client *StorageTargetsClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDeleteOptions) (*runtime.Poller[StorageTargetsClientDeleteResponse], error)

BeginDelete - Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy again. Note that if the Cache has data to flush to the Storage Target, the data will be flushed before the Storage Target will be deleted. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. storageTargetName - Name of Storage Target. options - StorageTargetsClientBeginDeleteOptions contains the optional parameters for the StorageTargetsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewStorageTargetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := client.BeginDelete(ctx,
	"scgroup",
	"sc1",
	"st1",
	&armstoragecache.StorageTargetsClientBeginDeleteOptions{Force: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*StorageTargetsClient) Get

func (client *StorageTargetsClient) Get(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientGetOptions) (StorageTargetsClientGetResponse, error)

Get - Returns a Storage Target from a Cache. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. storageTargetName - Name of Storage Target. options - StorageTargetsClientGetOptions contains the optional parameters for the StorageTargetsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewStorageTargetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := client.Get(ctx,
	"scgroup",
	"sc1",
	"st1",
	nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// TODO: use response item
_ = res
Output:

func (*StorageTargetsClient) NewListByCachePager

func (client *StorageTargetsClient) NewListByCachePager(resourceGroupName string, cacheName string, options *StorageTargetsClientListByCacheOptions) *runtime.Pager[StorageTargetsClientListByCacheResponse]

NewListByCachePager - Returns a list of Storage Targets for the specified Cache. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - Target resource group. cacheName - Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. options - StorageTargetsClientListByCacheOptions contains the optional parameters for the StorageTargetsClient.ListByCache method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_ListByCache.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewStorageTargetsClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListByCachePager("scgroup",
	"sc1",
	nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type StorageTargetsClientBeginCreateOrUpdateOptions

type StorageTargetsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StorageTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageTargetsClient.BeginCreateOrUpdate method.

type StorageTargetsClientBeginDNSRefreshOptions

type StorageTargetsClientBeginDNSRefreshOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StorageTargetsClientBeginDNSRefreshOptions contains the optional parameters for the StorageTargetsClient.BeginDNSRefresh method.

type StorageTargetsClientBeginDeleteOptions

type StorageTargetsClientBeginDeleteOptions struct {
	// Boolean value requesting the force delete operation for a storage target. Force delete discards unwritten-data in the cache
	// instead of flushing it to back-end storage.
	Force *string
	// Resumes the LRO from the provided token.
	ResumeToken string
}

StorageTargetsClientBeginDeleteOptions contains the optional parameters for the StorageTargetsClient.BeginDelete method.

type StorageTargetsClientCreateOrUpdateResponse

type StorageTargetsClientCreateOrUpdateResponse struct {
	StorageTarget
}

StorageTargetsClientCreateOrUpdateResponse contains the response from method StorageTargetsClient.CreateOrUpdate.

type StorageTargetsClientDNSRefreshResponse

type StorageTargetsClientDNSRefreshResponse struct {
}

StorageTargetsClientDNSRefreshResponse contains the response from method StorageTargetsClient.DNSRefresh.

type StorageTargetsClientDeleteResponse

type StorageTargetsClientDeleteResponse struct {
}

StorageTargetsClientDeleteResponse contains the response from method StorageTargetsClient.Delete.

type StorageTargetsClientGetOptions

type StorageTargetsClientGetOptions struct {
}

StorageTargetsClientGetOptions contains the optional parameters for the StorageTargetsClient.Get method.

type StorageTargetsClientGetResponse

type StorageTargetsClientGetResponse struct {
	StorageTarget
}

StorageTargetsClientGetResponse contains the response from method StorageTargetsClient.Get.

type StorageTargetsClientListByCacheOptions

type StorageTargetsClientListByCacheOptions struct {
}

StorageTargetsClientListByCacheOptions contains the optional parameters for the StorageTargetsClient.ListByCache method.

type StorageTargetsClientListByCacheResponse

type StorageTargetsClientListByCacheResponse struct {
	StorageTargetsResult
}

StorageTargetsClientListByCacheResponse contains the response from method StorageTargetsClient.ListByCache.

type StorageTargetsResult

type StorageTargetsResult struct {
	// The URI to fetch the next page of Storage Targets.
	NextLink *string `json:"nextLink,omitempty"`

	// The list of Storage Targets defined for the Cache.
	Value []*StorageTarget `json:"value,omitempty"`
}

StorageTargetsResult - A list of Storage Targets.

func (StorageTargetsResult) MarshalJSON

func (s StorageTargetsResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StorageTargetsResult.

func (*StorageTargetsResult) UnmarshalJSON

func (s *StorageTargetsResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StorageTargetsResult.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type UnknownTarget

type UnknownTarget struct {
	// Dictionary of string->string pairs containing information about the Storage Target.
	Attributes map[string]*string `json:"attributes,omitempty"`
}

UnknownTarget - Properties pertaining to the UnknownTarget

func (UnknownTarget) MarshalJSON

func (u UnknownTarget) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UnknownTarget.

func (*UnknownTarget) UnmarshalJSON

func (u *UnknownTarget) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UnknownTarget.

type UsageModel

type UsageModel struct {
	// Localized information describing this usage model.
	Display *UsageModelDisplay `json:"display,omitempty"`

	// Non-localized keyword name for this usage model.
	ModelName *string `json:"modelName,omitempty"`

	// The type of Storage Target to which this model is applicable (only nfs3 as of this version).
	TargetType *string `json:"targetType,omitempty"`
}

UsageModel - A usage model.

func (UsageModel) MarshalJSON

func (u UsageModel) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UsageModel.

func (*UsageModel) UnmarshalJSON

func (u *UsageModel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsageModel.

type UsageModelDisplay

type UsageModelDisplay struct {
	// String to display for this usage model.
	Description *string `json:"description,omitempty"`
}

UsageModelDisplay - Localized information describing this usage model.

func (UsageModelDisplay) MarshalJSON

func (u UsageModelDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UsageModelDisplay.

func (*UsageModelDisplay) UnmarshalJSON

func (u *UsageModelDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsageModelDisplay.

type UsageModelsClient

type UsageModelsClient struct {
	// contains filtered or unexported fields
}

UsageModelsClient contains the methods for the UsageModels group. Don't use this type directly, use NewUsageModelsClient() instead.

func NewUsageModelsClient

func NewUsageModelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsageModelsClient, error)

NewUsageModelsClient creates a new instance of UsageModelsClient with the specified values. subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*UsageModelsClient) NewListPager

NewListPager - Get the list of Cache Usage Models available to this subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 options - UsageModelsClientListOptions contains the optional parameters for the UsageModelsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/UsageModels_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
client, err := armstoragecache.NewUsageModelsClient("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := client.NewListPager(nil)
for pager.More() {
	nextResult, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range nextResult.Value {
		// TODO: use page item
		_ = v
	}
}
Output:

type UsageModelsClientListOptions

type UsageModelsClientListOptions struct {
}

UsageModelsClientListOptions contains the optional parameters for the UsageModelsClient.List method.

type UsageModelsClientListResponse

type UsageModelsClientListResponse struct {
	UsageModelsResult
}

UsageModelsClientListResponse contains the response from method UsageModelsClient.List.

type UsageModelsResult

type UsageModelsResult struct {
	// The URI to fetch the next page of Cache usage models.
	NextLink *string `json:"nextLink,omitempty"`

	// The list of usage models available for the subscription.
	Value []*UsageModel `json:"value,omitempty"`
}

UsageModelsResult - A list of Cache usage models.

func (UsageModelsResult) MarshalJSON

func (u UsageModelsResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UsageModelsResult.

func (*UsageModelsResult) UnmarshalJSON

func (u *UsageModelsResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsageModelsResult.

type UserAssignedIdentitiesValue

type UserAssignedIdentitiesValue struct {
	// READ-ONLY; The client ID of the user-assigned identity.
	ClientID *string `json:"clientId,omitempty" azure:"ro"`

	// READ-ONLY; The principal ID of the user-assigned identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`
}

func (UserAssignedIdentitiesValue) MarshalJSON

func (u UserAssignedIdentitiesValue) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentitiesValue.

func (*UserAssignedIdentitiesValue) UnmarshalJSON

func (u *UserAssignedIdentitiesValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentitiesValue.

type UsernameDownloadedType

type UsernameDownloadedType string

UsernameDownloadedType - Indicates whether or not the HPC Cache has performed the username download successfully.

const (
	UsernameDownloadedTypeError UsernameDownloadedType = "Error"
	UsernameDownloadedTypeNo    UsernameDownloadedType = "No"
	UsernameDownloadedTypeYes   UsernameDownloadedType = "Yes"
)

func PossibleUsernameDownloadedTypeValues

func PossibleUsernameDownloadedTypeValues() []UsernameDownloadedType

PossibleUsernameDownloadedTypeValues returns the possible values for the UsernameDownloadedType const type.

type UsernameSource

type UsernameSource string

UsernameSource - This setting determines how the cache gets username and group names for clients.

const (
	UsernameSourceAD   UsernameSource = "AD"
	UsernameSourceFile UsernameSource = "File"
	UsernameSourceLDAP UsernameSource = "LDAP"
	UsernameSourceNone UsernameSource = "None"
)

func PossibleUsernameSourceValues

func PossibleUsernameSourceValues() []UsernameSource

PossibleUsernameSourceValues returns the possible values for the UsernameSource const type.

Jump to

Keyboard shortcuts

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