catalogs

package
v0.20240227.1200200 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2023-04-01/catalogs Documentation

The catalogs SDK allows for interaction with the Azure Resource Manager Service devcenter (API Version 2023-04-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-sdk/resource-manager/devcenter/2023-04-01/catalogs"

Client Initialization

client := catalogs.NewCatalogsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CatalogsClient.CreateOrUpdate

ctx := context.TODO()
id := catalogs.NewCatalogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterValue", "catalogValue")

payload := catalogs.Catalog{
	// ...
}


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

Example Usage: CatalogsClient.Delete

ctx := context.TODO()
id := catalogs.NewCatalogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterValue", "catalogValue")

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

Example Usage: CatalogsClient.Get

ctx := context.TODO()
id := catalogs.NewCatalogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterValue", "catalogValue")

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: CatalogsClient.ListByDevCenter

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

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

Example Usage: CatalogsClient.Sync

ctx := context.TODO()
id := catalogs.NewCatalogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterValue", "catalogValue")

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

Example Usage: CatalogsClient.Update

ctx := context.TODO()
id := catalogs.NewCatalogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterValue", "catalogValue")

payload := catalogs.CatalogUpdate{
	// ...
}


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 PossibleValuesForCatalogSyncState

func PossibleValuesForCatalogSyncState() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateCatalogID

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

ValidateCatalogID checks that 'input' can be parsed as a Catalog ID

func ValidateDevCenterID

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

ValidateDevCenterID checks that 'input' can be parsed as a Dev Center ID

Types

type Catalog

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

type CatalogId

type CatalogId struct {
	SubscriptionId    string
	ResourceGroupName string
	DevCenterName     string
	CatalogName       string
}

CatalogId is a struct representing the Resource ID for a Catalog

func NewCatalogID

func NewCatalogID(subscriptionId string, resourceGroupName string, devCenterName string, catalogName string) CatalogId

NewCatalogID returns a new CatalogId struct

func ParseCatalogID

func ParseCatalogID(input string) (*CatalogId, error)

ParseCatalogID parses 'input' into a CatalogId

func ParseCatalogIDInsensitively

func ParseCatalogIDInsensitively(input string) (*CatalogId, error)

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

func (*CatalogId) FromParseResult

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

func (CatalogId) ID

func (id CatalogId) ID() string

ID returns the formatted Catalog ID

func (CatalogId) Segments

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

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

func (CatalogId) String

func (id CatalogId) String() string

String returns a human-readable description of this Catalog ID

type CatalogOperationPredicate

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

func (CatalogOperationPredicate) Matches

func (p CatalogOperationPredicate) Matches(input Catalog) bool

type CatalogProperties

type CatalogProperties struct {
	AdoGit            *GitCatalog        `json:"adoGit,omitempty"`
	GitHub            *GitCatalog        `json:"gitHub,omitempty"`
	LastSyncTime      *string            `json:"lastSyncTime,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	SyncState         *CatalogSyncState  `json:"syncState,omitempty"`
}

func (*CatalogProperties) GetLastSyncTimeAsTime

func (o *CatalogProperties) GetLastSyncTimeAsTime() (*time.Time, error)

func (*CatalogProperties) SetLastSyncTimeAsTime

func (o *CatalogProperties) SetLastSyncTimeAsTime(input time.Time)

type CatalogSyncState

type CatalogSyncState string
const (
	CatalogSyncStateCanceled   CatalogSyncState = "Canceled"
	CatalogSyncStateFailed     CatalogSyncState = "Failed"
	CatalogSyncStateInProgress CatalogSyncState = "InProgress"
	CatalogSyncStateSucceeded  CatalogSyncState = "Succeeded"
)

func (*CatalogSyncState) UnmarshalJSON

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

type CatalogUpdate

type CatalogUpdate struct {
	Properties *CatalogUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
}

type CatalogUpdateProperties

type CatalogUpdateProperties struct {
	AdoGit *GitCatalog `json:"adoGit,omitempty"`
	GitHub *GitCatalog `json:"gitHub,omitempty"`
}

type CatalogsClient

type CatalogsClient struct {
	Client *resourcemanager.Client
}

func NewCatalogsClientWithBaseURI

func NewCatalogsClientWithBaseURI(sdkApi sdkEnv.Api) (*CatalogsClient, error)

func (CatalogsClient) CreateOrUpdate

func (c CatalogsClient) CreateOrUpdate(ctx context.Context, id CatalogId, input Catalog) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (CatalogsClient) CreateOrUpdateThenPoll

func (c CatalogsClient) CreateOrUpdateThenPoll(ctx context.Context, id CatalogId, input Catalog) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (CatalogsClient) Delete

func (c CatalogsClient) Delete(ctx context.Context, id CatalogId) (result DeleteOperationResponse, err error)

Delete ...

func (CatalogsClient) DeleteThenPoll

func (c CatalogsClient) DeleteThenPoll(ctx context.Context, id CatalogId) error

DeleteThenPoll performs Delete then polls until it's completed

func (CatalogsClient) Get

func (c CatalogsClient) Get(ctx context.Context, id CatalogId) (result GetOperationResponse, err error)

Get ...

func (CatalogsClient) ListByDevCenter

ListByDevCenter ...

func (CatalogsClient) ListByDevCenterComplete

ListByDevCenterComplete retrieves all the results into a single object

func (CatalogsClient) ListByDevCenterCompleteMatchingPredicate

func (c CatalogsClient) ListByDevCenterCompleteMatchingPredicate(ctx context.Context, id DevCenterId, options ListByDevCenterOperationOptions, predicate CatalogOperationPredicate) (result ListByDevCenterCompleteResult, err error)

ListByDevCenterCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CatalogsClient) Sync

func (c CatalogsClient) Sync(ctx context.Context, id CatalogId) (result SyncOperationResponse, err error)

Sync ...

func (CatalogsClient) SyncThenPoll

func (c CatalogsClient) SyncThenPoll(ctx context.Context, id CatalogId) error

SyncThenPoll performs Sync then polls until it's completed

func (CatalogsClient) Update

func (c CatalogsClient) Update(ctx context.Context, id CatalogId, input CatalogUpdate) (result UpdateOperationResponse, err error)

Update ...

func (CatalogsClient) UpdateThenPoll

func (c CatalogsClient) UpdateThenPoll(ctx context.Context, id CatalogId, input CatalogUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type DevCenterId

type DevCenterId struct {
	SubscriptionId    string
	ResourceGroupName string
	DevCenterName     string
}

DevCenterId is a struct representing the Resource ID for a Dev Center

func NewDevCenterID

func NewDevCenterID(subscriptionId string, resourceGroupName string, devCenterName string) DevCenterId

NewDevCenterID returns a new DevCenterId struct

func ParseDevCenterID

func ParseDevCenterID(input string) (*DevCenterId, error)

ParseDevCenterID parses 'input' into a DevCenterId

func ParseDevCenterIDInsensitively

func ParseDevCenterIDInsensitively(input string) (*DevCenterId, error)

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

func (*DevCenterId) FromParseResult

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

func (DevCenterId) ID

func (id DevCenterId) ID() string

ID returns the formatted Dev Center ID

func (DevCenterId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Dev Center ID

func (DevCenterId) String

func (id DevCenterId) String() string

String returns a human-readable description of this Dev Center ID

type GetOperationResponse

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

type GitCatalog

type GitCatalog struct {
	Branch           *string `json:"branch,omitempty"`
	Path             *string `json:"path,omitempty"`
	SecretIdentifier *string `json:"secretIdentifier,omitempty"`
	Uri              *string `json:"uri,omitempty"`
}

type ListByDevCenterCompleteResult

type ListByDevCenterCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Catalog
}

type ListByDevCenterOperationOptions

type ListByDevCenterOperationOptions struct {
	Top *int64
}

func DefaultListByDevCenterOperationOptions

func DefaultListByDevCenterOperationOptions() ListByDevCenterOperationOptions

func (ListByDevCenterOperationOptions) ToHeaders

func (ListByDevCenterOperationOptions) ToOData

func (ListByDevCenterOperationOptions) ToQuery

type ListByDevCenterOperationResponse

type ListByDevCenterOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Catalog
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted                  ProvisioningState = "Accepted"
	ProvisioningStateCanceled                  ProvisioningState = "Canceled"
	ProvisioningStateCreated                   ProvisioningState = "Created"
	ProvisioningStateCreating                  ProvisioningState = "Creating"
	ProvisioningStateDeleted                   ProvisioningState = "Deleted"
	ProvisioningStateDeleting                  ProvisioningState = "Deleting"
	ProvisioningStateFailed                    ProvisioningState = "Failed"
	ProvisioningStateMovingResources           ProvisioningState = "MovingResources"
	ProvisioningStateNotSpecified              ProvisioningState = "NotSpecified"
	ProvisioningStateRolloutInProgress         ProvisioningState = "RolloutInProgress"
	ProvisioningStateRunning                   ProvisioningState = "Running"
	ProvisioningStateStorageProvisioningFailed ProvisioningState = "StorageProvisioningFailed"
	ProvisioningStateSucceeded                 ProvisioningState = "Succeeded"
	ProvisioningStateTransientFailure          ProvisioningState = "TransientFailure"
	ProvisioningStateUpdated                   ProvisioningState = "Updated"
	ProvisioningStateUpdating                  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type SyncOperationResponse

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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