Documentation ¶
Index ¶
- type APIOperation
- type APIOperationDisplay
- type APIOperationListResult
- type APIOperationProperties
- type APIOperationPropertiesServiceSpecification
- type AscOperation
- type AscOperationProperties
- type AscOperationsClient
- type AscOperationsClientGetOptions
- type AscOperationsClientGetResponse
- type AscUsagesClient
- type AscUsagesClientListOptions
- type AscUsagesClientListResponse
- type BlobNfsTarget
- type Cache
- type CacheActiveDirectorySettings
- type CacheActiveDirectorySettingsCredentials
- type CacheDirectorySettings
- type CacheEncryptionSettings
- type CacheHealth
- type CacheIdentity
- type CacheIdentityType
- type CacheNetworkSettings
- type CacheProperties
- type CacheSKU
- type CacheSecuritySettings
- type CacheUpgradeStatus
- type CacheUsernameDownloadSettings
- type CacheUsernameDownloadSettingsCredentials
- type CachesClient
- func (client *CachesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[CachesClientCreateOrUpdateResponse], error)
- func (client *CachesClient) BeginDebugInfo(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[CachesClientDebugInfoResponse], error)
- func (client *CachesClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[CachesClientDeleteResponse], error)
- func (client *CachesClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[CachesClientFlushResponse], error)
- func (client *CachesClient) BeginStart(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[CachesClientStartResponse], error)
- func (client *CachesClient) BeginStop(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[CachesClientStopResponse], error)
- func (client *CachesClient) BeginUpgradeFirmware(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[CachesClientUpgradeFirmwareResponse], error)
- func (client *CachesClient) Get(ctx context.Context, resourceGroupName string, cacheName string, ...) (CachesClientGetResponse, error)
- func (client *CachesClient) List(options *CachesClientListOptions) *runtime.Pager[CachesClientListResponse]
- func (client *CachesClient) ListByResourceGroup(resourceGroupName string, options *CachesClientListByResourceGroupOptions) *runtime.Pager[CachesClientListByResourceGroupResponse]
- func (client *CachesClient) Update(ctx context.Context, resourceGroupName string, cacheName string, ...) (CachesClientUpdateResponse, error)
- type CachesClientBeginCreateOrUpdateOptions
- type CachesClientBeginDebugInfoOptions
- type CachesClientBeginDeleteOptions
- type CachesClientBeginFlushOptions
- type CachesClientBeginStartOptions
- type CachesClientBeginStopOptions
- type CachesClientBeginUpgradeFirmwareOptions
- type CachesClientCreateOrUpdateResponse
- type CachesClientDebugInfoResponse
- type CachesClientDeleteResponse
- type CachesClientFlushResponse
- type CachesClientGetOptions
- type CachesClientGetResponse
- type CachesClientListByResourceGroupOptions
- type CachesClientListByResourceGroupResponse
- type CachesClientListOptions
- type CachesClientListResponse
- type CachesClientStartResponse
- type CachesClientStopResponse
- type CachesClientUpdateOptions
- type CachesClientUpdateResponse
- type CachesClientUpgradeFirmwareResponse
- type CachesListResult
- type ClfsTarget
- type CloudError
- type CloudErrorBody
- type Condition
- type CreatedByType
- type DomainJoinedType
- type ErrorResponse
- type FirmwareStatusType
- type HealthStateType
- type KeyVaultKeyReference
- type KeyVaultKeyReferenceSourceVault
- type MetricAggregationType
- type MetricDimension
- type MetricSpecification
- type NamespaceJunction
- type Nfs3Target
- type NfsAccessPolicy
- type NfsAccessRule
- type NfsAccessRuleAccess
- type NfsAccessRuleScope
- type OperationalStateType
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type ProvisioningStateType
- type ReasonCode
- type ResourceSKU
- type ResourceSKUCapabilities
- type ResourceSKULocationInfo
- type ResourceSKUsResult
- type ResourceUsage
- type ResourceUsageName
- type ResourceUsagesListResult
- type Restriction
- type SKUsClient
- type SKUsClientListOptions
- type SKUsClientListResponse
- type StorageTarget
- type StorageTargetClient
- func (client *StorageTargetClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[StorageTargetClientFlushResponse], error)
- func (client *StorageTargetClient) BeginInvalidate(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[StorageTargetClientInvalidateResponse], error)
- func (client *StorageTargetClient) BeginResume(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[StorageTargetClientResumeResponse], error)
- func (client *StorageTargetClient) BeginSuspend(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[StorageTargetClientSuspendResponse], error)
- type StorageTargetClientBeginFlushOptions
- type StorageTargetClientBeginInvalidateOptions
- type StorageTargetClientBeginResumeOptions
- type StorageTargetClientBeginSuspendOptions
- type StorageTargetClientFlushResponse
- type StorageTargetClientInvalidateResponse
- type StorageTargetClientResumeResponse
- type StorageTargetClientSuspendResponse
- type StorageTargetProperties
- type StorageTargetResource
- type StorageTargetType
- type StorageTargetsClient
- func (client *StorageTargetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[StorageTargetsClientCreateOrUpdateResponse], error)
- func (client *StorageTargetsClient) BeginDNSRefresh(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[StorageTargetsClientDNSRefreshResponse], error)
- func (client *StorageTargetsClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, ...) (*armruntime.Poller[StorageTargetsClientDeleteResponse], error)
- func (client *StorageTargetsClient) Get(ctx context.Context, resourceGroupName string, cacheName string, ...) (StorageTargetsClientGetResponse, error)
- func (client *StorageTargetsClient) ListByCache(resourceGroupName string, cacheName string, ...) *runtime.Pager[StorageTargetsClientListByCacheResponse]
- type StorageTargetsClientBeginCreateOrUpdateOptions
- type StorageTargetsClientBeginDNSRefreshOptions
- type StorageTargetsClientBeginDeleteOptions
- type StorageTargetsClientCreateOrUpdateResponse
- type StorageTargetsClientDNSRefreshResponse
- type StorageTargetsClientDeleteResponse
- type StorageTargetsClientGetOptions
- type StorageTargetsClientGetResponse
- type StorageTargetsClientListByCacheOptions
- type StorageTargetsClientListByCacheResponse
- type StorageTargetsResult
- type SystemData
- type UnknownTarget
- type UsageModel
- type UsageModelDisplay
- type UsageModelsClient
- type UsageModelsClientListOptions
- type UsageModelsClientListResponse
- type UsageModelsResult
- type UserAssignedIdentitiesValue
- type UsernameDownloadedType
- type UsernameSource
Examples ¶
- AscOperationsClient.Get
- AscUsagesClient.List
- CachesClient.BeginCreateOrUpdate
- CachesClient.BeginDebugInfo
- CachesClient.BeginDelete
- CachesClient.BeginFlush
- CachesClient.BeginStart
- CachesClient.BeginStop
- CachesClient.BeginUpgradeFirmware
- CachesClient.Get
- CachesClient.List
- CachesClient.ListByResourceGroup
- CachesClient.Update
- OperationsClient.List
- SKUsClient.List
- StorageTargetClient.BeginFlush
- StorageTargetClient.BeginInvalidate
- StorageTargetClient.BeginResume
- StorageTargetClient.BeginSuspend
- StorageTargetsClient.BeginCreateOrUpdate
- StorageTargetsClient.BeginDelete
- StorageTargetsClient.Get
- StorageTargetsClient.ListByCache
- UsageModelsClient.List
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.
func (APIOperationListResult) MarshalJSON ¶
func (a APIOperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type APIOperationListResult.
type APIOperationProperties ¶
type APIOperationProperties struct { // Specification of the all the metrics provided for a resource type. ServiceSpecification *APIOperationPropertiesServiceSpecification `json:"serviceSpecification,omitempty"` }
APIOperationProperties - Additional details about an operation.
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.
func (APIOperationPropertiesServiceSpecification) MarshalJSON ¶
func (a APIOperationPropertiesServiceSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type APIOperationPropertiesServiceSpecification.
type AscOperation ¶
type AscOperation struct { // The end time of the operation. EndTime *string `json:"endTime,omitempty"` // The error detail of the operation if any. Error *ErrorResponse `json:"error,omitempty"` // The operation Id. ID *string `json:"id,omitempty"` // The operation name. Name *string `json:"name,omitempty"` // Additional operation-specific properties Properties *AscOperationProperties `json:"properties,omitempty"` // The start time of the operation. StartTime *string `json:"startTime,omitempty"` // The status of the operation. Status *string `json:"status,omitempty"` }
AscOperation - The status of operation.
type AscOperationProperties ¶
type AscOperationProperties struct { // Additional operation-specific output. Output map[string]interface{} `json:"output,omitempty"` }
AscOperationProperties - Additional operation-specific output.
func (AscOperationProperties) MarshalJSON ¶
func (a AscOperationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AscOperationProperties.
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 ¶
func (client *AscOperationsClient) Get(ctx context.Context, location string, operationID string, options *AscOperationsClientGetOptions) (AscOperationsClientGetResponse, error)
Get - Gets the status of an asynchronous operation for the Azure HPC Cache If the operation fails it returns an *azcore.ResponseError type. 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) return } ctx := context.Background() client, err := armstoragecache.NewAscOperationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<location>", "<operation-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // 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) List ¶ added in v0.3.0
func (client *AscUsagesClient) List(location string, options *AscUsagesClientListOptions) *runtime.Pager[AscUsagesClientListResponse]
List - Gets the quantity used and quota limit for resources If the operation fails it returns an *azcore.ResponseError type. 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) return } ctx := context.Background() client, err := armstoragecache.NewAscUsagesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List("<location>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } 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 ¶
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) (*armruntime.Poller[CachesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a Cache. If the operation fails it returns an *azcore.ResponseError type. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewCachesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<cache-name>", &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("<location>"), Properties: &armstoragecache.CacheProperties{ CacheSizeGB: to.Ptr[int32](3072), DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{ CacheNetBiosName: to.Ptr("<cache-net-bios-name>"), Credentials: &armstoragecache.CacheActiveDirectorySettingsCredentials{ Password: to.Ptr("<password>"), Username: to.Ptr("<username>"), }, DomainName: to.Ptr("<domain-name>"), DomainNetBiosName: to.Ptr("<domain-net-bios-name>"), PrimaryDNSIPAddress: to.Ptr("<primary-dnsipaddress>"), SecondaryDNSIPAddress: to.Ptr("<secondary-dnsipaddress>"), }, UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ Credentials: &armstoragecache.CacheUsernameDownloadSettingsCredentials{ BindDn: to.Ptr("<bind-dn>"), BindPassword: to.Ptr("<bind-password>"), }, ExtendedGroups: to.Ptr(true), LdapBaseDN: to.Ptr("<ldap-base-dn>"), LdapServer: to.Ptr("<ldap-server>"), UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), }, }, EncryptionSettings: &armstoragecache.CacheEncryptionSettings{ KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ KeyURL: to.Ptr("<key-url>"), SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ ID: to.Ptr("<id>"), }, }, }, SecuritySettings: &armstoragecache.CacheSecuritySettings{ AccessPolicies: []*armstoragecache.NfsAccessPolicy{ { Name: to.Ptr("<name>"), 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("<subnet>"), }, SKU: &armstoragecache.CacheSKU{ Name: to.Ptr("<name>"), }, Tags: map[string]*string{ "Dept": to.Ptr("Contoso"), }, }, ResumeToken: "", }) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*CachesClient) BeginDebugInfo ¶
func (client *CachesClient) BeginDebugInfo(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDebugInfoOptions) (*armruntime.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. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewCachesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDebugInfo(ctx, "<resource-group-name>", "<cache-name>", &armstoragecache.CachesClientBeginDebugInfoOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*CachesClient) BeginDelete ¶
func (client *CachesClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDeleteOptions) (*armruntime.Poller[CachesClientDeleteResponse], error)
BeginDelete - Schedules a Cache for deletion. If the operation fails it returns an *azcore.ResponseError type. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewCachesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<cache-name>", &armstoragecache.CachesClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*CachesClient) BeginFlush ¶
func (client *CachesClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginFlushOptions) (*armruntime.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. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewCachesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginFlush(ctx, "<resource-group-name>", "<cache-name>", &armstoragecache.CachesClientBeginFlushOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*CachesClient) BeginStart ¶
func (client *CachesClient) BeginStart(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartOptions) (*armruntime.Poller[CachesClientStartResponse], error)
BeginStart - Tells a Stopped state Cache to transition to Active state. If the operation fails it returns an *azcore.ResponseError type. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewCachesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginStart(ctx, "<resource-group-name>", "<cache-name>", &armstoragecache.CachesClientBeginStartOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*CachesClient) BeginStop ¶
func (client *CachesClient) BeginStop(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopOptions) (*armruntime.Poller[CachesClientStopResponse], error)
BeginStop - Tells an Active Cache to transition to Stopped state. If the operation fails it returns an *azcore.ResponseError type. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewCachesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginStop(ctx, "<resource-group-name>", "<cache-name>", &armstoragecache.CachesClientBeginStopOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*CachesClient) BeginUpgradeFirmware ¶
func (client *CachesClient) BeginUpgradeFirmware(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginUpgradeFirmwareOptions) (*armruntime.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. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewCachesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpgradeFirmware(ctx, "<resource-group-name>", "<cache-name>", &armstoragecache.CachesClientBeginUpgradeFirmwareOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. 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) return } ctx := context.Background() client, err := armstoragecache.NewCachesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<cache-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*CachesClient) List ¶
func (client *CachesClient) List(options *CachesClientListOptions) *runtime.Pager[CachesClientListResponse]
List - Returns all Caches the user has access to under a subscription. If the operation fails it returns an *azcore.ResponseError type. 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) return } ctx := context.Background() client, err := armstoragecache.NewCachesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CachesClient) ListByResourceGroup ¶
func (client *CachesClient) ListByResourceGroup(resourceGroupName string, options *CachesClientListByResourceGroupOptions) *runtime.Pager[CachesClientListByResourceGroupResponse]
ListByResourceGroup - Returns all Caches the user has access to under a resource group. If the operation fails it returns an *azcore.ResponseError type. 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) return } ctx := context.Background() client, err := armstoragecache.NewCachesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroup("<resource-group-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } 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. 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) return } ctx := context.Background() client, err := armstoragecache.NewCachesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Update(ctx, "<resource-group-name>", "<cache-name>", &armstoragecache.CachesClientUpdateOptions{Cache: &armstoragecache.Cache{ Location: to.Ptr("<location>"), Properties: &armstoragecache.CacheProperties{ CacheSizeGB: to.Ptr[int32](3072), DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{ CacheNetBiosName: to.Ptr("<cache-net-bios-name>"), DomainName: to.Ptr("<domain-name>"), DomainNetBiosName: to.Ptr("<domain-net-bios-name>"), PrimaryDNSIPAddress: to.Ptr("<primary-dnsipaddress>"), SecondaryDNSIPAddress: to.Ptr("<secondary-dnsipaddress>"), }, UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ ExtendedGroups: to.Ptr(true), UsernameSource: to.Ptr(armstoragecache.UsernameSourceAD), }, }, NetworkSettings: &armstoragecache.CacheNetworkSettings{ DNSSearchDomain: to.Ptr("<dnssearch-domain>"), DNSServers: []*string{ to.Ptr("10.1.22.33"), to.Ptr("10.1.12.33")}, Mtu: to.Ptr[int32](1500), NtpServer: to.Ptr("<ntp-server>"), }, SecuritySettings: &armstoragecache.CacheSecuritySettings{ AccessPolicies: []*armstoragecache.NfsAccessPolicy{ { Name: to.Ptr("<name>"), 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("<name>"), AccessRules: []*armstoragecache.NfsAccessRule{ { Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), Filter: to.Ptr("<filter>"), 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("<filter>"), 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("<anonymous-gid>"), AnonymousUID: to.Ptr("<anonymous-uid>"), RootSquash: to.Ptr(true), Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), SubmountAccess: to.Ptr(true), Suid: to.Ptr(false), }}, }}, }, Subnet: to.Ptr("<subnet>"), }, SKU: &armstoragecache.CacheSKU{ Name: to.Ptr("<name>"), }, Tags: map[string]*string{ "Dept": to.Ptr("Contoso"), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // 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.
func (CachesListResult) MarshalJSON ¶
func (c CachesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CachesListResult.
type ClfsTarget ¶
type ClfsTarget struct { // Resource ID of storage container. Target *string `json:"target,omitempty"` }
ClfsTarget - Properties pertaining to the ClfsTarget
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.
func (CloudErrorBody) MarshalJSON ¶
func (c CloudErrorBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CloudErrorBody.
type Condition ¶
type Condition struct { // READ-ONLY; The issue requiring attention. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The time when the condition was raised. Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` }
Condition - Outstanding conditions that will need to be resolved.
func (Condition) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Condition.
func (*Condition) UnmarshalJSON ¶
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" )
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.
func (MetricSpecification) MarshalJSON ¶
func (m MetricSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricSpecification.
type NamespaceJunction ¶
type NamespaceJunction struct { // Namespace path on a Cache for a Storage Target. NamespacePath *string `json:"namespacePath,omitempty"` // Name of the access policy applied to this junction. NfsAccessPolicy *string `json:"nfsAccessPolicy,omitempty"` // NFS export where targetPath exists. NfsExport *string `json:"nfsExport,omitempty"` // Path in Storage Target to which namespacePath points. TargetPath *string `json:"targetPath,omitempty"` }
NamespaceJunction - A namespace junction.
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) List ¶
func (client *OperationsClient) List(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
List - Lists all of the available Resource Provider operations. If the operation fails it returns an *azcore.ResponseError type. 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) return } ctx := context.Background() client, err := armstoragecache.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } 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.
func (ResourceSKU) MarshalJSON ¶
func (r ResourceSKU) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKU.
type ResourceSKUCapabilities ¶
type ResourceSKUCapabilities struct { // Name of a capability, such as ops/sec. Name *string `json:"name,omitempty"` // Quantity, if the capability is measured by quantity. Value *string `json:"value,omitempty"` }
ResourceSKUCapabilities - A resource SKU capability.
type ResourceSKULocationInfo ¶
type ResourceSKULocationInfo struct { // Location where this SKU is available. Location *string `json:"location,omitempty"` // Zones if any. Zones []*string `json:"zones,omitempty"` }
ResourceSKULocationInfo - Resource SKU location information.
func (ResourceSKULocationInfo) MarshalJSON ¶
func (r ResourceSKULocationInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKULocationInfo.
type ResourceSKUsResult ¶
type ResourceSKUsResult struct { // The URI to fetch the next page of Cache SKUs. NextLink *string `json:"nextLink,omitempty"` // READ-ONLY; The list of SKUs available for the subscription. Value []*ResourceSKU `json:"value,omitempty" azure:"ro"` }
ResourceSKUsResult - The response from the List Cache SKUs operation.
func (ResourceSKUsResult) MarshalJSON ¶
func (r ResourceSKUsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKUsResult.
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.
func (ResourceUsagesListResult) MarshalJSON ¶ added in v0.3.0
func (r ResourceUsagesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceUsagesListResult.
type Restriction ¶
type Restriction struct { // The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". "QuotaId" is set when // the SKU has requiredQuotas parameter as the subscription does not belong to that // quota. "NotAvailableForSubscription" is related to capacity at the datacenter. ReasonCode *ReasonCode `json:"reasonCode,omitempty"` // READ-ONLY; The type of restrictions. In this version, the only possible value for this is location. Type *string `json:"type,omitempty" azure:"ro"` // READ-ONLY; The value of restrictions. If the restriction type is set to location, then this would be the different locations // where the SKU is restricted. Values []*string `json:"values,omitempty" azure:"ro"` }
Restriction - The restrictions preventing this SKU from being used.
func (Restriction) MarshalJSON ¶
func (r Restriction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Restriction.
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) List ¶
func (client *SKUsClient) List(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]
List - Get the list of StorageCache.Cache SKUs available to this subscription. If the operation fails it returns an *azcore.ResponseError type. 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) return } ctx := context.Background() client, err := armstoragecache.NewSKUsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } 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) (*armruntime.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. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewStorageTargetClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginFlush(ctx, "<resource-group-name>", "<cache-name>", "<storage-target-name>", &armstoragecache.StorageTargetClientBeginFlushOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*StorageTargetClient) BeginInvalidate ¶ added in v0.3.0
func (client *StorageTargetClient) BeginInvalidate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginInvalidateOptions) (*armruntime.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. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewStorageTargetClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginInvalidate(ctx, "<resource-group-name>", "<cache-name>", "<storage-target-name>", &armstoragecache.StorageTargetClientBeginInvalidateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*StorageTargetClient) BeginResume ¶
func (client *StorageTargetClient) BeginResume(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginResumeOptions) (*armruntime.Poller[StorageTargetClientResumeResponse], error)
BeginResume - Resumes client access to a previously suspended storage target. If the operation fails it returns an *azcore.ResponseError type. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewStorageTargetClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginResume(ctx, "<resource-group-name>", "<cache-name>", "<storage-target-name>", &armstoragecache.StorageTargetClientBeginResumeOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*StorageTargetClient) BeginSuspend ¶
func (client *StorageTargetClient) BeginSuspend(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginSuspendOptions) (*armruntime.Poller[StorageTargetClientSuspendResponse], error)
BeginSuspend - Suspends client access to a storage target. If the operation fails it returns an *azcore.ResponseError type. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewStorageTargetClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginSuspend(ctx, "<resource-group-name>", "<cache-name>", "<storage-target-name>", &armstoragecache.StorageTargetClientBeginSuspendOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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) (*armruntime.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. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewStorageTargetsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<cache-name>", "<storage-target-name>", &armstoragecache.StorageTargetsClientBeginCreateOrUpdateOptions{Storagetarget: &armstoragecache.StorageTarget{ Properties: &armstoragecache.StorageTargetProperties{ Junctions: []*armstoragecache.NamespaceJunction{ { NamespacePath: to.Ptr("<namespace-path>"), NfsAccessPolicy: to.Ptr("<nfs-access-policy>"), NfsExport: to.Ptr("<nfs-export>"), TargetPath: to.Ptr("<target-path>"), }, { NamespacePath: to.Ptr("<namespace-path>"), NfsAccessPolicy: to.Ptr("<nfs-access-policy>"), NfsExport: to.Ptr("<nfs-export>"), TargetPath: to.Ptr("<target-path>"), }}, Nfs3: &armstoragecache.Nfs3Target{ Target: to.Ptr("<target>"), UsageModel: to.Ptr("<usage-model>"), }, TargetType: to.Ptr(armstoragecache.StorageTargetTypeNfs3), }, }, ResumeToken: "", }) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*StorageTargetsClient) BeginDNSRefresh ¶
func (client *StorageTargetsClient) BeginDNSRefresh(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDNSRefreshOptions) (*armruntime.Poller[StorageTargetsClientDNSRefreshResponse], error)
BeginDNSRefresh - Tells a storage target to refresh its DNS information. If the operation fails it returns an *azcore.ResponseError type. 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) (*armruntime.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. 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" "time" "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) return } ctx := context.Background() client, err := armstoragecache.NewStorageTargetsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<cache-name>", "<storage-target-name>", &armstoragecache.StorageTargetsClientBeginDeleteOptions{Force: nil, ResumeToken: "", }) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. 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) return } ctx := context.Background() client, err := armstoragecache.NewStorageTargetsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<cache-name>", "<storage-target-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*StorageTargetsClient) ListByCache ¶
func (client *StorageTargetsClient) ListByCache(resourceGroupName string, cacheName string, options *StorageTargetsClientListByCacheOptions) *runtime.Pager[StorageTargetsClientListByCacheResponse]
ListByCache - Returns a list of Storage Targets for the specified Cache. If the operation fails it returns an *azcore.ResponseError type. 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) return } ctx := context.Background() client, err := armstoragecache.NewStorageTargetsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByCache("<resource-group-name>", "<cache-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } 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.
func (StorageTargetsResult) MarshalJSON ¶
func (s StorageTargetsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageTargetsResult.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type UnknownTarget ¶
type UnknownTarget struct { // Dictionary of string->string pairs containing information about the Storage Target. Attributes map[string]*string `json:"attributes,omitempty"` }
UnknownTarget - Properties pertaining to the UnknownTarget
func (UnknownTarget) MarshalJSON ¶
func (u UnknownTarget) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UnknownTarget.
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) List ¶
func (client *UsageModelsClient) List(options *UsageModelsClientListOptions) *runtime.Pager[UsageModelsClientListResponse]
List - Get the list of Cache Usage Models available to this subscription. If the operation fails it returns an *azcore.ResponseError type. 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) return } ctx := context.Background() client, err := armstoragecache.NewUsageModelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } 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.
func (UsageModelsResult) MarshalJSON ¶
func (u UsageModelsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UsageModelsResult.
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.
Source Files ¶
- build.go
- zz_generated_ascoperations_client.go
- zz_generated_ascusages_client.go
- zz_generated_caches_client.go
- zz_generated_constants.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_operations_client.go
- zz_generated_response_types.go
- zz_generated_skus_client.go
- zz_generated_storagetarget_client.go
- zz_generated_storagetargets_client.go
- zz_generated_time_rfc3339.go
- zz_generated_usagemodels_client.go