workflowruns

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/web/2022-09-01/workflowruns Documentation

The workflowruns SDK allows for interaction with Azure Resource Manager web (API Version 2022-09-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/web/2022-09-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", "name", "workflowName", "runName")

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", "name", "workflowName", "runName")

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.NewManagementWorkflowID("12345678-1234-9876-4563-123456789012", "example-resource-group", "name", "workflowName")

// 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 ValidateManagementWorkflowID

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

ValidateManagementWorkflowID checks that 'input' can be parsed as a Management Workflow ID

func ValidateRunID

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

ValidateRunID checks that 'input' can be parsed as a Run 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 ListCustomPager added in v0.20240628.1153531

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

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

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

func (ListOperationOptions) ToOData

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

func (ListOperationOptions) ToQuery

type ListOperationResponse

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

type ManagementWorkflowId

type ManagementWorkflowId struct {
	SubscriptionId    string
	ResourceGroupName string
	SiteName          string
	WorkflowName      string
}

ManagementWorkflowId is a struct representing the Resource ID for a Management Workflow

func NewManagementWorkflowID

func NewManagementWorkflowID(subscriptionId string, resourceGroupName string, siteName string, workflowName string) ManagementWorkflowId

NewManagementWorkflowID returns a new ManagementWorkflowId struct

func ParseManagementWorkflowID

func ParseManagementWorkflowID(input string) (*ManagementWorkflowId, error)

ParseManagementWorkflowID parses 'input' into a ManagementWorkflowId

func ParseManagementWorkflowIDInsensitively

func ParseManagementWorkflowIDInsensitively(input string) (*ManagementWorkflowId, error)

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

func (*ManagementWorkflowId) FromParseResult

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

func (ManagementWorkflowId) ID

func (id ManagementWorkflowId) ID() string

ID returns the formatted Management Workflow ID

func (ManagementWorkflowId) Segments

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

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

func (ManagementWorkflowId) String

func (id ManagementWorkflowId) String() string

String returns a human-readable description of this Management Workflow ID

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

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
	SiteName          string
	WorkflowName      string
	RunName           string
}

RunId is a struct representing the Resource ID for a Run

func NewRunID

func NewRunID(subscriptionId string, resourceGroupName string, siteName 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

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 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 ManagementWorkflowId, 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

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