logicalnetworks

package
v0.20240125.1150118 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-09-01-preview/logicalnetworks Documentation

The logicalnetworks SDK allows for interaction with the Azure Resource Manager Service azurestackhci (API Version 2023-09-01-preview).

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/azurestackhci/2023-09-01-preview/logicalnetworks"

Client Initialization

client := logicalnetworks.NewLogicalNetworksClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: LogicalNetworksClient.CreateOrUpdate

ctx := context.TODO()
id := logicalnetworks.NewLogicalNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "logicalNetworkValue")

payload := logicalnetworks.LogicalNetworks{
	// ...
}


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

Example Usage: LogicalNetworksClient.Delete

ctx := context.TODO()
id := logicalnetworks.NewLogicalNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "logicalNetworkValue")

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

Example Usage: LogicalNetworksClient.Get

ctx := context.TODO()
id := logicalnetworks.NewLogicalNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "logicalNetworkValue")

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

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

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

Example Usage: LogicalNetworksClient.ListAll

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

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

Example Usage: LogicalNetworksClient.Update

ctx := context.TODO()
id := logicalnetworks.NewLogicalNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "logicalNetworkValue")

payload := logicalnetworks.LogicalNetworksUpdateRequest{
	// ...
}


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 PossibleValuesForIPAllocationMethodEnum

func PossibleValuesForIPAllocationMethodEnum() []string

func PossibleValuesForIPPoolTypeEnum

func PossibleValuesForIPPoolTypeEnum() []string

func PossibleValuesForProvisioningStateEnum

func PossibleValuesForProvisioningStateEnum() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func ValidateLogicalNetworkID

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

ValidateLogicalNetworkID checks that 'input' can be parsed as a Logical Network ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type ExtendedLocation

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

type ExtendedLocationTypes

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

func (*ExtendedLocationTypes) UnmarshalJSON

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

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *LogicalNetworks
}

type IPAllocationMethodEnum

type IPAllocationMethodEnum string
const (
	IPAllocationMethodEnumDynamic IPAllocationMethodEnum = "Dynamic"
	IPAllocationMethodEnumStatic  IPAllocationMethodEnum = "Static"
)

func (*IPAllocationMethodEnum) UnmarshalJSON

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

type IPPool

type IPPool struct {
	End        *string         `json:"end,omitempty"`
	IPPoolType *IPPoolTypeEnum `json:"ipPoolType,omitempty"`
	Info       *IPPoolInfo     `json:"info,omitempty"`
	Name       *string         `json:"name,omitempty"`
	Start      *string         `json:"start,omitempty"`
}

type IPPoolInfo

type IPPoolInfo struct {
	Available *string `json:"available,omitempty"`
	Used      *string `json:"used,omitempty"`
}

type IPPoolTypeEnum

type IPPoolTypeEnum string
const (
	IPPoolTypeEnumVM      IPPoolTypeEnum = "vm"
	IPPoolTypeEnumVippool IPPoolTypeEnum = "vippool"
)

func (*IPPoolTypeEnum) UnmarshalJSON

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

type ListAllCompleteResult

type ListAllCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []LogicalNetworks
}

type ListAllOperationResponse

type ListAllOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LogicalNetworks
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []LogicalNetworks
}

type ListOperationResponse

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

type LogicalNetworkId

type LogicalNetworkId struct {
	SubscriptionId     string
	ResourceGroupName  string
	LogicalNetworkName string
}

LogicalNetworkId is a struct representing the Resource ID for a Logical Network

func NewLogicalNetworkID

func NewLogicalNetworkID(subscriptionId string, resourceGroupName string, logicalNetworkName string) LogicalNetworkId

NewLogicalNetworkID returns a new LogicalNetworkId struct

func ParseLogicalNetworkID

func ParseLogicalNetworkID(input string) (*LogicalNetworkId, error)

ParseLogicalNetworkID parses 'input' into a LogicalNetworkId

func ParseLogicalNetworkIDInsensitively

func ParseLogicalNetworkIDInsensitively(input string) (*LogicalNetworkId, error)

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

func (*LogicalNetworkId) FromParseResult

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

func (LogicalNetworkId) ID

func (id LogicalNetworkId) ID() string

ID returns the formatted Logical Network ID

func (LogicalNetworkId) Segments

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

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

func (LogicalNetworkId) String

func (id LogicalNetworkId) String() string

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

type LogicalNetworkProperties

type LogicalNetworkProperties struct {
	DhcpOptions       *LogicalNetworkPropertiesDhcpOptions `json:"dhcpOptions,omitempty"`
	ProvisioningState *ProvisioningStateEnum               `json:"provisioningState,omitempty"`
	Status            *LogicalNetworkStatus                `json:"status,omitempty"`
	Subnets           *[]Subnet                            `json:"subnets,omitempty"`
	VMSwitchName      *string                              `json:"vmSwitchName,omitempty"`
}

type LogicalNetworkPropertiesDhcpOptions

type LogicalNetworkPropertiesDhcpOptions struct {
	DnsServers *[]string `json:"dnsServers,omitempty"`
}

type LogicalNetworkStatus

