hypervjobs

package
v0.20240903.1111904 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/hypervjobs Documentation

The hypervjobs SDK allows for interaction with the Azure Resource Manager Service 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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/hypervjobs"

Client Initialization

client := hypervjobs.NewHyperVJobsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: HyperVJobsClient.GetAllJobsInSite

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

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

Example Usage: HyperVJobsClient.GetJob

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

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

type ErrorDetails struct {
	AgentErrorCode              *string `json:"agentErrorCode,omitempty"`
	AgentErrorMessage           *string `json:"agentErrorMessage,omitempty"`
	AgentErrorPossibleCauses    *string `json:"agentErrorPossibleCauses,omitempty"`
	AgentErrorRecommendedAction *string `json:"agentErrorRecommendedAction,omitempty"`
	Code                        *string `json:"code,omitempty"`
	IsAgentReportedError        *bool   `json:"isAgentReportedError,omitempty"`
	Message                     *string `json:"message,omitempty"`
	PossibleCauses              *string `json:"possibleCauses,omitempty"`
	RecommendedAction           *string `json:"recommendedAction,omitempty"`
	Severity                    *string `json:"severity,omitempty"`
}

type GetAllJobsInSiteCompleteResult

type GetAllJobsInSiteCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []HyperVJob
}

type GetAllJobsInSiteCustomPager added in v0.20240628.1153531

type GetAllJobsInSiteCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *GetAllJobsInSiteCustomPager) NextPageLink() *odata.Link

type GetAllJobsInSiteOperationResponse

type GetAllJobsInSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]HyperVJob
}

type GetJobOperationResponse

type GetJobOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *HyperVJob
}

type HyperVJob

type HyperVJob struct {
	Id         *string        `json:"id,omitempty"`
	Name       *string        `json:"name,omitempty"`
	Properties *JobProperties `json:"properties,omitempty"`
	Type       *string        `json:"type,omitempty"`
}

type HyperVJobOperationPredicate

type HyperVJobOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (HyperVJobOperationPredicate) Matches

func (p HyperVJobOperationPredicate) Matches(input HyperVJob) bool

type HyperVJobsClient

type HyperVJobsClient struct {
	Client *resourcemanager.Client
}

func NewHyperVJobsClientWithBaseURI

func NewHyperVJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVJobsClient, error)

func (HyperVJobsClient) GetAllJobsInSite

func (c HyperVJobsClient) GetAllJobsInSite(ctx context.Context, id HyperVSiteId) (result GetAllJobsInSiteOperationResponse, err error)

GetAllJobsInSite ...

func (HyperVJobsClient) GetAllJobsInSiteComplete

func (c HyperVJobsClient) GetAllJobsInSiteComplete(ctx context.Context, id HyperVSiteId) (GetAllJobsInSiteCompleteResult, error)

GetAllJobsInSiteComplete retrieves all the results into a single object

func (HyperVJobsClient) GetAllJobsInSiteCompleteMatchingPredicate

func (c HyperVJobsClient) GetAllJobsInSiteCompleteMatchingPredicate(ctx context.Context, id HyperVSiteId, predicate HyperVJobOperationPredicate) (result GetAllJobsInSiteCompleteResult, err error)

GetAllJobsInSiteCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (HyperVJobsClient) GetJob

GetJob ...

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 JobProperties

type JobProperties struct {
	ActivityId      *string         `json:"activityId,omitempty"`
	ClientRequestId *string         `json:"clientRequestId,omitempty"`
	DisplayName     *string         `json:"displayName,omitempty"`
	EndTime         *string         `json:"endTime,omitempty"`
	Errors          *[]ErrorDetails `json:"errors,omitempty"`
	StartTime       *string         `json:"startTime,omitempty"`
	Status          *string         `json:"status,omitempty"`
}

Jump to

Keyboard shortcuts

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