jobsteps

package
v0.20240612.1084144 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/jobsteps Documentation

The jobsteps SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2023-02-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/2023-02-01-preview/jobsteps"

Client Initialization

client := jobsteps.NewJobStepsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: JobStepsClient.CreateOrUpdate

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

payload := jobsteps.JobStep{
	// ...
}


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

Example Usage: JobStepsClient.Delete

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

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

Example Usage: JobStepsClient.Get

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

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: JobStepsClient.GetByVersion

ctx := context.TODO()
id := jobsteps.NewVersionStepID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "jobAgentValue", "jobValue", "versionValue", "stepValue")

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

Example Usage: JobStepsClient.ListByJob

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

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

Example Usage: JobStepsClient.ListByVersion

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

// alternatively `client.ListByVersion(ctx, id)` can be used to do batched pagination
items, err := client.ListByVersionComplete(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 PossibleValuesForJobStepActionSource

func PossibleValuesForJobStepActionSource() []string

func PossibleValuesForJobStepActionType

func PossibleValuesForJobStepActionType() []string

func PossibleValuesForJobStepOutputType

func PossibleValuesForJobStepOutputType() []string

func ValidateJobID

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

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

func ValidateStepID

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

ValidateStepID checks that 'input' can be parsed as a Step ID

func ValidateVersionID

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

ValidateVersionID checks that 'input' can be parsed as a Version ID

func ValidateVersionStepID

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

ValidateVersionStepID checks that 'input' can be parsed as a Version Step ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *JobStep
}

type DeleteOperationResponse

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

type GetByVersionOperationResponse

type GetByVersionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *JobStep
}

type GetOperationResponse

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

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

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

type JobStepAction

type JobStepAction struct {
	Source *JobStepActionSource `json:"source,omitempty"`
	Type   *JobStepActionType   `json:"type,omitempty"`
	Value  string               `json:"value"`
}

type JobStepActionSource

type JobStepActionSource string
const (
	JobStepActionSourceInline JobStepActionSource = "Inline"
)

func (*JobStepActionSource) UnmarshalJSON

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

type JobStepActionType

type JobStepActionType string
const (
	JobStepActionTypeTSql JobStepActionType = "TSql"
)

func (*JobStepActionType) UnmarshalJSON

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

type JobStepExecutionOptions

type JobStepExecutionOptions struct {
	InitialRetryIntervalSeconds    *int64   `json:"initialRetryIntervalSeconds,omitempty"`
	MaximumRetryIntervalSeconds    *int64   `json:"maximumRetryIntervalSeconds,omitempty"`
	RetryAttempts                  *int64   `json:"retryAttempts,omitempty"`
	RetryIntervalBackoffMultiplier *float64 `json:"retryIntervalBackoffMultiplier,omitempty"`
	TimeoutSeconds                 *int64   `json:"timeoutSeconds,omitempty"`
}

type JobStepOperationPredicate

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

func (JobStepOperationPredicate) Matches

func (p JobStepOperationPredicate) Matches(input JobStep) bool

type JobStepOutput

type JobStepOutput struct {
	Credential        string             `json:"credential"`
	DatabaseName      string             `json:"databaseName"`
	ResourceGroupName *string            `json:"resourceGroupName,omitempty"`
	SchemaName        *string            `json:"schemaName,omitempty"`
	ServerName        string             `json:"serverName"`
	SubscriptionId    *string            `json:"subscriptionId,omitempty"`
	TableName         string             `json:"tableName"`
	Type              *JobStepOutputType `json:"type,omitempty"`
}

type JobStepOutputType

type JobStepOutputType string
const (
	JobStepOutputTypeSqlDatabase JobStepOutputType = "SqlDatabase"
)

func (*JobStepOutputType) UnmarshalJSON

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

type JobStepProperties

type JobStepProperties struct {
	Action           JobStepAction            `json:"action"`
	Credential       string                   `json:"credential"`
	ExecutionOptions *JobStepExecutionOptions `json:"executionOptions,omitempty"`
	Output           *JobStepOutput           `json:"output,omitempty"`
	StepId           *int64                   `json:"stepId,omitempty"`
	TargetGroup      string                   `json:"targetGroup"`
}

type JobStepsClient

type JobStepsClient struct {
	Client *resourcemanager.Client
}

func NewJobStepsClientWithBaseURI

func NewJobStepsClientWithBaseURI(sdkApi sdkEnv.Api) (*JobStepsClient, error)

func (JobStepsClient) CreateOrUpdate

func (c JobStepsClient) CreateOrUpdate(ctx context.Context, id StepId, input JobStep) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (JobStepsClient) Delete

