managedinstanceoperations

package
v0.20230626.1153114 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2022-11-01-preview/managedinstanceoperations Documentation

The managedinstanceoperations SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2022-11-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-sdk/resource-manager/sql/2022-11-01-preview/managedinstanceoperations"

Client Initialization

client := managedinstanceoperations.NewManagedInstanceOperationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagedInstanceOperationsClient.Cancel

ctx := context.TODO()
id := managedinstanceoperations.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "operationIdValue")

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

Example Usage: ManagedInstanceOperationsClient.Get

ctx := context.TODO()
id := managedinstanceoperations.NewOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue", "operationIdValue")

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: ManagedInstanceOperationsClient.ListByManagedInstance

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

// alternatively `client.ListByManagedInstance(ctx, id)` can be used to do batched pagination
items, err := client.ListByManagedInstanceComplete(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 PossibleValuesForStatus

func PossibleValuesForStatus() []string

func ValidateManagedInstanceID

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

ValidateManagedInstanceID checks that 'input' can be parsed as a Managed Instance ID

func ValidateOperationID

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

ValidateOperationID checks that 'input' can be parsed as a Operation ID

Types

type CancelOperationResponse

type CancelOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

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

type ListByManagedInstanceCompleteResult

type ListByManagedInstanceCompleteResult struct {
	Items []ManagedInstanceOperation
}

type ListByManagedInstanceOperationResponse

type ListByManagedInstanceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagedInstanceOperation
}

type ManagedInstanceId

type ManagedInstanceId struct {
	SubscriptionId      string
	ResourceGroupName   string
	ManagedInstanceName string
}

ManagedInstanceId is a struct representing the Resource ID for a Managed Instance

func NewManagedInstanceID

func NewManagedInstanceID(subscriptionId string, resourceGroupName string, managedInstanceName string) ManagedInstanceId

NewManagedInstanceID returns a new ManagedInstanceId struct

func ParseManagedInstanceID

func ParseManagedInstanceID(input string) (*ManagedInstanceId, error)

ParseManagedInstanceID parses 'input' into a ManagedInstanceId

func ParseManagedInstanceIDInsensitively

func ParseManagedInstanceIDInsensitively(input string) (*ManagedInstanceId, error)

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

func (ManagedInstanceId) ID

func (id ManagedInstanceId) ID() string

ID returns the formatted Managed Instance ID

