jobruns

package
v0.20241209.1115630 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/storagemover/2023-03-01/jobruns Documentation

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

Client Initialization

client := jobruns.NewJobRunsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: JobRunsClient.Get

ctx := context.TODO()
id := jobruns.NewJobRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageMoverName", "projectName", "jobDefinitionName", "jobRunName")

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
}

Example Usage: JobRunsClient.List

ctx := context.TODO()
id := jobruns.NewJobDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "storageMoverName", "projectName", "jobDefinitionName")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForJobRunScanStatus

func PossibleValuesForJobRunScanStatus() []string

func PossibleValuesForJobRunStatus

func PossibleValuesForJobRunStatus() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateJobDefinitionID

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

ValidateJobDefinitionID checks that 'input' can be parsed as a Job Definition ID

func ValidateJobRunID

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

ValidateJobRunID checks that 'input' can be parsed as a Job Run ID

Types

type GetOperationResponse

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

type JobDefinitionId

type JobDefinitionId struct {
	SubscriptionId    string
	ResourceGroupName string
	StorageMoverName  string
	ProjectName       string
	JobDefinitionName string
}

JobDefinitionId is a struct representing the Resource ID for a Job Definition

func NewJobDefinitionID

func NewJobDefinitionID(subscriptionId string, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string) JobDefinitionId

NewJobDefinitionID returns a new JobDefinitionId struct

func ParseJobDefinitionID

func ParseJobDefinitionID(input string) (*JobDefinitionId, error)

ParseJobDefinitionID parses 'input' into a JobDefinitionId

func ParseJobDefinitionIDInsensitively

func ParseJobDefinitionIDInsensitively(input string) (*JobDefinitionId, error)

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

func (*JobDefinitionId) FromParseResult

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

func (JobDefinitionId) ID

func (id JobDefinitionId) ID() string

ID returns the formatted Job Definition ID

func (JobDefinitionId) Segments

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

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

func (JobDefinitionId) String

func (id JobDefinitionId) String() string

String returns a human-readable description of this Job Definition ID

type JobRun

