artifacts

package
v0.20240521.1091020 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MPL-2.0 Imports: 13 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) FromParseResult

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

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

type ArtifactsClient struct {
	Client *resourcemanager.Client
}

func NewArtifactsClientWithBaseURI

func NewArtifactsClientWithBaseURI(sdkApi sdkEnv.Api) (*ArtifactsClient, error)

func (ArtifactsClient) GenerateArmTemplate

GenerateArmTemplate ...

func (ArtifactsClient) Get

Get ...

func (ArtifactsClient) List

List ...

func (ArtifactsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ArtifactsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type FileUploadOptions

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

func (*FileUploadOptions) UnmarshalJSON

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

type GenerateArmTemplateOperationResponse

type GenerateArmTemplateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	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

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        *Artifact
}

type ListCompleteResult

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

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

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