shares

package
v0.20240304.1112406 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/shares Documentation

The shares SDK allows for interaction with the Azure Resource Manager Service databoxedge (API Version 2023-12-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/databoxedge/2023-12-01/shares"

Client Initialization

client := shares.NewSharesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SharesClient.CreateOrUpdate

ctx := context.TODO()
id := shares.NewShareID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "shareValue")

payload := shares.Share{
	// ...
}


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

Example Usage: SharesClient.Delete

ctx := context.TODO()
id := shares.NewShareID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "shareValue")

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

Example Usage: SharesClient.Get

ctx := context.TODO()
id := shares.NewShareID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "shareValue")

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: SharesClient.ListByDataBoxEdgeDevice

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

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

Example Usage: SharesClient.Refresh

ctx := context.TODO()
id := shares.NewShareID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "shareValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAzureContainerDataFormat

func PossibleValuesForAzureContainerDataFormat() []string

func PossibleValuesForClientPermissionType

func PossibleValuesForClientPermissionType() []string

func PossibleValuesForDataPolicy

func PossibleValuesForDataPolicy() []string

func PossibleValuesForMonitoringStatus

func PossibleValuesForMonitoringStatus() []string

func PossibleValuesForMountType

func PossibleValuesForMountType() []string

func PossibleValuesForRoleTypes

func PossibleValuesForRoleTypes() []string

func PossibleValuesForShareAccessProtocol

func PossibleValuesForShareAccessProtocol() []string

func PossibleValuesForShareAccessType

func PossibleValuesForShareAccessType() []string

func PossibleValuesForShareStatus

func PossibleValuesForShareStatus() []string

func ValidateDataBoxEdgeDeviceID

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

ValidateDataBoxEdgeDeviceID checks that 'input' can be parsed as a Data Box Edge Device ID

func ValidateShareID

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

ValidateShareID checks that 'input' can be parsed as a Share ID

Types

type AzureContainerDataFormat

type AzureContainerDataFormat string
const (
	AzureContainerDataFormatAzureFile AzureContainerDataFormat = "AzureFile"
	AzureContainerDataFormatBlockBlob AzureContainerDataFormat = "BlockBlob"
	AzureContainerDataFormatPageBlob  AzureContainerDataFormat = "PageBlob"
)

func (*AzureContainerDataFormat) UnmarshalJSON

func (s *AzureContainerDataFormat) UnmarshalJSON(bytes []byte) error

type AzureContainerInfo

type AzureContainerInfo struct {
	ContainerName              string                   `json:"containerName"`
	DataFormat                 AzureContainerDataFormat `json:"dataFormat"`
	StorageAccountCredentialId string                   `json:"storageAccountCredentialId"`
}

type ClientAccessRight

type ClientAccessRight struct {
	AccessPermission ClientPermissionType `json:"accessPermission"`
	Client           string               `json:"client"`
}

type ClientPermissionType

type ClientPermissionType string
const (
	ClientPermissionTypeNoAccess  ClientPermissionType = "NoAccess"
	ClientPermissionTypeReadOnly  ClientPermissionType = "ReadOnly"
	ClientPermissionTypeReadWrite ClientPermissionType = "ReadWrite"
)

func (*ClientPermissionType) UnmarshalJSON

func (s *ClientPermissionType) UnmarshalJSON(bytes []byte) error

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Share
}

type DataBoxEdgeDeviceId

type DataBoxEdgeDeviceId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
}

DataBoxEdgeDeviceId is a struct representing the Resource ID for a Data Box Edge Device

func NewDataBoxEdgeDeviceID

func NewDataBoxEdgeDeviceID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string) DataBoxEdgeDeviceId

NewDataBoxEdgeDeviceID returns a new DataBoxEdgeDeviceId struct

func ParseDataBoxEdgeDeviceID

func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error)

ParseDataBoxEdgeDeviceID parses 'input' into a DataBoxEdgeDeviceId

func ParseDataBoxEdgeDeviceIDInsensitively

func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, error)

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

func (*DataBoxEdgeDeviceId) FromParseResult

func (id *DataBoxEdgeDeviceId) FromParseResult(input resourceids.ParseResult) error

func (DataBoxEdgeDeviceId) ID

func (id DataBoxEdgeDeviceId) ID() string

ID returns the formatted Data Box Edge Device ID

func (DataBoxEdgeDeviceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Data Box Edge Device ID

func (DataBoxEdgeDeviceId) String

func (id DataBoxEdgeDeviceId) String() string

String returns a human-readable description of this Data Box Edge Device ID

type DataPolicy

type DataPolicy string
const (
	DataPolicyCloud DataPolicy = "Cloud"
	DataPolicyLocal DataPolicy = "Local"
)

func (*DataPolicy) UnmarshalJSON

func (s *DataPolicy) UnmarshalJSON(bytes []byte) error

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Share
}

type ListByDataBoxEdgeDeviceCompleteResult

type ListByDataBoxEdgeDeviceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Share
}

type ListByDataBoxEdgeDeviceOperationResponse

type ListByDataBoxEdgeDeviceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Share
}

type MonitoringStatus

type MonitoringStatus string
const (
	MonitoringStatusDisabled MonitoringStatus = "Disabled"
	MonitoringStatusEnabled  MonitoringStatus = "Enabled"
)

func (*MonitoringStatus) UnmarshalJSON

func (s *MonitoringStatus) UnmarshalJSON(bytes []byte) error

type MountPointMap

type MountPointMap struct {
	MountPoint *string    `json:"mountPoint,omitempty"`
	MountType  *MountType `json:"mountType,omitempty"`
	RoleId     *string    `json:"roleId,omitempty"`
	RoleType   *RoleTypes `json:"roleType,omitempty"`
	ShareId    string     `json:"shareId"`
}

type MountType

type MountType string
const (
	MountTypeHostPath MountType = "HostPath"
	MountTypeVolume   MountType = "Volume"
)

func (*MountType) UnmarshalJSON

func (s *MountType) UnmarshalJSON(bytes []byte) error

type RefreshDetails

type RefreshDetails struct {
	ErrorManifestFile                *string `json:"errorManifestFile,omitempty"`
	InProgressRefreshJobId           *string `json:"inProgressRefreshJobId,omitempty"`
	LastCompletedRefreshJobTimeInUTC *string `json:"lastCompletedRefreshJobTimeInUTC,omitempty"`
	LastJob                          *string `json:"lastJob,omitempty"`
}

func (*RefreshDetails) GetLastCompletedRefreshJobTimeInUTCAsTime

func (o *RefreshDetails) GetLastCompletedRefreshJobTimeInUTCAsTime() (*time.Time, error)

func (*RefreshDetails) SetLastCompletedRefreshJobTimeInUTCAsTime

func (o *RefreshDetails) SetLastCompletedRefreshJobTimeInUTCAsTime(input time.Time)

type RefreshOperationResponse

type RefreshOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type RoleTypes

type RoleTypes string
const (
	RoleTypesASA                 RoleTypes = "ASA"
	RoleTypesCloudEdgeManagement RoleTypes = "CloudEdgeManagement"
	RoleTypesCognitive           RoleTypes = "Cognitive"
	RoleTypesFunctions           RoleTypes = "Functions"
	RoleTypesIOT                 RoleTypes = "IOT"
	RoleTypesKubernetes          RoleTypes = "Kubernetes"
	RoleTypesMEC                 RoleTypes = "MEC"
)

func (*RoleTypes) UnmarshalJSON

func (s *RoleTypes) UnmarshalJSON(bytes []byte) error

type Share

