managedinstances

package
v0.20230823.1052657 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2018-06-01-preview/managedinstances Documentation

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

Client Initialization

client := managedinstances.NewManagedInstancesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ManagedInstancesClient.CreateOrUpdate

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

payload := managedinstances.ManagedInstance{
	// ...
}


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

Example Usage: ManagedInstancesClient.Delete

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

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

Example Usage: ManagedInstancesClient.Get

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

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

ctx := context.TODO()
id := managedinstances.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: ManagedInstancesClient.ListByInstancePool

ctx := context.TODO()
id := managedinstances.NewInstancePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "instancePoolValue")

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

Example Usage: ManagedInstancesClient.ListByResourceGroup

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

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

Example Usage: ManagedInstancesClient.Update

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

payload := managedinstances.ManagedInstanceUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForIdentityType

func PossibleValuesForIdentityType() []string

func PossibleValuesForManagedInstanceLicenseType

func PossibleValuesForManagedInstanceLicenseType() []string

func PossibleValuesForManagedInstanceProxyOverride

func PossibleValuesForManagedInstanceProxyOverride() []string

func PossibleValuesForManagedServerCreateMode

func PossibleValuesForManagedServerCreateMode() []string

func ValidateInstancePoolID

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

ValidateInstancePoolID checks that 'input' can be parsed as a Instance Pool ID

func ValidateManagedInstanceID

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

ValidateManagedInstanceID checks that 'input' can be parsed as a Managed Instance 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        *ManagedInstance
}

type IdentityType

type IdentityType string
const (
	IdentityTypeNone                       IdentityType = "None"
	IdentityTypeSystemAssigned             IdentityType = "SystemAssigned"
	IdentityTypeSystemAssignedUserAssigned IdentityType = "SystemAssigned,UserAssigned"
	IdentityTypeUserAssigned               IdentityType = "UserAssigned"
)

func (*IdentityType) UnmarshalJSON

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

type InstancePoolId

type InstancePoolId struct {
	SubscriptionId    string
	ResourceGroupName string
	InstancePoolName  string
}

InstancePoolId is a struct representing the Resource ID for a Instance Pool

func NewInstancePoolID

func NewInstancePoolID(subscriptionId string, resourceGroupName string, instancePoolName string) InstancePoolId

NewInstancePoolID returns a new InstancePoolId struct

func ParseInstancePoolID

func ParseInstancePoolID(input string) (*InstancePoolId, error)

ParseInstancePoolID parses 'input' into a InstancePoolId

func ParseInstancePoolIDInsensitively

func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error)

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

func (InstancePoolId) ID

func (id InstancePoolId) ID() string

ID returns the formatted Instance Pool ID

func (InstancePoolId) Segments

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

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

func (InstancePoolId) String

func (id InstancePoolId) String() string

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

type ListByInstancePoolCompleteResult

type ListByInstancePoolCompleteResult struct {
	Items []ManagedInstance
}

type ListByInstancePoolOperationResponse

type ListByInstancePoolOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagedInstance
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []ManagedInstance
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ManagedInstance
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []ManagedInstance
}

type ListOperationResponse

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

type ManagedInstance

type ManagedInstance struct {
	Id         *string                    `json:"id,omitempty"`
	Identity   *ResourceIdentity          `json:"identity,omitempty"`
	Location   string                     `json:"location"`
	Name       *string                    `json:"name,omitempty"`
	Properties *ManagedInstanceProperties `json:"properties,omitempty"`
	Sku        *Sku                       `json:"sku,omitempty"`
	Tags       *map[string]string         `json:"tags,omitempty"`
	Type       *string                    `json:"type,omitempty"`
}

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 ManagedInstanceLicenseType

type ManagedInstanceLicenseType string
const (
	ManagedInstanceLicenseTypeBasePrice       ManagedInstanceLicenseType = "BasePrice"
	ManagedInstanceLicenseTypeLicenseIncluded ManagedInstanceLicenseType = "LicenseIncluded"
)

func (*ManagedInstanceLicenseType) UnmarshalJSON

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

type ManagedInstanceOperationPredicate

type ManagedInstanceOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (ManagedInstanceOperationPredicate) Matches

type ManagedInstanceProperties

