catalogs

package
v0.20241009.1142232 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/devcenter/2024-02-01/catalogs Documentation

The catalogs SDK allows for interaction with Azure Resource Manager devcenter (API Version 2024-02-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/2024-02-01/catalogs"

Client Initialization

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

Example Usage: CatalogsClient.Connect

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

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

Example Usage: CatalogsClient.CreateOrUpdate

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

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


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

Example Usage: CatalogsClient.Delete

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

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

Example Usage: CatalogsClient.Get

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

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.GetSyncErrorDetails

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

read, err := client.GetSyncErrorDetails(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", "devCenterName")

// 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.NewDevCenterCatalogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "devCenterName", "catalogName")

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

Example Usage: CatalogsClient.Update

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

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 PossibleValuesForCatalogConnectionState

func PossibleValuesForCatalogConnectionState() []string

func PossibleValuesForCatalogItemType

func PossibleValuesForCatalogItemType() []string

func PossibleValuesForCatalogSyncState

func PossibleValuesForCatalogSyncState() []string

func PossibleValuesForCatalogSyncType

func PossibleValuesForCatalogSyncType() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateDevCenterCatalogID

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

ValidateDevCenterCatalogID checks that 'input' can be parsed as a Dev Center 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 CatalogConflictError

type CatalogConflictError struct {
	Name *string `json:"name,omitempty"`
	Path *string `json:"path,omitempty"`
}

type CatalogConnectionState

type CatalogConnectionState string
const (
	CatalogConnectionStateConnected    CatalogConnectionState = "Connected"
	CatalogConnectionStateDisconnected CatalogConnectionState = "Disconnected"
)

func (*CatalogConnectionState) UnmarshalJSON

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

type CatalogErrorDetails

type CatalogErrorDetails struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

type CatalogItemType

type CatalogItemType string
const (
	CatalogItemTypeEnvironmentDefinition CatalogItemType = "EnvironmentDefinition"
)

func (*CatalogItemType) UnmarshalJSON

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

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"`
	ConnectionState    *CatalogConnectionState `json:"connectionState,omitempty"`
	GitHub             *GitCatalog             `json:"gitHub,omitempty"`
	LastConnectionTime *string                 `json:"lastConnectionTime,omitempty"`
	LastSyncStats      *SyncStats              `json:"lastSyncStats,omitempty"`
	LastSyncTime       *string                 `json:"lastSyncTime,omitempty"`
	ProvisioningState  *ProvisioningState      `json:"provisioningState,omitempty"`
	SyncState          *CatalogSyncState       `json:"syncState,omitempty"`
	SyncType           *CatalogSyncType        `json:"syncType,omitempty"`
	Tags               *map[string]string      `json:"tags,omitempty"`
}

func (*CatalogProperties) GetLastConnectionTimeAsTime

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

func (*CatalogProperties) GetLastSyncTimeAsTime

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

func (*CatalogProperties) SetLastConnectionTimeAsTime

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

func (*CatalogProperties) SetLastSyncTimeAsTime

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

type CatalogSyncError

type CatalogSyncError struct {
	ErrorDetails *[]CatalogErrorDetails `json:"errorDetails,omitempty"`
	Path         *string                `json:"path,omitempty"`
}

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 CatalogSyncType

type CatalogSyncType string
const (
	CatalogSyncTypeManual    CatalogSyncType = "Manual"
	CatalogSyncTypeScheduled CatalogSyncType = "Scheduled"
)

func (*CatalogSyncType) UnmarshalJSON

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

type CatalogUpdate

type CatalogUpdate struct {
	Properties *CatalogUpdateProperties `json:"properties,omitempty"`
}

type CatalogUpdateProperties

type CatalogUpdateProperties struct {
	AdoGit   *GitCatalog        `json:"adoGit,omitempty"`
	GitHub   *GitCatalog        `json:"gitHub,omitempty"`
	SyncType *CatalogSyncType   `json:"syncType,omitempty"`
	Tags     *map[string]string `json:"tags,omitempty"`
}

type CatalogsClient

type CatalogsClient struct {
	Client *resourcemanager.Client
}

func NewCatalogsClientWithBaseURI

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

func (CatalogsClient) Connect

Connect ...

func (CatalogsClient) ConnectThenPoll

func (c CatalogsClient) ConnectThenPoll(ctx context.Context, id DevCenterCatalogId) error

ConnectThenPoll performs Connect then polls until it's completed

func (CatalogsClient) CreateOrUpdate

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

CreateOrUpdate ...

func (CatalogsClient) CreateOrUpdateThenPoll

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

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (CatalogsClient) Delete

Delete ...

func (CatalogsClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (CatalogsClient) Get

Get ...

func (CatalogsClient) GetSyncErrorDetails

func (c CatalogsClient) GetSyncErrorDetails(ctx context.Context, id DevCenterCatalogId) (result GetSyncErrorDetailsOperationResponse, err error)

GetSyncErrorDetails ...

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

Sync ...

func (CatalogsClient) SyncThenPoll

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

SyncThenPoll performs Sync then polls until it's completed

func (CatalogsClient) Update

Update ...

func (CatalogsClient) UpdateThenPoll

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

UpdateThenPoll performs Update then polls until it's completed

type ConnectOperationResponse

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

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 DevCenterCatalogId

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

DevCenterCatalogId is a struct representing the Resource ID for a Dev Center Catalog

func NewDevCenterCatalogID

func NewDevCenterCatalogID(subscriptionId string, resourceGroupName string, devCenterName string, catalogName string) DevCenterCatalogId

NewDevCenterCatalogID returns a new DevCenterCatalogId struct

func ParseDevCenterCatalogID

func ParseDevCenterCatalogID(input string) (*DevCenterCatalogId, error)

ParseDevCenterCatalogID parses 'input' into a DevCenterCatalogId

func ParseDevCenterCatalogIDInsensitively

func ParseDevCenterCatalogIDInsensitively(input string) (*DevCenterCatalogId, error)

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

func (*DevCenterCatalogId) FromParseResult

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

func (DevCenterCatalogId) ID

func (id DevCenterCatalogId) ID() string

ID returns the formatted Dev Center Catalog ID

func (DevCenterCatalogId) Segments

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

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

func (DevCenterCatalogId) String

func (id DevCenterCatalogId) String() string

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

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 GetSyncErrorDetailsOperationResponse

type GetSyncErrorDetailsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SyncErrorDetails
}

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 ListByDevCenterCustomPager added in v0.20240628.1153531

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

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 SyncErrorDetails

type SyncErrorDetails struct {
	Conflicts      *[]CatalogConflictError `json:"conflicts,omitempty"`
	Errors         *[]CatalogSyncError     `json:"errors,omitempty"`
	OperationError *CatalogErrorDetails    `json:"operationError,omitempty"`
}

type SyncOperationResponse

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

type SyncStats

type SyncStats struct {
	Added                  *int64             `json:"added,omitempty"`
	Removed                *int64             `json:"removed,omitempty"`
	SyncedCatalogItemTypes *[]CatalogItemType `json:"syncedCatalogItemTypes,omitempty"`
	SynchronizationErrors  *int64             `json:"synchronizationErrors,omitempty"`
	Unchanged              *int64             `json:"unchanged,omitempty"`
	Updated                *int64             `json:"updated,omitempty"`
	ValidationErrors       *int64             `json:"validationErrors,omitempty"`
}

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