datastores

package
v0.20240402.1085733 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2022-05-01/datastores Documentation

The datastores SDK allows for interaction with the Azure Resource Manager Service vmware (API Version 2022-05-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/vmware/2022-05-01/datastores"

Client Initialization

client := datastores.NewDataStoresClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DataStoresClient.CreateOrUpdate

ctx := context.TODO()
id := datastores.NewDataStoreID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "clusterValue", "dataStoreValue")

payload := datastores.Datastore{
	// ...
}


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

Example Usage: DataStoresClient.Delete

ctx := context.TODO()
id := datastores.NewDataStoreID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "clusterValue", "dataStoreValue")

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

Example Usage: DataStoresClient.Get

ctx := context.TODO()
id := datastores.NewDataStoreID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "clusterValue", "dataStoreValue")

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: DataStoresClient.List

ctx := context.TODO()
id := datastores.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "clusterValue")

// 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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDatastoreProvisioningState

func PossibleValuesForDatastoreProvisioningState() []string

func PossibleValuesForDatastoreStatus

func PossibleValuesForDatastoreStatus() []string

func PossibleValuesForMountOptionEnum

func PossibleValuesForMountOptionEnum() []string

func ValidateClusterID

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

ValidateClusterID checks that 'input' can be parsed as a Cluster ID

func ValidateDataStoreID

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

ValidateDataStoreID checks that 'input' can be parsed as a Data Store ID

Types

type ClusterId

type ClusterId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
	ClusterName       string
}

ClusterId is a struct representing the Resource ID for a Cluster

func NewClusterID

func NewClusterID(subscriptionId string, resourceGroupName string, privateCloudName string, clusterName string) ClusterId

NewClusterID returns a new ClusterId struct

func ParseClusterID

func ParseClusterID(input string) (*ClusterId, error)

ParseClusterID parses 'input' into a ClusterId

func ParseClusterIDInsensitively

func ParseClusterIDInsensitively(input string) (*ClusterId, error)

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

func (*ClusterId) FromParseResult

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

func (ClusterId) ID

func (id ClusterId) ID() string

ID returns the formatted Cluster ID

func (ClusterId) Segments

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

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

func (ClusterId) String

func (id ClusterId) String() string

String returns a human-readable description of this Cluster ID

type CreateOrUpdateOperationResponse

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

type DataStoreId

type DataStoreId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
	ClusterName       string
	DataStoreName     string
}

DataStoreId is a struct representing the Resource ID for a Data Store

func NewDataStoreID

func NewDataStoreID(subscriptionId string, resourceGroupName string, privateCloudName string, clusterName string, dataStoreName string) DataStoreId

NewDataStoreID returns a new DataStoreId struct

func ParseDataStoreID

func ParseDataStoreID(input string) (*DataStoreId, error)

ParseDataStoreID parses 'input' into a DataStoreId

func ParseDataStoreIDInsensitively

func ParseDataStoreIDInsensitively(input string) (*DataStoreId, error)

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

func (*DataStoreId) FromParseResult

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

func (DataStoreId) ID

func (id DataStoreId) ID() string

ID returns the formatted Data Store ID

func (DataStoreId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Data Store ID

func (DataStoreId) String

func (id DataStoreId) String() string

String returns a human-readable description of this Data Store ID

type DataStoresClient

type DataStoresClient struct {
	Client *resourcemanager.Client
}

func NewDataStoresClientWithBaseURI

func NewDataStoresClientWithBaseURI(sdkApi sdkEnv.Api) (*DataStoresClient, error)

func (DataStoresClient) CreateOrUpdate

func (c DataStoresClient) CreateOrUpdate(ctx context.Context, id DataStoreId, input Datastore) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (DataStoresClient) CreateOrUpdateThenPoll

func (c DataStoresClient) CreateOrUpdateThenPoll(ctx context.Context, id DataStoreId, input Datastore) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DataStoresClient) Delete

