armnetworkfunction

package module
v3.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 14 Imported by: 0

README

Azure Network Function Manager Module for Go

The armnetworkfunction module provides operations for working with Azure Network Function Manager.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Supported version of Go (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 Network Function Manager module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction/v3

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Network Function Manager. 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 Network Function Manager 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 := armnetworkfunction.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 := armnetworkfunction.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.NewAzureTrafficCollectorsByResourceGroupClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Network Function Manager 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 AzureTrafficCollector

type AzureTrafficCollector struct {
	// REQUIRED; Resource location.
	Location *string

	// Properties of the Azure Traffic Collector.
	Properties *AzureTrafficCollectorPropertiesFormat

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

	// READ-ONLY; A unique read-only string that changes whenever the resource is updated.
	Etag *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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

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

AzureTrafficCollector - Azure Traffic Collector resource.

func (AzureTrafficCollector) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureTrafficCollector.

func (*AzureTrafficCollector) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureTrafficCollector.

type AzureTrafficCollectorListResult

type AzureTrafficCollectorListResult struct {
	// REQUIRED; The AzureTrafficCollector items on this page
	Value []*AzureTrafficCollector

	// The link to the next page of items
	NextLink *string
}

AzureTrafficCollectorListResult - The response of a AzureTrafficCollector list operation.

func (AzureTrafficCollectorListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureTrafficCollectorListResult.

func (*AzureTrafficCollectorListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureTrafficCollectorListResult.

type AzureTrafficCollectorPropertiesFormat

type AzureTrafficCollectorPropertiesFormat struct {
	// The virtualHub to which the Azure Traffic Collector belongs.
	VirtualHub *ResourceReference

	// READ-ONLY; Collector Policies for Azure Traffic Collector.
	CollectorPolicies []*ResourceReference

	// READ-ONLY; The provisioning state of the application rule collection resource.
	ProvisioningState *ProvisioningState
}

AzureTrafficCollectorPropertiesFormat - Azure Traffic Collector resource properties.

func (AzureTrafficCollectorPropertiesFormat) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureTrafficCollectorPropertiesFormat.

func (*AzureTrafficCollectorPropertiesFormat) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureTrafficCollectorPropertiesFormat.

type AzureTrafficCollectorsByResourceGroupClient

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

AzureTrafficCollectorsByResourceGroupClient contains the methods for the AzureTrafficCollectorsByResourceGroup group. Don't use this type directly, use NewAzureTrafficCollectorsByResourceGroupClient() instead.

func NewAzureTrafficCollectorsByResourceGroupClient

func NewAzureTrafficCollectorsByResourceGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureTrafficCollectorsByResourceGroupClient, error)

NewAzureTrafficCollectorsByResourceGroupClient creates a new instance of AzureTrafficCollectorsByResourceGroupClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - Contains optional client configuration. Pass nil to accept the default values.

func (*AzureTrafficCollectorsByResourceGroupClient) NewListPager

NewListPager - Return list of Azure Traffic Collectors in a Resource Group

Generated from API version 2022-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - AzureTrafficCollectorsByResourceGroupClientListOptions contains the optional parameters for the AzureTrafficCollectorsByResourceGroupClient.NewListPager method.
Example

Generated from example definition: 2022-11-01/AzureTrafficCollectorsByResourceGroupList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("subid", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAzureTrafficCollectorsByResourceGroupClient().NewListPager("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 = armnetworkfunction.AzureTrafficCollectorsByResourceGroupClientListResponse{
	// 	AzureTrafficCollectorListResult: armnetworkfunction.AzureTrafficCollectorListResult{
	// 		NextLink: to.Ptr("https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors?api-version=2022-11-01&$skiptoken=X%27123456%27"),
	// 		Value: []*armnetworkfunction.AzureTrafficCollector{
	// 			{
	// 				Name: to.Ptr("atc"),
	// 				Type: to.Ptr("Microsoft.NetworkFunction/azureTrafficCollectors"),
	// 				Etag: to.Ptr("w/\\00000000-0000-0000-0000-000000000000\\"),
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc"),
	// 				Location: to.Ptr("West US"),
	// 				Properties: &armnetworkfunction.AzureTrafficCollectorPropertiesFormat{
	// 					CollectorPolicies: []*armnetworkfunction.ResourceReference{
	// 					},
	// 					ProvisioningState: to.Ptr(armnetworkfunction.ProvisioningStateSucceeded),
	// 				},
	// 				Tags: map[string]*string{
	// 					"key1": to.Ptr("value1"),
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

type AzureTrafficCollectorsByResourceGroupClientListOptions

type AzureTrafficCollectorsByResourceGroupClientListOptions struct {
}

AzureTrafficCollectorsByResourceGroupClientListOptions contains the optional parameters for the AzureTrafficCollectorsByResourceGroupClient.NewListPager method.

type AzureTrafficCollectorsByResourceGroupClientListResponse

type AzureTrafficCollectorsByResourceGroupClientListResponse struct {
	// The response of a AzureTrafficCollector list operation.
	AzureTrafficCollectorListResult
}

AzureTrafficCollectorsByResourceGroupClientListResponse contains the response from method AzureTrafficCollectorsByResourceGroupClient.NewListPager.

type AzureTrafficCollectorsBySubscriptionClient

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

AzureTrafficCollectorsBySubscriptionClient contains the methods for the AzureTrafficCollectorsBySubscription group. Don't use this type directly, use NewAzureTrafficCollectorsBySubscriptionClient() instead.

func NewAzureTrafficCollectorsBySubscriptionClient

func NewAzureTrafficCollectorsBySubscriptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureTrafficCollectorsBySubscriptionClient, error)

NewAzureTrafficCollectorsBySubscriptionClient creates a new instance of AzureTrafficCollectorsBySubscriptionClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - Contains optional client configuration. Pass nil to accept the default values.

func (*AzureTrafficCollectorsBySubscriptionClient) NewListPager

NewListPager - Return list of Azure Traffic Collectors in a subscription

Generated from API version 2022-11-01

  • options - AzureTrafficCollectorsBySubscriptionClientListOptions contains the optional parameters for the AzureTrafficCollectorsBySubscriptionClient.NewListPager method.
Example

Generated from example definition: 2022-11-01/AzureTrafficCollectorsBySubscriptionList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("subid", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAzureTrafficCollectorsBySubscriptionClient().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 = armnetworkfunction.AzureTrafficCollectorsBySubscriptionClientListResponse{
	// 	AzureTrafficCollectorListResult: armnetworkfunction.AzureTrafficCollectorListResult{
	// 		NextLink: to.Ptr("https://management.azure.com/subscriptions/subid/providers/Microsoft.NetworkFunction/azureTrafficCollectors?api-version=2022-11-01&$skiptoken=X%27123456%27"),
	// 		Value: []*armnetworkfunction.AzureTrafficCollector{
	// 			{
	// 				Name: to.Ptr("atc"),
	// 				Type: to.Ptr("Microsoft.NetworkFunction/azureTrafficCollectors"),
	// 				Etag: to.Ptr("w/\\00000000-0000-0000-0000-000000000000\\"),
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc"),
	// 				Location: to.Ptr("West US"),
	// 				Properties: &armnetworkfunction.AzureTrafficCollectorPropertiesFormat{
	// 					CollectorPolicies: []*armnetworkfunction.ResourceReference{
	// 					},
	// 					ProvisioningState: to.Ptr(armnetworkfunction.ProvisioningStateSucceeded),
	// 				},
	// 				Tags: map[string]*string{
	// 					"key1": to.Ptr("value1"),
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

type AzureTrafficCollectorsBySubscriptionClientListOptions

type AzureTrafficCollectorsBySubscriptionClientListOptions struct {
}

AzureTrafficCollectorsBySubscriptionClientListOptions contains the optional parameters for the AzureTrafficCollectorsBySubscriptionClient.NewListPager method.

type AzureTrafficCollectorsBySubscriptionClientListResponse

type AzureTrafficCollectorsBySubscriptionClientListResponse struct {
	// The response of a AzureTrafficCollector list operation.
	AzureTrafficCollectorListResult
}

AzureTrafficCollectorsBySubscriptionClientListResponse contains the response from method AzureTrafficCollectorsBySubscriptionClient.NewListPager.

type AzureTrafficCollectorsClient

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

AzureTrafficCollectorsClient contains the methods for the AzureTrafficCollectors group. Don't use this type directly, use NewAzureTrafficCollectorsClient() instead.

func NewAzureTrafficCollectorsClient

func NewAzureTrafficCollectorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureTrafficCollectorsClient, error)

NewAzureTrafficCollectorsClient creates a new instance of AzureTrafficCollectorsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - Contains optional client configuration. Pass nil to accept the default values.

func (*AzureTrafficCollectorsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates or updates a Azure Traffic Collector resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureTrafficCollectorName - Azure Traffic Collector name
  • parameters - The parameters to provide for the created Azure Traffic Collector.
  • options - AzureTrafficCollectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureTrafficCollectorsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: 2022-11-01/AzureTrafficCollectorCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("subid", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAzureTrafficCollectorsClient().BeginCreateOrUpdate(ctx, "rg1", "atc", armnetworkfunction.AzureTrafficCollector{
	Location:   to.Ptr("West US"),
	Properties: &armnetworkfunction.AzureTrafficCollectorPropertiesFormat{},
	Tags: map[string]*string{
		"key1": to.Ptr("value1"),
	},
}, 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 = armnetworkfunction.AzureTrafficCollectorsClientCreateOrUpdateResponse{
// 	AzureTrafficCollector: &armnetworkfunction.AzureTrafficCollector{
// 		Name: to.Ptr("atc"),
// 		Type: to.Ptr("Microsoft.NetworkFunction/azureTrafficCollectors"),
// 		Etag: to.Ptr("w/\\00000000-0000-0000-0000-000000000000\\"),
// 		ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc"),
// 		Location: to.Ptr("West US"),
// 		Properties: &armnetworkfunction.AzureTrafficCollectorPropertiesFormat{
// 			CollectorPolicies: []*armnetworkfunction.ResourceReference{
// 			},
// 			ProvisioningState: to.Ptr(armnetworkfunction.ProvisioningStateSucceeded),
// 		},
// 		Tags: map[string]*string{
// 			"key1": to.Ptr("value1"),
// 		},
// 	},
// }

func (*AzureTrafficCollectorsClient) BeginDelete

BeginDelete - Deletes a specified Azure Traffic Collector resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureTrafficCollectorName - Azure Traffic Collector name
  • options - AzureTrafficCollectorsClientBeginDeleteOptions contains the optional parameters for the AzureTrafficCollectorsClient.BeginDelete method.
Example

Generated from example definition: 2022-11-01/AzureTrafficCollectorDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("subid", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAzureTrafficCollectorsClient().BeginDelete(ctx, "rg1", "atc", 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 = armnetworkfunction.AzureTrafficCollectorsClientDeleteResponse{
// }

func (*AzureTrafficCollectorsClient) Get

func (client *AzureTrafficCollectorsClient) Get(ctx context.Context, resourceGroupName string, azureTrafficCollectorName string, options *AzureTrafficCollectorsClientGetOptions) (AzureTrafficCollectorsClientGetResponse, error)

Get - Gets the specified Azure Traffic Collector in a specified resource group If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureTrafficCollectorName - Azure Traffic Collector name
  • options - AzureTrafficCollectorsClientGetOptions contains the optional parameters for the AzureTrafficCollectorsClient.Get method.
Example

Generated from example definition: 2022-11-01/AzureTrafficCollectorGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("subid", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAzureTrafficCollectorsClient().Get(ctx, "rg1", "atc", 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 = armnetworkfunction.AzureTrafficCollectorsClientGetResponse{
// 	AzureTrafficCollector: &armnetworkfunction.AzureTrafficCollector{
// 		Name: to.Ptr("atc"),
// 		Type: to.Ptr("Microsoft.NetworkFunction/azureTrafficCollectors"),
// 		Etag: to.Ptr("w/\\00000000-0000-0000-0000-000000000000\\"),
// 		ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc"),
// 		Location: to.Ptr("West US"),
// 		Properties: &armnetworkfunction.AzureTrafficCollectorPropertiesFormat{
// 			CollectorPolicies: []*armnetworkfunction.ResourceReference{
// 			},
// 			ProvisioningState: to.Ptr(armnetworkfunction.ProvisioningStateSucceeded),
// 		},
// 		Tags: map[string]*string{
// 			"key1": to.Ptr("value1"),
// 		},
// 	},
// }

func (*AzureTrafficCollectorsClient) UpdateTags

func (client *AzureTrafficCollectorsClient) UpdateTags(ctx context.Context, resourceGroupName string, azureTrafficCollectorName string, parameters TagsObject, options *AzureTrafficCollectorsClientUpdateTagsOptions) (AzureTrafficCollectorsClientUpdateTagsResponse, error)

UpdateTags - Updates the specified Azure Traffic Collector tags. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureTrafficCollectorName - Azure Traffic Collector name
  • parameters - Parameters supplied to update Azure Traffic Collector tags.
  • options - AzureTrafficCollectorsClientUpdateTagsOptions contains the optional parameters for the AzureTrafficCollectorsClient.UpdateTags method.
Example

Generated from example definition: 2022-11-01/AzureTrafficCollectorUpdateTags.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("subid", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAzureTrafficCollectorsClient().UpdateTags(ctx, "rg1", "atc", armnetworkfunction.TagsObject{
	Tags: map[string]*string{
		"key1": to.Ptr("value1"),
		"key2": 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 = armnetworkfunction.AzureTrafficCollectorsClientUpdateTagsResponse{
// 	AzureTrafficCollector: &armnetworkfunction.AzureTrafficCollector{
// 		Name: to.Ptr("atc"),
// 		Type: to.Ptr("Microsoft.NetworkFunction/azureTrafficCollectors"),
// 		Etag: to.Ptr("w/\\00000000-0000-0000-0000-000000000000\\"),
// 		ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc"),
// 		Location: to.Ptr("West US"),
// 		Properties: &armnetworkfunction.AzureTrafficCollectorPropertiesFormat{
// 			CollectorPolicies: []*armnetworkfunction.ResourceReference{
// 			},
// 			ProvisioningState: to.Ptr(armnetworkfunction.ProvisioningStateSucceeded),
// 		},
// 		Tags: map[string]*string{
// 			"key1": to.Ptr("value1"),
// 			"key2": to.Ptr("value2"),
// 		},
// 	},
// }

type AzureTrafficCollectorsClientBeginCreateOrUpdateOptions

type AzureTrafficCollectorsClientBeginCreateOrUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

AzureTrafficCollectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureTrafficCollectorsClient.BeginCreateOrUpdate method.

type AzureTrafficCollectorsClientBeginDeleteOptions

type AzureTrafficCollectorsClientBeginDeleteOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

AzureTrafficCollectorsClientBeginDeleteOptions contains the optional parameters for the AzureTrafficCollectorsClient.BeginDelete method.

type AzureTrafficCollectorsClientCreateOrUpdateResponse

type AzureTrafficCollectorsClientCreateOrUpdateResponse struct {
	// Azure Traffic Collector resource.
	AzureTrafficCollector
}

AzureTrafficCollectorsClientCreateOrUpdateResponse contains the response from method AzureTrafficCollectorsClient.BeginCreateOrUpdate.

type AzureTrafficCollectorsClientDeleteResponse

type AzureTrafficCollectorsClientDeleteResponse struct {
}

AzureTrafficCollectorsClientDeleteResponse contains the response from method AzureTrafficCollectorsClient.BeginDelete.

type AzureTrafficCollectorsClientGetOptions

type AzureTrafficCollectorsClientGetOptions struct {
}

AzureTrafficCollectorsClientGetOptions contains the optional parameters for the AzureTrafficCollectorsClient.Get method.

type AzureTrafficCollectorsClientGetResponse

type AzureTrafficCollectorsClientGetResponse struct {
	// Azure Traffic Collector resource.
	AzureTrafficCollector
}

AzureTrafficCollectorsClientGetResponse contains the response from method AzureTrafficCollectorsClient.Get.

type AzureTrafficCollectorsClientUpdateTagsOptions

type AzureTrafficCollectorsClientUpdateTagsOptions struct {
}

AzureTrafficCollectorsClientUpdateTagsOptions contains the optional parameters for the AzureTrafficCollectorsClient.UpdateTags method.

type AzureTrafficCollectorsClientUpdateTagsResponse

type AzureTrafficCollectorsClientUpdateTagsResponse struct {
	// Azure Traffic Collector resource.
	AzureTrafficCollector
}

AzureTrafficCollectorsClientUpdateTagsResponse contains the response from method AzureTrafficCollectorsClient.UpdateTags.

type Client

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

Client contains the methods for the service. Don't use this type directly, use NewClient() instead.

func NewClient

func NewClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)

NewClient creates a new instance of Client with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - Contains optional client configuration. Pass nil to accept the default values.

func (*Client) NewListOperationsPager

func (client *Client) NewListOperationsPager(options *ClientListOperationsOptions) *runtime.Pager[ClientListOperationsResponse]

NewListOperationsPager - Lists all of the available NetworkFunction Rest API operations.

Generated from API version 2022-11-01

  • options - ClientListOperationsOptions contains the optional parameters for the Client.NewListOperationsPager method.
Example

Generated from example definition: 2022-11-01/OperationsList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("<subscriptionID>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewClient().NewListOperationsPager(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 = armnetworkfunction.ClientListOperationsResponse{
	// 	OperationListResult: armnetworkfunction.OperationListResult{
	// 		Value: []*armnetworkfunction.Operation{
	// 			{
	// 				Name: to.Ptr("Microsoft.NetworkFunction/azureTrafficCollectors/write"),
	// 				Display: &armnetworkfunction.OperationDisplay{
	// 					Description: to.Ptr("Creates or Update a azure traffic collector"),
	// 					Operation: to.Ptr("Create/Update a azure traffic collector"),
	// 					Provider: to.Ptr("Microsoft NetworkFunction"),
	// 					Resource: to.Ptr("AzureTrafficCollector"),
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

type ClientFactory

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

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. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewAzureTrafficCollectorsByResourceGroupClient

func (c *ClientFactory) NewAzureTrafficCollectorsByResourceGroupClient() *AzureTrafficCollectorsByResourceGroupClient

NewAzureTrafficCollectorsByResourceGroupClient creates a new instance of AzureTrafficCollectorsByResourceGroupClient.

func (*ClientFactory) NewAzureTrafficCollectorsBySubscriptionClient

func (c *ClientFactory) NewAzureTrafficCollectorsBySubscriptionClient() *AzureTrafficCollectorsBySubscriptionClient

NewAzureTrafficCollectorsBySubscriptionClient creates a new instance of AzureTrafficCollectorsBySubscriptionClient.

func (*ClientFactory) NewAzureTrafficCollectorsClient

func (c *ClientFactory) NewAzureTrafficCollectorsClient() *AzureTrafficCollectorsClient

NewAzureTrafficCollectorsClient creates a new instance of AzureTrafficCollectorsClient.

func (*ClientFactory) NewClient

func (c *ClientFactory) NewClient() *Client

NewClient creates a new instance of Client.

func (*ClientFactory) NewCollectorPoliciesClient

func (c *ClientFactory) NewCollectorPoliciesClient() *CollectorPoliciesClient

NewCollectorPoliciesClient creates a new instance of CollectorPoliciesClient.

type ClientListOperationsOptions

type ClientListOperationsOptions struct {
}

ClientListOperationsOptions contains the optional parameters for the Client.NewListOperationsPager method.

type ClientListOperationsResponse

type ClientListOperationsResponse struct {
	// Paged collection of Operation items
	OperationListResult
}

ClientListOperationsResponse contains the response from method Client.NewListOperationsPager.

type CollectorPoliciesClient

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

CollectorPoliciesClient contains the methods for the CollectorPolicies group. Don't use this type directly, use NewCollectorPoliciesClient() instead.

func NewCollectorPoliciesClient

func NewCollectorPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CollectorPoliciesClient, error)

NewCollectorPoliciesClient creates a new instance of CollectorPoliciesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - Contains optional client configuration. Pass nil to accept the default values.

func (*CollectorPoliciesClient) BeginCreateOrUpdate

func (client *CollectorPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureTrafficCollectorName string, collectorPolicyName string, parameters CollectorPolicy, options *CollectorPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CollectorPoliciesClientCreateOrUpdateResponse], error)

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

Generated from API version 2022-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureTrafficCollectorName - Azure Traffic Collector name
  • collectorPolicyName - Collector Policy Name
  • parameters - The parameters to provide for the created Collector Policy.
  • options - CollectorPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the CollectorPoliciesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: 2022-11-01/CollectorPolicyCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("subid", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCollectorPoliciesClient().BeginCreateOrUpdate(ctx, "rg1", "atc", "cp1", armnetworkfunction.CollectorPolicy{
	Location: to.Ptr("West US"),
	Properties: &armnetworkfunction.CollectorPolicyPropertiesFormat{
		EmissionPolicies: []*armnetworkfunction.EmissionPoliciesPropertiesFormat{
			{
				EmissionDestinations: []*armnetworkfunction.EmissionPolicyDestination{
					{
						DestinationType: to.Ptr(armnetworkfunction.DestinationTypeAzureMonitor),
					},
				},
				EmissionType: to.Ptr(armnetworkfunction.EmissionTypeIPFIX),
			},
		},
		IngestionPolicy: &armnetworkfunction.IngestionPolicyPropertiesFormat{
			IngestionSources: []*armnetworkfunction.IngestionSourcesPropertiesFormat{
				{
					ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName"),
					SourceType: to.Ptr(armnetworkfunction.SourceTypeResource),
				},
			},
			IngestionType: to.Ptr(armnetworkfunction.IngestionTypeIPFIX),
		},
	},
}, 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 = armnetworkfunction.CollectorPoliciesClientCreateOrUpdateResponse{
// 	CollectorPolicy: &armnetworkfunction.CollectorPolicy{
// 		Name: to.Ptr("cp1"),
// 		Type: to.Ptr("Microsoft.NetworkFunction/azureTrafficCollectors/collectorPolicies"),
// 		Etag: to.Ptr("w/\\72090554-7e3b-43f2-80ad-99a9020dcb11\\"),
// 		ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/AzureTrafficCollector/atc/collectorPolicies/cp1"),
// 		Location: to.Ptr("westus"),
// 		Properties: &armnetworkfunction.CollectorPolicyPropertiesFormat{
// 			EmissionPolicies: []*armnetworkfunction.EmissionPoliciesPropertiesFormat{
// 				{
// 					EmissionDestinations: []*armnetworkfunction.EmissionPolicyDestination{
// 						{
// 							DestinationType: to.Ptr(armnetworkfunction.DestinationTypeAzureMonitor),
// 						},
// 					},
// 					EmissionType: to.Ptr(armnetworkfunction.EmissionTypeIPFIX),
// 				},
// 			},
// 			IngestionPolicy: &armnetworkfunction.IngestionPolicyPropertiesFormat{
// 				IngestionSources: []*armnetworkfunction.IngestionSourcesPropertiesFormat{
// 					{
// 						ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName"),
// 						SourceType: to.Ptr(armnetworkfunction.SourceTypeResource),
// 					},
// 				},
// 				IngestionType: to.Ptr(armnetworkfunction.IngestionTypeIPFIX),
// 			},
// 			ProvisioningState: to.Ptr(armnetworkfunction.ProvisioningStateSucceeded),
// 		},
// 	},
// }

func (*CollectorPoliciesClient) BeginDelete

func (client *CollectorPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, azureTrafficCollectorName string, collectorPolicyName string, options *CollectorPoliciesClientBeginDeleteOptions) (*runtime.Poller[CollectorPoliciesClientDeleteResponse], error)

BeginDelete - Deletes a specified Collector Policy resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureTrafficCollectorName - Azure Traffic Collector name
  • collectorPolicyName - Collector Policy Name
  • options - CollectorPoliciesClientBeginDeleteOptions contains the optional parameters for the CollectorPoliciesClient.BeginDelete method.
Example

Generated from example definition: 2022-11-01/CollectorPolicyDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("subid", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCollectorPoliciesClient().BeginDelete(ctx, "rg1", "atc", "cp1", 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 = armnetworkfunction.CollectorPoliciesClientDeleteResponse{
// }

func (*CollectorPoliciesClient) Get

func (client *CollectorPoliciesClient) Get(ctx context.Context, resourceGroupName string, azureTrafficCollectorName string, collectorPolicyName string, options *CollectorPoliciesClientGetOptions) (CollectorPoliciesClientGetResponse, error)

Get - Gets the collector policy in a specified Traffic Collector If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureTrafficCollectorName - Azure Traffic Collector name
  • collectorPolicyName - Collector Policy Name
  • options - CollectorPoliciesClientGetOptions contains the optional parameters for the CollectorPoliciesClient.Get method.
Example

Generated from example definition: 2022-11-01/CollectorPolicyGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("subid", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCollectorPoliciesClient().Get(ctx, "rg1", "atc", "cp1", 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 = armnetworkfunction.CollectorPoliciesClientGetResponse{
// 	CollectorPolicy: &armnetworkfunction.CollectorPolicy{
// 		Name: to.Ptr("atc"),
// 		Type: to.Ptr("Microsoft.NetworkFunction/azureTrafficCollectors/collectorPolicies"),
// 		Etag: to.Ptr("w/\\72090554-7e3b-43f2-80ad-99a9020dcb11\\"),
// 		ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc/collectorPolicies/cp1"),
// 		Location: to.Ptr("westus"),
// 		Properties: &armnetworkfunction.CollectorPolicyPropertiesFormat{
// 			EmissionPolicies: []*armnetworkfunction.EmissionPoliciesPropertiesFormat{
// 				{
// 					EmissionDestinations: []*armnetworkfunction.EmissionPolicyDestination{
// 						{
// 							DestinationType: to.Ptr(armnetworkfunction.DestinationTypeAzureMonitor),
// 						},
// 					},
// 					EmissionType: to.Ptr(armnetworkfunction.EmissionTypeIPFIX),
// 				},
// 			},
// 			IngestionPolicy: &armnetworkfunction.IngestionPolicyPropertiesFormat{
// 				IngestionSources: []*armnetworkfunction.IngestionSourcesPropertiesFormat{
// 					{
// 						ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName"),
// 						SourceType: to.Ptr(armnetworkfunction.SourceTypeResource),
// 					},
// 				},
// 				IngestionType: to.Ptr(armnetworkfunction.IngestionTypeIPFIX),
// 			},
// 			ProvisioningState: to.Ptr(armnetworkfunction.ProvisioningStateSucceeded),
// 		},
// 	},
// }

func (*CollectorPoliciesClient) NewListPager

func (client *CollectorPoliciesClient) NewListPager(resourceGroupName string, azureTrafficCollectorName string, options *CollectorPoliciesClientListOptions) *runtime.Pager[CollectorPoliciesClientListResponse]

NewListPager - Return list of Collector policies in a Azure Traffic Collector

Generated from API version 2022-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureTrafficCollectorName - Azure Traffic Collector name
  • options - CollectorPoliciesClientListOptions contains the optional parameters for the CollectorPoliciesClient.NewListPager method.
Example

Generated from example definition: 2022-11-01/CollectorPoliciesList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("subid", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewCollectorPoliciesClient().NewListPager("rg1", "atc", 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 = armnetworkfunction.CollectorPoliciesClientListResponse{
	// 	CollectorPolicyListResult: armnetworkfunction.CollectorPolicyListResult{
	// 		Value: []*armnetworkfunction.CollectorPolicy{
	// 			{
	// 				Name: to.Ptr("atc"),
	// 				Type: to.Ptr("Microsoft.NetworkFunction/azureTrafficCollectors/collectorPolicies"),
	// 				Etag: to.Ptr("w/\\72090554-7e3b-43f2-80ad-99a9020dcb11\\"),
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc/collectorPolicies/cp1"),
	// 				Location: to.Ptr("westus"),
	// 				Properties: &armnetworkfunction.CollectorPolicyPropertiesFormat{
	// 					EmissionPolicies: []*armnetworkfunction.EmissionPoliciesPropertiesFormat{
	// 						{
	// 							EmissionDestinations: []*armnetworkfunction.EmissionPolicyDestination{
	// 								{
	// 									DestinationType: to.Ptr(armnetworkfunction.DestinationTypeAzureMonitor),
	// 								},
	// 							},
	// 							EmissionType: to.Ptr(armnetworkfunction.EmissionTypeIPFIX),
	// 						},
	// 					},
	// 					IngestionPolicy: &armnetworkfunction.IngestionPolicyPropertiesFormat{
	// 						IngestionSources: []*armnetworkfunction.IngestionSourcesPropertiesFormat{
	// 							{
	// 								ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName"),
	// 								SourceType: to.Ptr(armnetworkfunction.SourceTypeResource),
	// 							},
	// 						},
	// 						IngestionType: to.Ptr(armnetworkfunction.IngestionTypeIPFIX),
	// 					},
	// 					ProvisioningState: to.Ptr(armnetworkfunction.ProvisioningStateSucceeded),
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

func (*CollectorPoliciesClient) UpdateTags

func (client *CollectorPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, azureTrafficCollectorName string, collectorPolicyName string, parameters TagsObject, options *CollectorPoliciesClientUpdateTagsOptions) (CollectorPoliciesClientUpdateTagsResponse, error)

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

Generated from API version 2022-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureTrafficCollectorName - Azure Traffic Collector name
  • collectorPolicyName - Collector Policy Name
  • parameters - The resource properties to be updated.
  • options - CollectorPoliciesClientUpdateTagsOptions contains the optional parameters for the CollectorPoliciesClient.UpdateTags method.
Example

Generated from example definition: 2022-11-01/CollectorPolicyUpdateTags.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetworkfunction.NewClientFactory("subid", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCollectorPoliciesClient().UpdateTags(ctx, "rg1", "atc", "cp1", armnetworkfunction.TagsObject{
	Tags: map[string]*string{
		"key1": to.Ptr("value1"),
		"key2": 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 = armnetworkfunction.CollectorPoliciesClientUpdateTagsResponse{
// 	CollectorPolicy: &armnetworkfunction.CollectorPolicy{
// 		Name: to.Ptr("atc"),
// 		Type: to.Ptr("Microsoft.NetworkFunction/azureTrafficCollectors/collectorPolicies"),
// 		Etag: to.Ptr("w/\\72090554-7e3b-43f2-80ad-99a9020dcb11\\"),
// 		ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc/collectorPolicies/cp1"),
// 		Location: to.Ptr("westus"),
// 		Properties: &armnetworkfunction.CollectorPolicyPropertiesFormat{
// 			EmissionPolicies: []*armnetworkfunction.EmissionPoliciesPropertiesFormat{
// 				{
// 					EmissionDestinations: []*armnetworkfunction.EmissionPolicyDestination{
// 						{
// 							DestinationType: to.Ptr(armnetworkfunction.DestinationTypeAzureMonitor),
// 						},
// 					},
// 					EmissionType: to.Ptr(armnetworkfunction.EmissionTypeIPFIX),
// 				},
// 			},
// 			IngestionPolicy: &armnetworkfunction.IngestionPolicyPropertiesFormat{
// 				IngestionSources: []*armnetworkfunction.IngestionSourcesPropertiesFormat{
// 					{
// 						ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName"),
// 						SourceType: to.Ptr(armnetworkfunction.SourceTypeResource),
// 					},
// 				},
// 				IngestionType: to.Ptr(armnetworkfunction.IngestionTypeIPFIX),
// 			},
// 			ProvisioningState: to.Ptr(armnetworkfunction.ProvisioningStateSucceeded),
// 		},
// 		Tags: map[string]*string{
// 			"key1": to.Ptr("value1"),
// 			"key2": to.Ptr("value2"),
// 		},
// 	},
// }

type CollectorPoliciesClientBeginCreateOrUpdateOptions

type CollectorPoliciesClientBeginCreateOrUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

CollectorPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the CollectorPoliciesClient.BeginCreateOrUpdate method.

type CollectorPoliciesClientBeginDeleteOptions

type CollectorPoliciesClientBeginDeleteOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

CollectorPoliciesClientBeginDeleteOptions contains the optional parameters for the CollectorPoliciesClient.BeginDelete method.

type CollectorPoliciesClientCreateOrUpdateResponse

type CollectorPoliciesClientCreateOrUpdateResponse struct {
	// Collector policy resource.
	CollectorPolicy
}

CollectorPoliciesClientCreateOrUpdateResponse contains the response from method CollectorPoliciesClient.BeginCreateOrUpdate.

type CollectorPoliciesClientDeleteResponse

type CollectorPoliciesClientDeleteResponse struct {
}

CollectorPoliciesClientDeleteResponse contains the response from method CollectorPoliciesClient.BeginDelete.

type CollectorPoliciesClientGetOptions

type CollectorPoliciesClientGetOptions struct {
}

CollectorPoliciesClientGetOptions contains the optional parameters for the CollectorPoliciesClient.Get method.

type CollectorPoliciesClientGetResponse

type CollectorPoliciesClientGetResponse struct {
	// Collector policy resource.
	CollectorPolicy
}

CollectorPoliciesClientGetResponse contains the response from method CollectorPoliciesClient.Get.

type CollectorPoliciesClientListOptions

type CollectorPoliciesClientListOptions struct {
}

CollectorPoliciesClientListOptions contains the optional parameters for the CollectorPoliciesClient.NewListPager method.

type CollectorPoliciesClientListResponse

type CollectorPoliciesClientListResponse struct {
	// The response of a CollectorPolicy list operation.
	CollectorPolicyListResult
}

CollectorPoliciesClientListResponse contains the response from method CollectorPoliciesClient.NewListPager.

type CollectorPoliciesClientUpdateTagsOptions

type CollectorPoliciesClientUpdateTagsOptions struct {
}

CollectorPoliciesClientUpdateTagsOptions contains the optional parameters for the CollectorPoliciesClient.UpdateTags method.

type CollectorPoliciesClientUpdateTagsResponse

type CollectorPoliciesClientUpdateTagsResponse struct {
	// Collector policy resource.
	CollectorPolicy
}

CollectorPoliciesClientUpdateTagsResponse contains the response from method CollectorPoliciesClient.UpdateTags.

type CollectorPolicy

type CollectorPolicy struct {
	// REQUIRED; Resource location.
	Location *string

	// Properties of the Collector Policy.
	Properties *CollectorPolicyPropertiesFormat

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

	// READ-ONLY; A unique read-only string that changes whenever the resource is updated.
	Etag *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; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

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

CollectorPolicy - Collector policy resource.

func (CollectorPolicy) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CollectorPolicy.

func (*CollectorPolicy) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CollectorPolicy.

type CollectorPolicyListResult

type CollectorPolicyListResult struct {
	// REQUIRED; The CollectorPolicy items on this page
	Value []*CollectorPolicy

	// The link to the next page of items
	NextLink *string
}

CollectorPolicyListResult - The response of a CollectorPolicy list operation.

func (CollectorPolicyListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CollectorPolicyListResult.

func (*CollectorPolicyListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CollectorPolicyListResult.

type CollectorPolicyPropertiesFormat

type CollectorPolicyPropertiesFormat struct {
	// Emission policies.
	EmissionPolicies []*EmissionPoliciesPropertiesFormat

	// Ingestion policies.
	IngestionPolicy *IngestionPolicyPropertiesFormat

	// READ-ONLY; The provisioning state.
	ProvisioningState *ProvisioningState
}

CollectorPolicyPropertiesFormat - Collection policy properties.

func (CollectorPolicyPropertiesFormat) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CollectorPolicyPropertiesFormat.

func (*CollectorPolicyPropertiesFormat) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CollectorPolicyPropertiesFormat.

type CreatedByType

type CreatedByType string

CreatedByType - The kind of entity that created the resource.

const (
	// CreatedByTypeApplication - The entity was created by an application.
	CreatedByTypeApplication CreatedByType = "Application"
	// CreatedByTypeKey - The entity was created by a key.
	CreatedByTypeKey CreatedByType = "Key"
	// CreatedByTypeManagedIdentity - The entity was created by a managed identity.
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	// CreatedByTypeUser - The entity was created by a user.
	CreatedByTypeUser CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DestinationType

type DestinationType string

DestinationType - Emission destination type.

const (
	// DestinationTypeAzureMonitor - AzureMonitor
	DestinationTypeAzureMonitor DestinationType = "AzureMonitor"
)

func PossibleDestinationTypeValues

func PossibleDestinationTypeValues() []DestinationType

PossibleDestinationTypeValues returns the possible values for the DestinationType const type.

type EmissionPoliciesPropertiesFormat

type EmissionPoliciesPropertiesFormat struct {
	// Emission policy destinations.
	EmissionDestinations []*EmissionPolicyDestination

	// Emission format type.
	EmissionType *EmissionType
}

EmissionPoliciesPropertiesFormat - Emission policy properties.

func (EmissionPoliciesPropertiesFormat) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmissionPoliciesPropertiesFormat.

func (*EmissionPoliciesPropertiesFormat) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmissionPoliciesPropertiesFormat.

type EmissionPolicyDestination

type EmissionPolicyDestination struct {
	// Emission destination type.
	DestinationType *DestinationType
}

EmissionPolicyDestination - Emission policy destination properties.

func (EmissionPolicyDestination) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmissionPolicyDestination.

func (*EmissionPolicyDestination) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmissionPolicyDestination.

type EmissionType

type EmissionType string

EmissionType - Emission format type.

const (
	// EmissionTypeIPFIX - IPFIX
	EmissionTypeIPFIX EmissionType = "IPFIX"
)

func PossibleEmissionTypeValues

func PossibleEmissionTypeValues() []EmissionType

PossibleEmissionTypeValues returns the possible values for the EmissionType const type.

type IngestionPolicyPropertiesFormat

type IngestionPolicyPropertiesFormat struct {
	// Ingestion Sources.
	IngestionSources []*IngestionSourcesPropertiesFormat

	// The ingestion type.
	IngestionType *IngestionType
}

IngestionPolicyPropertiesFormat - Ingestion Policy properties.

func (IngestionPolicyPropertiesFormat) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IngestionPolicyPropertiesFormat.

func (*IngestionPolicyPropertiesFormat) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IngestionPolicyPropertiesFormat.

type IngestionSourcesPropertiesFormat

type IngestionSourcesPropertiesFormat struct {
	// Resource ID.
	ResourceID *string

	// Ingestion source type.
	SourceType *SourceType
}

IngestionSourcesPropertiesFormat - Ingestion policy properties.

func (IngestionSourcesPropertiesFormat) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IngestionSourcesPropertiesFormat.

func (*IngestionSourcesPropertiesFormat) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IngestionSourcesPropertiesFormat.

type IngestionType

type IngestionType string

IngestionType - The ingestion type.

const (
	// IngestionTypeIPFIX - IPFIX
	IngestionTypeIPFIX IngestionType = "IPFIX"
)

func PossibleIngestionTypeValues

func PossibleIngestionTypeValues() []IngestionType

PossibleIngestionTypeValues returns the possible values for the IngestionType const type.

type Operation

type Operation struct {
	// Display metadata associated with the operation.
	Display *OperationDisplay

	// Indicates whether the operation is a data action
	IsDataAction *bool

	// Operation name: {provider}/{resource}/{operation}
	Name *string

	// Origin of the operation
	Origin *string
}

Operation - Azure Traffic Collector REST API operation definition.

func (Operation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

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

	// Type of operation: get, read, delete, etc.
	Operation *string

	// Service provider: Microsoft NetworkFunction.
	Provider *string

	// Resource on which the operation is performed etc.
	Resource *string
}

OperationDisplay - Display metadata associated with the operation.

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// REQUIRED; The Operation items on this page
	Value []*Operation

	// The link to the next page of items
	NextLink *string
}

OperationListResult - Paged collection of Operation items

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The current provisioning state.

const (
	// ProvisioningStateDeleting - Deleting
	ProvisioningStateDeleting ProvisioningState = "Deleting"
	// ProvisioningStateFailed - Failed
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateSucceeded - Succeeded
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	// ProvisioningStateUpdating - Updating
	ProvisioningStateUpdating ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ResourceReference

type ResourceReference struct {
	// READ-ONLY; Resource ID.
	ID *string
}

ResourceReference - Resource reference properties.

func (ResourceReference) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceReference.

func (*ResourceReference) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceReference.

type SourceType

type SourceType string

SourceType - Ingestion source type.

const (
	// SourceTypeResource - Resource
	SourceTypeResource SourceType = "Resource"
)

func PossibleSourceTypeValues

func PossibleSourceTypeValues() []SourceType

PossibleSourceTypeValues returns the possible values for the SourceType const type.

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

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

UnmarshalJSON implements the json.Unmarshaller interface for type TagsObject.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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