databaseoperations

package
v0.20230614.1151152 Latest Latest
Warning

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

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

README

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

The databaseoperations SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2021-02-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/2021-02-01-preview/databaseoperations"

Client Initialization

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

Example Usage: DatabaseOperationsClient.Cancel

ctx := context.TODO()
id := databaseoperations.NewDatabaseOperationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "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: DatabaseOperationsClient.ListByDatabase

ctx := context.TODO()
id := databaseoperations.NewDatabaseID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue")

// 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 ValidateDatabaseID

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

ValidateDatabaseID checks that 'input' can be parsed as a Database ID

func ValidateDatabaseOperationID

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

ValidateDatabaseOperationID checks that 'input' can be parsed as a Database Operation ID

Types

type CancelOperationResponse

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

type DatabaseId

type DatabaseId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
}

DatabaseId is a struct representing the Resource ID for a Database

func NewDatabaseID

func NewDatabaseID(subscriptionId string, resourceGroupName string, serverName string, databaseName string) DatabaseId

NewDatabaseID returns a new DatabaseId struct

func ParseDatabaseID

func ParseDatabaseID(input string) (*DatabaseId, error)

ParseDatabaseID parses 'input' into a DatabaseId

func ParseDatabaseIDInsensitively

func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error)

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

func (DatabaseId) ID

func (id DatabaseId) ID() string

ID returns the formatted Database ID

func (DatabaseId) Segments

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

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

func (DatabaseId) String

func (id DatabaseId) String() string

String returns a human-readable description of this Database ID

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 DatabaseOperationId

type DatabaseOperationId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
	OperationId       string
}

DatabaseOperationId is a struct representing the Resource ID for a Database Operation

func NewDatabaseOperationID

func NewDatabaseOperationID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, operationId string) DatabaseOperationId

NewDatabaseOperationID returns a new DatabaseOperationId struct

func ParseDatabaseOperationID

func ParseDatabaseOperationID(input string) (*DatabaseOperationId, error)

ParseDatabaseOperationID parses 'input' into a DatabaseOperationId

func ParseDatabaseOperationIDInsensitively

func ParseDatabaseOperationIDInsensitively(input string) (*DatabaseOperationId, error)

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

func (DatabaseOperationId) ID

func (id DatabaseOperationId) ID() string

ID returns the formatted Database Operation ID

func (DatabaseOperationId) Segments

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

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

func (DatabaseOperationId) String

func (id DatabaseOperationId) String() string

String returns a human-readable description of this Database Operation ID

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"`
	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(api environments.Api) (*DatabaseOperationsClient, error)

func (DatabaseOperationsClient) Cancel

Cancel ...

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 DatabaseId, predicate DatabaseOperationOperationPredicate) (result ListByDatabaseCompleteResult, err error)

ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListByDatabaseCompleteResult

type ListByDatabaseCompleteResult struct {
	Items []DatabaseOperation
}

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

Jump to

Keyboard shortcuts

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