jobs

package
v0.20240923.1142107 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/jobs Documentation

The jobs SDK allows for interaction with Azure Resource Manager databoxedge (API Version 2022-03-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/databoxedge/2022-03-01/jobs"

Client Initialization

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

Example Usage: JobsClient.Get

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

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

func PossibleValuesForDownloadPhase() []string

func PossibleValuesForJobStatus

func PossibleValuesForJobStatus() []string

func PossibleValuesForJobType

func PossibleValuesForJobType() []string

func PossibleValuesForUpdateOperationStage

func PossibleValuesForUpdateOperationStage() []string

func ValidateJobID

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

ValidateJobID checks that 'input' can be parsed as a Job ID

Types

type DownloadPhase

type DownloadPhase string
const (
	DownloadPhaseDownloading  DownloadPhase = "Downloading"
	DownloadPhaseInitializing DownloadPhase = "Initializing"
	DownloadPhaseUnknown      DownloadPhase = "Unknown"
	DownloadPhaseVerifying    DownloadPhase = "Verifying"
)

func (*DownloadPhase) UnmarshalJSON

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

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Job
}

type Job

type Job struct {
	EndTime         *string          `json:"endTime,omitempty"`
	Error           *JobErrorDetails `json:"error,omitempty"`
	Id              *string          `json:"id,omitempty"`
	Name            *string          `json:"name,omitempty"`
	PercentComplete *int64           `json:"percentComplete,omitempty"`
	Properties      *JobProperties   `json:"properties,omitempty"`
	StartTime       *string          `json:"startTime,omitempty"`
	Status          *JobStatus       `json:"status,omitempty"`
	Type            *string          `json:"type,omitempty"`
}

func (*Job) GetEndTimeAsTime

func (o *Job) GetEndTimeAsTime() (*time.Time, error)

func (*Job) GetStartTimeAsTime

func (o *Job) GetStartTimeAsTime() (*time.Time, error)

func (*Job) SetEndTimeAsTime

func (o *Job) SetEndTimeAsTime(input time.Time)

func (*Job) SetStartTimeAsTime

func (o *Job) SetStartTimeAsTime(input time.Time)

type JobErrorDetails

type JobErrorDetails struct {
	Code         *string         `json:"code,omitempty"`
	ErrorDetails *[]JobErrorItem `json:"errorDetails,omitempty"`
	Message      *string         `json:"message,omitempty"`
}

type JobErrorItem

type JobErrorItem struct {
	Code            *string   `json:"code,omitempty"`
	Message         *string   `json:"message,omitempty"`
	Recommendations *[]string `json:"recommendations,omitempty"`
}

type JobId

type JobId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
	JobName               string
}

JobId is a struct representing the Resource ID for a Job

func NewJobID

func NewJobID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string, jobName string) JobId

NewJobID returns a new JobId struct

func ParseJobID

func ParseJobID(input string) (*JobId, error)

ParseJobID parses 'input' into a JobId

func ParseJobIDInsensitively

func ParseJobIDInsensitively(input string) (*JobId, error)

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

func (*JobId) FromParseResult

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

func (JobId) ID

func (id JobId) ID() string

ID returns the formatted Job ID

func (JobId) Segments

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

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

func (JobId) String

func (id JobId) String() string

String returns a human-readable description of this Job ID

type JobProperties

type JobProperties struct {
	CurrentStage       *UpdateOperationStage   `json:"currentStage,omitempty"`
	DownloadProgress   *UpdateDownloadProgress `json:"downloadProgress,omitempty"`
	ErrorManifestFile  *string                 `json:"errorManifestFile,omitempty"`
	Folder             *string                 `json:"folder,omitempty"`
	InstallProgress    *UpdateInstallProgress  `json:"installProgress,omitempty"`
	JobType            *JobType                `json:"jobType,omitempty"`
	RefreshedEntityId  *string                 `json:"refreshedEntityId,omitempty"`
	TotalRefreshErrors *int64                  `json:"totalRefreshErrors,omitempty"`
}

type JobStatus

