deletedservers

package
v0.20231213.1165453 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

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

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

Client Initialization

client := deletedservers.NewDeletedServersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DeletedServersClient.Get

ctx := context.TODO()
id := deletedservers.NewDeletedServerID("12345678-1234-9876-4563-123456789012", "locationValue", "deletedServerValue")

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

ctx := context.TODO()
id := deletedservers.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: DeletedServersClient.ListByLocation

ctx := context.TODO()
id := deletedservers.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")

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

Example Usage: DeletedServersClient.Recover

ctx := context.TODO()
id := deletedservers.NewDeletedServerID("12345678-1234-9876-4563-123456789012", "locationValue", "deletedServerValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateDeletedServerID

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

ValidateDeletedServerID checks that 'input' can be parsed as a Deleted Server ID

func ValidateLocationID

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

ValidateLocationID checks that 'input' can be parsed as a Location ID

Types

type DeletedServer

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

type DeletedServerId

type DeletedServerId struct {
	SubscriptionId    string
	LocationName      string
	DeletedServerName string
}

DeletedServerId is a struct representing the Resource ID for a Deleted Server

func NewDeletedServerID

func NewDeletedServerID(subscriptionId string, locationName string, deletedServerName string) DeletedServerId

NewDeletedServerID returns a new DeletedServerId struct

func ParseDeletedServerID

func ParseDeletedServerID(input string) (*DeletedServerId, error)

ParseDeletedServerID parses 'input' into a DeletedServerId

func ParseDeletedServerIDInsensitively

func ParseDeletedServerIDInsensitively(input string) (*DeletedServerId, error)

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

func (*DeletedServerId) FromParseResult added in v0.20231127.1171502

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

func (DeletedServerId) ID

func (id DeletedServerId) ID() string

ID returns the formatted Deleted Server ID

func (DeletedServerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Deleted Server ID

func (DeletedServerId) String

func (id DeletedServerId) String() string

String returns a human-readable description of this Deleted Server ID

type DeletedServerOperationPredicate

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

func (DeletedServerOperationPredicate) Matches

type DeletedServerProperties

type DeletedServerProperties struct {
	DeletionTime             *string `json:"deletionTime,omitempty"`
	FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"`
	OriginalId               *string `json:"originalId,omitempty"`
	Version                  *string `json:"version,omitempty"`
}

func (*DeletedServerProperties) GetDeletionTimeAsTime

func (o *DeletedServerProperties) GetDeletionTimeAsTime() (*time.Time, error)

func (*DeletedServerProperties) SetDeletionTimeAsTime

func (o *DeletedServerProperties) SetDeletionTimeAsTime(input time.Time)

type DeletedServersClient

type DeletedServersClient struct {
	Client *resourcemanager.Client
}

func NewDeletedServersClientWithBaseURI

func NewDeletedServersClientWithBaseURI(sdkApi sdkEnv.Api) (*DeletedServersClient, error)

func (DeletedServersClient) Get

Get ...

func (DeletedServersClient) List

List ...

func (DeletedServersClient) ListByLocation

func (c DeletedServersClient) ListByLocation(ctx context.Context, id LocationId) (result ListByLocationOperationResponse, err error)

ListByLocation ...

func (DeletedServersClient) ListByLocationComplete

ListByLocationComplete retrieves all the results into a single object

func (DeletedServersClient) ListByLocationCompleteMatchingPredicate

func (c DeletedServersClient) ListByLocationCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate DeletedServerOperationPredicate) (result ListByLocationCompleteResult, err error)

ListByLocationCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DeletedServersClient) ListComplete

ListComplete retrieves all the results into a single object

func (DeletedServersClient) ListCompleteMatchingPredicate

func (c DeletedServersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DeletedServerOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DeletedServersClient) Recover

Recover ...

func (DeletedServersClient) RecoverThenPoll

func (c DeletedServersClient) RecoverThenPoll(ctx context.Context, id DeletedServerId) error

RecoverThenPoll performs Recover then polls until it's completed

type GetOperationResponse

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

type ListByLocationCompleteResult

type ListByLocationCompleteResult struct {
	Items []DeletedServer
}

type ListByLocationOperationResponse

type ListByLocationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DeletedServer
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []DeletedServer
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DeletedServer
}

type LocationId

type LocationId struct {
	SubscriptionId string
	LocationName   string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, locationName string) LocationId

NewLocationID returns a new LocationId struct

func ParseLocationID

func ParseLocationID(input string) (*LocationId, error)

ParseLocationID parses 'input' into a LocationId

func ParseLocationIDInsensitively

func ParseLocationIDInsensitively(input string) (*LocationId, error)

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

func (*LocationId) FromParseResult added in v0.20231127.1171502

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

func (LocationId) ID

func (id LocationId) ID() string

ID returns the formatted Location ID

func (LocationId) Segments

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

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

func (LocationId) String

func (id LocationId) String() string

String returns a human-readable description of this Location ID

type RecoverOperationResponse

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

Jump to

Keyboard shortcuts

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