archives

package
v0.20240923.1142107 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

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

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

Client Initialization

client := archives.NewArchivesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ArchivesClient.Create

ctx := context.TODO()
id := archives.NewArchiveID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryName", "packageType", "archiveName")

payload := archives.Archive{
	// ...
}


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

Example Usage: ArchivesClient.Delete

ctx := context.TODO()
id := archives.NewArchiveID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryName", "packageType", "archiveName")

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

Example Usage: ArchivesClient.Get

ctx := context.TODO()
id := archives.NewArchiveID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryName", "packageType", "archiveName")

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: ArchivesClient.List

ctx := context.TODO()
id := archives.NewPackageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryName", "packageType")

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

Example Usage: ArchivesClient.Update

ctx := context.TODO()
id := archives.NewArchiveID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryName", "packageType", "archiveName")

payload := archives.ArchiveUpdateParameters{
	// ...
}


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 PossibleValuesForPackageSourceType

func PossibleValuesForPackageSourceType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateArchiveID

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

ValidateArchiveID checks that 'input' can be parsed as a Archive ID

func ValidatePackageID

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

ValidatePackageID checks that 'input' can be parsed as a Package ID

Types

type Archive

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

type ArchiveId

type ArchiveId struct {
	SubscriptionId    string
	ResourceGroupName string
	RegistryName      string
	PackageName       string
	ArchiveName       string
}

ArchiveId is a struct representing the Resource ID for a Archive

func NewArchiveID

func NewArchiveID(subscriptionId string, resourceGroupName string, registryName string, packageName string, archiveName string) ArchiveId

NewArchiveID returns a new ArchiveId struct

func ParseArchiveID

func ParseArchiveID(input string) (*ArchiveId, error)

ParseArchiveID parses 'input' into a ArchiveId

func ParseArchiveIDInsensitively

func ParseArchiveIDInsensitively(input string) (*ArchiveId, error)

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

func (*ArchiveId) FromParseResult

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

func (ArchiveId) ID

func (id ArchiveId) ID() string

ID returns the formatted Archive ID

func (ArchiveId) Segments

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

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

func (ArchiveId) String

func (id ArchiveId) String() string

String returns a human-readable description of this Archive ID

type ArchiveOperationPredicate

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

func (ArchiveOperationPredicate) Matches

func (p ArchiveOperationPredicate) Matches(input Archive) bool

type ArchivePackageSourceProperties

type ArchivePackageSourceProperties struct {
	Type *PackageSourceType `json:"type,omitempty"`
	Url  *string            `json:"url,omitempty"`
}

type ArchiveProperties

type ArchiveProperties struct {
	PackageSource            *ArchivePackageSourceProperties `json:"packageSource,omitempty"`
	ProvisioningState        *ProvisioningState              `json:"provisioningState,omitempty"`
	PublishedVersion         *string                         `json:"publishedVersion,omitempty"`
	RepositoryEndpoint       *string                         `json:"repositoryEndpoint,omitempty"`
	RepositoryEndpointPrefix *string                         `json:"repositoryEndpointPrefix,omitempty"`
}

type ArchiveUpdateParameters

type ArchiveUpdateParameters struct {
	Properties *ArchiveUpdateProperties `json:"properties,omitempty"`
}

type ArchiveUpdateProperties

type ArchiveUpdateProperties struct {
	PublishedVersion *string `json:"publishedVersion,omitempty"`
}

type ArchivesClient

type ArchivesClient struct {
	Client *resourcemanager.Client
}

func NewArchivesClientWithBaseURI

func NewArchivesClientWithBaseURI(sdkApi sdkEnv.Api) (*ArchivesClient, error)

func (ArchivesClient) Create

func (c ArchivesClient) Create(ctx context.Context, id ArchiveId, input Archive) (result CreateOperationResponse, err error)

Create ...

func (ArchivesClient) CreateThenPoll

func (c ArchivesClient) CreateThenPoll(ctx context.Context, id ArchiveId, input Archive) error

CreateThenPoll performs Create then polls until it's completed

func (ArchivesClient) Delete

func (c ArchivesClient) Delete(ctx context.Context, id ArchiveId) (result DeleteOperationResponse, err error)

Delete ...

func (ArchivesClient) DeleteThenPoll

func (c ArchivesClient) DeleteThenPoll(ctx context.Context, id ArchiveId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ArchivesClient) Get

func (c ArchivesClient) Get(ctx context.Context, id ArchiveId) (result GetOperationResponse, err error)

Get ...

func (ArchivesClient) List

func (c ArchivesClient) List(ctx context.Context, id PackageId) (result ListOperationResponse, err error)

List ...

func (ArchivesClient) ListComplete

func (c ArchivesClient) ListComplete(ctx context.Context, id PackageId) (ListCompleteResult, error)

ListComplete retrieves all the results into a single object

func (ArchivesClient) ListCompleteMatchingPredicate

func (c ArchivesClient) ListCompleteMatchingPredicate(ctx context.Context, id PackageId, predicate ArchiveOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ArchivesClient) Update

Update ...

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Archive
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

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

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Archive
}

type PackageId

type PackageId struct {
	SubscriptionId    string
	ResourceGroupName string
	RegistryName      string
	PackageName       string
}

PackageId is a struct representing the Resource ID for a Package

func NewPackageID

func NewPackageID(subscriptionId string, resourceGroupName string, registryName string, packageName string) PackageId

NewPackageID returns a new PackageId struct

func ParsePackageID

func ParsePackageID(input string) (*PackageId, error)

ParsePackageID parses 'input' into a PackageId

func ParsePackageIDInsensitively

func ParsePackageIDInsensitively(input string) (*PackageId, error)

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

func (*PackageId) FromParseResult

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

func (PackageId) ID

func (id PackageId) ID() string

ID returns the formatted Package ID

func (PackageId) Segments

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

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

func (PackageId) String

func (id PackageId) String() string

String returns a human-readable description of this Package ID

type PackageSourceType

type PackageSourceType string
const (
	PackageSourceTypeRemote PackageSourceType = "remote"
)

func (*PackageSourceType) UnmarshalJSON

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

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 UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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