runs

package
v0.20240320.1105218 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2019-06-01-preview/runs Documentation

The runs SDK allows for interaction with the Azure Resource Manager Service containerregistry (API Version 2019-06-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/containerregistry/2019-06-01-preview/runs"

Client Initialization

client := runs.NewRunsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RunsClient.Cancel

ctx := context.TODO()
id := runs.NewRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "runIdValue")

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

Example Usage: RunsClient.Get

ctx := context.TODO()
id := runs.NewRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "runIdValue")

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: RunsClient.GetLogSasUrl

ctx := context.TODO()
id := runs.NewRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "runIdValue")

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

Example Usage: RunsClient.List

ctx := context.TODO()
id := runs.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue")

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

Example Usage: RunsClient.Update

ctx := context.TODO()
id := runs.NewRunID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "runIdValue")

payload := runs.RunUpdateParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForArchitecture

func PossibleValuesForArchitecture() []string

func PossibleValuesForOS

func PossibleValuesForOS() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForRunStatus

func PossibleValuesForRunStatus() []string

func PossibleValuesForRunType

func PossibleValuesForRunType() []string

func PossibleValuesForVariant

func PossibleValuesForVariant() []string

func ValidateRegistryID

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

ValidateRegistryID checks that 'input' can be parsed as a Registry 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 AgentProperties

type AgentProperties struct {
	Cpu *int64 `json:"cpu,omitempty"`
}

type Architecture

type Architecture string
const (
	ArchitectureAmdSixFour    Architecture = "amd64"
	ArchitectureArm           Architecture = "arm"
	ArchitectureArmSixFour    Architecture = "arm64"
	ArchitectureThreeEightSix Architecture = "386"
	ArchitectureXEightSix     Architecture = "x86"
)

func (*Architecture) UnmarshalJSON

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

type CancelOperationResponse

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

type GetLogSasUrlOperationResponse

type GetLogSasUrlOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RunGetLogResult
}

type GetOperationResponse

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

type ImageDescriptor

type ImageDescriptor struct {
	Digest     *string `json:"digest,omitempty"`
	Registry   *string `json:"registry,omitempty"`
	Repository *string `json:"repository,omitempty"`
	Tag        *string `json:"tag,omitempty"`
}

type ImageUpdateTrigger

type ImageUpdateTrigger struct {
	Id        *string            `json:"id,omitempty"`
	Images    *[]ImageDescriptor `json:"images,omitempty"`
	Timestamp *string            `json:"timestamp,omitempty"`
}

func (*ImageUpdateTrigger) GetTimestampAsTime

func (o *ImageUpdateTrigger) GetTimestampAsTime() (*time.Time, error)

func (*ImageUpdateTrigger) SetTimestampAsTime

func (o *ImageUpdateTrigger) SetTimestampAsTime(input time.Time)

type ListCompleteResult

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

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        *[]Run
}

type OS

type OS string
const (
	OSLinux   OS = "Linux"
	OSWindows OS = "Windows"
)

func (*OS) UnmarshalJSON

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

type PlatformProperties

