vcenters

package
v0.20230524.1231843 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/vcenters Documentation

The vcenters SDK allows for interaction with the Azure Resource Manager Service connectedvmware (API Version 2022-01-10-preview).

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/connectedvmware/2022-01-10-preview/vcenters"

Client Initialization

client := vcenters.NewVCentersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VCentersClient.Create

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

payload := vcenters.VCenter{
	// ...
}


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

Example Usage: VCentersClient.Delete

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

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

Example Usage: VCentersClient.Get

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

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

ctx := context.TODO()
id := vcenters.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: VCentersClient.ListByResourceGroup

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

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

payload := vcenters.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 ValidateVCenterID

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

ValidateVCenterID checks that 'input' can be parsed as a V Center ID

Types

type CreateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *bool
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders added in v0.20230404.1155830

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

func (DeleteOperationOptions) ToOData added in v0.20230404.1155830

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

func (DeleteOperationOptions) ToQuery added in v0.20230404.1155830

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        *VCenter
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []VCenter
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VCenter
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []VCenter
}

type ListOperationResponse

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

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        *VCenter
}

type VCenter

type VCenter 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       VCenterProperties      `json:"properties"`
	SystemData       *systemdata.SystemData `json:"systemData,omitempty"`
	Tags             *map[string]string     `json:"tags,omitempty"`
	Type             *string                `json:"type,omitempty"`
}

type VCenterId

type VCenterId struct {
	SubscriptionId    string
	ResourceGroupName string
	VCenterName       string
}

VCenterId is a struct representing the Resource ID for a V Center

func NewVCenterID

func NewVCenterID(subscriptionId string, resourceGroupName string, vCenterName string) VCenterId

NewVCenterID returns a new VCenterId struct

func ParseVCenterID

func ParseVCenterID(input string) (*VCenterId, error)

ParseVCenterID parses 'input' into a VCenterId

func ParseVCenterIDInsensitively

func ParseVCenterIDInsensitively(input string) (*VCenterId, error)

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

func (VCenterId) ID

func (id VCenterId) ID() string

ID returns the formatted V Center ID

func (VCenterId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this V Center ID

func (VCenterId) String

func (id VCenterId) String() string

String returns a human-readable description of this V Center ID

type VCenterOperationPredicate

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

func (VCenterOperationPredicate) Matches

func (p VCenterOperationPredicate) Matches(input VCenter) bool

type VCenterProperties

type VCenterProperties struct {
	ConnectionStatus   *string           `json:"connectionStatus,omitempty"`
	Credentials        *VICredential     `json:"credentials,omitempty"`
	CustomResourceName *string           `json:"customResourceName,omitempty"`
	Fqdn               string            `json:"fqdn"`
	InstanceUuid       *string           `json:"instanceUuid,omitempty"`
	Port               *int64            `json:"port,omitempty"`
	ProvisioningState  *string           `json:"provisioningState,omitempty"`
	Statuses           *[]ResourceStatus `json:"statuses,omitempty"`
	Uuid               *string           `json:"uuid,omitempty"`
	Version            *string           `json:"version,omitempty"`
}

type VCentersClient

type VCentersClient struct {
	Client *resourcemanager.Client
}

func NewVCentersClientWithBaseURI

func NewVCentersClientWithBaseURI(api environments.Api) (*VCentersClient, error)

func (VCentersClient) Create

func (c VCentersClient) Create(ctx context.Context, id VCenterId, input VCenter) (result CreateOperationResponse, err error)

Create ...

func (VCentersClient) CreateThenPoll

func (c VCentersClient) CreateThenPoll(ctx context.Context, id VCenterId, input VCenter) error

CreateThenPoll performs Create then polls until it's completed

func (VCentersClient) Delete

Delete ...

func (VCentersClient) DeleteThenPoll

func (c VCentersClient) DeleteThenPoll(ctx context.Context, id VCenterId, options DeleteOperationOptions) error

DeleteThenPoll performs Delete then polls until it's completed

func (VCentersClient) Get

func (c VCentersClient) Get(ctx context.Context, id VCenterId) (result GetOperationResponse, err error)

Get ...

func (VCentersClient) List

List ...

func (VCentersClient) ListByResourceGroup

ListByResourceGroup ...

func (VCentersClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (VCentersClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VCentersClient) ListComplete

ListComplete retrieves all the results into a single object

func (VCentersClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VCentersClient) Update

func (c VCentersClient) Update(ctx context.Context, id VCenterId, input ResourcePatch) (result UpdateOperationResponse, err error)

Update ...

type VICredential

type VICredential struct {
	Password *string `json:"password,omitempty"`
	Username *string `json:"username,omitempty"`
}

Jump to

Keyboard shortcuts

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