func (ManagedInstanceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Managed Instance ID

func (ManagedInstanceId) String

func (id ManagedInstanceId) String() string

String returns a human-readable description of this Managed Instance ID

type ManagedInstanceOperation

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

type ManagedInstanceOperationOperationPredicate

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

func (ManagedInstanceOperationOperationPredicate) Matches

type ManagedInstanceOperationParametersPair

type ManagedInstanceOperationParametersPair struct {
	CurrentParameters   *UpsertManagedServerOperationParameters `json:"currentParameters,omitempty"`
	RequestedParameters *UpsertManagedServerOperationParameters `json:"requestedParameters,omitempty"`
}

type ManagedInstanceOperationProperties

type ManagedInstanceOperationProperties struct {
	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"`
	ManagedInstanceName     *string                                 `json:"managedInstanceName,omitempty"`
	Operation               *string                                 `json:"operation,omitempty"`
	OperationFriendlyName   *string                                 `json:"operationFriendlyName,omitempty"`
	OperationParameters     *ManagedInstanceOperationParametersPair `json:"operationParameters,omitempty"`
	OperationSteps          *ManagedInstanceOperationSteps          `json:"operationSteps,omitempty"`
	PercentComplete         *int64                                  `json:"percentComplete,omitempty"`
	StartTime               *string                                 `json:"startTime,omitempty"`
	State                   *ManagementOperationState               `json:"state,omitempty"`
}

func (*ManagedInstanceOperationProperties) GetEstimatedCompletionTimeAsTime

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

func (*ManagedInstanceOperationProperties) GetStartTimeAsTime

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

func (*ManagedInstanceOperationProperties) SetEstimatedCompletionTimeAsTime

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

func (*ManagedInstanceOperationProperties) SetStartTimeAsTime

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

type ManagedInstanceOperationSteps

type ManagedInstanceOperationSteps struct {
	CurrentStep *int64                                                      `json:"currentStep,omitempty"`
	StepsList   *[]UpsertManagedServerOperationStepWithEstimatesAndDuration `json:"stepsList,omitempty"`
	TotalSteps  *string                                                     `json:"totalSteps,omitempty"`
}

type ManagedInstanceOperationsClient

type ManagedInstanceOperationsClient struct {
	Client *resourcemanager.Client
}

func NewManagedInstanceOperationsClientWithBaseURI

func NewManagedInstanceOperationsClientWithBaseURI(api environments.Api) (*ManagedInstanceOperationsClient, error)

func (ManagedInstanceOperationsClient) Cancel

Cancel ...

func (ManagedInstanceOperationsClient) Get

Get ...

func (ManagedInstanceOperationsClient) ListByManagedInstance

ListByManagedInstance ...

func (ManagedInstanceOperationsClient) ListByManagedInstanceComplete

ListByManagedInstanceComplete retrieves all the results into a single object

func (ManagedInstanceOperationsClient) ListByManagedInstanceCompleteMatchingPredicate

func (c ManagedInstanceOperationsClient) ListByManagedInstanceCompleteMatchingPredicate(ctx context.Context, id ManagedInstanceId, predicate ManagedInstanceOperationOperationPredicate) (result ListByManagedInstanceCompleteResult, err error)

ListByManagedInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate

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 OperationId

type OperationId struct {
	SubscriptionId      string
	ResourceGroupName   string
	ManagedInstanceName string
	OperationId         string
}

OperationId is a struct representing the Resource ID for a Operation

func NewOperationID

func NewOperationID(subscriptionId string, resourceGroupName string, managedInstanceName string, operationId string) OperationId

NewOperationID returns a new OperationId struct

func ParseOperationID

func ParseOperationID(input string) (*OperationId, error)

ParseOperationID parses 'input' into a OperationId

func ParseOperationIDInsensitively

func ParseOperationIDInsensitively(input string) (*OperationId, error)

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

func (OperationId) ID

func (id OperationId) ID() string

ID returns the formatted Operation ID

func (OperationId) Segments

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

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

func (OperationId) String

func (id OperationId) String() string

String returns a human-readable description of this Operation ID

type Status

type Status string
const (
	StatusCanceled   Status = "Canceled"
	StatusCompleted  Status = "Completed"
	StatusFailed     Status = "Failed"
	StatusInProgress Status = "InProgress"
	StatusNotStarted Status = "NotStarted"
	StatusSlowedDown Status = "SlowedDown"
)

func (*Status) UnmarshalJSON

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

type UpsertManagedServerOperationParameters

type UpsertManagedServerOperationParameters struct {
	Family          *string `json:"family,omitempty"`
	StorageSizeInGB *int64  `json:"storageSizeInGB,omitempty"`
	Tier            *string `json:"tier,omitempty"`
	VCores          *int64  `json:"vCores,omitempty"`
}

type UpsertManagedServerOperationStepWithEstimatesAndDuration

type UpsertManagedServerOperationStepWithEstimatesAndDuration struct {
	Name          *string `json:"name,omitempty"`
	Order         *int64  `json:"order,omitempty"`
	Status        *Status `json:"status,omitempty"`
	StepEndTime   *string `json:"stepEndTime,omitempty"`
	StepStartTime *string `json:"stepStartTime,omitempty"`
	TimeElapsed   *string `json:"timeElapsed,omitempty"`
}

func (*UpsertManagedServerOperationStepWithEstimatesAndDuration) GetStepEndTimeAsTime

func (*UpsertManagedServerOperationStepWithEstimatesAndDuration) GetStepStartTimeAsTime

func (*UpsertManagedServerOperationStepWithEstimatesAndDuration) SetStepEndTimeAsTime

func (*UpsertManagedServerOperationStepWithEstimatesAndDuration) SetStepStartTimeAsTime

func (o *UpsertManagedServerOperationStepWithEstimatesAndDuration) SetStepStartTimeAsTime(input time.Time)

Jump to

Keyboard shortcuts

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