type Share struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties ShareProperties        `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ShareAccessProtocol

type ShareAccessProtocol string
const (
	ShareAccessProtocolNFS ShareAccessProtocol = "NFS"
	ShareAccessProtocolSMB ShareAccessProtocol = "SMB"
)

func (*ShareAccessProtocol) UnmarshalJSON

func (s *ShareAccessProtocol) UnmarshalJSON(bytes []byte) error

type ShareAccessType

type ShareAccessType string
const (
	ShareAccessTypeChange ShareAccessType = "Change"
	ShareAccessTypeCustom ShareAccessType = "Custom"
	ShareAccessTypeRead   ShareAccessType = "Read"
)

func (*ShareAccessType) UnmarshalJSON

func (s *ShareAccessType) UnmarshalJSON(bytes []byte) error

type ShareId

type ShareId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
	ShareName             string
}

ShareId is a struct representing the Resource ID for a Share

func NewShareID

func NewShareID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string, shareName string) ShareId

NewShareID returns a new ShareId struct

func ParseShareID

func ParseShareID(input string) (*ShareId, error)

ParseShareID parses 'input' into a ShareId

func ParseShareIDInsensitively

func ParseShareIDInsensitively(input string) (*ShareId, error)

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

func (*ShareId) FromParseResult

func (id *ShareId) FromParseResult(input resourceids.ParseResult) error

func (ShareId) ID

func (id ShareId) ID() string

ID returns the formatted Share ID

func (ShareId) Segments

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

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

func (ShareId) String

func (id ShareId) String() string

String returns a human-readable description of this Share ID

type ShareOperationPredicate

type ShareOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (ShareOperationPredicate) Matches

func (p ShareOperationPredicate) Matches(input Share) bool

type ShareProperties

type ShareProperties struct {
	AccessProtocol     ShareAccessProtocol  `json:"accessProtocol"`
	AzureContainerInfo *AzureContainerInfo  `json:"azureContainerInfo,omitempty"`
	ClientAccessRights *[]ClientAccessRight `json:"clientAccessRights,omitempty"`
	DataPolicy         *DataPolicy          `json:"dataPolicy,omitempty"`
	Description        *string              `json:"description,omitempty"`
	MonitoringStatus   MonitoringStatus     `json:"monitoringStatus"`
	RefreshDetails     *RefreshDetails      `json:"refreshDetails,omitempty"`
	ShareMappings      *[]MountPointMap     `json:"shareMappings,omitempty"`
	ShareStatus        ShareStatus          `json:"shareStatus"`
	UserAccessRights   *[]UserAccessRight   `json:"userAccessRights,omitempty"`
}

type ShareStatus

type ShareStatus string
const (
	ShareStatusNeedsAttention ShareStatus = "NeedsAttention"
	ShareStatusOK             ShareStatus = "OK"
	ShareStatusOffline        ShareStatus = "Offline"
	ShareStatusUnknown        ShareStatus = "Unknown"
	ShareStatusUpdating       ShareStatus = "Updating"
)

func (*ShareStatus) UnmarshalJSON

func (s *ShareStatus) UnmarshalJSON(bytes []byte) error

type SharesClient

type SharesClient struct {
	Client *resourcemanager.Client
}

func NewSharesClientWithBaseURI

func NewSharesClientWithBaseURI(sdkApi sdkEnv.Api) (*SharesClient, error)

func (SharesClient) CreateOrUpdate

func (c SharesClient) CreateOrUpdate(ctx context.Context, id ShareId, input Share) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (SharesClient) CreateOrUpdateThenPoll

func (c SharesClient) CreateOrUpdateThenPoll(ctx context.Context, id ShareId, input Share) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (SharesClient) Delete

func (c SharesClient) Delete(ctx context.Context, id ShareId) (result DeleteOperationResponse, err error)

Delete ...

func (SharesClient) DeleteThenPoll

func (c SharesClient) DeleteThenPoll(ctx context.Context, id ShareId) error

DeleteThenPoll performs Delete then polls until it's completed

func (SharesClient) Get

func (c SharesClient) Get(ctx context.Context, id ShareId) (result GetOperationResponse, err error)

Get ...

func (SharesClient) ListByDataBoxEdgeDevice

func (c SharesClient) ListByDataBoxEdgeDevice(ctx context.Context, id DataBoxEdgeDeviceId) (result ListByDataBoxEdgeDeviceOperationResponse, err error)

ListByDataBoxEdgeDevice ...

func (SharesClient) ListByDataBoxEdgeDeviceComplete

func (c SharesClient) ListByDataBoxEdgeDeviceComplete(ctx context.Context, id DataBoxEdgeDeviceId) (ListByDataBoxEdgeDeviceCompleteResult, error)

ListByDataBoxEdgeDeviceComplete retrieves all the results into a single object

func (SharesClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate

func (c SharesClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate(ctx context.Context, id DataBoxEdgeDeviceId, predicate ShareOperationPredicate) (result ListByDataBoxEdgeDeviceCompleteResult, err error)

ListByDataBoxEdgeDeviceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SharesClient) Refresh

func (c SharesClient) Refresh(ctx context.Context, id ShareId) (result RefreshOperationResponse, err error)

Refresh ...

func (SharesClient) RefreshThenPoll

func (c SharesClient) RefreshThenPoll(ctx context.Context, id ShareId) error

RefreshThenPoll performs Refresh then polls until it's completed

type UserAccessRight

type UserAccessRight struct {
	AccessType ShareAccessType `json:"accessType"`
	UserId     string          `json:"userId"`
}

Jump to

Keyboard shortcuts

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