armnetworkanalytics

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 14 Imported by: 0

README

Azure Networkanalytics Module for Go

PkgGoDev

The armnetworkanalytics module provides operations for working with Azure Networkanalytics.

Source code

Getting started

Prerequisites

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

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Networkanalytics module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Networkanalytics. 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 Networkanalytics 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 := armnetworkanalytics.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 := armnetworkanalytics.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.NewDataProductsCatalogsClient()

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 Networkanalytics 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 AccountSas

type AccountSas struct {
	// REQUIRED; Sas token expiry timestamp.
	ExpiryTimeStamp *time.Time

	// REQUIRED; Ip Address
	IPAddress *string

	// REQUIRED; Sas token start timestamp.
	StartTimeStamp *time.Time
}

AccountSas - The details for storage account sas creation.

func (AccountSas) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccountSas.

func (*AccountSas) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountSas.

type AccountSasToken

type AccountSasToken struct {
	// REQUIRED; Field to specify storage account sas token.
	StorageAccountSasToken *string
}

AccountSasToken - Details of storage account sas token .

func (AccountSasToken) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AccountSasToken.

func (*AccountSasToken) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AccountSasToken.

type ActionType

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

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

func (*ClientFactory) NewDataProductsCatalogsClient

func (c *ClientFactory) NewDataProductsCatalogsClient() *DataProductsCatalogsClient

NewDataProductsCatalogsClient creates a new instance of DataProductsCatalogsClient.

func (*ClientFactory) NewDataProductsClient

func (c *ClientFactory) NewDataProductsClient() *DataProductsClient

NewDataProductsClient creates a new instance of DataProductsClient.

func (*ClientFactory) NewDataTypesClient

func (c *ClientFactory) NewDataTypesClient() *DataTypesClient

NewDataTypesClient creates a new instance of DataTypesClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

type ConsumptionEndpointsProperties

type ConsumptionEndpointsProperties struct {
	// READ-ONLY; Resource Id of file access endpoint.
	FileAccessResourceID *string

	// READ-ONLY; Url to consume file type.
	FileAccessURL *string

	// READ-ONLY; Resource Id of ingestion endpoint.
	IngestionResourceID *string

	// READ-ONLY; Ingestion url to upload the data.
	IngestionURL *string

	// READ-ONLY; Resource Id of query endpoint.
	QueryResourceID *string

	// READ-ONLY; Url to consume the processed data.
	QueryURL *string
}

ConsumptionEndpointsProperties - Details of Consumption Properties