func (c DataStoresClient) Delete(ctx context.Context, id DataStoreId) (result DeleteOperationResponse, err error)

Delete ...

func (DataStoresClient) DeleteThenPoll

func (c DataStoresClient) DeleteThenPoll(ctx context.Context, id DataStoreId) error

DeleteThenPoll performs Delete then polls until it's completed

func (DataStoresClient) Get

Get ...

func (DataStoresClient) List

func (c DataStoresClient) List(ctx context.Context, id ClusterId) (result ListOperationResponse, err error)

List ...

func (DataStoresClient) ListComplete

ListComplete retrieves all the results into a single object

func (DataStoresClient) ListCompleteMatchingPredicate

func (c DataStoresClient) ListCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate DatastoreOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type Datastore

type Datastore struct {
	Id         *string              `json:"id,omitempty"`
	Name       *string              `json:"name,omitempty"`
	Properties *DatastoreProperties `json:"properties,omitempty"`
	Type       *string              `json:"type,omitempty"`
}

type DatastoreOperationPredicate

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

func (DatastoreOperationPredicate) Matches

func (p DatastoreOperationPredicate) Matches(input Datastore) bool

type DatastoreProperties

type DatastoreProperties struct {
	DiskPoolVolume    *DiskPoolVolume             `json:"diskPoolVolume,omitempty"`
	NetAppVolume      *NetAppVolume               `json:"netAppVolume,omitempty"`
	ProvisioningState *DatastoreProvisioningState `json:"provisioningState,omitempty"`
	Status            *DatastoreStatus            `json:"status,omitempty"`
}

type DatastoreProvisioningState

type DatastoreProvisioningState string
const (
	DatastoreProvisioningStateCanceled  DatastoreProvisioningState = "Canceled"
	DatastoreProvisioningStateCancelled DatastoreProvisioningState = "Cancelled"
	DatastoreProvisioningStateCreating  DatastoreProvisioningState = "Creating"
	DatastoreProvisioningStateDeleting  DatastoreProvisioningState = "Deleting"
	DatastoreProvisioningStateFailed    DatastoreProvisioningState = "Failed"
	DatastoreProvisioningStatePending   DatastoreProvisioningState = "Pending"
	DatastoreProvisioningStateSucceeded DatastoreProvisioningState = "Succeeded"
	DatastoreProvisioningStateUpdating  DatastoreProvisioningState = "Updating"
)

func (*DatastoreProvisioningState) UnmarshalJSON

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

type DatastoreStatus

type DatastoreStatus string
const (
	DatastoreStatusAccessible        DatastoreStatus = "Accessible"
	DatastoreStatusAttached          DatastoreStatus = "Attached"
	DatastoreStatusDeadOrError       DatastoreStatus = "DeadOrError"
	DatastoreStatusDetached          DatastoreStatus = "Detached"
	DatastoreStatusInaccessible      DatastoreStatus = "Inaccessible"
	DatastoreStatusLostCommunication DatastoreStatus = "LostCommunication"
	DatastoreStatusUnknown           DatastoreStatus = "Unknown"
)

func (*DatastoreStatus) UnmarshalJSON

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

type DeleteOperationResponse

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

type DiskPoolVolume

type DiskPoolVolume struct {
	LunName     string           `json:"lunName"`
	MountOption *MountOptionEnum `json:"mountOption,omitempty"`
	Path        *string          `json:"path,omitempty"`
	TargetId    string           `json:"targetId"`
}

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Datastore
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Datastore
}

type MountOptionEnum

type MountOptionEnum string
const (
	MountOptionEnumATTACH MountOptionEnum = "ATTACH"
	MountOptionEnumMOUNT  MountOptionEnum = "MOUNT"
)

func (*MountOptionEnum) UnmarshalJSON

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

type NetAppVolume

type NetAppVolume struct {
	Id string `json:"id"`
}

Jump to

Keyboard shortcuts

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