vnetpeerings

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "vnetpeerings"

ServiceName is the name of this service.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureClient

type AzureClient struct {
	// contains filtered or unexported fields
}

AzureClient contains the Azure go-sdk Client.

func NewClient

func NewClient(auth azure.Authorizer, apiCallTimeout time.Duration) (*AzureClient, error)

NewClient creates a new virtual network peerings client from an authorizer.

func (*AzureClient) CreateOrUpdateAsync added in v1.1.0

func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string, parameters interface{}) (result interface{}, poller *runtime.Poller[armnetwork.VirtualNetworkPeeringsClientCreateOrUpdateResponse], err error)

CreateOrUpdateAsync creates or updates a virtual network peering asynchronously. It sends a PUT request to Azure and if accepted without error, the func will return a Poller which can be used to track the ongoing progress of the operation.

func (*AzureClient) DeleteAsync added in v1.1.0

func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter, resumeToken string) (poller *runtime.Poller[armnetwork.VirtualNetworkPeeringsClientDeleteResponse], err error)

DeleteAsync deletes a virtual network peering asynchronously. DeleteAsync sends a DELETE request to Azure and if accepted without error, the func will return a Future which can be used to track the ongoing progress of the operation.

func (*AzureClient) Get

func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (result interface{}, err error)

Get gets the specified virtual network peering by the peering name, virtual network, and resource group.

type Service

type Service struct {
	Scope VnetPeeringScope
	async.Reconciler
}

Service provides operations on Azure resources.

func New

func New(scope VnetPeeringScope) (*Service, error)

New creates a new service.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context) error

Delete deletes the peering with the provided name.

func (*Service) IsManaged added in v1.3.0

func (s *Service) IsManaged(ctx context.Context) (bool, error)

IsManaged returns always returns true as CAPZ does not support BYO VNet peering.

func (*Service) Name added in v1.3.0

func (s *Service) Name() string

Name returns the service name.

func (*Service) Reconcile

func (s *Service) Reconcile(ctx context.Context) error

Reconcile idempotently creates or updates a peering.

type VnetPeeringScope

type VnetPeeringScope interface {
	azure.Authorizer
	azure.AsyncStatusUpdater
	VnetPeeringSpecs() []azure.ResourceSpecGetter
}

VnetPeeringScope defines the scope interface for a subnet service.

type VnetPeeringSpec added in v1.1.0

type VnetPeeringSpec struct {
	SourceResourceGroup       string
	SourceVnetName            string
	RemoteResourceGroup       string
	RemoteVnetName            string
	PeeringName               string
	SubscriptionID            string
	AllowForwardedTraffic     *bool
	AllowGatewayTransit       *bool
	AllowVirtualNetworkAccess *bool
	UseRemoteGateways         *bool
}

VnetPeeringSpec defines the specification for a virtual network peering.

func (*VnetPeeringSpec) OwnerResourceName added in v1.1.0

func (s *VnetPeeringSpec) OwnerResourceName() string

OwnerResourceName is a no-op for virtual network peerings.

func (*VnetPeeringSpec) Parameters added in v1.1.0

func (s *VnetPeeringSpec) Parameters(ctx context.Context, existing interface{}) (params interface{}, err error)

Parameters returns the parameters for the virtual network peering.

func (*VnetPeeringSpec) ResourceGroupName added in v1.1.0

func (s *VnetPeeringSpec) ResourceGroupName() string

ResourceGroupName returns the name of the resource group.

func (*VnetPeeringSpec) ResourceName added in v1.1.0

func (s *VnetPeeringSpec) ResourceName() string

ResourceName returns the name of the virtual network peering.

Directories

Path Synopsis
Run go generate to regenerate this mock.
Run go generate to regenerate this mock.

Jump to

Keyboard shortcuts

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