vmhost

package
v0.20240111.1094251 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/vmhost Documentation

The vmhost SDK allows for interaction with the Azure Resource Manager Service logz (API Version 2020-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/logz/2020-10-01/vmhost"

Client Initialization

client := vmhost.NewVMHostClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VMHostClient.MonitorListVMHostUpdate

ctx := context.TODO()
id := vmhost.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

payload := vmhost.VMHostUpdateRequest{
	// ...
}


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

Example Usage: VMHostClient.MonitorListVMHosts

ctx := context.TODO()
id := vmhost.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

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

Example Usage: VMHostClient.MonitorVMHostPayload

ctx := context.TODO()
id := vmhost.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

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

Example Usage: VMHostClient.SubAccountListVMHostUpdate

ctx := context.TODO()
id := vmhost.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue")

payload := vmhost.VMHostUpdateRequest{
	// ...
}


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

Example Usage: VMHostClient.SubAccountListVMHosts

ctx := context.TODO()
id := vmhost.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue")

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

Example Usage: VMHostClient.SubAccountVMHostPayload

ctx := context.TODO()
id := vmhost.NewAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue", "accountValue")

read, err := client.SubAccountVMHostPayload(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 PossibleValuesForVMHostUpdateStates

func PossibleValuesForVMHostUpdateStates() []string

func ValidateAccountID

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

ValidateAccountID checks that 'input' can be parsed as a Account ID

func ValidateMonitorID

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

ValidateMonitorID checks that 'input' can be parsed as a Monitor ID

Types

type AccountId

type AccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	MonitorName       string
	AccountName       string
}

AccountId is a struct representing the Resource ID for a Account

func NewAccountID

func NewAccountID(subscriptionId string, resourceGroupName string, monitorName string, accountName string) AccountId

NewAccountID returns a new AccountId struct

func ParseAccountID

func ParseAccountID(input string) (*AccountId, error)

ParseAccountID parses 'input' into a AccountId

func ParseAccountIDInsensitively

func ParseAccountIDInsensitively(input string) (*AccountId, error)

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

func (*AccountId) FromParseResult added in v0.20231127.1171502

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

func (AccountId) ID

func (id AccountId) ID() string

ID returns the formatted Account ID

func (AccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Account ID

func (AccountId) String

func (id AccountId) String() string

String returns a human-readable description of this Account ID

type MonitorId

type MonitorId struct {
	SubscriptionId    string
	ResourceGroupName string
	MonitorName       string
}

MonitorId is a struct representing the Resource ID for a Monitor

func NewMonitorID

func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName string) MonitorId

NewMonitorID returns a new MonitorId struct

func ParseMonitorID

func ParseMonitorID(input string) (*MonitorId, error)

ParseMonitorID parses 'input' into a MonitorId

func ParseMonitorIDInsensitively

func ParseMonitorIDInsensitively(input string) (*MonitorId, error)

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

func (*MonitorId) FromParseResult added in v0.20231127.1171502

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

func (MonitorId) ID

func (id MonitorId) ID() string

ID returns the formatted Monitor ID

func (MonitorId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Monitor ID

func (MonitorId) String

func (id MonitorId) String() string

String returns a human-readable description of this Monitor ID

type MonitorListVMHostUpdateCompleteResult

type MonitorListVMHostUpdateCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VMResources
}

type MonitorListVMHostUpdateOperationResponse

type MonitorListVMHostUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VMResources
}

type MonitorListVMHostsCompleteResult

type MonitorListVMHostsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VMResources
}

type MonitorListVMHostsOperationResponse

type MonitorListVMHostsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VMResources
}

type MonitorVMHostPayloadOperationResponse

type MonitorVMHostPayloadOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VMExtensionPayload
}

type SubAccountListVMHostUpdateCompleteResult

type SubAccountListVMHostUpdateCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VMResources
}

type SubAccountListVMHostUpdateOperationResponse

type SubAccountListVMHostUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VMResources
}

type SubAccountListVMHostsCompleteResult

type SubAccountListVMHostsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VMResources
}

type SubAccountListVMHostsOperationResponse

type SubAccountListVMHostsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VMResources
}

type SubAccountVMHostPayloadOperationResponse

type SubAccountVMHostPayloadOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VMExtensionPayload
}

type VMExtensionPayload

type VMExtensionPayload struct {
	ApiKey *string `json:"apiKey,omitempty"`
	Region *string `json:"region,omitempty"`
}

type VMHostClient

type VMHostClient struct {
	Client *resourcemanager.Client
}

func NewVMHostClientWithBaseURI

func NewVMHostClientWithBaseURI(sdkApi sdkEnv.Api) (*VMHostClient, error)

func (VMHostClient) MonitorListVMHostUpdate

func (c VMHostClient) MonitorListVMHostUpdate(ctx context.Context, id MonitorId, input VMHostUpdateRequest) (result MonitorListVMHostUpdateOperationResponse, err error)

