databaseoperations

package
v0.20241104.1140654 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databaseoperations Documentation

The databaseoperations SDK allows for interaction with Azure Resource Manager sql (API Version 2023-08-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/databaseoperations"

Client Initialization

client := databaseoperations.NewDatabaseOperationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DatabaseOperationsClient.ListByDatabase

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForManagementOperationState

func PossibleValuesForManagementOperationState() []string

func PossibleValuesForPhase

func PossibleValuesForPhase() []string

Types

type DatabaseOperation

type DatabaseOperation struct {
	Id         *string                      `json:"id,omitempty"`
	Name       *string                      `json:"name,omitempty"`
	Properties *DatabaseOperationProperties `json:"properties,omitempty"`
	Type       *string                      `json:"type,omitempty"`
}

type DatabaseOperationOperationPredicate

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

func (DatabaseOperationOperationPredicate) Matches

type DatabaseOperationProperties

type DatabaseOperationProperties struct {
	DatabaseName            *string                   `json:"databaseName,omitempty"`
	Description             *string                   `json:"description,omitempty"`
	ErrorCode               *int64                    `json:"errorCode,omitempty"`
	ErrorDescription        *string                   `json:"errorDescription,omitempty"`
	ErrorSeverity           *int64                    `json:"errorSeverity,omitempty"`
	EstimatedCompletionTime *string                   `json:"estimatedCompletionTime,omitempty"`
	IsCancellable           *bool                     `json:"isCancellable,omitempty"`
	IsUserError             *bool                     `json:"isUserError,omitempty"`
	Operation               *string                   `json:"operation,omitempty"`
	OperationFriendlyName   *string                   `json:"operationFriendlyName,omitempty"`
	OperationPhaseDetails   *PhaseDetails             `json:"operationPhaseDetails,omitempty"`
	PercentComplete         *int64                    `json:"percentComplete,omitempty"`
	ServerName              *string                   `json:"serverName,omitempty"`
	StartTime               *string                   `json:"startTime,omitempty"`
	State                   *ManagementOperationState `json:"state,omitempty"`
}

func (*DatabaseOperationProperties) GetEstimatedCompletionTimeAsTime

func (o *DatabaseOperationProperties) GetEstimatedCompletionTimeAsTime() (*time.Time, error)

func (*DatabaseOperationProperties) GetStartTimeAsTime

func (o *DatabaseOperationProperties) GetStartTimeAsTime() (*time.Time, error)

func (*DatabaseOperationProperties) SetEstimatedCompletionTimeAsTime

func (o *DatabaseOperationProperties) SetEstimatedCompletionTimeAsTime(input time.Time)

func (*DatabaseOperationProperties) SetStartTimeAsTime

func (o *DatabaseOperationProperties) SetStartTimeAsTime(input time.Time)

type DatabaseOperationsClient

type DatabaseOperationsClient struct {
	Client *resourcemanager.Client
}

func NewDatabaseOperationsClientWithBaseURI

func NewDatabaseOperationsClientWithBaseURI(sdkApi sdkEnv.Api) (*DatabaseOperationsClient, error)

func (DatabaseOperationsClient) ListByDatabase

ListByDatabase ...

func (DatabaseOperationsClient) ListByDatabaseComplete

ListByDatabaseComplete retrieves all the results into a single object

func (DatabaseOperationsClient) ListByDatabaseCompleteMatchingPredicate

func (c DatabaseOperationsClient) ListByDatabaseCompleteMatchingPredicate(ctx context.Context, id commonids.SqlDatabaseId, predicate DatabaseOperationOperationPredicate) (result ListByDatabaseCompleteResult, err error)

ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListByDatabaseCompleteResult

type ListByDatabaseCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DatabaseOperation
}

type ListByDatabaseCustomPager

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

type ListByDatabaseOperationResponse

type ListByDatabaseOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DatabaseOperation
}

type ManagementOperationState

type ManagementOperationState string
const (
	ManagementOperationStateCancelInProgress ManagementOperationState = "CancelInProgress"
	ManagementOperationStateCancelled        ManagementOperationState = "Cancelled"
	ManagementOperationStateFailed           ManagementOperationState = "Failed"
	ManagementOperationStateInProgress       ManagementOperationState = "InProgress"
	ManagementOperationStatePending          ManagementOperationState = "Pending"
	ManagementOperationStateSucceeded        ManagementOperationState = "Succeeded"
)

func (*ManagementOperationState) UnmarshalJSON

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

type Phase

type Phase string
const (
	PhaseCatchup           Phase = "Catchup"
	PhaseCopying           Phase = "Copying"
	PhaseCutoverInProgress Phase = "CutoverInProgress"
	PhaseWaitingForCutover Phase = "WaitingForCutover"
)

func (*Phase) UnmarshalJSON

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

type PhaseDetails

type PhaseDetails struct {
	Phase            *Phase             `json:"phase,omitempty"`
	PhaseInformation *map[string]string `json:"phaseInformation,omitempty"`
}

Jump to

Keyboard shortcuts

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