artifactsources

package
v0.20240708.1080555 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/artifactsources Documentation

The artifactsources SDK allows for interaction with the Azure Resource Manager Service devtestlab (API Version 2018-09-15).

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/devtestlab/2018-09-15/artifactsources"

Client Initialization

client := artifactsources.NewArtifactSourcesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ArtifactSourcesClient.CreateOrUpdate

ctx := context.TODO()
id := artifactsources.NewArtifactSourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "artifactSourceValue")

payload := artifactsources.ArtifactSource{
	// ...
}


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: ArtifactSourcesClient.Delete

ctx := context.TODO()
id := artifactsources.NewArtifactSourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "artifactSourceValue")

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

ctx := context.TODO()
id := artifactsources.NewArtifactSourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "artifactSourceValue")

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

Example Usage: ArtifactSourcesClient.List

ctx := context.TODO()
id := artifactsources.NewLabID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue")

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

Example Usage: ArtifactSourcesClient.Update

ctx := context.TODO()
id := artifactsources.NewArtifactSourceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "artifactSourceValue")

payload := artifactsources.UpdateResource{
	// ...
}


read, err := client.Update(ctx, id, payload)
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 PossibleValuesForEnableStatus

func PossibleValuesForEnableStatus() []string

func PossibleValuesForSourceControlType

func PossibleValuesForSourceControlType() []string

func ValidateArtifactSourceID

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

ValidateArtifactSourceID checks that 'input' can be parsed as a Artifact Source ID

func ValidateLabID

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

ValidateLabID checks that 'input' can be parsed as a Lab ID

Types

type ArtifactSource

type ArtifactSource struct {
	Id         *string                  `json:"id,omitempty"`
	Location   *string                  `json:"location,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Properties ArtifactSourceProperties `json:"properties"`
	Tags       *map[string]string       `json:"tags,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type ArtifactSourceId

type ArtifactSourceId struct {
	SubscriptionId     string
	ResourceGroupName  string
	LabName            string
	ArtifactSourceName string
}

ArtifactSourceId is a struct representing the Resource ID for a Artifact Source

func NewArtifactSourceID

func NewArtifactSourceID(subscriptionId string, resourceGroupName string, labName string, artifactSourceName string) ArtifactSourceId

NewArtifactSourceID returns a new ArtifactSourceId struct

func ParseArtifactSourceID

func ParseArtifactSourceID(input string) (*ArtifactSourceId, error)

ParseArtifactSourceID parses 'input' into a ArtifactSourceId

func ParseArtifactSourceIDInsensitively

func ParseArtifactSourceIDInsensitively(input string) (*ArtifactSourceId, error)

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

func (*ArtifactSourceId) FromParseResult

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

func (ArtifactSourceId) ID

func (id ArtifactSourceId) ID() string

ID returns the formatted Artifact Source ID

func (ArtifactSourceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Artifact Source ID

func (ArtifactSourceId) String

func (id ArtifactSourceId) String() string

String returns a human-readable description of this Artifact Source ID

type ArtifactSourceOperationPredicate

type ArtifactSourceOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (ArtifactSourceOperationPredicate) Matches

type ArtifactSourceProperties

type ArtifactSourceProperties struct {
	ArmTemplateFolderPath *string            `json:"armTemplateFolderPath,omitempty"`
	BranchRef             *string            `json:"branchRef,omitempty"`
	CreatedDate           *string            `json:"createdDate,omitempty"`
	DisplayName           *string            `json:"displayName,omitempty"`
	FolderPath            *string            `json:"folderPath,omitempty"`
	ProvisioningState     *string            `json:"provisioningState,omitempty"`
	SecurityToken         *string            `json:"securityToken,omitempty"`
	SourceType            *SourceControlType `json:"sourceType,omitempty"`
	Status                *EnableStatus      `json:"status,omitempty"`
	UniqueIdentifier      *string            `json:"uniqueIdentifier,omitempty"`
	Uri                   *string            `json:"uri,omitempty"`
}

func (*ArtifactSourceProperties) GetCreatedDateAsTime

func (o *ArtifactSourceProperties) GetCreatedDateAsTime() (*time.Time, error)

func (*ArtifactSourceProperties) SetCreatedDateAsTime

func (o *ArtifactSourceProperties) SetCreatedDateAsTime(input time.Time)

type ArtifactSourcesClient

type ArtifactSourcesClient struct {
	Client *resourcemanager.Client
}

func NewArtifactSourcesClientWithBaseURI

func NewArtifactSourcesClientWithBaseURI(sdkApi sdkEnv.Api) (*ArtifactSourcesClient, error)

func (ArtifactSourcesClient) CreateOrUpdate

CreateOrUpdate ...

func (ArtifactSourcesClient) Delete

Delete ...

func (ArtifactSourcesClient) Get

Get ...

func (ArtifactSourcesClient) List

List ...

func (ArtifactSourcesClient) ListComplete

ListComplete retrieves all the results into a single object

func (ArtifactSourcesClient) ListCompleteMatchingPredicate

func (c ArtifactSourcesClient) ListCompleteMatchingPredicate(ctx context.Context, id LabId, options ListOperationOptions, predicate ArtifactSourceOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ArtifactSourcesClient) Update

Update ...

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type EnableStatus

type EnableStatus string
const (
	EnableStatusDisabled EnableStatus = "Disabled"
	EnableStatusEnabled  EnableStatus = "Enabled"
)

func (*EnableStatus) UnmarshalJSON

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

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

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

func (GetOperationOptions) ToOData

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

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type LabId

type LabId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
}

LabId is a struct representing the Resource ID for a Lab

func NewLabID

func NewLabID(subscriptionId string, resourceGroupName string, labName string) LabId

NewLabID returns a new LabId struct

func ParseLabID

func ParseLabID(input string) (*LabId, error)

ParseLabID parses 'input' into a LabId

func ParseLabIDInsensitively

func ParseLabIDInsensitively(input string) (*LabId, error)

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

func (*LabId) FromParseResult

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

func (LabId) ID

func (id LabId) ID() string

ID returns the formatted Lab ID

func (LabId) Segments

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

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

func (LabId) String

func (id LabId) String() string

String returns a human-readable description of this Lab ID

type ListCompleteResult

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

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 {
	Expand  *string
	Filter  *string
	Orderby *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        *[]ArtifactSource
}

type SourceControlType

type SourceControlType string
const (
	SourceControlTypeGitHub         SourceControlType = "GitHub"
	SourceControlTypeStorageAccount SourceControlType = "StorageAccount"
	SourceControlTypeVsoGit         SourceControlType = "VsoGit"
)

func (*SourceControlType) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ArtifactSource
}

type UpdateResource

type UpdateResource struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

Jump to

Keyboard shortcuts

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