caches

package
v0.20230310.1062650 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2021-09-01/caches Documentation

The caches SDK allows for interaction with the Azure Resource Manager Service storagecache (API Version 2021-09-01).

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

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2021-09-01/caches"

Client Initialization

client := caches.NewCachesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CachesClient.CreateOrUpdate

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

payload := caches.Cache{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: CachesClient.DebugInfo

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.DebugInfoThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: CachesClient.Delete

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: CachesClient.Flush

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.FlushThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: CachesClient.Get

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

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

Example Usage: CachesClient.List

ctx := context.TODO()
id := caches.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: CachesClient.ListByResourceGroup

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

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

Example Usage: CachesClient.Start

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.StartThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: CachesClient.Stop

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.StopThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: CachesClient.Update

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

payload := caches.Cache{
	// ...
}


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

Example Usage: CachesClient.UpgradeFirmware

ctx := context.TODO()
id := caches.NewCacheID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cacheValue")

if err := client.UpgradeFirmwareThenPoll(ctx, id); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDomainJoinedType

func PossibleValuesForDomainJoinedType() []string

func PossibleValuesForFirmwareStatusType

func PossibleValuesForFirmwareStatusType() []string

func PossibleValuesForHealthStateType

func PossibleValuesForHealthStateType() []string

func PossibleValuesForNfsAccessRuleAccess

func PossibleValuesForNfsAccessRuleAccess() []string

func PossibleValuesForNfsAccessRuleScope

func PossibleValuesForNfsAccessRuleScope() []string

func PossibleValuesForProvisioningStateType

func PossibleValuesForProvisioningStateType() []string

func PossibleValuesForUsernameDownloadedType

func PossibleValuesForUsernameDownloadedType() []string

func PossibleValuesForUsernameSource

func PossibleValuesForUsernameSource() []string

func ValidateCacheID

func ValidateCacheID(input interface{}, key string) (warnings []string, errors []error)

ValidateCacheID checks that 'input' can be parsed as a Cache ID

Types

type Cache

type Cache struct {
	Id         *string                            `json:"id,omitempty"`
	Identity   *identity.SystemAndUserAssignedMap `json:"identity,omitempty"`
	Location   *string                            `json:"location,omitempty"`
	Name       *string                            `json:"name,omitempty"`
	Properties *CacheProperties                   `json:"properties,omitempty"`
	Sku        *CacheSku                          `json:"sku,omitempty"`
	SystemData *systemdata.SystemData             `json:"systemData,omitempty"`
	Tags       *map[string]string                 `json:"tags,omitempty"`
	Type       *string                            `json:"type,omitempty"`
}

type CacheActiveDirectorySettings

type CacheActiveDirectorySettings struct {
	CacheNetBiosName      string                                   `json:"cacheNetBiosName"`
	Credentials           *CacheActiveDirectorySettingsCredentials `json:"credentials,omitempty"`
	DomainJoined          *DomainJoinedType                        `json:"domainJoined,omitempty"`
	DomainName            string                                   `json:"domainName"`
	DomainNetBiosName     string                                   `json:"domainNetBiosName"`
	PrimaryDnsIPAddress   string                                   `json:"primaryDnsIpAddress"`
	SecondaryDnsIPAddress *string                                  `json:"secondaryDnsIpAddress,omitempty"`
}

type CacheActiveDirectorySettingsCredentials

type CacheActiveDirectorySettingsCredentials struct {
	Password string `json:"password"`
	Username string `json:"username"`
}

type CacheDirectorySettings

type CacheDirectorySettings struct {
	ActiveDirectory  *CacheActiveDirectorySettings  `json:"activeDirectory,omitempty"`
	UsernameDownload *CacheUsernameDownloadSettings `json:"usernameDownload,omitempty"`
}

type CacheEncryptionSettings

type CacheEncryptionSettings struct {
	KeyEncryptionKey                  *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"`
	RotationToLatestKeyVersionEnabled *bool                 `json:"rotationToLatestKeyVersionEnabled,omitempty"`
}

type CacheHealth

type CacheHealth struct {
	Conditions        *[]Condition     `json:"conditions,omitempty"`
	State             *HealthStateType `json:"state,omitempty"`
	StatusDescription *string          `json:"statusDescription,omitempty"`
}

type CacheId

type CacheId struct {
	SubscriptionId    string
	ResourceGroupName string
	CacheName         string
}

CacheId is a struct representing the Resource ID for a Cache

func NewCacheID

func NewCacheID(subscriptionId string, resourceGroupName string, cacheName string) CacheId

NewCacheID returns a new CacheId struct

func ParseCacheID

func ParseCacheID(input string) (*CacheId, error)

ParseCacheID parses 'input' into a CacheId

func ParseCacheIDInsensitively

func ParseCacheIDInsensitively(input string) (*CacheId, error)

ParseCacheIDInsensitively parses 'input' case-insensitively into a CacheId note: this method should only be used for API response data and not user input

func (CacheId) ID

func (id CacheId) ID() string

ID returns the formatted Cache ID

func (CacheId) Segments

func (id CacheId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Cache ID

func (CacheId) String

func (id CacheId) String() string

String returns a human-readable description of this Cache ID

type CacheNetworkSettings

type CacheNetworkSettings struct {
	DnsSearchDomain  *string   `json:"dnsSearchDomain,omitempty"`
	DnsServers       *[]string `json:"dnsServers,omitempty"`
	Mtu              *int64    `json:"mtu,omitempty"`
	NtpServer        *string   `json:"ntpServer,omitempty"`
	UtilityAddresses *[]string `json:"utilityAddresses,omitempty"`
}

type CacheOperationPredicate

type CacheOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (CacheOperationPredicate) Matches

func (p CacheOperationPredicate) Matches(input Cache) bool

type CacheProperties

type CacheProperties struct {
	CacheSizeGB               *int64                   `json:"cacheSizeGB,omitempty"`
	DirectoryServicesSettings *CacheDirectorySettings  `json:"directoryServicesSettings,omitempty"`
	EncryptionSettings        *CacheEncryptionSettings `json:"encryptionSettings,omitempty"`
	Health                    *CacheHealth             `json:"health,omitempty"`
	MountAddresses            *[]string                `json:"mountAddresses,omitempty"`
	NetworkSettings           *CacheNetworkSettings    `json:"networkSettings,omitempty"`
	ProvisioningState         *ProvisioningStateType   `json:"provisioningState,omitempty"`
	SecuritySettings          *CacheSecuritySettings   `json:"securitySettings,omitempty"`
	Subnet                    *string                  `json:"subnet,omitempty"`
	UpgradeStatus             *CacheUpgradeStatus      `json:"upgradeStatus,omitempty"`
}

type CacheSecuritySettings

type CacheSecuritySettings struct {
	AccessPolicies *[]NfsAccessPolicy `json:"accessPolicies,omitempty"`
}

type CacheSku

type CacheSku struct {
	Name *string `json:"name,omitempty"`
}

type CacheUpgradeStatus

type CacheUpgradeStatus struct {
	CurrentFirmwareVersion *string             `json:"currentFirmwareVersion,omitempty"`
	FirmwareUpdateDeadline *string             `json:"firmwareUpdateDeadline,omitempty"`
	FirmwareUpdateStatus   *FirmwareStatusType `json:"firmwareUpdateStatus,omitempty"`
	LastFirmwareUpdate     *string             `json:"lastFirmwareUpdate,omitempty"`
	PendingFirmwareVersion *string             `json:"pendingFirmwareVersion,omitempty"`
}

func (*CacheUpgradeStatus) GetFirmwareUpdateDeadlineAsTime

func (o *CacheUpgradeStatus) GetFirmwareUpdateDeadlineAsTime() (*time.Time, error)

func (*CacheUpgradeStatus) GetLastFirmwareUpdateAsTime

func (o *CacheUpgradeStatus) GetLastFirmwareUpdateAsTime() (*time.Time, error)

func (*CacheUpgradeStatus) SetFirmwareUpdateDeadlineAsTime

func (o *CacheUpgradeStatus) SetFirmwareUpdateDeadlineAsTime(input time.Time)

func (*CacheUpgradeStatus) SetLastFirmwareUpdateAsTime

func (o *CacheUpgradeStatus) SetLastFirmwareUpdateAsTime(input time.Time)

type CacheUsernameDownloadSettings

type CacheUsernameDownloadSettings struct {
	AutoDownloadCertificate *bool                                     `json:"autoDownloadCertificate,omitempty"`
	CaCertificateURI        *string                                   `json:"caCertificateURI,omitempty"`
	Credentials             *CacheUsernameDownloadSettingsCredentials `json:"credentials,omitempty"`
	EncryptLdapConnection   *bool                                     `json:"encryptLdapConnection,omitempty"`
	ExtendedGroups          *bool                                     `json:"extendedGroups,omitempty"`
	GroupFileURI            *string                                   `json:"groupFileURI,omitempty"`
	LdapBaseDN              *string                                   `json:"ldapBaseDN,omitempty"`
	LdapServer              *string                                   `json:"ldapServer,omitempty"`
	RequireValidCertificate *bool                                     `json:"requireValidCertificate,omitempty"`
	UserFileURI             *string                                   `json:"userFileURI,omitempty"`
	UsernameDownloaded      *UsernameDownloadedType                   `json:"usernameDownloaded,omitempty"`
	UsernameSource          *UsernameSource                           `json:"usernameSource,omitempty"`
}

type CacheUsernameDownloadSettingsCredentials

type CacheUsernameDownloadSettingsCredentials struct {
	BindDn       *string `json:"bindDn,omitempty"`
	BindPassword *string `json:"bindPassword,omitempty"`
}

type CachesClient

type CachesClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewCachesClientWithBaseURI

func NewCachesClientWithBaseURI(endpoint string) CachesClient

func (CachesClient) CreateOrUpdate

func (c CachesClient) CreateOrUpdate(ctx context.Context, id CacheId, input Cache) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (CachesClient) CreateOrUpdateThenPoll

func (c CachesClient) CreateOrUpdateThenPoll(ctx context.Context, id CacheId, input Cache) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (CachesClient) DebugInfo

func (c CachesClient) DebugInfo(ctx context.Context, id CacheId) (result DebugInfoOperationResponse, err error)

DebugInfo ...

func (CachesClient) DebugInfoThenPoll

func (c CachesClient) DebugInfoThenPoll(ctx context.Context, id CacheId) error

DebugInfoThenPoll performs DebugInfo then polls until it's completed

func (CachesClient) Delete

func (c CachesClient) Delete(ctx context.Context, id CacheId) (result DeleteOperationResponse, err error)

Delete ...

func (CachesClient) DeleteThenPoll

func (c CachesClient) DeleteThenPoll(ctx context.Context, id CacheId) error

DeleteThenPoll performs Delete then polls until it's completed

func (CachesClient) Flush

func (c CachesClient) Flush(ctx context.Context, id CacheId) (result FlushOperationResponse, err error)

Flush ...

func (CachesClient) FlushThenPoll

func (c CachesClient) FlushThenPoll(ctx context.Context, id CacheId) error

FlushThenPoll performs Flush then polls until it's completed

func (CachesClient) Get

func (c CachesClient) Get(ctx context.Context, id CacheId) (result GetOperationResponse, err error)

Get ...

func (CachesClient) List

List ...

func (CachesClient) ListByResourceGroup

ListByResourceGroup ...

func (CachesClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (CachesClient) ListByResourceGroupCompleteMatchingPredicate

func (c CachesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate CacheOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (CachesClient) ListComplete

ListComplete retrieves all of the results into a single object

func (CachesClient) ListCompleteMatchingPredicate

func (c CachesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate CacheOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (CachesClient) Start

func (c CachesClient) Start(ctx context.Context, id CacheId) (result StartOperationResponse, err error)

Start ...

func (CachesClient) StartThenPoll

func (c CachesClient) StartThenPoll(ctx context.Context, id CacheId) error

StartThenPoll performs Start then polls until it's completed

func (CachesClient) Stop

func (c CachesClient) Stop(ctx context.Context, id CacheId) (result StopOperationResponse, err error)

Stop ...

func (CachesClient) StopThenPoll

func (c CachesClient) StopThenPoll(ctx context.Context, id CacheId) error

StopThenPoll performs Stop then polls until it's completed

func (CachesClient) Update

func (c CachesClient) Update(ctx context.Context, id CacheId, input Cache) (result UpdateOperationResponse, err error)

Update ...

func (CachesClient) UpgradeFirmware

func (c CachesClient) UpgradeFirmware(ctx context.Context, id CacheId) (result UpgradeFirmwareOperationResponse, err error)

UpgradeFirmware ...

func (CachesClient) UpgradeFirmwareThenPoll

func (c CachesClient) UpgradeFirmwareThenPoll(ctx context.Context, id CacheId) error

UpgradeFirmwareThenPoll performs UpgradeFirmware then polls until it's completed

type Condition

type Condition struct {
	Message   *string `json:"message,omitempty"`
	Timestamp *string `json:"timestamp,omitempty"`
}

func (*Condition) GetTimestampAsTime

func (o *Condition) GetTimestampAsTime() (*time.Time, error)

func (*Condition) SetTimestampAsTime

func (o *Condition) SetTimestampAsTime(input time.Time)

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DebugInfoOperationResponse

type DebugInfoOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DomainJoinedType

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

type FirmwareStatusType

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

type FlushOperationResponse

type FlushOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Cache
}

type HealthStateType

type HealthStateType string
const (
	HealthStateTypeDegraded      HealthStateType = "Degraded"
	HealthStateTypeDown          HealthStateType = "Down"
	HealthStateTypeFlushing      HealthStateType = "Flushing"
	HealthStateTypeHealthy       HealthStateType = "Healthy"
	HealthStateTypeStopped       HealthStateType = "Stopped"
	HealthStateTypeStopping      HealthStateType = "Stopping"
	HealthStateTypeTransitioning HealthStateType = "Transitioning"
	HealthStateTypeUnknown       HealthStateType = "Unknown"
	HealthStateTypeUpgrading     HealthStateType = "Upgrading"
)

type KeyVaultKeyReference

type KeyVaultKeyReference struct {
	KeyUrl      string                          `json:"keyUrl"`
	SourceVault KeyVaultKeyReferenceSourceVault `json:"sourceVault"`
}

type KeyVaultKeyReferenceSourceVault

type KeyVaultKeyReferenceSourceVault struct {
	Id *string `json:"id,omitempty"`
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []Cache
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Cache
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []Cache
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Cache
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type NfsAccessPolicy

type NfsAccessPolicy struct {
	AccessRules []NfsAccessRule `json:"accessRules"`
	Name        string          `json:"name"`
}

type NfsAccessRule

type NfsAccessRule struct {
	Access         NfsAccessRuleAccess `json:"access"`
	AnonymousGID   *string             `json:"anonymousGID,omitempty"`
	AnonymousUID   *string             `json:"anonymousUID,omitempty"`
	Filter         *string             `json:"filter,omitempty"`
	RootSquash     *bool               `json:"rootSquash,omitempty"`
	Scope          NfsAccessRuleScope  `json:"scope"`
	SubmountAccess *bool               `json:"submountAccess,omitempty"`
	Suid           *bool               `json:"suid,omitempty"`
}

type NfsAccessRuleAccess

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

type NfsAccessRuleScope

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

type ProvisioningStateType

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

type StartOperationResponse

type StartOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type StopOperationResponse

type StopOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Cache
}

type UpgradeFirmwareOperationResponse

type UpgradeFirmwareOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type UsernameDownloadedType

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

type UsernameSource

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

Jump to

Keyboard shortcuts

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