jobexecutions

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: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2017-03-01-preview/jobexecutions Documentation

The jobexecutions SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2017-03-01-preview).

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/sql/2017-03-01-preview/jobexecutions"

Client Initialization

client := jobexecutions.NewJobExecutionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: JobExecutionsClient.Cancel

ctx := context.TODO()
id := jobexecutions.NewExecutionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "jobValue", "jobExecutionIdValue")

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

Example Usage: JobExecutionsClient.Create

ctx := context.TODO()
id := jobexecutions.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "jobValue")

if err := client.CreateThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: JobExecutionsClient.CreateOrUpdate

ctx := context.TODO()
id := jobexecutions.NewExecutionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "jobValue", "jobExecutionIdValue")

if err := client.CreateOrUpdateThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: JobExecutionsClient.Get

ctx := context.TODO()
id := jobexecutions.NewExecutionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "jobValue", "jobExecutionIdValue")

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: JobExecutionsClient.ListByAgent

ctx := context.TODO()
id := jobexecutions.NewJobAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue")

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

Example Usage: JobExecutionsClient.ListByJob

ctx := context.TODO()
id := jobexecutions.NewJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "jobValue")

// alternatively `client.ListByJob(ctx, id, jobexecutions.DefaultListByJobOperationOptions())` can be used to do batched pagination
items, err := client.ListByJobComplete(ctx, id, jobexecutions.DefaultListByJobOperationOptions())
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 PossibleValuesForJobExecutionLifecycle

func PossibleValuesForJobExecutionLifecycle() []string

func PossibleValuesForJobTargetType

func PossibleValuesForJobTargetType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateExecutionID

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

ValidateExecutionID checks that 'input' can be parsed as a Execution ID

func ValidateJobAgentID

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

ValidateJobAgentID checks that 'input' can be parsed as a Job Agent ID

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 CancelOperationResponse

type CancelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type ExecutionId

type ExecutionId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	JobAgentName      string
	JobName           string
	JobExecutionId    string
}

ExecutionId is a struct representing the Resource ID for a Execution

func NewExecutionID

func NewExecutionID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionId string) ExecutionId

NewExecutionID returns a new ExecutionId struct

func ParseExecutionID

func ParseExecutionID(input string) (*ExecutionId, error)

ParseExecutionID parses 'input' into a ExecutionId

func ParseExecutionIDInsensitively

func ParseExecutionIDInsensitively(input string) (*ExecutionId, error)

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

func (ExecutionId) ID

func (id ExecutionId) ID() string

ID returns the formatted Execution ID

func (ExecutionId) Segments

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

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

func (ExecutionId) String

func (id ExecutionId) String() string

String returns a human-readable description of this Execution ID

type GetOperationResponse

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

type JobAgentId

type JobAgentId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	JobAgentName      string
}

JobAgentId is a struct representing the Resource ID for a Job Agent

func NewJobAgentID

func NewJobAgentID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName string) JobAgentId

NewJobAgentID returns a new JobAgentId struct

func ParseJobAgentID

func ParseJobAgentID(input string) (*JobAgentId, error)

ParseJobAgentID parses 'input' into a JobAgentId

func ParseJobAgentIDInsensitively

func ParseJobAgentIDInsensitively(input string) (*JobAgentId, error)

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

func (JobAgentId) ID

func (id JobAgentId) ID() string

ID returns the formatted Job Agent ID

func (JobAgentId) Segments

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

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

func (JobAgentId) String

func (id JobAgentId) String() string

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

type JobExecution

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

type JobExecutionLifecycle

type JobExecutionLifecycle string
const (
	JobExecutionLifecycleCanceled                     JobExecutionLifecycle = "Canceled"
	JobExecutionLifecycleCreated                      JobExecutionLifecycle = "Created"
	JobExecutionLifecycleFailed                       JobExecutionLifecycle = "Failed"
	JobExecutionLifecycleInProgress                   JobExecutionLifecycle = "InProgress"
	JobExecutionLifecycleSkipped                      JobExecutionLifecycle = "Skipped"
	JobExecutionLifecycleSucceeded                    JobExecutionLifecycle = "Succeeded"
	JobExecutionLifecycleSucceededWithSkipped         JobExecutionLifecycle = "SucceededWithSkipped"
	JobExecutionLifecycleTimedOut                     JobExecutionLifecycle = "TimedOut"
	JobExecutionLifecycleWaitingForChildJobExecutions JobExecutionLifecycle = "WaitingForChildJobExecutions"
	JobExecutionLifecycleWaitingForRetry              JobExecutionLifecycle = "WaitingForRetry"
)

func (*JobExecutionLifecycle) UnmarshalJSON

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

type JobExecutionOperationPredicate

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

func (JobExecutionOperationPredicate) Matches

type JobExecutionProperties

type JobExecutionProperties struct {
	CreateTime              *string                `json:"createTime,omitempty"`
	CurrentAttemptStartTime *string                `json:"currentAttemptStartTime,omitempty"`
	CurrentAttempts         *int64                 `json:"currentAttempts,omitempty"`
	EndTime                 *string                `json:"endTime,omitempty"`
	JobExecutionId          *string                `json:"jobExecutionId,omitempty"`
	JobVersion              *int64                 `json:"jobVersion,omitempty"`
	LastMessage             *string                `json:"lastMessage,omitempty"`
	Lifecycle               *JobExecutionLifecycle `json:"lifecycle,omitempty"`
	ProvisioningState       *ProvisioningState     `json:"provisioningState,omitempty"`
	StartTime               *string                `json:"startTime,omitempty"`
	StepId                  *int64                 `json:"stepId,omitempty"`
	StepName                *string                `json:"stepName,omitempty"`
	Target                  *JobExecutionTarget    `json:"target,omitempty"`
}

