virtualnetworks

package
v0.20241126.2320 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks Documentation

The virtualnetworks SDK allows for interaction with Azure Resource Manager hybridazurekubernetesservice (API Version 2024-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridazurekubernetesservice/2024-01-01/virtualnetworks"

Client Initialization

client := virtualnetworks.NewVirtualNetworksClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualNetworksClient.CreateOrUpdate

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

payload := virtualnetworks.VirtualNetwork{
	// ...
}


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

Example Usage: VirtualNetworksClient.Delete

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

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

Example Usage: VirtualNetworksClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.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: VirtualNetworksClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: VirtualNetworksClient.Retrieve

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

read, err := client.Retrieve(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: VirtualNetworksClient.Update

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

payload := virtualnetworks.VirtualNetworksPatch{
	// ...
}


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 PossibleValuesForExtendedLocationTypes

func PossibleValuesForExtendedLocationTypes() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateVirtualNetworkID

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

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

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type ExtendedLocationTypes

type ExtendedLocationTypes string
const (
	ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation"
)

func (*ExtendedLocationTypes) UnmarshalJSON

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualNetwork
}

type ListByResourceGroupCustomPager

type ListByResourceGroupCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualNetwork
}

type ListBySubscriptionCustomPager

type ListBySubscriptionCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VirtualNetwork
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStatePending   ProvisioningState = "Pending"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type RetrieveOperationResponse

type RetrieveOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualNetwork
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualNetwork
}

type VirtualNetwork

type VirtualNetwork struct {
	ExtendedLocation *VirtualNetworkExtendedLocation `json:"extendedLocation,omitempty"`
	Id               *string                         `json:"id,omitempty"`
	Location         string                          `json:"location"`
	Name             *string                         `json:"name,omitempty"`
	Properties       *VirtualNetworkProperties       `json:"properties,omitempty"`
	SystemData       *systemdata.SystemData          `json:"systemData,omitempty"`
	Tags             *map[string]string              `json:"tags,omitempty"`
	Type             *string                         `json:"type,omitempty"`
}

type VirtualNetworkExtendedLocation

type VirtualNetworkExtendedLocation struct {
	Name *string                `json:"name,omitempty"`
	Type *ExtendedLocationTypes `json:"type,omitempty"`
}

type VirtualNetworkId

type VirtualNetworkId struct {
	SubscriptionId     string
	ResourceGroupName  string
	VirtualNetworkName string
}

VirtualNetworkId is a struct representing the Resource ID for a Virtual Network

func NewVirtualNetworkID

func NewVirtualNetworkID(subscriptionId string, resourceGroupName string, virtualNetworkName string) VirtualNetworkId

NewVirtualNetworkID returns a new VirtualNetworkId struct

func ParseVirtualNetworkID

func ParseVirtualNetworkID(input string) (*VirtualNetworkId, error)

ParseVirtualNetworkID parses 'input' into a VirtualNetworkId

func ParseVirtualNetworkIDInsensitively

func ParseVirtualNetworkIDInsensitively(input string) (*VirtualNetworkId, error)

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

func (*VirtualNetworkId) FromParseResult

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

func (VirtualNetworkId) ID

func (id VirtualNetworkId) ID() string

ID returns the formatted Virtual Network ID

func (VirtualNetworkId) Segments

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

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

func (VirtualNetworkId) String

func (id VirtualNetworkId) String() string

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

type VirtualNetworkOperationPredicate

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

func (VirtualNetworkOperationPredicate) Matches

type VirtualNetworkProperties

type VirtualNetworkProperties struct {
	DnsServers        *[]string                                  `json:"dnsServers,omitempty"`
	Gateway           *string                                    `json:"gateway,omitempty"`
	IPAddressPrefix   *string                                    `json:"ipAddressPrefix,omitempty"`
	InfraVnetProfile  *VirtualNetworkPropertiesInfraVnetProfile  `json:"infraVnetProfile,omitempty"`
	ProvisioningState *ProvisioningState                         `json:"provisioningState,omitempty"`
	Status            *VirtualNetworkPropertiesStatus            `json:"status,omitempty"`
	VMipPool          *[]VirtualNetworkPropertiesVMipPoolInlined `json:"vmipPool,omitempty"`
	VipPool           *[]VirtualNetworkPropertiesVipPoolInlined  `json:"vipPool,omitempty"`
	VlanID            *int64                                     `json:"vlanID,omitempty"`
}

type VirtualNetworkPropertiesInfraVnetProfile

type VirtualNetworkPropertiesInfraVnetProfile struct {
	Hci *VirtualNetworkPropertiesInfraVnetProfileHci `json:"hci,omitempty"`
}

type VirtualNetworkPropertiesInfraVnetProfileHci

type VirtualNetworkPropertiesInfraVnetProfileHci struct {
	MocGroup    *string `json:"mocGroup,omitempty"`
	MocLocation *string `json:"mocLocation,omitempty"`
	MocVnetName *string `json:"mocVnetName,omitempty"`
}

type VirtualNetworkPropertiesStatus

type VirtualNetworkPropertiesStatus struct {
	OperationStatus *VirtualNetworkPropertiesStatusOperationStatus `json:"operationStatus,omitempty"`
}

type VirtualNetworkPropertiesStatusOperationStatus

type VirtualNetworkPropertiesStatusOperationStatus struct {
	Error       *VirtualNetworkPropertiesStatusOperationStatusError `json:"error,omitempty"`
	OperationId *string                                             `json:"operationId,omitempty"`
	Status      *string                                             `json:"status,omitempty"`
}

type VirtualNetworkPropertiesStatusOperationStatusError

type VirtualNetworkPropertiesStatusOperationStatusError struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

type VirtualNetworkPropertiesVMipPoolInlined

type VirtualNetworkPropertiesVMipPoolInlined struct {
	EndIP   *string `json:"endIP,omitempty"`
	StartIP *string `json:"startIP,omitempty"`
}

type VirtualNetworkPropertiesVipPoolInlined

type VirtualNetworkPropertiesVipPoolInlined struct {
	EndIP   *string `json:"endIP,omitempty"`
	StartIP *string `json:"startIP,omitempty"`
}

type VirtualNetworksClient

type VirtualNetworksClient struct {
	Client *resourcemanager.Client
}

func NewVirtualNetworksClientWithBaseURI

func NewVirtualNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualNetworksClient, error)

func (VirtualNetworksClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualNetworksClient) CreateOrUpdateThenPoll

func (c VirtualNetworksClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkId, input VirtualNetwork) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (VirtualNetworksClient) Delete

Delete ...

func (VirtualNetworksClient) DeleteThenPoll

func (c VirtualNetworksClient) DeleteThenPoll(ctx context.Context, id VirtualNetworkId) error

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualNetworksClient) ListByResourceGroup

ListByResourceGroup ...

func (VirtualNetworksClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (VirtualNetworksClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualNetworksClient) ListBySubscription

ListBySubscription ...

func (VirtualNetworksClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (VirtualNetworksClient) ListBySubscriptionCompleteMatchingPredicate

func (c VirtualNetworksClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualNetworkOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualNetworksClient) Retrieve

Retrieve ...

func (VirtualNetworksClient) Update

Update ...

func (VirtualNetworksClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type VirtualNetworksPatch

type VirtualNetworksPatch struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

Jump to

Keyboard shortcuts

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