armstoragecache

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 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

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.

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.

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.

type APIOperationPropertiesServiceSpecification

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

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

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.

type AscOperationProperties

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

AscOperationProperties - Additional operation-specific output.

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-01-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-01-01/examples/AscOperations_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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 added in v0.2.0

type AscOperationsClientGetOptions struct {
}

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

type AscOperationsClientGetResponse added in v0.2.0

type AscOperationsClientGetResponse struct {
	AscOperation
}

AscOperationsClientGetResponse contains the response from method AscOperationsClient.Get.

type AscUsagesClient added in v0.3.0

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 added in v0.3.0

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 added in v0.4.0

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-01-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-01-01/examples/AscResourceUsages_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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 added in v0.3.0

type AscUsagesClientListOptions struct {
}

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

type AscUsagesClientListResponse added in v0.3.0

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.

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.

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.

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.

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.

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.

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.

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.

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.

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"`

	// 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; 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; 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.

type CacheSKU

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

CacheSKU - SKU for the Cache.

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.

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.

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.

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, 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-01-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 - 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-01-01/examples/Caches_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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.CachesClientBeginCreateOrUpdateOptions{Cache: &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"),
			},
			SKU: &armstoragecache.CacheSKU{
				Name: to.Ptr("Standard_2G"),
			},
			Tags: map[string]*string{
				"Dept": to.Ptr("Contoso"),
			},
		},
		})
	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-01-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-01-01/examples/Caches_DebugInfo.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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-01-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-01-01/examples/Caches_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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-01-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-01-01/examples/Caches_Flush.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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) 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-01-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-01-01/examples/Caches_Start.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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) 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-01-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-01-01/examples/Caches_Stop.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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) 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-01-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-01-01/examples/Caches_UpgradeFirmware.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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-01-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-01-01/examples/Caches_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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 added in v0.4.0

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-01-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-01-01/examples/Caches_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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 added in v0.4.0

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-01-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-01-01/examples/Caches_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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, options *CachesClientUpdateOptions) (CachesClientUpdateResponse, error)

Update - Update a Cache instance. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-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 - 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-01-01/examples/Caches_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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.CachesClientUpdateOptions{Cache: &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"),
			},
			SKU: &armstoragecache.CacheSKU{
				Name: to.Ptr("Standard_2G"),
			},
			Tags: map[string]*string{
				"Dept": to.Ptr("Contoso"),
			},
		},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type CachesClientBeginCreateOrUpdateOptions added in v0.2.0

type CachesClientBeginCreateOrUpdateOptions struct {
	// 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.
	Cache *Cache
	// Resumes the LRO from the provided token.
	ResumeToken string
}

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

type CachesClientBeginDebugInfoOptions added in v0.2.0

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

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

type CachesClientBeginDeleteOptions added in v0.2.0

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

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

type CachesClientBeginFlushOptions added in v0.2.0

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

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

type CachesClientBeginStartOptions added in v0.2.0

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

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

type CachesClientBeginStopOptions added in v0.2.0

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

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

type CachesClientBeginUpgradeFirmwareOptions added in v0.2.0

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

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

type CachesClientCreateOrUpdateResponse added in v0.2.0

type CachesClientCreateOrUpdateResponse struct {
	Cache
}

CachesClientCreateOrUpdateResponse contains the response from method CachesClient.CreateOrUpdate.

type CachesClientDebugInfoResponse added in v0.2.0

type CachesClientDebugInfoResponse struct {
}

CachesClientDebugInfoResponse contains the response from method CachesClient.DebugInfo.

type CachesClientDeleteResponse added in v0.2.0

type CachesClientDeleteResponse struct {
}

CachesClientDeleteResponse contains the response from method CachesClient.Delete.

type CachesClientFlushResponse added in v0.2.0

type CachesClientFlushResponse struct {
}

CachesClientFlushResponse contains the response from method CachesClient.Flush.

type CachesClientGetOptions added in v0.2.0

type CachesClientGetOptions struct {
}

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

type CachesClientGetResponse added in v0.2.0

type CachesClientGetResponse struct {
	Cache
}

CachesClientGetResponse contains the response from method CachesClient.Get.

type CachesClientListByResourceGroupOptions added in v0.2.0

type CachesClientListByResourceGroupOptions struct {
}

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

type CachesClientListByResourceGroupResponse added in v0.2.0

type CachesClientListByResourceGroupResponse struct {
	CachesListResult
}

CachesClientListByResourceGroupResponse contains the response from method CachesClient.ListByResourceGroup.

type CachesClientListOptions added in v0.2.0

type CachesClientListOptions struct {
}

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

type CachesClientListResponse added in v0.2.0

type CachesClientListResponse struct {
	CachesListResult
}

CachesClientListResponse contains the response from method CachesClient.List.

type CachesClientStartResponse added in v0.2.0

type CachesClientStartResponse struct {
}

CachesClientStartResponse contains the response from method CachesClient.Start.

type CachesClientStopResponse added in v0.2.0

type CachesClientStopResponse struct {
}

CachesClientStopResponse contains the response from method CachesClient.Stop.

type CachesClientUpdateOptions added in v0.2.0

type CachesClientUpdateOptions struct {
	// Object containing the user-selectable properties of the Cache. If read-only properties are included, they must match the
	// existing values of those properties.
	Cache *Cache
}

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