type JobRun struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *JobRunProperties      `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type JobRunError

type JobRunError struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
	Target  *string `json:"target,omitempty"`
}

type JobRunId

type JobRunId struct {
	SubscriptionId    string
	ResourceGroupName string
	StorageMoverName  string
	ProjectName       string
	JobDefinitionName string
	JobRunName        string
}

JobRunId is a struct representing the Resource ID for a Job Run

func NewJobRunID

func NewJobRunID(subscriptionId string, resourceGroupName string, storageMoverName string, projectName string, jobDefinitionName string, jobRunName string) JobRunId

NewJobRunID returns a new JobRunId struct

func ParseJobRunID

func ParseJobRunID(input string) (*JobRunId, error)

ParseJobRunID parses 'input' into a JobRunId

func ParseJobRunIDInsensitively

func ParseJobRunIDInsensitively(input string) (*JobRunId, error)

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

func (*JobRunId) FromParseResult

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

func (JobRunId) ID

func (id JobRunId) ID() string

ID returns the formatted Job Run ID

func (JobRunId) Segments

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

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

func (JobRunId) String

func (id JobRunId) String() string

String returns a human-readable description of this Job Run ID

type JobRunOperationPredicate

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

func (JobRunOperationPredicate) Matches

func (p JobRunOperationPredicate) Matches(input JobRun) bool

type JobRunProperties

type JobRunProperties struct {
	AgentName               *string            `json:"agentName,omitempty"`
	AgentResourceId         *string            `json:"agentResourceId,omitempty"`
	BytesExcluded           *int64             `json:"bytesExcluded,omitempty"`
	BytesFailed             *int64             `json:"bytesFailed,omitempty"`
	BytesNoTransferNeeded   *int64             `json:"bytesNoTransferNeeded,omitempty"`
	BytesScanned            *int64             `json:"bytesScanned,omitempty"`
	BytesTransferred        *int64             `json:"bytesTransferred,omitempty"`
	BytesUnsupported        *int64             `json:"bytesUnsupported,omitempty"`
	Error                   *JobRunError       `json:"error,omitempty"`
	ExecutionEndTime        *string            `json:"executionEndTime,omitempty"`
	ExecutionStartTime      *string            `json:"executionStartTime,omitempty"`
	ItemsExcluded           *int64             `json:"itemsExcluded,omitempty"`
	ItemsFailed             *int64             `json:"itemsFailed,omitempty"`
	ItemsNoTransferNeeded   *int64             `json:"itemsNoTransferNeeded,omitempty"`
	ItemsScanned            *int64             `json:"itemsScanned,omitempty"`
	ItemsTransferred        *int64             `json:"itemsTransferred,omitempty"`
	ItemsUnsupported        *int64             `json:"itemsUnsupported,omitempty"`
	JobDefinitionProperties *interface{}       `json:"jobDefinitionProperties,omitempty"`
	LastStatusUpdate        *string            `json:"lastStatusUpdate,omitempty"`
	ProvisioningState       *ProvisioningState `json:"provisioningState,omitempty"`
	ScanStatus              *JobRunScanStatus  `json:"scanStatus,omitempty"`
	SourceName              *string            `json:"sourceName,omitempty"`
	SourceProperties        *interface{}       `json:"sourceProperties,omitempty"`
	SourceResourceId        *string            `json:"sourceResourceId,omitempty"`
	Status                  *JobRunStatus      `json:"status,omitempty"`
	TargetName              *string            `json:"targetName,omitempty"`
	TargetProperties        *interface{}       `json:"targetProperties,omitempty"`
	TargetResourceId        *string            `json:"targetResourceId,omitempty"`
}

func (*JobRunProperties) GetExecutionEndTimeAsTime

func (o *JobRunProperties) GetExecutionEndTimeAsTime() (*time.Time, error)

func (*JobRunProperties) GetExecutionStartTimeAsTime

func (o *JobRunProperties) GetExecutionStartTimeAsTime() (*time.Time, error)

func (*JobRunProperties) GetLastStatusUpdateAsTime

func (o *JobRunProperties) GetLastStatusUpdateAsTime() (*time.Time, error)

func (*JobRunProperties) SetExecutionEndTimeAsTime

func (o *JobRunProperties) SetExecutionEndTimeAsTime(input time.Time)

func (*JobRunProperties) SetExecutionStartTimeAsTime

func (o *JobRunProperties) SetExecutionStartTimeAsTime(input time.Time)

func (*JobRunProperties) SetLastStatusUpdateAsTime

func (o *JobRunProperties) SetLastStatusUpdateAsTime(input time.Time)

type JobRunScanStatus

type JobRunScanStatus string
const (
	JobRunScanStatusCompleted  JobRunScanStatus = "Completed"
	JobRunScanStatusNotStarted JobRunScanStatus = "NotStarted"
	JobRunScanStatusScanning   JobRunScanStatus = "Scanning"
)

func (*JobRunScanStatus) UnmarshalJSON

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

type JobRunStatus

type JobRunStatus string
const (
	JobRunStatusCancelRequested JobRunStatus = "CancelRequested"
	JobRunStatusCanceled        JobRunStatus = "Canceled"
	JobRunStatusCanceling       JobRunStatus = "Canceling"
	JobRunStatusFailed          JobRunStatus = "Failed"
	JobRunStatusQueued          JobRunStatus = "Queued"
	JobRunStatusRunning         JobRunStatus = "Running"
	JobRunStatusStarted         JobRunStatus = "Started"
	JobRunStatusSucceeded       JobRunStatus = "Succeeded"
)

func (*JobRunStatus) UnmarshalJSON

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

type JobRunsClient

type JobRunsClient struct {
	Client *resourcemanager.Client
}

func NewJobRunsClientWithBaseURI

func NewJobRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobRunsClient, error)

func (JobRunsClient) Get

func (c JobRunsClient) Get(ctx context.Context, id JobRunId) (result GetOperationResponse, err error)

Get ...

func (JobRunsClient) List

List ...

func (JobRunsClient) ListComplete

ListComplete retrieves all the results into a single object

func (JobRunsClient) ListCompleteMatchingPredicate

func (c JobRunsClient) ListCompleteMatchingPredicate(ctx context.Context, id JobDefinitionId, predicate JobRunOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []JobRun
}

type ListCustomPager added in v0.20240628.1153531

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]JobRun
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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