type PlatformProperties struct {
	Architecture *Architecture `json:"architecture,omitempty"`
	Os           OS            `json:"os"`
	Variant      *Variant      `json:"variant,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type RegistryId

type RegistryId struct {
	SubscriptionId    string
	ResourceGroupName string
	RegistryName      string
}

RegistryId is a struct representing the Resource ID for a Registry

func NewRegistryID

func NewRegistryID(subscriptionId string, resourceGroupName string, registryName string) RegistryId

NewRegistryID returns a new RegistryId struct

func ParseRegistryID

func ParseRegistryID(input string) (*RegistryId, error)

ParseRegistryID parses 'input' into a RegistryId

func ParseRegistryIDInsensitively

func ParseRegistryIDInsensitively(input string) (*RegistryId, error)

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

func (*RegistryId) FromParseResult

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

func (RegistryId) ID

func (id RegistryId) ID() string

ID returns the formatted Registry ID

func (RegistryId) Segments

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

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

func (RegistryId) String

func (id RegistryId) String() string

String returns a human-readable description of this Registry ID

type Run

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

type RunGetLogResult

type RunGetLogResult struct {
	LogArtifactLink *string `json:"logArtifactLink,omitempty"`
	LogLink         *string `json:"logLink,omitempty"`
}

type RunId

type RunId struct {
	SubscriptionId    string
	ResourceGroupName string
	RegistryName      string
	RunId             string
}

RunId is a struct representing the Resource ID for a Run

func NewRunID

func NewRunID(subscriptionId string, resourceGroupName string, registryName string, runId 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 RunOperationPredicate

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

func (RunOperationPredicate) Matches

func (p RunOperationPredicate) Matches(input Run) bool

type RunProperties

type RunProperties struct {
	AgentConfiguration *AgentProperties         `json:"agentConfiguration,omitempty"`
	AgentPoolName      *string                  `json:"agentPoolName,omitempty"`
	CreateTime         *string                  `json:"createTime,omitempty"`
	CustomRegistries   *[]string                `json:"customRegistries,omitempty"`
	FinishTime         *string                  `json:"finishTime,omitempty"`
	ImageUpdateTrigger *ImageUpdateTrigger      `json:"imageUpdateTrigger,omitempty"`
	IsArchiveEnabled   *bool                    `json:"isArchiveEnabled,omitempty"`
	LastUpdatedTime    *string                  `json:"lastUpdatedTime,omitempty"`
	LogArtifact        *ImageDescriptor         `json:"logArtifact,omitempty"`
	OutputImages       *[]ImageDescriptor       `json:"outputImages,omitempty"`
	Platform           *PlatformProperties      `json:"platform,omitempty"`
	ProvisioningState  *ProvisioningState       `json:"provisioningState,omitempty"`
	RunErrorMessage    *string                  `json:"runErrorMessage,omitempty"`
	RunId              *string                  `json:"runId,omitempty"`
	RunType            *RunType                 `json:"runType,omitempty"`
	SourceRegistryAuth *string                  `json:"sourceRegistryAuth,omitempty"`
	SourceTrigger      *SourceTriggerDescriptor `json:"sourceTrigger,omitempty"`
	StartTime          *string                  `json:"startTime,omitempty"`
	Status             *RunStatus               `json:"status,omitempty"`
	Task               *string                  `json:"task,omitempty"`
	TimerTrigger       *TimerTriggerDescriptor  `json:"timerTrigger,omitempty"`
	UpdateTriggerToken *string                  `json:"updateTriggerToken,omitempty"`
}

func (*RunProperties) GetCreateTimeAsTime

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

func (*RunProperties) GetFinishTimeAsTime

func (o *RunProperties) GetFinishTimeAsTime() (*time.Time, error)

func (*RunProperties) GetLastUpdatedTimeAsTime

func (o *RunProperties) GetLastUpdatedTimeAsTime() (*time.Time, error)

func (*RunProperties) GetStartTimeAsTime

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

func (*RunProperties) SetCreateTimeAsTime

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

func (*RunProperties) SetFinishTimeAsTime

func (o *RunProperties) SetFinishTimeAsTime(input time.Time)

func (*RunProperties) SetLastUpdatedTimeAsTime

func (o *RunProperties) SetLastUpdatedTimeAsTime(input time.Time)

func (*RunProperties) SetStartTimeAsTime

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

type RunStatus

type RunStatus string
const (
	RunStatusCanceled  RunStatus = "Canceled"
	RunStatusError     RunStatus = "Error"
	RunStatusFailed    RunStatus = "Failed"
	RunStatusQueued    RunStatus = "Queued"
	RunStatusRunning   RunStatus = "Running"
	RunStatusStarted   RunStatus = "Started"
	RunStatusSucceeded RunStatus = "Succeeded"
	RunStatusTimeout   RunStatus = "Timeout"
)

func (*RunStatus) UnmarshalJSON

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

type RunType

type RunType string
const (
	RunTypeAutoBuild  RunType = "AutoBuild"
	RunTypeAutoRun    RunType = "AutoRun"
	RunTypeQuickBuild RunType = "QuickBuild"
	RunTypeQuickRun   RunType = "QuickRun"
)

func (*RunType) UnmarshalJSON

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

type RunUpdateParameters

type RunUpdateParameters struct {
	IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
}

type RunsClient

type RunsClient struct {
	Client *resourcemanager.Client
}

func NewRunsClientWithBaseURI

func NewRunsClientWithBaseURI(sdkApi sdkEnv.Api) (*RunsClient, error)

func (RunsClient) Cancel

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

Cancel ...

func (RunsClient) CancelThenPoll

func (c RunsClient) CancelThenPoll(ctx context.Context, id RunId) error

CancelThenPoll performs Cancel then polls until it's completed

func (RunsClient) Get

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

Get ...

func (RunsClient) GetLogSasUrl

func (c RunsClient) GetLogSasUrl(ctx context.Context, id RunId) (result GetLogSasUrlOperationResponse, err error)

GetLogSasUrl ...

func (RunsClient) List

func (c RunsClient) List(ctx context.Context, id RegistryId, options ListOperationOptions) (result ListOperationResponse, err error)

List ...

func (RunsClient) ListComplete

ListComplete retrieves all the results into a single object

func (RunsClient) ListCompleteMatchingPredicate

func (c RunsClient) ListCompleteMatchingPredicate(ctx context.Context, id RegistryId, options ListOperationOptions, predicate RunOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (RunsClient) Update

func (c RunsClient) Update(ctx context.Context, id RunId, input RunUpdateParameters) (result UpdateOperationResponse, err error)

Update ...

func (RunsClient) UpdateThenPoll

func (c RunsClient) UpdateThenPoll(ctx context.Context, id RunId, input RunUpdateParameters) error

UpdateThenPoll performs Update then polls until it's completed

type SourceTriggerDescriptor

type SourceTriggerDescriptor struct {
	BranchName    *string `json:"branchName,omitempty"`
	CommitId      *string `json:"commitId,omitempty"`
	EventType     *string `json:"eventType,omitempty"`
	Id            *string `json:"id,omitempty"`
	ProviderType  *string `json:"providerType,omitempty"`
	PullRequestId *string `json:"pullRequestId,omitempty"`
	RepositoryUrl *string `json:"repositoryUrl,omitempty"`
}

type TimerTriggerDescriptor

type TimerTriggerDescriptor struct {
	ScheduleOccurrence *string `json:"scheduleOccurrence,omitempty"`
	TimerTriggerName   *string `json:"timerTriggerName,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Run
}

type Variant

type Variant string
const (
	VariantVEight Variant = "v8"
	VariantVSeven Variant = "v7"
	VariantVSix   Variant = "v6"
)

func (*Variant) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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