type CachesClientUpdateResponse added in v0.2.0

type CachesClientUpdateResponse struct {
	Cache
}

CachesClientUpdateResponse contains the response from method CachesClient.Update.

type CachesClientUpgradeFirmwareResponse added in v0.2.0

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.

type ClfsTarget

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

ClfsTarget - Properties pertaining to the ClfsTarget

type CloudError

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

CloudError - An error response.

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.

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.

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"
	HealthStateTypeStopped       HealthStateType = "Stopped"
	HealthStateTypeStopping      HealthStateType = "Stopping"
	HealthStateTypeTransitioning HealthStateType = "Transitioning"
	HealthStateTypeUnknown       HealthStateType = "Unknown"
	HealthStateTypeUpgrading     HealthStateType = "Upgrading"
)

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.

type KeyVaultKeyReferenceSourceVault

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

KeyVaultKeyReferenceSourceVault - Describes a resource Id to source Key Vault.

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.

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.

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.

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

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.

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.

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 added in v0.4.0

NewListPager - Lists all of the available Resource Provider operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-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-01-01/examples/Operations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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 added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	APIOperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.List.

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.

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.

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.

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.

type ResourceUsage added in v0.3.0

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.

type ResourceUsageName added in v0.3.0

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.

type ResourceUsagesListResult added in v0.3.0

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.

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.

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 added in v0.4.0

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-01-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-01-01/examples/Skus_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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 added in v0.2.0

type SKUsClientListOptions struct {
}

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

type SKUsClientListResponse added in v0.2.0

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.

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-01-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-01-01/examples/StorageTargets_Flush.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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 added in v0.3.0

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-01-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-01-01/examples/StorageTargets_Invalidate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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-01-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-01-01/examples/StorageTargets_Resume.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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-01-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-01-01/examples/StorageTargets_Suspend.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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 added in v0.2.0

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

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

type StorageTargetClientBeginInvalidateOptions added in v0.3.0

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

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

type StorageTargetClientBeginResumeOptions added in v0.2.0

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

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

type StorageTargetClientBeginSuspendOptions added in v0.2.0

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

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

type StorageTargetClientFlushResponse added in v0.2.0

type StorageTargetClientFlushResponse struct {
}

StorageTargetClientFlushResponse contains the response from method StorageTargetClient.Flush.

type StorageTargetClientInvalidateResponse added in v0.3.0

type StorageTargetClientInvalidateResponse struct {
}

StorageTargetClientInvalidateResponse contains the response from method StorageTargetClient.Invalidate.

type StorageTargetClientResumeResponse added in v0.2.0

type StorageTargetClientResumeResponse struct {
}

StorageTargetClientResumeResponse contains the response from method StorageTargetClient.Resume.

type StorageTargetClientSuspendResponse added in v0.2.0

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; 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.

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.

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, 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-01-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 - 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-01-01/examples/StorageTargets_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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.StorageTargetsClientBeginCreateOrUpdateOptions{Storagetarget: &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),
			},
		},
		})
	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-01-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-01-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-01-01/examples/StorageTargets_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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-01-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-01-01/examples/StorageTargets_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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 added in v0.4.0

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-01-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-01-01/examples/StorageTargets_ListByCache.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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 added in v0.2.0

type StorageTargetsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
	// Object containing the definition of a Storage Target.
	Storagetarget *StorageTarget
}

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

type StorageTargetsClientBeginDNSRefreshOptions added in v0.2.0

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

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

type StorageTargetsClientBeginDeleteOptions added in v0.2.0

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 added in v0.2.0

type StorageTargetsClientCreateOrUpdateResponse struct {
	StorageTarget
}

StorageTargetsClientCreateOrUpdateResponse contains the response from method StorageTargetsClient.CreateOrUpdate.

type StorageTargetsClientDNSRefreshResponse added in v0.2.0

type StorageTargetsClientDNSRefreshResponse struct {
}

StorageTargetsClientDNSRefreshResponse contains the response from method StorageTargetsClient.DNSRefresh.

type StorageTargetsClientDeleteResponse added in v0.2.0

type StorageTargetsClientDeleteResponse struct {
}

StorageTargetsClientDeleteResponse contains the response from method StorageTargetsClient.Delete.

type StorageTargetsClientGetOptions added in v0.2.0

type StorageTargetsClientGetOptions struct {
}

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

type StorageTargetsClientGetResponse added in v0.2.0

type StorageTargetsClientGetResponse struct {
	StorageTarget
}

StorageTargetsClientGetResponse contains the response from method StorageTargetsClient.Get.

type StorageTargetsClientListByCacheOptions added in v0.2.0

type StorageTargetsClientListByCacheOptions struct {
}

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

type StorageTargetsClientListByCacheResponse added in v0.2.0

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.

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.

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.

type UsageModelDisplay

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

UsageModelDisplay - Localized information describing this usage model.

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 added in v0.4.0

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-01-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-01-01/examples/UsageModels_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storagecache/armstoragecache"
)

func main() {
	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 added in v0.2.0

type UsageModelsClientListOptions struct {
}

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

type UsageModelsClientListResponse added in v0.2.0

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.

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"`
}

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