virtualnetworkrules

package
v0.20240110.1151535 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/postgresql/2017-12-01/virtualnetworkrules Documentation

The virtualnetworkrules SDK allows for interaction with the Azure Resource Manager Service postgresql (API Version 2017-12-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/postgresql/2017-12-01/virtualnetworkrules"

Client Initialization

client := virtualnetworkrules.NewVirtualNetworkRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualNetworkRulesClient.CreateOrUpdate

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

payload := virtualnetworkrules.VirtualNetworkRule{
	// ...
}


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

Example Usage: VirtualNetworkRulesClient.Delete

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

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

Example Usage: VirtualNetworkRulesClient.Get

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

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: VirtualNetworkRulesClient.ListByServer

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

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

func PossibleValuesForVirtualNetworkRuleState() []string

func ValidateServerID

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

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

func ValidateVirtualNetworkRuleID

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

ValidateVirtualNetworkRuleID checks that 'input' can be parsed as a Virtual Network Rule 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        *VirtualNetworkRule
}

type ListByServerCompleteResult

type ListByServerCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualNetworkRule
}

type ListByServerOperationResponse

type ListByServerOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VirtualNetworkRule
}

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) FromParseResult added in v0.20231127.1171502

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

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 VirtualNetworkRule

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

type VirtualNetworkRuleId

type VirtualNetworkRuleId struct {
	SubscriptionId         string
	ResourceGroupName      string
	ServerName             string
	VirtualNetworkRuleName string
}

VirtualNetworkRuleId is a struct representing the Resource ID for a Virtual Network Rule

func NewVirtualNetworkRuleID

func NewVirtualNetworkRuleID(subscriptionId string, resourceGroupName string, serverName string, virtualNetworkRuleName string) VirtualNetworkRuleId

NewVirtualNetworkRuleID returns a new VirtualNetworkRuleId struct

func ParseVirtualNetworkRuleID

func ParseVirtualNetworkRuleID(input string) (*VirtualNetworkRuleId, error)

ParseVirtualNetworkRuleID parses 'input' into a VirtualNetworkRuleId

func ParseVirtualNetworkRuleIDInsensitively

func ParseVirtualNetworkRuleIDInsensitively(input string) (*VirtualNetworkRuleId, error)

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

func (*VirtualNetworkRuleId) FromParseResult added in v0.20231127.1171502

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

func (VirtualNetworkRuleId) ID

func (id VirtualNetworkRuleId) ID() string

ID returns the formatted Virtual Network Rule ID

func (VirtualNetworkRuleId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Virtual Network Rule ID

func (VirtualNetworkRuleId) String

func (id VirtualNetworkRuleId) String() string

String returns a human-readable description of this Virtual Network Rule ID

type VirtualNetworkRuleOperationPredicate

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

func (VirtualNetworkRuleOperationPredicate) Matches

type VirtualNetworkRuleProperties

type VirtualNetworkRuleProperties struct {
	IgnoreMissingVnetServiceEndpoint *bool                    `json:"ignoreMissingVnetServiceEndpoint,omitempty"`
	State                            *VirtualNetworkRuleState `json:"state,omitempty"`
	VirtualNetworkSubnetId           string                   `json:"virtualNetworkSubnetId"`
}

type VirtualNetworkRuleState

type VirtualNetworkRuleState string
const (
	VirtualNetworkRuleStateDeleting     VirtualNetworkRuleState = "Deleting"
	VirtualNetworkRuleStateInProgress   VirtualNetworkRuleState = "InProgress"
	VirtualNetworkRuleStateInitializing VirtualNetworkRuleState = "Initializing"
	VirtualNetworkRuleStateReady        VirtualNetworkRuleState = "Ready"
	VirtualNetworkRuleStateUnknown      VirtualNetworkRuleState = "Unknown"
)

func (*VirtualNetworkRuleState) UnmarshalJSON added in v0.20230809.1081239

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

type VirtualNetworkRulesClient

type VirtualNetworkRulesClient struct {
	Client *resourcemanager.Client
}

func NewVirtualNetworkRulesClientWithBaseURI

func NewVirtualNetworkRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkRulesClient, error)

func (VirtualNetworkRulesClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualNetworkRulesClient) CreateOrUpdateThenPoll

func (c VirtualNetworkRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkRuleId, input VirtualNetworkRule) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (VirtualNetworkRulesClient) Delete

Delete ...

func (VirtualNetworkRulesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualNetworkRulesClient) Get

Get ...

func (VirtualNetworkRulesClient) ListByServer

ListByServer ...

func (VirtualNetworkRulesClient) ListByServerComplete

ListByServerComplete retrieves all the results into a single object

func (VirtualNetworkRulesClient) ListByServerCompleteMatchingPredicate

func (c VirtualNetworkRulesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate VirtualNetworkRuleOperationPredicate) (result ListByServerCompleteResult, err error)

ListByServerCompleteMatchingPredicate 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