virtualnetworks

package
v0.20230323.1182043 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/virtualnetworks Documentation

The virtualnetworks SDK allows for interaction with the Azure Resource Manager Service devtestlab (API Version 2018-09-15).

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/devtestlab/2018-09-15/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", "labValue", "virtualNetworkValue")

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", "labValue", "virtualNetworkValue")

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

Example Usage: VirtualNetworksClient.Get

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

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

Example Usage: VirtualNetworksClient.List

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

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

Example Usage: VirtualNetworksClient.Update

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

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForTransportProtocol

func PossibleValuesForTransportProtocol() []string

func PossibleValuesForUsagePermissionType

func PossibleValuesForUsagePermissionType() []string

func ValidateLabID

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

ValidateLabID checks that 'input' can be parsed as a Lab ID

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       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type ExternalSubnet

type ExternalSubnet struct {
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *VirtualNetwork
}

type LabId

type LabId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
}

LabId is a struct representing the Resource ID for a Lab

func NewLabID

func NewLabID(subscriptionId string, resourceGroupName string, labName string) LabId

NewLabID returns a new LabId struct

func ParseLabID

func ParseLabID(input string) (*LabId, error)

ParseLabID parses 'input' into a LabId

func ParseLabIDInsensitively

func ParseLabIDInsensitively(input string) (*LabId, error)

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

func (LabId) ID

func (id LabId) ID() string

ID returns the formatted Lab ID

func (LabId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Lab ID

func (LabId) String

func (id LabId) String() string

String returns a human-readable description of this Lab ID

type ListCompleteResult

type ListCompleteResult struct {
	Items []VirtualNetwork
}

type ListOperationOptions

type ListOperationOptions struct {
	Expand  *string
	Filter  *string
	Orderby *string
	Top     *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]VirtualNetwork
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type Port

type Port struct {
	BackendPort       *int64             `json:"backendPort,omitempty"`
	TransportProtocol *TransportProtocol `json:"transportProtocol,omitempty"`
}

type Subnet

type Subnet struct {
	AllowPublicIP *UsagePermissionType `json:"allowPublicIp,omitempty"`
	LabSubnetName *string              `json:"labSubnetName,omitempty"`
	ResourceId    *string              `json:"resourceId,omitempty"`
}

type SubnetOverride

type SubnetOverride struct {
	LabSubnetName                      *string                                   `json:"labSubnetName,omitempty"`
	ResourceId                         *string                                   `json:"resourceId,omitempty"`
	SharedPublicIPAddressConfiguration *SubnetSharedPublicIPAddressConfiguration `json:"sharedPublicIpAddressConfiguration,omitempty"`
	UseInVMCreationPermission          *UsagePermissionType                      `json:"useInVmCreationPermission,omitempty"`
	UsePublicIPAddressPermission       *UsagePermissionType                      `json:"usePublicIpAddressPermission,omitempty"`
	VirtualNetworkPoolName             *string                                   `json:"virtualNetworkPoolName,omitempty"`
}

type SubnetSharedPublicIPAddressConfiguration

type SubnetSharedPublicIPAddressConfiguration struct {
	AllowedPorts *[]Port `json:"allowedPorts,omitempty"`
}

type TransportProtocol

type TransportProtocol string
const (
	TransportProtocolTcp TransportProtocol = "Tcp"
	TransportProtocolUdp TransportProtocol = "Udp"
)

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *VirtualNetwork
}

type UpdateResource

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

type UsagePermissionType

type UsagePermissionType string
const (
	UsagePermissionTypeAllow   UsagePermissionType = "Allow"
	UsagePermissionTypeDefault UsagePermissionType = "Default"
	UsagePermissionTypeDeny    UsagePermissionType = "Deny"
)

type VirtualNetwork

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

type VirtualNetworkId

type VirtualNetworkId struct {
	SubscriptionId     string
	ResourceGroupName  string
	LabName            string
	VirtualNetworkName string
}

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

func NewVirtualNetworkID

func NewVirtualNetworkID(subscriptionId string, resourceGroupName string, labName 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) 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 {
	AllowedSubnets             *[]Subnet         `json:"allowedSubnets,omitempty"`
	CreatedDate                *string           `json:"createdDate,omitempty"`
	Description                *string           `json:"description,omitempty"`
	ExternalProviderResourceId *string           `json:"externalProviderResourceId,omitempty"`
	ExternalSubnets            *[]ExternalSubnet `json:"externalSubnets,omitempty"`
	ProvisioningState          *string           `json:"provisioningState,omitempty"`
	SubnetOverrides            *[]SubnetOverride `json:"subnetOverrides,omitempty"`
	UniqueIdentifier           *string           `json:"uniqueIdentifier,omitempty"`
}

func (*VirtualNetworkProperties) GetCreatedDateAsTime

func (o *VirtualNetworkProperties) GetCreatedDateAsTime() (*time.Time, error)

func (*VirtualNetworkProperties) SetCreatedDateAsTime

func (o *VirtualNetworkProperties) SetCreatedDateAsTime(input time.Time)

type VirtualNetworksClient

type VirtualNetworksClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewVirtualNetworksClientWithBaseURI

func NewVirtualNetworksClientWithBaseURI(endpoint string) VirtualNetworksClient

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) Get

Get ...

func (VirtualNetworksClient) List

List ...

func (VirtualNetworksClient) ListComplete

ListComplete retrieves all of the results into a single object

func (VirtualNetworksClient) ListCompleteMatchingPredicate

func (c VirtualNetworksClient) ListCompleteMatchingPredicate(ctx context.Context, id LabId, options ListOperationOptions, predicate VirtualNetworkOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (VirtualNetworksClient) Update

Update ...

Jump to

Keyboard shortcuts

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