MonitorListVMHostUpdate ...

func (VMHostClient) MonitorListVMHostUpdateComplete

func (c VMHostClient) MonitorListVMHostUpdateComplete(ctx context.Context, id MonitorId, input VMHostUpdateRequest) (MonitorListVMHostUpdateCompleteResult, error)

MonitorListVMHostUpdateComplete retrieves all the results into a single object

func (VMHostClient) MonitorListVMHostUpdateCompleteMatchingPredicate

func (c VMHostClient) MonitorListVMHostUpdateCompleteMatchingPredicate(ctx context.Context, id MonitorId, input VMHostUpdateRequest, predicate VMResourcesOperationPredicate) (result MonitorListVMHostUpdateCompleteResult, err error)

MonitorListVMHostUpdateCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VMHostClient) MonitorListVMHosts

func (c VMHostClient) MonitorListVMHosts(ctx context.Context, id MonitorId) (result MonitorListVMHostsOperationResponse, err error)

MonitorListVMHosts ...

func (VMHostClient) MonitorListVMHostsComplete

func (c VMHostClient) MonitorListVMHostsComplete(ctx context.Context, id MonitorId) (MonitorListVMHostsCompleteResult, error)

MonitorListVMHostsComplete retrieves all the results into a single object

func (VMHostClient) MonitorListVMHostsCompleteMatchingPredicate

func (c VMHostClient) MonitorListVMHostsCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate VMResourcesOperationPredicate) (result MonitorListVMHostsCompleteResult, err error)

MonitorListVMHostsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VMHostClient) MonitorVMHostPayload

func (c VMHostClient) MonitorVMHostPayload(ctx context.Context, id MonitorId) (result MonitorVMHostPayloadOperationResponse, err error)

MonitorVMHostPayload ...

func (VMHostClient) SubAccountListVMHostUpdate

func (c VMHostClient) SubAccountListVMHostUpdate(ctx context.Context, id AccountId, input VMHostUpdateRequest) (result SubAccountListVMHostUpdateOperationResponse, err error)

SubAccountListVMHostUpdate ...

func (VMHostClient) SubAccountListVMHostUpdateComplete

func (c VMHostClient) SubAccountListVMHostUpdateComplete(ctx context.Context, id AccountId, input VMHostUpdateRequest) (SubAccountListVMHostUpdateCompleteResult, error)

SubAccountListVMHostUpdateComplete retrieves all the results into a single object

func (VMHostClient) SubAccountListVMHostUpdateCompleteMatchingPredicate

func (c VMHostClient) SubAccountListVMHostUpdateCompleteMatchingPredicate(ctx context.Context, id AccountId, input VMHostUpdateRequest, predicate VMResourcesOperationPredicate) (result SubAccountListVMHostUpdateCompleteResult, err error)

SubAccountListVMHostUpdateCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VMHostClient) SubAccountListVMHosts

func (c VMHostClient) SubAccountListVMHosts(ctx context.Context, id AccountId) (result SubAccountListVMHostsOperationResponse, err error)

SubAccountListVMHosts ...

func (VMHostClient) SubAccountListVMHostsComplete

func (c VMHostClient) SubAccountListVMHostsComplete(ctx context.Context, id AccountId) (SubAccountListVMHostsCompleteResult, error)

SubAccountListVMHostsComplete retrieves all the results into a single object

func (VMHostClient) SubAccountListVMHostsCompleteMatchingPredicate

func (c VMHostClient) SubAccountListVMHostsCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate VMResourcesOperationPredicate) (result SubAccountListVMHostsCompleteResult, err error)

SubAccountListVMHostsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VMHostClient) SubAccountVMHostPayload

func (c VMHostClient) SubAccountVMHostPayload(ctx context.Context, id AccountId) (result SubAccountVMHostPayloadOperationResponse, err error)

SubAccountVMHostPayload ...

type VMHostUpdateRequest

type VMHostUpdateRequest struct {
	State         *VMHostUpdateStates `json:"state,omitempty"`
	VMResourceIds *[]VMResources      `json:"vmResourceIds,omitempty"`
}

type VMHostUpdateStates

type VMHostUpdateStates string
const (
	VMHostUpdateStatesDelete  VMHostUpdateStates = "Delete"
	VMHostUpdateStatesInstall VMHostUpdateStates = "Install"
)

func (*VMHostUpdateStates) UnmarshalJSON added in v0.20230712.1163130

func (s *VMHostUpdateStates) UnmarshalJSON(bytes []byte) error

type VMResources

type VMResources struct {
	AgentVersion *string `json:"agentVersion,omitempty"`
	Id           *string `json:"id,omitempty"`
}

type VMResourcesOperationPredicate

type VMResourcesOperationPredicate struct {
	AgentVersion *string
	Id           *string
}

func (VMResourcesOperationPredicate) Matches

Jump to

Keyboard shortcuts

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