builds

package
v0.20241128.1112539 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-02-02-preview/builds Documentation

The builds SDK allows for interaction with Azure Resource Manager containerapps (API Version 2024-02-02-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/containerapps/2024-02-02-preview/builds"

Client Initialization

client := builds.NewBuildsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BuildsClient.BuildAuthTokenList

ctx := context.TODO()
id := builds.NewBuildID("12345678-1234-9876-4563-123456789012", "example-resource-group", "builderName", "buildName")

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

Example Usage: BuildsClient.ByBuilderResourceList

ctx := context.TODO()
id := builds.NewBuilderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "builderName")

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

Example Usage: BuildsClient.CreateOrUpdate

ctx := context.TODO()
id := builds.NewBuildID("12345678-1234-9876-4563-123456789012", "example-resource-group", "builderName", "buildName")

payload := builds.BuildResource{
	// ...
}


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

Example Usage: BuildsClient.Delete

ctx := context.TODO()
id := builds.NewBuildID("12345678-1234-9876-4563-123456789012", "example-resource-group", "builderName", "buildName")

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

Example Usage: BuildsClient.Get

ctx := context.TODO()
id := builds.NewBuildID("12345678-1234-9876-4563-123456789012", "example-resource-group", "builderName", "buildName")

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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForBuildProvisioningState

func PossibleValuesForBuildProvisioningState() []string

func PossibleValuesForBuildStatus

func PossibleValuesForBuildStatus() []string

func ValidateBuildID

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

ValidateBuildID checks that 'input' can be parsed as a Build ID

func ValidateBuilderID

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

ValidateBuilderID checks that 'input' can be parsed as a Builder ID

Types

type BuildAuthTokenListOperationResponse

type BuildAuthTokenListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *BuildToken
}

type BuildConfiguration

type BuildConfiguration struct {
	BaseOs               *string                `json:"baseOs,omitempty"`
	EnvironmentVariables *[]EnvironmentVariable `json:"environmentVariables,omitempty"`
	Platform             *string                `json:"platform,omitempty"`
	PlatformVersion      *string                `json:"platformVersion,omitempty"`
	PreBuildSteps        *[]PreBuildStep        `json:"preBuildSteps,omitempty"`
}

type BuildId

type BuildId struct {
	SubscriptionId    string
	ResourceGroupName string
	BuilderName       string
	BuildName         string
}

BuildId is a struct representing the Resource ID for a Build

func NewBuildID

func NewBuildID(subscriptionId string, resourceGroupName string, builderName string, buildName string) BuildId

NewBuildID returns a new BuildId struct

func ParseBuildID

func ParseBuildID(input string) (*BuildId, error)

ParseBuildID parses 'input' into a BuildId

func ParseBuildIDInsensitively

func ParseBuildIDInsensitively(input string) (*BuildId, error)

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

func (*BuildId) FromParseResult

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

func (BuildId) ID

func (id BuildId) ID() string

ID returns the formatted Build ID

func (BuildId) Segments

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

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

func (BuildId) String

func (id BuildId) String() string

String returns a human-readable description of this Build ID

type BuildProperties

type BuildProperties struct {
	BuildStatus                  *BuildStatus                      `json:"buildStatus,omitempty"`
	Configuration                *BuildConfiguration               `json:"configuration,omitempty"`
	DestinationContainerRegistry *ContainerRegistryWithCustomImage `json:"destinationContainerRegistry,omitempty"`
	LogStreamEndpoint            *string                           `json:"logStreamEndpoint,omitempty"`
	ProvisioningState            *BuildProvisioningState           `json:"provisioningState,omitempty"`
	TokenEndpoint                *string                           `json:"tokenEndpoint,omitempty"`
	UploadEndpoint               *string                           `json:"uploadEndpoint,omitempty"`
}

type BuildProvisioningState

type BuildProvisioningState string
const (
	BuildProvisioningStateCanceled  BuildProvisioningState = "Canceled"
	BuildProvisioningStateCreating  BuildProvisioningState = "Creating"
	BuildProvisioningStateDeleting  BuildProvisioningState = "Deleting"
	BuildProvisioningStateFailed    BuildProvisioningState = "Failed"
	BuildProvisioningStateSucceeded BuildProvisioningState = "Succeeded"
	BuildProvisioningStateUpdating  BuildProvisioningState = "Updating"
)

func (*BuildProvisioningState) UnmarshalJSON

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

type BuildResource

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

type BuildResourceOperationPredicate

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

func (BuildResourceOperationPredicate) Matches

type BuildStatus

