vcenters

package
v0.20240110.1151535 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

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

The vcenters SDK allows for interaction with the Azure Resource Manager Service connectedvmware (API Version 2023-10-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/connectedvmware/2023-10-01/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 PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

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

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

type ListByResourceGroupCompleteResult

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

type ListByResourceGroupOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

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        *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) FromParseResult added in v0.20231127.1171502

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

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  *ProvisioningState `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(sdkApi sdkEnv.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