workflowruns

package
v0.20240124.1094959 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/logic/2019-05-01/workflowruns Documentation

The workflowruns SDK allows for interaction with the Azure Resource Manager Service logic (API Version 2019-05-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/logic/2019-05-01/workflowruns"

Client Initialization

client := workflowruns.NewWorkflowRunsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: WorkflowRunsClient.Cancel

ctx := context.TODO()
id := workflowruns.NewRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue")

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: WorkflowRunsClient.Get

ctx := context.TODO()
id := workflowruns.NewRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue", "runValue")

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: WorkflowRunsClient.List

ctx := context.TODO()
id := workflowruns.NewWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workflowValue")

// alternatively `client.List(ctx, id, workflowruns.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, workflowruns.DefaultListOperationOptions())
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 PossibleValuesForParameterType

func PossibleValuesForParameterType() []string

func PossibleValuesForWorkflowStatus

func PossibleValuesForWorkflowStatus() []string

func ValidateRunID

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

ValidateRunID checks that 'input' can be parsed as a Run ID

func ValidateWorkflowID

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

ValidateWorkflowID checks that 'input' can be parsed as a Workflow ID

Types

type CancelOperationResponse

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

type ContentHash

type ContentHash struct {
	Algorithm *string `json:"algorithm,omitempty"`
	Value     *string `json:"value,omitempty"`
}
type ContentLink struct {
	ContentHash    *ContentHash `json:"contentHash,omitempty"`
	ContentSize    *int64       `json:"contentSize,omitempty"`
	ContentVersion *string      `json:"contentVersion,omitempty"`
	Metadata       *interface{} `json:"metadata,omitempty"`
	Uri            *string      `json:"uri,omitempty"`
}

type Correlation

type Correlation struct {
	ClientTrackingId *string `json:"clientTrackingId,omitempty"`
}

type GetOperationResponse

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

type ListCompleteResult

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

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230712.1163130

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

func (ListOperationOptions) ToOData added in v0.20230712.1163130

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

func (ListOperationOptions) ToQuery added in v0.20230712.1163130

type ListOperationResponse

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

type ParameterType

type ParameterType string
const (
	ParameterTypeArray        ParameterType = "Array"
	ParameterTypeBool         ParameterType = "Bool"
	ParameterTypeFloat        ParameterType = "Float"
	ParameterTypeInt          ParameterType = "Int"
	ParameterTypeNotSpecified ParameterType = "NotSpecified"
	ParameterTypeObject       ParameterType = "Object"
	ParameterTypeSecureObject ParameterType = "SecureObject"
	ParameterTypeSecureString ParameterType = "SecureString"
	ParameterTypeString       ParameterType = "String"
)

func (*ParameterType) UnmarshalJSON added in v0.20230712.1163130

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

type ResourceReference

type ResourceReference struct {
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type RunId

type RunId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkflowName      string
	RunName           string
}

RunId is a struct representing the Resource ID for a Run

func NewRunID

func NewRunID(subscriptionId string, resourceGroupName string, workflowName string, runName string) RunId

NewRunID returns a new RunId struct

func ParseRunID

func ParseRunID(input string) (*RunId, error)

ParseRunID parses 'input' into a RunId

func ParseRunIDInsensitively

func ParseRunIDInsensitively(input string) (*RunId, error)

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

func (*RunId) FromParseResult added in v0.20231127.1171502

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

func (RunId) ID

func (id RunId) ID() string

ID returns the formatted Run ID

func (RunId) Segments

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

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

func (RunId) String

func (id RunId) String() string

String returns a human-readable description of this Run ID

type WorkflowId

type WorkflowId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkflowName      string
}

WorkflowId is a struct representing the Resource ID for a Workflow

func NewWorkflowID

func NewWorkflowID(subscriptionId string, resourceGroupName string, workflowName string) WorkflowId

NewWorkflowID returns a new WorkflowId struct

func ParseWorkflowID

func ParseWorkflowID(input string) (*WorkflowId, error)

ParseWorkflowID parses 'input' into a WorkflowId

func ParseWorkflowIDInsensitively

func ParseWorkflowIDInsensitively(input string) (*WorkflowId, error)

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

func (*WorkflowId) FromParseResult added in v0.20231127.1171502

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

func (WorkflowId) ID

func (id WorkflowId) ID() string

ID returns the formatted Workflow ID

func (WorkflowId) Segments

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

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

func (WorkflowId) String

func (id WorkflowId) String() string

String returns a human-readable description of this Workflow ID

type WorkflowOutputParameter

type WorkflowOutputParameter struct {
	Description *string        `json:"description,omitempty"`
	Error       *interface{}   `json:"error,omitempty"`
	Metadata    *interface{}   `json:"metadata,omitempty"`
	Type        *ParameterType `json:"type,omitempty"`
	Value       *interface{}   `json:"value,omitempty"`
}

type WorkflowRun

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

type WorkflowRunOperationPredicate

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

func (WorkflowRunOperationPredicate) Matches

type WorkflowRunProperties

