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 ¶
- func ValidateVCenterID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOperationResponse
- type DeleteOperationOptions
- type DeleteOperationResponse
- type ExtendedLocation
- type GetOperationResponse
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListCompleteResult
- type ListOperationResponse
- type ResourcePatch
- type ResourceStatus
- type UpdateOperationResponse
- type VCenter
- type VCenterId
- type VCenterOperationPredicate
- type VCenterProperties
- type VCentersClient
- func (c VCentersClient) Create(ctx context.Context, id VCenterId, input VCenter) (result CreateOperationResponse, err error)
- func (c VCentersClient) CreateThenPoll(ctx context.Context, id VCenterId, input VCenter) error
- func (c VCentersClient) Delete(ctx context.Context, id VCenterId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
- func (c VCentersClient) DeleteThenPoll(ctx context.Context, id VCenterId, options DeleteOperationOptions) error
- func (c VCentersClient) Get(ctx context.Context, id VCenterId) (result GetOperationResponse, err error)
- func (c VCentersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
- func (c VCentersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
- func (c VCentersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c VCentersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c VCentersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
- func (c VCentersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (result ListCompleteResult, err error)
- func (c VCentersClient) Update(ctx context.Context, id VCenterId, input ResourcePatch) (result UpdateOperationResponse, err error)
- type VICredential
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateVCenterID ¶
ValidateVCenterID checks that 'input' can be parsed as a V Center ID
Types ¶
type CreateOperationResponse ¶
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
func (o DeleteOperationOptions) ToQuery() *client.QueryParams
type DeleteOperationResponse ¶
type ExtendedLocation ¶
type GetOperationResponse ¶
type ListByResourceGroupCompleteResult ¶
type ListByResourceGroupCompleteResult struct {
Items []VCenter
}
type ListCompleteResult ¶
type ListCompleteResult struct {
Items []VCenter
}
type ListOperationResponse ¶
type ResourcePatch ¶
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 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 ¶
VCenterId is a struct representing the Resource ID for a V Center
func NewVCenterID ¶
NewVCenterID returns a new VCenterId struct
func ParseVCenterID ¶
ParseVCenterID parses 'input' into a VCenterId
func ParseVCenterIDInsensitively ¶
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) Segments ¶
func (id VCenterId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise 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(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 ¶
CreateThenPoll performs Create then polls until it's completed
func (VCentersClient) Delete ¶
func (c VCentersClient) Delete(ctx context.Context, id VCenterId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
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 ¶
func (c VCentersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error)
List ...
func (VCentersClient) ListByResourceGroup ¶
func (c VCentersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (VCentersClient) ListByResourceGroupComplete ¶
func (c VCentersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
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 ¶
func (c VCentersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error)
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 ...