datastores

package
v0.20230222.1112900 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2021-12-01/datastores Documentation

The datastores SDK allows for interaction with the Azure Resource Manager Service vmware (API Version 2021-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/vmware/2021-12-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) 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       polling.LongRunningPoller
	HttpResponse *http.Response
}

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) 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 autorest.Client
	// contains filtered or unexported fields
}

func NewDataStoresClientWithBaseURI

func NewDataStoresClientWithBaseURI(endpoint string) DataStoresClient

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

List ...

func (DataStoresClient) ListComplete

ListComplete retrieves all of the results into a single object

func (DataStoresClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all of the results and then applied 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 (
	DatastoreProvisioningStateCancelled DatastoreProvisioningState = "Cancelled"
	DatastoreProvisioningStateCreating  DatastoreProvisioningState = "Creating"
	DatastoreProvisioningStateDeleting  DatastoreProvisioningState = "Deleting"
	DatastoreProvisioningStateFailed    DatastoreProvisioningState = "Failed"
	DatastoreProvisioningStatePending   DatastoreProvisioningState = "Pending"
	DatastoreProvisioningStateSucceeded DatastoreProvisioningState = "Succeeded"
	DatastoreProvisioningStateUpdating  DatastoreProvisioningState = "Updating"
)

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"
)

type DeleteOperationResponse

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

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
	Model        *Datastore
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []Datastore
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Datastore
	// 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 MountOptionEnum

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

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