galleries

package
v0.20240903.1131440 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/galleries Documentation

The galleries SDK allows for interaction with the Azure Resource Manager Service compute (API Version 2021-07-01).

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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/galleries"

Client Initialization

client := galleries.NewGalleriesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GalleriesClient.CreateOrUpdate

ctx := context.TODO()
id := commonids.NewSharedImageGalleryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "galleryValue")

payload := galleries.Gallery{
	// ...
}


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

Example Usage: GalleriesClient.Delete

ctx := context.TODO()
id := commonids.NewSharedImageGalleryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "galleryValue")

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

Example Usage: GalleriesClient.Get

ctx := context.TODO()
id := commonids.NewSharedImageGalleryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "galleryValue")

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

Example Usage: GalleriesClient.List

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// 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: GalleriesClient.ListByResourceGroup

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

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

Example Usage: GalleriesClient.Update

ctx := context.TODO()
id := commonids.NewSharedImageGalleryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "galleryValue")

payload := galleries.GalleryUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForGallerySharingPermissionTypes

func PossibleValuesForGallerySharingPermissionTypes() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForSelectPermissions

func PossibleValuesForSelectPermissions() []string

func PossibleValuesForSharingProfileGroupTypes

func PossibleValuesForSharingProfileGroupTypes() []string

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GalleriesClient

type GalleriesClient struct {
	Client *resourcemanager.Client
}

func NewGalleriesClientWithBaseURI

func NewGalleriesClientWithBaseURI(sdkApi sdkEnv.Api) (*GalleriesClient, error)

func (GalleriesClient) CreateOrUpdate

CreateOrUpdate ...

func (GalleriesClient) CreateOrUpdateThenPoll

func (c GalleriesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SharedImageGalleryId, input Gallery) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (GalleriesClient) Delete

Delete ...

func (GalleriesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (GalleriesClient) Get

Get ...

func (GalleriesClient) List

List ...

func (GalleriesClient) ListByResourceGroup

ListByResourceGroup ...

func (GalleriesClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (GalleriesClient) ListByResourceGroupCompleteMatchingPredicate

func (c GalleriesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate GalleryOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (GalleriesClient) ListComplete

ListComplete retrieves all the results into a single object

func (GalleriesClient) ListCompleteMatchingPredicate

func (c GalleriesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate GalleryOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (GalleriesClient) Update

Update ...

func (GalleriesClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

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

type GalleryIdentifier

type GalleryIdentifier struct {
	UniqueName *string `json:"uniqueName,omitempty"`
}

type GalleryOperationPredicate

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

func (GalleryOperationPredicate) Matches

func (p GalleryOperationPredicate) Matches(input Gallery) bool

type GalleryProperties

type GalleryProperties struct {
	Description       *string            `json:"description,omitempty"`
	Identifier        *GalleryIdentifier `json:"identifier,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	SharingProfile    *SharingProfile    `json:"sharingProfile,omitempty"`
	SoftDeletePolicy  *SoftDeletePolicy  `json:"softDeletePolicy,omitempty"`
}

type GallerySharingPermissionTypes

type GallerySharingPermissionTypes string
const (
	GallerySharingPermissionTypesGroups  GallerySharingPermissionTypes = "Groups"
	GallerySharingPermissionTypesPrivate GallerySharingPermissionTypes = "Private"
)

func (*GallerySharingPermissionTypes) UnmarshalJSON

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

type GalleryUpdate

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

type GetOperationOptions

type GetOperationOptions struct {
	Select *SelectPermissions
}

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Gallery
}

type ListByResourceGroupCustomPager added in v0.20240628.1153531

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

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Gallery
}

type ListCompleteResult

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

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateMigrating ProvisioningState = "Migrating"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type SelectPermissions

type SelectPermissions string
const (
	SelectPermissionsPermissions SelectPermissions = "Permissions"
)

func (*SelectPermissions) UnmarshalJSON

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

type SharingProfile

type SharingProfile struct {
	Groups      *[]SharingProfileGroup         `json:"groups,omitempty"`
	Permissions *GallerySharingPermissionTypes `json:"permissions,omitempty"`
}

type SharingProfileGroup

type SharingProfileGroup struct {
	Ids  *[]string                 `json:"ids,omitempty"`
	Type *SharingProfileGroupTypes `json:"type,omitempty"`
}

type SharingProfileGroupTypes

type SharingProfileGroupTypes string
const (
	SharingProfileGroupTypesAADTenants    SharingProfileGroupTypes = "AADTenants"
	SharingProfileGroupTypesSubscriptions SharingProfileGroupTypes = "Subscriptions"
)

func (*SharingProfileGroupTypes) UnmarshalJSON

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

type SoftDeletePolicy

type SoftDeletePolicy struct {
	IsSoftDeleteEnabled *bool `json:"isSoftDeleteEnabled,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Gallery
}

Jump to

Keyboard shortcuts

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