jobs

package
v0.20231002.1065327 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

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

The jobs 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-sdk/resource-manager/migrate/2020-01-01/jobs"

Client Initialization

client := jobs.NewJobsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: JobsClient.GetAllJobsInSite

ctx := context.TODO()
id := jobs.NewVMwareSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vmwareSiteValue")

// 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: JobsClient.GetJob

ctx := context.TODO()
id := jobs.NewVMwareSiteJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vmwareSiteValue", "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 ValidateVMwareSiteID

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

ValidateVMwareSiteID checks that 'input' can be parsed as a V Mware 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 {
	Items []VMwareJob
}

type GetAllJobsInSiteOperationResponse

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

type GetJobOperationResponse

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

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"`
}

type JobsClient

type JobsClient struct {
	Client *resourcemanager.Client
}

func NewJobsClientWithBaseURI

func NewJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobsClient, error)

func (JobsClient) GetAllJobsInSite

func (c JobsClient) GetAllJobsInSite(ctx context.Context, id VMwareSiteId) (result GetAllJobsInSiteOperationResponse, err error)

GetAllJobsInSite ...

func (JobsClient) GetAllJobsInSiteComplete

func (c JobsClient) GetAllJobsInSiteComplete(ctx context.Context, id VMwareSiteId) (GetAllJobsInSiteCompleteResult, error)

GetAllJobsInSiteComplete retrieves all the results into a single object

func (JobsClient) GetAllJobsInSiteCompleteMatchingPredicate

func (c JobsClient) GetAllJobsInSiteCompleteMatchingPredicate(ctx context.Context, id VMwareSiteId, predicate VMwareJobOperationPredicate) (result GetAllJobsInSiteCompleteResult, err error)

GetAllJobsInSiteCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (JobsClient) GetJob

GetJob ...

type VMwareJob

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

type VMwareJobOperationPredicate

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

func (VMwareJobOperationPredicate) Matches

func (p VMwareJobOperationPredicate) Matches(input VMwareJob) bool

type VMwareSiteId

type VMwareSiteId struct {
	SubscriptionId    string
	ResourceGroupName string
	VmwareSiteName    string
}

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) 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

Jump to

Keyboard shortcuts

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