datastores

package
v0.20240624.1135538 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/datastores Documentation

The datastores SDK allows for interaction with the Azure Resource Manager Service connectedvmware (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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2023-12-01/datastores"

Client Initialization

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

Example Usage: DataStoresClient.Create

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

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


if err := client.CreateThenPoll(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", "dataStoreValue")

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

Example Usage: DataStoresClient.Get

ctx := context.TODO()
id := datastores.NewDataStoreID("12345678-1234-9876-4563-123456789012", "example-resource-group", "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 := commonids.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: DataStoresClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.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: DataStoresClient.Update

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

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


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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

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 CreateOperationResponse

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

type DataStoreId

type DataStoreId struct {
	SubscriptionId    string
	ResourceGroupName string
	DataStoreName     string
}

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

func NewDataStoreID

func NewDataStoreID(subscriptionId string, resourceGroupName 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) Create

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

Create ...

func (DataStoresClient) CreateThenPoll

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

CreateThenPoll performs Create then polls until it's completed

func (DataStoresClient) Delete

Delete ...

func (DataStoresClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (DataStoresClient) Get

Get ...

func (DataStoresClient) List

List ...

func (DataStoresClient) ListByResourceGroup

ListByResourceGroup ...

func (DataStoresClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (DataStoresClient) ListByResourceGroupCompleteMatchingPredicate

func (c DataStoresClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DatastoreOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DataStoresClient) ListComplete

ListComplete retrieves all the results into a single object

func (DataStoresClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DataStoresClient) Update

Update ...

type Datastore

type Datastore struct {
	ExtendedLocation *ExtendedLocation      `json:"extendedLocation,omitempty"`
	Id               *string                `json:"id,omitempty"`
	Kind             *string                `json:"kind,omitempty"`
	Location         string                 `json:"location"`
	Name             *string                `json:"name,omitempty"`
	Properties       DatastoreProperties    `json:"properties"`
	SystemData       *systemdata.SystemData `json:"systemData,omitempty"`
	Tags             *map[string]string     `json:"tags,omitempty"`
	Type             *string                `json:"type,omitempty"`
}

type DatastoreOperationPredicate

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

func (DatastoreOperationPredicate) Matches

func (p DatastoreOperationPredicate) Matches(input Datastore) bool

type DatastoreProperties

type DatastoreProperties struct {
	CapacityGB         *int64             `json:"capacityGB,omitempty"`
	CustomResourceName *string            `json:"customResourceName,omitempty"`
	FreeSpaceGB        *int64             `json:"freeSpaceGB,omitempty"`
	InventoryItemId    *string            `json:"inventoryItemId,omitempty"`
	MoName             *string            `json:"moName,omitempty"`
	MoRefId            *string            `json:"moRefId,omitempty"`
	ProvisioningState  *ProvisioningState `json:"provisioningState,omitempty"`
	Statuses           *[]ResourceStatus  `json:"statuses,omitempty"`
	Uuid               *string            `json:"uuid,omitempty"`
	VCenterId          *string            `json:"vCenterId,omitempty"`
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *bool
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type ExtendedLocation

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

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

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

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse 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 ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreated      ProvisioningState = "Created"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type ResourcePatch

type ResourcePatch struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type ResourceStatus

type ResourceStatus struct {
	LastUpdatedAt *string `json:"lastUpdatedAt,omitempty"`
	Message       *string `json:"message,omitempty"`
	Reason        *string `json:"reason,omitempty"`
	Severity      *string `json:"severity,omitempty"`
	Status        *string `json:"status,omitempty"`
	Type          *string `json:"type,omitempty"`
}

func (*ResourceStatus) GetLastUpdatedAtAsTime

func (o *ResourceStatus) GetLastUpdatedAtAsTime() (*time.Time, error)

func (*ResourceStatus) SetLastUpdatedAtAsTime

func (o *ResourceStatus) SetLastUpdatedAtAsTime(input time.Time)

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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