artifacts

package
v0.20230427.1100316 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

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

The artifacts 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/artifacts"

Client Initialization

client := artifacts.NewArtifactsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ArtifactsClient.GenerateArmTemplate

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

payload := artifacts.GenerateArmTemplateRequest{
	// ...
}


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

Example Usage: ArtifactsClient.Get

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

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

Example Usage: ArtifactsClient.List

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

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

func PossibleValuesForFileUploadOptions() []string

func ValidateArtifactID

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

ValidateArtifactID checks that 'input' can be parsed as a Artifact ID

func ValidateArtifactSourceID

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

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

Types

type ArmTemplateInfo

type ArmTemplateInfo struct {
	Parameters *interface{} `json:"parameters,omitempty"`
	Template   *interface{} `json:"template,omitempty"`
}

type Artifact

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

type ArtifactId

type ArtifactId struct {
	SubscriptionId     string
	ResourceGroupName  string
	LabName            string
	ArtifactSourceName string
	ArtifactName       string
}

ArtifactId is a struct representing the Resource ID for a Artifact

func NewArtifactID

func NewArtifactID(subscriptionId string, resourceGroupName string, labName string, artifactSourceName string, artifactName string) ArtifactId

NewArtifactID returns a new ArtifactId struct

func ParseArtifactID

func ParseArtifactID(input string) (*ArtifactId, error)

ParseArtifactID parses 'input' into a ArtifactId

func ParseArtifactIDInsensitively

func ParseArtifactIDInsensitively(input string) (*ArtifactId, error)

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

func (ArtifactId) ID

func (id ArtifactId) ID() string

ID returns the formatted Artifact ID

func (ArtifactId) Segments

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

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

func (ArtifactId) String

func (id ArtifactId) String() string

String returns a human-readable description of this Artifact ID

type ArtifactOperationPredicate

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

func (ArtifactOperationPredicate) Matches

func (p ArtifactOperationPredicate) Matches(input Artifact) bool

type ArtifactProperties

type ArtifactProperties struct {
	CreatedDate  *string      `json:"createdDate,omitempty"`
	Description  *string      `json:"description,omitempty"`
	FilePath     *string      `json:"filePath,omitempty"`
	Icon         *string      `json:"icon,omitempty"`
	Parameters   *interface{} `json:"parameters,omitempty"`
	Publisher    *string      `json:"publisher,omitempty"`
	TargetOsType *string      `json:"targetOsType,omitempty"`
	Title        *string      `json:"title,omitempty"`
}

func (*ArtifactProperties) GetCreatedDateAsTime

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

func (*ArtifactProperties) SetCreatedDateAsTime

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

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) 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 ArtifactsClient

type ArtifactsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewArtifactsClientWithBaseURI

func NewArtifactsClientWithBaseURI(endpoint string) ArtifactsClient

func (ArtifactsClient) GenerateArmTemplate

GenerateArmTemplate ...

func (ArtifactsClient) Get

Get ...

func (ArtifactsClient) List

List ...

func (ArtifactsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (ArtifactsClient) ListCompleteMatchingPredicate

func (c ArtifactsClient) ListCompleteMatchingPredicate(ctx context.Context, id ArtifactSourceId, options ListOperationOptions, predicate ArtifactOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type FileUploadOptions

type FileUploadOptions string
const (
	FileUploadOptionsNone                            FileUploadOptions = "None"
	FileUploadOptionsUploadFilesAndGenerateSasTokens FileUploadOptions = "UploadFilesAndGenerateSasTokens"
)

type GenerateArmTemplateOperationResponse

type GenerateArmTemplateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ArmTemplateInfo
}

type GenerateArmTemplateRequest

type GenerateArmTemplateRequest struct {
	FileUploadOptions  *FileUploadOptions `json:"fileUploadOptions,omitempty"`
	Location           *string            `json:"location,omitempty"`
	Parameters         *[]ParameterInfo   `json:"parameters,omitempty"`
	VirtualMachineName *string            `json:"virtualMachineName,omitempty"`
}

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Artifact
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []Artifact
}

type ListOperationOptions

type ListOperationOptions struct {
	Expand  *string
	Filter  *string
	Orderby *string
	Top     *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Artifact
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type ParameterInfo

type ParameterInfo struct {
	Name  *string `json:"name,omitempty"`
	Value *string `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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