type WorkflowRunProperties struct {
	Code          *string                             `json:"code,omitempty"`
	Correlation   *Correlation                        `json:"correlation,omitempty"`
	CorrelationId *string                             `json:"correlationId,omitempty"`
	EndTime       *string                             `json:"endTime,omitempty"`
	Error         *interface{}                        `json:"error,omitempty"`
	Outputs       *map[string]WorkflowOutputParameter `json:"outputs,omitempty"`
	Response      *WorkflowRunTrigger                 `json:"response,omitempty"`
	StartTime     *string                             `json:"startTime,omitempty"`
	Status        *WorkflowStatus                     `json:"status,omitempty"`
	Trigger       *WorkflowRunTrigger                 `json:"trigger,omitempty"`
	WaitEndTime   *string                             `json:"waitEndTime,omitempty"`
	Workflow      *ResourceReference                  `json:"workflow,omitempty"`
}

func (*WorkflowRunProperties) GetEndTimeAsTime

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

func (*WorkflowRunProperties) GetStartTimeAsTime

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

func (*WorkflowRunProperties) GetWaitEndTimeAsTime

func (o *WorkflowRunProperties) GetWaitEndTimeAsTime() (*time.Time, error)

func (*WorkflowRunProperties) SetEndTimeAsTime

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

func (*WorkflowRunProperties) SetStartTimeAsTime

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

func (*WorkflowRunProperties) SetWaitEndTimeAsTime

func (o *WorkflowRunProperties) SetWaitEndTimeAsTime(input time.Time)

type WorkflowRunTrigger

type WorkflowRunTrigger struct {
	Code              *string         `json:"code,omitempty"`
	Correlation       *Correlation    `json:"correlation,omitempty"`
	EndTime           *string         `json:"endTime,omitempty"`
	Error             *interface{}    `json:"error,omitempty"`
	Inputs            *interface{}    `json:"inputs,omitempty"`
	InputsLink        *ContentLink    `json:"inputsLink,omitempty"`
	Name              *string         `json:"name,omitempty"`
	Outputs           *interface{}    `json:"outputs,omitempty"`
	OutputsLink       *ContentLink    `json:"outputsLink,omitempty"`
	ScheduledTime     *string         `json:"scheduledTime,omitempty"`
	StartTime         *string         `json:"startTime,omitempty"`
	Status            *WorkflowStatus `json:"status,omitempty"`
	TrackedProperties *interface{}    `json:"trackedProperties,omitempty"`
	TrackingId        *string         `json:"trackingId,omitempty"`
}

func (*WorkflowRunTrigger) GetEndTimeAsTime

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

func (*WorkflowRunTrigger) GetScheduledTimeAsTime

func (o *WorkflowRunTrigger) GetScheduledTimeAsTime() (*time.Time, error)

func (*WorkflowRunTrigger) GetStartTimeAsTime

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

func (*WorkflowRunTrigger) SetEndTimeAsTime

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

func (*WorkflowRunTrigger) SetScheduledTimeAsTime

func (o *WorkflowRunTrigger) SetScheduledTimeAsTime(input time.Time)

func (*WorkflowRunTrigger) SetStartTimeAsTime

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

type WorkflowRunsClient

type WorkflowRunsClient struct {
	Client *resourcemanager.Client
}

func NewWorkflowRunsClientWithBaseURI

func NewWorkflowRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*WorkflowRunsClient, error)

func (WorkflowRunsClient) Cancel

func (c WorkflowRunsClient) Cancel(ctx context.Context, id RunId) (result CancelOperationResponse, err error)

Cancel ...

func (WorkflowRunsClient) Get

func (c WorkflowRunsClient) Get(ctx context.Context, id RunId) (result GetOperationResponse, err error)

Get ...

func (WorkflowRunsClient) List

List ...

func (WorkflowRunsClient) ListComplete

ListComplete retrieves all the results into a single object

func (WorkflowRunsClient) ListCompleteMatchingPredicate

func (c WorkflowRunsClient) ListCompleteMatchingPredicate(ctx context.Context, id WorkflowId, options ListOperationOptions, predicate WorkflowRunOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type WorkflowStatus

type WorkflowStatus string
const (
	WorkflowStatusAborted      WorkflowStatus = "Aborted"
	WorkflowStatusCancelled    WorkflowStatus = "Cancelled"
	WorkflowStatusFailed       WorkflowStatus = "Failed"
	WorkflowStatusFaulted      WorkflowStatus = "Faulted"
	WorkflowStatusIgnored      WorkflowStatus = "Ignored"
	WorkflowStatusNotSpecified WorkflowStatus = "NotSpecified"
	WorkflowStatusPaused       WorkflowStatus = "Paused"
	WorkflowStatusRunning      WorkflowStatus = "Running"
	WorkflowStatusSkipped      WorkflowStatus = "Skipped"
	WorkflowStatusSucceeded    WorkflowStatus = "Succeeded"
	WorkflowStatusSuspended    WorkflowStatus = "Suspended"
	WorkflowStatusTimedOut     WorkflowStatus = "TimedOut"
	WorkflowStatusWaiting      WorkflowStatus = "Waiting"
)

func (*WorkflowStatus) UnmarshalJSON added in v0.20230712.1163130

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

Jump to

Keyboard shortcuts

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