type BuildStatus string
const (
	BuildStatusCanceled   BuildStatus = "Canceled"
	BuildStatusFailed     BuildStatus = "Failed"
	BuildStatusInProgress BuildStatus = "InProgress"
	BuildStatusNotStarted BuildStatus = "NotStarted"
	BuildStatusSucceeded  BuildStatus = "Succeeded"
)

func (*BuildStatus) UnmarshalJSON

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

type BuildToken

type BuildToken struct {
	Expires *string `json:"expires,omitempty"`
	Token   *string `json:"token,omitempty"`
}

func (*BuildToken) GetExpiresAsTime

func (o *BuildToken) GetExpiresAsTime() (*time.Time, error)

func (*BuildToken) SetExpiresAsTime

func (o *BuildToken) SetExpiresAsTime(input time.Time)

type BuilderId

type BuilderId struct {
	SubscriptionId    string
	ResourceGroupName string
	BuilderName       string
}

BuilderId is a struct representing the Resource ID for a Builder

func NewBuilderID

func NewBuilderID(subscriptionId string, resourceGroupName string, builderName string) BuilderId

NewBuilderID returns a new BuilderId struct

func ParseBuilderID

func ParseBuilderID(input string) (*BuilderId, error)

ParseBuilderID parses 'input' into a BuilderId

func ParseBuilderIDInsensitively

func ParseBuilderIDInsensitively(input string) (*BuilderId, error)

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

func (*BuilderId) FromParseResult

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

func (BuilderId) ID

func (id BuilderId) ID() string

ID returns the formatted Builder ID

func (BuilderId) Segments

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

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

func (BuilderId) String

func (id BuilderId) String() string

String returns a human-readable description of this Builder ID

type BuildsClient

type BuildsClient struct {
	Client *resourcemanager.Client
}

func NewBuildsClientWithBaseURI

func NewBuildsClientWithBaseURI(sdkApi sdkEnv.Api) (*BuildsClient, error)

func (BuildsClient) BuildAuthTokenList

func (c BuildsClient) BuildAuthTokenList(ctx context.Context, id BuildId) (result BuildAuthTokenListOperationResponse, err error)

BuildAuthTokenList ...

func (BuildsClient) ByBuilderResourceList

func (c BuildsClient) ByBuilderResourceList(ctx context.Context, id BuilderId) (result ByBuilderResourceListOperationResponse, err error)

ByBuilderResourceList ...

func (BuildsClient) ByBuilderResourceListComplete

func (c BuildsClient) ByBuilderResourceListComplete(ctx context.Context, id BuilderId) (ByBuilderResourceListCompleteResult, error)

ByBuilderResourceListComplete retrieves all the results into a single object

func (BuildsClient) ByBuilderResourceListCompleteMatchingPredicate

func (c BuildsClient) ByBuilderResourceListCompleteMatchingPredicate(ctx context.Context, id BuilderId, predicate BuildResourceOperationPredicate) (result ByBuilderResourceListCompleteResult, err error)

ByBuilderResourceListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BuildsClient) CreateOrUpdate

func (c BuildsClient) CreateOrUpdate(ctx context.Context, id BuildId, input BuildResource) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (BuildsClient) CreateOrUpdateThenPoll

func (c BuildsClient) CreateOrUpdateThenPoll(ctx context.Context, id BuildId, input BuildResource) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (BuildsClient) Delete

func (c BuildsClient) Delete(ctx context.Context, id BuildId) (result DeleteOperationResponse, err error)

Delete ...

func (BuildsClient) DeleteThenPoll

func (c BuildsClient) DeleteThenPoll(ctx context.Context, id BuildId) error

DeleteThenPoll performs Delete then polls until it's completed

func (BuildsClient) Get

func (c BuildsClient) Get(ctx context.Context, id BuildId) (result GetOperationResponse, err error)

Get ...

type ByBuilderResourceListCompleteResult

type ByBuilderResourceListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []BuildResource
}

type ByBuilderResourceListCustomPager

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

type ByBuilderResourceListOperationResponse

type ByBuilderResourceListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BuildResource
}

type ContainerRegistryWithCustomImage

type ContainerRegistryWithCustomImage struct {
	Image  *string `json:"image,omitempty"`
	Server string  `json:"server"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type EnvironmentVariable

type EnvironmentVariable struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type GetOperationResponse

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

type HTTPGet

type HTTPGet struct {
	FileName *string   `json:"fileName,omitempty"`
	Headers  *[]string `json:"headers,omitempty"`
	Url      string    `json:"url"`
}

type PreBuildStep

type PreBuildStep struct {
	Description *string   `json:"description,omitempty"`
	HTTPGet     *HTTPGet  `json:"httpGet,omitempty"`
	Scripts     *[]string `json:"scripts,omitempty"`
}

Jump to

Keyboard shortcuts

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