type JobStatus string
const (
	JobStatusCanceled  JobStatus = "Canceled"
	JobStatusFailed    JobStatus = "Failed"
	JobStatusInvalid   JobStatus = "Invalid"
	JobStatusPaused    JobStatus = "Paused"
	JobStatusRunning   JobStatus = "Running"
	JobStatusScheduled JobStatus = "Scheduled"
	JobStatusSucceeded JobStatus = "Succeeded"
)

func (*JobStatus) UnmarshalJSON

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

type JobType

type JobType string
const (
	JobTypeBackup                JobType = "Backup"
	JobTypeDownloadUpdates       JobType = "DownloadUpdates"
	JobTypeInstallUpdates        JobType = "InstallUpdates"
	JobTypeInvalid               JobType = "Invalid"
	JobTypeRefreshContainer      JobType = "RefreshContainer"
	JobTypeRefreshShare          JobType = "RefreshShare"
	JobTypeRestore               JobType = "Restore"
	JobTypeScanForUpdates        JobType = "ScanForUpdates"
	JobTypeTriggerSupportPackage JobType = "TriggerSupportPackage"
)

func (*JobType) UnmarshalJSON

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

type JobsClient

type JobsClient struct {
	Client *resourcemanager.Client
}

func NewJobsClientWithBaseURI

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

func (JobsClient) Get

func (c JobsClient) Get(ctx context.Context, id JobId) (result GetOperationResponse, err error)

Get ...

type UpdateDownloadProgress

type UpdateDownloadProgress struct {
	DownloadPhase             *DownloadPhase `json:"downloadPhase,omitempty"`
	NumberOfUpdatesDownloaded *int64         `json:"numberOfUpdatesDownloaded,omitempty"`
	NumberOfUpdatesToDownload *int64         `json:"numberOfUpdatesToDownload,omitempty"`
	PercentComplete           *int64         `json:"percentComplete,omitempty"`
	TotalBytesDownloaded      *float64       `json:"totalBytesDownloaded,omitempty"`
	TotalBytesToDownload      *float64       `json:"totalBytesToDownload,omitempty"`
}

type UpdateInstallProgress

type UpdateInstallProgress struct {
	NumberOfUpdatesInstalled *int64 `json:"numberOfUpdatesInstalled,omitempty"`
	NumberOfUpdatesToInstall *int64 `json:"numberOfUpdatesToInstall,omitempty"`
	PercentComplete          *int64 `json:"percentComplete,omitempty"`
}

type UpdateOperationStage

type UpdateOperationStage string
const (
	UpdateOperationStageDownloadComplete UpdateOperationStage = "DownloadComplete"
	UpdateOperationStageDownloadFailed   UpdateOperationStage = "DownloadFailed"
	UpdateOperationStageDownloadStarted  UpdateOperationStage = "DownloadStarted"
	UpdateOperationStageFailure          UpdateOperationStage = "Failure"
	UpdateOperationStageInitial          UpdateOperationStage = "Initial"
	UpdateOperationStageInstallComplete  UpdateOperationStage = "InstallComplete"
	UpdateOperationStageInstallFailed    UpdateOperationStage = "InstallFailed"
	UpdateOperationStageInstallStarted   UpdateOperationStage = "InstallStarted"
	UpdateOperationStageRebootInitiated  UpdateOperationStage = "RebootInitiated"
	UpdateOperationStageRescanComplete   UpdateOperationStage = "RescanComplete"
	UpdateOperationStageRescanFailed     UpdateOperationStage = "RescanFailed"
	UpdateOperationStageRescanStarted    UpdateOperationStage = "RescanStarted"
	UpdateOperationStageScanComplete     UpdateOperationStage = "ScanComplete"
	UpdateOperationStageScanFailed       UpdateOperationStage = "ScanFailed"
	UpdateOperationStageScanStarted      UpdateOperationStage = "ScanStarted"
	UpdateOperationStageSuccess          UpdateOperationStage = "Success"
	UpdateOperationStageUnknown          UpdateOperationStage = "Unknown"
)

func (*UpdateOperationStage) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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