func (*JobExecutionProperties) GetCreateTimeAsTime

func (o *JobExecutionProperties) GetCreateTimeAsTime() (*time.Time, error)

func (*JobExecutionProperties) GetCurrentAttemptStartTimeAsTime

func (o *JobExecutionProperties) GetCurrentAttemptStartTimeAsTime() (*time.Time, error)

func (*JobExecutionProperties) GetEndTimeAsTime

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

func (*JobExecutionProperties) GetStartTimeAsTime

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

func (*JobExecutionProperties) SetCreateTimeAsTime

func (o *JobExecutionProperties) SetCreateTimeAsTime(input time.Time)

func (*JobExecutionProperties) SetCurrentAttemptStartTimeAsTime

func (o *JobExecutionProperties) SetCurrentAttemptStartTimeAsTime(input time.Time)

func (*JobExecutionProperties) SetEndTimeAsTime

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

func (*JobExecutionProperties) SetStartTimeAsTime

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

type JobExecutionTarget

type JobExecutionTarget struct {
	DatabaseName *string        `json:"databaseName,omitempty"`
	ServerName   *string        `json:"serverName,omitempty"`
	Type         *JobTargetType `json:"type,omitempty"`
}

type JobExecutionsClient

type JobExecutionsClient struct {
	Client *resourcemanager.Client
}

func NewJobExecutionsClientWithBaseURI

func NewJobExecutionsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobExecutionsClient, error)

func (JobExecutionsClient) Cancel

Cancel ...

func (JobExecutionsClient) Create

func (c JobExecutionsClient) Create(ctx context.Context, id JobId) (result CreateOperationResponse, err error)

Create ...

func (JobExecutionsClient) CreateOrUpdate

func (c JobExecutionsClient) CreateOrUpdate(ctx context.Context, id ExecutionId) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (JobExecutionsClient) CreateOrUpdateThenPoll

func (c JobExecutionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExecutionId) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (JobExecutionsClient) CreateThenPoll

func (c JobExecutionsClient) CreateThenPoll(ctx context.Context, id JobId) error

CreateThenPoll performs Create then polls until it's completed

func (JobExecutionsClient) Get

Get ...

func (JobExecutionsClient) ListByAgent

ListByAgent ...

func (JobExecutionsClient) ListByAgentComplete

ListByAgentComplete retrieves all the results into a single object

func (JobExecutionsClient) ListByAgentCompleteMatchingPredicate

func (c JobExecutionsClient) ListByAgentCompleteMatchingPredicate(ctx context.Context, id JobAgentId, options ListByAgentOperationOptions, predicate JobExecutionOperationPredicate) (result ListByAgentCompleteResult, err error)

ListByAgentCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (JobExecutionsClient) ListByJob

ListByJob ...

func (JobExecutionsClient) ListByJobComplete

ListByJobComplete retrieves all the results into a single object

func (JobExecutionsClient) ListByJobCompleteMatchingPredicate

func (c JobExecutionsClient) ListByJobCompleteMatchingPredicate(ctx context.Context, id JobId, options ListByJobOperationOptions, predicate JobExecutionOperationPredicate) (result ListByJobCompleteResult, err error)

ListByJobCompleteMatchingPredicate retrieves all the results and then applies the predicate

type JobId

type JobId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	JobAgentName      string
	JobName           string
}

JobId is a struct representing the Resource ID for a Job

func NewJobID

func NewJobID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName 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) 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 JobTargetType

type JobTargetType string
const (
	JobTargetTypeSqlDatabase    JobTargetType = "SqlDatabase"
	JobTargetTypeSqlElasticPool JobTargetType = "SqlElasticPool"
	JobTargetTypeSqlServer      JobTargetType = "SqlServer"
	JobTargetTypeSqlShardMap    JobTargetType = "SqlShardMap"
	JobTargetTypeTargetGroup    JobTargetType = "TargetGroup"
)

func (*JobTargetType) UnmarshalJSON

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

type ListByAgentCompleteResult

type ListByAgentCompleteResult struct {
	Items []JobExecution
}

type ListByAgentOperationOptions

type ListByAgentOperationOptions struct {
	CreateTimeMax *string
	CreateTimeMin *string
	EndTimeMax    *string
	EndTimeMin    *string
	IsActive      *bool
	Skip          *int64
	Top           *int64
}

func DefaultListByAgentOperationOptions

func DefaultListByAgentOperationOptions() ListByAgentOperationOptions

func (ListByAgentOperationOptions) ToHeaders

func (ListByAgentOperationOptions) ToOData

func (ListByAgentOperationOptions) ToQuery

type ListByAgentOperationResponse

type ListByAgentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]JobExecution
}

type ListByJobCompleteResult

type ListByJobCompleteResult struct {
	Items []JobExecution
}

type ListByJobOperationOptions

type ListByJobOperationOptions struct {
	CreateTimeMax *string
	CreateTimeMin *string
	EndTimeMax    *string
	EndTimeMin    *string
	IsActive      *bool
	Skip          *int64
	Top           *int64
}

func DefaultListByJobOperationOptions

func DefaultListByJobOperationOptions() ListByJobOperationOptions

func (ListByJobOperationOptions) ToHeaders

func (o ListByJobOperationOptions) ToHeaders() *client.Headers

func (ListByJobOperationOptions) ToOData

func (o ListByJobOperationOptions) ToOData() *odata.Query

func (ListByJobOperationOptions) ToQuery

type ListByJobOperationResponse

type ListByJobOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]JobExecution
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled   ProvisioningState = "Canceled"
	ProvisioningStateCreated    ProvisioningState = "Created"
	ProvisioningStateFailed     ProvisioningState = "Failed"
	ProvisioningStateInProgress ProvisioningState = "InProgress"
	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