virtualnetworkpeerings

package
v0.20231109.1101123 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: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-05-01/virtualnetworkpeerings Documentation

The virtualnetworkpeerings SDK allows for interaction with the Azure Resource Manager Service network (API Version 2023-05-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/network/2023-05-01/virtualnetworkpeerings"

Client Initialization

client := virtualnetworkpeerings.NewVirtualNetworkPeeringsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualNetworkPeeringsClient.CreateOrUpdate

ctx := context.TODO()
id := virtualnetworkpeerings.NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue")

payload := virtualnetworkpeerings.VirtualNetworkPeering{
	// ...
}


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

Example Usage: VirtualNetworkPeeringsClient.Delete

ctx := context.TODO()
id := virtualnetworkpeerings.NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue")

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

Example Usage: VirtualNetworkPeeringsClient.Get

ctx := context.TODO()
id := virtualnetworkpeerings.NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue")

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

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

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

func PossibleValuesForProvisioningState() []string

func PossibleValuesForSyncRemoteAddressSpace

func PossibleValuesForSyncRemoteAddressSpace() []string

func PossibleValuesForVirtualNetworkEncryptionEnforcement

func PossibleValuesForVirtualNetworkEncryptionEnforcement() []string

func PossibleValuesForVirtualNetworkPeeringLevel

func PossibleValuesForVirtualNetworkPeeringLevel() []string

func PossibleValuesForVirtualNetworkPeeringState

func PossibleValuesForVirtualNetworkPeeringState() []string

func ValidateVirtualNetworkPeeringID

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

ValidateVirtualNetworkPeeringID checks that 'input' can be parsed as a Virtual Network Peering ID

Types

type AddressSpace

type AddressSpace struct {
	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
}

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	SyncRemoteAddressSpace *SyncRemoteAddressSpace
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []VirtualNetworkPeering
}

type ListOperationResponse

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type SubResource

type SubResource struct {
	Id *string `json:"id,omitempty"`
}

type SyncRemoteAddressSpace

type SyncRemoteAddressSpace string
const (
	SyncRemoteAddressSpaceTrue SyncRemoteAddressSpace = "true"
)

func (*SyncRemoteAddressSpace) UnmarshalJSON

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

type VirtualNetworkBgpCommunities

type VirtualNetworkBgpCommunities struct {
	RegionalCommunity       *string `json:"regionalCommunity,omitempty"`
	VirtualNetworkCommunity string  `json:"virtualNetworkCommunity"`
}

type VirtualNetworkEncryption

type VirtualNetworkEncryption struct {
	Enabled     bool                                 `json:"enabled"`
	Enforcement *VirtualNetworkEncryptionEnforcement `json:"enforcement,omitempty"`
}

type VirtualNetworkEncryptionEnforcement

type VirtualNetworkEncryptionEnforcement string
const (
	VirtualNetworkEncryptionEnforcementAllowUnencrypted VirtualNetworkEncryptionEnforcement = "AllowUnencrypted"
	VirtualNetworkEncryptionEnforcementDropUnencrypted  VirtualNetworkEncryptionEnforcement = "DropUnencrypted"
)

func (*VirtualNetworkEncryptionEnforcement) UnmarshalJSON

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

type VirtualNetworkPeering

type VirtualNetworkPeering struct {
	Etag       *string                                `json:"etag,omitempty"`
	Id         *string                                `json:"id,omitempty"`
	Name       *string                                `json:"name,omitempty"`
	Properties *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
	Type       *string                                `json:"type,omitempty"`
}

type VirtualNetworkPeeringId

type VirtualNetworkPeeringId struct {
	SubscriptionId            string
	ResourceGroupName         string
	VirtualNetworkName        string
	VirtualNetworkPeeringName string
}

VirtualNetworkPeeringId is a struct representing the Resource ID for a Virtual Network Peering

func NewVirtualNetworkPeeringID

func NewVirtualNetworkPeeringID(subscriptionId string, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) VirtualNetworkPeeringId

NewVirtualNetworkPeeringID returns a new VirtualNetworkPeeringId struct

func ParseVirtualNetworkPeeringID

func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error)

