armnetworkfunction

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 16 Imported by: 1

README

Azure Network Function Manager Module for Go

PkgGoDev

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

Source code

Getting started

Prerequisites

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

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.

Clients

Azure Network Function Manager modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armnetworkfunction.NewAzureTrafficCollectorsClient(<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,
    },
}
client, err := armnetworkfunction.NewAzureTrafficCollectorsClient(<subscription ID>, cred, &options)

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 {
	// Resource location.
	Location *string `json:"location,omitempty"`

	// Properties of the Azure Traffic Collector.
	Properties *AzureTrafficCollectorPropertiesFormat `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; A unique read-only string that changes whenever the resource is updated.
	Etag *string `json:"etag,omitempty" azure:"ro"`

	// READ-ONLY; Resource ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *TrackedResourceSystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

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 {
	// A list of Traffic Collector resources.
	Value []*AzureTrafficCollector `json:"value,omitempty"`

	// READ-ONLY; The URL to get the next set of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

AzureTrafficCollectorListResult - Response for the ListTrafficCollectors API service call.

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 {
	// Collector Policies for Azure Traffic Collector.
	CollectorPolicies []*CollectorPolicy `json:"collectorPolicies,omitempty"`

	// The virtualHub to which the Azure Traffic Collector belongs.
	VirtualHub *ResourceReference `json:"virtualHub,omitempty"`

	// READ-ONLY; The provisioning state of the application rule collection resource.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

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 - Azure Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AzureTrafficCollectorsByResourceGroupClient) NewListPager

NewListPager - Return list of Azure Traffic Collectors in a Resource Group If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - The name of the resource group. options - AzureTrafficCollectorsByResourceGroupClientListOptions contains the optional parameters for the AzureTrafficCollectorsByResourceGroupClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorsByResourceGroupList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armnetworkfunction.NewAzureTrafficCollectorsByResourceGroupClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("rg1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AzureTrafficCollectorsByResourceGroupClientListOptions

type AzureTrafficCollectorsByResourceGroupClientListOptions struct {
}

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

type AzureTrafficCollectorsByResourceGroupClientListResponse

type AzureTrafficCollectorsByResourceGroupClientListResponse struct {
	AzureTrafficCollectorListResult
}

AzureTrafficCollectorsByResourceGroupClientListResponse contains the response from method AzureTrafficCollectorsByResourceGroupClient.List.

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 - Azure Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*AzureTrafficCollectorsBySubscriptionClient) NewListPager

NewListPager - Return list of Azure Traffic Collectors in a subscription If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 options - AzureTrafficCollectorsBySubscriptionClientListOptions contains the optional parameters for the AzureTrafficCollectorsBySubscriptionClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorsBySubscriptionList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armnetworkfunction.NewAzureTrafficCollectorsBySubscriptionClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AzureTrafficCollectorsBySubscriptionClientListOptions

type AzureTrafficCollectorsBySubscriptionClientListOptions struct {
}

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

type AzureTrafficCollectorsBySubscriptionClientListResponse

type AzureTrafficCollectorsBySubscriptionClientListResponse struct {
	AzureTrafficCollectorListResult
}

AzureTrafficCollectorsBySubscriptionClientListResponse contains the response from method AzureTrafficCollectorsBySubscriptionClient.List.

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 - Azure Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - 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-05-01 resourceGroupName - The name of the resource group. 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: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorCreate.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/networkfunction/armnetworkfunction"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armnetworkfunction.NewAzureTrafficCollectorsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"rg1",
		"atc",
		armnetworkfunction.AzureTrafficCollector{
			Location: to.Ptr("West US"),
			Tags: map[string]*string{
				"key1": to.Ptr("value1"),
			},
			Properties: &armnetworkfunction.AzureTrafficCollectorPropertiesFormat{
				CollectorPolicies: []*armnetworkfunction.CollectorPolicy{},
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

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-05-01 resourceGroupName - The name of the resource group. azureTrafficCollectorName - Azure Traffic Collector name options - AzureTrafficCollectorsClientBeginDeleteOptions contains the optional parameters for the AzureTrafficCollectorsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armnetworkfunction.NewAzureTrafficCollectorsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"rg1",
		"atc",
		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 (*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-05-01 resourceGroupName - The name of the resource group. azureTrafficCollectorName - Azure Traffic Collector name options - AzureTrafficCollectorsClientGetOptions contains the optional parameters for the AzureTrafficCollectorsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armnetworkfunction.NewAzureTrafficCollectorsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"rg1",
		"atc",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

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-05-01 resourceGroupName - The name of the resource group. 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: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorUpdateTags.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/networkfunction/armnetworkfunction"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armnetworkfunction.NewAzureTrafficCollectorsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
Output:

type AzureTrafficCollectorsClientBeginCreateOrUpdateOptions

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

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

type AzureTrafficCollectorsClientBeginDeleteOptions

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

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

type AzureTrafficCollectorsClientCreateOrUpdateResponse

type AzureTrafficCollectorsClientCreateOrUpdateResponse struct {
	AzureTrafficCollector
}

AzureTrafficCollectorsClientCreateOrUpdateResponse contains the response from method AzureTrafficCollectorsClient.CreateOrUpdate.

type AzureTrafficCollectorsClientDeleteResponse

type AzureTrafficCollectorsClientDeleteResponse struct {
}

AzureTrafficCollectorsClientDeleteResponse contains the response from method AzureTrafficCollectorsClient.Delete.

type AzureTrafficCollectorsClientGetOptions

type AzureTrafficCollectorsClientGetOptions struct {
}

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

type AzureTrafficCollectorsClientGetResponse

type AzureTrafficCollectorsClientGetResponse struct {
	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 {
	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 NetworkFunction group. 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 - 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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 options - ClientListOperationsOptions contains the optional parameters for the Client.ListOperations method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/OperationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armnetworkfunction.NewClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListOperationsPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ClientListOperationsOptions

type ClientListOperationsOptions struct {
}

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

type ClientListOperationsResponse

type ClientListOperationsResponse struct {
	OperationListResult
}

ClientListOperationsResponse contains the response from method Client.ListOperations.

type CloudError

type CloudError struct {
	// An error response from the service.
	Error *CloudErrorBody `json:"error,omitempty"`
}

CloudError - An error response from the service.

func (CloudError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudError.

func (*CloudError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudError.

type CloudErrorBody

type CloudErrorBody struct {
	// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code *string `json:"code,omitempty"`

	// A list of additional details about the error.
	Details []*CloudErrorBody `json:"details,omitempty"`

	// A message describing the error, intended to be suitable for display in a user interface.
	Message *string `json:"message,omitempty"`

	// The target of the particular error. For example, the name of the property in error.
	Target *string `json:"target,omitempty"`
}

CloudErrorBody - An error response from the service.

func (CloudErrorBody) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudErrorBody.

func (*CloudErrorBody) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudErrorBody.

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 - Azure Subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - 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-05-01 resourceGroupName - The name of the resource group. 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: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPolicyCreate.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/networkfunction/armnetworkfunction"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armnetworkfunction.NewCollectorPoliciesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"rg1",
		"atc",
		"cp1",
		armnetworkfunction.CollectorPolicy{
			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)
	}
	// TODO: use response item
	_ = res
}
Output:

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-05-01 resourceGroupName - The name of the resource group. 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: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPolicyDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armnetworkfunction.NewCollectorPoliciesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"rg1",
		"atc",
		"cp1",
		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 (*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-05-01 resourceGroupName - The name of the resource group. 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: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPolicyGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armnetworkfunction.NewCollectorPoliciesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"rg1",
		"atc",
		"cp1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

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 If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-05-01 resourceGroupName - The name of the resource group. azureTrafficCollectorName - Azure Traffic Collector name options - CollectorPoliciesClientListOptions contains the optional parameters for the CollectorPoliciesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPoliciesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkfunction/armnetworkfunction"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armnetworkfunction.NewCollectorPoliciesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("rg1",
		"atc",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type CollectorPoliciesClientBeginCreateOrUpdateOptions

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

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

type CollectorPoliciesClientBeginDeleteOptions

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

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

type CollectorPoliciesClientCreateOrUpdateResponse

type CollectorPoliciesClientCreateOrUpdateResponse struct {
	CollectorPolicy
}

CollectorPoliciesClientCreateOrUpdateResponse contains the response from method CollectorPoliciesClient.CreateOrUpdate.

type CollectorPoliciesClientDeleteResponse

type CollectorPoliciesClientDeleteResponse struct {
}

CollectorPoliciesClientDeleteResponse contains the response from method CollectorPoliciesClient.Delete.

type CollectorPoliciesClientGetOptions

type CollectorPoliciesClientGetOptions struct {
}

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

type CollectorPoliciesClientGetResponse

type CollectorPoliciesClientGetResponse struct {
	CollectorPolicy
}

CollectorPoliciesClientGetResponse contains the response from method CollectorPoliciesClient.Get.

type CollectorPoliciesClientListOptions

type CollectorPoliciesClientListOptions struct {
}

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

type CollectorPoliciesClientListResponse

type CollectorPoliciesClientListResponse struct {
	CollectorPolicyListResult
}

CollectorPoliciesClientListResponse contains the response from method CollectorPoliciesClient.List.

type CollectorPolicy

type CollectorPolicy struct {
	// Properties of the Collector Policy.
	Properties *CollectorPolicyPropertiesFormat `json:"properties,omitempty"`

	// READ-ONLY; A unique read-only string that changes whenever the resource is updated.
	Etag *string `json:"etag,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *CollectorPolicySystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

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 {
	// A list of collection policies.
	Value []*CollectorPolicy `json:"value,omitempty"`

	// READ-ONLY; The URL to get the next set of results.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

CollectorPolicyListResult - Response for the ListCollectorPolicies API service call.

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 `json:"emissionPolicies,omitempty"`

	// Ingestion policies.
	IngestionPolicy *IngestionPolicyPropertiesFormat `json:"ingestionPolicy,omitempty"`

	// READ-ONLY; The provisioning state.
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"`
}

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 CollectorPolicySystemData

type CollectorPolicySystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

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

func (CollectorPolicySystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CollectorPolicySystemData.

func (*CollectorPolicySystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CollectorPolicySystemData.

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 DestinationType

type DestinationType string

DestinationType - Emission destination type.

const (
	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 `json:"emissionDestinations,omitempty"`

	// Emission format type.
	EmissionType *EmissionType `json:"emissionType,omitempty"`
}

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 `json:"destinationType,omitempty"`
}

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 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 `json:"ingestionSources,omitempty"`

	// The ingestion type.
	IngestionType *IngestionType `json:"ingestionType,omitempty"`
}

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 `json:"resourceId,omitempty"`

	// Ingestion source type.
	SourceType *SourceType `json:"sourceType,omitempty"`
}

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 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 `json:"display,omitempty"`

	// Indicates whether the operation is a data action
	IsDataAction *bool `json:"isDataAction,omitempty"`

	// Operation name: {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty"`

	// Origin of the operation
	Origin *string `json:"origin,omitempty"`
}

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 `json:"description,omitempty"`

	// Type of operation: get, read, delete, etc.
	Operation *string `json:"operation,omitempty"`

	// Service provider: Microsoft NetworkFunction.
	Provider *string `json:"provider,omitempty"`

	// Resource on which the operation is performed etc.
	Resource *string `json:"resource,omitempty"`
}

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 {
	// URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`

	// List of operations supported by the Azure Traffic Collector resource provider.
	Value []*Operation `json:"value,omitempty"`
}

OperationListResult - Result of the request to list Azure Traffic Collector operations. It contains a list of operations and a URL link to get the next set of results.

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  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Azure resource Id
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource name
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Azure resource type
	Type *string `json:"type,omitempty" azure:"ro"`
}

ProxyResource - An azure resource object

func (ProxyResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type ResourceReference

type ResourceReference struct {
	// READ-ONLY; Resource ID.
	ID *string `json:"id,omitempty" azure:"ro"`
}

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 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 `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

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 `json:"tags,omitempty"`
}

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.

type TrackedResource

type TrackedResource struct {
	// Resource location.
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Resource ID.
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; Resource name.
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *TrackedResourceSystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; Resource type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

TrackedResource - Common resource representation.

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 TrackedResourceSystemData

type TrackedResourceSystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

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

func (TrackedResourceSystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrackedResourceSystemData.

func (*TrackedResourceSystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResourceSystemData.

Jump to

Keyboard shortcuts

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