projectcatalogs

package
v0.20240521.1173452 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: 15 Imported by: 0

README

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

The projectcatalogs SDK allows for interaction with the Azure Resource Manager Service 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/projectcatalogs"

Client Initialization

client := projectcatalogs.NewProjectCatalogsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ProjectCatalogsClient.Connect

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

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

Example Usage: ProjectCatalogsClient.CreateOrUpdate

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

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


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

Example Usage: ProjectCatalogsClient.Delete

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

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

Example Usage: ProjectCatalogsClient.Get

ctx := context.TODO()
id := projectcatalogs.NewCatalogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "projectValue", "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: ProjectCatalogsClient.GetSyncErrorDetails

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

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

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

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

Example Usage: ProjectCatalogsClient.Patch

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

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


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

Example Usage: ProjectCatalogsClient.Sync

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

if err := client.SyncThenPoll(ctx, id); 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 ValidateCatalogID

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

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

func ValidateProjectID

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

ValidateProjectID checks that 'input' can be parsed as a Project 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 CatalogId

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

CatalogId is a struct representing the Resource ID for a Catalog

func NewCatalogID

func NewCatalogID(subscriptionId string, resourceGroupName string, projectName 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 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 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 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 ListCompleteResult

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

type ListOperationOptions

type ListOperationOptions struct {
	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        *[]Catalog
}

type PatchOperationResponse

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

type ProjectCatalogsClient

type ProjectCatalogsClient struct {
	Client *resourcemanager.Client
}

func NewProjectCatalogsClientWithBaseURI

func NewProjectCatalogsClientWithBaseURI(sdkApi sdkEnv.Api) (*ProjectCatalogsClient, error)

func (ProjectCatalogsClient) Connect

Connect ...

func (ProjectCatalogsClient) ConnectThenPoll

func (c ProjectCatalogsClient) ConnectThenPoll(ctx context.Context, id CatalogId) error

ConnectThenPoll performs Connect then polls until it's completed

func (ProjectCatalogsClient) CreateOrUpdate

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

CreateOrUpdate ...

func (ProjectCatalogsClient) CreateOrUpdateThenPoll

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

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ProjectCatalogsClient) Delete

Delete ...

func (ProjectCatalogsClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (ProjectCatalogsClient) Get

Get ...

func (ProjectCatalogsClient) GetSyncErrorDetails

func (c ProjectCatalogsClient) GetSyncErrorDetails(ctx context.Context, id CatalogId) (result GetSyncErrorDetailsOperationResponse, err error)

GetSyncErrorDetails ...

func (ProjectCatalogsClient) List

List ...

func (ProjectCatalogsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ProjectCatalogsClient) ListCompleteMatchingPredicate

func (c ProjectCatalogsClient) ListCompleteMatchingPredicate(ctx context.Context, id ProjectId, options ListOperationOptions, predicate CatalogOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ProjectCatalogsClient) Patch

Patch ...

func (ProjectCatalogsClient) PatchThenPoll

func (c ProjectCatalogsClient) PatchThenPoll(ctx context.Context, id CatalogId, input CatalogUpdate) error

PatchThenPoll performs Patch then polls until it's completed

func (ProjectCatalogsClient) Sync

Sync ...

func (ProjectCatalogsClient) SyncThenPoll

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

SyncThenPoll performs Sync then polls until it's completed

type ProjectId

type ProjectId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProjectName       string
}

ProjectId is a struct representing the Resource ID for a Project

func NewProjectID

func NewProjectID(subscriptionId string, resourceGroupName string, projectName string) ProjectId

NewProjectID returns a new ProjectId struct

func ParseProjectID

func ParseProjectID(input string) (*ProjectId, error)

ParseProjectID parses 'input' into a ProjectId

func ParseProjectIDInsensitively

func ParseProjectIDInsensitively(input string) (*ProjectId, error)

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

func (*ProjectId) FromParseResult

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

func (ProjectId) ID

func (id ProjectId) ID() string

ID returns the formatted Project ID

func (ProjectId) Segments

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

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

func (ProjectId) String

func (id ProjectId) String() string

String returns a human-readable description of this Project ID

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"`
}

Jump to

Keyboard shortcuts

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