func (c JobStepsClient) Delete(ctx context.Context, id StepId) (result DeleteOperationResponse, err error)

Delete ...

func (JobStepsClient) Get

func (c JobStepsClient) Get(ctx context.Context, id StepId) (result GetOperationResponse, err error)

Get ...

func (JobStepsClient) GetByVersion

func (c JobStepsClient) GetByVersion(ctx context.Context, id VersionStepId) (result GetByVersionOperationResponse, err error)

GetByVersion ...

func (JobStepsClient) ListByJob

func (c JobStepsClient) ListByJob(ctx context.Context, id JobId) (result ListByJobOperationResponse, err error)

ListByJob ...

func (JobStepsClient) ListByJobComplete

func (c JobStepsClient) ListByJobComplete(ctx context.Context, id JobId) (ListByJobCompleteResult, error)

ListByJobComplete retrieves all the results into a single object

func (JobStepsClient) ListByJobCompleteMatchingPredicate

func (c JobStepsClient) ListByJobCompleteMatchingPredicate(ctx context.Context, id JobId, predicate JobStepOperationPredicate) (result ListByJobCompleteResult, err error)

ListByJobCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (JobStepsClient) ListByVersion

func (c JobStepsClient) ListByVersion(ctx context.Context, id VersionId) (result ListByVersionOperationResponse, err error)

ListByVersion ...

func (JobStepsClient) ListByVersionComplete

func (c JobStepsClient) ListByVersionComplete(ctx context.Context, id VersionId) (ListByVersionCompleteResult, error)

ListByVersionComplete retrieves all the results into a single object

func (JobStepsClient) ListByVersionCompleteMatchingPredicate

func (c JobStepsClient) ListByVersionCompleteMatchingPredicate(ctx context.Context, id VersionId, predicate JobStepOperationPredicate) (result ListByVersionCompleteResult, err error)

ListByVersionCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListByJobCompleteResult

type ListByJobCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []JobStep
}

type ListByJobOperationResponse

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

type ListByVersionCompleteResult

type ListByVersionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []JobStep
}

type ListByVersionOperationResponse

type ListByVersionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]JobStep
}

type StepId

type StepId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	JobAgentName      string
	JobName           string
	StepName          string
}

StepId is a struct representing the Resource ID for a Step

func NewStepID

func NewStepID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string) StepId

NewStepID returns a new StepId struct

func ParseStepID

func ParseStepID(input string) (*StepId, error)

ParseStepID parses 'input' into a StepId

func ParseStepIDInsensitively

func ParseStepIDInsensitively(input string) (*StepId, error)

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

func (*StepId) FromParseResult

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

func (StepId) ID

func (id StepId) ID() string

ID returns the formatted Step ID

func (StepId) Segments

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

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

func (StepId) String

func (id StepId) String() string

String returns a human-readable description of this Step ID

type VersionId

type VersionId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	JobAgentName      string
	JobName           string
	VersionName       string
}

VersionId is a struct representing the Resource ID for a Version

func NewVersionID

func NewVersionID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName string, jobName string, versionName string) VersionId

NewVersionID returns a new VersionId struct

func ParseVersionID

func ParseVersionID(input string) (*VersionId, error)

ParseVersionID parses 'input' into a VersionId

func ParseVersionIDInsensitively

func ParseVersionIDInsensitively(input string) (*VersionId, error)

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

func (*VersionId) FromParseResult

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

func (VersionId) ID

func (id VersionId) ID() string

ID returns the formatted Version ID

func (VersionId) Segments

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

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

func (VersionId) String

func (id VersionId) String() string

String returns a human-readable description of this Version ID

type VersionStepId

type VersionStepId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	JobAgentName      string
	JobName           string
	VersionName       string
	StepName          string
}

VersionStepId is a struct representing the Resource ID for a Version Step

func NewVersionStepID

func NewVersionStepID(subscriptionId string, resourceGroupName string, serverName string, jobAgentName string, jobName string, versionName string, stepName string) VersionStepId

NewVersionStepID returns a new VersionStepId struct

func ParseVersionStepID

func ParseVersionStepID(input string) (*VersionStepId, error)

ParseVersionStepID parses 'input' into a VersionStepId

func ParseVersionStepIDInsensitively

func ParseVersionStepIDInsensitively(input string) (*VersionStepId, error)

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

func (*VersionStepId) FromParseResult

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

func (VersionStepId) ID

func (id VersionStepId) ID() string

ID returns the formatted Version Step ID

func (VersionStepId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Version Step ID

func (VersionStepId) String

func (id VersionStepId) String() string

String returns a human-readable description of this Version Step ID

Jump to

Keyboard shortcuts

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