type LogicalNetworkStatus struct {
	ErrorCode          *string                                 `json:"errorCode,omitempty"`
	ErrorMessage       *string                                 `json:"errorMessage,omitempty"`
	ProvisioningStatus *LogicalNetworkStatusProvisioningStatus `json:"provisioningStatus,omitempty"`
}

type LogicalNetworkStatusProvisioningStatus

type LogicalNetworkStatusProvisioningStatus struct {
	OperationId *string `json:"operationId,omitempty"`
	Status      *Status `json:"status,omitempty"`
}

type LogicalNetworks

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

type LogicalNetworksClient

type LogicalNetworksClient struct {
	Client *resourcemanager.Client
}

func NewLogicalNetworksClientWithBaseURI

func NewLogicalNetworksClientWithBaseURI(sdkApi sdkEnv.Api) (*LogicalNetworksClient, error)

func (LogicalNetworksClient) CreateOrUpdate

CreateOrUpdate ...

func (LogicalNetworksClient) CreateOrUpdateThenPoll

func (c LogicalNetworksClient) CreateOrUpdateThenPoll(ctx context.Context, id LogicalNetworkId, input LogicalNetworks) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (LogicalNetworksClient) Delete

Delete ...

func (LogicalNetworksClient) DeleteThenPoll

func (c LogicalNetworksClient) DeleteThenPoll(ctx context.Context, id LogicalNetworkId) error

DeleteThenPoll performs Delete then polls until it's completed

func (LogicalNetworksClient) Get

Get ...

func (LogicalNetworksClient) List

List ...

func (LogicalNetworksClient) ListAll

ListAll ...

func (LogicalNetworksClient) ListAllComplete

ListAllComplete retrieves all the results into a single object

func (LogicalNetworksClient) ListAllCompleteMatchingPredicate

func (c LogicalNetworksClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LogicalNetworksOperationPredicate) (result ListAllCompleteResult, err error)

ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (LogicalNetworksClient) ListComplete

ListComplete retrieves all the results into a single object

func (LogicalNetworksClient) ListCompleteMatchingPredicate

func (c LogicalNetworksClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LogicalNetworksOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (LogicalNetworksClient) Update

Update ...

func (LogicalNetworksClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type LogicalNetworksOperationPredicate

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

func (LogicalNetworksOperationPredicate) Matches

type LogicalNetworksUpdateRequest

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

type ProvisioningStateEnum

type ProvisioningStateEnum string
const (
	ProvisioningStateEnumAccepted   ProvisioningStateEnum = "Accepted"
	ProvisioningStateEnumCanceled   ProvisioningStateEnum = "Canceled"
	ProvisioningStateEnumDeleting   ProvisioningStateEnum = "Deleting"
	ProvisioningStateEnumFailed     ProvisioningStateEnum = "Failed"
	ProvisioningStateEnumInProgress ProvisioningStateEnum = "InProgress"
	ProvisioningStateEnumSucceeded  ProvisioningStateEnum = "Succeeded"
)

func (*ProvisioningStateEnum) UnmarshalJSON

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

type Route

type Route struct {
	Name       *string                `json:"name,omitempty"`
	Properties *RoutePropertiesFormat `json:"properties,omitempty"`
}

type RoutePropertiesFormat

type RoutePropertiesFormat struct {
	AddressPrefix    *string `json:"addressPrefix,omitempty"`
	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
}

type RouteTable

type RouteTable struct {
	Etag       *string                     `json:"etag,omitempty"`
	Name       *string                     `json:"name,omitempty"`
	Properties *RouteTablePropertiesFormat `json:"properties,omitempty"`
	Type       *string                     `json:"type,omitempty"`
}

type RouteTablePropertiesFormat

type RouteTablePropertiesFormat struct {
	Routes *[]Route `json:"routes,omitempty"`
}

type Status

type Status string
const (
	StatusFailed     Status = "Failed"
	StatusInProgress Status = "InProgress"
	StatusSucceeded  Status = "Succeeded"
)

func (*Status) UnmarshalJSON

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

type Subnet

type Subnet struct {
	Name       *string                 `json:"name,omitempty"`
	Properties *SubnetPropertiesFormat `json:"properties,omitempty"`
}

type SubnetPropertiesFormat

type SubnetPropertiesFormat struct {
	AddressPrefix             *string                                                   `json:"addressPrefix,omitempty"`
	AddressPrefixes           *[]string                                                 `json:"addressPrefixes,omitempty"`
	IPAllocationMethod        *IPAllocationMethodEnum                                   `json:"ipAllocationMethod,omitempty"`
	IPConfigurationReferences *[]SubnetPropertiesFormatIPConfigurationReferencesInlined `json:"ipConfigurationReferences,omitempty"`
	IPPools                   *[]IPPool                                                 `json:"ipPools,omitempty"`
	RouteTable                *RouteTable                                               `json:"routeTable,omitempty"`
	Vlan                      *int64                                                    `json:"vlan,omitempty"`
}

type SubnetPropertiesFormatIPConfigurationReferencesInlined

type SubnetPropertiesFormatIPConfigurationReferencesInlined struct {
	ID *string `json:"ID,omitempty"`
}

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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