serverkeys

package
v0.20231109.1094450 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/mysql/2020-01-01/serverkeys Documentation

The serverkeys SDK allows for interaction with the Azure Resource Manager Service mysql (API Version 2020-01-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/mysql/2020-01-01/serverkeys"

Client Initialization

client := serverkeys.NewServerKeysClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServerKeysClient.CreateOrUpdate

ctx := context.TODO()
id := serverkeys.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "keyValue")

payload := serverkeys.ServerKey{
	// ...
}


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

Example Usage: ServerKeysClient.Delete

ctx := context.TODO()
id := serverkeys.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "keyValue")

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

Example Usage: ServerKeysClient.Get

ctx := context.TODO()
id := serverkeys.NewKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "keyValue")

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForServerKeyType

func PossibleValuesForServerKeyType() []string

func ValidateKeyID

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

ValidateKeyID checks that 'input' can be parsed as a Key ID

func ValidateServerID

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

ValidateServerID checks that 'input' can be parsed as a Server ID

Types

type CreateOrUpdateOperationResponse

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

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        *ServerKey
}

type KeyId

type KeyId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	KeyName           string
}

KeyId is a struct representing the Resource ID for a Key

func NewKeyID

func NewKeyID(subscriptionId string, resourceGroupName string, serverName string, keyName string) KeyId

NewKeyID returns a new KeyId struct

func ParseKeyID

func ParseKeyID(input string) (*KeyId, error)

ParseKeyID parses 'input' into a KeyId

func ParseKeyIDInsensitively

func ParseKeyIDInsensitively(input string) (*KeyId, error)

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

func (KeyId) ID

func (id KeyId) ID() string

ID returns the formatted Key ID

func (KeyId) Segments

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

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

func (KeyId) String

func (id KeyId) String() string

String returns a human-readable description of this Key ID

type ListCompleteResult

type ListCompleteResult struct {
	Items []ServerKey
}

type ListOperationResponse

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

type ServerId

type ServerId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
}

ServerId is a struct representing the Resource ID for a Server

func NewServerID

func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId

NewServerID returns a new ServerId struct

func ParseServerID

func ParseServerID(input string) (*ServerId, error)

ParseServerID parses 'input' into a ServerId

func ParseServerIDInsensitively

func ParseServerIDInsensitively(input string) (*ServerId, error)

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

func (ServerId) ID

func (id ServerId) ID() string

ID returns the formatted Server ID

func (ServerId) Segments

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

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

func (ServerId) String

func (id ServerId) String() string

String returns a human-readable description of this Server ID

type ServerKey

type ServerKey struct {
	Id         *string              `json:"id,omitempty"`
	Kind       *string              `json:"kind,omitempty"`
	Name       *string              `json:"name,omitempty"`
	Properties *ServerKeyProperties `json:"properties,omitempty"`
	Type       *string              `json:"type,omitempty"`
}

type ServerKeyOperationPredicate

type ServerKeyOperationPredicate struct {
	Id   *string
	Kind *string
	Name *string
	Type *string
}

func (ServerKeyOperationPredicate) Matches

func (p ServerKeyOperationPredicate) Matches(input ServerKey) bool

type ServerKeyProperties

type ServerKeyProperties struct {
	CreationDate  *string       `json:"creationDate,omitempty"`
	ServerKeyType ServerKeyType `json:"serverKeyType"`
	Uri           *string       `json:"uri,omitempty"`
}

func (*ServerKeyProperties) GetCreationDateAsTime

func (o *ServerKeyProperties) GetCreationDateAsTime() (*time.Time, error)

func (*ServerKeyProperties) SetCreationDateAsTime

func (o *ServerKeyProperties) SetCreationDateAsTime(input time.Time)

type ServerKeyType

type ServerKeyType string
const (
	ServerKeyTypeAzureKeyVault ServerKeyType = "AzureKeyVault"
)

func (*ServerKeyType) UnmarshalJSON

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

type ServerKeysClient

type ServerKeysClient struct {
	Client *resourcemanager.Client
}

func NewServerKeysClientWithBaseURI

func NewServerKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerKeysClient, error)

func (ServerKeysClient) CreateOrUpdate

func (c ServerKeysClient) CreateOrUpdate(ctx context.Context, id KeyId, input ServerKey) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ServerKeysClient) CreateOrUpdateThenPoll

func (c ServerKeysClient) CreateOrUpdateThenPoll(ctx context.Context, id KeyId, input ServerKey) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ServerKeysClient) Delete

func (c ServerKeysClient) Delete(ctx context.Context, id KeyId) (result DeleteOperationResponse, err error)

Delete ...

func (ServerKeysClient) DeleteThenPoll

func (c ServerKeysClient) DeleteThenPoll(ctx context.Context, id KeyId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ServerKeysClient) Get

func (c ServerKeysClient) Get(ctx context.Context, id KeyId) (result GetOperationResponse, err error)

Get ...

func (ServerKeysClient) List

func (c ServerKeysClient) List(ctx context.Context, id ServerId) (result ListOperationResponse, err error)

List ...

func (ServerKeysClient) ListComplete

func (c ServerKeysClient) ListComplete(ctx context.Context, id ServerId) (ListCompleteResult, error)

ListComplete retrieves all the results into a single object

func (ServerKeysClient) ListCompleteMatchingPredicate

func (c ServerKeysClient) ListCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate ServerKeyOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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