ParseVirtualNetworkPeeringID parses 'input' into a VirtualNetworkPeeringId

func ParseVirtualNetworkPeeringIDInsensitively

func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPeeringId, error)

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

func (VirtualNetworkPeeringId) ID

ID returns the formatted Virtual Network Peering ID

func (VirtualNetworkPeeringId) Segments

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

func (VirtualNetworkPeeringId) String

func (id VirtualNetworkPeeringId) String() string

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

type VirtualNetworkPeeringLevel

type VirtualNetworkPeeringLevel string
const (
	VirtualNetworkPeeringLevelFullyInSync             VirtualNetworkPeeringLevel = "FullyInSync"
	VirtualNetworkPeeringLevelLocalAndRemoteNotInSync VirtualNetworkPeeringLevel = "LocalAndRemoteNotInSync"
	VirtualNetworkPeeringLevelLocalNotInSync          VirtualNetworkPeeringLevel = "LocalNotInSync"
	VirtualNetworkPeeringLevelRemoteNotInSync         VirtualNetworkPeeringLevel = "RemoteNotInSync"
)

func (*VirtualNetworkPeeringLevel) UnmarshalJSON

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

type VirtualNetworkPeeringOperationPredicate

type VirtualNetworkPeeringOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (VirtualNetworkPeeringOperationPredicate) Matches

type VirtualNetworkPeeringPropertiesFormat

type VirtualNetworkPeeringPropertiesFormat struct {
	AllowForwardedTraffic            *bool                         `json:"allowForwardedTraffic,omitempty"`
	AllowGatewayTransit              *bool                         `json:"allowGatewayTransit,omitempty"`
	AllowVirtualNetworkAccess        *bool                         `json:"allowVirtualNetworkAccess,omitempty"`
	DoNotVerifyRemoteGateways        *bool                         `json:"doNotVerifyRemoteGateways,omitempty"`
	PeeringState                     *VirtualNetworkPeeringState   `json:"peeringState,omitempty"`
	PeeringSyncLevel                 *VirtualNetworkPeeringLevel   `json:"peeringSyncLevel,omitempty"`
	ProvisioningState                *ProvisioningState            `json:"provisioningState,omitempty"`
	RemoteAddressSpace               *AddressSpace                 `json:"remoteAddressSpace,omitempty"`
	RemoteBgpCommunities             *VirtualNetworkBgpCommunities `json:"remoteBgpCommunities,omitempty"`
	RemoteVirtualNetwork             *SubResource                  `json:"remoteVirtualNetwork,omitempty"`
	RemoteVirtualNetworkAddressSpace *AddressSpace                 `json:"remoteVirtualNetworkAddressSpace,omitempty"`
	RemoteVirtualNetworkEncryption   *VirtualNetworkEncryption     `json:"remoteVirtualNetworkEncryption,omitempty"`
	ResourceGuid                     *string                       `json:"resourceGuid,omitempty"`
	UseRemoteGateways                *bool                         `json:"useRemoteGateways,omitempty"`
}

type VirtualNetworkPeeringState

type VirtualNetworkPeeringState string
const (
	VirtualNetworkPeeringStateConnected    VirtualNetworkPeeringState = "Connected"
	VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected"
	VirtualNetworkPeeringStateInitiated    VirtualNetworkPeeringState = "Initiated"
)

func (*VirtualNetworkPeeringState) UnmarshalJSON

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

type VirtualNetworkPeeringsClient

type VirtualNetworkPeeringsClient struct {
	Client *resourcemanager.Client
}

func NewVirtualNetworkPeeringsClientWithBaseURI

func NewVirtualNetworkPeeringsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworkPeeringsClient, error)

func (VirtualNetworkPeeringsClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualNetworkPeeringsClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (VirtualNetworkPeeringsClient) Delete

Delete ...

func (VirtualNetworkPeeringsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualNetworkPeeringsClient) Get

Get ...

func (VirtualNetworkPeeringsClient) List

List ...

func (VirtualNetworkPeeringsClient) ListComplete

ListComplete retrieves all the results into a single object

func (VirtualNetworkPeeringsClient) ListCompleteMatchingPredicate

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