func (ConsumptionEndpointsProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ConsumptionEndpointsProperties.

func (*ConsumptionEndpointsProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ConsumptionEndpointsProperties.

type ContainerSaS

type ContainerSaS struct {
	// REQUIRED; Sas token expiry timestamp.
	ExpiryTimeStamp *time.Time

	// REQUIRED; Ip Address
	IPAddress *string

	// REQUIRED; Sas token start timestamp.
	StartTimeStamp *time.Time
}

ContainerSaS - The details for container sas creation.

func (ContainerSaS) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContainerSaS.

func (*ContainerSaS) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerSaS.

type ContainerSasToken

type ContainerSasToken struct {
	// REQUIRED; Field to specify storage container sas token.
	StorageContainerSasToken *string
}

ContainerSasToken - Details of storage container account sas token .

func (ContainerSasToken) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ContainerSasToken.

func (*ContainerSasToken) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerSasToken.

type ControlState

type ControlState string

ControlState - The data type state

const (
	// ControlStateDisabled - Field to disable a setting.
	ControlStateDisabled ControlState = "Disabled"
	// ControlStateEnabled - Field to enable a setting.
	ControlStateEnabled ControlState = "Enabled"
)

func PossibleControlStateValues

func PossibleControlStateValues() []ControlState

PossibleControlStateValues returns the possible values for the ControlState const type.

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 DataProduct

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

	// The managed service identities assigned to this resource.
	Identity *ManagedServiceIdentity

	// The resource-specific properties for this resource.
	Properties *DataProductProperties

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

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

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

	// READ-ONLY; 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
}

DataProduct - The data product resource.

func (DataProduct) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataProduct.

func (*DataProduct) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataProduct.

type DataProductInformation

type DataProductInformation struct {
	// REQUIRED; Name of data product.
	DataProductName *string

	// REQUIRED; Version information of data product.
	DataProductVersions []*DataProductVersion

	// REQUIRED; Description about data product.
	Description *string
}

DataProductInformation - Data Product Information

func (DataProductInformation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataProductInformation.

func (*DataProductInformation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataProductInformation.

type DataProductListResult

type DataProductListResult struct {
	// REQUIRED; The DataProduct items on this page
	Value []*DataProduct

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

DataProductListResult - The response of a DataProduct list operation.

func (DataProductListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataProductListResult.

func (*DataProductListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataProductListResult.

type DataProductNetworkACLs

type DataProductNetworkACLs struct {
	// REQUIRED; The list of query ips in the format of CIDR allowed to connect to query/visualization endpoint.
	AllowedQueryIPRangeList []*string

	// REQUIRED; Default Action
	DefaultAction *DefaultAction

	// REQUIRED; IP rule with specific IP or IP range in CIDR format.
	IPRules []*IPRules

	// REQUIRED; Virtual Network Rule
	VirtualNetworkRule []*VirtualNetworkRule
}

DataProductNetworkACLs - Data Product Network rule set

func (DataProductNetworkACLs) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataProductNetworkACLs.

func (*DataProductNetworkACLs) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataProductNetworkACLs.

type DataProductProperties

type DataProductProperties struct {
	// REQUIRED; Major version of data product.
	MajorVersion *string

	// REQUIRED; Product name of data product.
	Product *string

	// REQUIRED; Data product publisher name.
	Publisher *string

	// Current configured minor version of the data product resource.
	CurrentMinorVersion *string

	// Customer managed encryption key details for data product.
	CustomerEncryptionKey *EncryptionKeyDetails

	// Flag to enable customer managed key encryption for data product.
	CustomerManagedKeyEncryptionEnabled *ControlState

	// Managed resource group configuration.
	ManagedResourceGroupConfiguration *ManagedResourceGroupConfiguration

	// Network rule set for data product.
	Networkacls *DataProductNetworkACLs

	// List of name or email associated with data product resource deployment.
	Owners []*string

	// Flag to enable or disable private link for data product resource.
	PrivateLinksEnabled *ControlState

	// Flag to enable or disable public access of data product resource.
	PublicNetworkAccess *ControlState

	// Purview account url for data product to connect to.
	PurviewAccount *string

	// Purview collection url for data product to connect to.
	PurviewCollection *string

	// Flag to enable or disable redundancy for data product.
	Redundancy *ControlState

	// READ-ONLY; List of available minor versions of the data product resource.
	AvailableMinorVersions []*string

	// READ-ONLY; Resource links which exposed to the customer to query the data.
	ConsumptionEndpoints *ConsumptionEndpointsProperties

	// READ-ONLY; Documentation link for the data product based on definition file.
	Documentation *string

	// READ-ONLY; Key vault url.
	KeyVaultURL *string

	// READ-ONLY; Latest provisioning state of data product.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resource GUID property of the data product resource.
	ResourceGUID *string
}

DataProductProperties - The data product properties.

func (DataProductProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataProductProperties.

func (*DataProductProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataProductProperties.

type DataProductUpdate

type DataProductUpdate struct {
	// The managed service identities assigned to this resource.
	Identity *ManagedServiceIdentity

	// The updatable properties of the DataProduct.
	Properties *DataProductUpdateProperties

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

DataProductUpdate - The type used for update operations of the DataProduct.

func (DataProductUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataProductUpdate.

func (*DataProductUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataProductUpdate.

type DataProductUpdateProperties

type DataProductUpdateProperties struct {
	// Current configured minor version of the data product resource.
	CurrentMinorVersion *string

	// List of name or email associated with data product resource deployment.
	Owners []*string

	// Flag to enable or disable private link for data product resource.
	PrivateLinksEnabled *ControlState

	// Purview account url for data product to connect to.
	PurviewAccount *string

	// Purview collection url for data product to connect to.
	PurviewCollection *string
}

DataProductUpdateProperties - The updatable properties of the DataProduct.

func (DataProductUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataProductUpdateProperties.

func (*DataProductUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataProductUpdateProperties.

type DataProductUserRole

type DataProductUserRole string

DataProductUserRole - The data type state

const (
	// DataProductUserRoleReader - Field to specify user of type Reader.
	DataProductUserRoleReader DataProductUserRole = "Reader"
	// DataProductUserRoleSensitiveReader - Field to specify user of type SensitiveReader.
	// This user has privileged access to read sensitive data of a data product.
	DataProductUserRoleSensitiveReader DataProductUserRole = "SensitiveReader"
)

func PossibleDataProductUserRoleValues

func PossibleDataProductUserRoleValues() []DataProductUserRole

PossibleDataProductUserRoleValues returns the possible values for the DataProductUserRole const type.

type DataProductVersion

type DataProductVersion struct {
	// REQUIRED; Version of data product
	Version *string
}

DataProductVersion - Data Product Version.

func (DataProductVersion) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataProductVersion.

func (*DataProductVersion) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataProductVersion.

type DataProductsCatalog

type DataProductsCatalog struct {
	// The resource-specific properties for this resource.
	Properties *DataProductsCatalogProperties

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

DataProductsCatalog - The data catalog resource.

func (DataProductsCatalog) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataProductsCatalog.

func (*DataProductsCatalog) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataProductsCatalog.

type DataProductsCatalogListResult

type DataProductsCatalogListResult struct {
	// REQUIRED; The DataProductsCatalog items on this page
	Value []*DataProductsCatalog

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

DataProductsCatalogListResult - The response of a DataProductsCatalog list operation.

func (DataProductsCatalogListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataProductsCatalogListResult.

func (*DataProductsCatalogListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataProductsCatalogListResult.

type DataProductsCatalogProperties

type DataProductsCatalogProperties struct {
	// REQUIRED; The data product publisher information.
	Publishers []*PublisherInformation

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

DataProductsCatalogProperties - Details for data catalog properties.

func (DataProductsCatalogProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataProductsCatalogProperties.

func (*DataProductsCatalogProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataProductsCatalogProperties.

type DataProductsCatalogsClient

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

DataProductsCatalogsClient contains the methods for the DataProductsCatalogs group. Don't use this type directly, use NewDataProductsCatalogsClient() instead.

func NewDataProductsCatalogsClient

func NewDataProductsCatalogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataProductsCatalogsClient, error)

NewDataProductsCatalogsClient creates a new instance of DataProductsCatalogsClient with the specified values.

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

func (*DataProductsCatalogsClient) Get

Get - Retrieve data type resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - DataProductsCatalogsClientGetOptions contains the optional parameters for the DataProductsCatalogsClient.Get method.
Example (DataProductsCatalogsGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataProductsCatalogsClient().Get(ctx, "aoiresourceGroupName", 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.DataProductsCatalog = armnetworkanalytics.DataProductsCatalog{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.NetworkAnalytics/dataProductsCatalogs"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default"),
	// 	SystemData: &armnetworkanalytics.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		CreatedBy: to.Ptr("abc@micros.com"),
	// 		CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("abc@micros.com"),
	// 		LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 	},
	// 	Properties: &armnetworkanalytics.DataProductsCatalogProperties{
	// 		ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
	// 		Publishers: []*armnetworkanalytics.PublisherInformation{
	// 			{
	// 				DataProducts: []*armnetworkanalytics.DataProductInformation{
	// 					{
	// 						Description: to.Ptr("Official data product for Mobile Content Cloud."),
	// 						DataProductName: to.Ptr("MCC"),
	// 						DataProductVersions: []*armnetworkanalytics.DataProductVersion{
	// 							{
	// 								Version: to.Ptr("1.0.0"),
	// 						}},
	// 				}},
	// 				PublisherName: to.Ptr("Microsoft"),
	// 		}},
	// 	},
	// }
}
Output:

Example (DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataProductsCatalogsClient().Get(ctx, "aoiresourceGroupName", 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.DataProductsCatalog = armnetworkanalytics.DataProductsCatalog{
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default"),
	// }
}
Output:

func (*DataProductsCatalogsClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List data catalog by resource group.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - DataProductsCatalogsClientListByResourceGroupOptions contains the optional parameters for the DataProductsCatalogsClient.NewListByResourceGroupPager method.
Example (DataProductsCatalogsListByResourceGroupMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataProductsCatalogsClient().NewListByResourceGroupPager("aoiresourceGroupName", 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.DataProductsCatalogListResult = armnetworkanalytics.DataProductsCatalogListResult{
		// 	Value: []*armnetworkanalytics.DataProductsCatalog{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.NetworkAnalytics/dataProductsCatalogs"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default"),
		// 			SystemData: &armnetworkanalytics.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
		// 				CreatedBy: to.Ptr("abc@micros.com"),
		// 				CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("abc@micros.com"),
		// 				LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
		// 			},
		// 			Properties: &armnetworkanalytics.DataProductsCatalogProperties{
		// 				ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
		// 				Publishers: []*armnetworkanalytics.PublisherInformation{
		// 					{
		// 						DataProducts: []*armnetworkanalytics.DataProductInformation{
		// 							{
		// 								Description: to.Ptr("Official data product for Mobile Content Cloud."),
		// 								DataProductName: to.Ptr("MCC"),
		// 								DataProductVersions: []*armnetworkanalytics.DataProductVersion{
		// 									{
		// 										Version: to.Ptr("1.0.0"),
		// 								}},
		// 						}},
		// 						PublisherName: to.Ptr("Microsoft"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (DataProductsCatalogsListByResourceGroupMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataProductsCatalogsClient().NewListByResourceGroupPager("aoiresourceGroupName", 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.DataProductsCatalogListResult = armnetworkanalytics.DataProductsCatalogListResult{
		// 	Value: []*armnetworkanalytics.DataProductsCatalog{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default"),
		// 	}},
		// }
	}
}
Output:

func (*DataProductsCatalogsClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List data catalog by subscription.

Generated from API version 2023-11-15

  • options - DataProductsCatalogsClientListBySubscriptionOptions contains the optional parameters for the DataProductsCatalogsClient.NewListBySubscriptionPager method.
Example (DataProductsCatalogsListBySubscriptionMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataProductsCatalogsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DataProductsCatalogListResult = armnetworkanalytics.DataProductsCatalogListResult{
		// 	Value: []*armnetworkanalytics.DataProductsCatalog{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.NetworkAnalytics/dataProductsCatalogs"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default"),
		// 			SystemData: &armnetworkanalytics.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
		// 				CreatedBy: to.Ptr("abc@micros.com"),
		// 				CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("abc@micros.com"),
		// 				LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
		// 			},
		// 			Properties: &armnetworkanalytics.DataProductsCatalogProperties{
		// 				ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
		// 				Publishers: []*armnetworkanalytics.PublisherInformation{
		// 					{
		// 						DataProducts: []*armnetworkanalytics.DataProductInformation{
		// 							{
		// 								Description: to.Ptr("Official data product for Mobile Content Cloud."),
		// 								DataProductName: to.Ptr("MCC"),
		// 								DataProductVersions: []*armnetworkanalytics.DataProductVersion{
		// 									{
		// 										Version: to.Ptr("1.0.0"),
		// 								}},
		// 						}},
		// 						PublisherName: to.Ptr("Microsoft"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (DataProductsCatalogsListBySubscriptionMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataProductsCatalogsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DataProductsCatalogListResult = armnetworkanalytics.DataProductsCatalogListResult{
		// 	Value: []*armnetworkanalytics.DataProductsCatalog{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default"),
		// 	}},
		// }
	}
}
Output:

type DataProductsCatalogsClientGetOptions

type DataProductsCatalogsClientGetOptions struct {
}

DataProductsCatalogsClientGetOptions contains the optional parameters for the DataProductsCatalogsClient.Get method.

type DataProductsCatalogsClientGetResponse

type DataProductsCatalogsClientGetResponse struct {
	// The data catalog resource.
	DataProductsCatalog
}

DataProductsCatalogsClientGetResponse contains the response from method DataProductsCatalogsClient.Get.

type DataProductsCatalogsClientListByResourceGroupOptions

type DataProductsCatalogsClientListByResourceGroupOptions struct {
}

DataProductsCatalogsClientListByResourceGroupOptions contains the optional parameters for the DataProductsCatalogsClient.NewListByResourceGroupPager method.

type DataProductsCatalogsClientListByResourceGroupResponse

type DataProductsCatalogsClientListByResourceGroupResponse struct {
	// The response of a DataProductsCatalog list operation.
	DataProductsCatalogListResult
}

DataProductsCatalogsClientListByResourceGroupResponse contains the response from method DataProductsCatalogsClient.NewListByResourceGroupPager.

type DataProductsCatalogsClientListBySubscriptionOptions

type DataProductsCatalogsClientListBySubscriptionOptions struct {
}

DataProductsCatalogsClientListBySubscriptionOptions contains the optional parameters for the DataProductsCatalogsClient.NewListBySubscriptionPager method.

type DataProductsCatalogsClientListBySubscriptionResponse

type DataProductsCatalogsClientListBySubscriptionResponse struct {
	// The response of a DataProductsCatalog list operation.
	DataProductsCatalogListResult
}

DataProductsCatalogsClientListBySubscriptionResponse contains the response from method DataProductsCatalogsClient.NewListBySubscriptionPager.

type DataProductsClient

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

DataProductsClient contains the methods for the DataProducts group. Don't use this type directly, use NewDataProductsClient() instead.

func NewDataProductsClient

func NewDataProductsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataProductsClient, error)

NewDataProductsClient creates a new instance of DataProductsClient with the specified values.

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

func (*DataProductsClient) AddUserRole

AddUserRole - Assign role to the data product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • body - The content of the action request
  • options - DataProductsClientAddUserRoleOptions contains the optional parameters for the DataProductsClient.AddUserRole method.
Example (DataProductsAddUserRoleMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_AddUserRole_MaximumSet_Gen.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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataProductsClient().AddUserRole(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.RoleAssignmentCommonProperties{
		DataTypeScope: []*string{
			to.Ptr("scope")},
		PrincipalID:   to.Ptr("00000000-0000-0000-0000-00000000000"),
		PrincipalType: to.Ptr("User"),
		Role:          to.Ptr(armnetworkanalytics.DataProductUserRoleReader),
		RoleID:        to.Ptr("00000000-0000-0000-0000-00000000000"),
		UserName:      to.Ptr("UserName"),
	}, 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.RoleAssignmentDetail = armnetworkanalytics.RoleAssignmentDetail{
	// 	DataTypeScope: []*string{
	// 		to.Ptr("scope")},
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 		PrincipalType: to.Ptr("User"),
	// 		Role: to.Ptr(armnetworkanalytics.DataProductUserRoleReader),
	// 		RoleAssignmentID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 		RoleID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 		UserName: to.Ptr("UserName"),
	// 	}
}
Output:

Example (DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_AddUserRole_MinimumSet_Gen.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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataProductsClient().AddUserRole(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.RoleAssignmentCommonProperties{
		DataTypeScope: []*string{
			to.Ptr("scope")},
		PrincipalID:   to.Ptr("00000000-0000-0000-0000-00000000000"),
		PrincipalType: to.Ptr("User"),
		Role:          to.Ptr(armnetworkanalytics.DataProductUserRoleReader),
		RoleID:        to.Ptr("00000000-0000-0000-0000-00000000000"),
		UserName:      to.Ptr("userName"),
	}, 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.RoleAssignmentDetail = armnetworkanalytics.RoleAssignmentDetail{
	// 	DataTypeScope: []*string{
	// 		to.Ptr("scope")},
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 		PrincipalType: to.Ptr("User"),
	// 		Role: to.Ptr(armnetworkanalytics.DataProductUserRoleReader),
	// 		RoleAssignmentID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 		RoleID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 		UserName: to.Ptr("userName"),
	// 	}
}
Output:

func (*DataProductsClient) BeginCreate

func (client *DataProductsClient) BeginCreate(ctx context.Context, resourceGroupName string, dataProductName string, resource DataProduct, options *DataProductsClientBeginCreateOptions) (*runtime.Poller[DataProductsClientCreateResponse], error)

BeginCreate - Create data product resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • resource - Resource create parameters.
  • options - DataProductsClientBeginCreateOptions contains the optional parameters for the DataProductsClient.BeginCreate method.
Example (DataProductsCreateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Create_MaximumSet_Gen.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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataProductsClient().BeginCreate(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.DataProduct{
		Location: to.Ptr("eastus"),
		Tags: map[string]*string{
			"userSpecifiedKeyName": to.Ptr("userSpecifiedKeyValue"),
		},
		Identity: &armnetworkanalytics.ManagedServiceIdentity{
			Type: to.Ptr(armnetworkanalytics.ManagedServiceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armnetworkanalytics.UserAssignedIdentity{
				"/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
			},
		},
		Properties: &armnetworkanalytics.DataProductProperties{
			ConsumptionEndpoints: &armnetworkanalytics.ConsumptionEndpointsProperties{},
			CurrentMinorVersion:  to.Ptr("1.0.1"),
			CustomerEncryptionKey: &armnetworkanalytics.EncryptionKeyDetails{
				KeyName:     to.Ptr("keyName"),
				KeyVaultURI: to.Ptr("https://KeyVault.vault.azure.net"),
				KeyVersion:  to.Ptr("keyVersion"),
			},
			CustomerManagedKeyEncryptionEnabled: to.Ptr(armnetworkanalytics.ControlStateEnabled),
			MajorVersion:                        to.Ptr("1.0.0"),
			ManagedResourceGroupConfiguration: &armnetworkanalytics.ManagedResourceGroupConfiguration{
				Name:     to.Ptr("managedResourceGroupName"),
				Location: to.Ptr("eastus"),
			},
			Networkacls: &armnetworkanalytics.DataProductNetworkACLs{
				AllowedQueryIPRangeList: []*string{
					to.Ptr("1.1.1.1")},
				DefaultAction: to.Ptr(armnetworkanalytics.DefaultActionAllow),
				IPRules: []*armnetworkanalytics.IPRules{
					{
						Action: to.Ptr("Allow"),
						Value:  to.Ptr("1.1.1.1"),
					}},
				VirtualNetworkRule: []*armnetworkanalytics.VirtualNetworkRule{
					{
						Action: to.Ptr("Allow"),
						ID:     to.Ptr("/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName"),
						State:  to.Ptr(""),
					}},
			},
			Owners: []*string{
				to.Ptr("abc@micros.com")},
			PrivateLinksEnabled: to.Ptr(armnetworkanalytics.ControlStateDisabled),
			Product:             to.Ptr("MCC"),
			ProvisioningState:   to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
			PublicNetworkAccess: to.Ptr(armnetworkanalytics.ControlStateEnabled),
			Publisher:           to.Ptr("Microsoft"),
			PurviewAccount:      to.Ptr("testpurview"),
			PurviewCollection:   to.Ptr("134567890"),
			Redundancy:          to.Ptr(armnetworkanalytics.ControlStateDisabled),
		},
	}, 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.DataProduct = armnetworkanalytics.DataProduct{
	// 	Name: to.Ptr("dataproduct01"),
	// 	Type: to.Ptr("Microsoft.NetworkAnalytics/DataProducts"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01"),
	// 	SystemData: &armnetworkanalytics.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		CreatedBy: to.Ptr("abc@micros.com"),
	// 		CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("abc@micros.com"),
	// 		LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"userSpecifiedKeyName": to.Ptr("userSpecifiedKeyValue"),
	// 	},
	// 	Identity: &armnetworkanalytics.ManagedServiceIdentity{
	// 		Type: to.Ptr(armnetworkanalytics.ManagedServiceIdentityType("IdentityType")),
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		UserAssignedIdentities: map[string]*armnetworkanalytics.UserAssignedIdentity{
	// 			"key8474": &armnetworkanalytics.UserAssignedIdentity{
	// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armnetworkanalytics.DataProductProperties{
	// 		AvailableMinorVersions: []*string{
	// 			to.Ptr("1.0.1"),
	// 			to.Ptr("1.0.2")},
	// 			ConsumptionEndpoints: &armnetworkanalytics.ConsumptionEndpointsProperties{
	// 				FileAccessResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName"),
	// 				FileAccessURL: to.Ptr("https://operatorinsightsstorageResourceName.blob.core.windows.net"),
	// 				IngestionResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName"),
	// 				IngestionURL: to.Ptr("https://aoiingestionstorageResourceName.blob.core.windows.net"),
	// 				QueryResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName"),
	// 				QueryURL: to.Ptr("https://opinsightsclusterName.regionName.kusto.windows.net"),
	// 			},
	// 			CurrentMinorVersion: to.Ptr("1.0.1"),
	// 			CustomerEncryptionKey: &armnetworkanalytics.EncryptionKeyDetails{
	// 				KeyName: to.Ptr("keyName"),
	// 				KeyVaultURI: to.Ptr("https://KeyVault.vault.azure.net"),
	// 				KeyVersion: to.Ptr("keyVersion"),
	// 			},
	// 			CustomerManagedKeyEncryptionEnabled: to.Ptr(armnetworkanalytics.ControlStateEnabled),
	// 			Documentation: to.Ptr("https://learn.microsoft.com/"),
	// 			KeyVaultURL: to.Ptr("https://myKeyVault.vault.azure.net"),
	// 			MajorVersion: to.Ptr("1.0.0"),
	// 			ManagedResourceGroupConfiguration: &armnetworkanalytics.ManagedResourceGroupConfiguration{
	// 				Name: to.Ptr("managedResourceGroupName"),
	// 				Location: to.Ptr("eastus"),
	// 			},
	// 			Networkacls: &armnetworkanalytics.DataProductNetworkACLs{
	// 				AllowedQueryIPRangeList: []*string{
	// 					to.Ptr("1.1.1.1"),
	// 					to.Ptr("1.1.1.2")},
	// 					DefaultAction: to.Ptr(armnetworkanalytics.DefaultActionAllow),
	// 					IPRules: []*armnetworkanalytics.IPRules{
	// 						{
	// 							Action: to.Ptr("Allow"),
	// 							Value: to.Ptr("1.1.1.1"),
	// 					}},
	// 					VirtualNetworkRule: []*armnetworkanalytics.VirtualNetworkRule{
	// 						{
	// 							Action: to.Ptr("Allow"),
	// 							ID: to.Ptr("/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName"),
	// 							State: to.Ptr("Succeeded"),
	// 					}},
	// 				},
	// 				Owners: []*string{
	// 					to.Ptr("abc@micros.com")},
	// 					PrivateLinksEnabled: to.Ptr(armnetworkanalytics.ControlStateDisabled),
	// 					Product: to.Ptr("MCC"),
	// 					ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
	// 					PublicNetworkAccess: to.Ptr(armnetworkanalytics.ControlStateEnabled),
	// 					Publisher: to.Ptr("Microsoft"),
	// 					PurviewAccount: to.Ptr("testpurview"),
	// 					PurviewCollection: to.Ptr("134567890"),
	// 					Redundancy: to.Ptr(armnetworkanalytics.ControlStateDisabled),
	// 					ResourceGUID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				},
	// 			}
}
Output:

Example (DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Create_MinimumSet_Gen.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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataProductsClient().BeginCreate(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.DataProduct{
		Location: to.Ptr("eastus"),
		Tags: map[string]*string{
			"userSpecifiedKeyName": to.Ptr("userSpecifiedKeyValue"),
		},
		Properties: &armnetworkanalytics.DataProductProperties{
			MajorVersion: to.Ptr("1.0.0"),
			Product:      to.Ptr("MCC"),
			Publisher:    to.Ptr("Microsoft"),
		},
	}, 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.DataProduct = armnetworkanalytics.DataProduct{
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01"),
	// 	Location: to.Ptr("eastus"),
	// }
}
Output:

func (*DataProductsClient) BeginDelete

func (client *DataProductsClient) BeginDelete(ctx context.Context, resourceGroupName string, dataProductName string, options *DataProductsClientBeginDeleteOptions) (*runtime.Poller[DataProductsClientDeleteResponse], error)

BeginDelete - Delete data product resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • options - DataProductsClientBeginDeleteOptions contains the optional parameters for the DataProductsClient.BeginDelete method.
Example (DataProductsDeleteMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataProductsClient().BeginDelete(ctx, "aoiresourceGroupName", "dataproduct01", 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:

Example (DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Delete_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataProductsClient().BeginDelete(ctx, "aoiresourceGroupName", "dataproduct01", 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 (*DataProductsClient) BeginUpdate

func (client *DataProductsClient) BeginUpdate(ctx context.Context, resourceGroupName string, dataProductName string, properties DataProductUpdate, options *DataProductsClientBeginUpdateOptions) (*runtime.Poller[DataProductsClientUpdateResponse], error)

BeginUpdate - Update data product resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • properties - The resource properties to be updated.
  • options - DataProductsClientBeginUpdateOptions contains the optional parameters for the DataProductsClient.BeginUpdate method.
Example (DataProductsUpdateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Update_MaximumSet_Gen.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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataProductsClient().BeginUpdate(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.DataProductUpdate{
		Identity: &armnetworkanalytics.ManagedServiceIdentity{
			Type: to.Ptr(armnetworkanalytics.ManagedServiceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armnetworkanalytics.UserAssignedIdentity{
				"/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
			},
		},
		Properties: &armnetworkanalytics.DataProductUpdateProperties{
			CurrentMinorVersion: to.Ptr("1.0.1"),
			Owners: []*string{
				to.Ptr("abc@micros.com"),
				to.Ptr("def@micros.com")},
			PrivateLinksEnabled: to.Ptr(armnetworkanalytics.ControlStateDisabled),
			PurviewAccount:      to.Ptr("testpurview"),
			PurviewCollection:   to.Ptr("134567890"),
		},
		Tags: map[string]*string{
			"userSpecifiedKeyName": to.Ptr("userSpecifiedKeyValue"),
		},
	}, 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.DataProduct = armnetworkanalytics.DataProduct{
	// 	Name: to.Ptr("dataproduct01"),
	// 	Type: to.Ptr("Microsoft.NetworkAnalytics/DataProducts"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01"),
	// 	SystemData: &armnetworkanalytics.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		CreatedBy: to.Ptr("abc@micros.com"),
	// 		CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("abc@micros.com"),
	// 		LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"userSpecifiedKeyName": to.Ptr("userSpecifiedKeyValue"),
	// 	},
	// 	Identity: &armnetworkanalytics.ManagedServiceIdentity{
	// 		Type: to.Ptr(armnetworkanalytics.ManagedServiceIdentityType("IdentityType")),
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		UserAssignedIdentities: map[string]*armnetworkanalytics.UserAssignedIdentity{
	// 			"key8474": &armnetworkanalytics.UserAssignedIdentity{
	// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armnetworkanalytics.DataProductProperties{
	// 		AvailableMinorVersions: []*string{
	// 			to.Ptr("1.0.1"),
	// 			to.Ptr("1.0.2")},
	// 			ConsumptionEndpoints: &armnetworkanalytics.ConsumptionEndpointsProperties{
	// 				FileAccessResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName"),
	// 				FileAccessURL: to.Ptr("https://operatorinsightsstorageResourceName.blob.core.windows.net"),
	// 				IngestionResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName"),
	// 				IngestionURL: to.Ptr("https://aoiingestionstorageResourceName.blob.core.windows.net"),
	// 				QueryResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName"),
	// 				QueryURL: to.Ptr("https://opinsightsclusterName.regionName.kusto.windows.net"),
	// 			},
	// 			CurrentMinorVersion: to.Ptr("1.0.1"),
	// 			CustomerEncryptionKey: &armnetworkanalytics.EncryptionKeyDetails{
	// 				KeyName: to.Ptr("keyName"),
	// 				KeyVaultURI: to.Ptr("https://KeyVault.vault.azure.net"),
	// 				KeyVersion: to.Ptr("keyVersion"),
	// 			},
	// 			CustomerManagedKeyEncryptionEnabled: to.Ptr(armnetworkanalytics.ControlStateEnabled),
	// 			Documentation: to.Ptr("https://learn.microsoft.com/"),
	// 			KeyVaultURL: to.Ptr("https://myKeyVault.vault.azure.net"),
	// 			MajorVersion: to.Ptr("1.0.0"),
	// 			ManagedResourceGroupConfiguration: &armnetworkanalytics.ManagedResourceGroupConfiguration{
	// 				Name: to.Ptr("managedResourceGroupName"),
	// 				Location: to.Ptr("eastus"),
	// 			},
	// 			Networkacls: &armnetworkanalytics.DataProductNetworkACLs{
	// 				AllowedQueryIPRangeList: []*string{
	// 					to.Ptr("1.1.1.1"),
	// 					to.Ptr("1.1.1.2")},
	// 					DefaultAction: to.Ptr(armnetworkanalytics.DefaultActionAllow),
	// 					IPRules: []*armnetworkanalytics.IPRules{
	// 						{
	// 							Action: to.Ptr("Allow"),
	// 							Value: to.Ptr("1.1.1.1"),
	// 					}},
	// 					VirtualNetworkRule: []*armnetworkanalytics.VirtualNetworkRule{
	// 						{
	// 							Action: to.Ptr("Allow"),
	// 							ID: to.Ptr("/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName"),
	// 							State: to.Ptr("Succeeded"),
	// 					}},
	// 				},
	// 				Owners: []*string{
	// 					to.Ptr("abc@micros.com"),
	// 					to.Ptr("def@micros.com")},
	// 					PrivateLinksEnabled: to.Ptr(armnetworkanalytics.ControlStateDisabled),
	// 					Product: to.Ptr("MCC"),
	// 					ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
	// 					PublicNetworkAccess: to.Ptr(armnetworkanalytics.ControlStateEnabled),
	// 					Publisher: to.Ptr("Microsoft"),
	// 					PurviewAccount: to.Ptr("testpurview"),
	// 					PurviewCollection: to.Ptr("134567890"),
	// 					Redundancy: to.Ptr(armnetworkanalytics.ControlStateDisabled),
	// 					ResourceGUID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				},
	// 			}
}
Output:

Example (DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Update_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataProductsClient().BeginUpdate(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.DataProductUpdate{}, 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.DataProduct = armnetworkanalytics.DataProduct{
	// 	Location: to.Ptr("jwlerdaudgxff"),
	// }
}
Output:

func (*DataProductsClient) GenerateStorageAccountSasToken

func (client *DataProductsClient) GenerateStorageAccountSasToken(ctx context.Context, resourceGroupName string, dataProductName string, body AccountSas, options *DataProductsClientGenerateStorageAccountSasTokenOptions) (DataProductsClientGenerateStorageAccountSasTokenResponse, error)

GenerateStorageAccountSasToken - Generate sas token for storage account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • body - The content of the action request
  • options - DataProductsClientGenerateStorageAccountSasTokenOptions contains the optional parameters for the DataProductsClient.GenerateStorageAccountSasToken method.
Example (DataProductsGenerateStorageAccountSasTokenMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataProductsClient().GenerateStorageAccountSasToken(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.AccountSas{
		ExpiryTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T05:34:58.151Z"); return t }()),
		IPAddress:       to.Ptr("1.1.1.1"),
		StartTimeStamp:  to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T05:34:58.151Z"); return t }()),
	}, 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.AccountSasToken = armnetworkanalytics.AccountSasToken{
	// 	StorageAccountSasToken: to.Ptr("storageAccountSasToken"),
	// }
}
Output:

Example (DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_GenerateStorageAccountSasToken_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataProductsClient().GenerateStorageAccountSasToken(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.AccountSas{
		ExpiryTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T05:35:17.051Z"); return t }()),
		IPAddress:       to.Ptr("1.1.1.1"),
		StartTimeStamp:  to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T05:35:17.051Z"); return t }()),
	}, 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.AccountSasToken = armnetworkanalytics.AccountSasToken{
	// 	StorageAccountSasToken: to.Ptr("storageAccountSasToken"),
	// }
}
Output:

func (*DataProductsClient) Get

func (client *DataProductsClient) Get(ctx context.Context, resourceGroupName string, dataProductName string, options *DataProductsClientGetOptions) (DataProductsClientGetResponse, error)

Get - Retrieve data product resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • options - DataProductsClientGetOptions contains the optional parameters for the DataProductsClient.Get method.
Example (DataProductsGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataProductsClient().Get(ctx, "aoiresourceGroupName", "dataproduct01", 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.DataProduct = armnetworkanalytics.DataProduct{
	// 	Name: to.Ptr("dataproduct01"),
	// 	Type: to.Ptr("Microsoft.NetworkAnalytics/DataProducts"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01"),
	// 	SystemData: &armnetworkanalytics.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		CreatedBy: to.Ptr("abc@micros.com"),
	// 		CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("abc@micros.com"),
	// 		LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("eastus"),
	// 	Tags: map[string]*string{
	// 		"userSpecifiedKeyName": to.Ptr("userSpecifiedKeyValue"),
	// 	},
	// 	Identity: &armnetworkanalytics.ManagedServiceIdentity{
	// 		Type: to.Ptr(armnetworkanalytics.ManagedServiceIdentityType("IdentityType")),
	// 		PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		UserAssignedIdentities: map[string]*armnetworkanalytics.UserAssignedIdentity{
	// 			"key8474": &armnetworkanalytics.UserAssignedIdentity{
	// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armnetworkanalytics.DataProductProperties{
	// 		AvailableMinorVersions: []*string{
	// 			to.Ptr("1.0.1"),
	// 			to.Ptr("1.0.2")},
	// 			ConsumptionEndpoints: &armnetworkanalytics.ConsumptionEndpointsProperties{
	// 				FileAccessResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName"),
	// 				FileAccessURL: to.Ptr("https://operatorinsightsstorageResourceName.blob.core.windows.net"),
	// 				IngestionResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName"),
	// 				IngestionURL: to.Ptr("https://aoiingestionstorageResourceName.blob.core.windows.net"),
	// 				QueryResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName"),
	// 				QueryURL: to.Ptr("https://opinsightsclusterName.regionName.kusto.windows.net"),
	// 			},
	// 			CurrentMinorVersion: to.Ptr("1.0.1"),
	// 			CustomerEncryptionKey: &armnetworkanalytics.EncryptionKeyDetails{
	// 				KeyName: to.Ptr("keyName"),
	// 				KeyVaultURI: to.Ptr("https://KeyVault.vault.azure.net"),
	// 				KeyVersion: to.Ptr("keyVersion"),
	// 			},
	// 			CustomerManagedKeyEncryptionEnabled: to.Ptr(armnetworkanalytics.ControlStateEnabled),
	// 			Documentation: to.Ptr("https://learn.microsoft.com/"),
	// 			KeyVaultURL: to.Ptr("https://myKeyVault.vault.azure.net"),
	// 			MajorVersion: to.Ptr("1.0.0"),
	// 			ManagedResourceGroupConfiguration: &armnetworkanalytics.ManagedResourceGroupConfiguration{
	// 				Name: to.Ptr("managedResourceGroupName"),
	// 				Location: to.Ptr("eastus"),
	// 			},
	// 			Networkacls: &armnetworkanalytics.DataProductNetworkACLs{
	// 				AllowedQueryIPRangeList: []*string{
	// 					to.Ptr("1.1.1.1"),
	// 					to.Ptr("1.1.1.2")},
	// 					DefaultAction: to.Ptr(armnetworkanalytics.DefaultActionAllow),
	// 					IPRules: []*armnetworkanalytics.IPRules{
	// 						{
	// 							Action: to.Ptr("Allow"),
	// 							Value: to.Ptr("1.1.1.1"),
	// 					}},
	// 					VirtualNetworkRule: []*armnetworkanalytics.VirtualNetworkRule{
	// 						{
	// 							Action: to.Ptr("Allow"),
	// 							ID: to.Ptr("/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName"),
	// 							State: to.Ptr("Succeeded"),
	// 					}},
	// 				},
	// 				Owners: []*string{
	// 					to.Ptr("abc@micros.com")},
	// 					PrivateLinksEnabled: to.Ptr(armnetworkanalytics.ControlStateDisabled),
	// 					Product: to.Ptr("MCC"),
	// 					ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
	// 					PublicNetworkAccess: to.Ptr(armnetworkanalytics.ControlStateEnabled),
	// 					Publisher: to.Ptr("Microsoft"),
	// 					PurviewAccount: to.Ptr("testpurview"),
	// 					PurviewCollection: to.Ptr("134567890"),
	// 					Redundancy: to.Ptr(armnetworkanalytics.ControlStateDisabled),
	// 					ResourceGUID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				},
	// 			}
}
Output:

Example (DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataProductsClient().Get(ctx, "aoiresourceGroupName", "dataproduct01", 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.DataProduct = armnetworkanalytics.DataProduct{
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01"),
	// 	Location: to.Ptr("eastus"),
	// }
}
Output:

func (*DataProductsClient) ListRolesAssignments

func (client *DataProductsClient) ListRolesAssignments(ctx context.Context, resourceGroupName string, dataProductName string, body any, options *DataProductsClientListRolesAssignmentsOptions) (DataProductsClientListRolesAssignmentsResponse, error)

ListRolesAssignments - List user roles associated with the data product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • body - The content of the action request
  • options - DataProductsClientListRolesAssignmentsOptions contains the optional parameters for the DataProductsClient.ListRolesAssignments method.
Example (DataProductsListRolesAssignmentsMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListRolesAssignments_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataProductsClient().ListRolesAssignments(ctx, "aoiresourceGroupName", "dataproduct01", map[string]any{}, 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.ListRoleAssignments = armnetworkanalytics.ListRoleAssignments{
	// 	Count: to.Ptr[int32](1),
	// 	RoleAssignmentResponse: []*armnetworkanalytics.RoleAssignmentDetail{
	// 		{
	// 			DataTypeScope: []*string{
	// 				to.Ptr("scope")},
	// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 				PrincipalType: to.Ptr("User"),
	// 				Role: to.Ptr(armnetworkanalytics.DataProductUserRoleReader),
	// 				RoleAssignmentID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 				RoleID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 				UserName: to.Ptr("UserName"),
	// 		}},
	// 	}
}
Output:

Example (DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListRolesAssignments_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataProductsClient().ListRolesAssignments(ctx, "aoiresourceGroupName", "dataproduct01", map[string]any{}, 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.ListRoleAssignments = armnetworkanalytics.ListRoleAssignments{
	// 	Count: to.Ptr[int32](1),
	// 	RoleAssignmentResponse: []*armnetworkanalytics.RoleAssignmentDetail{
	// 		{
	// 			DataTypeScope: []*string{
	// 				to.Ptr("scope")},
	// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 				PrincipalType: to.Ptr("User"),
	// 				Role: to.Ptr(armnetworkanalytics.DataProductUserRoleReader),
	// 				RoleAssignmentID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 				RoleID: to.Ptr("00000000-0000-0000-0000-00000000000"),
	// 				UserName: to.Ptr("UserName"),
	// 		}},
	// 	}
}
Output:

func (*DataProductsClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List data products by resource group.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - DataProductsClientListByResourceGroupOptions contains the optional parameters for the DataProductsClient.NewListByResourceGroupPager method.
Example (DataProductsListByResourceGroupMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListByResourceGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataProductsClient().NewListByResourceGroupPager("aoiresourceGroupName", 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.DataProductListResult = armnetworkanalytics.DataProductListResult{
		// 	Value: []*armnetworkanalytics.DataProduct{
		// 		{
		// 			Name: to.Ptr("dataproduct01"),
		// 			Type: to.Ptr("Microsoft.NetworkAnalytics/DataProducts"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01"),
		// 			SystemData: &armnetworkanalytics.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
		// 				CreatedBy: to.Ptr("abc@micros.com"),
		// 				CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("abc@micros.com"),
		// 				LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("eastus"),
		// 			Tags: map[string]*string{
		// 				"userSpecifiedKeyName": to.Ptr("userSpecifiedKeyValue"),
		// 			},
		// 			Identity: &armnetworkanalytics.ManagedServiceIdentity{
		// 				Type: to.Ptr(armnetworkanalytics.ManagedServiceIdentityType("IdentityType")),
		// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				UserAssignedIdentities: map[string]*armnetworkanalytics.UserAssignedIdentity{
		// 					"key8474": &armnetworkanalytics.UserAssignedIdentity{
		// 						ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 						PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					},
		// 				},
		// 			},
		// 			Properties: &armnetworkanalytics.DataProductProperties{
		// 				AvailableMinorVersions: []*string{
		// 					to.Ptr("1.0.1"),
		// 					to.Ptr("1.0.2")},
		// 					ConsumptionEndpoints: &armnetworkanalytics.ConsumptionEndpointsProperties{
		// 						FileAccessResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName"),
		// 						FileAccessURL: to.Ptr("https://operatorinsightsstorageResourceName.blob.core.windows.net"),
		// 						IngestionResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName"),
		// 						IngestionURL: to.Ptr("https://aoiingestionstorageResourceName.blob.core.windows.net"),
		// 						QueryResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName"),
		// 						QueryURL: to.Ptr("https://opinsightsclusterName.regionName.kusto.windows.net"),
		// 					},
		// 					CurrentMinorVersion: to.Ptr("1.0.1"),
		// 					CustomerEncryptionKey: &armnetworkanalytics.EncryptionKeyDetails{
		// 						KeyName: to.Ptr("keyName"),
		// 						KeyVaultURI: to.Ptr("https://KeyVault.vault.azure.net"),
		// 						KeyVersion: to.Ptr("keyVersion"),
		// 					},
		// 					CustomerManagedKeyEncryptionEnabled: to.Ptr(armnetworkanalytics.ControlStateEnabled),
		// 					Documentation: to.Ptr("https://learn.microsoft.com/"),
		// 					KeyVaultURL: to.Ptr("https://myKeyVault.vault.azure.net"),
		// 					MajorVersion: to.Ptr("1.0.0"),
		// 					ManagedResourceGroupConfiguration: &armnetworkanalytics.ManagedResourceGroupConfiguration{
		// 						Name: to.Ptr("managedResourceGroupName"),
		// 						Location: to.Ptr("eastus"),
		// 					},
		// 					Networkacls: &armnetworkanalytics.DataProductNetworkACLs{
		// 						AllowedQueryIPRangeList: []*string{
		// 							to.Ptr("1.1.1.1"),
		// 							to.Ptr("1.1.1.2")},
		// 							DefaultAction: to.Ptr(armnetworkanalytics.DefaultActionAllow),
		// 							IPRules: []*armnetworkanalytics.IPRules{
		// 								{
		// 									Action: to.Ptr("Allow"),
		// 									Value: to.Ptr("1.1.1.1"),
		// 							}},
		// 							VirtualNetworkRule: []*armnetworkanalytics.VirtualNetworkRule{
		// 								{
		// 									Action: to.Ptr("Allow"),
		// 									ID: to.Ptr("/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName"),
		// 									State: to.Ptr("Succeeded"),
		// 							}},
		// 						},
		// 						Owners: []*string{
		// 							to.Ptr("abc@micros.com")},
		// 							PrivateLinksEnabled: to.Ptr(armnetworkanalytics.ControlStateDisabled),
		// 							Product: to.Ptr("MCC"),
		// 							ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
		// 							PublicNetworkAccess: to.Ptr(armnetworkanalytics.ControlStateEnabled),
		// 							Publisher: to.Ptr("Microsoft"),
		// 							PurviewAccount: to.Ptr("testpurview"),
		// 							PurviewCollection: to.Ptr("134567890"),
		// 							Redundancy: to.Ptr(armnetworkanalytics.ControlStateDisabled),
		// 							ResourceGUID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 						},
		// 				}},
		// 			}
	}
}
Output:

Example (DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListByResourceGroup_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataProductsClient().NewListByResourceGroupPager("aoiresourceGroupName", 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.DataProductListResult = armnetworkanalytics.DataProductListResult{
		// 	Value: []*armnetworkanalytics.DataProduct{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01"),
		// 			Location: to.Ptr("eastus"),
		// 	}},
		// }
	}
}
Output:

func (*DataProductsClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List data products by subscription.

Generated from API version 2023-11-15

  • options - DataProductsClientListBySubscriptionOptions contains the optional parameters for the DataProductsClient.NewListBySubscriptionPager method.
Example (DataProductsListBySubscriptionMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListBySubscription_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataProductsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DataProductListResult = armnetworkanalytics.DataProductListResult{
		// 	Value: []*armnetworkanalytics.DataProduct{
		// 		{
		// 			Name: to.Ptr("dataproduct01"),
		// 			Type: to.Ptr("Microsoft.NetworkAnalytics/DataProducts"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01"),
		// 			SystemData: &armnetworkanalytics.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
		// 				CreatedBy: to.Ptr("abc@micros.com"),
		// 				CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("abc@micros.com"),
		// 				LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("eastus"),
		// 			Tags: map[string]*string{
		// 				"userSpecifiedKeyName": to.Ptr("userSpecifiedKeyValue"),
		// 			},
		// 			Identity: &armnetworkanalytics.ManagedServiceIdentity{
		// 				Type: to.Ptr(armnetworkanalytics.ManagedServiceIdentityType("IdentityType")),
		// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				UserAssignedIdentities: map[string]*armnetworkanalytics.UserAssignedIdentity{
		// 					"key8474": &armnetworkanalytics.UserAssignedIdentity{
		// 						ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 						PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					},
		// 				},
		// 			},
		// 			Properties: &armnetworkanalytics.DataProductProperties{
		// 				AvailableMinorVersions: []*string{
		// 					to.Ptr("1.0.1"),
		// 					to.Ptr("1.0.2")},
		// 					ConsumptionEndpoints: &armnetworkanalytics.ConsumptionEndpointsProperties{
		// 						FileAccessResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName"),
		// 						FileAccessURL: to.Ptr("https://operatorinsightsstorageResourceName.blob.core.windows.net"),
		// 						IngestionResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName"),
		// 						IngestionURL: to.Ptr("https://aoiingestionstorageResourceName.blob.core.windows.net"),
		// 						QueryResourceID: to.Ptr("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName"),
		// 						QueryURL: to.Ptr("https://opinsightsclusterName.regionName.kusto.windows.net"),
		// 					},
		// 					CurrentMinorVersion: to.Ptr("1.0.1"),
		// 					CustomerEncryptionKey: &armnetworkanalytics.EncryptionKeyDetails{
		// 						KeyName: to.Ptr("keyName"),
		// 						KeyVaultURI: to.Ptr("https://KeyVault.vault.azure.net"),
		// 						KeyVersion: to.Ptr("keyVersion"),
		// 					},
		// 					CustomerManagedKeyEncryptionEnabled: to.Ptr(armnetworkanalytics.ControlStateEnabled),
		// 					Documentation: to.Ptr("https://learn.microsoft.com/"),
		// 					KeyVaultURL: to.Ptr("https://myKeyVault.vault.azure.net"),
		// 					MajorVersion: to.Ptr("1.0.0"),
		// 					ManagedResourceGroupConfiguration: &armnetworkanalytics.ManagedResourceGroupConfiguration{
		// 						Name: to.Ptr("managedResourceGroupName"),
		// 						Location: to.Ptr("eastus"),
		// 					},
		// 					Networkacls: &armnetworkanalytics.DataProductNetworkACLs{
		// 						AllowedQueryIPRangeList: []*string{
		// 							to.Ptr("1.1.1.1"),
		// 							to.Ptr("1.1.1.2")},
		// 							DefaultAction: to.Ptr(armnetworkanalytics.DefaultActionAllow),
		// 							IPRules: []*armnetworkanalytics.IPRules{
		// 								{
		// 									Action: to.Ptr("Allow"),
		// 									Value: to.Ptr("1.1.1.1"),
		// 							}},
		// 							VirtualNetworkRule: []*armnetworkanalytics.VirtualNetworkRule{
		// 								{
		// 									Action: to.Ptr("Allow"),
		// 									ID: to.Ptr("/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName"),
		// 									State: to.Ptr("Succeeded"),
		// 							}},
		// 						},
		// 						Owners: []*string{
		// 							to.Ptr("abc@micros.com")},
		// 							PrivateLinksEnabled: to.Ptr(armnetworkanalytics.ControlStateDisabled),
		// 							Product: to.Ptr("MCC"),
		// 							ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
		// 							PublicNetworkAccess: to.Ptr(armnetworkanalytics.ControlStateEnabled),
		// 							Publisher: to.Ptr("Microsoft"),
		// 							PurviewAccount: to.Ptr("testpurview"),
		// 							PurviewCollection: to.Ptr("134567890"),
		// 							Redundancy: to.Ptr(armnetworkanalytics.ControlStateDisabled),
		// 							ResourceGUID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 						},
		// 				}},
		// 			}
	}
}
Output:

Example (DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_ListBySubscription_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataProductsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DataProductListResult = armnetworkanalytics.DataProductListResult{
		// 	Value: []*armnetworkanalytics.DataProduct{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01"),
		// 			Location: to.Ptr("eastus"),
		// 	}},
		// }
	}
}
Output:

func (*DataProductsClient) RemoveUserRole

func (client *DataProductsClient) RemoveUserRole(ctx context.Context, resourceGroupName string, dataProductName string, body RoleAssignmentDetail, options *DataProductsClientRemoveUserRoleOptions) (DataProductsClientRemoveUserRoleResponse, error)

RemoveUserRole - Remove role from the data product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • body - The content of the action request
  • options - DataProductsClientRemoveUserRoleOptions contains the optional parameters for the DataProductsClient.RemoveUserRole method.
Example (DataProductsRemoveUserRoleMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_RemoveUserRole_MaximumSet_Gen.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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDataProductsClient().RemoveUserRole(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.RoleAssignmentDetail{
		DataTypeScope: []*string{
			to.Ptr("scope")},
		PrincipalID:      to.Ptr("00000000-0000-0000-0000-00000000000"),
		PrincipalType:    to.Ptr("User"),
		Role:             to.Ptr(armnetworkanalytics.DataProductUserRoleReader),
		RoleAssignmentID: to.Ptr("00000000-0000-0000-0000-00000000000"),
		RoleID:           to.Ptr("00000000-0000-0000-0000-00000000000"),
		UserName:         to.Ptr("UserName"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_RemoveUserRole_MinimumSet_Gen.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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDataProductsClient().RemoveUserRole(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.RoleAssignmentDetail{
		DataTypeScope: []*string{
			to.Ptr("scope")},
		PrincipalID:      to.Ptr("00000000-0000-0000-0000-00000000000"),
		PrincipalType:    to.Ptr("User"),
		Role:             to.Ptr(armnetworkanalytics.DataProductUserRoleReader),
		RoleAssignmentID: to.Ptr("00000000-0000-0000-0000-00000000000"),
		RoleID:           to.Ptr("00000000-0000-0000-0000-00000000000"),
		UserName:         to.Ptr("UserName"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*DataProductsClient) RotateKey

func (client *DataProductsClient) RotateKey(ctx context.Context, resourceGroupName string, dataProductName string, body KeyVaultInfo, options *DataProductsClientRotateKeyOptions) (DataProductsClientRotateKeyResponse, error)

RotateKey - Initiate key rotation on Data Product. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • body - The content of the action request
  • options - DataProductsClientRotateKeyOptions contains the optional parameters for the DataProductsClient.RotateKey method.
Example (DataProductsRotateKeyMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_RotateKey_MaximumSet_Gen.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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDataProductsClient().RotateKey(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.KeyVaultInfo{
		KeyVaultURL: to.Ptr("https://myKeyVault.vault.azure.net"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

Example (DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataProducts_RotateKey_MinimumSet_Gen.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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDataProductsClient().RotateKey(ctx, "aoiresourceGroupName", "dataproduct01", armnetworkanalytics.KeyVaultInfo{
		KeyVaultURL: to.Ptr("https://myKeyVault.vault.azure.net"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type DataProductsClientAddUserRoleOptions

type DataProductsClientAddUserRoleOptions struct {
}

DataProductsClientAddUserRoleOptions contains the optional parameters for the DataProductsClient.AddUserRole method.

type DataProductsClientAddUserRoleResponse

type DataProductsClientAddUserRoleResponse struct {
	// The details for role assignment response.
	RoleAssignmentDetail
}

DataProductsClientAddUserRoleResponse contains the response from method DataProductsClient.AddUserRole.

type DataProductsClientBeginCreateOptions

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

DataProductsClientBeginCreateOptions contains the optional parameters for the DataProductsClient.BeginCreate method.

type DataProductsClientBeginDeleteOptions

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

DataProductsClientBeginDeleteOptions contains the optional parameters for the DataProductsClient.BeginDelete method.

type DataProductsClientBeginUpdateOptions

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

DataProductsClientBeginUpdateOptions contains the optional parameters for the DataProductsClient.BeginUpdate method.

type DataProductsClientCreateResponse

type DataProductsClientCreateResponse struct {
	// The data product resource.
	DataProduct
}

DataProductsClientCreateResponse contains the response from method DataProductsClient.BeginCreate.

type DataProductsClientDeleteResponse

type DataProductsClientDeleteResponse struct {
}

DataProductsClientDeleteResponse contains the response from method DataProductsClient.BeginDelete.

type DataProductsClientGenerateStorageAccountSasTokenOptions

type DataProductsClientGenerateStorageAccountSasTokenOptions struct {
}

DataProductsClientGenerateStorageAccountSasTokenOptions contains the optional parameters for the DataProductsClient.GenerateStorageAccountSasToken method.

type DataProductsClientGenerateStorageAccountSasTokenResponse

type DataProductsClientGenerateStorageAccountSasTokenResponse struct {
	// Details of storage account sas token .
	AccountSasToken
}

DataProductsClientGenerateStorageAccountSasTokenResponse contains the response from method DataProductsClient.GenerateStorageAccountSasToken.

type DataProductsClientGetOptions

type DataProductsClientGetOptions struct {
}

DataProductsClientGetOptions contains the optional parameters for the DataProductsClient.Get method.

type DataProductsClientGetResponse

type DataProductsClientGetResponse struct {
	// The data product resource.
	DataProduct
}

DataProductsClientGetResponse contains the response from method DataProductsClient.Get.

type DataProductsClientListByResourceGroupOptions

type DataProductsClientListByResourceGroupOptions struct {
}

DataProductsClientListByResourceGroupOptions contains the optional parameters for the DataProductsClient.NewListByResourceGroupPager method.

type DataProductsClientListByResourceGroupResponse

type DataProductsClientListByResourceGroupResponse struct {
	// The response of a DataProduct list operation.
	DataProductListResult
}

DataProductsClientListByResourceGroupResponse contains the response from method DataProductsClient.NewListByResourceGroupPager.

type DataProductsClientListBySubscriptionOptions

type DataProductsClientListBySubscriptionOptions struct {
}

DataProductsClientListBySubscriptionOptions contains the optional parameters for the DataProductsClient.NewListBySubscriptionPager method.

type DataProductsClientListBySubscriptionResponse

type DataProductsClientListBySubscriptionResponse struct {
	// The response of a DataProduct list operation.
	DataProductListResult
}

DataProductsClientListBySubscriptionResponse contains the response from method DataProductsClient.NewListBySubscriptionPager.

type DataProductsClientListRolesAssignmentsOptions

type DataProductsClientListRolesAssignmentsOptions struct {
}

DataProductsClientListRolesAssignmentsOptions contains the optional parameters for the DataProductsClient.ListRolesAssignments method.

type DataProductsClientListRolesAssignmentsResponse

type DataProductsClientListRolesAssignmentsResponse struct {
	// list role assignments.
	ListRoleAssignments
}

DataProductsClientListRolesAssignmentsResponse contains the response from method DataProductsClient.ListRolesAssignments.

type DataProductsClientRemoveUserRoleOptions

type DataProductsClientRemoveUserRoleOptions struct {
}

DataProductsClientRemoveUserRoleOptions contains the optional parameters for the DataProductsClient.RemoveUserRole method.

type DataProductsClientRemoveUserRoleResponse

type DataProductsClientRemoveUserRoleResponse struct {
}

DataProductsClientRemoveUserRoleResponse contains the response from method DataProductsClient.RemoveUserRole.

type DataProductsClientRotateKeyOptions

type DataProductsClientRotateKeyOptions struct {
}

DataProductsClientRotateKeyOptions contains the optional parameters for the DataProductsClient.RotateKey method.

type DataProductsClientRotateKeyResponse

type DataProductsClientRotateKeyResponse struct {
}

DataProductsClientRotateKeyResponse contains the response from method DataProductsClient.RotateKey.

type DataProductsClientUpdateResponse

type DataProductsClientUpdateResponse struct {
	// The data product resource.
	DataProduct
}

DataProductsClientUpdateResponse contains the response from method DataProductsClient.BeginUpdate.

type DataType

type DataType struct {
	// The resource-specific properties for this resource.
	Properties *DataTypeProperties

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

DataType - The data type resource.

func (DataType) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataType.

func (*DataType) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataType.

type DataTypeListResult

type DataTypeListResult struct {
	// REQUIRED; The DataType items on this page
	Value []*DataType

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

DataTypeListResult - The response of a DataType list operation.

func (DataTypeListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataTypeListResult.

func (*DataTypeListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataTypeListResult.

type DataTypeProperties

type DataTypeProperties struct {
	// Field for database cache retention in days.
	DatabaseCacheRetention *int32

	// Field for database data retention in days.
	DatabaseRetention *int32

	// State of data type.
	State *DataTypeState

	// Field for storage output retention in days.
	StorageOutputRetention *int32

	// READ-ONLY; Latest provisioning state of data product.
	ProvisioningState *ProvisioningState

	// READ-ONLY; Reason for the state of data type.
	StateReason *string

	// READ-ONLY; Url for data visualization.
	VisualizationURL *string
}

DataTypeProperties - The data type properties

func (DataTypeProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataTypeProperties.

func (*DataTypeProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataTypeProperties.

type DataTypeState

type DataTypeState string

DataTypeState - The data type state

const (
	// DataTypeStateRunning - Field to specify running state.
	DataTypeStateRunning DataTypeState = "Running"
	// DataTypeStateStopped - Field to specify stopped state.
	DataTypeStateStopped DataTypeState = "Stopped"
)

func PossibleDataTypeStateValues

func PossibleDataTypeStateValues() []DataTypeState

PossibleDataTypeStateValues returns the possible values for the DataTypeState const type.

type DataTypeUpdate

type DataTypeUpdate struct {
	// The updatable properties of the DataType.
	Properties *DataTypeUpdateProperties
}

DataTypeUpdate - The type used for update operations of the DataType.

func (DataTypeUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataTypeUpdate.

func (*DataTypeUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataTypeUpdate.

type DataTypeUpdateProperties

type DataTypeUpdateProperties struct {
	// Field for database cache retention in days.
	DatabaseCacheRetention *int32

	// Field for database data retention in days.
	DatabaseRetention *int32

	// State of data type.
	State *DataTypeState

	// Field for storage output retention in days.
	StorageOutputRetention *int32
}

DataTypeUpdateProperties - The updatable properties of the DataType.

func (DataTypeUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DataTypeUpdateProperties.

func (*DataTypeUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DataTypeUpdateProperties.

type DataTypesClient

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

DataTypesClient contains the methods for the DataTypes group. Don't use this type directly, use NewDataTypesClient() instead.

func NewDataTypesClient

func NewDataTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataTypesClient, error)

NewDataTypesClient creates a new instance of DataTypesClient with the specified values.

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

func (*DataTypesClient) BeginCreate

func (client *DataTypesClient) BeginCreate(ctx context.Context, resourceGroupName string, dataProductName string, dataTypeName string, resource DataType, options *DataTypesClientBeginCreateOptions) (*runtime.Poller[DataTypesClientCreateResponse], error)

BeginCreate - Create data type resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • dataTypeName - The data type name.
  • resource - Resource create parameters.
  • options - DataTypesClientBeginCreateOptions contains the optional parameters for the DataTypesClient.BeginCreate method.
Example (DataTypesCreateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Create_MaximumSet_Gen.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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataTypesClient().BeginCreate(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", armnetworkanalytics.DataType{
		Properties: &armnetworkanalytics.DataTypeProperties{
			DatabaseCacheRetention: to.Ptr[int32](23),
			DatabaseRetention:      to.Ptr[int32](6),
			ProvisioningState:      to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
			State:                  to.Ptr(armnetworkanalytics.DataTypeState("STARTED")),
			StorageOutputRetention: to.Ptr[int32](27),
		},
	}, 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.DataType = armnetworkanalytics.DataType{
	// 	Name: to.Ptr("datatypeName"),
	// 	Type: to.Ptr("Microsoft.NetworkAnalytics/DataProducts/DataTypes"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename"),
	// 	SystemData: &armnetworkanalytics.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		CreatedBy: to.Ptr("abc@micros.com"),
	// 		CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("abc@micros.com"),
	// 		LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 	},
	// 	Properties: &armnetworkanalytics.DataTypeProperties{
	// 		DatabaseCacheRetention: to.Ptr[int32](23),
	// 		DatabaseRetention: to.Ptr[int32](6),
	// 		ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
	// 		State: to.Ptr(armnetworkanalytics.DataTypeState("STARTED")),
	// 		StateReason: to.Ptr("State Reason"),
	// 		StorageOutputRetention: to.Ptr[int32](27),
	// 		VisualizationURL: to.Ptr("visualizationUrl"),
	// 	},
	// }
}
Output:

Example (DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Create_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataTypesClient().BeginCreate(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", armnetworkanalytics.DataType{}, 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.DataType = armnetworkanalytics.DataType{
	// }
}
Output:

func (*DataTypesClient) BeginDelete

func (client *DataTypesClient) BeginDelete(ctx context.Context, resourceGroupName string, dataProductName string, dataTypeName string, options *DataTypesClientBeginDeleteOptions) (*runtime.Poller[DataTypesClientDeleteResponse], error)

BeginDelete - Delete data type resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • dataTypeName - The data type name.
  • options - DataTypesClientBeginDeleteOptions contains the optional parameters for the DataTypesClient.BeginDelete method.
Example (DataTypesDeleteMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataTypesClient().BeginDelete(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", 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:

Example (DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Delete_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataTypesClient().BeginDelete(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", 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 (*DataTypesClient) BeginDeleteData

func (client *DataTypesClient) BeginDeleteData(ctx context.Context, resourceGroupName string, dataProductName string, dataTypeName string, body any, options *DataTypesClientBeginDeleteDataOptions) (*runtime.Poller[DataTypesClientDeleteDataResponse], error)

BeginDeleteData - Delete data for data type. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • dataTypeName - The data type name.
  • body - The content of the action request
  • options - DataTypesClientBeginDeleteDataOptions contains the optional parameters for the DataTypesClient.BeginDeleteData method.
Example (DataTypesDeleteDataMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_DeleteData_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataTypesClient().BeginDeleteData(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", map[string]any{}, 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:

Example (DataTypesDeleteDataMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_DeleteData_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataTypesClient().BeginDeleteData(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", map[string]any{}, 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 (*DataTypesClient) BeginUpdate

func (client *DataTypesClient) BeginUpdate(ctx context.Context, resourceGroupName string, dataProductName string, dataTypeName string, properties DataTypeUpdate, options *DataTypesClientBeginUpdateOptions) (*runtime.Poller[DataTypesClientUpdateResponse], error)

BeginUpdate - Update data type resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • dataTypeName - The data type name.
  • properties - The resource properties to be updated.
  • options - DataTypesClientBeginUpdateOptions contains the optional parameters for the DataTypesClient.BeginUpdate method.
Example (DataTypesUpdateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Update_MaximumSet_Gen.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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataTypesClient().BeginUpdate(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", armnetworkanalytics.DataTypeUpdate{
		Properties: &armnetworkanalytics.DataTypeUpdateProperties{
			DatabaseCacheRetention: to.Ptr[int32](16),
			DatabaseRetention:      to.Ptr[int32](9),
			State:                  to.Ptr(armnetworkanalytics.DataTypeState("STARTED")),
			StorageOutputRetention: to.Ptr[int32](30),
		},
	}, 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.DataType = armnetworkanalytics.DataType{
	// 	Name: to.Ptr("datatypename"),
	// 	Type: to.Ptr("Microsoft.NetworkAnalytics/DataProducts/DataTypes"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename"),
	// 	SystemData: &armnetworkanalytics.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		CreatedBy: to.Ptr("abc@micros.com"),
	// 		CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("abc@micros.com"),
	// 		LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 	},
	// 	Properties: &armnetworkanalytics.DataTypeProperties{
	// 		DatabaseCacheRetention: to.Ptr[int32](16),
	// 		DatabaseRetention: to.Ptr[int32](9),
	// 		ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
	// 		State: to.Ptr(armnetworkanalytics.DataTypeState("STARTED")),
	// 		StateReason: to.Ptr("State Reason"),
	// 		StorageOutputRetention: to.Ptr[int32](30),
	// 		VisualizationURL: to.Ptr("visualizationUrl"),
	// 	},
	// }
}
Output:

Example (DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Update_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataTypesClient().BeginUpdate(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", armnetworkanalytics.DataTypeUpdate{}, 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.DataType = armnetworkanalytics.DataType{
	// }
}
Output:

func (*DataTypesClient) GenerateStorageContainerSasToken

func (client *DataTypesClient) GenerateStorageContainerSasToken(ctx context.Context, resourceGroupName string, dataProductName string, dataTypeName string, body ContainerSaS, options *DataTypesClientGenerateStorageContainerSasTokenOptions) (DataTypesClientGenerateStorageContainerSasTokenResponse, error)

GenerateStorageContainerSasToken - Generate sas token for storage container. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • dataTypeName - The data type name.
  • body - The content of the action request
  • options - DataTypesClientGenerateStorageContainerSasTokenOptions contains the optional parameters for the DataTypesClient.GenerateStorageContainerSasToken method.
Example (DataTypesGenerateStorageContainerSasTokenMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataTypesClient().GenerateStorageContainerSasToken(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", armnetworkanalytics.ContainerSaS{
		ExpiryTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T05:34:58.039Z"); return t }()),
		IPAddress:       to.Ptr("1.1.1.1"),
		StartTimeStamp:  to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T05:34:58.039Z"); return t }()),
	}, 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.ContainerSasToken = armnetworkanalytics.ContainerSasToken{
	// 	StorageContainerSasToken: to.Ptr("storageContainerSasToken"),
	// }
}
Output:

Example (DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_GenerateStorageContainerSasToken_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"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/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataTypesClient().GenerateStorageContainerSasToken(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", armnetworkanalytics.ContainerSaS{
		ExpiryTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T05:35:16.887Z"); return t }()),
		IPAddress:       to.Ptr("1.1.1.1"),
		StartTimeStamp:  to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T05:35:16.887Z"); return t }()),
	}, 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.ContainerSasToken = armnetworkanalytics.ContainerSasToken{
	// 	StorageContainerSasToken: to.Ptr("storageContainerSasToken"),
	// }
}
Output:

func (*DataTypesClient) Get

func (client *DataTypesClient) Get(ctx context.Context, resourceGroupName string, dataProductName string, dataTypeName string, options *DataTypesClientGetOptions) (DataTypesClientGetResponse, error)

Get - Retrieve data type resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • dataTypeName - The data type name.
  • options - DataTypesClientGetOptions contains the optional parameters for the DataTypesClient.Get method.
Example (DataTypesGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataTypesClient().Get(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", 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.DataType = armnetworkanalytics.DataType{
	// 	Name: to.Ptr("datatypename"),
	// 	Type: to.Ptr("Microsoft.NetworkAnalytics/DataProducts/DataTypes"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename"),
	// 	SystemData: &armnetworkanalytics.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		CreatedBy: to.Ptr("abc@micros.com"),
	// 		CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("abc@micros.com"),
	// 		LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
	// 	},
	// 	Properties: &armnetworkanalytics.DataTypeProperties{
	// 		DatabaseCacheRetention: to.Ptr[int32](23),
	// 		DatabaseRetention: to.Ptr[int32](6),
	// 		ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
	// 		State: to.Ptr(armnetworkanalytics.DataTypeState("STARTED")),
	// 		StateReason: to.Ptr("state Reason"),
	// 		StorageOutputRetention: to.Ptr[int32](27),
	// 		VisualizationURL: to.Ptr("visualizationUrl"),
	// 	},
	// }
}
Output:

Example (DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataTypesClient().Get(ctx, "aoiresourceGroupName", "dataproduct01", "datatypename", 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.DataType = armnetworkanalytics.DataType{
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename"),
	// }
}
Output:

func (*DataTypesClient) NewListByDataProductPager

func (client *DataTypesClient) NewListByDataProductPager(resourceGroupName string, dataProductName string, options *DataTypesClientListByDataProductOptions) *runtime.Pager[DataTypesClientListByDataProductResponse]

NewListByDataProductPager - List data type by parent resource.

Generated from API version 2023-11-15

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dataProductName - The data product resource name
  • options - DataTypesClientListByDataProductOptions contains the optional parameters for the DataTypesClient.NewListByDataProductPager method.
Example (DataTypesListByDataProductMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_ListByDataProduct_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataTypesClient().NewListByDataProductPager("aoiresourceGroupName", "dataproduct01", 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.DataTypeListResult = armnetworkanalytics.DataTypeListResult{
		// 	Value: []*armnetworkanalytics.DataType{
		// 		{
		// 			Name: to.Ptr("datatypename"),
		// 			Type: to.Ptr("Microsoft.NetworkAnalytics/DataProducts/DataTypes"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename"),
		// 			SystemData: &armnetworkanalytics.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
		// 				CreatedBy: to.Ptr("abc@micros.com"),
		// 				CreatedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-04T08:26:27.150Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("abc@micros.com"),
		// 				LastModifiedByType: to.Ptr(armnetworkanalytics.CreatedByTypeUser),
		// 			},
		// 			Properties: &armnetworkanalytics.DataTypeProperties{
		// 				DatabaseCacheRetention: to.Ptr[int32](23),
		// 				DatabaseRetention: to.Ptr[int32](6),
		// 				ProvisioningState: to.Ptr(armnetworkanalytics.ProvisioningStateSucceeded),
		// 				State: to.Ptr(armnetworkanalytics.DataTypeState("STARTED")),
		// 				StateReason: to.Ptr("state Reason"),
		// 				StorageOutputRetention: to.Ptr[int32](27),
		// 				VisualizationURL: to.Ptr("visualizationUrl"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/DataTypes_ListByDataProduct_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetworkanalytics.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataTypesClient().NewListByDataProductPager("aoiresourceGroupName", "dataproduct01", 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.DataTypeListResult = armnetworkanalytics.DataTypeListResult{
		// 	Value: []*armnetworkanalytics.DataType{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename"),
		// 	}},
		// }
	}
}
Output:

type DataTypesClientBeginCreateOptions

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

DataTypesClientBeginCreateOptions contains the optional parameters for the DataTypesClient.BeginCreate method.

type DataTypesClientBeginDeleteDataOptions

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

DataTypesClientBeginDeleteDataOptions contains the optional parameters for the DataTypesClient.BeginDeleteData method.

type DataTypesClientBeginDeleteOptions

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

DataTypesClientBeginDeleteOptions contains the optional parameters for the DataTypesClient.BeginDelete method.

type DataTypesClientBeginUpdateOptions

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

DataTypesClientBeginUpdateOptions contains the optional parameters for the DataTypesClient.BeginUpdate method.

type DataTypesClientCreateResponse

type DataTypesClientCreateResponse struct {
	// The data type resource.
	DataType
}

DataTypesClientCreateResponse contains the response from method DataTypesClient.BeginCreate.

type DataTypesClientDeleteDataResponse

type DataTypesClientDeleteDataResponse struct {
}

DataTypesClientDeleteDataResponse contains the response from method DataTypesClient.BeginDeleteData.

type DataTypesClientDeleteResponse

type DataTypesClientDeleteResponse struct {
}

DataTypesClientDeleteResponse contains the response from method DataTypesClient.BeginDelete.

type DataTypesClientGenerateStorageContainerSasTokenOptions

type DataTypesClientGenerateStorageContainerSasTokenOptions struct {
}

DataTypesClientGenerateStorageContainerSasTokenOptions contains the optional parameters for the DataTypesClient.GenerateStorageContainerSasToken method.

type DataTypesClientGenerateStorageContainerSasTokenResponse

type DataTypesClientGenerateStorageContainerSasTokenResponse struct {
	// Details of storage container account sas token .
	ContainerSasToken
}

DataTypesClientGenerateStorageContainerSasTokenResponse contains the response from method DataTypesClient.GenerateStorageContainerSasToken.

type DataTypesClientGetOptions

type DataTypesClientGetOptions struct {
}

DataTypesClientGetOptions contains the optional parameters for the DataTypesClient.Get method.

type DataTypesClientGetResponse

type DataTypesClientGetResponse struct {
	// The data type resource.
	DataType
}

DataTypesClientGetResponse contains the response from method DataTypesClient.Get.

type DataTypesClientListByDataProductOptions

type DataTypesClientListByDataProductOptions struct {
}

DataTypesClientListByDataProductOptions contains the optional parameters for the DataTypesClient.NewListByDataProductPager method.

type DataTypesClientListByDataProductResponse

type DataTypesClientListByDataProductResponse struct {
	// The response of a DataType list operation.
	DataTypeListResult
}

DataTypesClientListByDataProductResponse contains the response from method DataTypesClient.NewListByDataProductPager.

type DataTypesClientUpdateResponse

type DataTypesClientUpdateResponse struct {
	// The data type resource.
	DataType
}

DataTypesClientUpdateResponse contains the response from method DataTypesClient.BeginUpdate.

type DefaultAction

type DefaultAction string

DefaultAction - Specifies the default action of allow or deny when no other rules match.

const (
	// DefaultActionAllow - Represents allow action.
	DefaultActionAllow DefaultAction = "Allow"
	// DefaultActionDeny - Represents deny action.
	DefaultActionDeny DefaultAction = "Deny"
)

func PossibleDefaultActionValues

func PossibleDefaultActionValues() []DefaultAction

PossibleDefaultActionValues returns the possible values for the DefaultAction const type.

type EncryptionKeyDetails

type EncryptionKeyDetails struct {
	// REQUIRED; The name of the key vault key.
	KeyName *string

	// REQUIRED; The Uri of the key vault.
	KeyVaultURI *string

	// REQUIRED; The version of the key vault key.
	KeyVersion *string
}

EncryptionKeyDetails - Encryption key details.

func (EncryptionKeyDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EncryptionKeyDetails.

func (*EncryptionKeyDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionKeyDetails.

type IPRules

type IPRules struct {
	// REQUIRED; The action of virtual network rule.
	Action *string

	// IP Rules Value
	Value *string
}

IPRules - IP rule with specific IP or IP range in CIDR format.

func (IPRules) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type IPRules.

func (*IPRules) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type IPRules.

type KeyVaultInfo

type KeyVaultInfo struct {
	// REQUIRED; key vault url.
	KeyVaultURL *string
}

KeyVaultInfo - Details for KeyVault.

func (KeyVaultInfo) MarshalJSON

func (k KeyVaultInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultInfo.

func (*KeyVaultInfo) UnmarshalJSON

func (k *KeyVaultInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultInfo.

type ListRoleAssignments

type ListRoleAssignments struct {
	// REQUIRED; Count of role assignments.
	Count *int32

	// REQUIRED; list of role assignments
	RoleAssignmentResponse []*RoleAssignmentDetail
}

ListRoleAssignments - list role assignments.

func (ListRoleAssignments) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ListRoleAssignments.

func (*ListRoleAssignments) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ListRoleAssignments.

type ManagedResourceGroupConfiguration

type ManagedResourceGroupConfiguration struct {
	// REQUIRED; Managed Resource Group location
	Location *string

	// REQUIRED; Name of managed resource group
	Name *string
}

ManagedResourceGroupConfiguration - ManagedResourceGroup related properties

func (ManagedResourceGroupConfiguration) MarshalJSON

func (m ManagedResourceGroupConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedResourceGroupConfiguration.

func (*ManagedResourceGroupConfiguration) UnmarshalJSON

func (m *ManagedResourceGroupConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedResourceGroupConfiguration.

type ManagedServiceIdentity

type ManagedServiceIdentity struct {
	// REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
	Type *ManagedServiceIdentityType

	// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
	// resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
	// The dictionary values can be empty objects ({}) in
	// requests.
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned
	// identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
	TenantID *string
}

ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)

func (ManagedServiceIdentity) MarshalJSON

func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.

func (*ManagedServiceIdentity) UnmarshalJSON

func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

const (
	ManagedServiceIdentityTypeNone                       ManagedServiceIdentityType = "None"
	ManagedServiceIdentityTypeSystemAssigned             ManagedServiceIdentityType = "SystemAssigned"
	ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned"
	ManagedServiceIdentityTypeUserAssigned               ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

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 {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for this particular 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 {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an 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 OperationsClient

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

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

func NewOperationsClient

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

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

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

func (*OperationsClient) NewListPager

NewListPager - List the operations for the provider

Generated from API version 2023-11-15

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/Operations_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

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

Example (OperationsListMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/21a8d55d74e4425e96d76e5835f52cfc9eb95a22/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/examples/Operations_List_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/networkanalytics/armnetworkanalytics"
)

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

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The status of the current operation.

const (
	// ProvisioningStateAccepted - Represents an accepted operation.
	ProvisioningStateAccepted ProvisioningState = "Accepted"
	// ProvisioningStateCanceled - Represents a canceled operation.
	ProvisioningStateCanceled ProvisioningState = "Canceled"
	// ProvisioningStateDeleting - Represents an operation under deletion.
	ProvisioningStateDeleting ProvisioningState = "Deleting"
	// ProvisioningStateFailed - Represents a failed operation.
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateProvisioning - Represents a pending operation.
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	// ProvisioningStateSucceeded - Represents a succeeded operation.
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	// ProvisioningStateUpdating - Represents a pending operation.
	ProvisioningStateUpdating ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type PublisherInformation

type PublisherInformation struct {
	// REQUIRED; Data product information.
	DataProducts []*DataProductInformation

	// REQUIRED; Name of the publisher.
	PublisherName *string
}

PublisherInformation - Details for Publisher Information.

func (PublisherInformation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PublisherInformation.

func (*PublisherInformation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PublisherInformation.

type RoleAssignmentCommonProperties

type RoleAssignmentCommonProperties struct {
	// REQUIRED; Data Type Scope at which the role assignment is created.
	DataTypeScope []*string

	// REQUIRED; Object ID of the AAD principal or security-group.
	PrincipalID *string

	// REQUIRED; Type of the principal Id: User, Group or ServicePrincipal
	PrincipalType *string

	// REQUIRED; Data Product role to be assigned to a user.
	Role *DataProductUserRole

	// REQUIRED; Role Id of the Built-In Role
	RoleID *string

	// REQUIRED; User name.
	UserName *string
}

RoleAssignmentCommonProperties - The details for role assignment common properties.

func (RoleAssignmentCommonProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentCommonProperties.

func (*RoleAssignmentCommonProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentCommonProperties.

type RoleAssignmentDetail

type RoleAssignmentDetail struct {
	// REQUIRED; Data Type Scope at which the role assignment is created.
	DataTypeScope []*string

	// REQUIRED; Object ID of the AAD principal or security-group.
	PrincipalID *string

	// REQUIRED; Type of the principal Id: User, Group or ServicePrincipal
	PrincipalType *string

	// REQUIRED; Data Product role to be assigned to a user.
	Role *DataProductUserRole

	// REQUIRED; Id of role assignment request
	RoleAssignmentID *string

	// REQUIRED; Role Id of the Built-In Role
	RoleID *string

	// REQUIRED; User name.
	UserName *string
}

RoleAssignmentDetail - The details for role assignment response.

func (RoleAssignmentDetail) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RoleAssignmentDetail.

func (*RoleAssignmentDetail) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type RoleAssignmentDetail.

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 UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; The client ID of the assigned identity.
	ClientID *string

	// READ-ONLY; The principal ID of the assigned identity.
	PrincipalID *string
}

UserAssignedIdentity - User assigned identity properties

func (UserAssignedIdentity) MarshalJSON

func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type VirtualNetworkRule

type VirtualNetworkRule struct {
	// REQUIRED; Resource ID of a subnet
	ID *string

	// The action of virtual network rule.
	Action *string

	// Gets the state of virtual network rule.
	State *string
}

VirtualNetworkRule - Virtual Network Rule

func (VirtualNetworkRule) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRule.

func (*VirtualNetworkRule) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRule.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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