hypervsites

package
v0.20240206.1080438 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/hypervsites Documentation

The hypervsites SDK allows for interaction with the Azure Resource Manager Service migrate (API Version 2020-07-07).

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-07-07/hypervsites"

Client Initialization

client := hypervsites.NewHyperVSitesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: HyperVSitesClient.DeleteSite

ctx := context.TODO()
id := hypervsites.NewHyperVSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hyperVSiteValue")

read, err := client.DeleteSite(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: HyperVSitesClient.GetSite

ctx := context.TODO()
id := hypervsites.NewHyperVSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hyperVSiteValue")

read, err := client.GetSite(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: HyperVSitesClient.GetSiteHealthSummary

ctx := context.TODO()
id := hypervsites.NewHyperVSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hyperVSiteValue")

// alternatively `client.GetSiteHealthSummary(ctx, id)` can be used to do batched pagination
items, err := client.GetSiteHealthSummaryComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: HyperVSitesClient.GetSiteUsage

ctx := context.TODO()
id := hypervsites.NewHyperVSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hyperVSiteValue")

read, err := client.GetSiteUsage(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: HyperVSitesClient.PatchSite

ctx := context.TODO()
id := hypervsites.NewHyperVSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hyperVSiteValue")

payload := hypervsites.HyperVSite{
	// ...
}


read, err := client.PatchSite(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: HyperVSitesClient.PutSite

ctx := context.TODO()
id := hypervsites.NewHyperVSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hyperVSiteValue")

payload := hypervsites.HyperVSite{
	// ...
}


read, err := client.PutSite(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: HyperVSitesClient.RefreshSite

ctx := context.TODO()
id := hypervsites.NewHyperVSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "hyperVSiteValue")

read, err := client.RefreshSite(ctx, id)
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 ValidateHyperVSiteID

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

ValidateHyperVSiteID checks that 'input' can be parsed as a Hyper V Site ID

Types

type DeleteSiteOperationResponse

type DeleteSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetSiteHealthSummaryCompleteResult

type GetSiteHealthSummaryCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SiteHealthSummary
}

type GetSiteHealthSummaryOperationResponse

type GetSiteHealthSummaryOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SiteHealthSummary
}

type GetSiteOperationResponse

type GetSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *HyperVSite
}

type GetSiteUsageOperationResponse

type GetSiteUsageOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *HyperVSiteUsage
}

type HyperVSite

type HyperVSite struct {
	ETag       *string                `json:"eTag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Location   *string                `json:"location,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *SiteProperties        `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type HyperVSiteId

type HyperVSiteId struct {
	SubscriptionId    string
	ResourceGroupName string
	HyperVSiteName    string
}

HyperVSiteId is a struct representing the Resource ID for a Hyper V Site

func NewHyperVSiteID

func NewHyperVSiteID(subscriptionId string, resourceGroupName string, hyperVSiteName string) HyperVSiteId

NewHyperVSiteID returns a new HyperVSiteId struct

func ParseHyperVSiteID

func ParseHyperVSiteID(input string) (*HyperVSiteId, error)

ParseHyperVSiteID parses 'input' into a HyperVSiteId

func ParseHyperVSiteIDInsensitively

func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error)

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

func (*HyperVSiteId) FromParseResult

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

func (HyperVSiteId) ID

func (id HyperVSiteId) ID() string

ID returns the formatted Hyper V Site ID

func (HyperVSiteId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Hyper V Site ID

func (HyperVSiteId) String

func (id HyperVSiteId) String() string

String returns a human-readable description of this Hyper V Site ID

type HyperVSiteUsage

type HyperVSiteUsage struct {
	ClusterCount      *int64 `json:"clusterCount,omitempty"`
	HostCount         *int64 `json:"hostCount,omitempty"`
	MachineCount      *int64 `json:"machineCount,omitempty"`
	RunAsAccountCount *int64 `json:"runAsAccountCount,omitempty"`
}

type HyperVSitesClient

type HyperVSitesClient struct {
	Client *resourcemanager.Client
}

func NewHyperVSitesClientWithBaseURI

func NewHyperVSitesClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVSitesClient, error)

func (HyperVSitesClient) DeleteSite

func (c HyperVSitesClient) DeleteSite(ctx context.Context, id HyperVSiteId) (result DeleteSiteOperationResponse, err error)

DeleteSite ...

func (HyperVSitesClient) GetSite

GetSite ...

func (HyperVSitesClient) GetSiteHealthSummary

func (c HyperVSitesClient) GetSiteHealthSummary(ctx context.Context, id HyperVSiteId) (result GetSiteHealthSummaryOperationResponse, err error)

GetSiteHealthSummary ...

func (HyperVSitesClient) GetSiteHealthSummaryComplete