type ManagedInstanceProperties struct {
	AdministratorLogin         *string                       `json:"administratorLogin,omitempty"`
	AdministratorLoginPassword *string                       `json:"administratorLoginPassword,omitempty"`
	Collation                  *string                       `json:"collation,omitempty"`
	DnsZone                    *string                       `json:"dnsZone,omitempty"`
	DnsZonePartner             *string                       `json:"dnsZonePartner,omitempty"`
	FullyQualifiedDomainName   *string                       `json:"fullyQualifiedDomainName,omitempty"`
	InstancePoolId             *string                       `json:"instancePoolId,omitempty"`
	LicenseType                *ManagedInstanceLicenseType   `json:"licenseType,omitempty"`
	MaintenanceConfigurationId *string                       `json:"maintenanceConfigurationId,omitempty"`
	ManagedInstanceCreateMode  *ManagedServerCreateMode      `json:"managedInstanceCreateMode,omitempty"`
	MinimalTlsVersion          *string                       `json:"minimalTlsVersion,omitempty"`
	ProxyOverride              *ManagedInstanceProxyOverride `json:"proxyOverride,omitempty"`
	PublicDataEndpointEnabled  *bool                         `json:"publicDataEndpointEnabled,omitempty"`
	RestorePointInTime         *string                       `json:"restorePointInTime,omitempty"`
	SourceManagedInstanceId    *string                       `json:"sourceManagedInstanceId,omitempty"`
	State                      *string                       `json:"state,omitempty"`
	StorageSizeInGB            *int64                        `json:"storageSizeInGB,omitempty"`
	SubnetId                   *string                       `json:"subnetId,omitempty"`
	TimezoneId                 *string                       `json:"timezoneId,omitempty"`
	VCores                     *int64                        `json:"vCores,omitempty"`
}

func (*ManagedInstanceProperties) GetRestorePointInTimeAsTime

func (o *ManagedInstanceProperties) GetRestorePointInTimeAsTime() (*time.Time, error)

func (*ManagedInstanceProperties) SetRestorePointInTimeAsTime

func (o *ManagedInstanceProperties) SetRestorePointInTimeAsTime(input time.Time)

type ManagedInstanceProxyOverride

type ManagedInstanceProxyOverride string
const (
	ManagedInstanceProxyOverrideDefault  ManagedInstanceProxyOverride = "Default"
	ManagedInstanceProxyOverrideProxy    ManagedInstanceProxyOverride = "Proxy"
	ManagedInstanceProxyOverrideRedirect ManagedInstanceProxyOverride = "Redirect"
)

func (*ManagedInstanceProxyOverride) UnmarshalJSON

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

type ManagedInstanceUpdate

type ManagedInstanceUpdate struct {
	Properties *ManagedInstanceProperties `json:"properties,omitempty"`
	Sku        *Sku                       `json:"sku,omitempty"`
	Tags       *map[string]string         `json:"tags,omitempty"`
}

type ManagedInstancesClient

type ManagedInstancesClient struct {
	Client *resourcemanager.Client
}

func NewManagedInstancesClientWithBaseURI

func NewManagedInstancesClientWithBaseURI(sdkApi sdkEnv.Api) (*ManagedInstancesClient, error)

func (ManagedInstancesClient) CreateOrUpdate

CreateOrUpdate ...

func (ManagedInstancesClient) CreateOrUpdateThenPoll

func (c ManagedInstancesClient) CreateOrUpdateThenPoll(ctx context.Context, id ManagedInstanceId, input ManagedInstance) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ManagedInstancesClient) Delete

Delete ...

func (ManagedInstancesClient) DeleteThenPoll

func (c ManagedInstancesClient) DeleteThenPoll(ctx context.Context, id ManagedInstanceId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ManagedInstancesClient) Get

Get ...

func (ManagedInstancesClient) List

List ...

func (ManagedInstancesClient) ListByInstancePool

ListByInstancePool ...

func (ManagedInstancesClient) ListByInstancePoolComplete

ListByInstancePoolComplete retrieves all the results into a single object

func (ManagedInstancesClient) ListByInstancePoolCompleteMatchingPredicate

func (c ManagedInstancesClient) ListByInstancePoolCompleteMatchingPredicate(ctx context.Context, id InstancePoolId, predicate ManagedInstanceOperationPredicate) (result ListByInstancePoolCompleteResult, err error)

ListByInstancePoolCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedInstancesClient) ListByResourceGroup

ListByResourceGroup ...

func (ManagedInstancesClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (ManagedInstancesClient) ListByResourceGroupCompleteMatchingPredicate

func (c ManagedInstancesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ManagedInstanceOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedInstancesClient) ListComplete

ListComplete retrieves all the results into a single object

func (ManagedInstancesClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ManagedInstancesClient) Update

Update ...

func (ManagedInstancesClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type ManagedServerCreateMode

type ManagedServerCreateMode string
const (
	ManagedServerCreateModeDefault            ManagedServerCreateMode = "Default"
	ManagedServerCreateModePointInTimeRestore ManagedServerCreateMode = "PointInTimeRestore"
)

func (*ManagedServerCreateMode) UnmarshalJSON

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

type ResourceIdentity

type ResourceIdentity struct {
	PrincipalId *string       `json:"principalId,omitempty"`
	TenantId    *string       `json:"tenantId,omitempty"`
	Type        *IdentityType `json:"type,omitempty"`
}

type Sku

type Sku struct {
	Capacity *int64  `json:"capacity,omitempty"`
	Family   *string `json:"family,omitempty"`
	Name     string  `json:"name"`
	Size     *string `json:"size,omitempty"`
	Tier     *string `json:"tier,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse 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