Documentation ¶
Index ¶
- type APIOperation
- type APIOperationDisplay
- type APIOperationListResult
- type APIOperationProperties
- type APIOperationPropertiesServiceSpecification
- type AmlFilesystem
- type AmlFilesystemArchive
- type AmlFilesystemArchiveInfo
- type AmlFilesystemArchiveStatus
- type AmlFilesystemCheckSubnetError
- type AmlFilesystemCheckSubnetErrorFilesystemSubnet
- type AmlFilesystemClientInfo
- type AmlFilesystemContainerStorageInterface
- type AmlFilesystemEncryptionSettings
- type AmlFilesystemHealth
- type AmlFilesystemHealthStateType
- type AmlFilesystemHsmSettings
- type AmlFilesystemIdentity
- type AmlFilesystemIdentityType
- type AmlFilesystemProperties
- type AmlFilesystemPropertiesHsm
- type AmlFilesystemPropertiesMaintenanceWindow
- type AmlFilesystemProvisioningStateType
- type AmlFilesystemSubnetInfo
- type AmlFilesystemUpdate
- type AmlFilesystemUpdateProperties
- type AmlFilesystemUpdatePropertiesMaintenanceWindow
- type AmlFilesystemsClient
- func (client *AmlFilesystemsClient) Archive(ctx context.Context, resourceGroupName string, amlFilesystemName string, ...) (AmlFilesystemsClientArchiveResponse, error)
- func (client *AmlFilesystemsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, ...) (*runtime.Poller[AmlFilesystemsClientCreateOrUpdateResponse], error)
- func (client *AmlFilesystemsClient) BeginDelete(ctx context.Context, resourceGroupName string, amlFilesystemName string, ...) (*runtime.Poller[AmlFilesystemsClientDeleteResponse], error)
- func (client *AmlFilesystemsClient) BeginUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, ...) (*runtime.Poller[AmlFilesystemsClientUpdateResponse], error)
- func (client *AmlFilesystemsClient) CancelArchive(ctx context.Context, resourceGroupName string, amlFilesystemName string, ...) (AmlFilesystemsClientCancelArchiveResponse, error)
- func (client *AmlFilesystemsClient) Get(ctx context.Context, resourceGroupName string, amlFilesystemName string, ...) (AmlFilesystemsClientGetResponse, error)
- func (client *AmlFilesystemsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[AmlFilesystemsClientListByResourceGroupResponse]
- func (client *AmlFilesystemsClient) NewListPager(options *AmlFilesystemsClientListOptions) *runtime.Pager[AmlFilesystemsClientListResponse]
- type AmlFilesystemsClientArchiveOptions
- type AmlFilesystemsClientArchiveResponse
- type AmlFilesystemsClientBeginCreateOrUpdateOptions
- type AmlFilesystemsClientBeginDeleteOptions
- type AmlFilesystemsClientBeginUpdateOptions
- type AmlFilesystemsClientCancelArchiveOptions
- type AmlFilesystemsClientCancelArchiveResponse
- type AmlFilesystemsClientCreateOrUpdateResponse
- type AmlFilesystemsClientDeleteResponse
- type AmlFilesystemsClientGetOptions
- type AmlFilesystemsClientGetResponse
- type AmlFilesystemsClientListByResourceGroupOptions
- type AmlFilesystemsClientListByResourceGroupResponse
- type AmlFilesystemsClientListOptions
- type AmlFilesystemsClientListResponse
- type AmlFilesystemsClientUpdateResponse
- type AmlFilesystemsListResult
- type ArchiveStatusType
- 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 CacheUpgradeSettings
- type CacheUpgradeStatus
- type CacheUsernameDownloadSettings
- type CacheUsernameDownloadSettingsCredentials
- type CachesClient
- func (client *CachesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, ...) (*runtime.Poller[CachesClientCreateOrUpdateResponse], error)
- func (client *CachesClient) BeginDebugInfo(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[CachesClientDebugInfoResponse], error)
- func (client *CachesClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[CachesClientDeleteResponse], error)
- func (client *CachesClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[CachesClientFlushResponse], error)
- func (client *CachesClient) BeginPausePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[CachesClientPausePrimingJobResponse], error)
- func (client *CachesClient) BeginResumePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[CachesClientResumePrimingJobResponse], error)
- func (client *CachesClient) BeginSpaceAllocation(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[CachesClientSpaceAllocationResponse], error)
- func (client *CachesClient) BeginStart(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[CachesClientStartResponse], error)
- func (client *CachesClient) BeginStartPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[CachesClientStartPrimingJobResponse], error)
- func (client *CachesClient) BeginStop(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[CachesClientStopResponse], error)
- func (client *CachesClient) BeginStopPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[CachesClientStopPrimingJobResponse], error)
- func (client *CachesClient) BeginUpdate(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, ...) (*runtime.Poller[CachesClientUpdateResponse], error)
- func (client *CachesClient) BeginUpgradeFirmware(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[CachesClientUpgradeFirmwareResponse], error)
- func (client *CachesClient) Get(ctx context.Context, resourceGroupName string, cacheName string, ...) (CachesClientGetResponse, error)
- func (client *CachesClient) NewListByResourceGroupPager(resourceGroupName string, options *CachesClientListByResourceGroupOptions) *runtime.Pager[CachesClientListByResourceGroupResponse]
- func (client *CachesClient) NewListPager(options *CachesClientListOptions) *runtime.Pager[CachesClientListResponse]
- type CachesClientBeginCreateOrUpdateOptions
- type CachesClientBeginDebugInfoOptions
- type CachesClientBeginDeleteOptions
- type CachesClientBeginFlushOptions
- type CachesClientBeginPausePrimingJobOptions
- type CachesClientBeginResumePrimingJobOptions
- type CachesClientBeginSpaceAllocationOptions
- type CachesClientBeginStartOptions
- type CachesClientBeginStartPrimingJobOptions
- type CachesClientBeginStopOptions
- type CachesClientBeginStopPrimingJobOptions
- type CachesClientBeginUpdateOptions
- type CachesClientBeginUpgradeFirmwareOptions
- type CachesClientCreateOrUpdateResponse
- type CachesClientDebugInfoResponse
- type CachesClientDeleteResponse
- type CachesClientFlushResponse
- type CachesClientGetOptions
- type CachesClientGetResponse
- type CachesClientListByResourceGroupOptions
- type CachesClientListByResourceGroupResponse
- type CachesClientListOptions
- type CachesClientListResponse
- type CachesClientPausePrimingJobResponse
- type CachesClientResumePrimingJobResponse
- type CachesClientSpaceAllocationResponse
- type CachesClientStartPrimingJobResponse
- type CachesClientStartResponse
- type CachesClientStopPrimingJobResponse
- type CachesClientStopResponse
- type CachesClientUpdateResponse
- type CachesClientUpgradeFirmwareResponse
- type CachesListResult
- type ClfsTarget
- type ClientFactory
- func (c *ClientFactory) NewAmlFilesystemsClient() *AmlFilesystemsClient
- func (c *ClientFactory) NewAscOperationsClient() *AscOperationsClient
- func (c *ClientFactory) NewAscUsagesClient() *AscUsagesClient
- func (c *ClientFactory) NewCachesClient() *CachesClient
- func (c *ClientFactory) NewManagementClient() *ManagementClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewSKUsClient() *SKUsClient
- func (c *ClientFactory) NewStorageTargetClient() *StorageTargetClient
- func (c *ClientFactory) NewStorageTargetsClient() *StorageTargetsClient
- func (c *ClientFactory) NewUsageModelsClient() *UsageModelsClient
- type CloudErrorBody
- type Condition
- type CreatedByType
- type DomainJoinedType
- type ErrorResponse
- type FilesystemSubnetStatusType
- type FirmwareStatusType
- type HealthStateType
- type KeyVaultKeyReference
- type KeyVaultKeyReferenceSourceVault
- type LogSpecification
- type MaintenanceDayOfWeekType
- type ManagementClient
- func (client *ManagementClient) CheckAmlFSSubnets(ctx context.Context, options *ManagementClientCheckAmlFSSubnetsOptions) (ManagementClientCheckAmlFSSubnetsResponse, error)
- func (client *ManagementClient) GetRequiredAmlFSSubnetsSize(ctx context.Context, ...) (ManagementClientGetRequiredAmlFSSubnetsSizeResponse, error)
- type ManagementClientCheckAmlFSSubnetsOptions
- type ManagementClientCheckAmlFSSubnetsResponse
- type ManagementClientGetRequiredAmlFSSubnetsSizeOptions
- type ManagementClientGetRequiredAmlFSSubnetsSizeResponse
- 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 PrimingJob
- type PrimingJobIDParameter
- type PrimingJobState
- type ProvisioningStateType
- type ReasonCode
- type RequiredAmlFilesystemSubnetsSize
- type RequiredAmlFilesystemSubnetsSizeInfo
- type Resource
- type ResourceSKU
- type ResourceSKUCapabilities
- type ResourceSKULocationInfo
- type ResourceSKUsResult
- type ResourceUsage
- type ResourceUsageName
- type ResourceUsagesListResult
- type Restriction
- type SKUName
- type SKUsClient
- type SKUsClientListOptions
- type SKUsClientListResponse
- type StorageTarget
- type StorageTargetClient
- func (client *StorageTargetClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[StorageTargetClientFlushResponse], error)
- func (client *StorageTargetClient) BeginInvalidate(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[StorageTargetClientInvalidateResponse], error)
- func (client *StorageTargetClient) BeginResume(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[StorageTargetClientResumeResponse], error)
- func (client *StorageTargetClient) BeginSuspend(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[StorageTargetClientSuspendResponse], error)
- type StorageTargetClientBeginFlushOptions
- type StorageTargetClientBeginInvalidateOptions
- type StorageTargetClientBeginResumeOptions
- type StorageTargetClientBeginSuspendOptions
- type StorageTargetClientFlushResponse
- type StorageTargetClientInvalidateResponse
- type StorageTargetClientResumeResponse
- type StorageTargetClientSuspendResponse
- type StorageTargetProperties
- type StorageTargetResource
- type StorageTargetSpaceAllocation
- type StorageTargetType
- type StorageTargetsClient
- func (client *StorageTargetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[StorageTargetsClientCreateOrUpdateResponse], error)
- func (client *StorageTargetsClient) BeginDNSRefresh(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[StorageTargetsClientDNSRefreshResponse], error)
- func (client *StorageTargetsClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[StorageTargetsClientDeleteResponse], error)
- func (client *StorageTargetsClient) BeginRestoreDefaults(ctx context.Context, resourceGroupName string, cacheName string, ...) (*runtime.Poller[StorageTargetsClientRestoreDefaultsResponse], error)
- func (client *StorageTargetsClient) Get(ctx context.Context, resourceGroupName string, cacheName string, ...) (StorageTargetsClientGetResponse, error)
- func (client *StorageTargetsClient) NewListByCachePager(resourceGroupName string, cacheName string, ...) *runtime.Pager[StorageTargetsClientListByCacheResponse]
- type StorageTargetsClientBeginCreateOrUpdateOptions
- type StorageTargetsClientBeginDNSRefreshOptions
- type StorageTargetsClientBeginDeleteOptions
- type StorageTargetsClientBeginRestoreDefaultsOptions
- type StorageTargetsClientCreateOrUpdateResponse
- type StorageTargetsClientDNSRefreshResponse
- type StorageTargetsClientDeleteResponse
- type StorageTargetsClientGetOptions
- type StorageTargetsClientGetResponse
- type StorageTargetsClientListByCacheOptions
- type StorageTargetsClientListByCacheResponse
- type StorageTargetsClientRestoreDefaultsResponse
- type StorageTargetsResult
- type SystemData
- type TrackedResource
- type UnknownTarget
- type UsageModel
- type UsageModelDisplay
- type UsageModelsClient
- type UsageModelsClientListOptions
- type UsageModelsClientListResponse
- type UsageModelsResult
- type UserAssignedIdentitiesValue
- type UsernameDownloadedType
- type UsernameSource
Examples ¶
- AmlFilesystemsClient.Archive
- AmlFilesystemsClient.BeginCreateOrUpdate
- AmlFilesystemsClient.BeginDelete
- AmlFilesystemsClient.BeginUpdate
- AmlFilesystemsClient.CancelArchive
- AmlFilesystemsClient.Get
- AmlFilesystemsClient.NewListByResourceGroupPager
- AmlFilesystemsClient.NewListPager
- AscOperationsClient.Get
- AscUsagesClient.NewListPager
- CachesClient.BeginCreateOrUpdate (CachesCreateOrUpdate)
- CachesClient.BeginCreateOrUpdate (CachesCreateOrUpdateLdapOnly)
- CachesClient.BeginDebugInfo
- CachesClient.BeginDelete
- CachesClient.BeginFlush
- CachesClient.BeginPausePrimingJob
- CachesClient.BeginResumePrimingJob
- CachesClient.BeginSpaceAllocation
- CachesClient.BeginStart
- CachesClient.BeginStartPrimingJob
- CachesClient.BeginStop
- CachesClient.BeginStopPrimingJob
- CachesClient.BeginUpdate (CachesUpdate)
- CachesClient.BeginUpdate (CachesUpdateLdapOnly)
- CachesClient.BeginUpgradeFirmware
- CachesClient.Get
- CachesClient.NewListByResourceGroupPager
- CachesClient.NewListPager
- ManagementClient.CheckAmlFSSubnets
- ManagementClient.GetRequiredAmlFSSubnetsSize
- OperationsClient.NewListPager
- SKUsClient.NewListPager
- StorageTargetClient.BeginFlush
- StorageTargetClient.BeginInvalidate
- StorageTargetClient.BeginResume
- StorageTargetClient.BeginSuspend
- StorageTargetsClient.BeginCreateOrUpdate (StorageTargetsCreateOrUpdate)
- StorageTargetsClient.BeginCreateOrUpdate (StorageTargetsCreateOrUpdateBlobNfs)
- StorageTargetsClient.BeginCreateOrUpdate (StorageTargetsCreateOrUpdateNoJunctions)
- StorageTargetsClient.BeginDNSRefresh
- StorageTargetsClient.BeginDelete
- StorageTargetsClient.BeginRestoreDefaults
- StorageTargetsClient.Get
- StorageTargetsClient.NewListByCachePager
- UsageModelsClient.NewListPager
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 // The flag that indicates whether the operation applies to data plane. IsDataAction *bool // Operation name: {provider}/{resource}/{operation} Name *string // Origin of the operation. Origin *string // Additional details about an operation. Properties *APIOperationProperties }
APIOperation - REST API operation description: see https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/openapi-authoring-automated-guidelines.md#r3023-operationsapiimplementation
func (APIOperation) MarshalJSON ¶
func (a APIOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type APIOperation.
func (*APIOperation) UnmarshalJSON ¶
func (a *APIOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type APIOperation.
type APIOperationDisplay ¶
type APIOperationDisplay struct { // The description of the operation Description *string // Operation type: Read, write, delete, etc. Operation *string // Service provider: Microsoft.StorageCache Provider *string // Resource on which the operation is performed: Cache, etc. Resource *string }
APIOperationDisplay - The object that represents the operation.
func (APIOperationDisplay) MarshalJSON ¶
func (a APIOperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type APIOperationDisplay.
func (*APIOperationDisplay) UnmarshalJSON ¶
func (a *APIOperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationDisplay.
type APIOperationListResult ¶
type APIOperationListResult struct { // URL to get the next set of operation list results if there are any. NextLink *string // List of Resource Provider operations supported by the Microsoft.StorageCache resource provider. Value []*APIOperation }
APIOperationListResult - Result of the request to list Resource Provider operations. It contains a list of operations and a URL link to get the next set of results.
func (APIOperationListResult) MarshalJSON ¶
func (a APIOperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type APIOperationListResult.
func (*APIOperationListResult) UnmarshalJSON ¶
func (a *APIOperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationListResult.
type APIOperationProperties ¶
type APIOperationProperties struct { // Specification of the all the metrics provided for a resource type. ServiceSpecification *APIOperationPropertiesServiceSpecification }
APIOperationProperties - Additional details about an operation.
func (APIOperationProperties) MarshalJSON ¶
func (a APIOperationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type APIOperationProperties.
func (*APIOperationProperties) UnmarshalJSON ¶
func (a *APIOperationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationProperties.
type APIOperationPropertiesServiceSpecification ¶
type APIOperationPropertiesServiceSpecification struct { // Details about operations related to logs. LogSpecifications []*LogSpecification // Details about operations related to metrics. MetricSpecifications []*MetricSpecification }
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.
func (*APIOperationPropertiesServiceSpecification) UnmarshalJSON ¶
func (a *APIOperationPropertiesServiceSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type APIOperationPropertiesServiceSpecification.
type AmlFilesystem ¶ added in v3.2.0
type AmlFilesystem struct { // REQUIRED; The geo-location where the resource lives Location *string // The managed identity used by the AML file system, if configured. Identity *AmlFilesystemIdentity // Properties of the AML file system. Properties *AmlFilesystemProperties // SKU for the resource. SKU *SKUName // Resource tags. Tags map[string]*string // Availability zones for resources. This field should only contain a single element in the array. Zones []*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
AmlFilesystem - An AML file system instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md
func (AmlFilesystem) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystem.
func (*AmlFilesystem) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystem.
type AmlFilesystemArchive ¶ added in v3.2.0
type AmlFilesystemArchive struct { // READ-ONLY; Lustre file system path to archive relative to the file system root. Specify '/' to archive all modified data. FilesystemPath *string // READ-ONLY; The status of the archive Status *AmlFilesystemArchiveStatus }
AmlFilesystemArchive - Information about the AML file system archive
func (AmlFilesystemArchive) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemArchive) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemArchive.
func (*AmlFilesystemArchive) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemArchive) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemArchive.
type AmlFilesystemArchiveInfo ¶ added in v3.2.0
type AmlFilesystemArchiveInfo struct { // Lustre file system path to archive relative to the file system root. Specify '/' to archive all modified data. FilesystemPath *string }
AmlFilesystemArchiveInfo - Information required to execute the archive operation
func (AmlFilesystemArchiveInfo) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemArchiveInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemArchiveInfo.
func (*AmlFilesystemArchiveInfo) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemArchiveInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemArchiveInfo.
type AmlFilesystemArchiveStatus ¶ added in v3.2.0
type AmlFilesystemArchiveStatus struct { // READ-ONLY; Server-defined error code for the archive operation ErrorCode *string // READ-ONLY; Server-defined error message for the archive operation ErrorMessage *string // READ-ONLY; The time of the last completed archive operation LastCompletionTime *time.Time // READ-ONLY; The time the latest archive operation started LastStartedTime *time.Time // READ-ONLY; The completion percentage of the archive operation PercentComplete *int32 // READ-ONLY; The state of the archive operation State *ArchiveStatusType }
AmlFilesystemArchiveStatus - The status of the archive
func (AmlFilesystemArchiveStatus) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemArchiveStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemArchiveStatus.
func (*AmlFilesystemArchiveStatus) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemArchiveStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemArchiveStatus.
type AmlFilesystemCheckSubnetError ¶ added in v3.2.0
type AmlFilesystemCheckSubnetError struct { // The error details for the AML file system's subnet. FilesystemSubnet *AmlFilesystemCheckSubnetErrorFilesystemSubnet }
AmlFilesystemCheckSubnetError - The error details provided when the checkAmlFSSubnets call fails.
func (AmlFilesystemCheckSubnetError) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemCheckSubnetError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemCheckSubnetError.
func (*AmlFilesystemCheckSubnetError) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemCheckSubnetError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemCheckSubnetError.
type AmlFilesystemCheckSubnetErrorFilesystemSubnet ¶ added in v3.2.0
type AmlFilesystemCheckSubnetErrorFilesystemSubnet struct { // The details of the AML file system subnet check. Message *string // The status of the AML file system subnet check. Status *FilesystemSubnetStatusType }
AmlFilesystemCheckSubnetErrorFilesystemSubnet - The error details for the AML file system's subnet.
func (AmlFilesystemCheckSubnetErrorFilesystemSubnet) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemCheckSubnetErrorFilesystemSubnet) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemCheckSubnetErrorFilesystemSubnet.
func (*AmlFilesystemCheckSubnetErrorFilesystemSubnet) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemCheckSubnetErrorFilesystemSubnet) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemCheckSubnetErrorFilesystemSubnet.
type AmlFilesystemClientInfo ¶ added in v3.2.0
type AmlFilesystemClientInfo struct { // READ-ONLY; Container Storage Interface information for the AML file system. ContainerStorageInterface *AmlFilesystemContainerStorageInterface // READ-ONLY; The version of Lustre running in the AML file system LustreVersion *string // READ-ONLY; The IPv4 address used by clients to mount the AML file system's Lustre Management Service (MGS). MgsAddress *string // READ-ONLY; Recommended command to mount the AML file system MountCommand *string }
AmlFilesystemClientInfo - AML file system client information
func (AmlFilesystemClientInfo) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemClientInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemClientInfo.
func (*AmlFilesystemClientInfo) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemClientInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemClientInfo.
type AmlFilesystemContainerStorageInterface ¶ added in v3.2.0
type AmlFilesystemContainerStorageInterface struct { // READ-ONLY; Recommended AKS Persistent Volume for the CSI driver, in Base64 encoded YAML PersistentVolume *string // READ-ONLY; Recommended AKS Persistent Volume Claim for the CSI driver, in Base64 encoded YAML PersistentVolumeClaim *string // READ-ONLY; Recommended AKS Storage Class for the CSI driver, in Base64 encoded YAML StorageClass *string }
AmlFilesystemContainerStorageInterface - AML file system container storage interface information
func (AmlFilesystemContainerStorageInterface) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemContainerStorageInterface) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemContainerStorageInterface.
func (*AmlFilesystemContainerStorageInterface) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemContainerStorageInterface) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemContainerStorageInterface.
type AmlFilesystemEncryptionSettings ¶ added in v3.2.0
type AmlFilesystemEncryptionSettings struct { // Specifies the location of the encryption key in Key Vault. KeyEncryptionKey *KeyVaultKeyReference }
AmlFilesystemEncryptionSettings - AML file system encryption settings.
func (AmlFilesystemEncryptionSettings) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemEncryptionSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemEncryptionSettings.
func (*AmlFilesystemEncryptionSettings) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemEncryptionSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemEncryptionSettings.
type AmlFilesystemHealth ¶ added in v3.2.0
type AmlFilesystemHealth struct { // List of AML file system health states. State *AmlFilesystemHealthStateType // Server-defined error code for the AML file system health StatusCode *string // Describes the health state. StatusDescription *string }
AmlFilesystemHealth - An indication of AML file system health. Gives more information about health than just that related to provisioning.
func (AmlFilesystemHealth) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemHealth) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemHealth.
func (*AmlFilesystemHealth) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemHealth) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemHealth.
type AmlFilesystemHealthStateType ¶ added in v3.2.0
type AmlFilesystemHealthStateType string
AmlFilesystemHealthStateType - List of AML file system health states.
const ( AmlFilesystemHealthStateTypeAvailable AmlFilesystemHealthStateType = "Available" AmlFilesystemHealthStateTypeDegraded AmlFilesystemHealthStateType = "Degraded" AmlFilesystemHealthStateTypeMaintenance AmlFilesystemHealthStateType = "Maintenance" AmlFilesystemHealthStateTypeTransitioning AmlFilesystemHealthStateType = "Transitioning" )
func PossibleAmlFilesystemHealthStateTypeValues ¶ added in v3.2.0
func PossibleAmlFilesystemHealthStateTypeValues() []AmlFilesystemHealthStateType
PossibleAmlFilesystemHealthStateTypeValues returns the possible values for the AmlFilesystemHealthStateType const type.
type AmlFilesystemHsmSettings ¶ added in v3.2.0
type AmlFilesystemHsmSettings struct { // REQUIRED; Resource ID of storage container used for hydrating the namespace and archiving from the namespace. The resource // provider must have permission to create SAS tokens on the storage account. Container *string // REQUIRED; Resource ID of storage container used for logging events and errors. Must be a separate container in the same // storage account as the hydration and archive container. The resource provider must have // permission to create SAS tokens on the storage account. LoggingContainer *string // Only blobs in the non-logging container that start with this path/prefix get hydrated into the cluster namespace. ImportPrefix *string }
AmlFilesystemHsmSettings - AML file system HSM settings.
func (AmlFilesystemHsmSettings) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemHsmSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemHsmSettings.
func (*AmlFilesystemHsmSettings) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemHsmSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemHsmSettings.
type AmlFilesystemIdentity ¶ added in v3.2.0
type AmlFilesystemIdentity struct { // The type of identity used for the resource. Type *AmlFilesystemIdentityType // 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 // READ-ONLY; The principal ID for the user-assigned identity of the resource. PrincipalID *string // READ-ONLY; The tenant ID associated with the resource. TenantID *string }
AmlFilesystemIdentity - Managed Identity properties.
func (AmlFilesystemIdentity) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemIdentity.
func (*AmlFilesystemIdentity) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemIdentity.
type AmlFilesystemIdentityType ¶ added in v3.2.0
type AmlFilesystemIdentityType string
AmlFilesystemIdentityType - The type of identity used for the resource.
const ( AmlFilesystemIdentityTypeNone AmlFilesystemIdentityType = "None" AmlFilesystemIdentityTypeUserAssigned AmlFilesystemIdentityType = "UserAssigned" )
func PossibleAmlFilesystemIdentityTypeValues ¶ added in v3.2.0
func PossibleAmlFilesystemIdentityTypeValues() []AmlFilesystemIdentityType
PossibleAmlFilesystemIdentityTypeValues returns the possible values for the AmlFilesystemIdentityType const type.
type AmlFilesystemProperties ¶ added in v3.2.0
type AmlFilesystemProperties struct { // REQUIRED; Subnet used for managing the AML file system and for client-facing operations. This subnet should have at least // a /24 subnet mask within the VNET's address space. FilesystemSubnet *string // REQUIRED; Start time of a 30-minute weekly maintenance window. MaintenanceWindow *AmlFilesystemPropertiesMaintenanceWindow // REQUIRED; The size of the AML file system, in TiB. This might be rounded up. StorageCapacityTiB *float32 // Specifies encryption settings of the AML file system. EncryptionSettings *AmlFilesystemEncryptionSettings // Hydration and archive settings and status Hsm *AmlFilesystemPropertiesHsm // READ-ONLY; Client information for the AML file system. ClientInfo *AmlFilesystemClientInfo // READ-ONLY; Health of the AML file system. Health *AmlFilesystemHealth // READ-ONLY; ARM provisioning state. ProvisioningState *AmlFilesystemProvisioningStateType // READ-ONLY; Throughput provisioned in MB per sec, calculated as storageCapacityTiB * per-unit storage throughput ThroughputProvisionedMBps *int32 }
AmlFilesystemProperties - Properties of the AML file system.
func (AmlFilesystemProperties) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemProperties.
func (*AmlFilesystemProperties) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemProperties.
type AmlFilesystemPropertiesHsm ¶ added in v3.2.0
type AmlFilesystemPropertiesHsm struct { // Specifies HSM settings of the AML file system. Settings *AmlFilesystemHsmSettings // READ-ONLY; Archive status ArchiveStatus []*AmlFilesystemArchive }
AmlFilesystemPropertiesHsm - Hydration and archive settings and status
func (AmlFilesystemPropertiesHsm) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemPropertiesHsm) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemPropertiesHsm.
func (*AmlFilesystemPropertiesHsm) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemPropertiesHsm) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemPropertiesHsm.
type AmlFilesystemPropertiesMaintenanceWindow ¶ added in v3.2.0
type AmlFilesystemPropertiesMaintenanceWindow struct { // Day of the week on which the maintenance window will occur. DayOfWeek *MaintenanceDayOfWeekType // The time of day (in UTC) to start the maintenance window. TimeOfDayUTC *string }
AmlFilesystemPropertiesMaintenanceWindow - Start time of a 30-minute weekly maintenance window.
func (AmlFilesystemPropertiesMaintenanceWindow) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemPropertiesMaintenanceWindow) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemPropertiesMaintenanceWindow.
func (*AmlFilesystemPropertiesMaintenanceWindow) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemPropertiesMaintenanceWindow) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemPropertiesMaintenanceWindow.
type AmlFilesystemProvisioningStateType ¶ added in v3.2.0
type AmlFilesystemProvisioningStateType string
AmlFilesystemProvisioningStateType - ARM provisioning state.
const ( AmlFilesystemProvisioningStateTypeCanceled AmlFilesystemProvisioningStateType = "Canceled" AmlFilesystemProvisioningStateTypeCreating AmlFilesystemProvisioningStateType = "Creating" AmlFilesystemProvisioningStateTypeDeleting AmlFilesystemProvisioningStateType = "Deleting" AmlFilesystemProvisioningStateTypeFailed AmlFilesystemProvisioningStateType = "Failed" AmlFilesystemProvisioningStateTypeSucceeded AmlFilesystemProvisioningStateType = "Succeeded" AmlFilesystemProvisioningStateTypeUpdating AmlFilesystemProvisioningStateType = "Updating" )
func PossibleAmlFilesystemProvisioningStateTypeValues ¶ added in v3.2.0
func PossibleAmlFilesystemProvisioningStateTypeValues() []AmlFilesystemProvisioningStateType
PossibleAmlFilesystemProvisioningStateTypeValues returns the possible values for the AmlFilesystemProvisioningStateType const type.
type AmlFilesystemSubnetInfo ¶ added in v3.2.0
type AmlFilesystemSubnetInfo struct { // Subnet used for managing the AML file system and for client-facing operations. This subnet should have at least a /24 subnet // mask within the VNET's address space. FilesystemSubnet *string // Region that the AML file system will be created in. Location *string // SKU for the resource. SKU *SKUName // The size of the AML file system, in TiB. StorageCapacityTiB *float32 }
AmlFilesystemSubnetInfo - Information required to validate the subnet that will be used in AML file system create
func (AmlFilesystemSubnetInfo) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemSubnetInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemSubnetInfo.
func (*AmlFilesystemSubnetInfo) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemSubnetInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemSubnetInfo.
type AmlFilesystemUpdate ¶ added in v3.2.0
type AmlFilesystemUpdate struct { // Properties of the AML file system. Properties *AmlFilesystemUpdateProperties // Resource tags. Tags map[string]*string }
AmlFilesystemUpdate - An AML file system update instance.
func (AmlFilesystemUpdate) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemUpdate.
func (*AmlFilesystemUpdate) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemUpdate.
type AmlFilesystemUpdateProperties ¶ added in v3.2.0
type AmlFilesystemUpdateProperties struct { // Specifies encryption settings of the AML file system. EncryptionSettings *AmlFilesystemEncryptionSettings // Start time of a 30-minute weekly maintenance window. MaintenanceWindow *AmlFilesystemUpdatePropertiesMaintenanceWindow }
AmlFilesystemUpdateProperties - Properties of the AML file system.
func (AmlFilesystemUpdateProperties) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemUpdateProperties.
func (*AmlFilesystemUpdateProperties) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemUpdateProperties.
type AmlFilesystemUpdatePropertiesMaintenanceWindow ¶ added in v3.2.0
type AmlFilesystemUpdatePropertiesMaintenanceWindow struct { // Day of the week on which the maintenance window will occur. DayOfWeek *MaintenanceDayOfWeekType // The time of day (in UTC) to start the maintenance window. TimeOfDayUTC *string }
AmlFilesystemUpdatePropertiesMaintenanceWindow - Start time of a 30-minute weekly maintenance window.
func (AmlFilesystemUpdatePropertiesMaintenanceWindow) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemUpdatePropertiesMaintenanceWindow) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemUpdatePropertiesMaintenanceWindow.
func (*AmlFilesystemUpdatePropertiesMaintenanceWindow) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemUpdatePropertiesMaintenanceWindow) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemUpdatePropertiesMaintenanceWindow.
type AmlFilesystemsClient ¶ added in v3.2.0
type AmlFilesystemsClient struct {
// contains filtered or unexported fields
}
AmlFilesystemsClient contains the methods for the AmlFilesystems group. Don't use this type directly, use NewAmlFilesystemsClient() instead.
func NewAmlFilesystemsClient ¶ added in v3.2.0
func NewAmlFilesystemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AmlFilesystemsClient, error)
NewAmlFilesystemsClient creates a new instance of AmlFilesystemsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AmlFilesystemsClient) Archive ¶ added in v3.2.0
func (client *AmlFilesystemsClient) Archive(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientArchiveOptions) (AmlFilesystemsClientArchiveResponse, error)
Archive - Archive data from the AML file system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric.
- options - AmlFilesystemsClientArchiveOptions contains the optional parameters for the AmlFilesystemsClient.Archive method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Archive.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewAmlFilesystemsClient().Archive(ctx, "scgroup", "sc", &armstoragecache.AmlFilesystemsClientArchiveOptions{ArchiveInfo: &armstoragecache.AmlFilesystemArchiveInfo{ FilesystemPath: to.Ptr("/"), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*AmlFilesystemsClient) BeginCreateOrUpdate ¶ added in v3.2.0
func (client *AmlFilesystemsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystem, options *AmlFilesystemsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AmlFilesystemsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update an AML file system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric.
- amlFilesystem - Object containing the user-selectable properties of the AML file system. If read-only properties are included, they must match the existing values of those properties.
- options - AmlFilesystemsClientBeginCreateOrUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_CreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAmlFilesystemsClient().BeginCreateOrUpdate(ctx, "scgroup", "fs1", armstoragecache.AmlFilesystem{ Location: to.Ptr("eastus"), Tags: map[string]*string{ "Dept": to.Ptr("ContosoAds"), }, Identity: &armstoragecache.AmlFilesystemIdentity{ Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, Properties: &armstoragecache.AmlFilesystemProperties{ EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), }, }, }, FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub"), Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ Settings: &armstoragecache.AmlFilesystemHsmSettings{ Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), ImportPrefix: to.Ptr("/"), LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), }, }, MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), TimeOfDayUTC: to.Ptr("22:00"), }, StorageCapacityTiB: to.Ptr[float32](16), }, SKU: &armstoragecache.SKUName{ Name: to.Ptr("AMLFS-Durable-Premium-250"), }, Zones: []*string{ to.Ptr("1")}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AmlFilesystem = armstoragecache.AmlFilesystem{ // Name: to.Ptr("fs1"), // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs1"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "Dept": to.Ptr("ContosoAds"), // }, // Identity: &armstoragecache.AmlFilesystemIdentity{ // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ // }, // }, // }, // Properties: &armstoragecache.AmlFilesystemProperties{ // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ // PersistentVolume: to.Ptr("<Base64 encoded YAML>"), // PersistentVolumeClaim: to.Ptr("<Base64 encoded YAML>"), // StorageClass: to.Ptr("<Base64 encoded YAML>"), // }, // LustreVersion: to.Ptr("2.15.0"), // MgsAddress: to.Ptr("10.0.0.4"), // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), // }, // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub"), // Health: &armstoragecache.AmlFilesystemHealth{ // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), // StatusDescription: to.Ptr("amlFilesystem is ok."), // }, // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ // { // FilesystemPath: to.Ptr("/"), // Status: &armstoragecache.AmlFilesystemArchiveStatus{ // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), // }, // }}, // Settings: &armstoragecache.AmlFilesystemHsmSettings{ // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), // ImportPrefix: to.Ptr("/"), // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), // }, // }, // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), // TimeOfDayUTC: to.Ptr("22:00"), // }, // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), // StorageCapacityTiB: to.Ptr[float32](16), // ThroughputProvisionedMBps: to.Ptr[int32](500), // }, // SKU: &armstoragecache.SKUName{ // Name: to.Ptr("AMLFS-Durable-Premium-250"), // }, // Zones: []*string{ // to.Ptr("1")}, // }
Output:
func (*AmlFilesystemsClient) BeginDelete ¶ added in v3.2.0
func (client *AmlFilesystemsClient) BeginDelete(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientBeginDeleteOptions) (*runtime.Poller[AmlFilesystemsClientDeleteResponse], error)
BeginDelete - Schedules an AML file system for deletion. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric.
- options - AmlFilesystemsClientBeginDeleteOptions contains the optional parameters for the AmlFilesystemsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAmlFilesystemsClient().BeginDelete(ctx, "scgroup", "fs1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*AmlFilesystemsClient) BeginUpdate ¶ added in v3.2.0
func (client *AmlFilesystemsClient) BeginUpdate(ctx context.Context, resourceGroupName string, amlFilesystemName string, amlFilesystem AmlFilesystemUpdate, options *AmlFilesystemsClientBeginUpdateOptions) (*runtime.Poller[AmlFilesystemsClientUpdateResponse], error)
BeginUpdate - Update an AML file system instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric.
- amlFilesystem - Object containing the user-selectable properties of the AML file system. If read-only properties are included, they must match the existing values of those properties.
- options - AmlFilesystemsClientBeginUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewAmlFilesystemsClient().BeginUpdate(ctx, "scgroup", "fs1", armstoragecache.AmlFilesystemUpdate{ Properties: &armstoragecache.AmlFilesystemUpdateProperties{ EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), }, }, }, MaintenanceWindow: &armstoragecache.AmlFilesystemUpdatePropertiesMaintenanceWindow{ DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), TimeOfDayUTC: to.Ptr("22:00"), }, }, Tags: map[string]*string{ "Dept": to.Ptr("ContosoAds"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AmlFilesystem = armstoragecache.AmlFilesystem{ // Name: to.Ptr("fs1"), // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs1"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "Dept": to.Ptr("ContosoAds"), // }, // Identity: &armstoragecache.AmlFilesystemIdentity{ // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ // }, // }, // }, // Properties: &armstoragecache.AmlFilesystemProperties{ // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ // PersistentVolume: to.Ptr("<Base64 encoded YAML>"), // PersistentVolumeClaim: to.Ptr("<Base64 encoded YAML>"), // StorageClass: to.Ptr("<Base64 encoded YAML>"), // }, // LustreVersion: to.Ptr("2.15.0"), // MgsAddress: to.Ptr("10.0.0.4"), // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), // }, // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub"), // Health: &armstoragecache.AmlFilesystemHealth{ // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), // StatusDescription: to.Ptr("amlFilesystem is ok."), // }, // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ // { // FilesystemPath: to.Ptr("/"), // Status: &armstoragecache.AmlFilesystemArchiveStatus{ // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), // }, // }}, // Settings: &armstoragecache.AmlFilesystemHsmSettings{ // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), // ImportPrefix: to.Ptr("/"), // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), // }, // }, // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), // TimeOfDayUTC: to.Ptr("22:00"), // }, // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), // StorageCapacityTiB: to.Ptr[float32](16), // ThroughputProvisionedMBps: to.Ptr[int32](500), // }, // SKU: &armstoragecache.SKUName{ // Name: to.Ptr("AMLFS-Durable-Premium-250"), // }, // Zones: []*string{ // to.Ptr("1")}, // }
Output:
func (*AmlFilesystemsClient) CancelArchive ¶ added in v3.2.0
func (client *AmlFilesystemsClient) CancelArchive(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientCancelArchiveOptions) (AmlFilesystemsClientCancelArchiveResponse, error)
CancelArchive - Cancel archiving data from the AML file system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric.
- options - AmlFilesystemsClientCancelArchiveOptions contains the optional parameters for the AmlFilesystemsClient.CancelArchive method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_CancelArchive.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewAmlFilesystemsClient().CancelArchive(ctx, "scgroup", "sc", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*AmlFilesystemsClient) Get ¶ added in v3.2.0
func (client *AmlFilesystemsClient) Get(ctx context.Context, resourceGroupName string, amlFilesystemName string, options *AmlFilesystemsClientGetOptions) (AmlFilesystemsClientGetResponse, error)
Get - Returns an AML file system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- amlFilesystemName - Name for the AML file system. Allows alphanumerics, underscores, and hyphens. Start and end with alphanumeric.
- options - AmlFilesystemsClientGetOptions contains the optional parameters for the AmlFilesystemsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAmlFilesystemsClient().Get(ctx, "scgroup", "fs1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AmlFilesystem = armstoragecache.AmlFilesystem{ // Name: to.Ptr("fs1"), // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs1"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "Dept": to.Ptr("ContosoAds"), // }, // Identity: &armstoragecache.AmlFilesystemIdentity{ // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ // }, // }, // }, // Properties: &armstoragecache.AmlFilesystemProperties{ // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ // PersistentVolume: to.Ptr("<Base64 encoded YAML>"), // PersistentVolumeClaim: to.Ptr("<Base64 encoded YAML>"), // StorageClass: to.Ptr("<Base64 encoded YAML>"), // }, // LustreVersion: to.Ptr("2.15.0"), // MgsAddress: to.Ptr("10.0.0.4"), // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), // }, // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2048/test"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub"), // Health: &armstoragecache.AmlFilesystemHealth{ // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), // StatusDescription: to.Ptr("amlFilesystem is ok."), // }, // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ // { // FilesystemPath: to.Ptr("/"), // Status: &armstoragecache.AmlFilesystemArchiveStatus{ // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), // }, // }}, // Settings: &armstoragecache.AmlFilesystemHsmSettings{ // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), // ImportPrefix: to.Ptr("/"), // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), // }, // }, // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), // TimeOfDayUTC: to.Ptr("22:00"), // }, // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), // StorageCapacityTiB: to.Ptr[float32](16), // ThroughputProvisionedMBps: to.Ptr[int32](500), // }, // SKU: &armstoragecache.SKUName{ // Name: to.Ptr("AMLFS-Durable-Premium-250"), // }, // Zones: []*string{ // to.Ptr("1")}, // }
Output:
func (*AmlFilesystemsClient) NewListByResourceGroupPager ¶ added in v3.2.0
func (client *AmlFilesystemsClient) NewListByResourceGroupPager(resourceGroupName string, options *AmlFilesystemsClientListByResourceGroupOptions) *runtime.Pager[AmlFilesystemsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Returns all AML file systems the user has access to under a resource group.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - AmlFilesystemsClientListByResourceGroupOptions contains the optional parameters for the AmlFilesystemsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_ListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAmlFilesystemsClient().NewListByResourceGroupPager("scgroup", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.AmlFilesystemsListResult = armstoragecache.AmlFilesystemsListResult{ // Value: []*armstoragecache.AmlFilesystem{ // { // Name: to.Ptr("fs1"), // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs1"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "Dept": to.Ptr("ContosoAds"), // }, // Identity: &armstoragecache.AmlFilesystemIdentity{ // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ // }, // }, // }, // Properties: &armstoragecache.AmlFilesystemProperties{ // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ // PersistentVolume: to.Ptr("<Base64 encoded YAML>"), // PersistentVolumeClaim: to.Ptr("<Base64 encoded YAML>"), // StorageClass: to.Ptr("<Base64 encoded YAML>"), // }, // LustreVersion: to.Ptr("2.15.0"), // MgsAddress: to.Ptr("10.0.0.4"), // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), // }, // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub1"), // Health: &armstoragecache.AmlFilesystemHealth{ // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), // StatusDescription: to.Ptr("amlFilesystem is ok."), // }, // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ // { // FilesystemPath: to.Ptr("/"), // Status: &armstoragecache.AmlFilesystemArchiveStatus{ // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), // }, // }}, // Settings: &armstoragecache.AmlFilesystemHsmSettings{ // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), // ImportPrefix: to.Ptr("/"), // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), // }, // }, // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), // TimeOfDayUTC: to.Ptr("22:00"), // }, // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), // StorageCapacityTiB: to.Ptr[float32](16), // ThroughputProvisionedMBps: to.Ptr[int32](500), // }, // SKU: &armstoragecache.SKUName{ // Name: to.Ptr("AMLFS-Durable-Premium-250"), // }, // Zones: []*string{ // to.Ptr("1")}, // }, // { // Name: to.Ptr("fs2"), // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs2"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "Dept": to.Ptr("ContosoAds"), // }, // Identity: &armstoragecache.AmlFilesystemIdentity{ // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ // }, // }, // }, // Properties: &armstoragecache.AmlFilesystemProperties{ // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ // PersistentVolume: to.Ptr("<Base64 encoded YAML>"), // PersistentVolumeClaim: to.Ptr("<Base64 encoded YAML>"), // StorageClass: to.Ptr("<Base64 encoded YAML>"), // }, // LustreVersion: to.Ptr("2.15.0"), // MgsAddress: to.Ptr("10.0.0.4"), // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), // }, // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub2"), // Health: &armstoragecache.AmlFilesystemHealth{ // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), // StatusDescription: to.Ptr("amlFilesystem is ok."), // }, // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ // { // FilesystemPath: to.Ptr("/"), // Status: &armstoragecache.AmlFilesystemArchiveStatus{ // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), // }, // }}, // Settings: &armstoragecache.AmlFilesystemHsmSettings{ // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), // ImportPrefix: to.Ptr("/"), // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), // }, // }, // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), // TimeOfDayUTC: to.Ptr("22:00"), // }, // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), // StorageCapacityTiB: to.Ptr[float32](16), // ThroughputProvisionedMBps: to.Ptr[int32](500), // }, // SKU: &armstoragecache.SKUName{ // Name: to.Ptr("AMLFS-Durable-Premium-250"), // }, // Zones: []*string{ // to.Ptr("1")}, // }}, // } }
Output:
func (*AmlFilesystemsClient) NewListPager ¶ added in v3.2.0
func (client *AmlFilesystemsClient) NewListPager(options *AmlFilesystemsClientListOptions) *runtime.Pager[AmlFilesystemsClientListResponse]
NewListPager - Returns all AML file systems the user has access to under a subscription.
Generated from API version 2023-05-01
- options - AmlFilesystemsClientListOptions contains the optional parameters for the AmlFilesystemsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/amlFilesystems_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAmlFilesystemsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.AmlFilesystemsListResult = armstoragecache.AmlFilesystemsListResult{ // Value: []*armstoragecache.AmlFilesystem{ // { // Name: to.Ptr("fs1"), // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs1"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "Dept": to.Ptr("ContosoAds"), // }, // Identity: &armstoragecache.AmlFilesystemIdentity{ // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ // }, // }, // }, // Properties: &armstoragecache.AmlFilesystemProperties{ // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ // PersistentVolume: to.Ptr("<Base64 encoded YAML>"), // PersistentVolumeClaim: to.Ptr("<Base64 encoded YAML>"), // StorageClass: to.Ptr("<Base64 encoded YAML>"), // }, // LustreVersion: to.Ptr("2.15.0"), // MgsAddress: to.Ptr("10.0.0.4"), // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), // }, // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub1"), // Health: &armstoragecache.AmlFilesystemHealth{ // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), // StatusDescription: to.Ptr("amlFilesystem is ok."), // }, // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ // { // FilesystemPath: to.Ptr("/"), // Status: &armstoragecache.AmlFilesystemArchiveStatus{ // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), // }, // }}, // Settings: &armstoragecache.AmlFilesystemHsmSettings{ // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), // ImportPrefix: to.Ptr("/"), // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), // }, // }, // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), // TimeOfDayUTC: to.Ptr("22:00"), // }, // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), // StorageCapacityTiB: to.Ptr[float32](16), // ThroughputProvisionedMBps: to.Ptr[int32](500), // }, // SKU: &armstoragecache.SKUName{ // Name: to.Ptr("AMLFS-Durable-Premium-250"), // }, // Zones: []*string{ // to.Ptr("1")}, // }, // { // Name: to.Ptr("fs2"), // Type: to.Ptr("Microsoft.StorageCache/amlFilesystem"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/amlFilesystems/fs2"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "Dept": to.Ptr("ContosoAds"), // }, // Identity: &armstoragecache.AmlFilesystemIdentity{ // Type: to.Ptr(armstoragecache.AmlFilesystemIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armstoragecache.UserAssignedIdentitiesValue{ // }, // }, // }, // Properties: &armstoragecache.AmlFilesystemProperties{ // ClientInfo: &armstoragecache.AmlFilesystemClientInfo{ // ContainerStorageInterface: &armstoragecache.AmlFilesystemContainerStorageInterface{ // PersistentVolume: to.Ptr("<Base64 encoded YAML>"), // PersistentVolumeClaim: to.Ptr("<Base64 encoded YAML>"), // StorageClass: to.Ptr("<Base64 encoded YAML>"), // }, // LustreVersion: to.Ptr("2.15.0"), // MgsAddress: to.Ptr("10.0.0.4"), // MountCommand: to.Ptr("mount -t lustre 10.0.0.4@tcp:/lustrefs /lustre/lustrefs"), // }, // EncryptionSettings: &armstoragecache.AmlFilesystemEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://examplekv.vault.azure.net/keys/kvk/3540a47df75541378d3518c6a4bdf5af"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub2"), // Health: &armstoragecache.AmlFilesystemHealth{ // State: to.Ptr(armstoragecache.AmlFilesystemHealthStateTypeAvailable), // StatusDescription: to.Ptr("amlFilesystem is ok."), // }, // Hsm: &armstoragecache.AmlFilesystemPropertiesHsm{ // ArchiveStatus: []*armstoragecache.AmlFilesystemArchive{ // { // FilesystemPath: to.Ptr("/"), // Status: &armstoragecache.AmlFilesystemArchiveStatus{ // LastCompletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // LastStartedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T17:25:43.511Z"); return t}()), // State: to.Ptr(armstoragecache.ArchiveStatusTypeCompleted), // }, // }}, // Settings: &armstoragecache.AmlFilesystemHsmSettings{ // Container: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/containername"), // ImportPrefix: to.Ptr("/"), // LoggingContainer: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/storageaccountname/blobServices/default/containers/loggingcontainername"), // }, // }, // MaintenanceWindow: &armstoragecache.AmlFilesystemPropertiesMaintenanceWindow{ // DayOfWeek: to.Ptr(armstoragecache.MaintenanceDayOfWeekTypeFriday), // TimeOfDayUTC: to.Ptr("22:00"), // }, // ProvisioningState: to.Ptr(armstoragecache.AmlFilesystemProvisioningStateTypeSucceeded), // StorageCapacityTiB: to.Ptr[float32](16), // ThroughputProvisionedMBps: to.Ptr[int32](500), // }, // SKU: &armstoragecache.SKUName{ // Name: to.Ptr("AMLFS-Durable-Premium-250"), // }, // Zones: []*string{ // to.Ptr("1")}, // }}, // } }
Output:
type AmlFilesystemsClientArchiveOptions ¶ added in v3.2.0
type AmlFilesystemsClientArchiveOptions struct { // Information about the archive operation ArchiveInfo *AmlFilesystemArchiveInfo }
AmlFilesystemsClientArchiveOptions contains the optional parameters for the AmlFilesystemsClient.Archive method.
type AmlFilesystemsClientArchiveResponse ¶ added in v3.2.0
type AmlFilesystemsClientArchiveResponse struct { }
AmlFilesystemsClientArchiveResponse contains the response from method AmlFilesystemsClient.Archive.
type AmlFilesystemsClientBeginCreateOrUpdateOptions ¶ added in v3.2.0
type AmlFilesystemsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AmlFilesystemsClientBeginCreateOrUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginCreateOrUpdate method.
type AmlFilesystemsClientBeginDeleteOptions ¶ added in v3.2.0
type AmlFilesystemsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AmlFilesystemsClientBeginDeleteOptions contains the optional parameters for the AmlFilesystemsClient.BeginDelete method.
type AmlFilesystemsClientBeginUpdateOptions ¶ added in v3.2.0
type AmlFilesystemsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AmlFilesystemsClientBeginUpdateOptions contains the optional parameters for the AmlFilesystemsClient.BeginUpdate method.
type AmlFilesystemsClientCancelArchiveOptions ¶ added in v3.2.0
type AmlFilesystemsClientCancelArchiveOptions struct { }
AmlFilesystemsClientCancelArchiveOptions contains the optional parameters for the AmlFilesystemsClient.CancelArchive method.
type AmlFilesystemsClientCancelArchiveResponse ¶ added in v3.2.0
type AmlFilesystemsClientCancelArchiveResponse struct { }
AmlFilesystemsClientCancelArchiveResponse contains the response from method AmlFilesystemsClient.CancelArchive.
type AmlFilesystemsClientCreateOrUpdateResponse ¶ added in v3.2.0
type AmlFilesystemsClientCreateOrUpdateResponse struct { // An AML file system instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md AmlFilesystem }
AmlFilesystemsClientCreateOrUpdateResponse contains the response from method AmlFilesystemsClient.BeginCreateOrUpdate.
type AmlFilesystemsClientDeleteResponse ¶ added in v3.2.0
type AmlFilesystemsClientDeleteResponse struct { }
AmlFilesystemsClientDeleteResponse contains the response from method AmlFilesystemsClient.BeginDelete.
type AmlFilesystemsClientGetOptions ¶ added in v3.2.0
type AmlFilesystemsClientGetOptions struct { }
AmlFilesystemsClientGetOptions contains the optional parameters for the AmlFilesystemsClient.Get method.
type AmlFilesystemsClientGetResponse ¶ added in v3.2.0
type AmlFilesystemsClientGetResponse struct { // An AML file system instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md AmlFilesystem }
AmlFilesystemsClientGetResponse contains the response from method AmlFilesystemsClient.Get.
type AmlFilesystemsClientListByResourceGroupOptions ¶ added in v3.2.0
type AmlFilesystemsClientListByResourceGroupOptions struct { }
AmlFilesystemsClientListByResourceGroupOptions contains the optional parameters for the AmlFilesystemsClient.NewListByResourceGroupPager method.
type AmlFilesystemsClientListByResourceGroupResponse ¶ added in v3.2.0
type AmlFilesystemsClientListByResourceGroupResponse struct { // Result of the request to list AML file systems. It contains a list of AML file systems and a URL link to get the next set // of results. AmlFilesystemsListResult }
AmlFilesystemsClientListByResourceGroupResponse contains the response from method AmlFilesystemsClient.NewListByResourceGroupPager.
type AmlFilesystemsClientListOptions ¶ added in v3.2.0
type AmlFilesystemsClientListOptions struct { }
AmlFilesystemsClientListOptions contains the optional parameters for the AmlFilesystemsClient.NewListPager method.
type AmlFilesystemsClientListResponse ¶ added in v3.2.0
type AmlFilesystemsClientListResponse struct { // Result of the request to list AML file systems. It contains a list of AML file systems and a URL link to get the next set // of results. AmlFilesystemsListResult }
AmlFilesystemsClientListResponse contains the response from method AmlFilesystemsClient.NewListPager.
type AmlFilesystemsClientUpdateResponse ¶ added in v3.2.0
type AmlFilesystemsClientUpdateResponse struct { // An AML file system instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md AmlFilesystem }
AmlFilesystemsClientUpdateResponse contains the response from method AmlFilesystemsClient.BeginUpdate.
type AmlFilesystemsListResult ¶ added in v3.2.0
type AmlFilesystemsListResult struct { // URL to get the next set of AML file system list results, if there are any. NextLink *string // List of AML file systems. Value []*AmlFilesystem }
AmlFilesystemsListResult - Result of the request to list AML file systems. It contains a list of AML file systems and a URL link to get the next set of results.
func (AmlFilesystemsListResult) MarshalJSON ¶ added in v3.2.0
func (a AmlFilesystemsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AmlFilesystemsListResult.
func (*AmlFilesystemsListResult) UnmarshalJSON ¶ added in v3.2.0
func (a *AmlFilesystemsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AmlFilesystemsListResult.
type ArchiveStatusType ¶ added in v3.2.0
type ArchiveStatusType string
ArchiveStatusType - The state of the archive operation
const ( ArchiveStatusTypeCanceled ArchiveStatusType = "Canceled" ArchiveStatusTypeCancelling ArchiveStatusType = "Cancelling" ArchiveStatusTypeCompleted ArchiveStatusType = "Completed" ArchiveStatusTypeFSScanInProgress ArchiveStatusType = "FSScanInProgress" ArchiveStatusTypeFailed ArchiveStatusType = "Failed" ArchiveStatusTypeIdle ArchiveStatusType = "Idle" ArchiveStatusTypeInProgress ArchiveStatusType = "InProgress" ArchiveStatusTypeNotConfigured ArchiveStatusType = "NotConfigured" )
func PossibleArchiveStatusTypeValues ¶ added in v3.2.0
func PossibleArchiveStatusTypeValues() []ArchiveStatusType
PossibleArchiveStatusTypeValues returns the possible values for the ArchiveStatusType const type.
type AscOperation ¶
type AscOperation struct { // The end time of the operation. EndTime *string // The error detail of the operation if any. Error *ErrorResponse // The operation Id. ID *string // The operation name. Name *string // Additional operation-specific properties Properties *AscOperationProperties // The start time of the operation. StartTime *string // The status of the operation. Status *string }
AscOperation - The status of operation.
func (AscOperation) MarshalJSON ¶
func (a AscOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AscOperation.
func (*AscOperation) UnmarshalJSON ¶
func (a *AscOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AscOperation.
type AscOperationProperties ¶
type AscOperationProperties struct { // Additional operation-specific output. Output map[string]any }
AscOperationProperties - Additional operation-specific output.
func (AscOperationProperties) MarshalJSON ¶
func (a AscOperationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AscOperationProperties.
func (*AscOperationProperties) UnmarshalJSON ¶
func (a *AscOperationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AscOperationProperties.
type AscOperationsClient ¶
type AscOperationsClient struct {
// contains filtered or unexported fields
}
AscOperationsClient contains the methods for the AscOperations group. Don't use this type directly, use NewAscOperationsClient() instead.
func NewAscOperationsClient ¶
func NewAscOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AscOperationsClient, error)
NewAscOperationsClient creates a new instance of AscOperationsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- 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.
Generated from API version 2023-05-01
- location - The name of Azure region.
- operationID - The ID of an ongoing async 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/AscOperations_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAscOperationsClient().Get(ctx, "westus", "testoperationid", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AscOperation = armstoragecache.AscOperation{ // Name: to.Ptr("testoperationid"), // EndTime: to.Ptr("2023-01-01T16:13:13.933Z"), // ID: to.Ptr("/subscriptions/id/locations/westus/ascOperations/testoperationid"), // StartTime: to.Ptr("2023-01-01T13:13:13.933Z"), // Status: to.Ptr("Succeeded"), // }
Output:
type AscOperationsClientGetOptions ¶
type AscOperationsClientGetOptions struct { }
AscOperationsClientGetOptions contains the optional parameters for the AscOperationsClient.Get method.
type AscOperationsClientGetResponse ¶
type AscOperationsClientGetResponse struct { // The status of operation. AscOperation }
AscOperationsClientGetResponse contains the response from method AscOperationsClient.Get.
type AscUsagesClient ¶
type AscUsagesClient struct {
// contains filtered or unexported fields
}
AscUsagesClient contains the methods for the AscUsages group. Don't use this type directly, use NewAscUsagesClient() instead.
func NewAscUsagesClient ¶
func NewAscUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AscUsagesClient, error)
NewAscUsagesClient creates a new instance of AscUsagesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AscUsagesClient) NewListPager ¶
func (client *AscUsagesClient) NewListPager(location string, options *AscUsagesClientListOptions) *runtime.Pager[AscUsagesClientListResponse]
NewListPager - Gets the quantity used and quota limit for resources
Generated from API version 2023-05-01
- location - The name of the region to query for usage information.
- options - AscUsagesClientListOptions contains the optional parameters for the AscUsagesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/AscResourceUsages_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAscUsagesClient().NewListPager("eastus", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ResourceUsagesListResult = armstoragecache.ResourceUsagesListResult{ // Value: []*armstoragecache.ResourceUsage{ // { // Name: &armstoragecache.ResourceUsageName{ // LocalizedValue: to.Ptr("Cache"), // Value: to.Ptr("Cache"), // }, // CurrentValue: to.Ptr[int32](1), // Limit: to.Ptr[int32](4), // Unit: to.Ptr("Count"), // }, // { // Name: &armstoragecache.ResourceUsageName{ // LocalizedValue: to.Ptr("AmlFilesystem"), // Value: to.Ptr("AmlFilesystem"), // }, // CurrentValue: to.Ptr[int32](0), // Limit: to.Ptr[int32](4), // Unit: to.Ptr("Count"), // }}, // } }
Output:
type AscUsagesClientListOptions ¶
type AscUsagesClientListOptions struct { }
AscUsagesClientListOptions contains the optional parameters for the AscUsagesClient.NewListPager method.
type AscUsagesClientListResponse ¶
type AscUsagesClientListResponse struct { // 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. ResourceUsagesListResult }
AscUsagesClientListResponse contains the response from method AscUsagesClient.NewListPager.
type BlobNfsTarget ¶
type BlobNfsTarget struct { // Resource ID of the storage container. Target *string // Identifies the StorageCache usage model to be used for this storage target. UsageModel *string // Amount of time (in seconds) the cache waits before it checks the back-end storage for file updates. VerificationTimer *int32 // Amount of time (in seconds) the cache waits after the last file change before it copies the changed file to back-end storage. WriteBackTimer *int32 }
BlobNfsTarget - Properties pertaining to the BlobNfsTarget.
func (BlobNfsTarget) MarshalJSON ¶
func (b BlobNfsTarget) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BlobNfsTarget.
func (*BlobNfsTarget) UnmarshalJSON ¶
func (b *BlobNfsTarget) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BlobNfsTarget.
type Cache ¶
type Cache struct { // The identity of the cache, if configured. Identity *CacheIdentity // Region name string. Location *string // Properties of the cache. Properties *CacheProperties // SKU for the cache. SKU *CacheSKU // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID of the cache. ID *string // READ-ONLY; Name of cache. Name *string // READ-ONLY; The system meta data relating to this resource. SystemData *SystemData // READ-ONLY; Type of the cache; Microsoft.StorageCache/Cache Type *string }
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.
func (*Cache) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Cache.
type CacheActiveDirectorySettings ¶
type CacheActiveDirectorySettings struct { // REQUIRED; The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server. Length must // 1-15 characters from the class [-0-9a-zA-Z]. CacheNetBiosName *string // REQUIRED; The fully qualified domain name of the Active Directory domain controller. DomainName *string // REQUIRED; The Active Directory domain's NetBIOS name. DomainNetBiosName *string // REQUIRED; Primary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name. PrimaryDNSIPAddress *string // Active Directory admin credentials used to join the HPC Cache to a domain. Credentials *CacheActiveDirectorySettingsCredentials // Secondary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name. SecondaryDNSIPAddress *string // READ-ONLY; True if the HPC Cache is joined to the Active Directory domain. DomainJoined *DomainJoinedType }
CacheActiveDirectorySettings - Active Directory settings used to join a cache to a domain.
func (CacheActiveDirectorySettings) MarshalJSON ¶
func (c CacheActiveDirectorySettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheActiveDirectorySettings.
func (*CacheActiveDirectorySettings) UnmarshalJSON ¶
func (c *CacheActiveDirectorySettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheActiveDirectorySettings.
type CacheActiveDirectorySettingsCredentials ¶
type CacheActiveDirectorySettingsCredentials struct { // REQUIRED; Username of the Active Directory domain administrator. This value is stored encrypted and not returned on response. Username *string // Plain text password of the Active Directory domain administrator. This value is stored encrypted and not returned on response. Password *string }
CacheActiveDirectorySettingsCredentials - Active Directory admin credentials used to join the HPC Cache to a domain.
func (CacheActiveDirectorySettingsCredentials) MarshalJSON ¶
func (c CacheActiveDirectorySettingsCredentials) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheActiveDirectorySettingsCredentials.
func (*CacheActiveDirectorySettingsCredentials) UnmarshalJSON ¶
func (c *CacheActiveDirectorySettingsCredentials) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheActiveDirectorySettingsCredentials.
type CacheDirectorySettings ¶
type CacheDirectorySettings struct { // Specifies settings for joining the HPC Cache to an Active Directory domain. ActiveDirectory *CacheActiveDirectorySettings // Specifies settings for Extended Groups. Extended Groups allows users to be members of more than 16 groups. UsernameDownload *CacheUsernameDownloadSettings }
CacheDirectorySettings - Cache Directory Services settings.
func (CacheDirectorySettings) MarshalJSON ¶
func (c CacheDirectorySettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheDirectorySettings.
func (*CacheDirectorySettings) UnmarshalJSON ¶
func (c *CacheDirectorySettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheDirectorySettings.
type CacheEncryptionSettings ¶
type CacheEncryptionSettings struct { // Specifies the location of the key encryption key in key vault. KeyEncryptionKey *KeyVaultKeyReference // Specifies whether the service will automatically rotate to the newest version of the key in the key vault. RotationToLatestKeyVersionEnabled *bool }
CacheEncryptionSettings - Cache encryption settings.
func (CacheEncryptionSettings) MarshalJSON ¶
func (c CacheEncryptionSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheEncryptionSettings.
func (*CacheEncryptionSettings) UnmarshalJSON ¶
func (c *CacheEncryptionSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheEncryptionSettings.
type CacheHealth ¶
type CacheHealth struct { // List of cache health states. Down is when the cluster is not responding. Degraded is when its functioning but has some // alerts. Transitioning when it is creating or deleting. Unknown will be returned // in old api versions when a new value is added in future versions. WaitingForKey is when the create is waiting for the system // assigned identity to be given access to the encryption key in the // encryption settings. State *HealthStateType // Describes explanation of state. StatusDescription *string // READ-ONLY; Outstanding conditions that need to be investigated and resolved. Conditions []*Condition }
CacheHealth - An indication of cache health. Gives more information about health than just that related to provisioning.
func (CacheHealth) MarshalJSON ¶
func (c CacheHealth) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheHealth.
func (*CacheHealth) UnmarshalJSON ¶
func (c *CacheHealth) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheHealth.
type CacheIdentity ¶
type CacheIdentity struct { // The type of identity used for the cache Type *CacheIdentityType // 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 // READ-ONLY; The principal ID for the system-assigned identity of the cache. PrincipalID *string // READ-ONLY; The tenant ID associated with the cache. TenantID *string }
CacheIdentity - Cache identity properties.
func (CacheIdentity) MarshalJSON ¶
func (c CacheIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheIdentity.
func (*CacheIdentity) UnmarshalJSON ¶
func (c *CacheIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheIdentity.
type CacheIdentityType ¶
type CacheIdentityType string
CacheIdentityType - The type of identity used for the cache
const ( CacheIdentityTypeNone CacheIdentityType = "None" CacheIdentityTypeSystemAssigned CacheIdentityType = "SystemAssigned" CacheIdentityTypeSystemAssignedUserAssigned CacheIdentityType = "SystemAssigned, UserAssigned" CacheIdentityTypeUserAssigned CacheIdentityType = "UserAssigned" )
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 // DNS servers for the cache to use. It will be set from the network configuration if no value is provided. DNSServers []*string // The IPv4 maximum transmission unit configured for the subnet. Mtu *int32 // NTP server IP Address or FQDN for the cache to use. The default is time.windows.com. NtpServer *string // READ-ONLY; Array of additional IP addresses used by this cache. UtilityAddresses []*string }
CacheNetworkSettings - Cache network settings.
func (CacheNetworkSettings) MarshalJSON ¶
func (c CacheNetworkSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheNetworkSettings.
func (*CacheNetworkSettings) UnmarshalJSON ¶
func (c *CacheNetworkSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheNetworkSettings.
type CacheProperties ¶
type CacheProperties struct { // The size of this Cache, in GB. CacheSizeGB *int32 // Specifies Directory Services settings of the cache. DirectoryServicesSettings *CacheDirectorySettings // Specifies encryption settings of the cache. EncryptionSettings *CacheEncryptionSettings // Specifies network settings of the cache. NetworkSettings *CacheNetworkSettings // Specifies security settings of the cache. SecuritySettings *CacheSecuritySettings // Subnet used for the cache. Subnet *string // Upgrade settings of the cache. UpgradeSettings *CacheUpgradeSettings // Availability zones for resources. This field should only contain a single element in the array. Zones []*string // READ-ONLY; Health of the cache. Health *CacheHealth // READ-ONLY; Array of IPv4 addresses that can be used by clients mounting this cache. MountAddresses []*string // READ-ONLY; Specifies the priming jobs defined in the cache. PrimingJobs []*PrimingJob // READ-ONLY; ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property ProvisioningState *ProvisioningStateType // READ-ONLY; Specifies the space allocation percentage for each storage target in the cache. SpaceAllocation []*StorageTargetSpaceAllocation // READ-ONLY; Upgrade status of the cache. UpgradeStatus *CacheUpgradeStatus }
CacheProperties - Properties of the cache.
func (CacheProperties) MarshalJSON ¶
func (c CacheProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheProperties.
func (*CacheProperties) UnmarshalJSON ¶
func (c *CacheProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheProperties.
type CacheSKU ¶
type CacheSKU struct { // SKU name for this cache. Name *string }
CacheSKU - SKU for the cache.
func (CacheSKU) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type CacheSKU.
func (*CacheSKU) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type CacheSKU.
type CacheSecuritySettings ¶
type CacheSecuritySettings struct { // NFS access policies defined for this cache. AccessPolicies []*NfsAccessPolicy }
CacheSecuritySettings - Cache security settings.
func (CacheSecuritySettings) MarshalJSON ¶
func (c CacheSecuritySettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheSecuritySettings.
func (*CacheSecuritySettings) UnmarshalJSON ¶
func (c *CacheSecuritySettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheSecuritySettings.
type CacheUpgradeSettings ¶
type CacheUpgradeSettings struct { // When upgradeScheduleEnabled is true, this field holds the user-chosen upgrade time. At the user-chosen time, the firmware // update will automatically be installed on the cache. ScheduledTime *time.Time // True if the user chooses to select an installation time between now and firmwareUpdateDeadline. Else the firmware will // automatically be installed after firmwareUpdateDeadline if not triggered earlier // via the upgrade operation. UpgradeScheduleEnabled *bool }
CacheUpgradeSettings - Cache Upgrade Settings.
func (CacheUpgradeSettings) MarshalJSON ¶
func (c CacheUpgradeSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheUpgradeSettings.
func (*CacheUpgradeSettings) UnmarshalJSON ¶
func (c *CacheUpgradeSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheUpgradeSettings.
type CacheUpgradeStatus ¶
type CacheUpgradeStatus struct { // READ-ONLY; Version string of the firmware currently installed on this cache. CurrentFirmwareVersion *string // READ-ONLY; Time at which the pending firmware update will automatically be installed on the cache. FirmwareUpdateDeadline *time.Time // 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 // READ-ONLY; Time of the last successful firmware update. LastFirmwareUpdate *time.Time // READ-ONLY; When firmwareUpdateAvailable is true, this field holds the version string for the update. PendingFirmwareVersion *string }
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 // 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 // When present, these are the credentials for the secure LDAP connection. Credentials *CacheUsernameDownloadSettingsCredentials // Whether or not the LDAP connection should be encrypted. EncryptLdapConnection *bool // Whether or not Extended Groups is enabled. ExtendedGroups *bool // 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 // The base distinguished name for the LDAP domain. LdapBaseDN *string // The fully qualified domain name or IP address of the LDAP server to use. LdapServer *string // Determines if the certificates must be validated by a certificate authority. When true, caCertificateURI must be provided. RequireValidCertificate *bool // 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 // This setting determines how the cache gets username and group names for clients. UsernameSource *UsernameSource // READ-ONLY; Indicates whether or not the HPC Cache has performed the username download successfully. UsernameDownloaded *UsernameDownloadedType }
CacheUsernameDownloadSettings - Settings for Extended Groups username and group download.
func (CacheUsernameDownloadSettings) MarshalJSON ¶
func (c CacheUsernameDownloadSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheUsernameDownloadSettings.
func (*CacheUsernameDownloadSettings) UnmarshalJSON ¶
func (c *CacheUsernameDownloadSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheUsernameDownloadSettings.
type CacheUsernameDownloadSettingsCredentials ¶
type CacheUsernameDownloadSettingsCredentials struct { // The Bind Distinguished Name identity to be used in the secure LDAP connection. This value is stored encrypted and not returned // on response. BindDn *string // The Bind password to be used in the secure LDAP connection. This value is stored encrypted and not returned on response. BindPassword *string }
CacheUsernameDownloadSettingsCredentials - When present, these are the credentials for the secure LDAP connection.
func (CacheUsernameDownloadSettingsCredentials) MarshalJSON ¶
func (c CacheUsernameDownloadSettingsCredentials) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CacheUsernameDownloadSettingsCredentials.
func (*CacheUsernameDownloadSettingsCredentials) UnmarshalJSON ¶
func (c *CacheUsernameDownloadSettingsCredentials) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CacheUsernameDownloadSettingsCredentials.
type CachesClient ¶
type CachesClient struct {
// contains filtered or unexported fields
}
CachesClient contains the methods for the Caches group. Don't use this type directly, use NewCachesClient() instead.
func NewCachesClient ¶
func NewCachesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CachesClient, error)
NewCachesClient creates a new instance of CachesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CachesClient) BeginCreateOrUpdate ¶
func (client *CachesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CachesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a cache. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class.
- cache - Object containing the user-selectable properties of the new cache. If read-only properties are included, they must match the existing values of those properties.
- options - CachesClientBeginCreateOrUpdateOptions contains the optional parameters for the CachesClient.BeginCreateOrUpdate method.
Example (CachesCreateOrUpdate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_CreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginCreateOrUpdate(ctx, "scgroup", "sc1", armstoragecache.Cache{ Identity: &armstoragecache.CacheIdentity{ Type: to.Ptr(armstoragecache.CacheIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armstoragecache.UserAssignedIdentitiesValue{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, Location: to.Ptr("westus"), Properties: &armstoragecache.CacheProperties{ CacheSizeGB: to.Ptr[int32](3072), DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{ CacheNetBiosName: to.Ptr("contosoSmb"), Credentials: &armstoragecache.CacheActiveDirectorySettingsCredentials{ Password: to.Ptr("<password>"), Username: to.Ptr("consotoAdmin"), }, DomainName: to.Ptr("contosoAd.contoso.local"), DomainNetBiosName: to.Ptr("contosoAd"), PrimaryDNSIPAddress: to.Ptr("192.0.2.10"), SecondaryDNSIPAddress: to.Ptr("192.0.2.11"), }, UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ Credentials: &armstoragecache.CacheUsernameDownloadSettingsCredentials{ BindDn: to.Ptr("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local"), BindPassword: to.Ptr("<bindPassword>"), }, ExtendedGroups: to.Ptr(true), LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), LdapServer: to.Ptr("192.0.2.12"), UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), }, }, EncryptionSettings: &armstoragecache.CacheEncryptionSettings{ KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2047/test"), SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), }, }, }, SecuritySettings: &armstoragecache.CacheSecuritySettings{ AccessPolicies: []*armstoragecache.NfsAccessPolicy{ { Name: to.Ptr("default"), AccessRules: []*armstoragecache.NfsAccessRule{ { Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), RootSquash: to.Ptr(false), Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), SubmountAccess: to.Ptr(true), Suid: to.Ptr(false), }}, }}, }, Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"), UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t }()), UpgradeScheduleEnabled: to.Ptr(true), }, }, SKU: &armstoragecache.CacheSKU{ Name: to.Ptr("Standard_2G"), }, Tags: map[string]*string{ "Dept": to.Ptr("Contoso"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cache = armstoragecache.Cache{ // Name: to.Ptr("sc1"), // Type: to.Ptr("Microsoft.StorageCache/Cache"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1"), // Location: to.Ptr("westus"), // Properties: &armstoragecache.CacheProperties{ // CacheSizeGB: to.Ptr[int32](3072), // DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ // ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{ // CacheNetBiosName: to.Ptr("contosoSmb"), // DomainJoined: to.Ptr(armstoragecache.DomainJoinedTypeYes), // DomainName: to.Ptr("contosoAd.contoso.local"), // DomainNetBiosName: to.Ptr("contosoAd"), // PrimaryDNSIPAddress: to.Ptr("192.0.2.10"), // SecondaryDNSIPAddress: to.Ptr("192.0.2.11"), // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, // }, // EncryptionSettings: &armstoragecache.CacheEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2048/test"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // Health: &armstoragecache.CacheHealth{ // Conditions: []*armstoragecache.Condition{ // { // Message: to.Ptr("Cannot contact DNS server"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-21T18:25:43.511Z"); return t}()), // }}, // State: to.Ptr(armstoragecache.HealthStateTypeTransitioning), // StatusDescription: to.Ptr("Cache is being created."), // }, // MountAddresses: []*string{ // to.Ptr("192.168.1.1"), // to.Ptr("192.168.1.2")}, // NetworkSettings: &armstoragecache.CacheNetworkSettings{ // DNSSearchDomain: to.Ptr("contoso.com"), // DNSServers: []*string{ // to.Ptr("10.1.22.33"), // to.Ptr("10.1.12.33")}, // Mtu: to.Ptr[int32](1500), // NtpServer: to.Ptr("time.contoso.com"), // }, // PrimingJobs: []*armstoragecache.PrimingJob{ // { // PrimingJobDetails: to.Ptr("Files: Cached=635, Failed=0, Excluded=80, Data=346030 bytes, Directories: Cached=1003, Failed=0, Excluded=0"), // PrimingJobID: to.Ptr("00000000000_0000000000"), // PrimingJobName: to.Ptr("contosoJob1"), // PrimingJobPercentComplete: to.Ptr[float64](100), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateComplete), // PrimingJobStatus: to.Ptr("success"), // }, // { // PrimingJobDetails: to.Ptr(""), // PrimingJobID: to.Ptr("11111111111_1111111111"), // PrimingJobName: to.Ptr("contosoJob2"), // PrimingJobPercentComplete: to.Ptr[float64](0), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateQueued), // PrimingJobStatus: to.Ptr(""), // }}, // ProvisioningState: to.Ptr(armstoragecache.ProvisioningStateTypeSucceeded), // SecuritySettings: &armstoragecache.CacheSecuritySettings{ // AccessPolicies: []*armstoragecache.NfsAccessPolicy{ // { // Name: to.Ptr("default"), // AccessRules: []*armstoragecache.NfsAccessRule{ // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(false), // }}, // }}, // }, // SpaceAllocation: []*armstoragecache.StorageTargetSpaceAllocation{ // }, // Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"), // UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t}()), // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("1")}, // }, // SKU: &armstoragecache.CacheSKU{ // Name: to.Ptr("Standard_2G"), // }, // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Tags: map[string]*string{ // "Dept": to.Ptr("Contoso"), // }, // }
Output:
Example (CachesCreateOrUpdateLdapOnly) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_CreateOrUpdate_ldap_only.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginCreateOrUpdate(ctx, "scgroup", "sc1", armstoragecache.Cache{ Location: to.Ptr("westus"), Properties: &armstoragecache.CacheProperties{ CacheSizeGB: to.Ptr[int32](3072), DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ Credentials: &armstoragecache.CacheUsernameDownloadSettingsCredentials{ BindDn: to.Ptr("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local"), BindPassword: to.Ptr("<bindPassword>"), }, ExtendedGroups: to.Ptr(true), LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), LdapServer: to.Ptr("192.0.2.12"), UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), }, }, EncryptionSettings: &armstoragecache.CacheEncryptionSettings{ KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2048/test"), SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), }, }, }, SecuritySettings: &armstoragecache.CacheSecuritySettings{ AccessPolicies: []*armstoragecache.NfsAccessPolicy{ { Name: to.Ptr("default"), AccessRules: []*armstoragecache.NfsAccessRule{ { Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), RootSquash: to.Ptr(false), Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), SubmountAccess: to.Ptr(true), Suid: to.Ptr(false), }}, }}, }, Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"), UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t }()), UpgradeScheduleEnabled: to.Ptr(true), }, }, SKU: &armstoragecache.CacheSKU{ Name: to.Ptr("Standard_2G"), }, Tags: map[string]*string{ "Dept": to.Ptr("Contoso"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cache = armstoragecache.Cache{ // Name: to.Ptr("sc1"), // Type: to.Ptr("Microsoft.StorageCache/Cache"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1"), // Location: to.Ptr("westus"), // Properties: &armstoragecache.CacheProperties{ // CacheSizeGB: to.Ptr[int32](3072), // DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, // }, // EncryptionSettings: &armstoragecache.CacheEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2048/test"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // Health: &armstoragecache.CacheHealth{ // Conditions: []*armstoragecache.Condition{ // { // Message: to.Ptr("Cannot contact DNS server"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-21T18:25:43.511Z"); return t}()), // }}, // State: to.Ptr(armstoragecache.HealthStateTypeTransitioning), // StatusDescription: to.Ptr("Cache is being created."), // }, // MountAddresses: []*string{ // to.Ptr("192.168.1.1"), // to.Ptr("192.168.1.2")}, // NetworkSettings: &armstoragecache.CacheNetworkSettings{ // DNSSearchDomain: to.Ptr("contoso.com"), // DNSServers: []*string{ // to.Ptr("10.1.22.33"), // to.Ptr("10.1.12.33")}, // Mtu: to.Ptr[int32](1500), // NtpServer: to.Ptr("time.contoso.com"), // }, // PrimingJobs: []*armstoragecache.PrimingJob{ // { // PrimingJobDetails: to.Ptr("Files: Cached=635, Failed=0, Excluded=80, Data=346030 bytes, Directories: Cached=1003, Failed=0, Excluded=0"), // PrimingJobID: to.Ptr("00000000000_0000000000"), // PrimingJobName: to.Ptr("contosoJob1"), // PrimingJobPercentComplete: to.Ptr[float64](100), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateComplete), // PrimingJobStatus: to.Ptr("success"), // }, // { // PrimingJobDetails: to.Ptr(""), // PrimingJobID: to.Ptr("11111111111_1111111111"), // PrimingJobName: to.Ptr("contosoJob2"), // PrimingJobPercentComplete: to.Ptr[float64](0), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateQueued), // PrimingJobStatus: to.Ptr(""), // }}, // ProvisioningState: to.Ptr(armstoragecache.ProvisioningStateTypeSucceeded), // SecuritySettings: &armstoragecache.CacheSecuritySettings{ // AccessPolicies: []*armstoragecache.NfsAccessPolicy{ // { // Name: to.Ptr("default"), // AccessRules: []*armstoragecache.NfsAccessRule{ // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(false), // }}, // }}, // }, // SpaceAllocation: []*armstoragecache.StorageTargetSpaceAllocation{ // }, // Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"), // UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t}()), // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("1")}, // }, // SKU: &armstoragecache.CacheSKU{ // Name: to.Ptr("Standard_2G"), // }, // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Tags: map[string]*string{ // "Dept": to.Ptr("Contoso"), // }, // }
Output:
func (*CachesClient) BeginDebugInfo ¶
func (client *CachesClient) BeginDebugInfo(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDebugInfoOptions) (*runtime.Poller[CachesClientDebugInfoResponse], error)
BeginDebugInfo - Tells a cache to write generate debug info for support to process. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_DebugInfo.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginDebugInfo(ctx, "scgroup", "sc", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CachesClient) BeginDelete ¶
func (client *CachesClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginDeleteOptions) (*runtime.Poller[CachesClientDeleteResponse], error)
BeginDelete - Schedules a cache for deletion. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginDelete(ctx, "scgroup", "sc", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CachesClient) BeginFlush ¶
func (client *CachesClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginFlushOptions) (*runtime.Poller[CachesClientFlushResponse], error)
BeginFlush - Tells a cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors returned until the flush is complete. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Flush.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginFlush(ctx, "scgroup", "sc", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CachesClient) BeginPausePrimingJob ¶
func (client *CachesClient) BeginPausePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginPausePrimingJobOptions) (*runtime.Poller[CachesClientPausePrimingJobResponse], error)
BeginPausePrimingJob - Schedule a priming job to be paused. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class.
- options - CachesClientBeginPausePrimingJobOptions contains the optional parameters for the CachesClient.BeginPausePrimingJob method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/PausePrimingJob.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginPausePrimingJob(ctx, "scgroup", "sc1", &armstoragecache.CachesClientBeginPausePrimingJobOptions{PrimingJobID: &armstoragecache.PrimingJobIDParameter{ PrimingJobID: to.Ptr("00000000000_0000000000"), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CachesClient) BeginResumePrimingJob ¶
func (client *CachesClient) BeginResumePrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginResumePrimingJobOptions) (*runtime.Poller[CachesClientResumePrimingJobResponse], error)
BeginResumePrimingJob - Resumes a paused priming job. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class.
- options - CachesClientBeginResumePrimingJobOptions contains the optional parameters for the CachesClient.BeginResumePrimingJob method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/ResumePrimingJob.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginResumePrimingJob(ctx, "scgroup", "sc1", &armstoragecache.CachesClientBeginResumePrimingJobOptions{PrimingJobID: &armstoragecache.PrimingJobIDParameter{ PrimingJobID: to.Ptr("00000000000_0000000000"), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CachesClient) BeginSpaceAllocation ¶
func (client *CachesClient) BeginSpaceAllocation(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginSpaceAllocationOptions) (*runtime.Poller[CachesClientSpaceAllocationResponse], error)
BeginSpaceAllocation - Update cache space allocation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class.
- options - CachesClientBeginSpaceAllocationOptions contains the optional parameters for the CachesClient.BeginSpaceAllocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/SpaceAllocation_Post.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginSpaceAllocation(ctx, "scgroup", "sc1", &armstoragecache.CachesClientBeginSpaceAllocationOptions{SpaceAllocation: []*armstoragecache.StorageTargetSpaceAllocation{ { Name: to.Ptr("st1"), AllocationPercentage: to.Ptr[int32](25), }, { Name: to.Ptr("st2"), AllocationPercentage: to.Ptr[int32](50), }, { Name: to.Ptr("st3"), AllocationPercentage: to.Ptr[int32](25), }}, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CachesClient) BeginStart ¶
func (client *CachesClient) BeginStart(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartOptions) (*runtime.Poller[CachesClientStartResponse], error)
BeginStart - Tells a Stopped state cache to transition to Active state. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Start.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginStart(ctx, "scgroup", "sc", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CachesClient) BeginStartPrimingJob ¶
func (client *CachesClient) BeginStartPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStartPrimingJobOptions) (*runtime.Poller[CachesClientStartPrimingJobResponse], error)
BeginStartPrimingJob - Create a priming job. This operation is only allowed when the cache is healthy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class.
- options - CachesClientBeginStartPrimingJobOptions contains the optional parameters for the CachesClient.BeginStartPrimingJob method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StartPrimingJob.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginStartPrimingJob(ctx, "scgroup", "sc1", &armstoragecache.CachesClientBeginStartPrimingJobOptions{Primingjob: &armstoragecache.PrimingJob{ PrimingJobName: to.Ptr("contosoJob"), PrimingManifestURL: to.Ptr("https://contosostorage.blob.core.windows.net/contosoblob/00000000_00000000000000000000000000000000.00000000000.FFFFFFFF.00000000?sp=r&st=2021-08-11T19:33:35Z&se=2021-08-12T03:33:35Z&spr=https&sv=2020-08-04&sr=b&sig=<secret-value-from-key>"), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CachesClient) BeginStop ¶
func (client *CachesClient) BeginStop(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopOptions) (*runtime.Poller[CachesClientStopResponse], error)
BeginStop - Tells an Active cache to transition to Stopped state. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Stop.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginStop(ctx, "scgroup", "sc", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CachesClient) BeginStopPrimingJob ¶
func (client *CachesClient) BeginStopPrimingJob(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginStopPrimingJobOptions) (*runtime.Poller[CachesClientStopPrimingJobResponse], error)
BeginStopPrimingJob - Schedule a priming job for deletion. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class.
- options - CachesClientBeginStopPrimingJobOptions contains the optional parameters for the CachesClient.BeginStopPrimingJob method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StopPrimingJob.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginStopPrimingJob(ctx, "scgroup", "sc1", &armstoragecache.CachesClientBeginStopPrimingJobOptions{PrimingJobID: &armstoragecache.PrimingJobIDParameter{ PrimingJobID: to.Ptr("00000000000_0000000000"), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CachesClient) BeginUpdate ¶
func (client *CachesClient) BeginUpdate(ctx context.Context, resourceGroupName string, cacheName string, cache Cache, options *CachesClientBeginUpdateOptions) (*runtime.Poller[CachesClientUpdateResponse], error)
BeginUpdate - Update a cache instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class.
- cache - Object containing the user-selectable properties of the cache. If read-only properties are included, they must match the existing values of those properties.
- options - CachesClientBeginUpdateOptions contains the optional parameters for the CachesClient.BeginUpdate method.
Example (CachesUpdate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginUpdate(ctx, "scgroup", "sc1", armstoragecache.Cache{ Location: to.Ptr("westus"), Properties: &armstoragecache.CacheProperties{ CacheSizeGB: to.Ptr[int32](3072), DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{ CacheNetBiosName: to.Ptr("contosoSmb"), DomainName: to.Ptr("contosoAd.contoso.local"), DomainNetBiosName: to.Ptr("contosoAd"), PrimaryDNSIPAddress: to.Ptr("192.0.2.10"), SecondaryDNSIPAddress: to.Ptr("192.0.2.11"), }, UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ ExtendedGroups: to.Ptr(true), UsernameSource: to.Ptr(armstoragecache.UsernameSourceAD), }, }, NetworkSettings: &armstoragecache.CacheNetworkSettings{ DNSSearchDomain: to.Ptr("contoso.com"), DNSServers: []*string{ to.Ptr("10.1.22.33"), to.Ptr("10.1.12.33")}, Mtu: to.Ptr[int32](1500), NtpServer: to.Ptr("time.contoso.com"), }, SecuritySettings: &armstoragecache.CacheSecuritySettings{ AccessPolicies: []*armstoragecache.NfsAccessPolicy{ { Name: to.Ptr("default"), AccessRules: []*armstoragecache.NfsAccessRule{ { Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), RootSquash: to.Ptr(false), Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), SubmountAccess: to.Ptr(true), Suid: to.Ptr(false), }}, }, { Name: to.Ptr("restrictive"), AccessRules: []*armstoragecache.NfsAccessRule{ { Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), Filter: to.Ptr("10.99.3.145"), RootSquash: to.Ptr(false), Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeHost), SubmountAccess: to.Ptr(true), Suid: to.Ptr(true), }, { Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), Filter: to.Ptr("10.99.1.0/24"), RootSquash: to.Ptr(false), Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeNetwork), SubmountAccess: to.Ptr(true), Suid: to.Ptr(true), }, { Access: to.Ptr(armstoragecache.NfsAccessRuleAccessNo), AnonymousGID: to.Ptr("65534"), AnonymousUID: to.Ptr("65534"), RootSquash: to.Ptr(true), Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), SubmountAccess: to.Ptr(true), Suid: to.Ptr(false), }}, }}, }, Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"), UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t }()), UpgradeScheduleEnabled: to.Ptr(true), }, }, SKU: &armstoragecache.CacheSKU{ Name: to.Ptr("Standard_2G"), }, Tags: map[string]*string{ "Dept": to.Ptr("Contoso"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cache = armstoragecache.Cache{ // Name: to.Ptr("sc1"), // Type: to.Ptr("Microsoft.StorageCache/Cache"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1"), // Location: to.Ptr("westus"), // Properties: &armstoragecache.CacheProperties{ // CacheSizeGB: to.Ptr[int32](3072), // DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ // ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{ // CacheNetBiosName: to.Ptr("contosoSmb"), // DomainJoined: to.Ptr(armstoragecache.DomainJoinedTypeYes), // DomainName: to.Ptr("contosoAd.contoso.local"), // DomainNetBiosName: to.Ptr("contosoAd"), // PrimaryDNSIPAddress: to.Ptr("192.0.2.10"), // SecondaryDNSIPAddress: to.Ptr("192.0.2.11"), // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr(""), // LdapServer: to.Ptr(""), // RequireValidCertificate: to.Ptr(false), // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceAD), // }, // }, // Health: &armstoragecache.CacheHealth{ // Conditions: []*armstoragecache.Condition{ // { // Message: to.Ptr("Cannot contact DNS server"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-21T18:25:43.511Z"); return t}()), // }}, // State: to.Ptr(armstoragecache.HealthStateTypeTransitioning), // StatusDescription: to.Ptr("Cache is being created."), // }, // MountAddresses: []*string{ // to.Ptr("192.168.1.1"), // to.Ptr("192.168.1.2")}, // NetworkSettings: &armstoragecache.CacheNetworkSettings{ // DNSSearchDomain: to.Ptr("contoso.com"), // DNSServers: []*string{ // to.Ptr("10.1.22.33"), // to.Ptr("10.1.12.33")}, // Mtu: to.Ptr[int32](1500), // NtpServer: to.Ptr("time.contoso.com"), // }, // PrimingJobs: []*armstoragecache.PrimingJob{ // { // PrimingJobDetails: to.Ptr("Files: Cached=635, Failed=0, Excluded=80, Data=346030 bytes, Directories: Cached=1003, Failed=0, Excluded=0"), // PrimingJobID: to.Ptr("00000000000_0000000000"), // PrimingJobName: to.Ptr("contosoJob1"), // PrimingJobPercentComplete: to.Ptr[float64](100), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateComplete), // PrimingJobStatus: to.Ptr("success"), // }, // { // PrimingJobDetails: to.Ptr(""), // PrimingJobID: to.Ptr("11111111111_1111111111"), // PrimingJobName: to.Ptr("contosoJob2"), // PrimingJobPercentComplete: to.Ptr[float64](0), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateQueued), // PrimingJobStatus: to.Ptr(""), // }}, // ProvisioningState: to.Ptr(armstoragecache.ProvisioningStateTypeSucceeded), // SecuritySettings: &armstoragecache.CacheSecuritySettings{ // AccessPolicies: []*armstoragecache.NfsAccessPolicy{ // { // Name: to.Ptr("default"), // AccessRules: []*armstoragecache.NfsAccessRule{ // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(false), // }}, // }, // { // Name: to.Ptr("restrictive"), // AccessRules: []*armstoragecache.NfsAccessRule{ // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // Filter: to.Ptr("10.99.3.145"), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeHost), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(true), // }, // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // Filter: to.Ptr("10.99.1.0/24"), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeNetwork), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(true), // }, // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessNo), // AnonymousGID: to.Ptr("65534"), // AnonymousUID: to.Ptr("65534"), // RootSquash: to.Ptr(true), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(false), // }}, // }}, // }, // SpaceAllocation: []*armstoragecache.StorageTargetSpaceAllocation{ // { // Name: to.Ptr("st1"), // AllocationPercentage: to.Ptr[int32](25), // }, // { // Name: to.Ptr("st2"), // AllocationPercentage: to.Ptr[int32](50), // }, // { // Name: to.Ptr("st3"), // AllocationPercentage: to.Ptr[int32](25), // }}, // Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"), // UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t}()), // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // }, // SKU: &armstoragecache.CacheSKU{ // Name: to.Ptr("Standard_2G"), // }, // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Tags: map[string]*string{ // "Dept": to.Ptr("Contoso"), // }, // }
Output:
Example (CachesUpdateLdapOnly) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Update_ldap_only.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginUpdate(ctx, "scgroup", "sc1", armstoragecache.Cache{ Location: to.Ptr("westus"), Properties: &armstoragecache.CacheProperties{ CacheSizeGB: to.Ptr[int32](3072), DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ Credentials: &armstoragecache.CacheUsernameDownloadSettingsCredentials{ BindDn: to.Ptr("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local"), BindPassword: to.Ptr("<bindPassword>"), }, ExtendedGroups: to.Ptr(true), LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), LdapServer: to.Ptr("192.0.2.12"), UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), }, }, NetworkSettings: &armstoragecache.CacheNetworkSettings{ DNSSearchDomain: to.Ptr("contoso.com"), DNSServers: []*string{ to.Ptr("10.1.22.33"), to.Ptr("10.1.12.33")}, Mtu: to.Ptr[int32](1500), NtpServer: to.Ptr("time.contoso.com"), }, SecuritySettings: &armstoragecache.CacheSecuritySettings{ AccessPolicies: []*armstoragecache.NfsAccessPolicy{ { Name: to.Ptr("default"), AccessRules: []*armstoragecache.NfsAccessRule{ { Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), RootSquash: to.Ptr(false), Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), SubmountAccess: to.Ptr(true), Suid: to.Ptr(false), }}, }, { Name: to.Ptr("restrictive"), AccessRules: []*armstoragecache.NfsAccessRule{ { Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), Filter: to.Ptr("10.99.3.145"), RootSquash: to.Ptr(false), Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeHost), SubmountAccess: to.Ptr(true), Suid: to.Ptr(true), }, { Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), Filter: to.Ptr("10.99.1.0/24"), RootSquash: to.Ptr(false), Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeNetwork), SubmountAccess: to.Ptr(true), Suid: to.Ptr(true), }, { Access: to.Ptr(armstoragecache.NfsAccessRuleAccessNo), AnonymousGID: to.Ptr("65534"), AnonymousUID: to.Ptr("65534"), RootSquash: to.Ptr(true), Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), SubmountAccess: to.Ptr(true), Suid: to.Ptr(false), }}, }}, }, Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"), UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t }()), UpgradeScheduleEnabled: to.Ptr(true), }, }, SKU: &armstoragecache.CacheSKU{ Name: to.Ptr("Standard_2G"), }, Tags: map[string]*string{ "Dept": to.Ptr("Contoso"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cache = armstoragecache.Cache{ // Name: to.Ptr("sc1"), // Type: to.Ptr("Microsoft.StorageCache/Cache"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1"), // Location: to.Ptr("westus"), // Properties: &armstoragecache.CacheProperties{ // CacheSizeGB: to.Ptr[int32](3072), // DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeNo), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, // }, // Health: &armstoragecache.CacheHealth{ // Conditions: []*armstoragecache.Condition{ // { // Message: to.Ptr("Cannot contact DNS server"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-21T18:25:43.511Z"); return t}()), // }}, // State: to.Ptr(armstoragecache.HealthStateTypeTransitioning), // StatusDescription: to.Ptr("Cache is being created."), // }, // MountAddresses: []*string{ // to.Ptr("192.168.1.1"), // to.Ptr("192.168.1.2")}, // NetworkSettings: &armstoragecache.CacheNetworkSettings{ // DNSSearchDomain: to.Ptr("contoso.com"), // DNSServers: []*string{ // to.Ptr("10.1.22.33"), // to.Ptr("10.1.12.33")}, // Mtu: to.Ptr[int32](1500), // NtpServer: to.Ptr("time.contoso.com"), // }, // PrimingJobs: []*armstoragecache.PrimingJob{ // { // PrimingJobDetails: to.Ptr("Files: Cached=635, Failed=0, Excluded=80, Data=346030 bytes, Directories: Cached=1003, Failed=0, Excluded=0"), // PrimingJobID: to.Ptr("00000000000_0000000000"), // PrimingJobName: to.Ptr("contosoJob1"), // PrimingJobPercentComplete: to.Ptr[float64](100), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateComplete), // PrimingJobStatus: to.Ptr("success"), // }, // { // PrimingJobDetails: to.Ptr(""), // PrimingJobID: to.Ptr("11111111111_1111111111"), // PrimingJobName: to.Ptr("contosoJob2"), // PrimingJobPercentComplete: to.Ptr[float64](0), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateQueued), // PrimingJobStatus: to.Ptr(""), // }}, // ProvisioningState: to.Ptr(armstoragecache.ProvisioningStateTypeSucceeded), // SecuritySettings: &armstoragecache.CacheSecuritySettings{ // AccessPolicies: []*armstoragecache.NfsAccessPolicy{ // { // Name: to.Ptr("default"), // AccessRules: []*armstoragecache.NfsAccessRule{ // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(false), // }}, // }, // { // Name: to.Ptr("restrictive"), // AccessRules: []*armstoragecache.NfsAccessRule{ // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // Filter: to.Ptr("10.99.3.145"), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeHost), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(true), // }, // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // Filter: to.Ptr("10.99.1.0/24"), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeNetwork), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(true), // }, // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessNo), // AnonymousGID: to.Ptr("65534"), // AnonymousUID: to.Ptr("65534"), // RootSquash: to.Ptr(true), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(false), // }}, // }}, // }, // SpaceAllocation: []*armstoragecache.StorageTargetSpaceAllocation{ // }, // Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"), // UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t}()), // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // }, // SKU: &armstoragecache.CacheSKU{ // Name: to.Ptr("Standard_2G"), // }, // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Tags: map[string]*string{ // "Dept": to.Ptr("Contoso"), // }, // }
Output:
func (*CachesClient) BeginUpgradeFirmware ¶
func (client *CachesClient) BeginUpgradeFirmware(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientBeginUpgradeFirmwareOptions) (*runtime.Poller[CachesClientUpgradeFirmwareResponse], error)
BeginUpgradeFirmware - Upgrade a cache's firmware if a new version is available. Otherwise, this operation has no effect. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_UpgradeFirmware.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewCachesClient().BeginUpgradeFirmware(ctx, "scgroup", "sc1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*CachesClient) Get ¶
func (client *CachesClient) Get(ctx context.Context, resourceGroupName string, cacheName string, options *CachesClientGetOptions) (CachesClientGetResponse, error)
Get - Returns a cache. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCachesClient().Get(ctx, "scgroup", "sc1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cache = armstoragecache.Cache{ // Name: to.Ptr("sc1"), // Type: to.Ptr("Microsoft.StorageCache/Cache"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1"), // Location: to.Ptr("westus"), // Properties: &armstoragecache.CacheProperties{ // CacheSizeGB: to.Ptr[int32](3072), // DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ // ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{ // CacheNetBiosName: to.Ptr("contosoSmb"), // DomainJoined: to.Ptr(armstoragecache.DomainJoinedTypeYes), // DomainName: to.Ptr("contosoAd.contoso.local"), // DomainNetBiosName: to.Ptr("contosoAd"), // PrimaryDNSIPAddress: to.Ptr("192.0.2.10"), // SecondaryDNSIPAddress: to.Ptr("192.0.2.11"), // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, // }, // EncryptionSettings: &armstoragecache.CacheEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2048/test"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // Health: &armstoragecache.CacheHealth{ // Conditions: []*armstoragecache.Condition{ // { // Message: to.Ptr("Cannot contact DNS server"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-21T18:25:43.511Z"); return t}()), // }}, // State: to.Ptr(armstoragecache.HealthStateTypeTransitioning), // StatusDescription: to.Ptr("Cache is being created."), // }, // MountAddresses: []*string{ // to.Ptr("192.168.1.1"), // to.Ptr("192.168.1.2")}, // NetworkSettings: &armstoragecache.CacheNetworkSettings{ // DNSSearchDomain: to.Ptr("contoso.com"), // DNSServers: []*string{ // to.Ptr("10.1.22.33"), // to.Ptr("10.1.12.33")}, // Mtu: to.Ptr[int32](1500), // NtpServer: to.Ptr("time.contoso.com"), // }, // PrimingJobs: []*armstoragecache.PrimingJob{ // { // PrimingJobDetails: to.Ptr("Files: Cached=635, Failed=0, Excluded=80, Data=346030 bytes, Directories: Cached=1003, Failed=0, Excluded=0"), // PrimingJobID: to.Ptr("00000000000_0000000000"), // PrimingJobName: to.Ptr("contosoJob1"), // PrimingJobPercentComplete: to.Ptr[float64](100), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateComplete), // PrimingJobStatus: to.Ptr("success"), // }, // { // PrimingJobDetails: to.Ptr(""), // PrimingJobID: to.Ptr("11111111111_1111111111"), // PrimingJobName: to.Ptr("contosoJob2"), // PrimingJobPercentComplete: to.Ptr[float64](0), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateQueued), // PrimingJobStatus: to.Ptr(""), // }}, // ProvisioningState: to.Ptr(armstoragecache.ProvisioningStateTypeSucceeded), // SecuritySettings: &armstoragecache.CacheSecuritySettings{ // AccessPolicies: []*armstoragecache.NfsAccessPolicy{ // { // Name: to.Ptr("default"), // AccessRules: []*armstoragecache.NfsAccessRule{ // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(false), // }}, // }}, // }, // SpaceAllocation: []*armstoragecache.StorageTargetSpaceAllocation{ // { // Name: to.Ptr("st1"), // AllocationPercentage: to.Ptr[int32](25), // }, // { // Name: to.Ptr("st2"), // AllocationPercentage: to.Ptr[int32](50), // }, // { // Name: to.Ptr("st3"), // AllocationPercentage: to.Ptr[int32](25), // }}, // Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"), // UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t}()), // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("1")}, // }, // SKU: &armstoragecache.CacheSKU{ // Name: to.Ptr("Standard_2G"), // }, // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Tags: map[string]*string{ // "Dept": to.Ptr("Contoso"), // }, // }
Output:
func (*CachesClient) NewListByResourceGroupPager ¶
func (client *CachesClient) NewListByResourceGroupPager(resourceGroupName string, options *CachesClientListByResourceGroupOptions) *runtime.Pager[CachesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Returns all caches the user has access to under a resource group.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - CachesClientListByResourceGroupOptions contains the optional parameters for the CachesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_ListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCachesClient().NewListByResourceGroupPager("scgroup", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.CachesListResult = armstoragecache.CachesListResult{ // Value: []*armstoragecache.Cache{ // { // Name: to.Ptr("sc1"), // Type: to.Ptr("Microsoft.StorageCache/Cache"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1"), // Location: to.Ptr("westus"), // Properties: &armstoragecache.CacheProperties{ // CacheSizeGB: to.Ptr[int32](3072), // DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ // ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{ // CacheNetBiosName: to.Ptr("contosoSmb"), // DomainJoined: to.Ptr(armstoragecache.DomainJoinedTypeYes), // DomainName: to.Ptr("contosoAd.contoso.local"), // DomainNetBiosName: to.Ptr("contosoAd"), // PrimaryDNSIPAddress: to.Ptr("192.0.2.10"), // SecondaryDNSIPAddress: to.Ptr("192.0.2.11"), // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, // }, // EncryptionSettings: &armstoragecache.CacheEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2048/test"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // Health: &armstoragecache.CacheHealth{ // Conditions: []*armstoragecache.Condition{ // { // Message: to.Ptr("Cannot contact DNS server"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-21T18:25:43.511Z"); return t}()), // }}, // State: to.Ptr(armstoragecache.HealthStateTypeTransitioning), // StatusDescription: to.Ptr("Cache is being created."), // }, // MountAddresses: []*string{ // to.Ptr("192.168.1.1"), // to.Ptr("192.168.1.2")}, // NetworkSettings: &armstoragecache.CacheNetworkSettings{ // DNSSearchDomain: to.Ptr("contoso.com"), // DNSServers: []*string{ // to.Ptr("10.1.22.33"), // to.Ptr("10.1.12.33")}, // Mtu: to.Ptr[int32](1500), // NtpServer: to.Ptr("time.contoso.com"), // }, // PrimingJobs: []*armstoragecache.PrimingJob{ // }, // ProvisioningState: to.Ptr(armstoragecache.ProvisioningStateTypeSucceeded), // SecuritySettings: &armstoragecache.CacheSecuritySettings{ // AccessPolicies: []*armstoragecache.NfsAccessPolicy{ // { // Name: to.Ptr("default"), // AccessRules: []*armstoragecache.NfsAccessRule{ // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(false), // }}, // }}, // }, // SpaceAllocation: []*armstoragecache.StorageTargetSpaceAllocation{ // { // Name: to.Ptr("st1"), // AllocationPercentage: to.Ptr[int32](25), // }, // { // Name: to.Ptr("st2"), // AllocationPercentage: to.Ptr[int32](50), // }, // { // Name: to.Ptr("st3"), // AllocationPercentage: to.Ptr[int32](25), // }}, // Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"), // UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t}()), // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("1")}, // }, // SKU: &armstoragecache.CacheSKU{ // Name: to.Ptr("Standard_2G"), // }, // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Tags: map[string]*string{ // "Dept": to.Ptr("Contoso"), // }, // }, // { // Name: to.Ptr("sc2"), // Type: to.Ptr("Microsoft.StorageCache/Cache"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc2"), // Location: to.Ptr("westus"), // Properties: &armstoragecache.CacheProperties{ // CacheSizeGB: to.Ptr[int32](3072), // DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ // ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{ // CacheNetBiosName: to.Ptr("contosoSmb"), // DomainJoined: to.Ptr(armstoragecache.DomainJoinedTypeYes), // DomainName: to.Ptr("contosoAd.contoso.local"), // DomainNetBiosName: to.Ptr("contosoAd"), // PrimaryDNSIPAddress: to.Ptr("192.0.2.10"), // SecondaryDNSIPAddress: to.Ptr("192.0.2.11"), // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr(""), // LdapServer: to.Ptr(""), // RequireValidCertificate: to.Ptr(false), // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceAD), // }, // }, // EncryptionSettings: &armstoragecache.CacheEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2048/test"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // Health: &armstoragecache.CacheHealth{ // Conditions: []*armstoragecache.Condition{ // { // Message: to.Ptr("Cannot contact DNS server"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-21T18:25:43.511Z"); return t}()), // }}, // State: to.Ptr(armstoragecache.HealthStateTypeTransitioning), // StatusDescription: to.Ptr("Cache is being created."), // }, // MountAddresses: []*string{ // to.Ptr("192.168.1.1"), // to.Ptr("192.168.1.2")}, // NetworkSettings: &armstoragecache.CacheNetworkSettings{ // DNSSearchDomain: to.Ptr("contoso.com"), // DNSServers: []*string{ // to.Ptr("10.1.22.33"), // to.Ptr("10.1.12.33")}, // Mtu: to.Ptr[int32](1500), // NtpServer: to.Ptr("time.contoso.com"), // }, // PrimingJobs: []*armstoragecache.PrimingJob{ // { // PrimingJobDetails: to.Ptr("Files: Cached=635, Failed=0, Excluded=80, Data=346030 bytes, Directories: Cached=1003, Failed=0, Excluded=0"), // PrimingJobID: to.Ptr("00000000000_0000000000"), // PrimingJobName: to.Ptr("contosoJob1"), // PrimingJobPercentComplete: to.Ptr[float64](100), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateComplete), // PrimingJobStatus: to.Ptr("success"), // }, // { // PrimingJobDetails: to.Ptr(""), // PrimingJobID: to.Ptr("11111111111_1111111111"), // PrimingJobName: to.Ptr("contosoJob2"), // PrimingJobPercentComplete: to.Ptr[float64](0), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateQueued), // PrimingJobStatus: to.Ptr(""), // }}, // ProvisioningState: to.Ptr(armstoragecache.ProvisioningStateTypeSucceeded), // SecuritySettings: &armstoragecache.CacheSecuritySettings{ // AccessPolicies: []*armstoragecache.NfsAccessPolicy{ // { // Name: to.Ptr("default"), // AccessRules: []*armstoragecache.NfsAccessRule{ // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(false), // }}, // }}, // }, // SpaceAllocation: []*armstoragecache.StorageTargetSpaceAllocation{ // }, // Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub2"), // UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t}()), // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("2")}, // }, // SKU: &armstoragecache.CacheSKU{ // Name: to.Ptr("Standard_2G"), // }, // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Tags: map[string]*string{ // "Dept": to.Ptr("Contoso"), // }, // }}, // } }
Output:
func (*CachesClient) NewListPager ¶
func (client *CachesClient) NewListPager(options *CachesClientListOptions) *runtime.Pager[CachesClientListResponse]
NewListPager - Returns all caches the user has access to under a subscription.
Generated from API version 2023-05-01
- options - CachesClientListOptions contains the optional parameters for the CachesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Caches_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewCachesClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.CachesListResult = armstoragecache.CachesListResult{ // Value: []*armstoragecache.Cache{ // { // Name: to.Ptr("sc1"), // Type: to.Ptr("Microsoft.StorageCache/Cache"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1"), // Location: to.Ptr("westus"), // Properties: &armstoragecache.CacheProperties{ // CacheSizeGB: to.Ptr[int32](3072), // DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ // ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{ // CacheNetBiosName: to.Ptr("contosoSmb"), // DomainJoined: to.Ptr(armstoragecache.DomainJoinedTypeYes), // DomainName: to.Ptr("contosoAd.contoso.local"), // DomainNetBiosName: to.Ptr("contosoAd"), // PrimaryDNSIPAddress: to.Ptr("192.0.2.10"), // SecondaryDNSIPAddress: to.Ptr("192.0.2.11"), // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr("dc=contosoad,dc=contoso,dc=local"), // LdapServer: to.Ptr("192.0.2.12"), // RequireValidCertificate: to.Ptr(false), // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceLDAP), // }, // }, // EncryptionSettings: &armstoragecache.CacheEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2048/test"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // Health: &armstoragecache.CacheHealth{ // Conditions: []*armstoragecache.Condition{ // { // Message: to.Ptr("Cannot contact DNS server"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-21T18:25:43.511Z"); return t}()), // }}, // State: to.Ptr(armstoragecache.HealthStateTypeTransitioning), // StatusDescription: to.Ptr("Cache is being created."), // }, // MountAddresses: []*string{ // to.Ptr("192.168.1.1"), // to.Ptr("192.168.1.2")}, // NetworkSettings: &armstoragecache.CacheNetworkSettings{ // DNSSearchDomain: to.Ptr("contoso.com"), // DNSServers: []*string{ // to.Ptr("10.1.22.33"), // to.Ptr("10.1.12.33")}, // Mtu: to.Ptr[int32](1500), // NtpServer: to.Ptr("time.contoso.com"), // }, // PrimingJobs: []*armstoragecache.PrimingJob{ // }, // ProvisioningState: to.Ptr(armstoragecache.ProvisioningStateTypeSucceeded), // SecuritySettings: &armstoragecache.CacheSecuritySettings{ // AccessPolicies: []*armstoragecache.NfsAccessPolicy{ // { // Name: to.Ptr("default"), // AccessRules: []*armstoragecache.NfsAccessRule{ // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(false), // }}, // }}, // }, // SpaceAllocation: []*armstoragecache.StorageTargetSpaceAllocation{ // { // Name: to.Ptr("st1"), // AllocationPercentage: to.Ptr[int32](25), // }, // { // Name: to.Ptr("st2"), // AllocationPercentage: to.Ptr[int32](50), // }, // { // Name: to.Ptr("st3"), // AllocationPercentage: to.Ptr[int32](25), // }}, // Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1"), // UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t}()), // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // }, // SKU: &armstoragecache.CacheSKU{ // Name: to.Ptr("Standard_2G"), // }, // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Tags: map[string]*string{ // "Dept": to.Ptr("Contoso"), // }, // }, // { // Name: to.Ptr("sc2"), // Type: to.Ptr("Microsoft.StorageCache/Cache"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc2"), // Location: to.Ptr("westus"), // Properties: &armstoragecache.CacheProperties{ // CacheSizeGB: to.Ptr[int32](3072), // DirectoryServicesSettings: &armstoragecache.CacheDirectorySettings{ // ActiveDirectory: &armstoragecache.CacheActiveDirectorySettings{ // CacheNetBiosName: to.Ptr("contosoSmb"), // DomainJoined: to.Ptr(armstoragecache.DomainJoinedTypeYes), // DomainName: to.Ptr("contosoAd.contoso.local"), // DomainNetBiosName: to.Ptr("contosoAd"), // PrimaryDNSIPAddress: to.Ptr("192.0.2.10"), // SecondaryDNSIPAddress: to.Ptr("192.0.2.11"), // }, // UsernameDownload: &armstoragecache.CacheUsernameDownloadSettings{ // AutoDownloadCertificate: to.Ptr(false), // CaCertificateURI: to.Ptr("http://contoso.net/cacert.pem"), // EncryptLdapConnection: to.Ptr(false), // ExtendedGroups: to.Ptr(true), // GroupFileURI: to.Ptr("http://contoso.net/group.file"), // LdapBaseDN: to.Ptr(""), // LdapServer: to.Ptr(""), // RequireValidCertificate: to.Ptr(false), // UserFileURI: to.Ptr("http://contoso.net/passwd.file"), // UsernameDownloaded: to.Ptr(armstoragecache.UsernameDownloadedTypeYes), // UsernameSource: to.Ptr(armstoragecache.UsernameSourceAD), // }, // }, // EncryptionSettings: &armstoragecache.CacheEncryptionSettings{ // KeyEncryptionKey: &armstoragecache.KeyVaultKeyReference{ // KeyURL: to.Ptr("https://keyvault-cmk.vault.azure.net/keys/key2048/test"), // SourceVault: &armstoragecache.KeyVaultKeyReferenceSourceVault{ // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"), // }, // }, // }, // Health: &armstoragecache.CacheHealth{ // Conditions: []*armstoragecache.Condition{ // { // Message: to.Ptr("Cannot contact DNS server"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-21T18:25:43.511Z"); return t}()), // }}, // State: to.Ptr(armstoragecache.HealthStateTypeTransitioning), // StatusDescription: to.Ptr("Cache is being created."), // }, // MountAddresses: []*string{ // to.Ptr("192.168.1.1"), // to.Ptr("192.168.1.2")}, // NetworkSettings: &armstoragecache.CacheNetworkSettings{ // DNSSearchDomain: to.Ptr("contoso.com"), // DNSServers: []*string{ // to.Ptr("10.1.22.33"), // to.Ptr("10.1.12.33")}, // Mtu: to.Ptr[int32](1500), // NtpServer: to.Ptr("time.contoso.com"), // }, // PrimingJobs: []*armstoragecache.PrimingJob{ // { // PrimingJobDetails: to.Ptr("Files: Cached=635, Failed=0, Excluded=80, Data=346030 bytes, Directories: Cached=1003, Failed=0, Excluded=0"), // PrimingJobID: to.Ptr("00000000000_0000000000"), // PrimingJobName: to.Ptr("contosoJob1"), // PrimingJobPercentComplete: to.Ptr[float64](100), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateComplete), // PrimingJobStatus: to.Ptr("success"), // }, // { // PrimingJobDetails: to.Ptr(""), // PrimingJobID: to.Ptr("11111111111_1111111111"), // PrimingJobName: to.Ptr("contosoJob2"), // PrimingJobPercentComplete: to.Ptr[float64](0), // PrimingJobState: to.Ptr(armstoragecache.PrimingJobStateQueued), // PrimingJobStatus: to.Ptr(""), // }}, // ProvisioningState: to.Ptr(armstoragecache.ProvisioningStateTypeSucceeded), // SecuritySettings: &armstoragecache.CacheSecuritySettings{ // AccessPolicies: []*armstoragecache.NfsAccessPolicy{ // { // Name: to.Ptr("default"), // AccessRules: []*armstoragecache.NfsAccessRule{ // { // Access: to.Ptr(armstoragecache.NfsAccessRuleAccessRw), // RootSquash: to.Ptr(false), // Scope: to.Ptr(armstoragecache.NfsAccessRuleScopeDefault), // SubmountAccess: to.Ptr(true), // Suid: to.Ptr(false), // }}, // }}, // }, // SpaceAllocation: []*armstoragecache.StorageTargetSpaceAllocation{ // }, // Subnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub2"), // UpgradeSettings: &armstoragecache.CacheUpgradeSettings{ // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-26T18:25:43.511Z"); return t}()), // UpgradeScheduleEnabled: to.Ptr(true), // }, // UpgradeStatus: &armstoragecache.CacheUpgradeStatus{ // CurrentFirmwareVersion: to.Ptr("2022.08.1"), // FirmwareUpdateDeadline: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-04-21T18:25:43.511Z"); return t}()), // FirmwareUpdateStatus: to.Ptr(armstoragecache.FirmwareStatusTypeAvailable), // LastFirmwareUpdate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-01-21T18:25:43.511Z"); return t}()), // PendingFirmwareVersion: to.Ptr("2022.08.1"), // }, // Zones: []*string{ // to.Ptr("1")}, // }, // SKU: &armstoragecache.CacheSKU{ // Name: to.Ptr("Standard_2G"), // }, // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Tags: map[string]*string{ // "Dept": to.Ptr("Contoso"), // }, // }}, // } }
Output:
type CachesClientBeginCreateOrUpdateOptions ¶
type CachesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginCreateOrUpdateOptions contains the optional parameters for the CachesClient.BeginCreateOrUpdate method.
type CachesClientBeginDebugInfoOptions ¶
type CachesClientBeginDebugInfoOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginDebugInfoOptions contains the optional parameters for the CachesClient.BeginDebugInfo method.
type CachesClientBeginDeleteOptions ¶
type CachesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginDeleteOptions contains the optional parameters for the CachesClient.BeginDelete method.
type CachesClientBeginFlushOptions ¶
type CachesClientBeginFlushOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginFlushOptions contains the optional parameters for the CachesClient.BeginFlush method.
type CachesClientBeginPausePrimingJobOptions ¶
type CachesClientBeginPausePrimingJobOptions struct { // Object containing the priming job ID. PrimingJobID *PrimingJobIDParameter // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginPausePrimingJobOptions contains the optional parameters for the CachesClient.BeginPausePrimingJob method.
type CachesClientBeginResumePrimingJobOptions ¶
type CachesClientBeginResumePrimingJobOptions struct { // Object containing the priming job ID. PrimingJobID *PrimingJobIDParameter // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginResumePrimingJobOptions contains the optional parameters for the CachesClient.BeginResumePrimingJob method.
type CachesClientBeginSpaceAllocationOptions ¶
type CachesClientBeginSpaceAllocationOptions struct { // Resumes the LRO from the provided token. ResumeToken string // List containing storage target cache space percentage allocations. SpaceAllocation []*StorageTargetSpaceAllocation }
CachesClientBeginSpaceAllocationOptions contains the optional parameters for the CachesClient.BeginSpaceAllocation method.
type CachesClientBeginStartOptions ¶
type CachesClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginStartOptions contains the optional parameters for the CachesClient.BeginStart method.
type CachesClientBeginStartPrimingJobOptions ¶
type CachesClientBeginStartPrimingJobOptions struct { // Object containing the definition of a priming job. Primingjob *PrimingJob // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginStartPrimingJobOptions contains the optional parameters for the CachesClient.BeginStartPrimingJob method.
type CachesClientBeginStopOptions ¶
type CachesClientBeginStopOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginStopOptions contains the optional parameters for the CachesClient.BeginStop method.
type CachesClientBeginStopPrimingJobOptions ¶
type CachesClientBeginStopPrimingJobOptions struct { // Object containing the priming job ID. PrimingJobID *PrimingJobIDParameter // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginStopPrimingJobOptions contains the optional parameters for the CachesClient.BeginStopPrimingJob method.
type CachesClientBeginUpdateOptions ¶
type CachesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginUpdateOptions contains the optional parameters for the CachesClient.BeginUpdate method.
type CachesClientBeginUpgradeFirmwareOptions ¶
type CachesClientBeginUpgradeFirmwareOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CachesClientBeginUpgradeFirmwareOptions contains the optional parameters for the CachesClient.BeginUpgradeFirmware method.
type CachesClientCreateOrUpdateResponse ¶
type CachesClientCreateOrUpdateResponse struct { // A cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md Cache }
CachesClientCreateOrUpdateResponse contains the response from method CachesClient.BeginCreateOrUpdate.
type CachesClientDebugInfoResponse ¶
type CachesClientDebugInfoResponse struct { }
CachesClientDebugInfoResponse contains the response from method CachesClient.BeginDebugInfo.
type CachesClientDeleteResponse ¶
type CachesClientDeleteResponse struct { }
CachesClientDeleteResponse contains the response from method CachesClient.BeginDelete.
type CachesClientFlushResponse ¶
type CachesClientFlushResponse struct { }
CachesClientFlushResponse contains the response from method CachesClient.BeginFlush.
type CachesClientGetOptions ¶
type CachesClientGetOptions struct { }
CachesClientGetOptions contains the optional parameters for the CachesClient.Get method.
type CachesClientGetResponse ¶
type CachesClientGetResponse struct { // A cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md Cache }
CachesClientGetResponse contains the response from method CachesClient.Get.
type CachesClientListByResourceGroupOptions ¶
type CachesClientListByResourceGroupOptions struct { }
CachesClientListByResourceGroupOptions contains the optional parameters for the CachesClient.NewListByResourceGroupPager method.
type CachesClientListByResourceGroupResponse ¶
type CachesClientListByResourceGroupResponse struct { // Result of the request to list caches. It contains a list of caches and a URL link to get the next set of results. CachesListResult }
CachesClientListByResourceGroupResponse contains the response from method CachesClient.NewListByResourceGroupPager.
type CachesClientListOptions ¶
type CachesClientListOptions struct { }
CachesClientListOptions contains the optional parameters for the CachesClient.NewListPager method.
type CachesClientListResponse ¶
type CachesClientListResponse struct { // Result of the request to list caches. It contains a list of caches and a URL link to get the next set of results. CachesListResult }
CachesClientListResponse contains the response from method CachesClient.NewListPager.
type CachesClientPausePrimingJobResponse ¶
type CachesClientPausePrimingJobResponse struct { }
CachesClientPausePrimingJobResponse contains the response from method CachesClient.BeginPausePrimingJob.
type CachesClientResumePrimingJobResponse ¶
type CachesClientResumePrimingJobResponse struct { }
CachesClientResumePrimingJobResponse contains the response from method CachesClient.BeginResumePrimingJob.
type CachesClientSpaceAllocationResponse ¶
type CachesClientSpaceAllocationResponse struct { }
CachesClientSpaceAllocationResponse contains the response from method CachesClient.BeginSpaceAllocation.
type CachesClientStartPrimingJobResponse ¶
type CachesClientStartPrimingJobResponse struct { }
CachesClientStartPrimingJobResponse contains the response from method CachesClient.BeginStartPrimingJob.
type CachesClientStartResponse ¶
type CachesClientStartResponse struct { }
CachesClientStartResponse contains the response from method CachesClient.BeginStart.
type CachesClientStopPrimingJobResponse ¶
type CachesClientStopPrimingJobResponse struct { }
CachesClientStopPrimingJobResponse contains the response from method CachesClient.BeginStopPrimingJob.
type CachesClientStopResponse ¶
type CachesClientStopResponse struct { }
CachesClientStopResponse contains the response from method CachesClient.BeginStop.
type CachesClientUpdateResponse ¶
type CachesClientUpdateResponse struct { // A cache instance. Follows Azure Resource Manager standards: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md Cache }
CachesClientUpdateResponse contains the response from method CachesClient.BeginUpdate.
type CachesClientUpgradeFirmwareResponse ¶
type CachesClientUpgradeFirmwareResponse struct { }
CachesClientUpgradeFirmwareResponse contains the response from method CachesClient.BeginUpgradeFirmware.
type CachesListResult ¶
type CachesListResult struct { // URL to get the next set of cache list results, if there are any. NextLink *string // List of Caches. Value []*Cache }
CachesListResult - Result of the request to list caches. It contains a list of caches and a URL link to get the next set of results.
func (CachesListResult) MarshalJSON ¶
func (c CachesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CachesListResult.
func (*CachesListResult) UnmarshalJSON ¶
func (c *CachesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CachesListResult.
type ClfsTarget ¶
type ClfsTarget struct { // Resource ID of storage container. Target *string }
ClfsTarget - Properties pertaining to the ClfsTarget
func (ClfsTarget) MarshalJSON ¶
func (c ClfsTarget) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClfsTarget.
func (*ClfsTarget) UnmarshalJSON ¶
func (c *ClfsTarget) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClfsTarget.
type ClientFactory ¶ added in v3.1.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v3.1.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewAmlFilesystemsClient ¶ added in v3.2.0
func (c *ClientFactory) NewAmlFilesystemsClient() *AmlFilesystemsClient
NewAmlFilesystemsClient creates a new instance of AmlFilesystemsClient.
func (*ClientFactory) NewAscOperationsClient ¶ added in v3.1.0
func (c *ClientFactory) NewAscOperationsClient() *AscOperationsClient
NewAscOperationsClient creates a new instance of AscOperationsClient.
func (*ClientFactory) NewAscUsagesClient ¶ added in v3.1.0
func (c *ClientFactory) NewAscUsagesClient() *AscUsagesClient
NewAscUsagesClient creates a new instance of AscUsagesClient.
func (*ClientFactory) NewCachesClient ¶ added in v3.1.0
func (c *ClientFactory) NewCachesClient() *CachesClient
NewCachesClient creates a new instance of CachesClient.
func (*ClientFactory) NewManagementClient ¶ added in v3.2.0
func (c *ClientFactory) NewManagementClient() *ManagementClient
NewManagementClient creates a new instance of ManagementClient.
func (*ClientFactory) NewOperationsClient ¶ added in v3.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewSKUsClient ¶ added in v3.1.0
func (c *ClientFactory) NewSKUsClient() *SKUsClient
NewSKUsClient creates a new instance of SKUsClient.
func (*ClientFactory) NewStorageTargetClient ¶ added in v3.1.0
func (c *ClientFactory) NewStorageTargetClient() *StorageTargetClient
NewStorageTargetClient creates a new instance of StorageTargetClient.
func (*ClientFactory) NewStorageTargetsClient ¶ added in v3.1.0
func (c *ClientFactory) NewStorageTargetsClient() *StorageTargetsClient
NewStorageTargetsClient creates a new instance of StorageTargetsClient.
func (*ClientFactory) NewUsageModelsClient ¶ added in v3.1.0
func (c *ClientFactory) NewUsageModelsClient() *UsageModelsClient
NewUsageModelsClient creates a new instance of UsageModelsClient.
type CloudErrorBody ¶
type CloudErrorBody struct { // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. Code *string // A list of additional details about the error. Details []*CloudErrorBody // A message describing the error, intended to be suitable for display in a user interface. Message *string // The target of the particular error. For example, the name of the property in error. Target *string }
CloudErrorBody - An error response.
func (CloudErrorBody) MarshalJSON ¶
func (c CloudErrorBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CloudErrorBody.
func (*CloudErrorBody) UnmarshalJSON ¶
func (c *CloudErrorBody) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CloudErrorBody.
type Condition ¶
type Condition struct { // READ-ONLY; The issue requiring attention. Message *string // READ-ONLY; The time when the condition was raised. Timestamp *time.Time }
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 // Error message indicating why the operation failed. Message *string }
ErrorResponse - Describes the format of Error response.
func (ErrorResponse) MarshalJSON ¶
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type FilesystemSubnetStatusType ¶ added in v3.2.0
type FilesystemSubnetStatusType string
FilesystemSubnetStatusType - The status of the AML file system subnet check.
const ( FilesystemSubnetStatusTypeInvalid FilesystemSubnetStatusType = "Invalid" FilesystemSubnetStatusTypeOk FilesystemSubnetStatusType = "Ok" )
func PossibleFilesystemSubnetStatusTypeValues ¶ added in v3.2.0
func PossibleFilesystemSubnetStatusTypeValues() []FilesystemSubnetStatusType
PossibleFilesystemSubnetStatusTypeValues returns the possible values for the FilesystemSubnetStatusType const type.
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. Down is when the cluster is not responding. Degraded is when its functioning but has some alerts. Transitioning when it is creating or deleting. Unknown will be returned in old api versions when a new value is added in future versions. WaitingForKey is when the create is waiting for the system assigned identity to be given access to the encryption key in the encryption settings.
const ( HealthStateTypeDegraded HealthStateType = "Degraded" HealthStateTypeDown HealthStateType = "Down" HealthStateTypeFlushing HealthStateType = "Flushing" HealthStateTypeHealthy HealthStateType = "Healthy" HealthStateTypeStartFailed HealthStateType = "StartFailed" HealthStateTypeStopped HealthStateType = "Stopped" HealthStateTypeStopping HealthStateType = "Stopping" HealthStateTypeTransitioning HealthStateType = "Transitioning" HealthStateTypeUnknown HealthStateType = "Unknown" HealthStateTypeUpgradeFailed HealthStateType = "UpgradeFailed" HealthStateTypeUpgrading HealthStateType = "Upgrading" HealthStateTypeWaitingForKey HealthStateType = "WaitingForKey" )
func PossibleHealthStateTypeValues ¶
func PossibleHealthStateTypeValues() []HealthStateType
PossibleHealthStateTypeValues returns the possible values for the HealthStateType const type.
type KeyVaultKeyReference ¶
type KeyVaultKeyReference struct { // REQUIRED; The URL referencing a key encryption key in key vault. KeyURL *string // REQUIRED; Describes a resource Id to source key vault. SourceVault *KeyVaultKeyReferenceSourceVault }
KeyVaultKeyReference - Describes a reference to key vault key.
func (KeyVaultKeyReference) MarshalJSON ¶
func (k KeyVaultKeyReference) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeyVaultKeyReference.
func (*KeyVaultKeyReference) UnmarshalJSON ¶
func (k *KeyVaultKeyReference) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultKeyReference.
type KeyVaultKeyReferenceSourceVault ¶
type KeyVaultKeyReferenceSourceVault struct { // Resource Id. ID *string }
KeyVaultKeyReferenceSourceVault - Describes a resource Id to source key vault.
func (KeyVaultKeyReferenceSourceVault) MarshalJSON ¶
func (k KeyVaultKeyReferenceSourceVault) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeyVaultKeyReferenceSourceVault.
func (*KeyVaultKeyReferenceSourceVault) UnmarshalJSON ¶
func (k *KeyVaultKeyReferenceSourceVault) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultKeyReferenceSourceVault.
type LogSpecification ¶
type LogSpecification struct { // Localized display name of the log. DisplayName *string // The name of the log. Name *string }
LogSpecification - Details about operation related to logs.
func (LogSpecification) MarshalJSON ¶
func (l LogSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogSpecification.
func (*LogSpecification) UnmarshalJSON ¶
func (l *LogSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification.
type MaintenanceDayOfWeekType ¶ added in v3.2.0
type MaintenanceDayOfWeekType string
MaintenanceDayOfWeekType - Day of the week on which the maintenance window will occur.
const ( MaintenanceDayOfWeekTypeFriday MaintenanceDayOfWeekType = "Friday" MaintenanceDayOfWeekTypeMonday MaintenanceDayOfWeekType = "Monday" MaintenanceDayOfWeekTypeSaturday MaintenanceDayOfWeekType = "Saturday" MaintenanceDayOfWeekTypeSunday MaintenanceDayOfWeekType = "Sunday" MaintenanceDayOfWeekTypeThursday MaintenanceDayOfWeekType = "Thursday" MaintenanceDayOfWeekTypeTuesday MaintenanceDayOfWeekType = "Tuesday" MaintenanceDayOfWeekTypeWednesday MaintenanceDayOfWeekType = "Wednesday" )
func PossibleMaintenanceDayOfWeekTypeValues ¶ added in v3.2.0
func PossibleMaintenanceDayOfWeekTypeValues() []MaintenanceDayOfWeekType
PossibleMaintenanceDayOfWeekTypeValues returns the possible values for the MaintenanceDayOfWeekType const type.
type ManagementClient ¶ added in v3.2.0
type ManagementClient struct {
// contains filtered or unexported fields
}
ManagementClient contains the methods for the StorageCacheManagementClient group. Don't use this type directly, use NewManagementClient() instead.
func NewManagementClient ¶ added in v3.2.0
func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error)
NewManagementClient creates a new instance of ManagementClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagementClient) CheckAmlFSSubnets ¶ added in v3.2.0
func (client *ManagementClient) CheckAmlFSSubnets(ctx context.Context, options *ManagementClientCheckAmlFSSubnetsOptions) (ManagementClientCheckAmlFSSubnetsResponse, error)
CheckAmlFSSubnets - Check that subnets will be valid for AML file system create calls. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- options - ManagementClientCheckAmlFSSubnetsOptions contains the optional parameters for the ManagementClient.CheckAmlFSSubnets method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/checkAmlFSSubnets.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewManagementClient().CheckAmlFSSubnets(ctx, &armstoragecache.ManagementClientCheckAmlFSSubnetsOptions{AmlFilesystemSubnetInfo: &armstoragecache.AmlFilesystemSubnetInfo{ FilesystemSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/fsSub"), SKU: &armstoragecache.SKUName{ Name: to.Ptr("AMLFS-Durable-Premium-125"), }, StorageCapacityTiB: to.Ptr[float32](16), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*ManagementClient) GetRequiredAmlFSSubnetsSize ¶ added in v3.2.0
func (client *ManagementClient) GetRequiredAmlFSSubnetsSize(ctx context.Context, options *ManagementClientGetRequiredAmlFSSubnetsSizeOptions) (ManagementClientGetRequiredAmlFSSubnetsSizeResponse, error)
GetRequiredAmlFSSubnetsSize - Get the number of available IP addresses needed for the AML file system information provided. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- options - ManagementClientGetRequiredAmlFSSubnetsSizeOptions contains the optional parameters for the ManagementClient.GetRequiredAmlFSSubnetsSize method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/getRequiredAmlFSSubnetsSize.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagementClient().GetRequiredAmlFSSubnetsSize(ctx, &armstoragecache.ManagementClientGetRequiredAmlFSSubnetsSizeOptions{RequiredAMLFilesystemSubnetsSizeInfo: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RequiredAmlFilesystemSubnetsSize = armstoragecache.RequiredAmlFilesystemSubnetsSize{ // FilesystemSubnetSize: to.Ptr[int32](24), // }
Output:
type ManagementClientCheckAmlFSSubnetsOptions ¶ added in v3.2.0
type ManagementClientCheckAmlFSSubnetsOptions struct { // Information about the subnets to validate. AmlFilesystemSubnetInfo *AmlFilesystemSubnetInfo }
ManagementClientCheckAmlFSSubnetsOptions contains the optional parameters for the ManagementClient.CheckAmlFSSubnets method.
type ManagementClientCheckAmlFSSubnetsResponse ¶ added in v3.2.0
type ManagementClientCheckAmlFSSubnetsResponse struct { }
ManagementClientCheckAmlFSSubnetsResponse contains the response from method ManagementClient.CheckAmlFSSubnets.
type ManagementClientGetRequiredAmlFSSubnetsSizeOptions ¶ added in v3.2.0
type ManagementClientGetRequiredAmlFSSubnetsSizeOptions struct { // Information to determine the number of available IPs a subnet will need to host the AML file system. RequiredAMLFilesystemSubnetsSizeInfo *RequiredAmlFilesystemSubnetsSizeInfo }
ManagementClientGetRequiredAmlFSSubnetsSizeOptions contains the optional parameters for the ManagementClient.GetRequiredAmlFSSubnetsSize method.
type ManagementClientGetRequiredAmlFSSubnetsSizeResponse ¶ added in v3.2.0
type ManagementClientGetRequiredAmlFSSubnetsSizeResponse struct { // Information about the number of available IP addresses that are required for the AML file system. RequiredAmlFilesystemSubnetsSize }
ManagementClientGetRequiredAmlFSSubnetsSizeResponse contains the response from method ManagementClient.GetRequiredAmlFSSubnetsSize.
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 // Internal name of the dimension. InternalName *string // Name of the dimension Name *string // To be exported to shoe box. ToBeExportedForShoebox *bool }
MetricDimension - Specifications of the Dimension of metrics.
func (MetricDimension) MarshalJSON ¶
func (m MetricDimension) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricDimension.
func (*MetricDimension) UnmarshalJSON ¶
func (m *MetricDimension) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricDimension.
type MetricSpecification ¶
type MetricSpecification struct { // The type of metric aggregation. AggregationType *string // Dimensions of the metric Dimensions []*MetricDimension // The description of the metric. DisplayDescription *string // Localized display name of the metric. DisplayName *string // Type of metrics. MetricClass *string // The name of the metric. Name *string // Support metric aggregation type. SupportedAggregationTypes []*MetricAggregationType // The unit that the metric is measured in. Unit *string }
MetricSpecification - Details about operation related to metrics.
func (MetricSpecification) MarshalJSON ¶
func (m MetricSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricSpecification.
func (*MetricSpecification) UnmarshalJSON ¶
func (m *MetricSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification.
type NamespaceJunction ¶
type NamespaceJunction struct { // Namespace path on a cache for a Storage Target. NamespacePath *string // Name of the access policy applied to this junction. NfsAccessPolicy *string // NFS export where targetPath exists. NfsExport *string // Path in Storage Target to which namespacePath points. TargetPath *string }
NamespaceJunction - A namespace junction.
func (NamespaceJunction) MarshalJSON ¶
func (n NamespaceJunction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NamespaceJunction.
func (*NamespaceJunction) UnmarshalJSON ¶
func (n *NamespaceJunction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceJunction.
type Nfs3Target ¶
type Nfs3Target struct { // IP address or host name of an NFSv3 host (e.g., 10.0.44.44). Target *string // Identifies the StorageCache usage model to be used for this storage target. UsageModel *string // Amount of time (in seconds) the cache waits before it checks the back-end storage for file updates. VerificationTimer *int32 // Amount of time (in seconds) the cache waits after the last file change before it copies the changed file to back-end storage. WriteBackTimer *int32 }
Nfs3Target - Properties pertaining to the Nfs3Target
func (Nfs3Target) MarshalJSON ¶
func (n Nfs3Target) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Nfs3Target.
func (*Nfs3Target) UnmarshalJSON ¶
func (n *Nfs3Target) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Nfs3Target.
type NfsAccessPolicy ¶
type NfsAccessPolicy struct { // REQUIRED; The set of rules describing client accesses allowed under this policy. AccessRules []*NfsAccessRule // REQUIRED; Name identifying this policy. Access Policy names are not case sensitive. Name *string }
NfsAccessPolicy - A set of rules describing access policies applied to NFSv3 clients of the cache.
func (NfsAccessPolicy) MarshalJSON ¶
func (n NfsAccessPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NfsAccessPolicy.
func (*NfsAccessPolicy) UnmarshalJSON ¶
func (n *NfsAccessPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NfsAccessPolicy.
type NfsAccessRule ¶
type NfsAccessRule struct { // REQUIRED; Access allowed by this rule. Access *NfsAccessRuleAccess // REQUIRED; Scope for this rule. The scope and filter determine which clients match the rule. Scope *NfsAccessRuleScope // GID value that replaces 0 when rootSquash is true. This will use the value of anonymousUID if not provided. AnonymousGID *string // UID value that replaces 0 when rootSquash is true. 65534 will be used if not provided. AnonymousUID *string // 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 // Map root accesses to anonymousUID and anonymousGID. RootSquash *bool // 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 // Allow SUID semantics. Suid *bool }
NfsAccessRule - Rule to place restrictions on portions of the cache namespace being presented to clients.
func (NfsAccessRule) MarshalJSON ¶
func (n NfsAccessRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NfsAccessRule.
func (*NfsAccessRule) UnmarshalJSON ¶
func (n *NfsAccessRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NfsAccessRule.
type NfsAccessRuleAccess ¶
type NfsAccessRuleAccess string
NfsAccessRuleAccess - Access allowed by this rule.
const ( NfsAccessRuleAccessNo NfsAccessRuleAccess = "no" NfsAccessRuleAccessRo NfsAccessRuleAccess = "ro" NfsAccessRuleAccessRw NfsAccessRuleAccess = "rw" )
func PossibleNfsAccessRuleAccessValues ¶
func PossibleNfsAccessRuleAccessValues() []NfsAccessRuleAccess
PossibleNfsAccessRuleAccessValues returns the possible values for the NfsAccessRuleAccess const type.
type NfsAccessRuleScope ¶
type NfsAccessRuleScope string
NfsAccessRuleScope - Scope for this rule. The scope and filter determine which clients match the rule.
const ( NfsAccessRuleScopeDefault NfsAccessRuleScope = "default" NfsAccessRuleScopeHost NfsAccessRuleScope = "host" NfsAccessRuleScopeNetwork NfsAccessRuleScope = "network" )
func PossibleNfsAccessRuleScopeValues ¶
func PossibleNfsAccessRuleScopeValues() []NfsAccessRuleScope
PossibleNfsAccessRuleScopeValues returns the possible values for the NfsAccessRuleScope const type.
type OperationalStateType ¶
type OperationalStateType string
OperationalStateType - Storage target operational state.
const ( OperationalStateTypeBusy OperationalStateType = "Busy" OperationalStateTypeFlushing OperationalStateType = "Flushing" OperationalStateTypeReady OperationalStateType = "Ready" OperationalStateTypeSuspended OperationalStateType = "Suspended" )
func PossibleOperationalStateTypeValues ¶
func PossibleOperationalStateTypeValues() []OperationalStateType
PossibleOperationalStateTypeValues returns the possible values for the OperationalStateType const type.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available Resource Provider operations.
Generated from API version 2023-05-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Operations_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.APIOperationListResult = armstoragecache.APIOperationListResult{ // Value: []*armstoragecache.APIOperation{ // { // Name: to.Ptr("Microsoft.StorageCache/caches/write"), // Display: &armstoragecache.APIOperationDisplay{ // Operation: to.Ptr("Create or Update Cache"), // Provider: to.Ptr("Azure Storage Cache"), // Resource: to.Ptr("Caches"), // }, // }, // { // Name: to.Ptr("Microsoft.StorageCache/caches/delete"), // Display: &armstoragecache.APIOperationDisplay{ // Operation: to.Ptr("Delete Cache"), // Provider: to.Ptr("Azure Storage Cache"), // Resource: to.Ptr("Caches"), // }, // }, // { // Name: to.Ptr("Microsoft.StorageCache/caches/providers/Microsoft.Insights/metricDefinitions/read"), // Display: &armstoragecache.APIOperationDisplay{ // Description: to.Ptr("Reads Cache Metric Definitions."), // Operation: to.Ptr("Get Cache Metric Definitions"), // Provider: to.Ptr("Microsoft Azure HPC Cache"), // Resource: to.Ptr("StorageCache Metric Definitions"), // }, // IsDataAction: to.Ptr(false), // Origin: to.Ptr("system"), // Properties: &armstoragecache.APIOperationProperties{ // ServiceSpecification: &armstoragecache.APIOperationPropertiesServiceSpecification{ // MetricSpecifications: []*armstoragecache.MetricSpecification{ // { // Name: to.Ptr("ClientIOPS"), // AggregationType: to.Ptr("Average"), // DisplayDescription: to.Ptr("The rate of client file operations processed by the Cache."), // DisplayName: to.Ptr("Total Client IOPS"), // MetricClass: to.Ptr("Transactions"), // SupportedAggregationTypes: []*armstoragecache.MetricAggregationType{ // to.Ptr(armstoragecache.MetricAggregationTypeMinimum), // to.Ptr(armstoragecache.MetricAggregationTypeMaximum), // to.Ptr(armstoragecache.MetricAggregationTypeAverage)}, // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("ClientLatency"), // AggregationType: to.Ptr("Average"), // DisplayDescription: to.Ptr("Average latency of client file operations to the Cache."), // DisplayName: to.Ptr("Average Client Latency"), // MetricClass: to.Ptr("Latency"), // SupportedAggregationTypes: []*armstoragecache.MetricAggregationType{ // to.Ptr(armstoragecache.MetricAggregationTypeMinimum), // to.Ptr(armstoragecache.MetricAggregationTypeMaximum), // to.Ptr(armstoragecache.MetricAggregationTypeAverage)}, // Unit: to.Ptr("Milliseconds"), // }}, // }, // }, // }}, // } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // 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. APIOperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type PrimingJob ¶
type PrimingJob struct { // REQUIRED; The priming job name. PrimingJobName *string // REQUIRED; The URL for the priming manifest file to download. This file must be readable from the HPC Cache. When the file // is in Azure blob storage the URL should include a Shared Access Signature (SAS) granting // read permissions on the blob. PrimingManifestURL *string // READ-ONLY; The job details or error information if any. PrimingJobDetails *string // READ-ONLY; The unique identifier of the priming job. PrimingJobID *string // READ-ONLY; The current progress of the priming job, as a percentage. PrimingJobPercentComplete *float64 // READ-ONLY; The state of the priming operation. PrimingJobState *PrimingJobState // READ-ONLY; The status code of the priming job. PrimingJobStatus *string }
PrimingJob - A priming job instance.
func (PrimingJob) MarshalJSON ¶
func (p PrimingJob) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrimingJob.
func (*PrimingJob) UnmarshalJSON ¶
func (p *PrimingJob) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrimingJob.
type PrimingJobIDParameter ¶
type PrimingJobIDParameter struct { // REQUIRED; The unique identifier of the priming job. PrimingJobID *string }
PrimingJobIDParameter - Object containing the priming job ID.
func (PrimingJobIDParameter) MarshalJSON ¶
func (p PrimingJobIDParameter) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrimingJobIDParameter.
func (*PrimingJobIDParameter) UnmarshalJSON ¶
func (p *PrimingJobIDParameter) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrimingJobIDParameter.
type PrimingJobState ¶
type PrimingJobState string
PrimingJobState - The state of the priming operation.
const ( PrimingJobStateComplete PrimingJobState = "Complete" PrimingJobStatePaused PrimingJobState = "Paused" PrimingJobStateQueued PrimingJobState = "Queued" PrimingJobStateRunning PrimingJobState = "Running" )
func PossiblePrimingJobStateValues ¶
func PossiblePrimingJobStateValues() []PrimingJobState
PossiblePrimingJobStateValues returns the possible values for the PrimingJobState const type.
type ProvisioningStateType ¶
type ProvisioningStateType string
ProvisioningStateType - ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property
const ( ProvisioningStateTypeCancelled ProvisioningStateType = "Canceled" 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 RequiredAmlFilesystemSubnetsSize ¶ added in v3.2.0
type RequiredAmlFilesystemSubnetsSize struct { // The number of available IP addresses that are required for the AML file system. FilesystemSubnetSize *int32 }
RequiredAmlFilesystemSubnetsSize - Information about the number of available IP addresses that are required for the AML file system.
func (RequiredAmlFilesystemSubnetsSize) MarshalJSON ¶ added in v3.2.0
func (r RequiredAmlFilesystemSubnetsSize) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RequiredAmlFilesystemSubnetsSize.
func (*RequiredAmlFilesystemSubnetsSize) UnmarshalJSON ¶ added in v3.2.0
func (r *RequiredAmlFilesystemSubnetsSize) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RequiredAmlFilesystemSubnetsSize.
type RequiredAmlFilesystemSubnetsSizeInfo ¶ added in v3.2.0
type RequiredAmlFilesystemSubnetsSizeInfo struct { // SKU for the resource. SKU *SKUName // The size of the AML file system, in TiB. StorageCapacityTiB *float32 }
RequiredAmlFilesystemSubnetsSizeInfo - Information required to get the number of available IP addresses a subnet should have that will be used in AML file system create
func (RequiredAmlFilesystemSubnetsSizeInfo) MarshalJSON ¶ added in v3.2.0
func (r RequiredAmlFilesystemSubnetsSizeInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RequiredAmlFilesystemSubnetsSizeInfo.
func (*RequiredAmlFilesystemSubnetsSizeInfo) UnmarshalJSON ¶ added in v3.2.0
func (r *RequiredAmlFilesystemSubnetsSizeInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RequiredAmlFilesystemSubnetsSizeInfo.
type Resource ¶ added in v3.2.0
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶ added in v3.2.0
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v3.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceSKU ¶
type ResourceSKU struct { // A list of capabilities of this SKU, such as throughput or ops/sec. Capabilities []*ResourceSKUCapabilities // The set of locations where the SKU is available. LocationInfo []*ResourceSKULocationInfo // The name of this SKU. Name *string // The restrictions preventing this SKU from being used. This is empty if there are no restrictions. Restrictions []*Restriction // 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 // READ-ONLY; The type of resource the SKU applies to. ResourceType *string }
ResourceSKU - A resource SKU.
func (ResourceSKU) MarshalJSON ¶
func (r ResourceSKU) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKU.
func (*ResourceSKU) UnmarshalJSON ¶
func (r *ResourceSKU) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU.
type ResourceSKUCapabilities ¶
type ResourceSKUCapabilities struct { // Name of a capability, such as ops/sec. Name *string // Quantity, if the capability is measured by quantity. Value *string }
ResourceSKUCapabilities - A resource SKU capability.
func (ResourceSKUCapabilities) MarshalJSON ¶
func (r ResourceSKUCapabilities) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapabilities.
func (*ResourceSKUCapabilities) UnmarshalJSON ¶
func (r *ResourceSKUCapabilities) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapabilities.
type ResourceSKULocationInfo ¶
type ResourceSKULocationInfo struct { // Location where this SKU is available. Location *string // Zones if any. Zones []*string }
ResourceSKULocationInfo - Resource SKU location information.
func (ResourceSKULocationInfo) MarshalJSON ¶
func (r ResourceSKULocationInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKULocationInfo.
func (*ResourceSKULocationInfo) UnmarshalJSON ¶
func (r *ResourceSKULocationInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKULocationInfo.
type ResourceSKUsResult ¶
type ResourceSKUsResult struct { // The URI to fetch the next page of cache SKUs. NextLink *string // READ-ONLY; The list of SKUs available for the subscription. Value []*ResourceSKU }
ResourceSKUsResult - The response from the List Cache SKUs operation.
func (ResourceSKUsResult) MarshalJSON ¶
func (r ResourceSKUsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKUsResult.
func (*ResourceSKUsResult) UnmarshalJSON ¶
func (r *ResourceSKUsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUsResult.
type ResourceUsage ¶
type ResourceUsage struct { // READ-ONLY; The current usage of this resource. CurrentValue *int32 // READ-ONLY; The limit (quota) for this resource. Limit *int32 // READ-ONLY; Naming information for this resource type. Name *ResourceUsageName // READ-ONLY; Unit that the limit and usages are expressed in, such as 'Count'. Unit *string }
ResourceUsage - The usage and limit (quota) for a resource.
func (ResourceUsage) MarshalJSON ¶
func (r ResourceUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceUsage.
func (*ResourceUsage) UnmarshalJSON ¶
func (r *ResourceUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsage.
type ResourceUsageName ¶
type ResourceUsageName struct { // Localized name for this resource type. LocalizedValue *string // Canonical name for this resource type. Value *string }
ResourceUsageName - Naming information for this resource type.
func (ResourceUsageName) MarshalJSON ¶
func (r ResourceUsageName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceUsageName.
func (*ResourceUsageName) UnmarshalJSON ¶
func (r *ResourceUsageName) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsageName.
type ResourceUsagesListResult ¶
type ResourceUsagesListResult struct { // READ-ONLY; URL to get the next set of resource usage list results if there are any. NextLink *string // READ-ONLY; List of usages and limits for resources controlled by the Microsoft.StorageCache resource provider. Value []*ResourceUsage }
ResourceUsagesListResult - Result of the request to list resource usages. It contains a list of resource usages & limits and a URL link to get the next set of results.
func (ResourceUsagesListResult) MarshalJSON ¶
func (r ResourceUsagesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceUsagesListResult.
func (*ResourceUsagesListResult) UnmarshalJSON ¶
func (r *ResourceUsagesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsagesListResult.
type Restriction ¶
type Restriction struct { // The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". "QuotaId" is set when // the SKU has requiredQuotas parameter as the subscription does not belong to that // quota. "NotAvailableForSubscription" is related to capacity at the datacenter. ReasonCode *ReasonCode // READ-ONLY; The type of restrictions. In this version, the only possible value for this is location. Type *string // 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 }
Restriction - The restrictions preventing this SKU from being used.
func (Restriction) MarshalJSON ¶
func (r Restriction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Restriction.
func (*Restriction) UnmarshalJSON ¶
func (r *Restriction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Restriction.
type SKUName ¶ added in v3.2.0
type SKUName struct { // SKU name for this resource. Name *string }
SKUName - SKU for the resource.
func (SKUName) MarshalJSON ¶ added in v3.2.0
MarshalJSON implements the json.Marshaller interface for type SKUName.
func (*SKUName) UnmarshalJSON ¶ added in v3.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type SKUName.
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 - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SKUsClient) NewListPager ¶
func (client *SKUsClient) NewListPager(options *SKUsClientListOptions) *runtime.Pager[SKUsClientListResponse]
NewListPager - Get the list of StorageCache.Cache SKUs available to this subscription.
Generated from API version 2023-05-01
- options - SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/Skus_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSKUsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ResourceSKUsResult = armstoragecache.ResourceSKUsResult{ // Value: []*armstoragecache.ResourceSKU{ // { // Name: to.Ptr("Standard_2G"), // Capabilities: []*armstoragecache.ResourceSKUCapabilities{ // { // Name: to.Ptr("throughput GB/s"), // Value: to.Ptr("2"), // }, // { // Name: to.Ptr("cache sizes(GB)"), // Value: to.Ptr("3072,6144,12288"), // }}, // LocationInfo: []*armstoragecache.ResourceSKULocationInfo{ // { // Location: to.Ptr("eastus"), // Zones: []*string{ // }, // }}, // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("caches"), // Restrictions: []*armstoragecache.Restriction{ // }, // }, // { // Name: to.Ptr("Standard_4G"), // Capabilities: []*armstoragecache.ResourceSKUCapabilities{ // { // Name: to.Ptr("throughput GB/s"), // Value: to.Ptr("4"), // }, // { // Name: to.Ptr("cache sizes(GB)"), // Value: to.Ptr("6144,12288,24576"), // }}, // LocationInfo: []*armstoragecache.ResourceSKULocationInfo{ // { // Location: to.Ptr("eastus"), // Zones: []*string{ // }, // }}, // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("caches"), // Restrictions: []*armstoragecache.Restriction{ // }, // }, // { // Name: to.Ptr("Standard_8G"), // Capabilities: []*armstoragecache.ResourceSKUCapabilities{ // { // Name: to.Ptr("throughput GB/s"), // Value: to.Ptr("8"), // }, // { // Name: to.Ptr("cache sizes(GB)"), // Value: to.Ptr("12288,24576,49152"), // }}, // LocationInfo: []*armstoragecache.ResourceSKULocationInfo{ // { // Location: to.Ptr("eastus"), // Zones: []*string{ // }, // }}, // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("caches"), // Restrictions: []*armstoragecache.Restriction{ // }, // }}, // } }
Output:
type SKUsClientListOptions ¶
type SKUsClientListOptions struct { }
SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method.
type SKUsClientListResponse ¶
type SKUsClientListResponse struct { // The response from the List Cache SKUs operation. ResourceSKUsResult }
SKUsClientListResponse contains the response from method SKUsClient.NewListPager.
type StorageTarget ¶
type StorageTarget struct { // StorageTarget properties Properties *StorageTargetProperties // READ-ONLY; Resource ID of the Storage Target. ID *string // READ-ONLY; Region name string. Location *string // READ-ONLY; Name of the Storage Target. Name *string // READ-ONLY; The system meta data relating to this resource. SystemData *SystemData // READ-ONLY; Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget Type *string }
StorageTarget - Type of the Storage Target.
func (StorageTarget) MarshalJSON ¶
func (s StorageTarget) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageTarget.
func (*StorageTarget) UnmarshalJSON ¶
func (s *StorageTarget) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageTarget.
type StorageTargetClient ¶
type StorageTargetClient struct {
// contains filtered or unexported fields
}
StorageTargetClient contains the methods for the StorageTarget group. Don't use this type directly, use NewStorageTargetClient() instead.
func NewStorageTargetClient ¶
func NewStorageTargetClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageTargetClient, error)
NewStorageTargetClient creates a new instance of StorageTargetClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*StorageTargetClient) BeginFlush ¶
func (client *StorageTargetClient) BeginFlush(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginFlushOptions) (*runtime.Poller[StorageTargetClientFlushResponse], error)
BeginFlush - Tells the cache to write all dirty data to the Storage Target's backend storage. Client requests to this storage target's namespace will return errors until the flush operation completes. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Flush.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageTargetClient().BeginFlush(ctx, "scgroup", "sc", "st1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*StorageTargetClient) BeginInvalidate ¶
func (client *StorageTargetClient) BeginInvalidate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginInvalidateOptions) (*runtime.Poller[StorageTargetClientInvalidateResponse], error)
BeginInvalidate - Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the next request. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Invalidate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageTargetClient().BeginInvalidate(ctx, "scgroup", "sc", "st1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*StorageTargetClient) BeginResume ¶
func (client *StorageTargetClient) BeginResume(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginResumeOptions) (*runtime.Poller[StorageTargetClientResumeResponse], error)
BeginResume - Resumes client access to a previously suspended storage target. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Resume.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageTargetClient().BeginResume(ctx, "scgroup", "sc", "st1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*StorageTargetClient) BeginSuspend ¶
func (client *StorageTargetClient) BeginSuspend(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetClientBeginSuspendOptions) (*runtime.Poller[StorageTargetClientSuspendResponse], error)
BeginSuspend - Suspends client access to a storage target. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Suspend.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageTargetClient().BeginSuspend(ctx, "scgroup", "sc", "st1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
type StorageTargetClientBeginFlushOptions ¶
type StorageTargetClientBeginFlushOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageTargetClientBeginFlushOptions contains the optional parameters for the StorageTargetClient.BeginFlush method.
type StorageTargetClientBeginInvalidateOptions ¶
type StorageTargetClientBeginInvalidateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageTargetClientBeginInvalidateOptions contains the optional parameters for the StorageTargetClient.BeginInvalidate method.
type StorageTargetClientBeginResumeOptions ¶
type StorageTargetClientBeginResumeOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageTargetClientBeginResumeOptions contains the optional parameters for the StorageTargetClient.BeginResume method.
type StorageTargetClientBeginSuspendOptions ¶
type StorageTargetClientBeginSuspendOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageTargetClientBeginSuspendOptions contains the optional parameters for the StorageTargetClient.BeginSuspend method.
type StorageTargetClientFlushResponse ¶
type StorageTargetClientFlushResponse struct { }
StorageTargetClientFlushResponse contains the response from method StorageTargetClient.BeginFlush.
type StorageTargetClientInvalidateResponse ¶
type StorageTargetClientInvalidateResponse struct { }
StorageTargetClientInvalidateResponse contains the response from method StorageTargetClient.BeginInvalidate.
type StorageTargetClientResumeResponse ¶
type StorageTargetClientResumeResponse struct { }
StorageTargetClientResumeResponse contains the response from method StorageTargetClient.BeginResume.
type StorageTargetClientSuspendResponse ¶
type StorageTargetClientSuspendResponse struct { }
StorageTargetClientSuspendResponse contains the response from method StorageTargetClient.BeginSuspend.
type StorageTargetProperties ¶
type StorageTargetProperties struct { // REQUIRED; Type of the Storage Target. TargetType *StorageTargetType // Properties when targetType is blobNfs. BlobNfs *BlobNfsTarget // Properties when targetType is clfs. Clfs *ClfsTarget // List of cache namespace junctions to target for namespace associations. Junctions []*NamespaceJunction // Properties when targetType is nfs3. Nfs3 *Nfs3Target // Storage target operational state. State *OperationalStateType // Properties when targetType is unknown. Unknown *UnknownTarget // READ-ONLY; The percentage of cache space allocated for this storage target AllocationPercentage *int32 // READ-ONLY; ARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property ProvisioningState *ProvisioningStateType }
StorageTargetProperties - Properties of the Storage Target.
func (StorageTargetProperties) MarshalJSON ¶
func (s StorageTargetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageTargetProperties.
func (*StorageTargetProperties) UnmarshalJSON ¶
func (s *StorageTargetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageTargetProperties.
type StorageTargetResource ¶
type StorageTargetResource struct { // READ-ONLY; Resource ID of the Storage Target. ID *string // READ-ONLY; Region name string. Location *string // READ-ONLY; Name of the Storage Target. Name *string // READ-ONLY; The system meta data relating to this resource. SystemData *SystemData // READ-ONLY; Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget Type *string }
StorageTargetResource - Resource used by a cache.
func (StorageTargetResource) MarshalJSON ¶
func (s StorageTargetResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageTargetResource.
func (*StorageTargetResource) UnmarshalJSON ¶
func (s *StorageTargetResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageTargetResource.
type StorageTargetSpaceAllocation ¶
type StorageTargetSpaceAllocation struct { // The percentage of cache space allocated for this storage target AllocationPercentage *int32 // Name of the storage target. Name *string }
StorageTargetSpaceAllocation - Storage Target space allocation properties.
func (StorageTargetSpaceAllocation) MarshalJSON ¶
func (s StorageTargetSpaceAllocation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageTargetSpaceAllocation.
func (*StorageTargetSpaceAllocation) UnmarshalJSON ¶
func (s *StorageTargetSpaceAllocation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageTargetSpaceAllocation.
type StorageTargetType ¶
type StorageTargetType string
StorageTargetType - Type of the Storage Target.
const ( StorageTargetTypeBlobNfs StorageTargetType = "blobNfs" StorageTargetTypeClfs StorageTargetType = "clfs" StorageTargetTypeNfs3 StorageTargetType = "nfs3" StorageTargetTypeUnknown StorageTargetType = "unknown" )
func PossibleStorageTargetTypeValues ¶
func PossibleStorageTargetTypeValues() []StorageTargetType
PossibleStorageTargetTypeValues returns the possible values for the StorageTargetType const type.
type StorageTargetsClient ¶
type StorageTargetsClient struct {
// contains filtered or unexported fields
}
StorageTargetsClient contains the methods for the StorageTargets group. Don't use this type directly, use NewStorageTargetsClient() instead.
func NewStorageTargetsClient ¶
func NewStorageTargetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StorageTargetsClient, error)
NewStorageTargetsClient creates a new instance of StorageTargetsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*StorageTargetsClient) BeginCreateOrUpdate ¶
func (client *StorageTargetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, storagetarget StorageTarget, options *StorageTargetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[StorageTargetsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create or update a Storage Target. This operation is allowed at any time, but if the cache is down or unhealthy, the actual creation/modification of the Storage Target may be delayed until the cache is healthy again. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- cacheName - Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class.
- storageTargetName - Name of Storage Target.
- storagetarget - Object containing the definition of a Storage Target.
- options - StorageTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageTargetsClient.BeginCreateOrUpdate method.
Example (StorageTargetsCreateOrUpdate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageTargetsClient().BeginCreateOrUpdate(ctx, "scgroup", "sc1", "st1", armstoragecache.StorageTarget{ Properties: &armstoragecache.StorageTargetProperties{ Junctions: []*armstoragecache.NamespaceJunction{ { NamespacePath: to.Ptr("/path/on/cache"), NfsAccessPolicy: to.Ptr("default"), NfsExport: to.Ptr("exp1"), TargetPath: to.Ptr("/path/on/exp1"), }, { NamespacePath: to.Ptr("/path2/on/cache"), NfsAccessPolicy: to.Ptr("rootSquash"), NfsExport: to.Ptr("exp2"), TargetPath: to.Ptr("/path2/on/exp2"), }}, Nfs3: &armstoragecache.Nfs3Target{ Target: to.Ptr("10.0.44.44"), UsageModel: to.Ptr("READ_ONLY"), VerificationTimer: to.Ptr[int32](30), }, TargetType: to.Ptr(armstoragecache.StorageTargetTypeNfs3), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.StorageTarget = armstoragecache.StorageTarget{ // Name: to.Ptr("st1"), // Type: to.Ptr("Microsoft.StorageCache/Cache/StorageTarget"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1/storagetargets/st1"), // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Properties: &armstoragecache.StorageTargetProperties{ // Junctions: []*armstoragecache.NamespaceJunction{ // { // NamespacePath: to.Ptr("/path/on/cache"), // NfsAccessPolicy: to.Ptr("default"), // NfsExport: to.Ptr("exp1"), // TargetPath: to.Ptr("/path/on/exp1"), // }, // { // NamespacePath: to.Ptr("/path2/on/cache"), // NfsAccessPolicy: to.Ptr("rootSquash"), // NfsExport: to.Ptr("exp2"), // TargetPath: to.Ptr("/path2/on/exp2"), // }}, // Nfs3: &armstoragecache.Nfs3Target{ // Target: to.Ptr("10.0.44.44"), // UsageModel: to.Ptr("READ_ONLY"), // VerificationTimer: to.Ptr[int32](30), // }, // State: to.Ptr(armstoragecache.OperationalStateTypeReady), // TargetType: to.Ptr(armstoragecache.StorageTargetTypeNfs3), // }, // }
Output:
Example (StorageTargetsCreateOrUpdateBlobNfs) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageTargetsClient().BeginCreateOrUpdate(ctx, "scgroup", "sc1", "st1", armstoragecache.StorageTarget{ Properties: &armstoragecache.StorageTargetProperties{ BlobNfs: &armstoragecache.BlobNfsTarget{ Target: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/blofnfs/blobServices/default/containers/blobnfs"), UsageModel: to.Ptr("READ_WRITE"), VerificationTimer: to.Ptr[int32](28800), WriteBackTimer: to.Ptr[int32](3600), }, Junctions: []*armstoragecache.NamespaceJunction{ { NamespacePath: to.Ptr("/blobnfs"), }}, TargetType: to.Ptr(armstoragecache.StorageTargetTypeBlobNfs), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.StorageTarget = armstoragecache.StorageTarget{ // Name: to.Ptr("st1"), // Type: to.Ptr("Microsoft.StorageCache/Cache/StorageTarget"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1/storagetargets/st1"), // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Properties: &armstoragecache.StorageTargetProperties{ // BlobNfs: &armstoragecache.BlobNfsTarget{ // Target: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/blofnfs/blobServices/default/containers/blobnfs"), // UsageModel: to.Ptr("READ_WRITE"), // VerificationTimer: to.Ptr[int32](28800), // WriteBackTimer: to.Ptr[int32](3600), // }, // Junctions: []*armstoragecache.NamespaceJunction{ // { // NamespacePath: to.Ptr("/blobnfs"), // }}, // State: to.Ptr(armstoragecache.OperationalStateTypeReady), // TargetType: to.Ptr(armstoragecache.StorageTargetTypeBlobNfs), // }, // }
Output:
Example (StorageTargetsCreateOrUpdateNoJunctions) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageTargetsClient().BeginCreateOrUpdate(ctx, "scgroup", "sc1", "st1", armstoragecache.StorageTarget{ Properties: &armstoragecache.StorageTargetProperties{ Nfs3: &armstoragecache.Nfs3Target{ Target: to.Ptr("10.0.44.44"), UsageModel: to.Ptr("READ_ONLY"), VerificationTimer: to.Ptr[int32](30), }, TargetType: to.Ptr(armstoragecache.StorageTargetTypeNfs3), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.StorageTarget = armstoragecache.StorageTarget{ // Name: to.Ptr("st1"), // Type: to.Ptr("Microsoft.StorageCache/Cache/StorageTarget"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1/storagetargets/st1"), // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Properties: &armstoragecache.StorageTargetProperties{ // Nfs3: &armstoragecache.Nfs3Target{ // Target: to.Ptr("10.0.44.44"), // UsageModel: to.Ptr("READ_ONLY"), // VerificationTimer: to.Ptr[int32](30), // }, // State: to.Ptr(armstoragecache.OperationalStateTypeReady), // TargetType: to.Ptr(armstoragecache.StorageTargetTypeNfs3), // }, // }
Output:
func (*StorageTargetsClient) BeginDNSRefresh ¶
func (client *StorageTargetsClient) BeginDNSRefresh(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDNSRefreshOptions) (*runtime.Poller[StorageTargetsClientDNSRefreshResponse], error)
BeginDNSRefresh - Tells a storage target to refresh its DNS information. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_DnsRefresh.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageTargetsClient().BeginDNSRefresh(ctx, "scgroup", "sc", "st1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*StorageTargetsClient) BeginDelete ¶
func (client *StorageTargetsClient) BeginDelete(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginDeleteOptions) (*runtime.Poller[StorageTargetsClientDeleteResponse], error)
BeginDelete - Removes a Storage Target from a cache. This operation is allowed at any time, but if the cache is down or unhealthy, the actual removal of the Storage Target may be delayed until the cache is healthy again. Note that if the cache has data to flush to the Storage Target, the data will be flushed before the Storage Target will be deleted. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageTargetsClient().BeginDelete(ctx, "scgroup", "sc1", "st1", &armstoragecache.StorageTargetsClientBeginDeleteOptions{Force: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*StorageTargetsClient) BeginRestoreDefaults ¶
func (client *StorageTargetsClient) BeginRestoreDefaults(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientBeginRestoreDefaultsOptions) (*runtime.Poller[StorageTargetsClientRestoreDefaultsResponse], error)
BeginRestoreDefaults - Tells a storage target to restore its settings to their default values. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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 - StorageTargetsClientBeginRestoreDefaultsOptions contains the optional parameters for the StorageTargetsClient.BeginRestoreDefaults method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_RestoreDefaults.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStorageTargetsClient().BeginRestoreDefaults(ctx, "scgroup", "sc", "st1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) }
Output:
func (*StorageTargetsClient) Get ¶
func (client *StorageTargetsClient) Get(ctx context.Context, resourceGroupName string, cacheName string, storageTargetName string, options *StorageTargetsClientGetOptions) (StorageTargetsClientGetResponse, error)
Get - Returns a Storage Target from a cache. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewStorageTargetsClient().Get(ctx, "scgroup", "sc1", "st1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.StorageTarget = armstoragecache.StorageTarget{ // Name: to.Ptr("st1"), // Type: to.Ptr("Microsoft.StorageCache/Cache/StorageTarget"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1/storagetargets/st1"), // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Properties: &armstoragecache.StorageTargetProperties{ // AllocationPercentage: to.Ptr[int32](25), // Junctions: []*armstoragecache.NamespaceJunction{ // { // NamespacePath: to.Ptr("/path/on/cache"), // NfsAccessPolicy: to.Ptr("default"), // NfsExport: to.Ptr("exp1"), // TargetPath: to.Ptr("/path/on/exp1"), // }, // { // NamespacePath: to.Ptr("/path2/on/cache"), // NfsAccessPolicy: to.Ptr("default"), // NfsExport: to.Ptr("exp2"), // TargetPath: to.Ptr("/path2/on/exp2"), // }}, // Nfs3: &armstoragecache.Nfs3Target{ // Target: to.Ptr("10.0.44.44"), // UsageModel: to.Ptr("READ_HEAVY_FREQ"), // }, // State: to.Ptr(armstoragecache.OperationalStateTypeReady), // TargetType: to.Ptr(armstoragecache.StorageTargetTypeNfs3), // }, // }
Output:
func (*StorageTargetsClient) NewListByCachePager ¶
func (client *StorageTargetsClient) NewListByCachePager(resourceGroupName string, cacheName string, options *StorageTargetsClientListByCacheOptions) *runtime.Pager[StorageTargetsClientListByCacheResponse]
NewListByCachePager - Returns a list of Storage Targets for the specified cache.
Generated from API version 2023-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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.NewListByCachePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/StorageTargets_ListByCache.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewStorageTargetsClient().NewListByCachePager("scgroup", "sc1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.StorageTargetsResult = armstoragecache.StorageTargetsResult{ // Value: []*armstoragecache.StorageTarget{ // { // Name: to.Ptr("st1"), // Type: to.Ptr("Microsoft.StorageCache/Cache/StorageTarget"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1/storagetargets/st1"), // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Properties: &armstoragecache.StorageTargetProperties{ // AllocationPercentage: to.Ptr[int32](25), // Junctions: []*armstoragecache.NamespaceJunction{ // { // NamespacePath: to.Ptr("/path/on/cache"), // NfsAccessPolicy: to.Ptr("default"), // NfsExport: to.Ptr("exp1"), // TargetPath: to.Ptr("/path/on/exp1"), // }, // { // NamespacePath: to.Ptr("/path2/on/cache"), // NfsAccessPolicy: to.Ptr("default"), // NfsExport: to.Ptr("exp2"), // TargetPath: to.Ptr("/path2/on/exp2"), // }}, // Nfs3: &armstoragecache.Nfs3Target{ // Target: to.Ptr("10.0.44.44"), // UsageModel: to.Ptr("READ_ONLY"), // }, // State: to.Ptr(armstoragecache.OperationalStateTypeReady), // TargetType: to.Ptr(armstoragecache.StorageTargetTypeNfs3), // }, // }, // { // Name: to.Ptr("st2"), // Type: to.Ptr("Microsoft.StorageCache/Cache/StorageTarget"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1/storagetargets/st2"), // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Properties: &armstoragecache.StorageTargetProperties{ // AllocationPercentage: to.Ptr[int32](50), // Clfs: &armstoragecache.ClfsTarget{ // Target: to.Ptr("https://contoso123.blob.core.windows.net/contoso123"), // }, // Junctions: []*armstoragecache.NamespaceJunction{ // { // NamespacePath: to.Ptr("/some/arbitrary/place/on/cache"), // NfsAccessPolicy: to.Ptr("default"), // TargetPath: to.Ptr("/"), // }}, // State: to.Ptr(armstoragecache.OperationalStateTypeReady), // TargetType: to.Ptr(armstoragecache.StorageTargetTypeClfs), // }, // }, // { // Name: to.Ptr("st3"), // Type: to.Ptr("Microsoft.StorageCache/Cache/StorageTarget"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.StorageCache/caches/sc1/storagetargets/st3"), // SystemData: &armstoragecache.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armstoragecache.CreatedByTypeUser), // }, // Properties: &armstoragecache.StorageTargetProperties{ // AllocationPercentage: to.Ptr[int32](25), // Junctions: []*armstoragecache.NamespaceJunction{ // { // NamespacePath: to.Ptr("/some/crazier/place/on/cache"), // NfsAccessPolicy: to.Ptr("default"), // NfsExport: to.Ptr(""), // TargetPath: to.Ptr("/"), // }}, // State: to.Ptr(armstoragecache.OperationalStateTypeReady), // TargetType: to.Ptr(armstoragecache.StorageTargetTypeUnknown), // Unknown: &armstoragecache.UnknownTarget{ // Attributes: map[string]*string{ // "foo": to.Ptr("bar"), // "foo2": to.Ptr("test"), // }, // }, // }, // }}, // } }
Output:
type StorageTargetsClientBeginCreateOrUpdateOptions ¶
type StorageTargetsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageTargetsClientBeginCreateOrUpdateOptions contains the optional parameters for the StorageTargetsClient.BeginCreateOrUpdate method.
type StorageTargetsClientBeginDNSRefreshOptions ¶
type StorageTargetsClientBeginDNSRefreshOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageTargetsClientBeginDNSRefreshOptions contains the optional parameters for the StorageTargetsClient.BeginDNSRefresh method.
type StorageTargetsClientBeginDeleteOptions ¶
type StorageTargetsClientBeginDeleteOptions struct { // Boolean value requesting the force delete operation for a storage target. Force delete discards unwritten-data in the cache // instead of flushing it to back-end storage. Force *string // Resumes the LRO from the provided token. ResumeToken string }
StorageTargetsClientBeginDeleteOptions contains the optional parameters for the StorageTargetsClient.BeginDelete method.
type StorageTargetsClientBeginRestoreDefaultsOptions ¶
type StorageTargetsClientBeginRestoreDefaultsOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StorageTargetsClientBeginRestoreDefaultsOptions contains the optional parameters for the StorageTargetsClient.BeginRestoreDefaults method.
type StorageTargetsClientCreateOrUpdateResponse ¶
type StorageTargetsClientCreateOrUpdateResponse struct { // Type of the Storage Target. StorageTarget }
StorageTargetsClientCreateOrUpdateResponse contains the response from method StorageTargetsClient.BeginCreateOrUpdate.
type StorageTargetsClientDNSRefreshResponse ¶
type StorageTargetsClientDNSRefreshResponse struct { }
StorageTargetsClientDNSRefreshResponse contains the response from method StorageTargetsClient.BeginDNSRefresh.
type StorageTargetsClientDeleteResponse ¶
type StorageTargetsClientDeleteResponse struct { }
StorageTargetsClientDeleteResponse contains the response from method StorageTargetsClient.BeginDelete.
type StorageTargetsClientGetOptions ¶
type StorageTargetsClientGetOptions struct { }
StorageTargetsClientGetOptions contains the optional parameters for the StorageTargetsClient.Get method.
type StorageTargetsClientGetResponse ¶
type StorageTargetsClientGetResponse struct { // Type of the Storage Target. StorageTarget }
StorageTargetsClientGetResponse contains the response from method StorageTargetsClient.Get.
type StorageTargetsClientListByCacheOptions ¶
type StorageTargetsClientListByCacheOptions struct { }
StorageTargetsClientListByCacheOptions contains the optional parameters for the StorageTargetsClient.NewListByCachePager method.
type StorageTargetsClientListByCacheResponse ¶
type StorageTargetsClientListByCacheResponse struct { // A list of Storage Targets. StorageTargetsResult }
StorageTargetsClientListByCacheResponse contains the response from method StorageTargetsClient.NewListByCachePager.
type StorageTargetsClientRestoreDefaultsResponse ¶
type StorageTargetsClientRestoreDefaultsResponse struct { }
StorageTargetsClientRestoreDefaultsResponse contains the response from method StorageTargetsClient.BeginRestoreDefaults.
type StorageTargetsResult ¶
type StorageTargetsResult struct { // The URI to fetch the next page of Storage Targets. NextLink *string // The list of Storage Targets defined for the cache. Value []*StorageTarget }
StorageTargetsResult - A list of Storage Targets.
func (StorageTargetsResult) MarshalJSON ¶
func (s StorageTargetsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageTargetsResult.
func (*StorageTargetsResult) UnmarshalJSON ¶
func (s *StorageTargetsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageTargetsResult.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
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 TrackedResource ¶ added in v3.2.0
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶ added in v3.2.0
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶ added in v3.2.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type UnknownTarget ¶
type UnknownTarget struct { // Dictionary of string->string pairs containing information about the Storage Target. Attributes map[string]*string }
UnknownTarget - Properties pertaining to the UnknownTarget
func (UnknownTarget) MarshalJSON ¶
func (u UnknownTarget) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UnknownTarget.
func (*UnknownTarget) UnmarshalJSON ¶
func (u *UnknownTarget) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UnknownTarget.
type UsageModel ¶
type UsageModel struct { // Localized information describing this usage model. Display *UsageModelDisplay // Non-localized keyword name for this usage model. ModelName *string // The type of Storage Target to which this model is applicable (only nfs3 as of this version). TargetType *string }
UsageModel - A usage model.
func (UsageModel) MarshalJSON ¶
func (u UsageModel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UsageModel.
func (*UsageModel) UnmarshalJSON ¶
func (u *UsageModel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UsageModel.
type UsageModelDisplay ¶
type UsageModelDisplay struct { // String to display for this usage model. Description *string }
UsageModelDisplay - Localized information describing this usage model.
func (UsageModelDisplay) MarshalJSON ¶
func (u UsageModelDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UsageModelDisplay.
func (*UsageModelDisplay) UnmarshalJSON ¶
func (u *UsageModelDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UsageModelDisplay.
type UsageModelsClient ¶
type UsageModelsClient struct {
// contains filtered or unexported fields
}
UsageModelsClient contains the methods for the UsageModels group. Don't use this type directly, use NewUsageModelsClient() instead.
func NewUsageModelsClient ¶
func NewUsageModelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsageModelsClient, error)
NewUsageModelsClient creates a new instance of UsageModelsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*UsageModelsClient) NewListPager ¶
func (client *UsageModelsClient) NewListPager(options *UsageModelsClientListOptions) *runtime.Pager[UsageModelsClientListResponse]
NewListPager - Get the list of cache usage models available to this subscription.
Generated from API version 2023-05-01
- options - UsageModelsClientListOptions contains the optional parameters for the UsageModelsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7f3e601fd326ca910c3d2939b516e15581e7e41/specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-05-01/examples/UsageModels_List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstoragecache.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewUsageModelsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.UsageModelsResult = armstoragecache.UsageModelsResult{ // Value: []*armstoragecache.UsageModel{ // { // Display: &armstoragecache.UsageModelDisplay{ // Description: to.Ptr("Read only, with a default verification timer of 30 seconds. Verification timer has a minimum value of 1 and maximum value of 31536000. Write-back timer must have value of 0 or be null."), // }, // ModelName: to.Ptr("READ_ONLY"), // TargetType: to.Ptr("nfs3"), // }, // { // Display: &armstoragecache.UsageModelDisplay{ // Description: to.Ptr("Read-write, with a default verification timer of 8 hours and default write-back timer of 1 hour. Verification timer and write-back timer have a minimum value of 1 and maximum value of 31536000."), // }, // ModelName: to.Ptr("READ_WRITE"), // TargetType: to.Ptr("nfs3"), // }}, // } }
Output:
type UsageModelsClientListOptions ¶
type UsageModelsClientListOptions struct { }
UsageModelsClientListOptions contains the optional parameters for the UsageModelsClient.NewListPager method.
type UsageModelsClientListResponse ¶
type UsageModelsClientListResponse struct { // A list of cache usage models. UsageModelsResult }
UsageModelsClientListResponse contains the response from method UsageModelsClient.NewListPager.
type UsageModelsResult ¶
type UsageModelsResult struct { // The URI to fetch the next page of cache usage models. NextLink *string // The list of usage models available for the subscription. Value []*UsageModel }
UsageModelsResult - A list of cache usage models.
func (UsageModelsResult) MarshalJSON ¶
func (u UsageModelsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UsageModelsResult.
func (*UsageModelsResult) UnmarshalJSON ¶
func (u *UsageModelsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UsageModelsResult.
type UserAssignedIdentitiesValue ¶
type UserAssignedIdentitiesValue struct { // READ-ONLY; The client ID of the user-assigned identity. ClientID *string // READ-ONLY; The principal ID of the user-assigned identity. PrincipalID *string }
func (UserAssignedIdentitiesValue) MarshalJSON ¶
func (u UserAssignedIdentitiesValue) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentitiesValue.
func (*UserAssignedIdentitiesValue) UnmarshalJSON ¶
func (u *UserAssignedIdentitiesValue) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentitiesValue.
type UsernameDownloadedType ¶
type UsernameDownloadedType string
UsernameDownloadedType - Indicates whether or not the HPC Cache has performed the username download successfully.
const ( UsernameDownloadedTypeError UsernameDownloadedType = "Error" UsernameDownloadedTypeNo UsernameDownloadedType = "No" UsernameDownloadedTypeYes UsernameDownloadedType = "Yes" )
func PossibleUsernameDownloadedTypeValues ¶
func PossibleUsernameDownloadedTypeValues() []UsernameDownloadedType
PossibleUsernameDownloadedTypeValues returns the possible values for the UsernameDownloadedType const type.
type UsernameSource ¶
type UsernameSource string
UsernameSource - This setting determines how the cache gets username and group names for clients.
const ( UsernameSourceAD UsernameSource = "AD" UsernameSourceFile UsernameSource = "File" UsernameSourceLDAP UsernameSource = "LDAP" UsernameSourceNone UsernameSource = "None" )
func PossibleUsernameSourceValues ¶
func PossibleUsernameSourceValues() []UsernameSource
PossibleUsernameSourceValues returns the possible values for the UsernameSource const type.
Source Files ¶
- amlfilesystems_client.go
- ascoperations_client.go
- ascusages_client.go
- build.go
- caches_client.go
- client_factory.go
- constants.go
- management_client.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- response_types.go
- skus_client.go
- storagetarget_client.go
- storagetargets_client.go
- time_rfc3339.go
- usagemodels_client.go