func (c HyperVSitesClient) GetSiteHealthSummaryComplete(ctx context.Context, id HyperVSiteId) (GetSiteHealthSummaryCompleteResult, error)

GetSiteHealthSummaryComplete retrieves all the results into a single object

func (HyperVSitesClient) GetSiteHealthSummaryCompleteMatchingPredicate

func (c HyperVSitesClient) GetSiteHealthSummaryCompleteMatchingPredicate(ctx context.Context, id HyperVSiteId, predicate SiteHealthSummaryOperationPredicate) (result GetSiteHealthSummaryCompleteResult, err error)

GetSiteHealthSummaryCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (HyperVSitesClient) GetSiteUsage

func (c HyperVSitesClient) GetSiteUsage(ctx context.Context, id HyperVSiteId) (result GetSiteUsageOperationResponse, err error)

GetSiteUsage ...

func (HyperVSitesClient) PatchSite

func (c HyperVSitesClient) PatchSite(ctx context.Context, id HyperVSiteId, input HyperVSite) (result PatchSiteOperationResponse, err error)

PatchSite ...

func (HyperVSitesClient) PutSite

func (c HyperVSitesClient) PutSite(ctx context.Context, id HyperVSiteId, input HyperVSite) (result PutSiteOperationResponse, err error)

PutSite ...

func (HyperVSitesClient) RefreshSite

func (c HyperVSitesClient) RefreshSite(ctx context.Context, id HyperVSiteId) (result RefreshSiteOperationResponse, err error)

RefreshSite ...

type PatchSiteOperationResponse

type PatchSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *HyperVSite
}

type PutSiteOperationResponse

type PutSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *HyperVSite
}

type RefreshSiteOperationResponse

type RefreshSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type SiteAgentProperties

type SiteAgentProperties struct {
	Id               *string `json:"id,omitempty"`
	KeyVaultId       *string `json:"keyVaultId,omitempty"`
	KeyVaultUri      *string `json:"keyVaultUri,omitempty"`
	LastHeartBeatUtc *string `json:"lastHeartBeatUtc,omitempty"`
	Version          *string `json:"version,omitempty"`
}

func (*SiteAgentProperties) GetLastHeartBeatUtcAsTime

func (o *SiteAgentProperties) GetLastHeartBeatUtcAsTime() (*time.Time, error)

func (*SiteAgentProperties) SetLastHeartBeatUtcAsTime

func (o *SiteAgentProperties) SetLastHeartBeatUtcAsTime(input time.Time)

type SiteHealthSummary

type SiteHealthSummary struct {
	AffectedObjectsCount *int64    `json:"affectedObjectsCount,omitempty"`
	AffectedResourceType *string   `json:"affectedResourceType,omitempty"`
	AffectedResources    *[]string `json:"affectedResources,omitempty"`
	ApplianceName        *string   `json:"applianceName,omitempty"`
	ErrorCode            *string   `json:"errorCode,omitempty"`
	ErrorId              *int64    `json:"errorId,omitempty"`
	ErrorMessage         *string   `json:"errorMessage,omitempty"`
	HitCount             *int64    `json:"hitCount,omitempty"`
	RemediationGuidance  *string   `json:"remediationGuidance,omitempty"`
	Severity             *string   `json:"severity,omitempty"`
	SummaryMessage       *string   `json:"summaryMessage,omitempty"`
}

type SiteHealthSummaryOperationPredicate

type SiteHealthSummaryOperationPredicate struct {
	AffectedObjectsCount *int64
	AffectedResourceType *string
	ApplianceName        *string
	ErrorCode            *string
	ErrorId              *int64
	ErrorMessage         *string
	HitCount             *int64
	RemediationGuidance  *string
	Severity             *string
	SummaryMessage       *string
}

func (SiteHealthSummaryOperationPredicate) Matches

type SiteProperties

type SiteProperties struct {
	AgentDetails                    *SiteAgentProperties `json:"agentDetails,omitempty"`
	ApplianceName                   *string              `json:"applianceName,omitempty"`
	DiscoverySolutionId             *string              `json:"discoverySolutionId,omitempty"`
	ServiceEndpoint                 *string              `json:"serviceEndpoint,omitempty"`
	ServicePrincipalIdentityDetails *SiteSpnProperties   `json:"servicePrincipalIdentityDetails,omitempty"`
}

type SiteSpnProperties

type SiteSpnProperties struct {
	AadAuthority  *string `json:"aadAuthority,omitempty"`
	ApplicationId *string `json:"applicationId,omitempty"`
	Audience      *string `json:"audience,omitempty"`
	ObjectId      *string `json:"objectId,omitempty"`
	RawCertData   *string `json:"rawCertData,omitempty"`
	TenantId      *string `json:"tenantId,omitempty"`
}

Jump to

Keyboard shortcuts

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