README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/vcenter
Documentation
The vcenter
SDK allows for interaction with Azure Resource Manager migrate
(API Version 2020-01-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/migrate/2020-01-01/vcenter"
Client Initialization
client := vcenter.NewVCenterClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: VCenterClient.DeleteVCenter
ctx := context.TODO()
id := vcenter.NewVCenterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vmwareSiteName", "vCenterName")
read, err := client.DeleteVCenter(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: VCenterClient.GetAllVCentersInSite
ctx := context.TODO()
id := vcenter.NewVMwareSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vmwareSiteName")
// alternatively `client.GetAllVCentersInSite(ctx, id, vcenter.DefaultGetAllVCentersInSiteOperationOptions())` can be used to do batched pagination
items, err := client.GetAllVCentersInSiteComplete(ctx, id, vcenter.DefaultGetAllVCentersInSiteOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: VCenterClient.GetVCenter
ctx := context.TODO()
id := vcenter.NewVCenterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vmwareSiteName", "vCenterName")
read, err := client.GetVCenter(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: VCenterClient.PutVCenter
ctx := context.TODO()
id := vcenter.NewVCenterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vmwareSiteName", "vCenterName")
payload := vcenter.VCenter{
// ...
}
read, err := client.PutVCenter(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)
- func ValidateVMwareSiteID(input interface{}, key string) (warnings []string, errors []error)
- type DeleteVCenterOperationResponse
- type GetAllVCentersInSiteCompleteResult
- type GetAllVCentersInSiteCustomPager
- type GetAllVCentersInSiteOperationOptions
- type GetAllVCentersInSiteOperationResponse
- type GetVCenterOperationResponse
- type HealthErrorDetails
- type PutVCenterOperationResponse
- type VCenter
- type VCenterClient
- func (c VCenterClient) DeleteVCenter(ctx context.Context, id VCenterId) (result DeleteVCenterOperationResponse, err error)
- func (c VCenterClient) GetAllVCentersInSite(ctx context.Context, id VMwareSiteId, ...) (result GetAllVCentersInSiteOperationResponse, err error)
- func (c VCenterClient) GetAllVCentersInSiteComplete(ctx context.Context, id VMwareSiteId, ...) (GetAllVCentersInSiteCompleteResult, error)
- func (c VCenterClient) GetAllVCentersInSiteCompleteMatchingPredicate(ctx context.Context, id VMwareSiteId, ...) (result GetAllVCentersInSiteCompleteResult, err error)
- func (c VCenterClient) GetVCenter(ctx context.Context, id VCenterId) (result GetVCenterOperationResponse, err error)
- func (c VCenterClient) PutVCenter(ctx context.Context, id VCenterId, input VCenter) (result PutVCenterOperationResponse, err error)
- type VCenterId
- type VCenterOperationPredicate
- type VCenterProperties
- type VMwareSiteId
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
func ValidateVMwareSiteID ¶
ValidateVMwareSiteID checks that 'input' can be parsed as a V Mware Site ID
Types ¶
type GetAllVCentersInSiteCustomPager ¶
func (*GetAllVCentersInSiteCustomPager) NextPageLink ¶
func (p *GetAllVCentersInSiteCustomPager) NextPageLink() *odata.Link
type GetAllVCentersInSiteOperationOptions ¶
type GetAllVCentersInSiteOperationOptions struct {
Filter *string
}
func DefaultGetAllVCentersInSiteOperationOptions ¶
func DefaultGetAllVCentersInSiteOperationOptions() GetAllVCentersInSiteOperationOptions
func (GetAllVCentersInSiteOperationOptions) ToHeaders ¶
func (o GetAllVCentersInSiteOperationOptions) ToHeaders() *client.Headers
func (GetAllVCentersInSiteOperationOptions) ToOData ¶
func (o GetAllVCentersInSiteOperationOptions) ToOData() *odata.Query
func (GetAllVCentersInSiteOperationOptions) ToQuery ¶
func (o GetAllVCentersInSiteOperationOptions) ToQuery() *client.QueryParams
type HealthErrorDetails ¶
type HealthErrorDetails struct { Code *string `json:"code,omitempty"` Id *int64 `json:"id,omitempty"` Message *string `json:"message,omitempty"` MessageParameters *map[string]string `json:"messageParameters,omitempty"` PossibleCauses *string `json:"possibleCauses,omitempty"` RecommendedAction *string `json:"recommendedAction,omitempty"` Severity *string `json:"severity,omitempty"` Source *string `json:"source,omitempty"` SummaryMessage *string `json:"summaryMessage,omitempty"` }
type VCenter ¶
type VCenter struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Properties *VCenterProperties `json:"properties,omitempty"` Type *string `json:"type,omitempty"` }
type VCenterClient ¶
type VCenterClient struct {
Client *resourcemanager.Client
}
func NewVCenterClientWithBaseURI ¶
func NewVCenterClientWithBaseURI(sdkApi sdkEnv.Api) (*VCenterClient, error)
func (VCenterClient) DeleteVCenter ¶
func (c VCenterClient) DeleteVCenter(ctx context.Context, id VCenterId) (result DeleteVCenterOperationResponse, err error)
DeleteVCenter ...
func (VCenterClient) GetAllVCentersInSite ¶
func (c VCenterClient) GetAllVCentersInSite(ctx context.Context, id VMwareSiteId, options GetAllVCentersInSiteOperationOptions) (result GetAllVCentersInSiteOperationResponse, err error)
GetAllVCentersInSite ...
func (VCenterClient) GetAllVCentersInSiteComplete ¶
func (c VCenterClient) GetAllVCentersInSiteComplete(ctx context.Context, id VMwareSiteId, options GetAllVCentersInSiteOperationOptions) (GetAllVCentersInSiteCompleteResult, error)
GetAllVCentersInSiteComplete retrieves all the results into a single object
func (VCenterClient) GetAllVCentersInSiteCompleteMatchingPredicate ¶
func (c VCenterClient) GetAllVCentersInSiteCompleteMatchingPredicate(ctx context.Context, id VMwareSiteId, options GetAllVCentersInSiteOperationOptions, predicate VCenterOperationPredicate) (result GetAllVCentersInSiteCompleteResult, err error)
GetAllVCentersInSiteCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (VCenterClient) GetVCenter ¶
func (c VCenterClient) GetVCenter(ctx context.Context, id VCenterId) (result GetVCenterOperationResponse, err error)
GetVCenter ...
func (VCenterClient) PutVCenter ¶
func (c VCenterClient) PutVCenter(ctx context.Context, id VCenterId, input VCenter) (result PutVCenterOperationResponse, err error)
PutVCenter ...
type VCenterId ¶
type VCenterId struct { SubscriptionId string ResourceGroupName string VmwareSiteName string VCenterName string }
VCenterId is a struct representing the Resource ID for a V Center
func NewVCenterID ¶
func NewVCenterID(subscriptionId string, resourceGroupName string, vmwareSiteName string, vCenterName string) VCenterId
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) FromParseResult ¶
func (id *VCenterId) FromParseResult(input resourceids.ParseResult) error
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 ¶
func (VCenterOperationPredicate) Matches ¶
func (p VCenterOperationPredicate) Matches(input VCenter) bool
type VCenterProperties ¶
type VCenterProperties struct { CreatedTimestamp *string `json:"createdTimestamp,omitempty"` Errors *[]HealthErrorDetails `json:"errors,omitempty"` Fqdn *string `json:"fqdn,omitempty"` InstanceUuid *string `json:"instanceUuid,omitempty"` PerfStatisticsLevel *string `json:"perfStatisticsLevel,omitempty"` Port *string `json:"port,omitempty"` RunAsAccountId *string `json:"runAsAccountId,omitempty"` UpdatedTimestamp *string `json:"updatedTimestamp,omitempty"` Version *string `json:"version,omitempty"` }
type VMwareSiteId ¶
VMwareSiteId is a struct representing the Resource ID for a V Mware Site
func NewVMwareSiteID ¶
func NewVMwareSiteID(subscriptionId string, resourceGroupName string, vmwareSiteName string) VMwareSiteId
NewVMwareSiteID returns a new VMwareSiteId struct
func ParseVMwareSiteID ¶
func ParseVMwareSiteID(input string) (*VMwareSiteId, error)
ParseVMwareSiteID parses 'input' into a VMwareSiteId
func ParseVMwareSiteIDInsensitively ¶
func ParseVMwareSiteIDInsensitively(input string) (*VMwareSiteId, error)
ParseVMwareSiteIDInsensitively parses 'input' case-insensitively into a VMwareSiteId note: this method should only be used for API response data and not user input
func (*VMwareSiteId) FromParseResult ¶
func (id *VMwareSiteId) FromParseResult(input resourceids.ParseResult) error
func (VMwareSiteId) ID ¶
func (id VMwareSiteId) ID() string
ID returns the formatted V Mware Site ID
func (VMwareSiteId) Segments ¶
func (id VMwareSiteId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this V Mware Site ID
func (VMwareSiteId) String ¶
func (id VMwareSiteId) String() string
String returns a human-readable description of this V Mware Site ID