armhybridnetwork

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 14 Imported by: 1

README

Azure Private Edge Zone Module for Go

PkgGoDev

The armhybridnetwork module provides operations for working with Azure Private Edge Zone.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Private Edge Zone module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Private Edge Zone. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Private Edge Zone module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armhybridnetwork.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armhybridnetwork.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewDevicesClient()

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Private Edge Zone label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureStackEdgeFormat

type AzureStackEdgeFormat struct {
	// REQUIRED; The reference to the Azure stack edge device.
	AzureStackEdge *SubResource

	// REQUIRED; The type of the device.
	DeviceType *DeviceType

	// READ-ONLY; The list of network functions deployed on the device.
	NetworkFunctions []*SubResource

	// READ-ONLY; The provisioning state of the device resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The current device status.
	Status *Status
}

AzureStackEdgeFormat - The reference to the Azure stack edge device.

func (*AzureStackEdgeFormat) GetDevicePropertiesFormat added in v0.2.0

func (a *AzureStackEdgeFormat) GetDevicePropertiesFormat() *DevicePropertiesFormat

GetDevicePropertiesFormat implements the DevicePropertiesFormatClassification interface for type AzureStackEdgeFormat.

func (AzureStackEdgeFormat) MarshalJSON

func (a AzureStackEdgeFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AzureStackEdgeFormat.

func (*AzureStackEdgeFormat) UnmarshalJSON

func (a *AzureStackEdgeFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AzureStackEdgeFormat.

type ClientFactory added in v1.1.0

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

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v1.1.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewDevicesClient added in v1.1.0

func (c *ClientFactory) NewDevicesClient() *DevicesClient

func (*ClientFactory) NewNetworkFunctionVendorSKUsClient added in v1.1.0

func (c *ClientFactory) NewNetworkFunctionVendorSKUsClient() *NetworkFunctionVendorSKUsClient

func (*ClientFactory) NewNetworkFunctionVendorsClient added in v1.1.0

func (c *ClientFactory) NewNetworkFunctionVendorsClient() *NetworkFunctionVendorsClient

func (*ClientFactory) NewNetworkFunctionsClient added in v1.1.0

func (c *ClientFactory) NewNetworkFunctionsClient() *NetworkFunctionsClient

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

func (*ClientFactory) NewRoleInstancesClient added in v1.1.0

func (c *ClientFactory) NewRoleInstancesClient() *RoleInstancesClient

func (*ClientFactory) NewVendorNetworkFunctionsClient added in v1.1.0

func (c *ClientFactory) NewVendorNetworkFunctionsClient() *VendorNetworkFunctionsClient

func (*ClientFactory) NewVendorSKUPreviewClient added in v1.1.0

func (c *ClientFactory) NewVendorSKUPreviewClient() *VendorSKUPreviewClient

func (*ClientFactory) NewVendorSKUsClient added in v1.1.0

func (c *ClientFactory) NewVendorSKUsClient() *VendorSKUsClient

func (*ClientFactory) NewVendorsClient added in v1.1.0

func (c *ClientFactory) NewVendorsClient() *VendorsClient

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CustomProfile

type CustomProfile struct {
	// Path for metadata configuration.
	MetadataConfigurationPath *string
}

CustomProfile - Specifies the custom settings for the virtual machine.

func (CustomProfile) MarshalJSON added in v1.1.0

func (c CustomProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CustomProfile.

func (*CustomProfile) UnmarshalJSON added in v1.1.0

func (c *CustomProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CustomProfile.

type DataDisk

type DataDisk struct {
	// Specifies how the virtual machine should be created.
	CreateOption *DiskCreateOptionTypes

	// Specifies the size of an empty disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual
	// machine image.
	DiskSizeGB *int32

	// The name of data disk.
	Name *string
}

DataDisk - Specifies information about the operating system disk used by the virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json].

func (DataDisk) MarshalJSON added in v1.1.0

func (d DataDisk) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DataDisk.

func (*DataDisk) UnmarshalJSON added in v1.1.0

func (d *DataDisk) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DataDisk.

type Device

type Device struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Device properties.
	Properties DevicePropertiesFormatClassification

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Device resource.

func (Device) MarshalJSON

func (d Device) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Device.

func (*Device) UnmarshalJSON

func (d *Device) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Device.

type DeviceListResult

type DeviceListResult struct {
	// A list of devices.
	Value []*Device

	// READ-ONLY; The URL to get the next set of results.
	NextLink *string
}

DeviceListResult - Response for devices API service call.

func (DeviceListResult) MarshalJSON

func (d DeviceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeviceListResult.

func (*DeviceListResult) UnmarshalJSON added in v1.1.0

func (d *DeviceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeviceListResult.

type DevicePropertiesFormat

type DevicePropertiesFormat struct {
	// REQUIRED; The type of the device.
	DeviceType *DeviceType

	// READ-ONLY; The list of network functions deployed on the device.
	NetworkFunctions []*SubResource

	// READ-ONLY; The provisioning state of the device resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The current device status.
	Status *Status
}

DevicePropertiesFormat - Device properties.

func (*DevicePropertiesFormat) GetDevicePropertiesFormat

func (d *DevicePropertiesFormat) GetDevicePropertiesFormat() *DevicePropertiesFormat

GetDevicePropertiesFormat implements the DevicePropertiesFormatClassification interface for type DevicePropertiesFormat.

func (DevicePropertiesFormat) MarshalJSON added in v0.2.0

func (d DevicePropertiesFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DevicePropertiesFormat.

func (*DevicePropertiesFormat) UnmarshalJSON

func (d *DevicePropertiesFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DevicePropertiesFormat.

type DevicePropertiesFormatClassification

type DevicePropertiesFormatClassification interface {
	// GetDevicePropertiesFormat returns the DevicePropertiesFormat content of the underlying type.
	GetDevicePropertiesFormat() *DevicePropertiesFormat
}

DevicePropertiesFormatClassification provides polymorphic access to related types. Call the interface's GetDevicePropertiesFormat() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureStackEdgeFormat, *DevicePropertiesFormat

type DeviceRegistrationKey

type DeviceRegistrationKey struct {
	// READ-ONLY; The registration key for the device.
	RegistrationKey *string
}

DeviceRegistrationKey - The device registration key.

func (DeviceRegistrationKey) MarshalJSON added in v1.1.0

func (d DeviceRegistrationKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeviceRegistrationKey.

func (*DeviceRegistrationKey) UnmarshalJSON added in v1.1.0

func (d *DeviceRegistrationKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeviceRegistrationKey.

type DeviceType

type DeviceType string

DeviceType - The type of the device.

const (
	DeviceTypeAzureStackEdge DeviceType = "AzureStackEdge"
	DeviceTypeUnknown        DeviceType = "Unknown"
)

func PossibleDeviceTypeValues

func PossibleDeviceTypeValues() []DeviceType

PossibleDeviceTypeValues returns the possible values for the DeviceType const type.

type DevicesClient

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

DevicesClient contains the methods for the Devices group. Don't use this type directly, use NewDevicesClient() instead.

func NewDevicesClient

func NewDevicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DevicesClient, error)

NewDevicesClient creates a new instance of DevicesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DevicesClient) BeginCreateOrUpdate

func (client *DevicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, deviceName string, parameters Device, options *DevicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DevicesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a device. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • deviceName - Resource name for the device resource.
  • parameters - Parameters supplied to the create or update device operation.
  • options - DevicesClientBeginCreateOrUpdateOptions contains the optional parameters for the DevicesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/DeviceCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDevicesClient().BeginCreateOrUpdate(ctx, "rg1", "TestDevice", armhybridnetwork.Device{
		Location: to.Ptr("eastus"),
		Properties: &armhybridnetwork.AzureStackEdgeFormat{
			DeviceType: to.Ptr(armhybridnetwork.DeviceTypeAzureStackEdge),
			AzureStackEdge: &armhybridnetwork.SubResource{
				ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg2/providers/Microsoft.DataboxEdge/DataboxEdgeDevices/TestDataboxEdgeDeviceName"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Device = armhybridnetwork.Device{
	// 	Name: to.Ptr("TestDevice"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/devices"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HybridNetwork/devices/TestDevice"),
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armhybridnetwork.AzureStackEdgeFormat{
	// 		DeviceType: to.Ptr(armhybridnetwork.DeviceTypeAzureStackEdge),
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 		Status: to.Ptr(armhybridnetwork.StatusNotRegistered),
	// 		AzureStackEdge: &armhybridnetwork.SubResource{
	// 			ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg2/providers/Microsoft.DataboxEdge/DataboxEdgeDevices/TestDataboxEdgeDeviceName"),
	// 		},
	// 	},
	// }
}
Output:

func (*DevicesClient) BeginDelete

func (client *DevicesClient) BeginDelete(ctx context.Context, resourceGroupName string, deviceName string, options *DevicesClientBeginDeleteOptions) (*runtime.Poller[DevicesClientDeleteResponse], error)

BeginDelete - Deletes the specified device. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • deviceName - The name of the device resource.
  • options - DevicesClientBeginDeleteOptions contains the optional parameters for the DevicesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/DeviceDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDevicesClient().BeginDelete(ctx, "rg1", "TestDevice", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*DevicesClient) Get

func (client *DevicesClient) Get(ctx context.Context, resourceGroupName string, deviceName string, options *DevicesClientGetOptions) (DevicesClientGetResponse, error)

Get - Gets information about the specified device. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • deviceName - The name of the device resource.
  • options - DevicesClientGetOptions contains the optional parameters for the DevicesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/DeviceGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDevicesClient().Get(ctx, "rg1", "TestDevice", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Device = armhybridnetwork.Device{
	// 	Name: to.Ptr("TestDevice"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/devices"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HybridNetwork/devices/TestDevice"),
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armhybridnetwork.AzureStackEdgeFormat{
	// 		DeviceType: to.Ptr(armhybridnetwork.DeviceTypeAzureStackEdge),
	// 		NetworkFunctions: []*armhybridnetwork.SubResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.HybridNetwork/networkFunctions/TestNetworkFunction"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 		Status: to.Ptr(armhybridnetwork.StatusNotRegistered),
	// 		AzureStackEdge: &armhybridnetwork.SubResource{
	// 			ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg2/providers/Microsoft.DataboxEdge/DataboxEdgeDevices/TestDataboxEdgeDeviceName"),
	// 		},
	// 	},
	// }
}
Output:

func (*DevicesClient) ListRegistrationKey

func (client *DevicesClient) ListRegistrationKey(ctx context.Context, resourceGroupName string, deviceName string, options *DevicesClientListRegistrationKeyOptions) (DevicesClientListRegistrationKeyResponse, error)

ListRegistrationKey - List the registration key for the device. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • deviceName - The name of the device resource.
  • options - DevicesClientListRegistrationKeyOptions contains the optional parameters for the DevicesClient.ListRegistrationKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/DeviceListRegistrationKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDevicesClient().ListRegistrationKey(ctx, "rg1", "TestDevice", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DeviceRegistrationKey = armhybridnetwork.DeviceRegistrationKey{
	// 	RegistrationKey: to.Ptr("TestRegistartionKey"),
	// }
}
Output:

func (*DevicesClient) NewListByResourceGroupPager added in v0.4.0

func (client *DevicesClient) NewListByResourceGroupPager(resourceGroupName string, options *DevicesClientListByResourceGroupOptions) *runtime.Pager[DevicesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all the device resource in a resource group.

Generated from API version 2021-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - DevicesClientListByResourceGroupOptions contains the optional parameters for the DevicesClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/DeviceListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDevicesClient().NewListByResourceGroupPager("rg1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DeviceListResult = armhybridnetwork.DeviceListResult{
		// 	Value: []*armhybridnetwork.Device{
		// 		{
		// 			Name: to.Ptr("TestDevice"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/devices"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HybridNetwork/devices/TestDevice"),
		// 			Location: to.Ptr("eastus"),
		// 			Properties: &armhybridnetwork.AzureStackEdgeFormat{
		// 				DeviceType: to.Ptr(armhybridnetwork.DeviceTypeAzureStackEdge),
		// 				NetworkFunctions: []*armhybridnetwork.SubResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.HybridNetwork/networkFunctions/TestVirtualNetworkFunction"),
		// 				}},
		// 				ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
		// 				Status: to.Ptr(armhybridnetwork.StatusNotRegistered),
		// 				AzureStackEdge: &armhybridnetwork.SubResource{
		// 					ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg2/providers/Microsoft.DataboxEdge/DataboxEdgeDevices/TestDataboxEdgeDeviceName"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*DevicesClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - Lists all the devices in a subscription.

Generated from API version 2021-05-01

  • options - DevicesClientListBySubscriptionOptions contains the optional parameters for the DevicesClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/DeviceListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDevicesClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DeviceListResult = armhybridnetwork.DeviceListResult{
		// 	Value: []*armhybridnetwork.Device{
		// 		{
		// 			Name: to.Ptr("TestDevice"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/devices"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HybridNetwork/devices/TestDevice"),
		// 			Location: to.Ptr("eastus"),
		// 			Properties: &armhybridnetwork.AzureStackEdgeFormat{
		// 				DeviceType: to.Ptr(armhybridnetwork.DeviceTypeAzureStackEdge),
		// 				NetworkFunctions: []*armhybridnetwork.SubResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.HybridNetwork/networkFunctions/TestNetworkFunction"),
		// 				}},
		// 				ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
		// 				Status: to.Ptr(armhybridnetwork.StatusNotRegistered),
		// 				AzureStackEdge: &armhybridnetwork.SubResource{
		// 					ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg2/providers/Microsoft.DataboxEdge/DataboxEdgeDevices/TestDataboxEdgeDeviceName"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*DevicesClient) UpdateTags

func (client *DevicesClient) UpdateTags(ctx context.Context, resourceGroupName string, deviceName string, parameters TagsObject, options *DevicesClientUpdateTagsOptions) (DevicesClientUpdateTagsResponse, error)

UpdateTags - Updates device tags. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • deviceName - The name of the device resource.
  • parameters - Parameters supplied to the update device tags operation.
  • options - DevicesClientUpdateTagsOptions contains the optional parameters for the DevicesClient.UpdateTags method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/DeviceUpdateTags.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDevicesClient().UpdateTags(ctx, "rg1", "TestDevice", armhybridnetwork.TagsObject{
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Device = armhybridnetwork.Device{
	// 	Name: to.Ptr("TestDevice"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/devices"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HybridNetwork/devices/TestDevice"),
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armhybridnetwork.AzureStackEdgeFormat{
	// 		DeviceType: to.Ptr(armhybridnetwork.DeviceTypeAzureStackEdge),
	// 		NetworkFunctions: []*armhybridnetwork.SubResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.HybridNetwork/networkFunctions/TestNetworkFunction"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 		Status: to.Ptr(armhybridnetwork.StatusNotRegistered),
	// 		AzureStackEdge: &armhybridnetwork.SubResource{
	// 			ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg2/providers/Microsoft.DataboxEdge/DataboxEdgeDevices/TestDataboxEdgeDeviceName"),
	// 		},
	// 	},
	// }
}
Output:

type DevicesClientBeginCreateOrUpdateOptions added in v0.2.0

type DevicesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DevicesClientBeginCreateOrUpdateOptions contains the optional parameters for the DevicesClient.BeginCreateOrUpdate method.

type DevicesClientBeginDeleteOptions added in v0.2.0

type DevicesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

DevicesClientBeginDeleteOptions contains the optional parameters for the DevicesClient.BeginDelete method.

type DevicesClientCreateOrUpdateResponse added in v0.2.0

type DevicesClientCreateOrUpdateResponse struct {
	Device
}

DevicesClientCreateOrUpdateResponse contains the response from method DevicesClient.BeginCreateOrUpdate.

type DevicesClientDeleteResponse added in v0.2.0

type DevicesClientDeleteResponse struct {
}

DevicesClientDeleteResponse contains the response from method DevicesClient.BeginDelete.

type DevicesClientGetOptions added in v0.2.0

type DevicesClientGetOptions struct {
}

DevicesClientGetOptions contains the optional parameters for the DevicesClient.Get method.

type DevicesClientGetResponse added in v0.2.0

type DevicesClientGetResponse struct {
	Device
}

DevicesClientGetResponse contains the response from method DevicesClient.Get.

type DevicesClientListByResourceGroupOptions added in v0.2.0

type DevicesClientListByResourceGroupOptions struct {
}

DevicesClientListByResourceGroupOptions contains the optional parameters for the DevicesClient.NewListByResourceGroupPager method.

type DevicesClientListByResourceGroupResponse added in v0.2.0

type DevicesClientListByResourceGroupResponse struct {
	DeviceListResult
}

DevicesClientListByResourceGroupResponse contains the response from method DevicesClient.NewListByResourceGroupPager.

type DevicesClientListBySubscriptionOptions added in v0.2.0

type DevicesClientListBySubscriptionOptions struct {
}

DevicesClientListBySubscriptionOptions contains the optional parameters for the DevicesClient.NewListBySubscriptionPager method.

type DevicesClientListBySubscriptionResponse added in v0.2.0

type DevicesClientListBySubscriptionResponse struct {
	DeviceListResult
}

DevicesClientListBySubscriptionResponse contains the response from method DevicesClient.NewListBySubscriptionPager.

type DevicesClientListRegistrationKeyOptions added in v0.2.0

type DevicesClientListRegistrationKeyOptions struct {
}

DevicesClientListRegistrationKeyOptions contains the optional parameters for the DevicesClient.ListRegistrationKey method.

type DevicesClientListRegistrationKeyResponse added in v0.2.0

type DevicesClientListRegistrationKeyResponse struct {
	DeviceRegistrationKey
}

DevicesClientListRegistrationKeyResponse contains the response from method DevicesClient.ListRegistrationKey.

type DevicesClientUpdateTagsOptions added in v0.2.0

type DevicesClientUpdateTagsOptions struct {
}

DevicesClientUpdateTagsOptions contains the optional parameters for the DevicesClient.UpdateTags method.

type DevicesClientUpdateTagsResponse added in v0.2.0

type DevicesClientUpdateTagsResponse struct {
	Device
}

DevicesClientUpdateTagsResponse contains the response from method DevicesClient.UpdateTags.

type DiskCreateOptionTypes

type DiskCreateOptionTypes string

DiskCreateOptionTypes - Specifies how the virtual machine should be created.

const (
	DiskCreateOptionTypesEmpty   DiskCreateOptionTypes = "Empty"
	DiskCreateOptionTypesUnknown DiskCreateOptionTypes = "Unknown"
)

func PossibleDiskCreateOptionTypesValues

func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes

PossibleDiskCreateOptionTypesValues returns the possible values for the DiskCreateOptionTypes const type.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON added in v1.1.0

func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v1.1.0

func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON

func (e ErrorDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON added in v1.1.0

func (e *ErrorDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

func (ErrorResponse) MarshalJSON added in v1.1.0

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.1.0

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type IPAllocationMethod

type IPAllocationMethod string

IPAllocationMethod - IP address allocation method.

const (
	IPAllocationMethodDynamic IPAllocationMethod = "Dynamic"
	IPAllocationMethodStatic  IPAllocationMethod = "Static"
	IPAllocationMethodUnknown IPAllocationMethod = "Unknown"
)

func PossibleIPAllocationMethodValues

func PossibleIPAllocationMethodValues() []IPAllocationMethod

PossibleIPAllocationMethodValues returns the possible values for the IPAllocationMethod const type.

type IPVersion

type IPVersion string

IPVersion - IP address version.

const (
	IPVersionIPv4    IPVersion = "IPv4"
	IPVersionUnknown IPVersion = "Unknown"
)

func PossibleIPVersionValues

func PossibleIPVersionValues() []IPVersion

PossibleIPVersionValues returns the possible values for the IPVersion const type.

type ImageReference

type ImageReference struct {
	// Specifies in decimal numbers, the exact version of image used to create the virtual machine.
	ExactVersion *string

	// Specifies the offer of the image used to create the virtual machine.
	Offer *string

	// The image publisher.
	Publisher *string

	// The image SKU.
	SKU *string

	// Specifies the version of the image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'.
	// Major, Minor, and Build are decimal numbers. Specify 'latest' to use the
	// latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update
	// after deploy time even if a new version becomes available.
	Version *string
}

ImageReference - The image reference properties.

func (ImageReference) MarshalJSON added in v1.1.0

func (i ImageReference) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ImageReference.

func (*ImageReference) UnmarshalJSON added in v1.1.0

func (i *ImageReference) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImageReference.

type LinuxConfiguration

type LinuxConfiguration struct {
	// Specifies the ssh key configuration for a Linux OS.
	SSH *SSHConfiguration
}

LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine.

func (LinuxConfiguration) MarshalJSON added in v1.1.0

func (l LinuxConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinuxConfiguration.

func (*LinuxConfiguration) UnmarshalJSON added in v1.1.0

func (l *LinuxConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinuxConfiguration.

type NetworkFunction

type NetworkFunction struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// A unique read-only string that changes whenever the resource is updated.
	Etag *string

	// Network function properties.
	Properties *NetworkFunctionPropertiesFormat

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

NetworkFunction - Network function resource response.

func (NetworkFunction) MarshalJSON

func (n NetworkFunction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunction.

func (*NetworkFunction) UnmarshalJSON

func (n *NetworkFunction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunction.

type NetworkFunctionListResult

type NetworkFunctionListResult struct {
	// A list of network function resources in a subscription or resource group.
	Value []*NetworkFunction

	// READ-ONLY; The URL to get the next set of results.
	NextLink *string
}

NetworkFunctionListResult - Response for network function API service call.

func (NetworkFunctionListResult) MarshalJSON

func (n NetworkFunctionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionListResult.

func (*NetworkFunctionListResult) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionListResult.

type NetworkFunctionPropertiesFormat

type NetworkFunctionPropertiesFormat struct {
	// The reference to the device resource. Once set, it cannot be updated.
	Device *SubResource

	// The parameters for the managed application.
	ManagedApplicationParameters any

	// The network function container configurations from the user.
	NetworkFunctionContainerConfigurations any

	// The network function configurations from the user.
	NetworkFunctionUserConfigurations []*NetworkFunctionUserConfiguration

	// The sku name for the network function. Once set, it cannot be updated.
	SKUName *string

	// The vendor name for the network function. Once set, it cannot be updated.
	VendorName *string

	// READ-ONLY; The resource URI of the managed application.
	ManagedApplication *SubResource

	// READ-ONLY; The provisioning state of the network function resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The sku type for the network function.
	SKUType *SKUType

	// READ-ONLY; The service key for the network function resource.
	ServiceKey *string

	// READ-ONLY; The vendor provisioning state for the network function resource.
	VendorProvisioningState *VendorProvisioningState
}

NetworkFunctionPropertiesFormat - Network function properties.

func (NetworkFunctionPropertiesFormat) MarshalJSON

func (n NetworkFunctionPropertiesFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionPropertiesFormat.

func (*NetworkFunctionPropertiesFormat) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionPropertiesFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionPropertiesFormat.

type NetworkFunctionRoleConfiguration

type NetworkFunctionRoleConfiguration struct {
	// Specifies the custom settings for the virtual machine.
	CustomProfile *CustomProfile

	// The network interface configurations.
	NetworkInterfaces []*NetworkInterface

	// Specifies the operating system settings for the role instance. This value can be updated during the deployment of network
	// function.
	OSProfile *OsProfile

	// The name of the network function role.
	RoleName *string

	// Role type.
	RoleType *NetworkFunctionRoleConfigurationType

	// Specifies the storage settings for the virtual machine disks.
	StorageProfile *StorageProfile

	// The user parameters for customers. The format of user data parameters has to be matched with the provided user data template.
	UserDataParameters any

	// The user data template for customers. This is a json schema template describing the format and data type of user data parameters.
	UserDataTemplate any

	// The size of the virtual machine.
	VirtualMachineSize *VirtualMachineSizeTypes
}

NetworkFunctionRoleConfiguration - Network function role configuration.

func (NetworkFunctionRoleConfiguration) MarshalJSON

func (n NetworkFunctionRoleConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionRoleConfiguration.

func (*NetworkFunctionRoleConfiguration) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionRoleConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionRoleConfiguration.

type NetworkFunctionRoleConfigurationType

type NetworkFunctionRoleConfigurationType string

NetworkFunctionRoleConfigurationType - Role type.

const (
	NetworkFunctionRoleConfigurationTypeUnknown        NetworkFunctionRoleConfigurationType = "Unknown"
	NetworkFunctionRoleConfigurationTypeVirtualMachine NetworkFunctionRoleConfigurationType = "VirtualMachine"
)

func PossibleNetworkFunctionRoleConfigurationTypeValues

func PossibleNetworkFunctionRoleConfigurationTypeValues() []NetworkFunctionRoleConfigurationType

PossibleNetworkFunctionRoleConfigurationTypeValues returns the possible values for the NetworkFunctionRoleConfigurationType const type.

type NetworkFunctionRoleInstanceListResult

type NetworkFunctionRoleInstanceListResult struct {
	// READ-ONLY; The URL to get the next set of results.
	NextLink *string

	// READ-ONLY; A list of role instances.
	Value []*RoleInstance
}

NetworkFunctionRoleInstanceListResult - List of role instances of vendor network function.

func (NetworkFunctionRoleInstanceListResult) MarshalJSON

func (n NetworkFunctionRoleInstanceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionRoleInstanceListResult.

func (*NetworkFunctionRoleInstanceListResult) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionRoleInstanceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionRoleInstanceListResult.

type NetworkFunctionSKUDetails

type NetworkFunctionSKUDetails struct {
	// The network function sku type.
	SKUType *SKUType

	// The network function sku role details.
	Value []*NetworkFunctionSKURoleDetails

	// READ-ONLY; The URL to get the next set of results.
	NextLink *string
}

NetworkFunctionSKUDetails - The network function sku details.

func (NetworkFunctionSKUDetails) MarshalJSON

func (n NetworkFunctionSKUDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionSKUDetails.

func (*NetworkFunctionSKUDetails) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionSKUDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionSKUDetails.

type NetworkFunctionSKUListResult

type NetworkFunctionSKUListResult struct {
	// The network function vendor sku overview properties.
	Value []*SKUOverview

	// READ-ONLY; The URL to get the next set of results.
	NextLink *string
}

NetworkFunctionSKUListResult - A list of available network function skus.

func (NetworkFunctionSKUListResult) MarshalJSON

func (n NetworkFunctionSKUListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionSKUListResult.

func (*NetworkFunctionSKUListResult) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionSKUListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionSKUListResult.

type NetworkFunctionSKURoleDetails

type NetworkFunctionSKURoleDetails struct {
	// The network interface configuration.
	NetworkInterfaces []*NetworkInterface

	// The name of the network function role.
	RoleName *string

	// The user parameters for customers.
	UserDataParameters any

	// The user data template for customers.
	UserDataTemplate any
}

NetworkFunctionSKURoleDetails - The network function user configuration.

func (NetworkFunctionSKURoleDetails) MarshalJSON

func (n NetworkFunctionSKURoleDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionSKURoleDetails.

func (*NetworkFunctionSKURoleDetails) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionSKURoleDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionSKURoleDetails.

type NetworkFunctionTemplate

type NetworkFunctionTemplate struct {
	// An array of network function role definitions.
	NetworkFunctionRoleConfigurations []*NetworkFunctionRoleConfiguration
}

NetworkFunctionTemplate - The network function template.

func (NetworkFunctionTemplate) MarshalJSON

func (n NetworkFunctionTemplate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionTemplate.

func (*NetworkFunctionTemplate) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionTemplate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionTemplate.

type NetworkFunctionType

type NetworkFunctionType string

NetworkFunctionType - The network function type.

const (
	NetworkFunctionTypeContainerizedNetworkFunction NetworkFunctionType = "ContainerizedNetworkFunction"
	NetworkFunctionTypeUnknown                      NetworkFunctionType = "Unknown"
	NetworkFunctionTypeVirtualNetworkFunction       NetworkFunctionType = "VirtualNetworkFunction"
)

func PossibleNetworkFunctionTypeValues

func PossibleNetworkFunctionTypeValues() []NetworkFunctionType

PossibleNetworkFunctionTypeValues returns the possible values for the NetworkFunctionType const type.

type NetworkFunctionUserConfiguration

type NetworkFunctionUserConfiguration struct {
	// The network interface configuration.
	NetworkInterfaces []*NetworkInterface

	// Specifies the operating system settings for the role instance.
	OSProfile *NetworkFunctionUserConfigurationOsProfile

	// The name of the network function role.
	RoleName *string

	// The user data parameters from the customer.
	UserDataParameters any
}

NetworkFunctionUserConfiguration - The network function user configuration.

func (NetworkFunctionUserConfiguration) MarshalJSON

func (n NetworkFunctionUserConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionUserConfiguration.

func (*NetworkFunctionUserConfiguration) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionUserConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionUserConfiguration.

type NetworkFunctionUserConfigurationOsProfile

type NetworkFunctionUserConfigurationOsProfile struct {
	// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved
	// as a file on the virtual machine. The maximum length of the binary array is
	// 65535 bytes.
	// Note: Do not pass any secrets or passwords in customData property
	// This property cannot be updated after the VM is created.
	// customData is passed to the VM to be saved as a file. For more information see Custom Data on Azure VMs [https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/]
	// For using cloud-init for your Linux VM, see Using cloud-init to customize a Linux VM during creation
	// [https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json]
	CustomData *string
}

NetworkFunctionUserConfigurationOsProfile - Specifies the operating system settings for the role instance.

func (NetworkFunctionUserConfigurationOsProfile) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionUserConfigurationOsProfile.

func (*NetworkFunctionUserConfigurationOsProfile) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionUserConfigurationOsProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionUserConfigurationOsProfile.

type NetworkFunctionVendor

type NetworkFunctionVendor struct {
	// Vendors of Hybrid Network service provider.
	Properties *VendorDetails
}

NetworkFunctionVendor - The network function vendor.

func (NetworkFunctionVendor) MarshalJSON added in v1.1.0

func (n NetworkFunctionVendor) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionVendor.

func (*NetworkFunctionVendor) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionVendor) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionVendor.

type NetworkFunctionVendorConfiguration

type NetworkFunctionVendorConfiguration struct {
	// The network interface configurations.
	NetworkInterfaces []*NetworkInterface

	// Specifies the operating system settings for the role instance.
	OSProfile *OsProfile

	// The name of the vendor network function role.
	RoleName *string

	// READ-ONLY; The user parameters from the customer.
	UserDataParameters any
}

NetworkFunctionVendorConfiguration - Network function vendor configuration.

func (NetworkFunctionVendorConfiguration) MarshalJSON

func (n NetworkFunctionVendorConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionVendorConfiguration.

func (*NetworkFunctionVendorConfiguration) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionVendorConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionVendorConfiguration.

type NetworkFunctionVendorListResult

type NetworkFunctionVendorListResult struct {
	// A list of available network function vendors and skus.
	Value []*NetworkFunctionVendor

	// READ-ONLY; The URL to get the next set of results.
	NextLink *string
}

NetworkFunctionVendorListResult - The network function vendor list result.

func (NetworkFunctionVendorListResult) MarshalJSON

func (n NetworkFunctionVendorListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkFunctionVendorListResult.

func (*NetworkFunctionVendorListResult) UnmarshalJSON added in v1.1.0

func (n *NetworkFunctionVendorListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkFunctionVendorListResult.

type NetworkFunctionVendorSKUsClient

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

NetworkFunctionVendorSKUsClient contains the methods for the NetworkFunctionVendorSKUs group. Don't use this type directly, use NewNetworkFunctionVendorSKUsClient() instead.

func NewNetworkFunctionVendorSKUsClient

func NewNetworkFunctionVendorSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkFunctionVendorSKUsClient, error)

NewNetworkFunctionVendorSKUsClient creates a new instance of NetworkFunctionVendorSKUsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*NetworkFunctionVendorSKUsClient) NewListBySKUPager added in v0.4.0

NewListBySKUPager - Lists information about network function vendor sku details.

Generated from API version 2021-05-01

  • vendorName - The name of the network function vendor.
  • vendorSKUName - The name of the network function sku.
  • options - NetworkFunctionVendorSKUsClientListBySKUOptions contains the optional parameters for the NetworkFunctionVendorSKUsClient.NewListBySKUPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/NetworkFunctionSkuDetailsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNetworkFunctionVendorSKUsClient().NewListBySKUPager("testVendor", "testSku", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.NetworkFunctionSKUDetails = armhybridnetwork.NetworkFunctionSKUDetails{
		// 	SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
		// 	Value: []*armhybridnetwork.NetworkFunctionSKURoleDetails{
		// 		{
		// 			NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
		// 				{
		// 					IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 						{
		// 							Gateway: to.Ptr(""),
		// 							IPAddress: to.Ptr(""),
		// 							IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 							IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 							Subnet: to.Ptr(""),
		// 					}},
		// 					MacAddress: to.Ptr(""),
		// 					NetworkInterfaceName: to.Ptr("nic1"),
		// 					VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
		// 				},
		// 				{
		// 					IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 						{
		// 							Gateway: to.Ptr(""),
		// 							IPAddress: to.Ptr(""),
		// 							IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 							IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 							Subnet: to.Ptr(""),
		// 					}},
		// 					MacAddress: to.Ptr(""),
		// 					NetworkInterfaceName: to.Ptr("nic2"),
		// 					VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeWan),
		// 			}},
		// 			RoleName: to.Ptr("testRole"),
		// 			UserDataParameters: map[string]any{
		// 			},
		// 			UserDataTemplate: map[string]any{
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*NetworkFunctionVendorSKUsClient) NewListByVendorPager added in v0.4.0

NewListByVendorPager - Lists all network function vendor sku details in a vendor.

Generated from API version 2021-05-01

  • vendorName - The name of the network function vendor.
  • options - NetworkFunctionVendorSKUsClientListByVendorOptions contains the optional parameters for the NetworkFunctionVendorSKUsClient.NewListByVendorPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/NetworkFunctionSkuListByVendor.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNetworkFunctionVendorSKUsClient().NewListByVendorPager("testVendor", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.NetworkFunctionSKUListResult = armhybridnetwork.NetworkFunctionSKUListResult{
		// 	Value: []*armhybridnetwork.SKUOverview{
		// 		{
		// 			SKUName: to.Ptr("testSku"),
		// 			SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
		// 	}},
		// }
	}
}
Output:

type NetworkFunctionVendorSKUsClientListBySKUOptions added in v0.2.0

type NetworkFunctionVendorSKUsClientListBySKUOptions struct {
}

NetworkFunctionVendorSKUsClientListBySKUOptions contains the optional parameters for the NetworkFunctionVendorSKUsClient.NewListBySKUPager method.

type NetworkFunctionVendorSKUsClientListBySKUResponse added in v0.2.0

type NetworkFunctionVendorSKUsClientListBySKUResponse struct {
	NetworkFunctionSKUDetails
}

NetworkFunctionVendorSKUsClientListBySKUResponse contains the response from method NetworkFunctionVendorSKUsClient.NewListBySKUPager.

type NetworkFunctionVendorSKUsClientListByVendorOptions added in v0.2.0

type NetworkFunctionVendorSKUsClientListByVendorOptions struct {
}

NetworkFunctionVendorSKUsClientListByVendorOptions contains the optional parameters for the NetworkFunctionVendorSKUsClient.NewListByVendorPager method.

type NetworkFunctionVendorSKUsClientListByVendorResponse added in v0.2.0

type NetworkFunctionVendorSKUsClientListByVendorResponse struct {
	NetworkFunctionSKUListResult
}

NetworkFunctionVendorSKUsClientListByVendorResponse contains the response from method NetworkFunctionVendorSKUsClient.NewListByVendorPager.

type NetworkFunctionVendorsClient

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

NetworkFunctionVendorsClient contains the methods for the NetworkFunctionVendors group. Don't use this type directly, use NewNetworkFunctionVendorsClient() instead.

func NewNetworkFunctionVendorsClient

func NewNetworkFunctionVendorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkFunctionVendorsClient, error)

NewNetworkFunctionVendorsClient creates a new instance of NetworkFunctionVendorsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*NetworkFunctionVendorsClient) NewListPager added in v0.4.0

NewListPager - Lists all the available vendor and sku information.

Generated from API version 2021-05-01

  • options - NetworkFunctionVendorsClientListOptions contains the optional parameters for the NetworkFunctionVendorsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/NetworkFunctionVendorAndSkuListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNetworkFunctionVendorsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.NetworkFunctionVendorListResult = armhybridnetwork.NetworkFunctionVendorListResult{
		// 	Value: []*armhybridnetwork.NetworkFunctionVendor{
		// 		{
		// 			Properties: &armhybridnetwork.VendorDetails{
		// 				SKUList: []*armhybridnetwork.SKUOverview{
		// 					{
		// 						SKUName: to.Ptr("testSku"),
		// 						SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
		// 				}},
		// 				VendorName: to.Ptr("testVendor"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type NetworkFunctionVendorsClientListOptions added in v0.2.0

type NetworkFunctionVendorsClientListOptions struct {
}

NetworkFunctionVendorsClientListOptions contains the optional parameters for the NetworkFunctionVendorsClient.NewListPager method.

type NetworkFunctionVendorsClientListResponse added in v0.2.0

type NetworkFunctionVendorsClientListResponse struct {
	NetworkFunctionVendorListResult
}

NetworkFunctionVendorsClientListResponse contains the response from method NetworkFunctionVendorsClient.NewListPager.

type NetworkFunctionsClient

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

NetworkFunctionsClient contains the methods for the NetworkFunctions group. Don't use this type directly, use NewNetworkFunctionsClient() instead.

func NewNetworkFunctionsClient

func NewNetworkFunctionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkFunctionsClient, error)

NewNetworkFunctionsClient creates a new instance of NetworkFunctionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*NetworkFunctionsClient) BeginCreateOrUpdate

func (client *NetworkFunctionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkFunctionName string, parameters NetworkFunction, options *NetworkFunctionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[NetworkFunctionsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a network function resource. This operation can take up to 6 hours to complete. This is expected service behavior. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkFunctionName - Resource name for the network function resource.
  • parameters - Parameters supplied in the body to the create or update network function operation.
  • options - NetworkFunctionsClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkFunctionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/NetworkFunctionCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNetworkFunctionsClient().BeginCreateOrUpdate(ctx, "rg", "testNf", armhybridnetwork.NetworkFunction{
		Location: to.Ptr("eastus"),
		Properties: &armhybridnetwork.NetworkFunctionPropertiesFormat{
			Device: &armhybridnetwork.SubResource{
				ID: to.Ptr("/subscriptions/subid/resourcegroups/rg/providers/Microsoft.HybridNetwork/devices/testDevice"),
			},
			ManagedApplicationParameters: map[string]any{},
			NetworkFunctionUserConfigurations: []*armhybridnetwork.NetworkFunctionUserConfiguration{
				{
					NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
						{
							IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
								{
									Gateway:            to.Ptr(""),
									IPAddress:          to.Ptr(""),
									IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
									IPVersion:          to.Ptr(armhybridnetwork.IPVersionIPv4),
									Subnet:             to.Ptr(""),
								}},
							MacAddress:           to.Ptr(""),
							NetworkInterfaceName: to.Ptr("nic1"),
							VMSwitchType:         to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
						},
						{
							IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
								{
									Gateway:            to.Ptr(""),
									IPAddress:          to.Ptr(""),
									IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
									IPVersion:          to.Ptr(armhybridnetwork.IPVersionIPv4),
									Subnet:             to.Ptr(""),
								}},
							MacAddress:           to.Ptr("DC-97-F8-79-16-7D"),
							NetworkInterfaceName: to.Ptr("nic2"),
							VMSwitchType:         to.Ptr(armhybridnetwork.VMSwitchTypeWan),
						}},
					RoleName:           to.Ptr("testRole"),
					UserDataParameters: map[string]any{},
				}},
			SKUName:    to.Ptr("testSku"),
			SKUType:    to.Ptr(armhybridnetwork.SKUTypeSDWAN),
			VendorName: to.Ptr("testVendor"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NetworkFunction = armhybridnetwork.NetworkFunction{
	// 	Name: to.Ptr("testNf"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/networkFunctions"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg/providers/Microsoft.HybridNetwork/networkFunctions/testNf"),
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armhybridnetwork.NetworkFunctionPropertiesFormat{
	// 		Device: &armhybridnetwork.SubResource{
	// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg/providers/Microsoft.HybridNetwork/devices/testDevice"),
	// 		},
	// 		ManagedApplication: &armhybridnetwork.SubResource{
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/testServiceKey"),
	// 		},
	// 		ManagedApplicationParameters: map[string]any{
	// 		},
	// 		NetworkFunctionUserConfigurations: []*armhybridnetwork.NetworkFunctionUserConfiguration{
	// 			{
	// 				NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
	// 					{
	// 						IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 							{
	// 								Gateway: to.Ptr(""),
	// 								IPAddress: to.Ptr(""),
	// 								IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 								IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 								Subnet: to.Ptr(""),
	// 						}},
	// 						MacAddress: to.Ptr(""),
	// 						NetworkInterfaceName: to.Ptr("nic1"),
	// 						VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
	// 					},
	// 					{
	// 						IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 							{
	// 								Gateway: to.Ptr(""),
	// 								IPAddress: to.Ptr(""),
	// 								IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 								IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 								Subnet: to.Ptr(""),
	// 						}},
	// 						MacAddress: to.Ptr("DC-97-F8-79-16-7D"),
	// 						NetworkInterfaceName: to.Ptr("nic2"),
	// 						VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeWan),
	// 				}},
	// 				RoleName: to.Ptr("testRole"),
	// 				UserDataParameters: map[string]any{
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 		ServiceKey: to.Ptr("testServiceKey"),
	// 		SKUName: to.Ptr("testSku"),
	// 		SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
	// 		VendorName: to.Ptr("testVendor"),
	// 		VendorProvisioningState: to.Ptr(armhybridnetwork.VendorProvisioningStateNotProvisioned),
	// 	},
	// }
}
Output:

func (*NetworkFunctionsClient) BeginDelete

func (client *NetworkFunctionsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkFunctionName string, options *NetworkFunctionsClientBeginDeleteOptions) (*runtime.Poller[NetworkFunctionsClientDeleteResponse], error)

BeginDelete - Deletes the specified network function resource. This operation can take up to 1 hour to complete. This is expected service behavior. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkFunctionName - The name of the network function.
  • options - NetworkFunctionsClientBeginDeleteOptions contains the optional parameters for the NetworkFunctionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/NetworkFunctionDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNetworkFunctionsClient().BeginDelete(ctx, "rg", "testNf", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*NetworkFunctionsClient) Get

func (client *NetworkFunctionsClient) Get(ctx context.Context, resourceGroupName string, networkFunctionName string, options *NetworkFunctionsClientGetOptions) (NetworkFunctionsClientGetResponse, error)

Get - Gets information about the specified network function resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkFunctionName - The name of the network function resource.
  • options - NetworkFunctionsClientGetOptions contains the optional parameters for the NetworkFunctionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/NetworkFunctionGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNetworkFunctionsClient().Get(ctx, "rg", "testNf", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NetworkFunction = armhybridnetwork.NetworkFunction{
	// 	Name: to.Ptr("testNf"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/networkFunctions"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg/providers/Microsoft.HybridNetwork/networkFunctions/testNf"),
	// 	Location: to.Ptr("eastus"),
	// 	Properties: &armhybridnetwork.NetworkFunctionPropertiesFormat{
	// 		Device: &armhybridnetwork.SubResource{
	// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg/providers/Microsoft.HybridNetwork/devices/testDevice"),
	// 		},
	// 		ManagedApplication: &armhybridnetwork.SubResource{
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/testServiceKey"),
	// 		},
	// 		ManagedApplicationParameters: map[string]any{
	// 		},
	// 		NetworkFunctionUserConfigurations: []*armhybridnetwork.NetworkFunctionUserConfiguration{
	// 			{
	// 				NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
	// 					{
	// 						IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 							{
	// 								Gateway: to.Ptr(""),
	// 								IPAddress: to.Ptr(""),
	// 								IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 								IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 								Subnet: to.Ptr(""),
	// 						}},
	// 						MacAddress: to.Ptr(""),
	// 						NetworkInterfaceName: to.Ptr("nic1"),
	// 						VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
	// 					},
	// 					{
	// 						IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 							{
	// 								Gateway: to.Ptr(""),
	// 								IPAddress: to.Ptr(""),
	// 								IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 								IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 								Subnet: to.Ptr(""),
	// 						}},
	// 						MacAddress: to.Ptr("DC-97-F8-79-16-7D"),
	// 						NetworkInterfaceName: to.Ptr("nic2"),
	// 						VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeWan),
	// 				}},
	// 				RoleName: to.Ptr("testRole"),
	// 				UserDataParameters: map[string]any{
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 		ServiceKey: to.Ptr("testServiceKey"),
	// 		SKUName: to.Ptr("testSku"),
	// 		SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
	// 		VendorName: to.Ptr("testVendor"),
	// 		VendorProvisioningState: to.Ptr(armhybridnetwork.VendorProvisioningStateNotProvisioned),
	// 	},
	// }
}
Output:

func (*NetworkFunctionsClient) NewListByResourceGroupPager added in v0.4.0

NewListByResourceGroupPager - Lists all the network function resources in a resource group.

Generated from API version 2021-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - NetworkFunctionsClientListByResourceGroupOptions contains the optional parameters for the NetworkFunctionsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/NetworkFunctionListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNetworkFunctionsClient().NewListByResourceGroupPager("rg", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.NetworkFunctionListResult = armhybridnetwork.NetworkFunctionListResult{
		// 	Value: []*armhybridnetwork.NetworkFunction{
		// 		{
		// 			Name: to.Ptr("testNf"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/networkFunctions"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg/providers/Microsoft.HybridNetwork/networkFunctions/testNf"),
		// 			Location: to.Ptr("eastus"),
		// 			Properties: &armhybridnetwork.NetworkFunctionPropertiesFormat{
		// 				Device: &armhybridnetwork.SubResource{
		// 					ID: to.Ptr("/subscriptions/subid/resourcegroups/rg/providers/Microsoft.HybridNetwork/devices/testDevice"),
		// 				},
		// 				ManagedApplication: &armhybridnetwork.SubResource{
		// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/testServiceKey"),
		// 				},
		// 				ManagedApplicationParameters: map[string]any{
		// 				},
		// 				NetworkFunctionUserConfigurations: []*armhybridnetwork.NetworkFunctionUserConfiguration{
		// 					{
		// 						NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
		// 							{
		// 								IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 									{
		// 										Gateway: to.Ptr(""),
		// 										IPAddress: to.Ptr(""),
		// 										IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 										IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 										Subnet: to.Ptr(""),
		// 								}},
		// 								MacAddress: to.Ptr(""),
		// 								NetworkInterfaceName: to.Ptr("nic1"),
		// 								VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
		// 							},
		// 							{
		// 								IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 									{
		// 										Gateway: to.Ptr(""),
		// 										IPAddress: to.Ptr(""),
		// 										IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 										IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 										Subnet: to.Ptr(""),
		// 								}},
		// 								MacAddress: to.Ptr("DC-97-F8-79-16-7D"),
		// 								NetworkInterfaceName: to.Ptr("nic2"),
		// 								VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeWan),
		// 						}},
		// 						RoleName: to.Ptr("testRole"),
		// 						UserDataParameters: map[string]any{
		// 						},
		// 				}},
		// 				ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
		// 				ServiceKey: to.Ptr("testServiceKey"),
		// 				SKUName: to.Ptr("testSku"),
		// 				SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
		// 				VendorName: to.Ptr("testVendor"),
		// 				VendorProvisioningState: to.Ptr(armhybridnetwork.VendorProvisioningStateNotProvisioned),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*NetworkFunctionsClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - Lists all the network functions in a subscription.

Generated from API version 2021-05-01

  • options - NetworkFunctionsClientListBySubscriptionOptions contains the optional parameters for the NetworkFunctionsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/NetworkFunctionListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNetworkFunctionsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.NetworkFunctionListResult = armhybridnetwork.NetworkFunctionListResult{
		// 	Value: []*armhybridnetwork.NetworkFunction{
		// 		{
		// 			Name: to.Ptr("testNf"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/networkFunctions"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg/providers/Microsoft.HybridNetwork/networkFunctions/testNf"),
		// 			Location: to.Ptr("eastus"),
		// 			Properties: &armhybridnetwork.NetworkFunctionPropertiesFormat{
		// 				Device: &armhybridnetwork.SubResource{
		// 					ID: to.Ptr("/subscriptions/subid/resourcegroups/rg/providers/Microsoft.HybridNetwork/devices/testDevice"),
		// 				},
		// 				ManagedApplication: &armhybridnetwork.SubResource{
		// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/testServiceKey"),
		// 				},
		// 				ManagedApplicationParameters: map[string]any{
		// 				},
		// 				NetworkFunctionUserConfigurations: []*armhybridnetwork.NetworkFunctionUserConfiguration{
		// 					{
		// 						NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
		// 							{
		// 								IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 									{
		// 										Gateway: to.Ptr(""),
		// 										IPAddress: to.Ptr(""),
		// 										IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 										IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 										Subnet: to.Ptr(""),
		// 								}},
		// 								MacAddress: to.Ptr(""),
		// 								NetworkInterfaceName: to.Ptr("nic1"),
		// 								VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
		// 							},
		// 							{
		// 								IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 									{
		// 										Gateway: to.Ptr(""),
		// 										IPAddress: to.Ptr(""),
		// 										IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 										IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 										Subnet: to.Ptr(""),
		// 								}},
		// 								MacAddress: to.Ptr("DC-97-F8-79-16-7D"),
		// 								NetworkInterfaceName: to.Ptr("nic2"),
		// 								VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeWan),
		// 						}},
		// 						RoleName: to.Ptr("testRole"),
		// 						UserDataParameters: map[string]any{
		// 						},
		// 				}},
		// 				ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
		// 				ServiceKey: to.Ptr("testServiceKey"),
		// 				SKUName: to.Ptr("testSku"),
		// 				SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
		// 				VendorName: to.Ptr("testVendor"),
		// 				VendorProvisioningState: to.Ptr(armhybridnetwork.VendorProvisioningStateNotProvisioned),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*NetworkFunctionsClient) UpdateTags

func (client *NetworkFunctionsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkFunctionName string, parameters TagsObject, options *NetworkFunctionsClientUpdateTagsOptions) (NetworkFunctionsClientUpdateTagsResponse, error)

UpdateTags - Updates the tags for the network function resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • networkFunctionName - Resource name for the network function resource.
  • parameters - Parameters supplied to the update network function tags operation.
  • options - NetworkFunctionsClientUpdateTagsOptions contains the optional parameters for the NetworkFunctionsClient.UpdateTags method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/NetworkFunctionUpdateTags.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNetworkFunctionsClient().UpdateTags(ctx, "rg", "testNf", armhybridnetwork.TagsObject{
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NetworkFunction = armhybridnetwork.NetworkFunction{
	// 	Name: to.Ptr("testNf"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/networkFunctions"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg/providers/Microsoft.HybridNetwork/networkFunctions/testNf"),
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armhybridnetwork.NetworkFunctionPropertiesFormat{
	// 		Device: &armhybridnetwork.SubResource{
	// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg/providers/Microsoft.HybridNetwork/devices/testDevice"),
	// 		},
	// 		ManagedApplication: &armhybridnetwork.SubResource{
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/testServiceKey"),
	// 		},
	// 		ManagedApplicationParameters: map[string]any{
	// 		},
	// 		NetworkFunctionUserConfigurations: []*armhybridnetwork.NetworkFunctionUserConfiguration{
	// 			{
	// 				NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
	// 					{
	// 						IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 							{
	// 								Gateway: to.Ptr(""),
	// 								IPAddress: to.Ptr(""),
	// 								IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 								IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 								Subnet: to.Ptr(""),
	// 						}},
	// 						MacAddress: to.Ptr(""),
	// 						NetworkInterfaceName: to.Ptr("nic1"),
	// 						VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
	// 					},
	// 					{
	// 						IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 							{
	// 								Gateway: to.Ptr(""),
	// 								IPAddress: to.Ptr(""),
	// 								IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 								IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 								Subnet: to.Ptr(""),
	// 						}},
	// 						MacAddress: to.Ptr("DC-97-F8-79-16-7D"),
	// 						NetworkInterfaceName: to.Ptr("nic2"),
	// 						VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeWan),
	// 				}},
	// 				RoleName: to.Ptr("testRole"),
	// 				UserDataParameters: map[string]any{
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 		ServiceKey: to.Ptr("testServiceKey"),
	// 		SKUName: to.Ptr("testSku"),
	// 		SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
	// 		VendorName: to.Ptr("testVendor"),
	// 		VendorProvisioningState: to.Ptr(armhybridnetwork.VendorProvisioningStateNotProvisioned),
	// 	},
	// }
}
Output:

type NetworkFunctionsClientBeginCreateOrUpdateOptions added in v0.2.0

type NetworkFunctionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

NetworkFunctionsClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkFunctionsClient.BeginCreateOrUpdate method.

type NetworkFunctionsClientBeginDeleteOptions added in v0.2.0

type NetworkFunctionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

NetworkFunctionsClientBeginDeleteOptions contains the optional parameters for the NetworkFunctionsClient.BeginDelete method.

type NetworkFunctionsClientCreateOrUpdateResponse added in v0.2.0

type NetworkFunctionsClientCreateOrUpdateResponse struct {
	NetworkFunction
}

NetworkFunctionsClientCreateOrUpdateResponse contains the response from method NetworkFunctionsClient.BeginCreateOrUpdate.

type NetworkFunctionsClientDeleteResponse added in v0.2.0

type NetworkFunctionsClientDeleteResponse struct {
}

NetworkFunctionsClientDeleteResponse contains the response from method NetworkFunctionsClient.BeginDelete.

type NetworkFunctionsClientGetOptions added in v0.2.0

type NetworkFunctionsClientGetOptions struct {
}

NetworkFunctionsClientGetOptions contains the optional parameters for the NetworkFunctionsClient.Get method.

type NetworkFunctionsClientGetResponse added in v0.2.0

type NetworkFunctionsClientGetResponse struct {
	NetworkFunction
}

NetworkFunctionsClientGetResponse contains the response from method NetworkFunctionsClient.Get.

type NetworkFunctionsClientListByResourceGroupOptions added in v0.2.0

type NetworkFunctionsClientListByResourceGroupOptions struct {
}

NetworkFunctionsClientListByResourceGroupOptions contains the optional parameters for the NetworkFunctionsClient.NewListByResourceGroupPager method.

type NetworkFunctionsClientListByResourceGroupResponse added in v0.2.0

type NetworkFunctionsClientListByResourceGroupResponse struct {
	NetworkFunctionListResult
}

NetworkFunctionsClientListByResourceGroupResponse contains the response from method NetworkFunctionsClient.NewListByResourceGroupPager.

type NetworkFunctionsClientListBySubscriptionOptions added in v0.2.0

type NetworkFunctionsClientListBySubscriptionOptions struct {
}

NetworkFunctionsClientListBySubscriptionOptions contains the optional parameters for the NetworkFunctionsClient.NewListBySubscriptionPager method.

type NetworkFunctionsClientListBySubscriptionResponse added in v0.2.0

type NetworkFunctionsClientListBySubscriptionResponse struct {
	NetworkFunctionListResult
}

NetworkFunctionsClientListBySubscriptionResponse contains the response from method NetworkFunctionsClient.NewListBySubscriptionPager.

type NetworkFunctionsClientUpdateTagsOptions added in v0.2.0

type NetworkFunctionsClientUpdateTagsOptions struct {
}

NetworkFunctionsClientUpdateTagsOptions contains the optional parameters for the NetworkFunctionsClient.UpdateTags method.

type NetworkFunctionsClientUpdateTagsResponse added in v0.2.0

type NetworkFunctionsClientUpdateTagsResponse struct {
	NetworkFunction
}

NetworkFunctionsClientUpdateTagsResponse contains the response from method NetworkFunctionsClient.UpdateTags.

type NetworkInterface

type NetworkInterface struct {
	// A list of IP configurations of the network interface.
	IPConfigurations []*NetworkInterfaceIPConfiguration

	// The MAC address of the network interface.
	MacAddress *string

	// The name of the network interface.
	NetworkInterfaceName *string

	// The type of the VM switch.
	VMSwitchType *VMSwitchType
}

NetworkInterface - Network interface properties.

func (NetworkInterface) MarshalJSON

func (n NetworkInterface) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkInterface.

func (*NetworkInterface) UnmarshalJSON added in v1.1.0

func (n *NetworkInterface) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterface.

type NetworkInterfaceIPConfiguration

type NetworkInterfaceIPConfiguration struct {
	// The list of DNS servers IP addresses.
	DNSServers []*string

	// The value of the gateway.
	Gateway *string

	// The value of the IP address.
	IPAddress *string

	// IP address allocation method.
	IPAllocationMethod *IPAllocationMethod

	// IP address version.
	IPVersion *IPVersion

	// The value of the subnet.
	Subnet *string
}

NetworkInterfaceIPConfiguration - Network interface IP configuration properties.

func (NetworkInterfaceIPConfiguration) MarshalJSON

func (n NetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkInterfaceIPConfiguration.

func (*NetworkInterfaceIPConfiguration) UnmarshalJSON added in v1.1.0

func (n *NetworkInterfaceIPConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfaceIPConfiguration.

type OperatingSystemTypes

type OperatingSystemTypes string

OperatingSystemTypes - The OS type.

const (
	OperatingSystemTypesLinux   OperatingSystemTypes = "Linux"
	OperatingSystemTypesUnknown OperatingSystemTypes = "Unknown"
	OperatingSystemTypesWindows OperatingSystemTypes = "Windows"
)

func PossibleOperatingSystemTypesValues

func PossibleOperatingSystemTypesValues() []OperatingSystemTypes

PossibleOperatingSystemTypesValues returns the possible values for the OperatingSystemTypes const type.

type Operation

type Operation struct {
	// READ-ONLY; The object that represents the operation.
	Display *OperationDisplay

	// READ-ONLY; Operation name: {provider}/{resource}/{operation}.
	Name *string
}

Operation - Object that describes a single Microsoft.HybridNetwork operation.

func (Operation) MarshalJSON added in v1.1.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// Description of the operation.
	Description *string

	// Operation type: Read, write, delete, etc.
	Operation *string

	// Service provider: Microsoft.HybridNetwork.
	Provider *string

	// Resource on which the operation is performed: Registration definition, registration assignment, etc.
	Resource *string
}

OperationDisplay - The object that represents the operation.

func (OperationDisplay) MarshalJSON added in v1.1.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationList

type OperationList struct {
	// READ-ONLY; The URL to get the next set of results.
	NextLink *string

	// READ-ONLY; A list of Microsoft.HybridNetwork operations.
	Value []*Operation
}

OperationList - A list of the operations.

func (OperationList) MarshalJSON

func (o OperationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationList.

func (*OperationList) UnmarshalJSON added in v1.1.0

func (o *OperationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationList.

type OperationalState

type OperationalState string

OperationalState - The operational state of the role instance.

const (
	OperationalStateRunning  OperationalState = "Running"
	OperationalStateStarting OperationalState = "Starting"
	OperationalStateStopped  OperationalState = "Stopped"
	OperationalStateStopping OperationalState = "Stopping"
	OperationalStateUnknown  OperationalState = "Unknown"
)

func PossibleOperationalStateValues

func PossibleOperationalStateValues() []OperationalState

PossibleOperationalStateValues returns the possible values for the OperationalState const type.

type OperationsClient

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

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.4.0

NewListPager - Gets a list of the operations.

Generated from API version 2021-05-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/GetOperations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationList = armhybridnetwork.OperationList{
		// 	Value: []*armhybridnetwork.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.HybridNetwork/nfs/read"),
		// 			Display: &armhybridnetwork.OperationDisplay{
		// 				Description: to.Ptr("Gets Nf"),
		// 				Operation: to.Ptr("Get Nf"),
		// 				Provider: to.Ptr("Microsoft Hybrid Network"),
		// 				Resource: to.Ptr("Nf"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	OperationList
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OsDisk

type OsDisk struct {
	// Specifies the size of os disk in gigabytes. This is the fully expanded disk size needed of the VHD image on the ASE. This
	// disk size should be greater than the size of the VHD provided in vhdUri.
	DiskSizeGB *int32

	// The VHD name.
	Name *string

	// The OS type.
	OSType *OperatingSystemTypes

	// The virtual hard disk.
	Vhd *VirtualHardDisk
}

OsDisk - Specifies information about the operating system disk used by the virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json].

func (OsDisk) MarshalJSON added in v1.1.0

func (o OsDisk) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OsDisk.

func (*OsDisk) UnmarshalJSON added in v1.1.0

func (o *OsDisk) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OsDisk.

type OsProfile

type OsProfile struct {
	// Specifies the name of the administrator account.
	// Windows-only restriction: Cannot end in "."
	// Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123",
	// "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest",
	// "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
	// Minimum-length (Linux): 1 character
	// Max-length (Linux): 64 characters
	// Max-length (Windows): 20 characters
	// For root access to the Linux VM, see Using root privileges on Linux virtual machines in Azure
	// [https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json]
	// For a list of built-in system users on Linux that should not be used in this field, see Selecting User Names for Linux
	// on Azure
	// [https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json].
	AdminUsername *string

	// Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved
	// as a file on the virtual machine. The maximum length of the binary array is
	// 65535 bytes.
	// Note: Do not pass any secrets or passwords in customData property
	// This property cannot be updated after the VM is created.
	// customData is passed to the VM to be saved as a file. For more information see Custom Data on Azure VMs [https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/]
	// For using cloud-init for your Linux VM, see Using cloud-init to customize a Linux VM during creation
	// [https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json]
	CustomData *string

	// Indicates if custom data is required to deploy this role.
	CustomDataRequired *bool

	// Specifies the Linux operating system settings on the virtual machine.
	// For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions
	// [https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json]
	// For running non-endorsed distributions, see Information for Non-Endorsed Distributions
	// [https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json].
	LinuxConfiguration *LinuxConfiguration
}

OsProfile - Specifies the operating system settings for the role instance.

func (OsProfile) MarshalJSON added in v1.1.0

func (o OsProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OsProfile.

func (*OsProfile) UnmarshalJSON added in v1.1.0

func (o *OsProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OsProfile.

type PreviewSubscription

type PreviewSubscription struct {
	// The Preview Subscription properties.
	Properties *PreviewSubscriptionProperties

	// READ-ONLY; The ARM ID of the resource.
	ID *string

	// READ-ONLY; The preview subscription ID.
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource.
	Type *string
}

PreviewSubscription - Customer subscription which can use a sku.

func (PreviewSubscription) MarshalJSON added in v1.1.0

func (p PreviewSubscription) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PreviewSubscription.

func (*PreviewSubscription) UnmarshalJSON added in v1.1.0

func (p *PreviewSubscription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PreviewSubscription.

type PreviewSubscriptionProperties

type PreviewSubscriptionProperties struct {
	// READ-ONLY; The provisioning state of the PreviewSubscription resource.
	ProvisioningState *ProvisioningState
}

PreviewSubscriptionProperties - PreviewSubscription properties

func (PreviewSubscriptionProperties) MarshalJSON added in v1.1.0

func (p PreviewSubscriptionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PreviewSubscriptionProperties.

func (*PreviewSubscriptionProperties) UnmarshalJSON added in v1.1.0

func (p *PreviewSubscriptionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PreviewSubscriptionProperties.

type PreviewSubscriptionsList

type PreviewSubscriptionsList struct {
	// A list of preview subscriptions.
	Value []*PreviewSubscription

	// READ-ONLY; The URL to get the next set of results.
	NextLink *string
}

PreviewSubscriptionsList - A list of customer subscriptions which can use a sku.

func (PreviewSubscriptionsList) MarshalJSON

func (p PreviewSubscriptionsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PreviewSubscriptionsList.

func (*PreviewSubscriptionsList) UnmarshalJSON added in v1.1.0

func (p *PreviewSubscriptionsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PreviewSubscriptionsList.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The current provisioning state.

const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateDeleted   ProvisioningState = "Deleted"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUnknown   ProvisioningState = "Unknown"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON added in v1.1.0

func (p ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.1.0

func (p *ProxyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type RoleInstance

type RoleInstance struct {
	// The ARM ID of the resource.
	ID *string

	// The role instance name.
	Name *string

	// The role instance properties.
	Properties *RoleInstanceProperties

	// The type of the resource.
	Type *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData
}

RoleInstance - The role instance sub resource.

func (RoleInstance) MarshalJSON added in v1.1.0

func (r RoleInstance) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleInstance.

func (*RoleInstance) UnmarshalJSON added in v1.1.0

func (r *RoleInstance) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleInstance.

type RoleInstanceProperties

type RoleInstanceProperties struct {
	// The operational state of the role instance.
	OperationalState *OperationalState

	// READ-ONLY; The provisioning state of the RoleInstance resource.
	ProvisioningState *ProvisioningState
}

RoleInstanceProperties - The role instance properties of the network function.

func (RoleInstanceProperties) MarshalJSON added in v1.1.0

func (r RoleInstanceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RoleInstanceProperties.

func (*RoleInstanceProperties) UnmarshalJSON added in v1.1.0

func (r *RoleInstanceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RoleInstanceProperties.

type RoleInstancesClient

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

RoleInstancesClient contains the methods for the RoleInstances group. Don't use this type directly, use NewRoleInstancesClient() instead.

func NewRoleInstancesClient

func NewRoleInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoleInstancesClient, error)

NewRoleInstancesClient creates a new instance of RoleInstancesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*RoleInstancesClient) BeginRestart

func (client *RoleInstancesClient) BeginRestart(ctx context.Context, locationName string, vendorName string, serviceKey string, roleInstanceName string, options *RoleInstancesClientBeginRestartOptions) (*runtime.Poller[RoleInstancesClientRestartResponse], error)

BeginRestart - Restarts a role instance of a vendor network function. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • locationName - The Azure region where the network function resource was created by customer.
  • vendorName - The name of the vendor.
  • serviceKey - The GUID for the vendor network function.
  • roleInstanceName - The name of the role instance of the vendor network function.
  • options - RoleInstancesClientBeginRestartOptions contains the optional parameters for the RoleInstancesClient.BeginRestart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/RoleInstanceRestart.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRoleInstancesClient().BeginRestart(ctx, "eastus", "testVendor", "testServiceKey", "mrm", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*RoleInstancesClient) BeginStart

func (client *RoleInstancesClient) BeginStart(ctx context.Context, locationName string, vendorName string, serviceKey string, roleInstanceName string, options *RoleInstancesClientBeginStartOptions) (*runtime.Poller[RoleInstancesClientStartResponse], error)

BeginStart - Starts a role instance of a vendor network function. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • locationName - The Azure region where the network function resource was created by customer.
  • vendorName - The name of the vendor.
  • serviceKey - The GUID for the vendor network function.
  • roleInstanceName - The name of the role instance of the vendor network function.
  • options - RoleInstancesClientBeginStartOptions contains the optional parameters for the RoleInstancesClient.BeginStart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/RoleInstanceStart.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRoleInstancesClient().BeginStart(ctx, "eastus", "testVendor", "testServiceKey", "mrm", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*RoleInstancesClient) BeginStop

func (client *RoleInstancesClient) BeginStop(ctx context.Context, locationName string, vendorName string, serviceKey string, roleInstanceName string, options *RoleInstancesClientBeginStopOptions) (*runtime.Poller[RoleInstancesClientStopResponse], error)

BeginStop - Powers off (stop) a role instance of a vendor network function. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • locationName - The Azure region where the network function resource was created by customer.
  • vendorName - The name of the vendor.
  • serviceKey - The GUID for the vendor network function.
  • roleInstanceName - The name of the role instance of the vendor network function.
  • options - RoleInstancesClientBeginStopOptions contains the optional parameters for the RoleInstancesClient.BeginStop method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/RoleInstanceStop.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewRoleInstancesClient().BeginStop(ctx, "eastus", "testVendor", "testServiceKey", "mrm", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*RoleInstancesClient) Get

func (client *RoleInstancesClient) Get(ctx context.Context, locationName string, vendorName string, serviceKey string, roleInstanceName string, options *RoleInstancesClientGetOptions) (RoleInstancesClientGetResponse, error)

Get - Gets the information of role instance of vendor network function. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • locationName - The Azure region where the network function resource was created by customer.
  • vendorName - The name of the vendor.
  • serviceKey - The GUID for the vendor network function.
  • roleInstanceName - The name of the role instance of the vendor network function.
  • options - RoleInstancesClientGetOptions contains the optional parameters for the RoleInstancesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/RoleInstanceGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRoleInstancesClient().Get(ctx, "eastus", "testVendor", "testServiceKey", "mrm", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RoleInstance = armhybridnetwork.RoleInstance{
	// 	Name: to.Ptr("mrm"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/locations/vendors/networkFunctions/roleInstances"),
	// 	ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/locations/eastus/vendors/testVendor/networkFunctions/testServiceKey/roleInstances/mrm"),
	// 	Properties: &armhybridnetwork.RoleInstanceProperties{
	// 		OperationalState: to.Ptr(armhybridnetwork.OperationalStateRunning),
	// 	},
	// }
}
Output:

func (*RoleInstancesClient) NewListPager added in v0.4.0

func (client *RoleInstancesClient) NewListPager(locationName string, vendorName string, serviceKey string, options *RoleInstancesClientListOptions) *runtime.Pager[RoleInstancesClientListResponse]

NewListPager - Lists the information of role instances of vendor network function.

Generated from API version 2021-05-01

  • locationName - The Azure region where the network function resource was created by customer.
  • vendorName - The name of the vendor.
  • serviceKey - The GUID for the vendor network function.
  • options - RoleInstancesClientListOptions contains the optional parameters for the RoleInstancesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/RoleInstanceListByVendorNetworkFunction.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRoleInstancesClient().NewListPager("eastus", "testVendor", "testServiceKey", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.NetworkFunctionRoleInstanceListResult = armhybridnetwork.NetworkFunctionRoleInstanceListResult{
		// 	Value: []*armhybridnetwork.RoleInstance{
		// 		{
		// 			Name: to.Ptr("mrm"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/locations/vendors/networkFunctions/roleInstances"),
		// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/locations/eastus/vendors/testVendor/networkFunctions/testServiceKey/roleInstances/mrm"),
		// 			Properties: &armhybridnetwork.RoleInstanceProperties{
		// 				OperationalState: to.Ptr(armhybridnetwork.OperationalStateRunning),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("msm"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/locations/vendors/networkFunctions/roleInstances"),
		// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/locations/eastus/vendors/testVendor/networkFunctions/testServiceKey/roleInstances/msm"),
		// 			Properties: &armhybridnetwork.RoleInstanceProperties{
		// 				OperationalState: to.Ptr(armhybridnetwork.OperationalStateStopped),
		// 			},
		// 	}},
		// }
	}
}
Output:

type RoleInstancesClientBeginRestartOptions added in v0.2.0

type RoleInstancesClientBeginRestartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RoleInstancesClientBeginRestartOptions contains the optional parameters for the RoleInstancesClient.BeginRestart method.

type RoleInstancesClientBeginStartOptions added in v0.2.0

type RoleInstancesClientBeginStartOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RoleInstancesClientBeginStartOptions contains the optional parameters for the RoleInstancesClient.BeginStart method.

type RoleInstancesClientBeginStopOptions added in v0.2.0

type RoleInstancesClientBeginStopOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

RoleInstancesClientBeginStopOptions contains the optional parameters for the RoleInstancesClient.BeginStop method.

type RoleInstancesClientGetOptions added in v0.2.0

type RoleInstancesClientGetOptions struct {
}

RoleInstancesClientGetOptions contains the optional parameters for the RoleInstancesClient.Get method.

type RoleInstancesClientGetResponse added in v0.2.0

type RoleInstancesClientGetResponse struct {
	RoleInstance
}

RoleInstancesClientGetResponse contains the response from method RoleInstancesClient.Get.

type RoleInstancesClientListOptions added in v0.2.0

type RoleInstancesClientListOptions struct {
}

RoleInstancesClientListOptions contains the optional parameters for the RoleInstancesClient.NewListPager method.

type RoleInstancesClientListResponse added in v0.2.0

type RoleInstancesClientListResponse struct {
	NetworkFunctionRoleInstanceListResult
}

RoleInstancesClientListResponse contains the response from method RoleInstancesClient.NewListPager.

type RoleInstancesClientRestartResponse added in v0.2.0

type RoleInstancesClientRestartResponse struct {
}

RoleInstancesClientRestartResponse contains the response from method RoleInstancesClient.BeginRestart.

type RoleInstancesClientStartResponse added in v0.2.0

type RoleInstancesClientStartResponse struct {
}

RoleInstancesClientStartResponse contains the response from method RoleInstancesClient.BeginStart.

type RoleInstancesClientStopResponse added in v0.2.0

type RoleInstancesClientStopResponse struct {
}

RoleInstancesClientStopResponse contains the response from method RoleInstancesClient.BeginStop.

type SKUDeploymentMode

type SKUDeploymentMode string

SKUDeploymentMode - The sku deployment mode.

const (
	SKUDeploymentModeAzure           SKUDeploymentMode = "Azure"
	SKUDeploymentModePrivateEdgeZone SKUDeploymentMode = "PrivateEdgeZone"
	SKUDeploymentModeUnknown         SKUDeploymentMode = "Unknown"
)

func PossibleSKUDeploymentModeValues

func PossibleSKUDeploymentModeValues() []SKUDeploymentMode

PossibleSKUDeploymentModeValues returns the possible values for the SKUDeploymentMode const type.

type SKUOverview

type SKUOverview struct {
	// The vendor sku name.
	SKUName *string

	// The vendor sku type.
	SKUType *SKUType
}

SKUOverview - The network function sku overview.

func (SKUOverview) MarshalJSON added in v1.1.0

func (s SKUOverview) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKUOverview.

func (*SKUOverview) UnmarshalJSON added in v1.1.0

func (s *SKUOverview) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKUOverview.

type SKUType

type SKUType string

SKUType - Sku type.

const (
	SKUTypeEvolvedPacketCore SKUType = "EvolvedPacketCore"
	SKUTypeFirewall          SKUType = "Firewall"
	SKUTypeSDWAN             SKUType = "SDWAN"
	SKUTypeUnknown           SKUType = "Unknown"
)

func PossibleSKUTypeValues

func PossibleSKUTypeValues() []SKUType

PossibleSKUTypeValues returns the possible values for the SKUType const type.

type SSHConfiguration

type SSHConfiguration struct {
	// The list of SSH public keys used to authenticate with linux based VMs.
	PublicKeys []*SSHPublicKey
}

SSHConfiguration - SSH configuration for Linux based VMs running on Azure

func (SSHConfiguration) MarshalJSON

func (s SSHConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SSHConfiguration.

func (*SSHConfiguration) UnmarshalJSON added in v1.1.0

func (s *SSHConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SSHConfiguration.

type SSHPublicKey

type SSHPublicKey struct {
	// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa
	// format.
	// For creating ssh keys, see Create SSH keys on Linux and Mac for Linux VMs in Azure
	// [https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json].
	KeyData *string

	// Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key
	// is appended to the file. Example: /home/user/.ssh/authorized_keys
	Path *string
}

SSHPublicKey - Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.

func (SSHPublicKey) MarshalJSON added in v1.1.0

func (s SSHPublicKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SSHPublicKey.

func (*SSHPublicKey) UnmarshalJSON added in v1.1.0

func (s *SSHPublicKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKey.

type Status

type Status string

Status - The current device status.

const (
	StatusDeleted       Status = "Deleted"
	StatusNotRegistered Status = "NotRegistered"
	StatusRegistered    Status = "Registered"
	StatusUnknown       Status = "Unknown"
)

func PossibleStatusValues

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type StorageProfile

type StorageProfile struct {
	// Specifies the parameters that are used to add a data disk to a virtual machine.
	DataDisks []*DataDisk

	// The image reference properties.
	ImageReference *ImageReference

	// Specifies information about the operating system disk used by the virtual machine.
	OSDisk *OsDisk
}

StorageProfile - Specifies the storage settings for the virtual machine disks.

func (StorageProfile) MarshalJSON

func (s StorageProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type StorageProfile.

func (*StorageProfile) UnmarshalJSON added in v1.1.0

func (s *StorageProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfile.

type SubResource

type SubResource struct {
	// Resource ID.
	ID *string
}

SubResource - Reference to another sub resource.

func (SubResource) MarshalJSON added in v1.1.0

func (s SubResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubResource.

func (*SubResource) UnmarshalJSON added in v1.1.0

func (s *SubResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubResource.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TagsObject

type TagsObject struct {
	// Resource tags.
	Tags map[string]*string
}

TagsObject - Tags object for patch operations.

func (TagsObject) MarshalJSON

func (t TagsObject) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagsObject.

func (*TagsObject) UnmarshalJSON added in v1.1.0

func (t *TagsObject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagsObject.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON

func (t *TrackedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type VMSwitchType

type VMSwitchType string

VMSwitchType - The type of the VM switch.

const (
	VMSwitchTypeLan        VMSwitchType = "Lan"
	VMSwitchTypeManagement VMSwitchType = "Management"
	VMSwitchTypeUnknown    VMSwitchType = "Unknown"
	VMSwitchTypeWan        VMSwitchType = "Wan"
)

func PossibleVMSwitchTypeValues

func PossibleVMSwitchTypeValues() []VMSwitchType

PossibleVMSwitchTypeValues returns the possible values for the VMSwitchType const type.

type Vendor

type Vendor struct {
	// Vendor properties.
	Properties *VendorPropertiesFormat

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Vendor resource.

func (Vendor) MarshalJSON

func (v Vendor) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Vendor.

func (*Vendor) UnmarshalJSON

func (v *Vendor) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Vendor.

type VendorDetails

type VendorDetails struct {
	// The network function sku list.
	SKUList []*SKUOverview

	// The network function vendor name.
	VendorName *string
}

VendorDetails - The network function vendor details.

func (VendorDetails) MarshalJSON

func (v VendorDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VendorDetails.

func (*VendorDetails) UnmarshalJSON added in v1.1.0

func (v *VendorDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VendorDetails.

type VendorListResult

type VendorListResult struct {
	// A list of vendors.
	Value []*Vendor

	// READ-ONLY; The URL to get the next set of results.
	NextLink *string
}

VendorListResult - Response for vendors API service call.

func (VendorListResult) MarshalJSON

func (v VendorListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VendorListResult.

func (*VendorListResult) UnmarshalJSON added in v1.1.0

func (v *VendorListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VendorListResult.

type VendorNetworkFunction

type VendorNetworkFunction struct {
	// Network function details.
	Properties *VendorNetworkFunctionPropertiesFormat

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

VendorNetworkFunction - Vendor network function sub resource.

func (VendorNetworkFunction) MarshalJSON

func (v VendorNetworkFunction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VendorNetworkFunction.

func (*VendorNetworkFunction) UnmarshalJSON

func (v *VendorNetworkFunction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VendorNetworkFunction.

type VendorNetworkFunctionListResult

type VendorNetworkFunctionListResult struct {
	// A list of vendor network functions.
	Value []*VendorNetworkFunction

	// READ-ONLY; The URL to get the next set of results.
	NextLink *string
}

VendorNetworkFunctionListResult - Response for vendors API service call.

func (VendorNetworkFunctionListResult) MarshalJSON

func (v VendorNetworkFunctionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VendorNetworkFunctionListResult.

func (*VendorNetworkFunctionListResult) UnmarshalJSON added in v1.1.0

func (v *VendorNetworkFunctionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VendorNetworkFunctionListResult.

type VendorNetworkFunctionPropertiesFormat

type VendorNetworkFunctionPropertiesFormat struct {
	// An array of network function vendor configurations.
	NetworkFunctionVendorConfigurations []*NetworkFunctionVendorConfiguration

	// The vendor controlled provisioning state of the vendor network function.
	VendorProvisioningState *VendorProvisioningState

	// READ-ONLY; The provisioning state of the vendor network function sub resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The name of the sku. Once set, it cannot be updated.
	SKUName *string

	// READ-ONLY; The sku type.
	SKUType *SKUType
}

VendorNetworkFunctionPropertiesFormat - Vendor network function properties.

func (VendorNetworkFunctionPropertiesFormat) MarshalJSON

func (v VendorNetworkFunctionPropertiesFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VendorNetworkFunctionPropertiesFormat.

func (*VendorNetworkFunctionPropertiesFormat) UnmarshalJSON added in v1.1.0

func (v *VendorNetworkFunctionPropertiesFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VendorNetworkFunctionPropertiesFormat.

type VendorNetworkFunctionsClient

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

VendorNetworkFunctionsClient contains the methods for the VendorNetworkFunctions group. Don't use this type directly, use NewVendorNetworkFunctionsClient() instead.

func NewVendorNetworkFunctionsClient

func NewVendorNetworkFunctionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VendorNetworkFunctionsClient, error)

NewVendorNetworkFunctionsClient creates a new instance of VendorNetworkFunctionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VendorNetworkFunctionsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates or updates a vendor network function. This operation can take up to 6 hours to complete. This is expected service behavior. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • locationName - The Azure region where the network function resource was created by the customer.
  • vendorName - The name of the vendor.
  • serviceKey - The GUID for the vendor network function.
  • parameters - Parameters supplied to the create or update vendor network function operation.
  • options - VendorNetworkFunctionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VendorNetworkFunctionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorNfCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVendorNetworkFunctionsClient().BeginCreateOrUpdate(ctx, "eastus", "testVendor", "testServiceKey", armhybridnetwork.VendorNetworkFunction{
		Properties: &armhybridnetwork.VendorNetworkFunctionPropertiesFormat{
			NetworkFunctionVendorConfigurations: []*armhybridnetwork.NetworkFunctionVendorConfiguration{
				{
					NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
						{
							IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
								{
									Gateway:            to.Ptr(""),
									IPAddress:          to.Ptr(""),
									IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
									IPVersion:          to.Ptr(armhybridnetwork.IPVersionIPv4),
									Subnet:             to.Ptr(""),
								}},
							MacAddress:           to.Ptr(""),
							NetworkInterfaceName: to.Ptr("nic1"),
							VMSwitchType:         to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
						},
						{
							IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
								{
									Gateway:            to.Ptr(""),
									IPAddress:          to.Ptr(""),
									IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
									IPVersion:          to.Ptr(armhybridnetwork.IPVersionIPv4),
									Subnet:             to.Ptr(""),
								}},
							MacAddress:           to.Ptr("DC-97-F8-79-16-7D"),
							NetworkInterfaceName: to.Ptr("nic2"),
							VMSwitchType:         to.Ptr(armhybridnetwork.VMSwitchTypeWan),
						}},
					OSProfile: &armhybridnetwork.OsProfile{
						AdminUsername: to.Ptr("dummyuser"),
						CustomData:    to.Ptr("base-64 encoded string of custom data"),
						LinuxConfiguration: &armhybridnetwork.LinuxConfiguration{
							SSH: &armhybridnetwork.SSHConfiguration{
								PublicKeys: []*armhybridnetwork.SSHPublicKey{
									{
										Path:    to.Ptr("home/user/.ssh/authorized_keys"),
										KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAwrr66r8n6B8Y0zMF3dOpXEapIQD9DiYQ6D6/zwor9o39jSkHNiMMER/GETBbzP83LOcekm02aRjo55ArO7gPPVvCXbrirJu9pkm4AC4BBre5xSLS= user@constoso-DSH"),
									}},
							},
						},
					},
					RoleName:           to.Ptr("testRole"),
					UserDataParameters: map[string]any{},
				}},
			SKUType:                 to.Ptr(armhybridnetwork.SKUTypeSDWAN),
			VendorProvisioningState: to.Ptr(armhybridnetwork.VendorProvisioningStateProvisioning),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VendorNetworkFunction = armhybridnetwork.VendorNetworkFunction{
	// 	Name: to.Ptr("testServiceKey"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/locations/vendors/networkFunctions"),
	// 	ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/locations/eastus/vendors/testVendor/networkFunctions/testServiceKey"),
	// 	Properties: &armhybridnetwork.VendorNetworkFunctionPropertiesFormat{
	// 		NetworkFunctionVendorConfigurations: []*armhybridnetwork.NetworkFunctionVendorConfiguration{
	// 			{
	// 				NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
	// 					{
	// 						IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 							{
	// 								Gateway: to.Ptr(""),
	// 								IPAddress: to.Ptr(""),
	// 								IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 								IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 								Subnet: to.Ptr(""),
	// 						}},
	// 						MacAddress: to.Ptr(""),
	// 						NetworkInterfaceName: to.Ptr("nic1"),
	// 						VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
	// 					},
	// 					{
	// 						IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 							{
	// 								Gateway: to.Ptr(""),
	// 								IPAddress: to.Ptr(""),
	// 								IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 								IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 								Subnet: to.Ptr(""),
	// 						}},
	// 						MacAddress: to.Ptr("DC-97-F8-79-16-7D"),
	// 						NetworkInterfaceName: to.Ptr("nic2"),
	// 						VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeWan),
	// 				}},
	// 				OSProfile: &armhybridnetwork.OsProfile{
	// 					AdminUsername: to.Ptr("dummyuser"),
	// 					CustomData: to.Ptr("base-64 encoded string of custom data"),
	// 					LinuxConfiguration: &armhybridnetwork.LinuxConfiguration{
	// 						SSH: &armhybridnetwork.SSHConfiguration{
	// 							PublicKeys: []*armhybridnetwork.SSHPublicKey{
	// 								{
	// 									Path: to.Ptr("home/user/.ssh/authorized_keys"),
	// 									KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAwrr66r8n6B8Y0zMF3dOpXEapIQD9DiYQ6D6/zwor9o39jSkHNiMMER/GETBbzP83LOcekm02aRjo55ArO7gPPVvCXbrirJu9pkm4AC4BBre5xSLS= user@constoso-DSH"),
	// 							}},
	// 						},
	// 					},
	// 				},
	// 				RoleName: to.Ptr("testRole"),
	// 				UserDataParameters: map[string]any{
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 		SKUName: to.Ptr("testSku"),
	// 		SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
	// 		VendorProvisioningState: to.Ptr(armhybridnetwork.VendorProvisioningStateProvisioning),
	// 	},
	// }
}
Output:

func (*VendorNetworkFunctionsClient) Get

Get - Gets information about the specified vendor network function. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • locationName - The Azure region where the network function resource was created by the customer.
  • vendorName - The name of the vendor.
  • serviceKey - The GUID for the vendor network function.
  • options - VendorNetworkFunctionsClientGetOptions contains the optional parameters for the VendorNetworkFunctionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorNfGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVendorNetworkFunctionsClient().Get(ctx, "eastus", "testVendor", "testServiceKey", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VendorNetworkFunction = armhybridnetwork.VendorNetworkFunction{
	// 	Name: to.Ptr("testServiceKey"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/locations/vendors/networkFunctions"),
	// 	ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/locations/eastus/vendors/testVendor/networkFunctions/testServiceKey"),
	// 	Properties: &armhybridnetwork.VendorNetworkFunctionPropertiesFormat{
	// 		NetworkFunctionVendorConfigurations: []*armhybridnetwork.NetworkFunctionVendorConfiguration{
	// 			{
	// 				NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
	// 					{
	// 						IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 							{
	// 								Gateway: to.Ptr(""),
	// 								IPAddress: to.Ptr(""),
	// 								IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 								IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 								Subnet: to.Ptr(""),
	// 						}},
	// 						MacAddress: to.Ptr(""),
	// 						NetworkInterfaceName: to.Ptr("nic1"),
	// 						VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
	// 					},
	// 					{
	// 						IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 							{
	// 								Gateway: to.Ptr(""),
	// 								IPAddress: to.Ptr(""),
	// 								IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 								IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 								Subnet: to.Ptr(""),
	// 						}},
	// 						MacAddress: to.Ptr("DC-97-F8-79-16-7D"),
	// 						NetworkInterfaceName: to.Ptr("nic2"),
	// 						VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeWan),
	// 				}},
	// 				OSProfile: &armhybridnetwork.OsProfile{
	// 					AdminUsername: to.Ptr("dummyuser"),
	// 					CustomData: to.Ptr("base-64 encoded string of custom data"),
	// 					LinuxConfiguration: &armhybridnetwork.LinuxConfiguration{
	// 						SSH: &armhybridnetwork.SSHConfiguration{
	// 							PublicKeys: []*armhybridnetwork.SSHPublicKey{
	// 								{
	// 									Path: to.Ptr("home/user/.ssh/authorized_keys"),
	// 									KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAwrr66r8n6B8Y0zMF3dOpXEapIQD9DiYQ6D6/zwor9o39jSkHNiMMER/GETBbzP83LOcekm02aRjo55ArO7gPPVvCXbrirJu9pkm4AC4BBre5xSLS= user@constoso-DSH"),
	// 							}},
	// 						},
	// 					},
	// 				},
	// 				RoleName: to.Ptr("testRole"),
	// 				UserDataParameters: map[string]any{
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 		SKUName: to.Ptr("testSku"),
	// 		SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
	// 		VendorProvisioningState: to.Ptr(armhybridnetwork.VendorProvisioningStateProvisioning),
	// 	},
	// }
}
Output:

func (*VendorNetworkFunctionsClient) NewListPager added in v0.4.0

NewListPager - Lists all the vendor network function sub resources in an Azure region, filtered by skuType, skuName, vendorProvisioningState.

Generated from API version 2021-05-01

  • locationName - The Azure region where the network function resource was created by the customer.
  • vendorName - The name of the vendor.
  • options - VendorNetworkFunctionsClientListOptions contains the optional parameters for the VendorNetworkFunctionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorNfListByVendor.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVendorNetworkFunctionsClient().NewListPager("eastus", "testVendor", &armhybridnetwork.VendorNetworkFunctionsClientListOptions{Filter: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VendorNetworkFunctionListResult = armhybridnetwork.VendorNetworkFunctionListResult{
		// 	Value: []*armhybridnetwork.VendorNetworkFunction{
		// 		{
		// 			Name: to.Ptr("TestServiceKey"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/locations/vendors/networkFunctions"),
		// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/locations/eastus/vendors/testVendor/networkFunctions/testServiceKey"),
		// 			Properties: &armhybridnetwork.VendorNetworkFunctionPropertiesFormat{
		// 				NetworkFunctionVendorConfigurations: []*armhybridnetwork.NetworkFunctionVendorConfiguration{
		// 					{
		// 						NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
		// 							{
		// 								IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 									{
		// 										Gateway: to.Ptr(""),
		// 										IPAddress: to.Ptr(""),
		// 										IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 										IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 										Subnet: to.Ptr(""),
		// 								}},
		// 								MacAddress: to.Ptr(""),
		// 								NetworkInterfaceName: to.Ptr("nic1"),
		// 								VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
		// 							},
		// 							{
		// 								IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 									{
		// 										Gateway: to.Ptr(""),
		// 										IPAddress: to.Ptr(""),
		// 										IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 										IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 										Subnet: to.Ptr(""),
		// 								}},
		// 								MacAddress: to.Ptr("DC-97-F8-79-16-7D"),
		// 								NetworkInterfaceName: to.Ptr("nic2"),
		// 								VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeWan),
		// 						}},
		// 						OSProfile: &armhybridnetwork.OsProfile{
		// 							AdminUsername: to.Ptr("dummyuser"),
		// 							CustomData: to.Ptr("base-64 encoded string of custom data"),
		// 							LinuxConfiguration: &armhybridnetwork.LinuxConfiguration{
		// 								SSH: &armhybridnetwork.SSHConfiguration{
		// 									PublicKeys: []*armhybridnetwork.SSHPublicKey{
		// 										{
		// 											Path: to.Ptr("home/user/.ssh/authorized_keys"),
		// 											KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAwrr66r8n6B8Y0zMF3dOpXEapIQD9DiYQ6D6/zwor9o39jSkHNiMMER/GETBbzP83LOcekm02aRjo55ArO7gPPVvCXbrirJu9pkm4AC4BBre5xSLS= user@constoso-DSH"),
		// 									}},
		// 								},
		// 							},
		// 						},
		// 						RoleName: to.Ptr("testRole"),
		// 						UserDataParameters: map[string]any{
		// 						},
		// 				}},
		// 				ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
		// 				SKUName: to.Ptr("testSku"),
		// 				SKUType: to.Ptr(armhybridnetwork.SKUTypeSDWAN),
		// 				VendorProvisioningState: to.Ptr(armhybridnetwork.VendorProvisioningStateProvisioning),
		// 			},
		// 	}},
		// }
	}
}
Output:

type VendorNetworkFunctionsClientBeginCreateOrUpdateOptions added in v0.2.0

type VendorNetworkFunctionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VendorNetworkFunctionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VendorNetworkFunctionsClient.BeginCreateOrUpdate method.

type VendorNetworkFunctionsClientCreateOrUpdateResponse added in v0.2.0

type VendorNetworkFunctionsClientCreateOrUpdateResponse struct {
	VendorNetworkFunction
}

VendorNetworkFunctionsClientCreateOrUpdateResponse contains the response from method VendorNetworkFunctionsClient.BeginCreateOrUpdate.

type VendorNetworkFunctionsClientGetOptions added in v0.2.0

type VendorNetworkFunctionsClientGetOptions struct {
}

VendorNetworkFunctionsClientGetOptions contains the optional parameters for the VendorNetworkFunctionsClient.Get method.

type VendorNetworkFunctionsClientGetResponse added in v0.2.0

type VendorNetworkFunctionsClientGetResponse struct {
	VendorNetworkFunction
}

VendorNetworkFunctionsClientGetResponse contains the response from method VendorNetworkFunctionsClient.Get.

type VendorNetworkFunctionsClientListOptions added in v0.2.0

type VendorNetworkFunctionsClientListOptions struct {
	// The filter to apply on the operation. The properties you can use for eq (equals) are: skuType, skuName and vendorProvisioningState.
	Filter *string
}

VendorNetworkFunctionsClientListOptions contains the optional parameters for the VendorNetworkFunctionsClient.NewListPager method.

type VendorNetworkFunctionsClientListResponse added in v0.2.0

type VendorNetworkFunctionsClientListResponse struct {
	VendorNetworkFunctionListResult
}

VendorNetworkFunctionsClientListResponse contains the response from method VendorNetworkFunctionsClient.NewListPager.

type VendorPropertiesFormat

type VendorPropertiesFormat struct {
	// READ-ONLY; The provisioning state of the vendor resource.
	ProvisioningState *ProvisioningState

	// READ-ONLY; A list of IDs of the vendor skus offered by the vendor.
	SKUs []*SubResource
}

VendorPropertiesFormat - Vendor properties.

func (VendorPropertiesFormat) MarshalJSON

func (v VendorPropertiesFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VendorPropertiesFormat.

func (*VendorPropertiesFormat) UnmarshalJSON added in v1.1.0

func (v *VendorPropertiesFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VendorPropertiesFormat.

type VendorProvisioningState

type VendorProvisioningState string

VendorProvisioningState - The current vendor provisioning state.

const (
	VendorProvisioningStateDeprovisioned            VendorProvisioningState = "Deprovisioned"
	VendorProvisioningStateNotProvisioned           VendorProvisioningState = "NotProvisioned"
	VendorProvisioningStateProvisioned              VendorProvisioningState = "Provisioned"
	VendorProvisioningStateProvisioning             VendorProvisioningState = "Provisioning"
	VendorProvisioningStateUnknown                  VendorProvisioningState = "Unknown"
	VendorProvisioningStateUserDataValidationFailed VendorProvisioningState = "UserDataValidationFailed"
)

func PossibleVendorProvisioningStateValues

func PossibleVendorProvisioningStateValues() []VendorProvisioningState

PossibleVendorProvisioningStateValues returns the possible values for the VendorProvisioningState const type.

type VendorSKU

type VendorSKU struct {
	// Vendor sku details.
	Properties *VendorSKUPropertiesFormat

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

VendorSKU - Sku sub resource.

func (VendorSKU) MarshalJSON

func (v VendorSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VendorSKU.

func (*VendorSKU) UnmarshalJSON

func (v *VendorSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VendorSKU.

type VendorSKUListResult

type VendorSKUListResult struct {
	// A list of vendor skus offered by the vendor.
	Value []*VendorSKU

	// READ-ONLY; The URI to get the next set of results.
	NextLink *string
}

VendorSKUListResult - Response for list vendor sku API service call.

func (VendorSKUListResult) MarshalJSON

func (v VendorSKUListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VendorSKUListResult.

func (*VendorSKUListResult) UnmarshalJSON added in v1.1.0

func (v *VendorSKUListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VendorSKUListResult.

type VendorSKUPreviewClient

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

VendorSKUPreviewClient contains the methods for the VendorSKUPreview group. Don't use this type directly, use NewVendorSKUPreviewClient() instead.

func NewVendorSKUPreviewClient

func NewVendorSKUPreviewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VendorSKUPreviewClient, error)

NewVendorSKUPreviewClient creates a new instance of VendorSKUPreviewClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VendorSKUPreviewClient) BeginCreateOrUpdate

func (client *VendorSKUPreviewClient) BeginCreateOrUpdate(ctx context.Context, vendorName string, skuName string, previewSubscription string, parameters PreviewSubscription, options *VendorSKUPreviewClientBeginCreateOrUpdateOptions) (*runtime.Poller[VendorSKUPreviewClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates preview information of a vendor sku. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • vendorName - The name of the vendor.
  • skuName - The name of the vendor sku.
  • previewSubscription - Preview subscription ID.
  • parameters - Parameters supplied to the create or update vendor preview subscription operation.
  • options - VendorSKUPreviewClientBeginCreateOrUpdateOptions contains the optional parameters for the VendorSKUPreviewClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorSkuPreviewCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVendorSKUPreviewClient().BeginCreateOrUpdate(ctx, "TestVendor", "TestSku", "previewSub", armhybridnetwork.PreviewSubscription{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PreviewSubscription = armhybridnetwork.PreviewSubscription{
	// 	Name: to.Ptr("previewSub"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/vendors/vendorskus/previewsubscriptions"),
	// 	ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor/vendorskus/TestSku/previewsubscriptions/previewSub"),
	// }
}
Output:

func (*VendorSKUPreviewClient) BeginDelete

func (client *VendorSKUPreviewClient) BeginDelete(ctx context.Context, vendorName string, skuName string, previewSubscription string, options *VendorSKUPreviewClientBeginDeleteOptions) (*runtime.Poller[VendorSKUPreviewClientDeleteResponse], error)

BeginDelete - Deletes the preview information of a vendor sku. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • vendorName - The name of the vendor.
  • skuName - The name of the vendor sku.
  • previewSubscription - Preview subscription ID.
  • options - VendorSKUPreviewClientBeginDeleteOptions contains the optional parameters for the VendorSKUPreviewClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorSkuPreviewDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVendorSKUPreviewClient().BeginDelete(ctx, "TestVendor", "TestSku", "previewSub", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*VendorSKUPreviewClient) Get

func (client *VendorSKUPreviewClient) Get(ctx context.Context, vendorName string, skuName string, previewSubscription string, options *VendorSKUPreviewClientGetOptions) (VendorSKUPreviewClientGetResponse, error)

Get - Gets the preview information of a vendor sku. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • vendorName - The name of the vendor.
  • skuName - The name of the vendor sku.
  • previewSubscription - Preview subscription ID.
  • options - VendorSKUPreviewClientGetOptions contains the optional parameters for the VendorSKUPreviewClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorSkuPreviewGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVendorSKUPreviewClient().Get(ctx, "TestVendor", "TestSku", "previewSub", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PreviewSubscription = armhybridnetwork.PreviewSubscription{
	// 	Name: to.Ptr("previewSub"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/vendors/vendorskus/previewsubscriptions"),
	// 	ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor/vendorskus/TestSku/previewsubscriptions/previewSub"),
	// }
}
Output:

func (*VendorSKUPreviewClient) NewListPager added in v0.4.0

NewListPager - Lists all the preview information of a vendor sku.

Generated from API version 2021-05-01

  • vendorName - The name of the vendor.
  • skuName - The name of the sku.
  • options - VendorSKUPreviewClientListOptions contains the optional parameters for the VendorSKUPreviewClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorSkuPreviewListBySku.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVendorSKUPreviewClient().NewListPager("TestVendor", "TestSku", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PreviewSubscriptionsList = armhybridnetwork.PreviewSubscriptionsList{
		// 	Value: []*armhybridnetwork.PreviewSubscription{
		// 		{
		// 			Name: to.Ptr("previewSub1"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/vendors/vendorskus/previewsubscriptions"),
		// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor/vendorskus/TestSku/previewsubscriptions/previewSub1"),
		// 		},
		// 		{
		// 			Name: to.Ptr("previewSub2"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/vendors/vendorskus/previewsubscriptions"),
		// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor/vendorskus/TestSku/previewsubscriptions/previewSub2"),
		// 	}},
		// }
	}
}
Output:

type VendorSKUPreviewClientBeginCreateOrUpdateOptions added in v0.2.0

type VendorSKUPreviewClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VendorSKUPreviewClientBeginCreateOrUpdateOptions contains the optional parameters for the VendorSKUPreviewClient.BeginCreateOrUpdate method.

type VendorSKUPreviewClientBeginDeleteOptions added in v0.2.0

type VendorSKUPreviewClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VendorSKUPreviewClientBeginDeleteOptions contains the optional parameters for the VendorSKUPreviewClient.BeginDelete method.

type VendorSKUPreviewClientCreateOrUpdateResponse added in v0.2.0

type VendorSKUPreviewClientCreateOrUpdateResponse struct {
	PreviewSubscription
}

VendorSKUPreviewClientCreateOrUpdateResponse contains the response from method VendorSKUPreviewClient.BeginCreateOrUpdate.

type VendorSKUPreviewClientDeleteResponse added in v0.2.0

type VendorSKUPreviewClientDeleteResponse struct {
}

VendorSKUPreviewClientDeleteResponse contains the response from method VendorSKUPreviewClient.BeginDelete.

type VendorSKUPreviewClientGetOptions added in v0.2.0

type VendorSKUPreviewClientGetOptions struct {
}

VendorSKUPreviewClientGetOptions contains the optional parameters for the VendorSKUPreviewClient.Get method.

type VendorSKUPreviewClientGetResponse added in v0.2.0

type VendorSKUPreviewClientGetResponse struct {
	PreviewSubscription
}

VendorSKUPreviewClientGetResponse contains the response from method VendorSKUPreviewClient.Get.

type VendorSKUPreviewClientListOptions added in v0.2.0

type VendorSKUPreviewClientListOptions struct {
}

VendorSKUPreviewClientListOptions contains the optional parameters for the VendorSKUPreviewClient.NewListPager method.

type VendorSKUPreviewClientListResponse added in v0.2.0

type VendorSKUPreviewClientListResponse struct {
	PreviewSubscriptionsList
}

VendorSKUPreviewClientListResponse contains the response from method VendorSKUPreviewClient.NewListPager.

type VendorSKUPropertiesFormat

type VendorSKUPropertiesFormat struct {
	// The sku deployment mode.
	DeploymentMode *SKUDeploymentMode

	// The parameters for the managed application to be supplied by the vendor.
	ManagedApplicationParameters any

	// The template for the managed application deployment.
	ManagedApplicationTemplate any

	// The template definition of the network function.
	NetworkFunctionTemplate *NetworkFunctionTemplate

	// The network function type.
	NetworkFunctionType *NetworkFunctionType

	// Indicates if the vendor sku is in preview mode.
	Preview *bool

	// The sku type.
	SKUType *SKUType

	// READ-ONLY; The provisioning state of the vendor sku sub resource.
	ProvisioningState *ProvisioningState
}

VendorSKUPropertiesFormat - Sku properties

func (VendorSKUPropertiesFormat) MarshalJSON added in v1.1.0

func (v VendorSKUPropertiesFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VendorSKUPropertiesFormat.

func (*VendorSKUPropertiesFormat) UnmarshalJSON added in v1.1.0

func (v *VendorSKUPropertiesFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VendorSKUPropertiesFormat.

type VendorSKUsClient

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

VendorSKUsClient contains the methods for the VendorSKUs group. Don't use this type directly, use NewVendorSKUsClient() instead.

func NewVendorSKUsClient

func NewVendorSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VendorSKUsClient, error)

NewVendorSKUsClient creates a new instance of VendorSKUsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VendorSKUsClient) BeginCreateOrUpdate

func (client *VendorSKUsClient) BeginCreateOrUpdate(ctx context.Context, vendorName string, skuName string, parameters VendorSKU, options *VendorSKUsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VendorSKUsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a sku. This operation can take up to 2 hours to complete. This is expected service behavior. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • vendorName - The name of the vendor.
  • skuName - The name of the sku.
  • parameters - Parameters supplied to the create or update sku operation.
  • options - VendorSKUsClientBeginCreateOrUpdateOptions contains the optional parameters for the VendorSKUsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorSkuCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVendorSKUsClient().BeginCreateOrUpdate(ctx, "TestVendor", "TestSku", armhybridnetwork.VendorSKU{
		Properties: &armhybridnetwork.VendorSKUPropertiesFormat{
			DeploymentMode:             to.Ptr(armhybridnetwork.SKUDeploymentModePrivateEdgeZone),
			ManagedApplicationTemplate: map[string]any{},
			NetworkFunctionTemplate: &armhybridnetwork.NetworkFunctionTemplate{
				NetworkFunctionRoleConfigurations: []*armhybridnetwork.NetworkFunctionRoleConfiguration{
					{
						CustomProfile: &armhybridnetwork.CustomProfile{
							MetadataConfigurationPath: to.Ptr("/var/logs/network.cfg"),
						},
						NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
							{
								IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
									{
										Gateway:            to.Ptr(""),
										IPAddress:          to.Ptr(""),
										IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
										IPVersion:          to.Ptr(armhybridnetwork.IPVersionIPv4),
										Subnet:             to.Ptr(""),
									}},
								MacAddress:           to.Ptr(""),
								NetworkInterfaceName: to.Ptr("nic1"),
								VMSwitchType:         to.Ptr(armhybridnetwork.VMSwitchTypeWan),
							},
							{
								IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
									{
										Gateway:            to.Ptr(""),
										IPAddress:          to.Ptr(""),
										IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
										IPVersion:          to.Ptr(armhybridnetwork.IPVersionIPv4),
										Subnet:             to.Ptr(""),
									}},
								MacAddress:           to.Ptr(""),
								NetworkInterfaceName: to.Ptr("nic2"),
								VMSwitchType:         to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
							}},
						OSProfile: &armhybridnetwork.OsProfile{
							AdminUsername: to.Ptr("dummyuser"),
							CustomData:    to.Ptr("base-64 encoded string of custom data"),
							LinuxConfiguration: &armhybridnetwork.LinuxConfiguration{
								SSH: &armhybridnetwork.SSHConfiguration{
									PublicKeys: []*armhybridnetwork.SSHPublicKey{
										{
											Path:    to.Ptr("home/user/.ssh/authorized_keys"),
											KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAwrr66r8n6B8Y0zMF3dOpXEapIQD9DiYQ6D6/zwor9o39jSkHNiMMER/GETBbzP83LOcekm02aRjo55ArO7gPPVvCXbrirJu9pkm4AC4BBre5xSLS= user@constoso-DSH"),
										}},
								},
							},
						},
						RoleName: to.Ptr("test"),
						RoleType: to.Ptr(armhybridnetwork.NetworkFunctionRoleConfigurationTypeVirtualMachine),
						StorageProfile: &armhybridnetwork.StorageProfile{
							DataDisks: []*armhybridnetwork.DataDisk{
								{
									Name:         to.Ptr("DataDisk1"),
									CreateOption: to.Ptr(armhybridnetwork.DiskCreateOptionTypesEmpty),
									DiskSizeGB:   to.Ptr[int32](10),
								}},
							ImageReference: &armhybridnetwork.ImageReference{
								Offer:     to.Ptr("UbuntuServer"),
								Publisher: to.Ptr("Canonical"),
								SKU:       to.Ptr("18.04-LTS"),
								Version:   to.Ptr("18.04.201804262"),
							},
							OSDisk: &armhybridnetwork.OsDisk{
								Name:       to.Ptr("vhdName"),
								DiskSizeGB: to.Ptr[int32](30),
								OSType:     to.Ptr(armhybridnetwork.OperatingSystemTypesLinux),
								Vhd: &armhybridnetwork.VirtualHardDisk{
									URI: to.Ptr("https://contoso.net/link/vnd.vhd?sp=rl&st=2020-10-08T20:38:19Z&se=2020-12-09T19:38:00Z&sv=2019-12-12&sr=b&sig=7BM2f4yOw%3D"),
								},
							},
						},
						VirtualMachineSize: to.Ptr(armhybridnetwork.VirtualMachineSizeTypesStandardD3V2),
					}},
			},
			Preview: to.Ptr(true),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VendorSKU = armhybridnetwork.VendorSKU{
	// 	Name: to.Ptr("TestSku"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/vendors/vendorskus"),
	// 	ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor/vendorskus/TestSku"),
	// 	Properties: &armhybridnetwork.VendorSKUPropertiesFormat{
	// 		DeploymentMode: to.Ptr(armhybridnetwork.SKUDeploymentModePrivateEdgeZone),
	// 		ManagedApplicationTemplate: map[string]any{
	// 		},
	// 		NetworkFunctionTemplate: &armhybridnetwork.NetworkFunctionTemplate{
	// 			NetworkFunctionRoleConfigurations: []*armhybridnetwork.NetworkFunctionRoleConfiguration{
	// 				{
	// 					CustomProfile: &armhybridnetwork.CustomProfile{
	// 						MetadataConfigurationPath: to.Ptr("/var/logs/network.cfg"),
	// 					},
	// 					NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
	// 						{
	// 							IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 								{
	// 									Gateway: to.Ptr(""),
	// 									IPAddress: to.Ptr(""),
	// 									IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 									IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 									Subnet: to.Ptr(""),
	// 							}},
	// 							MacAddress: to.Ptr(""),
	// 							NetworkInterfaceName: to.Ptr("nic1"),
	// 							VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeWan),
	// 						},
	// 						{
	// 							IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 								{
	// 									Gateway: to.Ptr(""),
	// 									IPAddress: to.Ptr(""),
	// 									IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 									IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 									Subnet: to.Ptr(""),
	// 							}},
	// 							MacAddress: to.Ptr(""),
	// 							NetworkInterfaceName: to.Ptr("nic2"),
	// 							VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchTypeManagement),
	// 					}},
	// 					OSProfile: &armhybridnetwork.OsProfile{
	// 						AdminUsername: to.Ptr("dummyuser"),
	// 						CustomData: to.Ptr("base-64 encoded string of custom data"),
	// 						LinuxConfiguration: &armhybridnetwork.LinuxConfiguration{
	// 							SSH: &armhybridnetwork.SSHConfiguration{
	// 								PublicKeys: []*armhybridnetwork.SSHPublicKey{
	// 									{
	// 										Path: to.Ptr("home/user/.ssh/authorized_keys"),
	// 										KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAwrr66r8n6B8Y0zMF3dOpXEapIQD9DiYQ6D6/zwor9o39jSkHNiMMER/GETBbzP83LOcekm02aRjo55ArO7gPPVvCXbrirJu9pkm4AC4BBre5xSLS= user@constoso-DSH"),
	// 								}},
	// 							},
	// 						},
	// 					},
	// 					RoleName: to.Ptr("test"),
	// 					RoleType: to.Ptr(armhybridnetwork.NetworkFunctionRoleConfigurationTypeVirtualMachine),
	// 					StorageProfile: &armhybridnetwork.StorageProfile{
	// 						DataDisks: []*armhybridnetwork.DataDisk{
	// 							{
	// 								Name: to.Ptr("DataDisk1"),
	// 								CreateOption: to.Ptr(armhybridnetwork.DiskCreateOptionTypesEmpty),
	// 								DiskSizeGB: to.Ptr[int32](10),
	// 						}},
	// 						ImageReference: &armhybridnetwork.ImageReference{
	// 							Offer: to.Ptr("UbuntuServer"),
	// 							Publisher: to.Ptr("Canonical"),
	// 							SKU: to.Ptr("18.04-LTS"),
	// 							Version: to.Ptr("18.04.201804262"),
	// 						},
	// 						OSDisk: &armhybridnetwork.OsDisk{
	// 							Name: to.Ptr("vhdName"),
	// 							DiskSizeGB: to.Ptr[int32](30),
	// 							OSType: to.Ptr(armhybridnetwork.OperatingSystemTypesLinux),
	// 							Vhd: &armhybridnetwork.VirtualHardDisk{
	// 							},
	// 						},
	// 					},
	// 					VirtualMachineSize: to.Ptr(armhybridnetwork.VirtualMachineSizeTypesStandardD3V2),
	// 			}},
	// 		},
	// 		Preview: to.Ptr(true),
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*VendorSKUsClient) BeginDelete

BeginDelete - Deletes the specified sku. This operation can take up to 2 hours to complete. This is expected service behavior. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • vendorName - The name of the vendor.
  • skuName - The name of the sku.
  • options - VendorSKUsClientBeginDeleteOptions contains the optional parameters for the VendorSKUsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorSkuDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVendorSKUsClient().BeginDelete(ctx, "TestVendor", "TestSku", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*VendorSKUsClient) Get

func (client *VendorSKUsClient) Get(ctx context.Context, vendorName string, skuName string, options *VendorSKUsClientGetOptions) (VendorSKUsClientGetResponse, error)

Get - Gets information about the specified sku. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • vendorName - The name of the vendor.
  • skuName - The name of the sku.
  • options - VendorSKUsClientGetOptions contains the optional parameters for the VendorSKUsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorSkuGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVendorSKUsClient().Get(ctx, "TestVendor", "TestSku", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VendorSKU = armhybridnetwork.VendorSKU{
	// 	Name: to.Ptr("TestSku"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/vendors/vendorskus"),
	// 	ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor/vendorskus/TestSku"),
	// 	Properties: &armhybridnetwork.VendorSKUPropertiesFormat{
	// 		DeploymentMode: to.Ptr(armhybridnetwork.SKUDeploymentModePrivateEdgeZone),
	// 		ManagedApplicationTemplate: map[string]any{
	// 		},
	// 		NetworkFunctionTemplate: &armhybridnetwork.NetworkFunctionTemplate{
	// 			NetworkFunctionRoleConfigurations: []*armhybridnetwork.NetworkFunctionRoleConfiguration{
	// 				{
	// 					CustomProfile: &armhybridnetwork.CustomProfile{
	// 						MetadataConfigurationPath: to.Ptr("/var/logs/network.cfg"),
	// 					},
	// 					NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
	// 						{
	// 							IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 								{
	// 									Gateway: to.Ptr(""),
	// 									IPAddress: to.Ptr(""),
	// 									IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 									IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 									Subnet: to.Ptr(""),
	// 							}},
	// 							MacAddress: to.Ptr(""),
	// 							NetworkInterfaceName: to.Ptr("nic1"),
	// 							VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchType("")),
	// 						},
	// 						{
	// 							IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
	// 								{
	// 									Gateway: to.Ptr(""),
	// 									IPAddress: to.Ptr(""),
	// 									IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
	// 									IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
	// 									Subnet: to.Ptr(""),
	// 							}},
	// 							MacAddress: to.Ptr(""),
	// 							NetworkInterfaceName: to.Ptr("nic2"),
	// 							VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchType("")),
	// 					}},
	// 					OSProfile: &armhybridnetwork.OsProfile{
	// 						AdminUsername: to.Ptr("dummyuser"),
	// 						CustomData: to.Ptr("base-64 encoded string of custom data"),
	// 						LinuxConfiguration: &armhybridnetwork.LinuxConfiguration{
	// 							SSH: &armhybridnetwork.SSHConfiguration{
	// 								PublicKeys: []*armhybridnetwork.SSHPublicKey{
	// 									{
	// 										Path: to.Ptr("home/user/.ssh/authorized_keys"),
	// 										KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAwrr66r8n6B8Y0zMF3dOpXEapIQD9DiYQ6D6/zwor9o39jSkHNiMMER/GETBbzP83LOcekm02aRjo55ArO7gPPVvCXbrirJu9pkm4AC4BBre5xSLS= user@constoso-DSH"),
	// 								}},
	// 							},
	// 						},
	// 					},
	// 					RoleName: to.Ptr("test"),
	// 					RoleType: to.Ptr(armhybridnetwork.NetworkFunctionRoleConfigurationTypeVirtualMachine),
	// 					StorageProfile: &armhybridnetwork.StorageProfile{
	// 						DataDisks: []*armhybridnetwork.DataDisk{
	// 							{
	// 								Name: to.Ptr("DataDisk1"),
	// 								CreateOption: to.Ptr(armhybridnetwork.DiskCreateOptionTypesEmpty),
	// 								DiskSizeGB: to.Ptr[int32](10),
	// 						}},
	// 						ImageReference: &armhybridnetwork.ImageReference{
	// 							Offer: to.Ptr("UbuntuServer"),
	// 							Publisher: to.Ptr("Canonical"),
	// 							SKU: to.Ptr("18.04-LTS"),
	// 							Version: to.Ptr("18.04.201804262"),
	// 						},
	// 						OSDisk: &armhybridnetwork.OsDisk{
	// 							Name: to.Ptr("vhdName"),
	// 							DiskSizeGB: to.Ptr[int32](30),
	// 							OSType: to.Ptr(armhybridnetwork.OperatingSystemTypesLinux),
	// 							Vhd: &armhybridnetwork.VirtualHardDisk{
	// 							},
	// 						},
	// 					},
	// 					VirtualMachineSize: to.Ptr(armhybridnetwork.VirtualMachineSizeTypesStandardD3V2),
	// 			}},
	// 		},
	// 		Preview: to.Ptr(true),
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*VendorSKUsClient) NewListPager added in v0.4.0

NewListPager - Lists all the skus of a vendor.

Generated from API version 2021-05-01

  • vendorName - The name of the vendor.
  • options - VendorSKUsClientListOptions contains the optional parameters for the VendorSKUsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorSkuListByVendor.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVendorSKUsClient().NewListPager("TestVendor", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VendorSKUListResult = armhybridnetwork.VendorSKUListResult{
		// 	Value: []*armhybridnetwork.VendorSKU{
		// 		{
		// 			Name: to.Ptr("TestSku1"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/vendors/vendorskus"),
		// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor/vendorskus/TestSku1"),
		// 			Properties: &armhybridnetwork.VendorSKUPropertiesFormat{
		// 				DeploymentMode: to.Ptr(armhybridnetwork.SKUDeploymentModePrivateEdgeZone),
		// 				ManagedApplicationTemplate: map[string]any{
		// 				},
		// 				NetworkFunctionTemplate: &armhybridnetwork.NetworkFunctionTemplate{
		// 					NetworkFunctionRoleConfigurations: []*armhybridnetwork.NetworkFunctionRoleConfiguration{
		// 						{
		// 							CustomProfile: &armhybridnetwork.CustomProfile{
		// 								MetadataConfigurationPath: to.Ptr("/var/logs/network.cfg"),
		// 							},
		// 							NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
		// 								{
		// 									IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 										{
		// 											Gateway: to.Ptr(""),
		// 											IPAddress: to.Ptr(""),
		// 											IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 											IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 											Subnet: to.Ptr(""),
		// 									}},
		// 									MacAddress: to.Ptr(""),
		// 									NetworkInterfaceName: to.Ptr("nic1"),
		// 									VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchType("")),
		// 								},
		// 								{
		// 									IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 										{
		// 											Gateway: to.Ptr(""),
		// 											IPAddress: to.Ptr(""),
		// 											IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 											IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 											Subnet: to.Ptr(""),
		// 									}},
		// 									MacAddress: to.Ptr(""),
		// 									NetworkInterfaceName: to.Ptr("nic2"),
		// 									VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchType("")),
		// 							}},
		// 							OSProfile: &armhybridnetwork.OsProfile{
		// 								AdminUsername: to.Ptr("dummyuser"),
		// 								CustomData: to.Ptr("base-64 encoded string of custom data"),
		// 								LinuxConfiguration: &armhybridnetwork.LinuxConfiguration{
		// 									SSH: &armhybridnetwork.SSHConfiguration{
		// 										PublicKeys: []*armhybridnetwork.SSHPublicKey{
		// 											{
		// 												Path: to.Ptr("home/user/.ssh/authorized_keys"),
		// 												KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAwrr66r8n6B8Y0zMF3dOpXEapIQD9DiYQ6D6/zwor9o39jSkHNiMMER/GETBbzP83LOcekm02aRjo55ArO7gPPVvCXbrirJu9pkm4AC4BBre5xSLS= user@constoso-DSH"),
		// 										}},
		// 									},
		// 								},
		// 							},
		// 							RoleName: to.Ptr("test"),
		// 							RoleType: to.Ptr(armhybridnetwork.NetworkFunctionRoleConfigurationTypeVirtualMachine),
		// 							StorageProfile: &armhybridnetwork.StorageProfile{
		// 								DataDisks: []*armhybridnetwork.DataDisk{
		// 									{
		// 										Name: to.Ptr("DataDisk1"),
		// 										CreateOption: to.Ptr(armhybridnetwork.DiskCreateOptionTypesEmpty),
		// 										DiskSizeGB: to.Ptr[int32](10),
		// 								}},
		// 								ImageReference: &armhybridnetwork.ImageReference{
		// 									Offer: to.Ptr("UbuntuServer"),
		// 									Publisher: to.Ptr("Canonical"),
		// 									SKU: to.Ptr("18.04-LTS"),
		// 									Version: to.Ptr("18.04.201804262"),
		// 								},
		// 								OSDisk: &armhybridnetwork.OsDisk{
		// 									Name: to.Ptr("vhdName"),
		// 									DiskSizeGB: to.Ptr[int32](30),
		// 									OSType: to.Ptr(armhybridnetwork.OperatingSystemTypesLinux),
		// 									Vhd: &armhybridnetwork.VirtualHardDisk{
		// 									},
		// 								},
		// 							},
		// 							VirtualMachineSize: to.Ptr(armhybridnetwork.VirtualMachineSizeTypesStandardD3V2),
		// 					}},
		// 				},
		// 				Preview: to.Ptr(true),
		// 				ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("TestSku2"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/vendors/vendorskus"),
		// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor/vendorskus/TestSku2"),
		// 			Properties: &armhybridnetwork.VendorSKUPropertiesFormat{
		// 				DeploymentMode: to.Ptr(armhybridnetwork.SKUDeploymentModePrivateEdgeZone),
		// 				ManagedApplicationTemplate: map[string]any{
		// 				},
		// 				NetworkFunctionTemplate: &armhybridnetwork.NetworkFunctionTemplate{
		// 					NetworkFunctionRoleConfigurations: []*armhybridnetwork.NetworkFunctionRoleConfiguration{
		// 						{
		// 							CustomProfile: &armhybridnetwork.CustomProfile{
		// 								MetadataConfigurationPath: to.Ptr("/var/logs/network.cfg"),
		// 							},
		// 							NetworkInterfaces: []*armhybridnetwork.NetworkInterface{
		// 								{
		// 									IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 										{
		// 											Gateway: to.Ptr(""),
		// 											IPAddress: to.Ptr(""),
		// 											IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 											IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 											Subnet: to.Ptr(""),
		// 									}},
		// 									MacAddress: to.Ptr(""),
		// 									NetworkInterfaceName: to.Ptr("nic1"),
		// 									VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchType("")),
		// 								},
		// 								{
		// 									IPConfigurations: []*armhybridnetwork.NetworkInterfaceIPConfiguration{
		// 										{
		// 											Gateway: to.Ptr(""),
		// 											IPAddress: to.Ptr(""),
		// 											IPAllocationMethod: to.Ptr(armhybridnetwork.IPAllocationMethodDynamic),
		// 											IPVersion: to.Ptr(armhybridnetwork.IPVersionIPv4),
		// 											Subnet: to.Ptr(""),
		// 									}},
		// 									MacAddress: to.Ptr(""),
		// 									NetworkInterfaceName: to.Ptr("nic2"),
		// 									VMSwitchType: to.Ptr(armhybridnetwork.VMSwitchType("")),
		// 							}},
		// 							OSProfile: &armhybridnetwork.OsProfile{
		// 								AdminUsername: to.Ptr("dummyuser"),
		// 								CustomData: to.Ptr("base-64 encoded string of custom data"),
		// 								LinuxConfiguration: &armhybridnetwork.LinuxConfiguration{
		// 									SSH: &armhybridnetwork.SSHConfiguration{
		// 										PublicKeys: []*armhybridnetwork.SSHPublicKey{
		// 											{
		// 												Path: to.Ptr("home/user/.ssh/authorized_keys"),
		// 												KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAwrr66r8n6B8Y0zMF3dOpXEapIQD9DiYQ6D6/zwor9o39jSkHNiMMER/GETBbzP83LOcekm02aRjo55ArO7gPPVvCXbrirJu9pkm4AC4BBre5xSLS= user@constoso-DSH"),
		// 										}},
		// 									},
		// 								},
		// 							},
		// 							RoleName: to.Ptr("test"),
		// 							RoleType: to.Ptr(armhybridnetwork.NetworkFunctionRoleConfigurationTypeVirtualMachine),
		// 							StorageProfile: &armhybridnetwork.StorageProfile{
		// 								DataDisks: []*armhybridnetwork.DataDisk{
		// 									{
		// 										Name: to.Ptr("DataDisk1"),
		// 										CreateOption: to.Ptr(armhybridnetwork.DiskCreateOptionTypesEmpty),
		// 										DiskSizeGB: to.Ptr[int32](10),
		// 								}},
		// 								ImageReference: &armhybridnetwork.ImageReference{
		// 									Offer: to.Ptr("UbuntuServer"),
		// 									Publisher: to.Ptr("Canonical"),
		// 									SKU: to.Ptr("18.04-LTS"),
		// 									Version: to.Ptr("18.04.201804262"),
		// 								},
		// 								OSDisk: &armhybridnetwork.OsDisk{
		// 									Name: to.Ptr("vhdName"),
		// 									DiskSizeGB: to.Ptr[int32](30),
		// 									OSType: to.Ptr(armhybridnetwork.OperatingSystemTypesLinux),
		// 									Vhd: &armhybridnetwork.VirtualHardDisk{
		// 									},
		// 								},
		// 							},
		// 							VirtualMachineSize: to.Ptr(armhybridnetwork.VirtualMachineSizeTypesStandardD3V2),
		// 					}},
		// 				},
		// 				Preview: to.Ptr(true),
		// 				ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type VendorSKUsClientBeginCreateOrUpdateOptions added in v0.2.0

type VendorSKUsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VendorSKUsClientBeginCreateOrUpdateOptions contains the optional parameters for the VendorSKUsClient.BeginCreateOrUpdate method.

type VendorSKUsClientBeginDeleteOptions added in v0.2.0

type VendorSKUsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VendorSKUsClientBeginDeleteOptions contains the optional parameters for the VendorSKUsClient.BeginDelete method.

type VendorSKUsClientCreateOrUpdateResponse added in v0.2.0

type VendorSKUsClientCreateOrUpdateResponse struct {
	VendorSKU
}

VendorSKUsClientCreateOrUpdateResponse contains the response from method VendorSKUsClient.BeginCreateOrUpdate.

type VendorSKUsClientDeleteResponse added in v0.2.0

type VendorSKUsClientDeleteResponse struct {
}

VendorSKUsClientDeleteResponse contains the response from method VendorSKUsClient.BeginDelete.

type VendorSKUsClientGetOptions added in v0.2.0

type VendorSKUsClientGetOptions struct {
}

VendorSKUsClientGetOptions contains the optional parameters for the VendorSKUsClient.Get method.

type VendorSKUsClientGetResponse added in v0.2.0

type VendorSKUsClientGetResponse struct {
	VendorSKU
}

VendorSKUsClientGetResponse contains the response from method VendorSKUsClient.Get.

type VendorSKUsClientListOptions added in v0.2.0

type VendorSKUsClientListOptions struct {
}

VendorSKUsClientListOptions contains the optional parameters for the VendorSKUsClient.NewListPager method.

type VendorSKUsClientListResponse added in v0.2.0

type VendorSKUsClientListResponse struct {
	VendorSKUListResult
}

VendorSKUsClientListResponse contains the response from method VendorSKUsClient.NewListPager.

type VendorsClient

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

VendorsClient contains the methods for the Vendors group. Don't use this type directly, use NewVendorsClient() instead.

func NewVendorsClient

func NewVendorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VendorsClient, error)

NewVendorsClient creates a new instance of VendorsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VendorsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates or updates a vendor. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • vendorName - The name of the vendor.
  • options - VendorsClientBeginCreateOrUpdateOptions contains the optional parameters for the VendorsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVendorsClient().BeginCreateOrUpdate(ctx, "TestVendor", &armhybridnetwork.VendorsClientBeginCreateOrUpdateOptions{Parameters: &armhybridnetwork.Vendor{}})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Vendor = armhybridnetwork.Vendor{
	// 	Name: to.Ptr("TestVendor"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/vendors"),
	// 	ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor"),
	// 	Properties: &armhybridnetwork.VendorPropertiesFormat{
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*VendorsClient) BeginDelete

BeginDelete - Deletes the specified vendor. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • vendorName - The name of the vendor.
  • options - VendorsClientBeginDeleteOptions contains the optional parameters for the VendorsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVendorsClient().BeginDelete(ctx, "TestVendor", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*VendorsClient) Get

func (client *VendorsClient) Get(ctx context.Context, vendorName string, options *VendorsClientGetOptions) (VendorsClientGetResponse, error)

Get - Gets information about the specified vendor. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-05-01

  • vendorName - The name of the vendor.
  • options - VendorsClientGetOptions contains the optional parameters for the VendorsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVendorsClient().Get(ctx, "TestVendor", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Vendor = armhybridnetwork.Vendor{
	// 	Name: to.Ptr("TestVendor"),
	// 	Type: to.Ptr("Microsoft.HybridNetwork/vendors"),
	// 	ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor"),
	// 	Properties: &armhybridnetwork.VendorPropertiesFormat{
	// 		ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
	// 		SKUs: []*armhybridnetwork.SubResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor/skus/TestVendorSku"),
	// 		}},
	// 	},
	// }
}
Output:

func (*VendorsClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - Lists all the vendors in a subscription.

Generated from API version 2021-05-01

  • options - VendorsClientListBySubscriptionOptions contains the optional parameters for the VendorsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/examples/VendorListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridnetwork/armhybridnetwork"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridnetwork.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVendorsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VendorListResult = armhybridnetwork.VendorListResult{
		// 	Value: []*armhybridnetwork.Vendor{
		// 		{
		// 			Name: to.Ptr("TestVendor"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/vendors"),
		// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor"),
		// 			Properties: &armhybridnetwork.VendorPropertiesFormat{
		// 				ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
		// 				SKUs: []*armhybridnetwork.SubResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor/vendorskus/TestVendorSku1"),
		// 				}},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("TestVendor2"),
		// 			Type: to.Ptr("Microsoft.HybridNetwork/vendors"),
		// 			ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor2"),
		// 			Properties: &armhybridnetwork.VendorPropertiesFormat{
		// 				ProvisioningState: to.Ptr(armhybridnetwork.ProvisioningStateSucceeded),
		// 				SKUs: []*armhybridnetwork.SubResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/providers/Microsoft.HybridNetwork/vendors/TestVendor/vendorskus/TestVendorSku2"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

type VendorsClientBeginCreateOrUpdateOptions added in v0.2.0

type VendorsClientBeginCreateOrUpdateOptions struct {
	// Parameters supplied to the create vendor operation.
	Parameters *Vendor
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VendorsClientBeginCreateOrUpdateOptions contains the optional parameters for the VendorsClient.BeginCreateOrUpdate method.

type VendorsClientBeginDeleteOptions added in v0.2.0

type VendorsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

VendorsClientBeginDeleteOptions contains the optional parameters for the VendorsClient.BeginDelete method.

type VendorsClientCreateOrUpdateResponse added in v0.2.0

type VendorsClientCreateOrUpdateResponse struct {
	Vendor
}

VendorsClientCreateOrUpdateResponse contains the response from method VendorsClient.BeginCreateOrUpdate.

type VendorsClientDeleteResponse added in v0.2.0

type VendorsClientDeleteResponse struct {
}

VendorsClientDeleteResponse contains the response from method VendorsClient.BeginDelete.

type VendorsClientGetOptions added in v0.2.0

type VendorsClientGetOptions struct {
}

VendorsClientGetOptions contains the optional parameters for the VendorsClient.Get method.

type VendorsClientGetResponse added in v0.2.0

type VendorsClientGetResponse struct {
	Vendor
}

VendorsClientGetResponse contains the response from method VendorsClient.Get.

type VendorsClientListBySubscriptionOptions added in v0.2.0

type VendorsClientListBySubscriptionOptions struct {
}

VendorsClientListBySubscriptionOptions contains the optional parameters for the VendorsClient.NewListBySubscriptionPager method.

type VendorsClientListBySubscriptionResponse added in v0.2.0

type VendorsClientListBySubscriptionResponse struct {
	VendorListResult
}

VendorsClientListBySubscriptionResponse contains the response from method VendorsClient.NewListBySubscriptionPager.

type VirtualHardDisk

type VirtualHardDisk struct {
	// Specifies the virtual hard disk's uri.
	URI *string
}

VirtualHardDisk - Describes the uri of a disk.

func (VirtualHardDisk) MarshalJSON added in v1.1.0

func (v VirtualHardDisk) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualHardDisk.

func (*VirtualHardDisk) UnmarshalJSON added in v1.1.0

func (v *VirtualHardDisk) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHardDisk.

type VirtualMachineSizeTypes

type VirtualMachineSizeTypes string

VirtualMachineSizeTypes - The size of the virtual machine.

const (
	VirtualMachineSizeTypesStandardD11V2  VirtualMachineSizeTypes = "Standard_D11_v2"
	VirtualMachineSizeTypesStandardD12V2  VirtualMachineSizeTypes = "Standard_D12_v2"
	VirtualMachineSizeTypesStandardD13V2  VirtualMachineSizeTypes = "Standard_D13_v2"
	VirtualMachineSizeTypesStandardD1V2   VirtualMachineSizeTypes = "Standard_D1_v2"
	VirtualMachineSizeTypesStandardD2V2   VirtualMachineSizeTypes = "Standard_D2_v2"
	VirtualMachineSizeTypesStandardD3V2   VirtualMachineSizeTypes = "Standard_D3_v2"
	VirtualMachineSizeTypesStandardD4V2   VirtualMachineSizeTypes = "Standard_D4_v2"
	VirtualMachineSizeTypesStandardD5V2   VirtualMachineSizeTypes = "Standard_D5_v2"
	VirtualMachineSizeTypesStandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2"
	VirtualMachineSizeTypesStandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2"
	VirtualMachineSizeTypesStandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2"
	VirtualMachineSizeTypesStandardDS1V2  VirtualMachineSizeTypes = "Standard_DS1_v2"
	VirtualMachineSizeTypesStandardDS2V2  VirtualMachineSizeTypes = "Standard_DS2_v2"
	VirtualMachineSizeTypesStandardDS3V2  VirtualMachineSizeTypes = "Standard_DS3_v2"
	VirtualMachineSizeTypesStandardDS4V2  VirtualMachineSizeTypes = "Standard_DS4_v2"
	VirtualMachineSizeTypesStandardDS5V2  VirtualMachineSizeTypes = "Standard_DS5_v2"
	VirtualMachineSizeTypesStandardF1     VirtualMachineSizeTypes = "Standard_F1"
	VirtualMachineSizeTypesStandardF16    VirtualMachineSizeTypes = "Standard_F16"
	VirtualMachineSizeTypesStandardF16S   VirtualMachineSizeTypes = "Standard_F16s"
	VirtualMachineSizeTypesStandardF1S    VirtualMachineSizeTypes = "Standard_F1s"
	VirtualMachineSizeTypesStandardF2     VirtualMachineSizeTypes = "Standard_F2"
	VirtualMachineSizeTypesStandardF2S    VirtualMachineSizeTypes = "Standard_F2s"
	VirtualMachineSizeTypesStandardF4     VirtualMachineSizeTypes = "Standard_F4"
	VirtualMachineSizeTypesStandardF4S    VirtualMachineSizeTypes = "Standard_F4s"
	VirtualMachineSizeTypesStandardF8     VirtualMachineSizeTypes = "Standard_F8"
	VirtualMachineSizeTypesStandardF8S    VirtualMachineSizeTypes = "Standard_F8s"
	VirtualMachineSizeTypesUnknown        VirtualMachineSizeTypes = "Unknown"
)

func PossibleVirtualMachineSizeTypesValues

func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes

PossibleVirtualMachineSizeTypesValues returns the possible values for the VirtualMachineSizeTypes const type.

Jump to

Keyboard shortcuts

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