armapplicationinsights

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 17 Imported by: 7

README

Azure Application Insight Module for Go

PkgGoDev

The armapplicationinsights module provides operations for working with Azure Application Insight.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Application Insight module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights

Authorization

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

cred, err := azidentity.NewDefaultAzureCredential(nil)

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

Clients

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

client, err := armapplicationinsights.NewAPIKeysClient(<subscription ID>, cred, nil)

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

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {  
		Cloud: cloud.AzureChina,
    },
}
client, err := armapplicationinsights.NewAPIKeysClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Application Insight 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 APIKeyRequest

type APIKeyRequest struct {
	// The read access rights of this API Key.
	LinkedReadProperties []*string `json:"linkedReadProperties,omitempty"`

	// The write access rights of this API Key.
	LinkedWriteProperties []*string `json:"linkedWriteProperties,omitempty"`

	// The name of the API Key.
	Name *string `json:"name,omitempty"`
}

APIKeyRequest - An Application Insights component API Key creation request definition.

func (APIKeyRequest) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIKeyRequest.

type APIKeysClient

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

APIKeysClient contains the methods for the APIKeys group. Don't use this type directly, use NewAPIKeysClient() instead.

func NewAPIKeysClient

func NewAPIKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*APIKeysClient, error)

NewAPIKeysClient creates a new instance of APIKeysClient 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 (*APIKeysClient) Create

func (client *APIKeysClient) Create(ctx context.Context, resourceGroupName string, resourceName string, apiKeyProperties APIKeyRequest, options *APIKeysClientCreateOptions) (APIKeysClientCreateResponse, error)

Create - Create an API Key of an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. apiKeyProperties - Properties that need to be specified to create an API key of a Application Insights component. options - APIKeysClientCreateOptions contains the optional parameters for the APIKeysClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysCreate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewAPIKeysClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx,
		"my-resource-group",
		"my-component",
		armapplicationinsights.APIKeyRequest{
			Name: to.Ptr("test2"),
			LinkedReadProperties: []*string{
				to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/api"),
				to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/agentconfig")},
			LinkedWriteProperties: []*string{
				to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/annotations")},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*APIKeysClient) Delete

func (client *APIKeysClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, keyID string, options *APIKeysClientDeleteOptions) (APIKeysClientDeleteResponse, error)

Delete - Delete an API Key of an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. keyID - The API Key ID. This is unique within a Application Insights component. options - APIKeysClientDeleteOptions contains the optional parameters for the APIKeysClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewAPIKeysClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Delete(ctx,
		"my-resource-group",
		"my-component",
		"bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*APIKeysClient) Get

func (client *APIKeysClient) Get(ctx context.Context, resourceGroupName string, resourceName string, keyID string, options *APIKeysClientGetOptions) (APIKeysClientGetResponse, error)

Get - Get the API Key for this key id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. keyID - The API Key ID. This is unique within a Application Insights component. options - APIKeysClientGetOptions contains the optional parameters for the APIKeysClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewAPIKeysClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"my-resource-group",
		"my-component",
		"bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*APIKeysClient) NewListPager added in v0.4.0

func (client *APIKeysClient) NewListPager(resourceGroupName string, resourceName string, options *APIKeysClientListOptions) *runtime.Pager[APIKeysClientListResponse]

NewListPager - Gets a list of API keys of an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - APIKeysClientListOptions contains the optional parameters for the APIKeysClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

type APIKeysClientCreateOptions added in v0.2.0

type APIKeysClientCreateOptions struct {
}

APIKeysClientCreateOptions contains the optional parameters for the APIKeysClient.Create method.

type APIKeysClientCreateResponse added in v0.2.0

type APIKeysClientCreateResponse struct {
	ComponentAPIKey
}

APIKeysClientCreateResponse contains the response from method APIKeysClient.Create.

type APIKeysClientDeleteOptions added in v0.2.0

type APIKeysClientDeleteOptions struct {
}

APIKeysClientDeleteOptions contains the optional parameters for the APIKeysClient.Delete method.

type APIKeysClientDeleteResponse added in v0.2.0

type APIKeysClientDeleteResponse struct {
	ComponentAPIKey
}

APIKeysClientDeleteResponse contains the response from method APIKeysClient.Delete.

type APIKeysClientGetOptions added in v0.2.0

type APIKeysClientGetOptions struct {
}

APIKeysClientGetOptions contains the optional parameters for the APIKeysClient.Get method.

type APIKeysClientGetResponse added in v0.2.0

type APIKeysClientGetResponse struct {
	ComponentAPIKey
}

APIKeysClientGetResponse contains the response from method APIKeysClient.Get.

type APIKeysClientListOptions added in v0.2.0

type APIKeysClientListOptions struct {
}

APIKeysClientListOptions contains the optional parameters for the APIKeysClient.List method.

type APIKeysClientListResponse added in v0.2.0

type APIKeysClientListResponse struct {
	ComponentAPIKeyListResult
}

APIKeysClientListResponse contains the response from method APIKeysClient.List.

type AnalyticsItemsClient

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

AnalyticsItemsClient contains the methods for the AnalyticsItems group. Don't use this type directly, use NewAnalyticsItemsClient() instead.

func NewAnalyticsItemsClient

func NewAnalyticsItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AnalyticsItemsClient, error)

NewAnalyticsItemsClient creates a new instance of AnalyticsItemsClient 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 (*AnalyticsItemsClient) Delete

func (client *AnalyticsItemsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, options *AnalyticsItemsClientDeleteOptions) (AnalyticsItemsClientDeleteResponse, error)

Delete - Deletes a specific Analytics Items defined within an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. scopePath - Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component. options - AnalyticsItemsClientDeleteOptions contains the optional parameters for the AnalyticsItemsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemDelete.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewAnalyticsItemsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"my-resource-group",
		"my-component",
		armapplicationinsights.ItemScopePathAnalyticsItems,
		&armapplicationinsights.AnalyticsItemsClientDeleteOptions{ID: to.Ptr("3466c160-4a10-4df8-afdf-0007f3f6dee5"),
			Name: nil,
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AnalyticsItemsClient) Get

func (client *AnalyticsItemsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, options *AnalyticsItemsClientGetOptions) (AnalyticsItemsClientGetResponse, error)

Get - Gets a specific Analytics Items defined within an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. scopePath - Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component. options - AnalyticsItemsClientGetOptions contains the optional parameters for the AnalyticsItemsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemGet.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewAnalyticsItemsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"my-resource-group",
		"my-component",
		armapplicationinsights.ItemScopePathAnalyticsItems,
		&armapplicationinsights.AnalyticsItemsClientGetOptions{ID: to.Ptr("3466c160-4a10-4df8-afdf-0007f3f6dee5"),
			Name: nil,
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AnalyticsItemsClient) List

func (client *AnalyticsItemsClient) List(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, options *AnalyticsItemsClientListOptions) (AnalyticsItemsClientListResponse, error)

List - Gets a list of Analytics Items defined within an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. scopePath - Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component. options - AnalyticsItemsClientListOptions contains the optional parameters for the AnalyticsItemsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewAnalyticsItemsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"my-resource-group",
		"my-component",
		armapplicationinsights.ItemScopePathAnalyticsItems,
		&armapplicationinsights.AnalyticsItemsClientListOptions{Scope: nil,
			Type:           nil,
			IncludeContent: nil,
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AnalyticsItemsClient) Put

func (client *AnalyticsItemsClient) Put(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, itemProperties ComponentAnalyticsItem, options *AnalyticsItemsClientPutOptions) (AnalyticsItemsClientPutResponse, error)

Put - Adds or Updates a specific Analytics Item within an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. scopePath - Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component. itemProperties - Properties that need to be specified to create a new item and add it to an Application Insights component. options - AnalyticsItemsClientPutOptions contains the optional parameters for the AnalyticsItemsClient.Put method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemPut.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewAnalyticsItemsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Put(ctx,
		"my-resource-group",
		"my-component",
		armapplicationinsights.ItemScopePathAnalyticsItems,
		armapplicationinsights.ComponentAnalyticsItem{
			Content: to.Ptr("let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId  \n) on problemId \n| order by  count_ desc\n"),
			Name:    to.Ptr("Exceptions - New in the last 24 hours"),
			Scope:   to.Ptr(armapplicationinsights.ItemScopeShared),
			Type:    to.Ptr(armapplicationinsights.ItemTypeQuery),
		},
		&armapplicationinsights.AnalyticsItemsClientPutOptions{OverrideItem: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type AnalyticsItemsClientDeleteOptions added in v0.2.0

type AnalyticsItemsClientDeleteOptions struct {
	// The Id of a specific item defined in the Application Insights component
	ID *string
	// The name of a specific item defined in the Application Insights component
	Name *string
}

AnalyticsItemsClientDeleteOptions contains the optional parameters for the AnalyticsItemsClient.Delete method.

type AnalyticsItemsClientDeleteResponse added in v0.2.0

type AnalyticsItemsClientDeleteResponse struct {
}

AnalyticsItemsClientDeleteResponse contains the response from method AnalyticsItemsClient.Delete.

type AnalyticsItemsClientGetOptions added in v0.2.0

type AnalyticsItemsClientGetOptions struct {
	// The Id of a specific item defined in the Application Insights component
	ID *string
	// The name of a specific item defined in the Application Insights component
	Name *string
}

AnalyticsItemsClientGetOptions contains the optional parameters for the AnalyticsItemsClient.Get method.

type AnalyticsItemsClientGetResponse added in v0.2.0

type AnalyticsItemsClientGetResponse struct {
	ComponentAnalyticsItem
}

AnalyticsItemsClientGetResponse contains the response from method AnalyticsItemsClient.Get.

type AnalyticsItemsClientListOptions added in v0.2.0

type AnalyticsItemsClientListOptions struct {
	// Flag indicating whether or not to return the content of each applicable item. If false, only return the item information.
	IncludeContent *bool
	// Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application
	// Insights component.
	Scope *ItemScope
	// Enum indicating the type of the Analytics item.
	Type *ItemTypeParameter
}

AnalyticsItemsClientListOptions contains the optional parameters for the AnalyticsItemsClient.List method.

type AnalyticsItemsClientListResponse added in v0.2.0

type AnalyticsItemsClientListResponse struct {
	// Array of ApplicationInsightsComponentAnalyticsItem
	ComponentAnalyticsItemArray []*ComponentAnalyticsItem
}

AnalyticsItemsClientListResponse contains the response from method AnalyticsItemsClient.List.

type AnalyticsItemsClientPutOptions added in v0.2.0

type AnalyticsItemsClientPutOptions struct {
	// Flag indicating whether or not to force save an item. This allows overriding an item if it already exists.
	OverrideItem *bool
}

AnalyticsItemsClientPutOptions contains the optional parameters for the AnalyticsItemsClient.Put method.

type AnalyticsItemsClientPutResponse added in v0.2.0

type AnalyticsItemsClientPutResponse struct {
	ComponentAnalyticsItem
}

AnalyticsItemsClientPutResponse contains the response from method AnalyticsItemsClient.Put.

type Annotation

type Annotation struct {
	// Name of annotation
	AnnotationName *string `json:"AnnotationName,omitempty"`

	// Category of annotation, free form
	Category *string `json:"Category,omitempty"`

	// Time when event occurred
	EventTime *time.Time `json:"EventTime,omitempty"`

	// Unique Id for annotation
	ID *string `json:"Id,omitempty"`

	// Serialized JSON object for detailed properties
	Properties *string `json:"Properties,omitempty"`

	// Related parent annotation if any
	RelatedAnnotation *string `json:"RelatedAnnotation,omitempty"`
}

Annotation associated with an application insights resource.

func (Annotation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Annotation.

func (*Annotation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Annotation.

type AnnotationError

type AnnotationError struct {
	// Error detail code and explanation
	Code *string `json:"code,omitempty"`

	// Inner error
	Innererror *InnerError `json:"innererror,omitempty"`

	// Error message
	Message *string `json:"message,omitempty"`
}

AnnotationError - Error associated with trying to create annotation with Id that already exist

type AnnotationsClient

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

AnnotationsClient contains the methods for the Annotations group. Don't use this type directly, use NewAnnotationsClient() instead.

func NewAnnotationsClient

func NewAnnotationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AnnotationsClient, error)

NewAnnotationsClient creates a new instance of AnnotationsClient 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 (*AnnotationsClient) Create

func (client *AnnotationsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, annotationProperties Annotation, options *AnnotationsClientCreateOptions) (AnnotationsClientCreateResponse, error)

Create - Create an Annotation of an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. annotationProperties - Properties that need to be specified to create an annotation of a Application Insights component. options - AnnotationsClientCreateOptions contains the optional parameters for the AnnotationsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsCreate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewAnnotationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx,
		"my-resource-group",
		"my-component",
		armapplicationinsights.Annotation{
			AnnotationName: to.Ptr("TestAnnotation"),
			Category:       to.Ptr("Text"),
			EventTime:      to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-31T13:41:38.657Z"); return t }()),
			ID:             to.Ptr("444e2c08-274a-4bbb-a89e-d77bb720f44a"),
			Properties:     to.Ptr("{\"Comments\":\"Testing\",\"Label\":\"Success\"}"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AnnotationsClient) Delete

func (client *AnnotationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, annotationID string, options *AnnotationsClientDeleteOptions) (AnnotationsClientDeleteResponse, error)

Delete - Delete an Annotation of an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. annotationID - The unique annotation ID. This is unique within a Application Insights component. options - AnnotationsClientDeleteOptions contains the optional parameters for the AnnotationsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewAnnotationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"my-resource-group",
		"my-component",
		"bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*AnnotationsClient) Get

func (client *AnnotationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, annotationID string, options *AnnotationsClientGetOptions) (AnnotationsClientGetResponse, error)

Get - Get the annotation for given id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. annotationID - The unique annotation ID. This is unique within a Application Insights component. options - AnnotationsClientGetOptions contains the optional parameters for the AnnotationsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewAnnotationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"my-resource-group",
		"my-component",
		"444e2c08-274a-4bbb-a89e-d77bb720f44a",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*AnnotationsClient) NewListPager added in v0.4.0

func (client *AnnotationsClient) NewListPager(resourceGroupName string, resourceName string, start string, end string, options *AnnotationsClientListOptions) *runtime.Pager[AnnotationsClientListResponse]

NewListPager - Gets the list of annotations for a component for given time range If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. start - The start time to query from for annotations, cannot be older than 90 days from current date. end - The end time to query for annotations. options - AnnotationsClientListOptions contains the optional parameters for the AnnotationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewAnnotationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("my-resource-group",
		"my-component",
		"2018-02-05T00%253A30%253A00.000Z",
		"2018-02-06T00%253A33A00.000Z",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type AnnotationsClientCreateOptions added in v0.2.0

type AnnotationsClientCreateOptions struct {
}

AnnotationsClientCreateOptions contains the optional parameters for the AnnotationsClient.Create method.

type AnnotationsClientCreateResponse added in v0.2.0

type AnnotationsClientCreateResponse struct {
	// Array of Annotation
	AnnotationArray []*Annotation
}

AnnotationsClientCreateResponse contains the response from method AnnotationsClient.Create.

type AnnotationsClientDeleteOptions added in v0.2.0

type AnnotationsClientDeleteOptions struct {
}

AnnotationsClientDeleteOptions contains the optional parameters for the AnnotationsClient.Delete method.

type AnnotationsClientDeleteResponse added in v0.2.0

type AnnotationsClientDeleteResponse struct {
}

AnnotationsClientDeleteResponse contains the response from method AnnotationsClient.Delete.

type AnnotationsClientGetOptions added in v0.2.0

type AnnotationsClientGetOptions struct {
}

AnnotationsClientGetOptions contains the optional parameters for the AnnotationsClient.Get method.

type AnnotationsClientGetResponse added in v0.2.0

type AnnotationsClientGetResponse struct {
	// Array of Annotation
	AnnotationArray []*Annotation
}

AnnotationsClientGetResponse contains the response from method AnnotationsClient.Get.

type AnnotationsClientListOptions added in v0.2.0

type AnnotationsClientListOptions struct {
}

AnnotationsClientListOptions contains the optional parameters for the AnnotationsClient.List method.

type AnnotationsClientListResponse added in v0.2.0

type AnnotationsClientListResponse struct {
	AnnotationsListResult
}

AnnotationsClientListResponse contains the response from method AnnotationsClient.List.

type AnnotationsListResult

type AnnotationsListResult struct {
	// READ-ONLY; An array of annotations.
	Value []*Annotation `json:"value,omitempty" azure:"ro"`
}

AnnotationsListResult - Annotations list result.

type ApplicationType

type ApplicationType string

ApplicationType - Type of application being monitored.

const (
	ApplicationTypeOther ApplicationType = "other"
	ApplicationTypeWeb   ApplicationType = "web"
)

func PossibleApplicationTypeValues

func PossibleApplicationTypeValues() []ApplicationType

PossibleApplicationTypeValues returns the possible values for the ApplicationType const type.

type CategoryType

type CategoryType string
const (
	CategoryTypePerformance CategoryType = "performance"
	CategoryTypeRetention   CategoryType = "retention"
	CategoryTypeTSG         CategoryType = "TSG"
	CategoryTypeWorkbook    CategoryType = "workbook"
)

func PossibleCategoryTypeValues

func PossibleCategoryTypeValues() []CategoryType

PossibleCategoryTypeValues returns the possible values for the CategoryType const type.

type Component added in v0.2.0

type Component struct {
	// REQUIRED; The kind of application that this component refers to, used to customize UI. This value is a freeform string,
	// values should typically be one of the following: web, ios, other, store, java, phone.
	Kind *string `json:"kind,omitempty"`

	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Resource etag
	Etag *string `json:"etag,omitempty"`

	// Properties that define an Application Insights component resource.
	Properties *ComponentProperties `json:"properties,omitempty"`

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

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

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

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

Component - An Application Insights component definition.

func (Component) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type Component.

type ComponentAPIKey added in v0.2.0

type ComponentAPIKey struct {
	// The create date of this API key.
	CreatedDate *string `json:"createdDate,omitempty"`

	// The read access rights of this API Key.
	LinkedReadProperties []*string `json:"linkedReadProperties,omitempty"`

	// The write access rights of this API Key.
	LinkedWriteProperties []*string `json:"linkedWriteProperties,omitempty"`

	// The name of the API key.
	Name *string `json:"name,omitempty"`

	// READ-ONLY; The API key value. It will be only return once when the API Key was created.
	APIKey *string `json:"apiKey,omitempty" azure:"ro"`

	// READ-ONLY; The unique ID of the API key inside an Application Insights component. It is auto generated when the API key
	// is created.
	ID *string `json:"id,omitempty" azure:"ro"`
}

ComponentAPIKey - Properties that define an API key of an Application Insights Component.

type ComponentAPIKeyListResult added in v0.2.0

type ComponentAPIKeyListResult struct {
	// REQUIRED; List of API Key definitions.
	Value []*ComponentAPIKey `json:"value,omitempty"`
}

ComponentAPIKeyListResult - Describes the list of API Keys of an Application Insights Component.

type ComponentAnalyticsItem added in v0.2.0

type ComponentAnalyticsItem struct {
	// The content of this item
	Content *string `json:"Content,omitempty"`

	// Internally assigned unique id of the item definition.
	ID *string `json:"Id,omitempty"`

	// The user-defined name of the item.
	Name *string `json:"Name,omitempty"`

	// A set of properties that can be defined in the context of a specific item type. Each type may have its own properties.
	Properties *ComponentAnalyticsItemProperties `json:"Properties,omitempty"`

	// Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application
	// Insights component.
	Scope *ItemScope `json:"Scope,omitempty"`

	// Enum indicating the type of the Analytics item.
	Type *ItemType `json:"Type,omitempty"`

	// READ-ONLY; Date and time in UTC when this item was created.
	TimeCreated *string `json:"TimeCreated,omitempty" azure:"ro"`

	// READ-ONLY; Date and time in UTC of the last modification that was made to this item.
	TimeModified *string `json:"TimeModified,omitempty" azure:"ro"`

	// READ-ONLY; This instance's version of the data model. This can change as new features are added.
	Version *string `json:"Version,omitempty" azure:"ro"`
}

ComponentAnalyticsItem - Properties that define an Analytics item that is associated to an Application Insights component.

type ComponentAnalyticsItemProperties added in v0.2.0

type ComponentAnalyticsItemProperties struct {
	// A function alias, used when the type of the item is Function
	FunctionAlias *string `json:"functionAlias,omitempty"`
}

ComponentAnalyticsItemProperties - A set of properties that can be defined in the context of a specific item type. Each type may have its own properties.

type ComponentAvailableFeatures added in v0.2.0

type ComponentAvailableFeatures struct {
	// READ-ONLY; A list of Application Insights component feature.
	Result []*ComponentFeature `json:"Result,omitempty" azure:"ro"`
}

ComponentAvailableFeatures - An Application Insights component available features.

type ComponentAvailableFeaturesClient

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

ComponentAvailableFeaturesClient contains the methods for the ComponentAvailableFeatures group. Don't use this type directly, use NewComponentAvailableFeaturesClient() instead.

func NewComponentAvailableFeaturesClient

func NewComponentAvailableFeaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentAvailableFeaturesClient, error)

NewComponentAvailableFeaturesClient creates a new instance of ComponentAvailableFeaturesClient 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 (*ComponentAvailableFeaturesClient) Get

Get - Returns all available features of the application insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - ComponentAvailableFeaturesClientGetOptions contains the optional parameters for the ComponentAvailableFeaturesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AvailableBillingFeaturesGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

type ComponentAvailableFeaturesClientGetOptions added in v0.2.0

type ComponentAvailableFeaturesClientGetOptions struct {
}

ComponentAvailableFeaturesClientGetOptions contains the optional parameters for the ComponentAvailableFeaturesClient.Get method.

type ComponentAvailableFeaturesClientGetResponse added in v0.2.0

type ComponentAvailableFeaturesClientGetResponse struct {
	ComponentAvailableFeatures
}

ComponentAvailableFeaturesClientGetResponse contains the response from method ComponentAvailableFeaturesClient.Get.

type ComponentBillingFeatures added in v0.2.0

type ComponentBillingFeatures struct {
	// Current enabled pricing plan. When the component is in the Enterprise plan, this will list both 'Basic' and 'Application
	// Insights Enterprise'.
	CurrentBillingFeatures []*string `json:"CurrentBillingFeatures,omitempty"`

	// An Application Insights component daily data volume cap
	DataVolumeCap *ComponentDataVolumeCap `json:"DataVolumeCap,omitempty"`
}

ComponentBillingFeatures - An Application Insights component billing features

func (ComponentBillingFeatures) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ComponentBillingFeatures.

type ComponentCurrentBillingFeaturesClient

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

ComponentCurrentBillingFeaturesClient contains the methods for the ComponentCurrentBillingFeatures group. Don't use this type directly, use NewComponentCurrentBillingFeaturesClient() instead.

func NewComponentCurrentBillingFeaturesClient

func NewComponentCurrentBillingFeaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentCurrentBillingFeaturesClient, error)

NewComponentCurrentBillingFeaturesClient creates a new instance of ComponentCurrentBillingFeaturesClient 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 (*ComponentCurrentBillingFeaturesClient) Get

Get - Returns current billing features for an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - ComponentCurrentBillingFeaturesClientGetOptions contains the optional parameters for the ComponentCurrentBillingFeaturesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

func (*ComponentCurrentBillingFeaturesClient) Update

Update - Update current billing features for an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. billingFeaturesProperties - Properties that need to be specified to update billing features for an Application Insights component. options - ComponentCurrentBillingFeaturesClientUpdateOptions contains the optional parameters for the ComponentCurrentBillingFeaturesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesUpdate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewComponentCurrentBillingFeaturesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"my-resource-group",
		"my-component",
		armapplicationinsights.ComponentBillingFeatures{
			CurrentBillingFeatures: []*string{
				to.Ptr("Basic"),
				to.Ptr("Application Insights Enterprise")},
			DataVolumeCap: &armapplicationinsights.ComponentDataVolumeCap{
				Cap:                            to.Ptr[float32](100),
				StopSendNotificationWhenHitCap: to.Ptr(true),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ComponentCurrentBillingFeaturesClientGetOptions added in v0.2.0

type ComponentCurrentBillingFeaturesClientGetOptions struct {
}

ComponentCurrentBillingFeaturesClientGetOptions contains the optional parameters for the ComponentCurrentBillingFeaturesClient.Get method.

type ComponentCurrentBillingFeaturesClientGetResponse added in v0.2.0

type ComponentCurrentBillingFeaturesClientGetResponse struct {
	ComponentBillingFeatures
}

ComponentCurrentBillingFeaturesClientGetResponse contains the response from method ComponentCurrentBillingFeaturesClient.Get.

type ComponentCurrentBillingFeaturesClientUpdateOptions added in v0.2.0

type ComponentCurrentBillingFeaturesClientUpdateOptions struct {
}

ComponentCurrentBillingFeaturesClientUpdateOptions contains the optional parameters for the ComponentCurrentBillingFeaturesClient.Update method.

type ComponentCurrentBillingFeaturesClientUpdateResponse added in v0.2.0

type ComponentCurrentBillingFeaturesClientUpdateResponse struct {
	ComponentBillingFeatures
}

ComponentCurrentBillingFeaturesClientUpdateResponse contains the response from method ComponentCurrentBillingFeaturesClient.Update.

type ComponentDataVolumeCap added in v0.2.0

type ComponentDataVolumeCap struct {
	// Daily data volume cap in GB.
	Cap *float32 `json:"Cap,omitempty"`

	// Do not send a notification email when the daily data volume cap is met.
	StopSendNotificationWhenHitCap *bool `json:"StopSendNotificationWhenHitCap,omitempty"`

	// Reserved, not used for now.
	StopSendNotificationWhenHitThreshold *bool `json:"StopSendNotificationWhenHitThreshold,omitempty"`

	// Reserved, not used for now.
	WarningThreshold *int32 `json:"WarningThreshold,omitempty"`

	// READ-ONLY; Maximum daily data volume cap that the user can set for this component.
	MaxHistoryCap *float32 `json:"MaxHistoryCap,omitempty" azure:"ro"`

	// READ-ONLY; Daily data volume cap UTC reset hour.
	ResetTime *int32 `json:"ResetTime,omitempty" azure:"ro"`
}

ComponentDataVolumeCap - An Application Insights component daily data volume cap

type ComponentExportConfiguration added in v0.2.0

type ComponentExportConfiguration struct {
	// Deprecated
	NotificationQueueEnabled *string `json:"NotificationQueueEnabled,omitempty"`

	// This comma separated list of document types that will be exported. The possible values include 'Requests', 'Event', 'Exceptions',
	// 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd',
	// 'PerformanceCounters', 'Availability', 'Messages'.
	RecordTypes *string `json:"RecordTypes,omitempty"`

	// READ-ONLY; The name of the Application Insights component.
	ApplicationName *string `json:"ApplicationName,omitempty" azure:"ro"`

	// READ-ONLY; The name of the destination storage container.
	ContainerName *string `json:"ContainerName,omitempty" azure:"ro"`

	// READ-ONLY; The name of destination account.
	DestinationAccountID *string `json:"DestinationAccountId,omitempty" azure:"ro"`

	// READ-ONLY; The destination account location ID.
	DestinationStorageLocationID *string `json:"DestinationStorageLocationId,omitempty" azure:"ro"`

	// READ-ONLY; The destination storage account subscription ID.
	DestinationStorageSubscriptionID *string `json:"DestinationStorageSubscriptionId,omitempty" azure:"ro"`

	// READ-ONLY; The destination type.
	DestinationType *string `json:"DestinationType,omitempty" azure:"ro"`

	// READ-ONLY; The unique ID of the export configuration inside an Application Insights component. It is auto generated when
	// the Continuous Export configuration is created.
	ExportID *string `json:"ExportId,omitempty" azure:"ro"`

	// READ-ONLY; This indicates current Continuous Export configuration status. The possible values are 'Preparing', 'Success',
	// 'Failure'.
	ExportStatus *string `json:"ExportStatus,omitempty" azure:"ro"`

	// READ-ONLY; The instrumentation key of the Application Insights component.
	InstrumentationKey *string `json:"InstrumentationKey,omitempty" azure:"ro"`

	// READ-ONLY; This will be 'true' if the Continuous Export configuration is enabled, otherwise it will be 'false'.
	IsUserEnabled *string `json:"IsUserEnabled,omitempty" azure:"ro"`

	// READ-ONLY; The last time the Continuous Export configuration started failing.
	LastGapTime *string `json:"LastGapTime,omitempty" azure:"ro"`

	// READ-ONLY; The last time data was successfully delivered to the destination storage container for this Continuous Export
	// configuration.
	LastSuccessTime *string `json:"LastSuccessTime,omitempty" azure:"ro"`

	// READ-ONLY; Last time the Continuous Export configuration was updated.
	LastUserUpdate *string `json:"LastUserUpdate,omitempty" azure:"ro"`

	// READ-ONLY; This is the reason the Continuous Export configuration started failing. It can be 'AzureStorageNotFound' or
	// 'AzureStorageAccessDenied'.
	PermanentErrorReason *string `json:"PermanentErrorReason,omitempty" azure:"ro"`

	// READ-ONLY; The resource group of the Application Insights component.
	ResourceGroup *string `json:"ResourceGroup,omitempty" azure:"ro"`

	// READ-ONLY; The name of the destination storage account.
	StorageName *string `json:"StorageName,omitempty" azure:"ro"`

	// READ-ONLY; The subscription of the Application Insights component.
	SubscriptionID *string `json:"SubscriptionId,omitempty" azure:"ro"`
}

ComponentExportConfiguration - Properties that define a Continuous Export configuration.

type ComponentExportRequest added in v0.2.0

type ComponentExportRequest struct {
	// The name of destination storage account.
	DestinationAccountID *string `json:"DestinationAccountId,omitempty"`

	// The SAS URL for the destination storage container. It must grant write permission.
	DestinationAddress *string `json:"DestinationAddress,omitempty"`

	// The location ID of the destination storage container.
	DestinationStorageLocationID *string `json:"DestinationStorageLocationId,omitempty"`

	// The subscription ID of the destination storage container.
	DestinationStorageSubscriptionID *string `json:"DestinationStorageSubscriptionId,omitempty"`

	// The Continuous Export destination type. This has to be 'Blob'.
	DestinationType *string `json:"DestinationType,omitempty"`

	// Set to 'true' to create a Continuous Export configuration as enabled, otherwise set it to 'false'.
	IsEnabled *string `json:"IsEnabled,omitempty"`

	// Deprecated
	NotificationQueueEnabled *string `json:"NotificationQueueEnabled,omitempty"`

	// Deprecated
	NotificationQueueURI *string `json:"NotificationQueueUri,omitempty"`

	// The document types to be exported, as comma separated values. Allowed values include 'Requests', 'Event', 'Exceptions',
	// 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters',
	// 'Availability', 'Messages'.
	RecordTypes *string `json:"RecordTypes,omitempty"`
}

ComponentExportRequest - An Application Insights component Continuous Export configuration request definition.

type ComponentFavorite added in v0.2.0

type ComponentFavorite struct {
	// Favorite category, as defined by the user at creation time.
	Category *string `json:"Category,omitempty"`

	// Configuration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a string containing
	// valid JSON
	Config *string `json:"Config,omitempty"`

	// Enum indicating if this favorite definition is owned by a specific user or is shared between all users with access to the
	// Application Insights component.
	FavoriteType *FavoriteType `json:"FavoriteType,omitempty"`

	// Flag denoting wether or not this favorite was generated from a template.
	IsGeneratedFromTemplate *bool `json:"IsGeneratedFromTemplate,omitempty"`

	// The user-defined name of the favorite.
	Name *string `json:"Name,omitempty"`

	// The source of the favorite definition.
	SourceType *string `json:"SourceType,omitempty"`

	// A list of 0 or more tags that are associated with this favorite definition
	Tags []*string `json:"Tags,omitempty"`

	// This instance's version of the data model. This can change as new features are added that can be marked favorite. Current
	// examples include MetricsExplorer (ME) and Search.
	Version *string `json:"Version,omitempty"`

	// READ-ONLY; Internally assigned unique id of the favorite definition.
	FavoriteID *string `json:"FavoriteId,omitempty" azure:"ro"`

	// READ-ONLY; Date and time in UTC of the last modification that was made to this favorite definition.
	TimeModified *string `json:"TimeModified,omitempty" azure:"ro"`

	// READ-ONLY; Unique user id of the specific user that owns this favorite.
	UserID *string `json:"UserId,omitempty" azure:"ro"`
}

ComponentFavorite - Properties that define a favorite that is associated to an Application Insights component.

func (ComponentFavorite) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ComponentFavorite.

type ComponentFeature added in v0.2.0

type ComponentFeature struct {
	// READ-ONLY; A list of Application Insights component feature capability.
	Capabilities []*ComponentFeatureCapability `json:"Capabilities,omitempty" azure:"ro"`

	// READ-ONLY; The pricing feature name.
	FeatureName *string `json:"FeatureName,omitempty" azure:"ro"`

	// READ-ONLY; Reserved, not used now.
	IsHidden *bool `json:"IsHidden,omitempty" azure:"ro"`

	// READ-ONLY; Whether can apply addon feature on to it.
	IsMainFeature *bool `json:"IsMainFeature,omitempty" azure:"ro"`

	// READ-ONLY; The meter id used for the feature.
	MeterID *string `json:"MeterId,omitempty" azure:"ro"`

	// READ-ONLY; The meter rate for the feature's meter.
	MeterRateFrequency *string `json:"MeterRateFrequency,omitempty" azure:"ro"`

	// READ-ONLY; Reserved, not used now.
	ResouceID *string `json:"ResouceId,omitempty" azure:"ro"`

	// READ-ONLY; The add on features on main feature.
	SupportedAddonFeatures *string `json:"SupportedAddonFeatures,omitempty" azure:"ro"`

	// READ-ONLY; Display name of the feature.
	Title *string `json:"Title,omitempty" azure:"ro"`
}

ComponentFeature - An Application Insights component daily data volume cap status

type ComponentFeatureCapabilities added in v0.2.0

type ComponentFeatureCapabilities struct {
	// READ-ONLY; Reserved, not used now.
	APIAccessLevel *string `json:"ApiAccessLevel,omitempty" azure:"ro"`

	// READ-ONLY; Reserved, not used now.
	AnalyticsIntegration *bool `json:"AnalyticsIntegration,omitempty" azure:"ro"`

	// READ-ONLY; Reserved, not used now.
	ApplicationMap *bool `json:"ApplicationMap,omitempty" azure:"ro"`

	// READ-ONLY; Reserved, not used now.
	BurstThrottlePolicy *string `json:"BurstThrottlePolicy,omitempty" azure:"ro"`

	// READ-ONLY; Daily data volume cap in GB.
	DailyCap *float32 `json:"DailyCap,omitempty" azure:"ro"`

	// READ-ONLY; Daily data volume cap UTC reset hour.
	DailyCapResetTime *float32 `json:"DailyCapResetTime,omitempty" azure:"ro"`

	// READ-ONLY; Reserved, not used now.
	LiveStreamMetrics *bool `json:"LiveStreamMetrics,omitempty" azure:"ro"`

	// READ-ONLY; Reserved, not used now.
	MetadataClass *string `json:"MetadataClass,omitempty" azure:"ro"`

	// READ-ONLY; Whether allow to use multiple steps web test feature.
	MultipleStepWebTest *bool `json:"MultipleStepWebTest,omitempty" azure:"ro"`

	// READ-ONLY; Reserved, not used now.
	OpenSchema *bool `json:"OpenSchema,omitempty" azure:"ro"`

	// READ-ONLY; Reserved, not used now.
	PowerBIIntegration *bool `json:"PowerBIIntegration,omitempty" azure:"ro"`

	// READ-ONLY; Reserved, not used now.
	ProactiveDetection *bool `json:"ProactiveDetection,omitempty" azure:"ro"`

	// READ-ONLY; Whether allow to use continuous export feature.
	SupportExportData *bool `json:"SupportExportData,omitempty" azure:"ro"`

	// READ-ONLY; Reserved, not used now.
	ThrottleRate *float32 `json:"ThrottleRate,omitempty" azure:"ro"`

	// READ-ONLY; The application insights component used tracking type.
	TrackingType *string `json:"TrackingType,omitempty" azure:"ro"`

	// READ-ONLY; Whether allow to use work item integration feature.
	WorkItemIntegration *bool `json:"WorkItemIntegration,omitempty" azure:"ro"`
}

ComponentFeatureCapabilities - An Application Insights component feature capabilities

type ComponentFeatureCapabilitiesClient

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

ComponentFeatureCapabilitiesClient contains the methods for the ComponentFeatureCapabilities group. Don't use this type directly, use NewComponentFeatureCapabilitiesClient() instead.

func NewComponentFeatureCapabilitiesClient

func NewComponentFeatureCapabilitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentFeatureCapabilitiesClient, error)

NewComponentFeatureCapabilitiesClient creates a new instance of ComponentFeatureCapabilitiesClient 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 (*ComponentFeatureCapabilitiesClient) Get

Get - Returns feature capabilities of the application insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - ComponentFeatureCapabilitiesClientGetOptions contains the optional parameters for the ComponentFeatureCapabilitiesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FeatureCapabilitiesGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

type ComponentFeatureCapabilitiesClientGetOptions added in v0.2.0

type ComponentFeatureCapabilitiesClientGetOptions struct {
}

ComponentFeatureCapabilitiesClientGetOptions contains the optional parameters for the ComponentFeatureCapabilitiesClient.Get method.

type ComponentFeatureCapabilitiesClientGetResponse added in v0.2.0

type ComponentFeatureCapabilitiesClientGetResponse struct {
	ComponentFeatureCapabilities
}

ComponentFeatureCapabilitiesClientGetResponse contains the response from method ComponentFeatureCapabilitiesClient.Get.

type ComponentFeatureCapability added in v0.2.0

type ComponentFeatureCapability struct {
	// READ-ONLY; The description of the capability.
	Description *string `json:"Description,omitempty" azure:"ro"`

	// READ-ONLY; The meter used for the capability.
	MeterID *string `json:"MeterId,omitempty" azure:"ro"`

	// READ-ONLY; The meter rate of the meter.
	MeterRateFrequency *string `json:"MeterRateFrequency,omitempty" azure:"ro"`

	// READ-ONLY; The name of the capability.
	Name *string `json:"Name,omitempty" azure:"ro"`

	// READ-ONLY; The unit of the capability.
	Unit *string `json:"Unit,omitempty" azure:"ro"`

	// READ-ONLY; The value of the capability.
	Value *string `json:"Value,omitempty" azure:"ro"`
}

ComponentFeatureCapability - An Application Insights component feature capability

type ComponentLinkedStorageAccounts

type ComponentLinkedStorageAccounts struct {
	// The properties of the linked storage accounts.
	Properties *LinkedStorageAccountsProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

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

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ComponentLinkedStorageAccounts - An Application Insights component linked storage accounts

type ComponentLinkedStorageAccountsClient

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

ComponentLinkedStorageAccountsClient contains the methods for the ComponentLinkedStorageAccounts group. Don't use this type directly, use NewComponentLinkedStorageAccountsClient() instead.

func NewComponentLinkedStorageAccountsClient

func NewComponentLinkedStorageAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentLinkedStorageAccountsClient, error)

NewComponentLinkedStorageAccountsClient creates a new instance of ComponentLinkedStorageAccountsClient 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 (*ComponentLinkedStorageAccountsClient) CreateAndUpdate

CreateAndUpdate - Replace current linked storage account for an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-03-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. storageType - The type of the Application Insights component data source for the linked storage account. linkedStorageAccountsProperties - Properties that need to be specified to update linked storage accounts for an Application Insights component. options - ComponentLinkedStorageAccountsClientCreateAndUpdateOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.CreateAndUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewComponentLinkedStorageAccountsClient("86dc51d3-92ed-4d7e-947a-775ea79b4918", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateAndUpdate(ctx,
		"someResourceGroupName",
		"myComponent",
		armapplicationinsights.StorageTypeServiceProfiler,
		armapplicationinsights.ComponentLinkedStorageAccounts{
			Properties: &armapplicationinsights.LinkedStorageAccountsProperties{
				LinkedStorageAccount: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ComponentLinkedStorageAccountsClient) Delete

Delete - Delete linked storage accounts for an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-03-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. storageType - The type of the Application Insights component data source for the linked storage account. options - ComponentLinkedStorageAccountsClientDeleteOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewComponentLinkedStorageAccountsClient("86dc51d3-92ed-4d7e-947a-775ea79b4918", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"someResourceGroupName",
		"myComponent",
		armapplicationinsights.StorageTypeServiceProfiler,
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ComponentLinkedStorageAccountsClient) Get

Get - Returns the current linked storage settings for an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-03-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. storageType - The type of the Application Insights component data source for the linked storage account. options - ComponentLinkedStorageAccountsClientGetOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewComponentLinkedStorageAccountsClient("86dc51d3-92ed-4d7e-947a-775ea79b4918", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"someResourceGroupName",
		"myComponent",
		armapplicationinsights.StorageTypeServiceProfiler,
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ComponentLinkedStorageAccountsClient) Update

Update - Update linked storage accounts for an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-03-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. storageType - The type of the Application Insights component data source for the linked storage account. linkedStorageAccountsProperties - Properties that need to be specified to update a linked storage accounts for an Application Insights component. options - ComponentLinkedStorageAccountsClientUpdateOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewComponentLinkedStorageAccountsClient("86dc51d3-92ed-4d7e-947a-775ea79b4918", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"someResourceGroupName",
		"myComponent",
		armapplicationinsights.StorageTypeServiceProfiler,
		armapplicationinsights.ComponentLinkedStorageAccountsPatch{
			Properties: &armapplicationinsights.LinkedStorageAccountsProperties{
				LinkedStorageAccount: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ComponentLinkedStorageAccountsClientCreateAndUpdateOptions added in v0.2.0

type ComponentLinkedStorageAccountsClientCreateAndUpdateOptions struct {
}

ComponentLinkedStorageAccountsClientCreateAndUpdateOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.CreateAndUpdate method.

type ComponentLinkedStorageAccountsClientCreateAndUpdateResponse added in v0.2.0

type ComponentLinkedStorageAccountsClientCreateAndUpdateResponse struct {
	ComponentLinkedStorageAccounts
}

ComponentLinkedStorageAccountsClientCreateAndUpdateResponse contains the response from method ComponentLinkedStorageAccountsClient.CreateAndUpdate.

type ComponentLinkedStorageAccountsClientDeleteOptions added in v0.2.0

type ComponentLinkedStorageAccountsClientDeleteOptions struct {
}

ComponentLinkedStorageAccountsClientDeleteOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Delete method.

type ComponentLinkedStorageAccountsClientDeleteResponse added in v0.2.0

type ComponentLinkedStorageAccountsClientDeleteResponse struct {
}

ComponentLinkedStorageAccountsClientDeleteResponse contains the response from method ComponentLinkedStorageAccountsClient.Delete.

type ComponentLinkedStorageAccountsClientGetOptions added in v0.2.0

type ComponentLinkedStorageAccountsClientGetOptions struct {
}

ComponentLinkedStorageAccountsClientGetOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Get method.

type ComponentLinkedStorageAccountsClientGetResponse added in v0.2.0

type ComponentLinkedStorageAccountsClientGetResponse struct {
	ComponentLinkedStorageAccounts
}

ComponentLinkedStorageAccountsClientGetResponse contains the response from method ComponentLinkedStorageAccountsClient.Get.

type ComponentLinkedStorageAccountsClientUpdateOptions added in v0.2.0

type ComponentLinkedStorageAccountsClientUpdateOptions struct {
}

ComponentLinkedStorageAccountsClientUpdateOptions contains the optional parameters for the ComponentLinkedStorageAccountsClient.Update method.

type ComponentLinkedStorageAccountsClientUpdateResponse added in v0.2.0

type ComponentLinkedStorageAccountsClientUpdateResponse struct {
	ComponentLinkedStorageAccounts
}

ComponentLinkedStorageAccountsClientUpdateResponse contains the response from method ComponentLinkedStorageAccountsClient.Update.

type ComponentLinkedStorageAccountsPatch

type ComponentLinkedStorageAccountsPatch struct {
	// The properties of the linked storage accounts.
	Properties *LinkedStorageAccountsProperties `json:"properties,omitempty"`
}

ComponentLinkedStorageAccountsPatch - An Application Insights component linked storage accounts patch

func (ComponentLinkedStorageAccountsPatch) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentLinkedStorageAccountsPatch.

type ComponentListResult added in v0.2.0

type ComponentListResult struct {
	// REQUIRED; List of Application Insights component definitions.
	Value []*Component `json:"value,omitempty"`

	// The URI to get the next set of Application Insights component definitions if too many components where returned in the
	// result set.
	NextLink *string `json:"nextLink,omitempty"`
}

ComponentListResult - Describes the list of Application Insights Resources.

type ComponentProactiveDetectionConfiguration added in v0.2.0

type ComponentProactiveDetectionConfiguration struct {
	// Custom email addresses for this rule notifications
	CustomEmails []*string `json:"CustomEmails,omitempty"`

	// A flag that indicates whether this rule is enabled by the user
	Enabled *bool `json:"Enabled,omitempty"`

	// The last time this rule was updated
	LastUpdatedTime *string `json:"LastUpdatedTime,omitempty"`

	// The rule name
	Name *string `json:"Name,omitempty"`

	// Static definitions of the ProactiveDetection configuration rule (same values for all components).
	RuleDefinitions *ComponentProactiveDetectionConfigurationRuleDefinitions `json:"RuleDefinitions,omitempty"`

	// A flag that indicated whether notifications on this rule should be sent to subscription owners
	SendEmailsToSubscriptionOwners *bool `json:"SendEmailsToSubscriptionOwners,omitempty"`
}

ComponentProactiveDetectionConfiguration - Properties that define a ProactiveDetection configuration.

func (ComponentProactiveDetectionConfiguration) MarshalJSON added in v0.2.0

MarshalJSON implements the json.Marshaller interface for type ComponentProactiveDetectionConfiguration.

type ComponentProactiveDetectionConfigurationRuleDefinitions added in v0.2.0

type ComponentProactiveDetectionConfigurationRuleDefinitions struct {
	// The rule description
	Description *string `json:"Description,omitempty"`

	// The rule name as it is displayed in UI
	DisplayName *string `json:"DisplayName,omitempty"`

	// URL which displays additional info about the proactive detection rule
	HelpURL *string `json:"HelpUrl,omitempty"`

	// A flag indicating whether the rule is enabled by default
	IsEnabledByDefault *bool `json:"IsEnabledByDefault,omitempty"`

	// A flag indicating whether the rule is hidden (from the UI)
	IsHidden *bool `json:"IsHidden,omitempty"`

	// A flag indicating whether the rule is in preview
	IsInPreview *bool `json:"IsInPreview,omitempty"`

	// The rule name
	Name *string `json:"Name,omitempty"`

	// A flag indicating whether email notifications are supported for detections for this rule
	SupportsEmailNotifications *bool `json:"SupportsEmailNotifications,omitempty"`
}

ComponentProactiveDetectionConfigurationRuleDefinitions - Static definitions of the ProactiveDetection configuration rule (same values for all components).

type ComponentProperties added in v0.2.0

type ComponentProperties struct {
	// REQUIRED; Type of application being monitored.
	ApplicationType *ApplicationType `json:"Application_Type,omitempty"`

	// Disable IP masking.
	DisableIPMasking *bool `json:"DisableIpMasking,omitempty"`

	// Disable Non-AAD based Auth.
	DisableLocalAuth *bool `json:"DisableLocalAuth,omitempty"`

	// Used by the Application Insights system to determine what kind of flow this component was created by. This is to be set
	// to 'Bluefield' when creating/updating a component via the REST API.
	FlowType *FlowType `json:"Flow_Type,omitempty"`

	// Force users to create their own storage account for profiler and debugger.
	ForceCustomerStorageForProfiler *bool `json:"ForceCustomerStorageForProfiler,omitempty"`

	// The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp.
	HockeyAppID *string `json:"HockeyAppId,omitempty"`

	// Purge data immediately after 30 days.
	ImmediatePurgeDataOn30Days *bool `json:"ImmediatePurgeDataOn30Days,omitempty"`

	// Indicates the flow of the ingestion.
	IngestionMode *IngestionMode `json:"IngestionMode,omitempty"`

	// The network access type for accessing Application Insights ingestion.
	PublicNetworkAccessForIngestion *PublicNetworkAccessType `json:"publicNetworkAccessForIngestion,omitempty"`

	// The network access type for accessing Application Insights query.
	PublicNetworkAccessForQuery *PublicNetworkAccessType `json:"publicNetworkAccessForQuery,omitempty"`

	// Describes what tool created this Application Insights component. Customers using this API should set this to the default
	// 'rest'.
	RequestSource *RequestSource `json:"Request_Source,omitempty"`

	// Retention period in days.
	RetentionInDays *int32 `json:"RetentionInDays,omitempty"`

	// Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry.
	SamplingPercentage *float64 `json:"SamplingPercentage,omitempty"`

	// Resource Id of the log analytics workspace which the data will be ingested to. This property is required to create an application
	// with this API version. Applications from older versions will not have
	// this property.
	WorkspaceResourceID *string `json:"WorkspaceResourceId,omitempty"`

	// READ-ONLY; Application Insights Unique ID for your Application.
	AppID *string `json:"AppId,omitempty" azure:"ro"`

	// READ-ONLY; The unique ID of your application. This field mirrors the 'Name' field and cannot be changed.
	ApplicationID *string `json:"ApplicationId,omitempty" azure:"ro"`

	// READ-ONLY; Application Insights component connection string.
	ConnectionString *string `json:"ConnectionString,omitempty" azure:"ro"`

	// READ-ONLY; Creation Date for the Application Insights component, in ISO 8601 format.
	CreationDate *time.Time `json:"CreationDate,omitempty" azure:"ro"`

	// READ-ONLY; Token used to authenticate communications with between Application Insights and HockeyApp.
	HockeyAppToken *string `json:"HockeyAppToken,omitempty" azure:"ro"`

	// READ-ONLY; Application Insights Instrumentation key. A read-only value that applications can use to identify the destination
	// for all telemetry sent to Azure Application Insights. This value will be supplied upon
	// construction of each new Application Insights component.
	InstrumentationKey *string `json:"InstrumentationKey,omitempty" azure:"ro"`

	// READ-ONLY; The date which the component got migrated to LA, in ISO 8601 format.
	LaMigrationDate *time.Time `json:"LaMigrationDate,omitempty" azure:"ro"`

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

	// READ-ONLY; List of linked private link scope resources.
	PrivateLinkScopedResources []*PrivateLinkScopedResource `json:"PrivateLinkScopedResources,omitempty" azure:"ro"`

	// READ-ONLY; Current state of this component: whether or not is has been provisioned within the resource group it is defined.
	// Users cannot change this value but are able to read from it. Values will include
	// Succeeded, Deploying, Canceled, and Failed.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Azure Tenant Id.
	TenantID *string `json:"TenantId,omitempty" azure:"ro"`
}

ComponentProperties - Properties that define an Application Insights component resource.

func (ComponentProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type ComponentProperties.

func (*ComponentProperties) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentProperties.

type ComponentPurgeBody

type ComponentPurgeBody struct {
	// REQUIRED; The set of columns and filters (queries) to run over them to purge the resulting data.
	Filters []*ComponentPurgeBodyFilters `json:"filters,omitempty"`

	// REQUIRED; Table from which to purge data.
	Table *string `json:"table,omitempty"`
}

ComponentPurgeBody - Describes the body of a purge request for an App Insights component

func (ComponentPurgeBody) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentPurgeBody.

type ComponentPurgeBodyFilters

type ComponentPurgeBodyFilters struct {
	// The column of the table over which the given query should run
	Column *string `json:"column,omitempty"`

	// When filtering over custom dimensions, this key will be used as the name of the custom dimension.
	Key *string `json:"key,omitempty"`

	// A query operator to evaluate over the provided column and value(s). Supported operators are ==, =~, in, in~, >, >=, <,
	// <=, between, and have the same behavior as they would in a KQL query.
	Operator *string `json:"operator,omitempty"`

	// the value for the operator to function over. This can be a number (e.g., > 100), a string (timestamp >= '2017-09-01') or
	// array of values.
	Value interface{} `json:"value,omitempty"`
}

ComponentPurgeBodyFilters - User-defined filters to return data which will be purged from the table.

type ComponentPurgeResponse

type ComponentPurgeResponse struct {
	// REQUIRED; Id to use when querying for status for a particular purge operation.
	OperationID *string `json:"operationId,omitempty"`
}

ComponentPurgeResponse - Response containing operationId for a specific purge action.

type ComponentPurgeStatusResponse

type ComponentPurgeStatusResponse struct {
	// REQUIRED; Status of the operation represented by the requested Id.
	Status *PurgeState `json:"status,omitempty"`
}

ComponentPurgeStatusResponse - Response containing status for a specific purge operation.

type ComponentQuotaStatus added in v0.2.0

type ComponentQuotaStatus struct {
	// READ-ONLY; The Application ID for the Application Insights component.
	AppID *string `json:"AppId,omitempty" azure:"ro"`

	// READ-ONLY; Date and time when the daily data volume cap will be reset, and data ingestion will resume.
	ExpirationTime *string `json:"ExpirationTime,omitempty" azure:"ro"`

	// READ-ONLY; The daily data volume cap is met, and data ingestion will be stopped.
	ShouldBeThrottled *bool `json:"ShouldBeThrottled,omitempty" azure:"ro"`
}

ComponentQuotaStatus - An Application Insights component daily data volume cap status

type ComponentQuotaStatusClient

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

ComponentQuotaStatusClient contains the methods for the ComponentQuotaStatus group. Don't use this type directly, use NewComponentQuotaStatusClient() instead.

func NewComponentQuotaStatusClient

func NewComponentQuotaStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentQuotaStatusClient, error)

NewComponentQuotaStatusClient creates a new instance of ComponentQuotaStatusClient 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 (*ComponentQuotaStatusClient) Get

Get - Returns daily data volume cap (quota) status for an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - ComponentQuotaStatusClientGetOptions contains the optional parameters for the ComponentQuotaStatusClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/QuotaStatusGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

type ComponentQuotaStatusClientGetOptions added in v0.2.0

type ComponentQuotaStatusClientGetOptions struct {
}

ComponentQuotaStatusClientGetOptions contains the optional parameters for the ComponentQuotaStatusClient.Get method.

type ComponentQuotaStatusClientGetResponse added in v0.2.0

type ComponentQuotaStatusClientGetResponse struct {
	ComponentQuotaStatus
}

ComponentQuotaStatusClientGetResponse contains the response from method ComponentQuotaStatusClient.Get.

type ComponentWebTestLocation added in v0.2.0

type ComponentWebTestLocation struct {
	// READ-ONLY; The display name of the web test location.
	DisplayName *string `json:"DisplayName,omitempty" azure:"ro"`

	// READ-ONLY; Internally defined geographic location tag.
	Tag *string `json:"Tag,omitempty" azure:"ro"`
}

ComponentWebTestLocation - Properties that define a web test location available to an Application Insights Component.

type ComponentsClient

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

ComponentsClient contains the methods for the Components group. Don't use this type directly, use NewComponentsClient() instead.

func NewComponentsClient

func NewComponentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentsClient, error)

NewComponentsClient creates a new instance of ComponentsClient 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 (*ComponentsClient) CreateOrUpdate

func (client *ComponentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, insightProperties Component, options *ComponentsClientCreateOrUpdateOptions) (ComponentsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates (or updates) an Application Insights component. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-02 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. insightProperties - Properties that need to be specified to create an Application Insights component. options - ComponentsClientCreateOrUpdateOptions contains the optional parameters for the ComponentsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsCreate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewComponentsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"my-resource-group",
		"my-component",
		armapplicationinsights.Component{
			Location: to.Ptr("South Central US"),
			Kind:     to.Ptr("web"),
			Properties: &armapplicationinsights.ComponentProperties{
				ApplicationType:     to.Ptr(armapplicationinsights.ApplicationTypeWeb),
				FlowType:            to.Ptr(armapplicationinsights.FlowTypeBluefield),
				RequestSource:       to.Ptr(armapplicationinsights.RequestSourceRest),
				WorkspaceResourceID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ComponentsClient) Delete

func (client *ComponentsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *ComponentsClientDeleteOptions) (ComponentsClientDeleteResponse, error)

Delete - Deletes an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-02 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - ComponentsClientDeleteOptions contains the optional parameters for the ComponentsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewComponentsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"my-resource-group",
		"my-component",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ComponentsClient) Get

func (client *ComponentsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ComponentsClientGetOptions) (ComponentsClientGetResponse, error)

Get - Returns an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-02 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - ComponentsClientGetOptions contains the optional parameters for the ComponentsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

func (*ComponentsClient) GetPurgeStatus

func (client *ComponentsClient) GetPurgeStatus(ctx context.Context, resourceGroupName string, resourceName string, purgeID string, options *ComponentsClientGetPurgeStatusOptions) (ComponentsClientGetPurgeStatusResponse, error)

GetPurgeStatus - Get status for an ongoing purge operation. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-02 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. purgeID - In a purge status request, this is the Id of the operation the status of which is returned. options - ComponentsClientGetPurgeStatusOptions contains the optional parameters for the ComponentsClient.GetPurgeStatus method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurgeStatus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewComponentsClient("00000000-0000-0000-0000-00000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetPurgeStatus(ctx,
		"OIAutoRest5123",
		"aztest5048",
		"purge-970318e7-b859-4edb-8903-83b1b54d0b74",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ComponentsClient) NewListByResourceGroupPager added in v0.4.0

func (client *ComponentsClient) NewListByResourceGroupPager(resourceGroupName string, options *ComponentsClientListByResourceGroupOptions) *runtime.Pager[ComponentsClientListByResourceGroupResponse]

NewListByResourceGroupPager - Gets a list of Application Insights components within a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-02 resourceGroupName - The name of the resource group. The name is case insensitive. options - ComponentsClientListByResourceGroupOptions contains the optional parameters for the ComponentsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

func (*ComponentsClient) NewListPager added in v0.4.0

NewListPager - Gets a list of all Application Insights components within a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-02 options - ComponentsClientListOptions contains the optional parameters for the ComponentsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

func (*ComponentsClient) Purge

func (client *ComponentsClient) Purge(ctx context.Context, resourceGroupName string, resourceName string, body ComponentPurgeBody, options *ComponentsClientPurgeOptions) (ComponentsClientPurgeResponse, error)

Purge - Purges data in an Application Insights component by a set of user-defined filters. In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the execution of purge requests by sending a single command whose predicate includes all user identities that require purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge request to verify that the results are expected. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-02 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. body - Describes the body of a request to purge data in a single table of an Application Insights component options - ComponentsClientPurgeOptions contains the optional parameters for the ComponentsClient.Purge method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurge.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewComponentsClient("00000000-0000-0000-0000-00000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Purge(ctx,
		"OIAutoRest5123",
		"aztest5048",
		armapplicationinsights.ComponentPurgeBody{
			Filters: []*armapplicationinsights.ComponentPurgeBodyFilters{
				{
					Column:   to.Ptr("TimeGenerated"),
					Operator: to.Ptr(">"),
					Value:    "2017-09-01T00:00:00",
				}},
			Table: to.Ptr("Heartbeat"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ComponentsClient) UpdateTags

func (client *ComponentsClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, componentTags TagsResource, options *ComponentsClientUpdateTagsOptions) (ComponentsClientUpdateTagsResponse, error)

UpdateTags - Updates an existing component's tags. To update other fields use the CreateOrUpdate method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-02 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. componentTags - Updated tag information to set into the component instance. options - ComponentsClientUpdateTagsOptions contains the optional parameters for the ComponentsClient.UpdateTags method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsUpdateTagsOnly.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewComponentsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.UpdateTags(ctx,
		"my-resource-group",
		"my-component",
		armapplicationinsights.TagsResource{
			Tags: map[string]*string{
				"ApplicationGatewayType": to.Ptr("Internal-Only"),
				"BillingEntity":          to.Ptr("Self"),
				"Color":                  to.Ptr("AzureBlue"),
				"CustomField_01":         to.Ptr("Custom text in some random field named randomly"),
				"NodeType":               to.Ptr("Edge"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ComponentsClientCreateOrUpdateOptions added in v0.2.0

type ComponentsClientCreateOrUpdateOptions struct {
}

ComponentsClientCreateOrUpdateOptions contains the optional parameters for the ComponentsClient.CreateOrUpdate method.

type ComponentsClientCreateOrUpdateResponse added in v0.2.0

type ComponentsClientCreateOrUpdateResponse struct {
	Component
}

ComponentsClientCreateOrUpdateResponse contains the response from method ComponentsClient.CreateOrUpdate.

type ComponentsClientDeleteOptions added in v0.2.0

type ComponentsClientDeleteOptions struct {
}

ComponentsClientDeleteOptions contains the optional parameters for the ComponentsClient.Delete method.

type ComponentsClientDeleteResponse added in v0.2.0

type ComponentsClientDeleteResponse struct {
}

ComponentsClientDeleteResponse contains the response from method ComponentsClient.Delete.

type ComponentsClientGetOptions added in v0.2.0

type ComponentsClientGetOptions struct {
}

ComponentsClientGetOptions contains the optional parameters for the ComponentsClient.Get method.

type ComponentsClientGetPurgeStatusOptions added in v0.2.0

type ComponentsClientGetPurgeStatusOptions struct {
}

ComponentsClientGetPurgeStatusOptions contains the optional parameters for the ComponentsClient.GetPurgeStatus method.

type ComponentsClientGetPurgeStatusResponse added in v0.2.0

type ComponentsClientGetPurgeStatusResponse struct {
	ComponentPurgeStatusResponse
}

ComponentsClientGetPurgeStatusResponse contains the response from method ComponentsClient.GetPurgeStatus.

type ComponentsClientGetResponse added in v0.2.0

type ComponentsClientGetResponse struct {
	Component
}

ComponentsClientGetResponse contains the response from method ComponentsClient.Get.

type ComponentsClientListByResourceGroupOptions added in v0.2.0

type ComponentsClientListByResourceGroupOptions struct {
}

ComponentsClientListByResourceGroupOptions contains the optional parameters for the ComponentsClient.ListByResourceGroup method.

type ComponentsClientListByResourceGroupResponse added in v0.2.0

type ComponentsClientListByResourceGroupResponse struct {
	ComponentListResult
}

ComponentsClientListByResourceGroupResponse contains the response from method ComponentsClient.ListByResourceGroup.

type ComponentsClientListOptions added in v0.2.0

type ComponentsClientListOptions struct {
}

ComponentsClientListOptions contains the optional parameters for the ComponentsClient.List method.

type ComponentsClientListResponse added in v0.2.0

type ComponentsClientListResponse struct {
	ComponentListResult
}

ComponentsClientListResponse contains the response from method ComponentsClient.List.

type ComponentsClientPurgeOptions added in v0.2.0

type ComponentsClientPurgeOptions struct {
}

ComponentsClientPurgeOptions contains the optional parameters for the ComponentsClient.Purge method.

type ComponentsClientPurgeResponse added in v0.2.0

type ComponentsClientPurgeResponse struct {
	ComponentPurgeResponse
}

ComponentsClientPurgeResponse contains the response from method ComponentsClient.Purge.

type ComponentsClientUpdateTagsOptions added in v0.2.0

type ComponentsClientUpdateTagsOptions struct {
}

ComponentsClientUpdateTagsOptions contains the optional parameters for the ComponentsClient.UpdateTags method.

type ComponentsClientUpdateTagsResponse added in v0.2.0

type ComponentsClientUpdateTagsResponse struct {
	Component
}

ComponentsClientUpdateTagsResponse contains the response from method ComponentsClient.UpdateTags.

type ComponentsResource

type ComponentsResource struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

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

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

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

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

ComponentsResource - An azure resource object

func (ComponentsResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentsResource.

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 ErrorDefinition

type ErrorDefinition struct {
	// READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; Internal error details.
	Innererror interface{} `json:"innererror,omitempty" azure:"ro"`

	// READ-ONLY; Description of the error.
	Message *string `json:"message,omitempty" azure:"ro"`
}

ErrorDefinition - Error definition.

type ErrorResponse

type ErrorResponse struct {
	// Error code.
	Code *string `json:"code,omitempty"`

	// Error message indicating why the operation failed.
	Message *string `json:"message,omitempty"`
}

ErrorResponse - Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message.

type ErrorResponseComponents added in v0.3.0

type ErrorResponseComponents struct {
	// Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error
	// message.
	Error *ErrorResponseComponentsError `json:"error,omitempty"`
}

type ErrorResponseComponentsError added in v0.3.0

type ErrorResponseComponentsError struct {
	// READ-ONLY; Error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; Error message indicating why the operation failed.
	Message *string `json:"message,omitempty" azure:"ro"`
}

ErrorResponseComponentsError - Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message.

type ErrorResponseLinkedStorage

type ErrorResponseLinkedStorage struct {
	// Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error
	// message.
	Error *ErrorResponseLinkedStorageError `json:"error,omitempty"`
}

type ErrorResponseLinkedStorageError

type ErrorResponseLinkedStorageError struct {
	// READ-ONLY; Error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; Error message indicating why the operation failed.
	Message *string `json:"message,omitempty" azure:"ro"`
}

ErrorResponseLinkedStorageError - Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message.

type ExportConfigurationsClient

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

ExportConfigurationsClient contains the methods for the ExportConfigurations group. Don't use this type directly, use NewExportConfigurationsClient() instead.

func NewExportConfigurationsClient

func NewExportConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExportConfigurationsClient, error)

NewExportConfigurationsClient creates a new instance of ExportConfigurationsClient 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 (*ExportConfigurationsClient) Create

Create - Create a Continuous Export configuration of an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. exportProperties - Properties that need to be specified to create a Continuous Export configuration of a Application Insights component. options - ExportConfigurationsClientCreateOptions contains the optional parameters for the ExportConfigurationsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsPost.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewExportConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx,
		"my-resource-group",
		"my-component",
		armapplicationinsights.ComponentExportRequest{
			DestinationAccountID:             to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"),
			DestinationAddress:               to.Ptr("https://mystorageblob.blob.core.windows.net/testexport?sv=2015-04-05&sr=c&sig=token"),
			DestinationStorageLocationID:     to.Ptr("eastus"),
			DestinationStorageSubscriptionID: to.Ptr("subid"),
			DestinationType:                  to.Ptr("Blob"),
			IsEnabled:                        to.Ptr("true"),
			NotificationQueueEnabled:         to.Ptr("false"),
			NotificationQueueURI:             to.Ptr(""),
			RecordTypes:                      to.Ptr("Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd, PerformanceCounters, Availability"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ExportConfigurationsClient) Delete

Delete - Delete a Continuous Export configuration of an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. exportID - The Continuous Export configuration ID. This is unique within a Application Insights component. options - ExportConfigurationsClientDeleteOptions contains the optional parameters for the ExportConfigurationsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewExportConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Delete(ctx,
		"my-resource-group",
		"my-component",
		"uGOoki0jQsyEs3IdQ83Q4QsNr4=",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ExportConfigurationsClient) Get

Get - Get the Continuous Export configuration for this export id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. exportID - The Continuous Export configuration ID. This is unique within a Application Insights component. options - ExportConfigurationsClientGetOptions contains the optional parameters for the ExportConfigurationsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewExportConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"my-resource-group",
		"my-component",
		"uGOoki0jQsyEs3IdQ83Q4QsNr4=",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ExportConfigurationsClient) List

List - Gets a list of Continuous Export configuration of an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - ExportConfigurationsClientListOptions contains the optional parameters for the ExportConfigurationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewExportConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"my-resource-group",
		"my-component",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ExportConfigurationsClient) Update

func (client *ExportConfigurationsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, exportID string, exportProperties ComponentExportRequest, options *ExportConfigurationsClientUpdateOptions) (ExportConfigurationsClientUpdateResponse, error)

Update - Update the Continuous Export configuration for this export id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. exportID - The Continuous Export configuration ID. This is unique within a Application Insights component. exportProperties - Properties that need to be specified to update the Continuous Export configuration. options - ExportConfigurationsClientUpdateOptions contains the optional parameters for the ExportConfigurationsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationUpdate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewExportConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"my-resource-group",
		"my-component",
		"uGOoki0jQsyEs3IdQ83Q4QsNr4=",
		armapplicationinsights.ComponentExportRequest{
			DestinationAccountID:             to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"),
			DestinationAddress:               to.Ptr("https://mystorageblob.blob.core.windows.net/fchentest?sv=2015-04-05&sr=c&sig=token"),
			DestinationStorageLocationID:     to.Ptr("eastus"),
			DestinationStorageSubscriptionID: to.Ptr("subid"),
			DestinationType:                  to.Ptr("Blob"),
			IsEnabled:                        to.Ptr("true"),
			NotificationQueueEnabled:         to.Ptr("false"),
			NotificationQueueURI:             to.Ptr(""),
			RecordTypes:                      to.Ptr("Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd, PerformanceCounters, Availability"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ExportConfigurationsClientCreateOptions added in v0.2.0

type ExportConfigurationsClientCreateOptions struct {
}

ExportConfigurationsClientCreateOptions contains the optional parameters for the ExportConfigurationsClient.Create method.

type ExportConfigurationsClientCreateResponse added in v0.2.0

type ExportConfigurationsClientCreateResponse struct {
	// A list of Continuous Export configurations.
	ComponentExportConfigurationArray []*ComponentExportConfiguration
}

ExportConfigurationsClientCreateResponse contains the response from method ExportConfigurationsClient.Create.

type ExportConfigurationsClientDeleteOptions added in v0.2.0

type ExportConfigurationsClientDeleteOptions struct {
}

ExportConfigurationsClientDeleteOptions contains the optional parameters for the ExportConfigurationsClient.Delete method.

type ExportConfigurationsClientDeleteResponse added in v0.2.0

type ExportConfigurationsClientDeleteResponse struct {
	ComponentExportConfiguration
}

ExportConfigurationsClientDeleteResponse contains the response from method ExportConfigurationsClient.Delete.

type ExportConfigurationsClientGetOptions added in v0.2.0

type ExportConfigurationsClientGetOptions struct {
}

ExportConfigurationsClientGetOptions contains the optional parameters for the ExportConfigurationsClient.Get method.

type ExportConfigurationsClientGetResponse added in v0.2.0

type ExportConfigurationsClientGetResponse struct {
	ComponentExportConfiguration
}

ExportConfigurationsClientGetResponse contains the response from method ExportConfigurationsClient.Get.

type ExportConfigurationsClientListOptions added in v0.2.0

type ExportConfigurationsClientListOptions struct {
}

ExportConfigurationsClientListOptions contains the optional parameters for the ExportConfigurationsClient.List method.

type ExportConfigurationsClientListResponse added in v0.2.0

type ExportConfigurationsClientListResponse struct {
	// A list of Continuous Export configurations.
	ComponentExportConfigurationArray []*ComponentExportConfiguration
}

ExportConfigurationsClientListResponse contains the response from method ExportConfigurationsClient.List.

type ExportConfigurationsClientUpdateOptions added in v0.2.0

type ExportConfigurationsClientUpdateOptions struct {
}

ExportConfigurationsClientUpdateOptions contains the optional parameters for the ExportConfigurationsClient.Update method.

type ExportConfigurationsClientUpdateResponse added in v0.2.0

type ExportConfigurationsClientUpdateResponse struct {
	ComponentExportConfiguration
}

ExportConfigurationsClientUpdateResponse contains the response from method ExportConfigurationsClient.Update.

type FavoriteSourceType

type FavoriteSourceType string
const (
	FavoriteSourceTypeEvents       FavoriteSourceType = "events"
	FavoriteSourceTypeFunnel       FavoriteSourceType = "funnel"
	FavoriteSourceTypeImpact       FavoriteSourceType = "impact"
	FavoriteSourceTypeNotebook     FavoriteSourceType = "notebook"
	FavoriteSourceTypeRetention    FavoriteSourceType = "retention"
	FavoriteSourceTypeSegmentation FavoriteSourceType = "segmentation"
	FavoriteSourceTypeSessions     FavoriteSourceType = "sessions"
	FavoriteSourceTypeUserflows    FavoriteSourceType = "userflows"
)

func PossibleFavoriteSourceTypeValues

func PossibleFavoriteSourceTypeValues() []FavoriteSourceType

PossibleFavoriteSourceTypeValues returns the possible values for the FavoriteSourceType const type.

type FavoriteType

type FavoriteType string

FavoriteType - Enum indicating if this favorite definition is owned by a specific user or is shared between all users with access to the Application Insights component.

const (
	FavoriteTypeShared FavoriteType = "shared"
	FavoriteTypeUser   FavoriteType = "user"
)

func PossibleFavoriteTypeValues

func PossibleFavoriteTypeValues() []FavoriteType

PossibleFavoriteTypeValues returns the possible values for the FavoriteType const type.

type FavoritesClient

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

FavoritesClient contains the methods for the Favorites group. Don't use this type directly, use NewFavoritesClient() instead.

func NewFavoritesClient

func NewFavoritesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FavoritesClient, error)

NewFavoritesClient creates a new instance of FavoritesClient 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 (*FavoritesClient) Add

func (client *FavoritesClient) Add(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ComponentFavorite, options *FavoritesClientAddOptions) (FavoritesClientAddResponse, error)

Add - Adds a new favorites to an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. favoriteID - The Id of a specific favorite defined in the Application Insights component favoriteProperties - Properties that need to be specified to create a new favorite and add it to an Application Insights component. options - FavoritesClientAddOptions contains the optional parameters for the FavoritesClient.Add method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteAdd.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewFavoritesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Add(ctx,
		"my-resource-group",
		"my-ai-component",
		"deadb33f-8bee-4d3b-a059-9be8dac93960",
		armapplicationinsights.ComponentFavorite{
			Config:                  to.Ptr("{\"MEDataModelRawJSON\":\"{\\n  \\\"version\\\": \\\"1.4.1\\\",\\n  \\\"isCustomDataModel\\\": true,\\n  \\\"items\\\": [\\n    {\\n      \\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\n      \\\"chartType\\\": \\\"Area\\\",\\n      \\\"chartHeight\\\": 4,\\n      \\\"metrics\\\": [\\n        {\\n          \\\"id\\\": \\\"preview/requests/count\\\",\\n          \\\"metricAggregation\\\": \\\"Sum\\\",\\n          \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n        }\\n      ],\\n      \\\"priorPeriod\\\": false,\\n      \\\"clickAction\\\": {\\n        \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n      },\\n      \\\"horizontalBars\\\": true,\\n      \\\"showOther\\\": true,\\n      \\\"aggregation\\\": \\\"Sum\\\",\\n      \\\"percentage\\\": false,\\n      \\\"palette\\\": \\\"fail\\\",\\n      \\\"yAxisOption\\\": 0,\\n      \\\"title\\\": \\\"\\\"\\n    },\\n    {\\n      \\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\n      \\\"chartType\\\": \\\"Area\\\",\\n      \\\"chartHeight\\\": 2,\\n      \\\"metrics\\\": [\\n        {\\n          \\\"id\\\": \\\"preview/requests/duration\\\",\\n          \\\"metricAggregation\\\": \\\"Avg\\\",\\n          \\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"\\n        }\\n      ],\\n      \\\"priorPeriod\\\": false,\\n      \\\"clickAction\\\": {\\n        \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n      },\\n      \\\"horizontalBars\\\": true,\\n      \\\"showOther\\\": true,\\n      \\\"aggregation\\\": \\\"Avg\\\",\\n      \\\"percentage\\\": false,\\n      \\\"palette\\\": \\\"greenHues\\\",\\n      \\\"yAxisOption\\\": 0,\\n      \\\"title\\\": \\\"\\\"\\n    },\\n    {\\n      \\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\n      \\\"chartType\\\": \\\"Bar\\\",\\n      \\\"chartHeight\\\": 4,\\n      \\\"metrics\\\": [\\n        {\\n          \\\"id\\\": \\\"preview/requests/duration\\\",\\n          \\\"metricAggregation\\\": \\\"Avg\\\",\\n          \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n        }\\n      ],\\n      \\\"priorPeriod\\\": false,\\n      \\\"clickAction\\\": {\\n        \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n      },\\n      \\\"horizontalBars\\\": true,\\n      \\\"showOther\\\": true,\\n      \\\"aggregation\\\": \\\"Avg\\\",\\n      \\\"percentage\\\": false,\\n      \\\"palette\\\": \\\"magentaHues\\\",\\n      \\\"yAxisOption\\\": 0,\\n      \\\"title\\\": \\\"\\\"\\n    },\\n    {\\n      \\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\n      \\\"grouping\\\": {\\n        \\\"kind\\\": \\\"ByDimension\\\",\\n        \\\"dimension\\\": \\\"context.application.version\\\"\\n      },\\n      \\\"chartType\\\": \\\"Grid\\\",\\n      \\\"chartHeight\\\": 1,\\n      \\\"metrics\\\": [\\n        {\\n          \\\"id\\\": \\\"basicException.count\\\",\\n          \\\"metricAggregation\\\": \\\"Sum\\\",\\n          \\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"\\n        },\\n        {\\n          \\\"id\\\": \\\"requestFailed.count\\\",\\n          \\\"metricAggregation\\\": \\\"Sum\\\",\\n          \\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"\\n        }\\n      ],\\n      \\\"priorPeriod\\\": true,\\n      \\\"clickAction\\\": {\\n        \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n      },\\n      \\\"horizontalBars\\\": true,\\n      \\\"showOther\\\": true,\\n      \\\"percentage\\\": false,\\n      \\\"palette\\\": \\\"blueHues\\\",\\n      \\\"yAxisOption\\\": 0,\\n      \\\"title\\\": \\\"\\\"\\n    }\\n  ],\\n  \\\"currentFilter\\\": {\\n    \\\"eventTypes\\\": [\\n      1,\\n      2\\n    ],\\n    \\\"typeFacets\\\": {},\\n    \\\"isPermissive\\\": false\\n  },\\n  \\\"timeContext\\\": {\\n    \\\"durationMs\\\": 75600000,\\n    \\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\n    \\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\n    \\\"isInitialTime\\\": false,\\n    \\\"grain\\\": 1,\\n    \\\"useDashboardTimeRange\\\": false\\n  },\\n  \\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\n  \\\"timeSource\\\": 0\\n}\"}"),
			FavoriteID:              to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"),
			FavoriteType:            to.Ptr(armapplicationinsights.FavoriteTypeShared),
			IsGeneratedFromTemplate: to.Ptr(false),
			Name:                    to.Ptr("Blah Blah Blah"),
			Tags: []*string{
				to.Ptr("TagSample01"),
				to.Ptr("TagSample02")},
			Version: to.Ptr("ME"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*FavoritesClient) Delete

func (client *FavoritesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, options *FavoritesClientDeleteOptions) (FavoritesClientDeleteResponse, error)

Delete - Remove a favorite that is associated to an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. favoriteID - The Id of a specific favorite defined in the Application Insights component options - FavoritesClientDeleteOptions contains the optional parameters for the FavoritesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewFavoritesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"my-resource-group",
		"my-ai-component",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*FavoritesClient) Get

func (client *FavoritesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, options *FavoritesClientGetOptions) (FavoritesClientGetResponse, error)

Get - Get a single favorite by its FavoriteId, defined within an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. favoriteID - The Id of a specific favorite defined in the Application Insights component options - FavoritesClientGetOptions contains the optional parameters for the FavoritesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewFavoritesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"my-resource-group",
		"my-ai-component",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*FavoritesClient) List

func (client *FavoritesClient) List(ctx context.Context, resourceGroupName string, resourceName string, options *FavoritesClientListOptions) (FavoritesClientListResponse, error)

List - Gets a list of favorites defined within an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - FavoritesClientListOptions contains the optional parameters for the FavoritesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoritesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewFavoritesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"my-resource-group",
		"my-ai-component",
		&armapplicationinsights.FavoritesClientListOptions{FavoriteType: nil,
			SourceType:      nil,
			CanFetchContent: nil,
			Tags:            []string{},
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*FavoritesClient) Update

func (client *FavoritesClient) Update(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ComponentFavorite, options *FavoritesClientUpdateOptions) (FavoritesClientUpdateResponse, error)

Update - Updates a favorite that has already been added to an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. favoriteID - The Id of a specific favorite defined in the Application Insights component favoriteProperties - Properties that need to be specified to update the existing favorite. options - FavoritesClientUpdateOptions contains the optional parameters for the FavoritesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteUpdate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewFavoritesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"my-resource-group",
		"my-ai-component",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		armapplicationinsights.ComponentFavorite{
			Config:                  to.Ptr("{\"MEDataModelRawJSON\":\"{\\\"version\\\": \\\"1.4.1\\\",\\\"isCustomDataModel\\\": true,\\\"items\\\": [{\\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\\"chartType\\\": \\\"Area\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\": \\\"preview/requests/count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Sum\\\",\\\"percentage\\\": false,\\\"palette\\\": \\\"fail\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"},{\\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\\"chartType\\\": \\\"Area\\\",\\\"chartHeight\\\": 2,\\\"metrics\\\": [{\\\"id\\\": \\\"preview/requests/duration\\\",\\\"metricAggregation\\\": \\\"Avg\\\",\\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\": false,\\\"palette\\\": \\\"greenHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"},{\\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\\"chartType\\\": \\\"Bar\\\",\\\"chartHeight\\\": 4,\\\"metrics\\\": [{\\\"id\\\": \\\"preview/requests/duration\\\",\\\"metricAggregation\\\": \\\"Avg\\\",\\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"}],\\\"priorPeriod\\\": false,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"aggregation\\\": \\\"Avg\\\",\\\"percentage\\\": false,\\\"palette\\\": \\\"magentaHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"},{\\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\\"grouping\\\": {\\\"kind\\\": \\\"ByDimension\\\",\\\"dimension\\\": \\\"context.application.version\\\"},\\\"chartType\\\": \\\"Grid\\\",\\\"chartHeight\\\": 1,\\\"metrics\\\": [{\\\"id\\\": \\\"basicException.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"},{\\\"id\\\": \\\"requestFailed.count\\\",\\\"metricAggregation\\\": \\\"Sum\\\",\\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"}],\\\"priorPeriod\\\": true,\\\"clickAction\\\": {\\\"defaultBlade\\\": \\\"SearchBlade\\\"},\\\"horizontalBars\\\": true,\\\"showOther\\\": true,\\\"percentage\\\": false,\\\"palette\\\": \\\"blueHues\\\",\\\"yAxisOption\\\": 0,\\\"title\\\": \\\"\\\"}],\\\"currentFilter\\\": {\\\"eventTypes\\\": [1,2],\\\"typeFacets\\\": {},\\\"isPermissive\\\": false},\\\"timeContext\\\": {\\\"durationMs\\\": 75600000,\\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\\"isInitialTime\\\": false,\\\"grain\\\": 1,\\\"useDashboardTimeRange\\\": false},\\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\\"timeSource\\\": 0}\"}"),
			FavoriteID:              to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
			FavoriteType:            to.Ptr(armapplicationinsights.FavoriteTypeShared),
			IsGeneratedFromTemplate: to.Ptr(false),
			Name:                    to.Ptr("Derek Changed This"),
			Tags: []*string{
				to.Ptr("TagSample01"),
				to.Ptr("TagSample02"),
				to.Ptr("TagSample03")},
			TimeModified: to.Ptr("2018-02-02T18:39:11.6569686Z"),
			Version:      to.Ptr("ME"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type FavoritesClientAddOptions added in v0.2.0

type FavoritesClientAddOptions struct {
}

FavoritesClientAddOptions contains the optional parameters for the FavoritesClient.Add method.

type FavoritesClientAddResponse added in v0.2.0

type FavoritesClientAddResponse struct {
	ComponentFavorite
}

FavoritesClientAddResponse contains the response from method FavoritesClient.Add.

type FavoritesClientDeleteOptions added in v0.2.0

type FavoritesClientDeleteOptions struct {
}

FavoritesClientDeleteOptions contains the optional parameters for the FavoritesClient.Delete method.

type FavoritesClientDeleteResponse added in v0.2.0

type FavoritesClientDeleteResponse struct {
}

FavoritesClientDeleteResponse contains the response from method FavoritesClient.Delete.

type FavoritesClientGetOptions added in v0.2.0

type FavoritesClientGetOptions struct {
}

FavoritesClientGetOptions contains the optional parameters for the FavoritesClient.Get method.

type FavoritesClientGetResponse added in v0.2.0

type FavoritesClientGetResponse struct {
	ComponentFavorite
}

FavoritesClientGetResponse contains the response from method FavoritesClient.Get.

type FavoritesClientListOptions added in v0.2.0

type FavoritesClientListOptions struct {
	// Flag indicating whether or not to return the full content for each applicable favorite. If false, only return summary content
	// for favorites.
	CanFetchContent *bool
	// The type of favorite. Value can be either shared or user.
	FavoriteType *FavoriteType
	// Source type of favorite to return. When left out, the source type defaults to 'other' (not present in this enum).
	SourceType *FavoriteSourceType
	// Tags that must be present on each favorite returned.
	Tags []string
}

FavoritesClientListOptions contains the optional parameters for the FavoritesClient.List method.

type FavoritesClientListResponse added in v0.2.0

type FavoritesClientListResponse struct {
	// Array of ApplicationInsightsComponentFavorite
	ComponentFavoriteArray []*ComponentFavorite
}

FavoritesClientListResponse contains the response from method FavoritesClient.List.

type FavoritesClientUpdateOptions added in v0.2.0

type FavoritesClientUpdateOptions struct {
}

FavoritesClientUpdateOptions contains the optional parameters for the FavoritesClient.Update method.

type FavoritesClientUpdateResponse added in v0.2.0

type FavoritesClientUpdateResponse struct {
	ComponentFavorite
}

FavoritesClientUpdateResponse contains the response from method FavoritesClient.Update.

type FlowType

type FlowType string

FlowType - Used by the Application Insights system to determine what kind of flow this component was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API.

const (
	FlowTypeBluefield FlowType = "Bluefield"
)

func PossibleFlowTypeValues

func PossibleFlowTypeValues() []FlowType

PossibleFlowTypeValues returns the possible values for the FlowType const type.

type IngestionMode

type IngestionMode string

IngestionMode - Indicates the flow of the ingestion.

const (
	IngestionModeApplicationInsights                       IngestionMode = "ApplicationInsights"
	IngestionModeApplicationInsightsWithDiagnosticSettings IngestionMode = "ApplicationInsightsWithDiagnosticSettings"
	IngestionModeLogAnalytics                              IngestionMode = "LogAnalytics"
)

func PossibleIngestionModeValues

func PossibleIngestionModeValues() []IngestionMode

PossibleIngestionModeValues returns the possible values for the IngestionMode const type.

type InnerError

type InnerError struct {
	// Provides correlation for request
	Diagnosticcontext *string `json:"diagnosticcontext,omitempty"`

	// Request time
	Time *time.Time `json:"time,omitempty"`
}

InnerError - Inner error

func (*InnerError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type InnerError.

type InnerErrorTrace

type InnerErrorTrace struct {
	// READ-ONLY; detailed error trace
	Trace []*string `json:"trace,omitempty" azure:"ro"`
}

InnerErrorTrace - Error details

type ItemScope

type ItemScope string

ItemScope - Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component.

const (
	ItemScopeShared ItemScope = "shared"
	ItemScopeUser   ItemScope = "user"
)

func PossibleItemScopeValues

func PossibleItemScopeValues() []ItemScope

PossibleItemScopeValues returns the possible values for the ItemScope const type.

type ItemScopePath

type ItemScopePath string
const (
	ItemScopePathAnalyticsItems   ItemScopePath = "analyticsItems"
	ItemScopePathMyanalyticsItems ItemScopePath = "myanalyticsItems"
)

func PossibleItemScopePathValues

func PossibleItemScopePathValues() []ItemScopePath

PossibleItemScopePathValues returns the possible values for the ItemScopePath const type.

type ItemType

type ItemType string

ItemType - Enum indicating the type of the Analytics item.

const (
	ItemTypeFunction ItemType = "function"
	ItemTypeNone     ItemType = "none"
	ItemTypeQuery    ItemType = "query"
	ItemTypeRecent   ItemType = "recent"
)

func PossibleItemTypeValues

func PossibleItemTypeValues() []ItemType

PossibleItemTypeValues returns the possible values for the ItemType const type.

type ItemTypeParameter

type ItemTypeParameter string
const (
	ItemTypeParameterFolder   ItemTypeParameter = "folder"
	ItemTypeParameterFunction ItemTypeParameter = "function"
	ItemTypeParameterNone     ItemTypeParameter = "none"
	ItemTypeParameterQuery    ItemTypeParameter = "query"
	ItemTypeParameterRecent   ItemTypeParameter = "recent"
)

func PossibleItemTypeParameterValues

func PossibleItemTypeParameterValues() []ItemTypeParameter

PossibleItemTypeParameterValues returns the possible values for the ItemTypeParameter const type.

type Kind

type Kind string

Kind - The kind of workbook. Choices are user and shared.

const (
	KindShared Kind = "shared"
	KindUser   Kind = "user"
)

func PossibleKindValues

func PossibleKindValues() []Kind

PossibleKindValues returns the possible values for the Kind const type.

type LinkedStorageAccountsProperties

type LinkedStorageAccountsProperties struct {
	// Linked storage account resource ID
	LinkedStorageAccount *string `json:"linkedStorageAccount,omitempty"`
}

LinkedStorageAccountsProperties - An Application Insights component linked storage account

type LiveTokenClient

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

LiveTokenClient contains the methods for the LiveToken group. Don't use this type directly, use NewLiveTokenClient() instead.

func NewLiveTokenClient

func NewLiveTokenClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*LiveTokenClient, error)

NewLiveTokenClient creates a new instance of LiveTokenClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*LiveTokenClient) Get

Get - Gets an access token for live metrics stream data. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-10-14 resourceURI - The identifier of the resource. options - LiveTokenClientGetOptions contains the optional parameters for the LiveTokenClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/examples/LiveTokenGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewLiveTokenClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/FabrikamFiberApp/providers/microsoft.insights/components/CustomAvailabilityTest/providers/microsoft.insights/generatelivetoken",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type LiveTokenClientGetOptions added in v0.2.0

type LiveTokenClientGetOptions struct {
}

LiveTokenClientGetOptions contains the optional parameters for the LiveTokenClient.Get method.

type LiveTokenClientGetResponse added in v0.2.0

type LiveTokenClientGetResponse struct {
	LiveTokenResponse
}

LiveTokenClientGetResponse contains the response from method LiveTokenClient.Get.

type LiveTokenResponse

type LiveTokenResponse struct {
	// READ-ONLY; JWT token for accessing live metrics stream data.
	LiveToken *string `json:"liveToken,omitempty" azure:"ro"`
}

LiveTokenResponse - The response to a live token query.

type ManagedServiceIdentity

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

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

	// READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned
	// identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

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.

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 MyWorkbook

type MyWorkbook struct {
	// Resource etag
	Etag map[string]*string `json:"etag,omitempty"`

	// Azure resource Id
	ID *string `json:"id,omitempty"`

	// Identity used for BYOS
	Identity *MyWorkbookManagedIdentity `json:"identity,omitempty"`

	// The kind of workbook. Choices are user and shared.
	Kind *Kind `json:"kind,omitempty"`

	// Resource location
	Location *string `json:"location,omitempty"`

	// Azure resource name
	Name *string `json:"name,omitempty"`

	// Metadata describing a workbook for an Azure resource.
	Properties *MyWorkbookProperties `json:"properties,omitempty"`

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

	// Azure resource type
	Type *string `json:"type,omitempty"`

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

MyWorkbook - An Application Insights private workbook definition.

func (MyWorkbook) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MyWorkbook.

type MyWorkbookError

type MyWorkbookError struct {
	// The error details.
	Error *ErrorDefinition `json:"error,omitempty"`
}

MyWorkbookError - Error response.

type MyWorkbookManagedIdentity

type MyWorkbookManagedIdentity struct {
	// The identity type.
	Type *MyWorkbookManagedIdentityType `json:"type,omitempty"`

	// Customer Managed Identity
	UserAssignedIdentities *MyWorkbookUserAssignedIdentities `json:"userAssignedIdentities,omitempty"`
}

MyWorkbookManagedIdentity - Customer Managed Identity

type MyWorkbookManagedIdentityType

type MyWorkbookManagedIdentityType string

MyWorkbookManagedIdentityType - The identity type.

const (
	MyWorkbookManagedIdentityTypeNone         MyWorkbookManagedIdentityType = "None"
	MyWorkbookManagedIdentityTypeUserAssigned MyWorkbookManagedIdentityType = "UserAssigned"
)

func PossibleMyWorkbookManagedIdentityTypeValues

func PossibleMyWorkbookManagedIdentityTypeValues() []MyWorkbookManagedIdentityType

PossibleMyWorkbookManagedIdentityTypeValues returns the possible values for the MyWorkbookManagedIdentityType const type.

type MyWorkbookProperties

type MyWorkbookProperties struct {
	// REQUIRED; Workbook category, as defined by the user at creation time.
	Category *string `json:"category,omitempty"`

	// REQUIRED; The user-defined name of the private workbook.
	DisplayName *string `json:"displayName,omitempty"`

	// REQUIRED; Configuration of this particular private workbook. Configuration data is a string containing valid JSON
	SerializedData *string `json:"serializedData,omitempty"`

	// Optional resourceId for a source resource.
	SourceID *string `json:"sourceId,omitempty"`

	// BYOS Storage Account URI
	StorageURI *string `json:"storageUri,omitempty"`

	// A list of 0 or more tags that are associated with this private workbook definition
	Tags []*string `json:"tags,omitempty"`

	// This instance's version of the data model. This can change as new features are added that can be marked private workbook.
	Version *string `json:"version,omitempty"`

	// READ-ONLY; Date and time in UTC of the last modification that was made to this private workbook definition.
	TimeModified *string `json:"timeModified,omitempty" azure:"ro"`

	// READ-ONLY; Unique user id of the specific user that owns this private workbook.
	UserID *string `json:"userId,omitempty" azure:"ro"`
}

MyWorkbookProperties - Properties that contain a private workbook.

func (MyWorkbookProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MyWorkbookProperties.

type MyWorkbookResource

type MyWorkbookResource struct {
	// Resource etag
	Etag map[string]*string `json:"etag,omitempty"`

	// Azure resource Id
	ID *string `json:"id,omitempty"`

	// Identity used for BYOS
	Identity *MyWorkbookManagedIdentity `json:"identity,omitempty"`

	// Resource location
	Location *string `json:"location,omitempty"`

	// Azure resource name
	Name *string `json:"name,omitempty"`

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

	// Azure resource type
	Type *string `json:"type,omitempty"`
}

MyWorkbookResource - An azure resource object

func (MyWorkbookResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MyWorkbookResource.

type MyWorkbookUserAssignedIdentities

type MyWorkbookUserAssignedIdentities struct {
	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant ID of resource.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

MyWorkbookUserAssignedIdentities - Customer Managed Identity

type MyWorkbooksClient

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

MyWorkbooksClient contains the methods for the MyWorkbooks group. Don't use this type directly, use NewMyWorkbooksClient() instead.

func NewMyWorkbooksClient

func NewMyWorkbooksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MyWorkbooksClient, error)

NewMyWorkbooksClient creates a new instance of MyWorkbooksClient 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 (*MyWorkbooksClient) CreateOrUpdate

func (client *MyWorkbooksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties MyWorkbook, options *MyWorkbooksClientCreateOrUpdateOptions) (MyWorkbooksClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create a new private workbook. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-08 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. workbookProperties - Properties that need to be specified to create a new private workbook. options - MyWorkbooksClientCreateOrUpdateOptions contains the optional parameters for the MyWorkbooksClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookAdd.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewMyWorkbooksClient("00000000-0000-0000-0000-00000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"my-resource-group",
		"deadb33f-8bee-4d3b-a059-9be8dac93960",
		armapplicationinsights.MyWorkbook{
			Name:     to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"),
			ID:       to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1c3b5722"),
			Location: to.Ptr("west us"),
			Tags: map[string]*string{
				"0": to.Ptr("TagSample01"),
				"1": to.Ptr("TagSample02"),
			},
			Kind: to.Ptr(armapplicationinsights.KindUser),
			Properties: &armapplicationinsights.MyWorkbookProperties{
				Category:       to.Ptr("workbook"),
				DisplayName:    to.Ptr("Blah Blah Blah"),
				SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook.  This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"),
				SourceID:       to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens"),
			},
		},
		&armapplicationinsights.MyWorkbooksClientCreateOrUpdateOptions{SourceID: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*MyWorkbooksClient) Delete

func (client *MyWorkbooksClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *MyWorkbooksClientDeleteOptions) (MyWorkbooksClientDeleteResponse, error)

Delete - Delete a private workbook. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-08 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - MyWorkbooksClientDeleteOptions contains the optional parameters for the MyWorkbooksClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewMyWorkbooksClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"my-resource-group",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*MyWorkbooksClient) Get

func (client *MyWorkbooksClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *MyWorkbooksClientGetOptions) (MyWorkbooksClientGetResponse, error)

Get - Get a single private workbook by its resourceName. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-08 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - MyWorkbooksClientGetOptions contains the optional parameters for the MyWorkbooksClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewMyWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"my-resource-group",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*MyWorkbooksClient) NewListByResourceGroupPager added in v0.4.0

func (client *MyWorkbooksClient) NewListByResourceGroupPager(resourceGroupName string, category CategoryType, options *MyWorkbooksClientListByResourceGroupOptions) *runtime.Pager[MyWorkbooksClientListByResourceGroupResponse]

NewListByResourceGroupPager - Get all private workbooks defined within a specified resource group and category. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-08 resourceGroupName - The name of the resource group. The name is case insensitive. category - Category of workbook to return. options - MyWorkbooksClientListByResourceGroupOptions contains the optional parameters for the MyWorkbooksClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewMyWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("my-resource-group",
		armapplicationinsights.CategoryTypeWorkbook,
		&armapplicationinsights.MyWorkbooksClientListByResourceGroupOptions{Tags: []string{},
			SourceID:        nil,
			CanFetchContent: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*MyWorkbooksClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - Get all private workbooks defined within a specified subscription and category. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-08 category - Category of workbook to return. options - MyWorkbooksClientListBySubscriptionOptions contains the optional parameters for the MyWorkbooksClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewMyWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(armapplicationinsights.CategoryTypeWorkbook,
		&armapplicationinsights.MyWorkbooksClientListBySubscriptionOptions{Tags: []string{},
			CanFetchContent: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*MyWorkbooksClient) Update

func (client *MyWorkbooksClient) Update(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties MyWorkbook, options *MyWorkbooksClientUpdateOptions) (MyWorkbooksClientUpdateResponse, error)

Update - Updates a private workbook that has already been added. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-03-08 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. workbookProperties - Properties that need to be specified to create a new private workbook. options - MyWorkbooksClientUpdateOptions contains the optional parameters for the MyWorkbooksClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookUpdate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewMyWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Update(ctx,
		"my-resource-group",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		armapplicationinsights.MyWorkbook{
			Name:     to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"),
			Location: to.Ptr("west us"),
			Tags: map[string]*string{
				"0": to.Ptr("TagSample01"),
				"1": to.Ptr("TagSample02"),
			},
			Kind: to.Ptr(armapplicationinsights.KindUser),
			Properties: &armapplicationinsights.MyWorkbookProperties{
				Category:       to.Ptr("workbook"),
				DisplayName:    to.Ptr("Blah Blah Blah"),
				SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook.  This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"),
				SourceID:       to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens"),
				Version:        to.Ptr("ME"),
			},
		},
		&armapplicationinsights.MyWorkbooksClientUpdateOptions{SourceID: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type MyWorkbooksClientCreateOrUpdateOptions added in v0.2.0

type MyWorkbooksClientCreateOrUpdateOptions struct {
	// Azure Resource Id that will fetch all linked workbooks.
	SourceID *string
}

MyWorkbooksClientCreateOrUpdateOptions contains the optional parameters for the MyWorkbooksClient.CreateOrUpdate method.

type MyWorkbooksClientCreateOrUpdateResponse added in v0.2.0

type MyWorkbooksClientCreateOrUpdateResponse struct {
	MyWorkbook
}

MyWorkbooksClientCreateOrUpdateResponse contains the response from method MyWorkbooksClient.CreateOrUpdate.

type MyWorkbooksClientDeleteOptions added in v0.2.0

type MyWorkbooksClientDeleteOptions struct {
}

MyWorkbooksClientDeleteOptions contains the optional parameters for the MyWorkbooksClient.Delete method.

type MyWorkbooksClientDeleteResponse added in v0.2.0

type MyWorkbooksClientDeleteResponse struct {
}

MyWorkbooksClientDeleteResponse contains the response from method MyWorkbooksClient.Delete.

type MyWorkbooksClientGetOptions added in v0.2.0

type MyWorkbooksClientGetOptions struct {
}

MyWorkbooksClientGetOptions contains the optional parameters for the MyWorkbooksClient.Get method.

type MyWorkbooksClientGetResponse added in v0.2.0

type MyWorkbooksClientGetResponse struct {
	MyWorkbook
}

MyWorkbooksClientGetResponse contains the response from method MyWorkbooksClient.Get.

type MyWorkbooksClientListByResourceGroupOptions added in v0.2.0

type MyWorkbooksClientListByResourceGroupOptions struct {
	// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content
	// for workbooks.
	CanFetchContent *bool
	// Azure Resource Id that will fetch all linked workbooks.
	SourceID *string
	// Tags presents on each workbook returned.
	Tags []string
}

MyWorkbooksClientListByResourceGroupOptions contains the optional parameters for the MyWorkbooksClient.ListByResourceGroup method.

type MyWorkbooksClientListByResourceGroupResponse added in v0.2.0

type MyWorkbooksClientListByResourceGroupResponse struct {
	MyWorkbooksListResult
}

MyWorkbooksClientListByResourceGroupResponse contains the response from method MyWorkbooksClient.ListByResourceGroup.

type MyWorkbooksClientListBySubscriptionOptions added in v0.2.0

type MyWorkbooksClientListBySubscriptionOptions struct {
	// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content
	// for workbooks.
	CanFetchContent *bool
	// Tags presents on each workbook returned.
	Tags []string
}

MyWorkbooksClientListBySubscriptionOptions contains the optional parameters for the MyWorkbooksClient.ListBySubscription method.

type MyWorkbooksClientListBySubscriptionResponse added in v0.2.0

type MyWorkbooksClientListBySubscriptionResponse struct {
	MyWorkbooksListResult
}

MyWorkbooksClientListBySubscriptionResponse contains the response from method MyWorkbooksClient.ListBySubscription.

type MyWorkbooksClientUpdateOptions added in v0.2.0

type MyWorkbooksClientUpdateOptions struct {
	// Azure Resource Id that will fetch all linked workbooks.
	SourceID *string
}

MyWorkbooksClientUpdateOptions contains the optional parameters for the MyWorkbooksClient.Update method.

type MyWorkbooksClientUpdateResponse added in v0.2.0

type MyWorkbooksClientUpdateResponse struct {
	MyWorkbook
}

MyWorkbooksClientUpdateResponse contains the response from method MyWorkbooksClient.Update.

type MyWorkbooksListResult

type MyWorkbooksListResult struct {
	NextLink *string `json:"nextLink,omitempty"`

	// READ-ONLY; An array of private workbooks.
	Value []*MyWorkbook `json:"value,omitempty" azure:"ro"`
}

MyWorkbooksListResult - Workbook list result.

type Operation

type Operation struct {
	// The object that represents the operation.
	Display *OperationDisplay `json:"display,omitempty"`

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

Operation - CDN REST API operation

type OperationDisplay

type OperationDisplay struct {
	// Operation type: Read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`

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

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

OperationDisplay - The object that represents the operation.

type OperationInfo

type OperationInfo struct {
	// Description of the operation
	Description *string `json:"description,omitempty"`

	// Name of the operation
	Operation *string `json:"operation,omitempty"`

	// Name of the provider
	Provider *string `json:"provider,omitempty"`

	// Name of the resource type
	Resource *string `json:"resource,omitempty"`
}

OperationInfo - Information about an operation

type OperationListResult

type OperationListResult struct {
	// URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`

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

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

type OperationLive

type OperationLive struct {
	// Display name of the operation
	Display *OperationInfo `json:"display,omitempty"`

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

	// Name of the operation
	Name *string `json:"name,omitempty"`

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

	// Properties of the operation
	Properties interface{} `json:"properties,omitempty"`
}

OperationLive - Represents an operation returned by the GetOperations request

type OperationsListResult

type OperationsListResult struct {
	// URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`

	// A collection of operations
	Value []*OperationLive `json:"value,omitempty"`
}

OperationsListResult - Result of the List Operations operation

type PrivateLinkScopedResource

type PrivateLinkScopedResource struct {
	// The full resource Id of the private link scope resource.
	ResourceID *string `json:"ResourceId,omitempty"`

	// The private link scope unique Identifier.
	ScopeID *string `json:"ScopeId,omitempty"`
}

PrivateLinkScopedResource - The private link scope resource reference.

type ProactiveDetectionConfigurationsClient

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

ProactiveDetectionConfigurationsClient contains the methods for the ProactiveDetectionConfigurations group. Don't use this type directly, use NewProactiveDetectionConfigurationsClient() instead.

func NewProactiveDetectionConfigurationsClient

func NewProactiveDetectionConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProactiveDetectionConfigurationsClient, error)

NewProactiveDetectionConfigurationsClient creates a new instance of ProactiveDetectionConfigurationsClient 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 (*ProactiveDetectionConfigurationsClient) Get

Get - Get the ProactiveDetection configuration for this configuration id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. configurationID - The ProactiveDetection configuration ID. This is unique within a Application Insights component. options - ProactiveDetectionConfigurationsClientGetOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewProactiveDetectionConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"my-resource-group",
		"my-component",
		"slowpageloadtime",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ProactiveDetectionConfigurationsClient) List

List - Gets a list of ProactiveDetection configurations of an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - ProactiveDetectionConfigurationsClientListOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewProactiveDetectionConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"my-resource-group",
		"my-component",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ProactiveDetectionConfigurationsClient) Update

Update - Update the ProactiveDetection configuration for this configuration id. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. configurationID - The ProactiveDetection configuration ID. This is unique within a Application Insights component. proactiveDetectionProperties - Properties that need to be specified to update the ProactiveDetection configuration. options - ProactiveDetectionConfigurationsClientUpdateOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationUpdate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewProactiveDetectionConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"my-resource-group",
		"my-component",
		"slowpageloadtime",
		armapplicationinsights.ComponentProactiveDetectionConfiguration{
			CustomEmails: []*string{
				to.Ptr("foo@microsoft.com"),
				to.Ptr("foo2@microsoft.com")},
			Enabled: to.Ptr(true),
			Name:    to.Ptr("slowpageloadtime"),
			RuleDefinitions: &armapplicationinsights.ComponentProactiveDetectionConfigurationRuleDefinitions{
				Description:                to.Ptr("Smart Detection rules notify you of performance anomaly issues."),
				DisplayName:                to.Ptr("Slow page load time"),
				HelpURL:                    to.Ptr("https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics"),
				IsEnabledByDefault:         to.Ptr(true),
				IsHidden:                   to.Ptr(false),
				IsInPreview:                to.Ptr(false),
				Name:                       to.Ptr("slowpageloadtime"),
				SupportsEmailNotifications: to.Ptr(true),
			},
			SendEmailsToSubscriptionOwners: to.Ptr(true),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type ProactiveDetectionConfigurationsClientGetOptions added in v0.2.0

type ProactiveDetectionConfigurationsClientGetOptions struct {
}

ProactiveDetectionConfigurationsClientGetOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.Get method.

type ProactiveDetectionConfigurationsClientGetResponse added in v0.2.0

type ProactiveDetectionConfigurationsClientGetResponse struct {
	ComponentProactiveDetectionConfiguration
}

ProactiveDetectionConfigurationsClientGetResponse contains the response from method ProactiveDetectionConfigurationsClient.Get.

type ProactiveDetectionConfigurationsClientListOptions added in v0.2.0

type ProactiveDetectionConfigurationsClientListOptions struct {
}

ProactiveDetectionConfigurationsClientListOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.List method.

type ProactiveDetectionConfigurationsClientListResponse added in v0.2.0

type ProactiveDetectionConfigurationsClientListResponse struct {
	// A list of ProactiveDetection configurations.
	ComponentProactiveDetectionConfigurationArray []*ComponentProactiveDetectionConfiguration
}

ProactiveDetectionConfigurationsClientListResponse contains the response from method ProactiveDetectionConfigurationsClient.List.

type ProactiveDetectionConfigurationsClientUpdateOptions added in v0.2.0

type ProactiveDetectionConfigurationsClientUpdateOptions struct {
}

ProactiveDetectionConfigurationsClientUpdateOptions contains the optional parameters for the ProactiveDetectionConfigurationsClient.Update method.

type ProactiveDetectionConfigurationsClientUpdateResponse added in v0.2.0

type ProactiveDetectionConfigurationsClientUpdateResponse struct {
	ComponentProactiveDetectionConfiguration
}

ProactiveDetectionConfigurationsClientUpdateResponse contains the response from method ProactiveDetectionConfigurationsClient.Update.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

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

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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

type PublicNetworkAccessType

type PublicNetworkAccessType string

PublicNetworkAccessType - The network access type for operating on the Application Insights Component. By default it is Enabled

const (
	// PublicNetworkAccessTypeDisabled - Disables public connectivity to Application Insights through public DNS.
	PublicNetworkAccessTypeDisabled PublicNetworkAccessType = "Disabled"
	// PublicNetworkAccessTypeEnabled - Enables connectivity to Application Insights through public DNS.
	PublicNetworkAccessTypeEnabled PublicNetworkAccessType = "Enabled"
)

func PossiblePublicNetworkAccessTypeValues

func PossiblePublicNetworkAccessTypeValues() []PublicNetworkAccessType

PossiblePublicNetworkAccessTypeValues returns the possible values for the PublicNetworkAccessType const type.

type PurgeState

type PurgeState string

PurgeState - Status of the operation represented by the requested Id.

const (
	PurgeStateCompleted PurgeState = "completed"
	PurgeStatePending   PurgeState = "pending"
)

func PossiblePurgeStateValues

func PossiblePurgeStateValues() []PurgeState

PossiblePurgeStateValues returns the possible values for the PurgeState const type.

type RequestSource

type RequestSource string

RequestSource - Describes what tool created this Application Insights component. Customers using this API should set this to the default 'rest'.

const (
	RequestSourceRest RequestSource = "rest"
)

func PossibleRequestSourceValues

func PossibleRequestSourceValues() []RequestSource

PossibleRequestSourceValues returns the possible values for the RequestSource const type.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

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

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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

type SharedTypeKind

type SharedTypeKind string

SharedTypeKind - The kind of workbook. Only valid value is shared.

const (
	SharedTypeKindShared SharedTypeKind = "shared"
	SharedTypeKindUser   SharedTypeKind = "user"
)

func PossibleSharedTypeKindValues

func PossibleSharedTypeKindValues() []SharedTypeKind

PossibleSharedTypeKindValues returns the possible values for the SharedTypeKind const type.

type StorageType

type StorageType string
const (
	StorageTypeServiceProfiler StorageType = "ServiceProfiler"
)

func PossibleStorageTypeValues

func PossibleStorageTypeValues() []StorageType

PossibleStorageTypeValues returns the possible values for the StorageType const type.

type SystemData

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

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

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

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

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

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

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

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TagsResource

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

TagsResource - A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance.

func (TagsResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TagsResource.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

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

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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

func (TrackedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; The client ID of the assigned identity.
	ClientID *string `json:"clientId,omitempty" azure:"ro"`

	// READ-ONLY; The principal ID of the assigned identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`
}

UserAssignedIdentity - User assigned identity properties

type WebTest

type WebTest struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// The kind of web test that this web test watches. Choices are ping and multistep.
	Kind *WebTestKind `json:"kind,omitempty"`

	// Metadata describing a web test for an Azure resource.
	Properties *WebTestProperties `json:"properties,omitempty"`

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

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

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

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

WebTest - An Application Insights web test definition.

func (WebTest) MarshalJSON

func (w WebTest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebTest.

type WebTestGeolocation

type WebTestGeolocation struct {
	// Location ID for the webtest to run from.
	Location *string `json:"Id,omitempty"`
}

WebTestGeolocation - Geo-physical location to run a web test from. You must specify one or more locations for the test to run from.

type WebTestKind

type WebTestKind string

WebTestKind - The kind of web test that this web test watches. Choices are ping and multistep.

const (
	WebTestKindPing      WebTestKind = "ping"
	WebTestKindMultistep WebTestKind = "multistep"
)

func PossibleWebTestKindValues

func PossibleWebTestKindValues() []WebTestKind

PossibleWebTestKindValues returns the possible values for the WebTestKind const type.

type WebTestListResult

type WebTestListResult struct {
	// REQUIRED; Set of Application Insights web test definitions.
	Value []*WebTest `json:"value,omitempty"`

	// The link to get the next part of the returned list of web tests, should the return set be too large for a single request.
	// May be null.
	NextLink *string `json:"nextLink,omitempty"`
}

WebTestListResult - A list of 0 or more Application Insights web test definitions.

type WebTestLocationsClient

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

WebTestLocationsClient contains the methods for the WebTestLocations group. Don't use this type directly, use NewWebTestLocationsClient() instead.

func NewWebTestLocationsClient

func NewWebTestLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebTestLocationsClient, error)

NewWebTestLocationsClient creates a new instance of WebTestLocationsClient 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 (*WebTestLocationsClient) NewListPager added in v0.4.0

func (client *WebTestLocationsClient) NewListPager(resourceGroupName string, resourceName string, options *WebTestLocationsClientListOptions) *runtime.Pager[WebTestLocationsClientListResponse]

NewListPager - Gets a list of web test locations available to this Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - WebTestLocationsClientListOptions contains the optional parameters for the WebTestLocationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestLocationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

type WebTestLocationsClientListOptions added in v0.2.0

type WebTestLocationsClientListOptions struct {
}

WebTestLocationsClientListOptions contains the optional parameters for the WebTestLocationsClient.List method.

type WebTestLocationsClientListResponse added in v0.2.0

type WebTestLocationsClientListResponse struct {
	WebTestLocationsListResult
}

WebTestLocationsClientListResponse contains the response from method WebTestLocationsClient.List.

type WebTestLocationsListResult

type WebTestLocationsListResult struct {
	// REQUIRED; List of web test locations.
	Value []*ComponentWebTestLocation `json:"value,omitempty"`
}

WebTestLocationsListResult - Describes the list of web test locations available to an Application Insights Component.

type WebTestProperties

type WebTestProperties struct {
	// REQUIRED; A list of where to physically run the tests from to give global coverage for accessibility of your application.
	Locations []*WebTestGeolocation `json:"Locations,omitempty"`

	// REQUIRED; Unique ID of this WebTest. This is typically the same value as the Name field.
	SyntheticMonitorID *string `json:"SyntheticMonitorId,omitempty"`

	// REQUIRED; The kind of web test this is, valid choices are ping and multistep.
	WebTestKind *WebTestKind `json:"Kind,omitempty"`

	// REQUIRED; User defined name if this WebTest.
	WebTestName *string `json:"Name,omitempty"`

	// An XML configuration specification for a WebTest.
	Configuration *WebTestPropertiesConfiguration `json:"Configuration,omitempty"`

	// Purpose/user defined descriptive test for this WebTest.
	Description *string `json:"Description,omitempty"`

	// Is the test actively being monitored.
	Enabled *bool `json:"Enabled,omitempty"`

	// Interval in seconds between test runs for this WebTest. Default value is 300.
	Frequency *int32 `json:"Frequency,omitempty"`

	// Allow for retries should this WebTest fail.
	RetryEnabled *bool `json:"RetryEnabled,omitempty"`

	// Seconds until this WebTest will timeout and fail. Default value is 30.
	Timeout *int32 `json:"Timeout,omitempty"`

	// READ-ONLY; Current state of this component, whether or not is has been provisioned within the resource group it is defined.
	// Users cannot change this value but are able to read from it. Values will include
	// Succeeded, Deploying, Canceled, and Failed.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`
}

WebTestProperties - Metadata describing a web test for an Azure resource.

func (WebTestProperties) MarshalJSON

func (w WebTestProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebTestProperties.

type WebTestPropertiesConfiguration

type WebTestPropertiesConfiguration struct {
	// The XML specification of a WebTest to run against an application.
	WebTest *string `json:"WebTest,omitempty"`
}

WebTestPropertiesConfiguration - An XML configuration specification for a WebTest.

type WebTestsClient

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

WebTestsClient contains the methods for the WebTests group. Don't use this type directly, use NewWebTestsClient() instead.

func NewWebTestsClient

func NewWebTestsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebTestsClient, error)

NewWebTestsClient creates a new instance of WebTestsClient 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 (*WebTestsClient) CreateOrUpdate

func (client *WebTestsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, webTestName string, webTestDefinition WebTest, options *WebTestsClientCreateOrUpdateOptions) (WebTestsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an Application Insights web test definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. webTestName - The name of the Application Insights webtest resource. webTestDefinition - Properties that need to be specified to create or update an Application Insights web test definition. options - WebTestsClientCreateOrUpdateOptions contains the optional parameters for the WebTestsClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestCreate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWebTestsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"my-resource-group",
		"my-webtest-my-component",
		armapplicationinsights.WebTest{
			Location: to.Ptr("South Central US"),
			Kind:     to.Ptr(armapplicationinsights.WebTestKindPing),
			Properties: &armapplicationinsights.WebTestProperties{
				Configuration: &armapplicationinsights.WebTestPropertiesConfiguration{
					WebTest: to.Ptr("<WebTest Name=\"my-webtest\" Id=\"678ddf96-1ab8-44c8-9274-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"120\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\" ><Items><Request Method=\"GET\" Guid=\"a4162485-9114-fcfc-e086-123456789abc\" Version=\"1.1\" Url=\"http://my-component.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"120\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"),
				},
				Description: to.Ptr("Ping web test alert for mytestwebapp"),
				Enabled:     to.Ptr(true),
				Frequency:   to.Ptr[int32](900),
				WebTestKind: to.Ptr(armapplicationinsights.WebTestKindPing),
				Locations: []*armapplicationinsights.WebTestGeolocation{
					{
						Location: to.Ptr("us-fl-mia-edge"),
					}},
				WebTestName:        to.Ptr("my-webtest-my-component"),
				RetryEnabled:       to.Ptr(true),
				SyntheticMonitorID: to.Ptr("my-webtest-my-component"),
				Timeout:            to.Ptr[int32](120),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WebTestsClient) Delete

func (client *WebTestsClient) Delete(ctx context.Context, resourceGroupName string, webTestName string, options *WebTestsClientDeleteOptions) (WebTestsClientDeleteResponse, error)

Delete - Deletes an Application Insights web test. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. webTestName - The name of the Application Insights webtest resource. options - WebTestsClientDeleteOptions contains the optional parameters for the WebTestsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWebTestsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"my-resource-group",
		"my-webtest-01-mywebservice",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*WebTestsClient) Get

func (client *WebTestsClient) Get(ctx context.Context, resourceGroupName string, webTestName string, options *WebTestsClientGetOptions) (WebTestsClientGetResponse, error)

Get - Get a specific Application Insights web test definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. webTestName - The name of the Application Insights webtest resource. options - WebTestsClientGetOptions contains the optional parameters for the WebTestsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWebTestsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"my-resource-group",
		"my-webtest-01-mywebservice",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WebTestsClient) NewListByComponentPager added in v0.4.0

func (client *WebTestsClient) NewListByComponentPager(componentName string, resourceGroupName string, options *WebTestsClientListByComponentOptions) *runtime.Pager[WebTestsClientListByComponentResponse]

NewListByComponentPager - Get all Application Insights web tests defined for the specified component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 componentName - The name of the Application Insights component resource. resourceGroupName - The name of the resource group. The name is case insensitive. options - WebTestsClientListByComponentOptions contains the optional parameters for the WebTestsClient.ListByComponent method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestListByComponent.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

func (*WebTestsClient) NewListByResourceGroupPager added in v0.4.0

func (client *WebTestsClient) NewListByResourceGroupPager(resourceGroupName string, options *WebTestsClientListByResourceGroupOptions) *runtime.Pager[WebTestsClientListByResourceGroupResponse]

NewListByResourceGroupPager - Get all Application Insights web tests defined within a specified resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. options - WebTestsClientListByResourceGroupOptions contains the optional parameters for the WebTestsClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

func (*WebTestsClient) NewListPager added in v0.4.0

NewListPager - Get all Application Insights web test alerts definitions within a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 options - WebTestsClientListOptions contains the optional parameters for the WebTestsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

func (*WebTestsClient) UpdateTags

func (client *WebTestsClient) UpdateTags(ctx context.Context, resourceGroupName string, webTestName string, webTestTags TagsResource, options *WebTestsClientUpdateTagsOptions) (WebTestsClientUpdateTagsResponse, error)

UpdateTags - Creates or updates an Application Insights web test definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. webTestName - The name of the Application Insights webtest resource. webTestTags - Updated tag information to set into the web test instance. options - WebTestsClientUpdateTagsOptions contains the optional parameters for the WebTestsClient.UpdateTags method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestUpdateTagsOnly.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWebTestsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.UpdateTags(ctx,
		"my-resource-group",
		"my-webtest-my-component",
		armapplicationinsights.TagsResource{
			Tags: map[string]*string{
				"Color":          to.Ptr("AzureBlue"),
				"CustomField-01": to.Ptr("This is a random value"),
				"SystemType":     to.Ptr("A08"),
				"hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component": to.Ptr("Resource"),
				"hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp":           to.Ptr("Resource"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type WebTestsClientCreateOrUpdateOptions added in v0.2.0

type WebTestsClientCreateOrUpdateOptions struct {
}

WebTestsClientCreateOrUpdateOptions contains the optional parameters for the WebTestsClient.CreateOrUpdate method.

type WebTestsClientCreateOrUpdateResponse added in v0.2.0

type WebTestsClientCreateOrUpdateResponse struct {
	WebTest
}

WebTestsClientCreateOrUpdateResponse contains the response from method WebTestsClient.CreateOrUpdate.

type WebTestsClientDeleteOptions added in v0.2.0

type WebTestsClientDeleteOptions struct {
}

WebTestsClientDeleteOptions contains the optional parameters for the WebTestsClient.Delete method.

type WebTestsClientDeleteResponse added in v0.2.0

type WebTestsClientDeleteResponse struct {
}

WebTestsClientDeleteResponse contains the response from method WebTestsClient.Delete.

type WebTestsClientGetOptions added in v0.2.0

type WebTestsClientGetOptions struct {
}

WebTestsClientGetOptions contains the optional parameters for the WebTestsClient.Get method.

type WebTestsClientGetResponse added in v0.2.0

type WebTestsClientGetResponse struct {
	WebTest
}

WebTestsClientGetResponse contains the response from method WebTestsClient.Get.

type WebTestsClientListByComponentOptions added in v0.2.0

type WebTestsClientListByComponentOptions struct {
}

WebTestsClientListByComponentOptions contains the optional parameters for the WebTestsClient.ListByComponent method.

type WebTestsClientListByComponentResponse added in v0.2.0

type WebTestsClientListByComponentResponse struct {
	WebTestListResult
}

WebTestsClientListByComponentResponse contains the response from method WebTestsClient.ListByComponent.

type WebTestsClientListByResourceGroupOptions added in v0.2.0

type WebTestsClientListByResourceGroupOptions struct {
}

WebTestsClientListByResourceGroupOptions contains the optional parameters for the WebTestsClient.ListByResourceGroup method.

type WebTestsClientListByResourceGroupResponse added in v0.2.0

type WebTestsClientListByResourceGroupResponse struct {
	WebTestListResult
}

WebTestsClientListByResourceGroupResponse contains the response from method WebTestsClient.ListByResourceGroup.

type WebTestsClientListOptions added in v0.2.0

type WebTestsClientListOptions struct {
}

WebTestsClientListOptions contains the optional parameters for the WebTestsClient.List method.

type WebTestsClientListResponse added in v0.2.0

type WebTestsClientListResponse struct {
	WebTestListResult
}

WebTestsClientListResponse contains the response from method WebTestsClient.List.

type WebTestsClientUpdateTagsOptions added in v0.2.0

type WebTestsClientUpdateTagsOptions struct {
}

WebTestsClientUpdateTagsOptions contains the optional parameters for the WebTestsClient.UpdateTags method.

type WebTestsClientUpdateTagsResponse added in v0.2.0

type WebTestsClientUpdateTagsResponse struct {
	WebTest
}

WebTestsClientUpdateTagsResponse contains the response from method WebTestsClient.UpdateTags.

type WebtestsResource

type WebtestsResource struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

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

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

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

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

WebtestsResource - An azure resource object

func (WebtestsResource) MarshalJSON

func (w WebtestsResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WebtestsResource.

type WorkItemConfiguration

type WorkItemConfiguration struct {
	// Configuration friendly name
	ConfigDisplayName *string `json:"ConfigDisplayName,omitempty"`

	// Serialized JSON object for detailed properties
	ConfigProperties *string `json:"ConfigProperties,omitempty"`

	// Connector identifier where work item is created
	ConnectorID *string `json:"ConnectorId,omitempty"`

	// Unique Id for work item
	ID *string `json:"Id,omitempty"`

	// Boolean value indicating whether configuration is default
	IsDefault *bool `json:"IsDefault,omitempty"`
}

WorkItemConfiguration - Work item configuration associated with an application insights resource.

type WorkItemConfigurationError

type WorkItemConfigurationError struct {
	// Error detail code and explanation
	Code *string `json:"code,omitempty"`

	// Inner error
	Innererror *InnerError `json:"innererror,omitempty"`

	// Error message
	Message *string `json:"message,omitempty"`
}

WorkItemConfigurationError - Error associated with trying to get work item configuration or configurations

type WorkItemConfigurationsClient

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

WorkItemConfigurationsClient contains the methods for the WorkItemConfigurations group. Don't use this type directly, use NewWorkItemConfigurationsClient() instead.

func NewWorkItemConfigurationsClient

func NewWorkItemConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkItemConfigurationsClient, error)

NewWorkItemConfigurationsClient creates a new instance of WorkItemConfigurationsClient 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 (*WorkItemConfigurationsClient) Create

func (client *WorkItemConfigurationsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigurationProperties WorkItemCreateConfiguration, options *WorkItemConfigurationsClientCreateOptions) (WorkItemConfigurationsClientCreateResponse, error)

Create - Create a work item configuration for an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. workItemConfigurationProperties - Properties that need to be specified to create a work item configuration of a Application Insights component. options - WorkItemConfigurationsClientCreateOptions contains the optional parameters for the WorkItemConfigurationsClient.Create method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigCreate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkItemConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Create(ctx,
		"my-resource-group",
		"my-component",
		armapplicationinsights.WorkItemCreateConfiguration{
			ConnectorDataConfiguration: to.Ptr("{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"d0662b05-439a-4a1b-840b-33a7f8b42ebf\",\"Custom\":\"{\\\"/fields/System.WorkItemType\\\":\\\"Bug\\\",\\\"/fields/System.AreaPath\\\":\\\"todeletefirst\\\",\\\"/fields/System.AssignedTo\\\":\\\"\\\"}\"}"),
			ConnectorID:                to.Ptr("d334e2a4-6733-488e-8645-a9fdc1694f41"),
			ValidateOnly:               to.Ptr(true),
			WorkItemProperties: map[string]*string{
				"0": to.Ptr("[object Object]"),
				"1": to.Ptr("[object Object]"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkItemConfigurationsClient) Delete

func (client *WorkItemConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string, options *WorkItemConfigurationsClientDeleteOptions) (WorkItemConfigurationsClientDeleteResponse, error)

Delete - Delete a work item configuration of an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. workItemConfigID - The unique work item configuration Id. This can be either friendly name of connector as defined in connector configuration options - WorkItemConfigurationsClientDeleteOptions contains the optional parameters for the WorkItemConfigurationsClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkItemConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"my-resource-group",
		"my-component",
		"Visual Studio Team Services",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*WorkItemConfigurationsClient) GetDefault

GetDefault - Gets default work item configurations that exist for the application If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - WorkItemConfigurationsClientGetDefaultOptions contains the optional parameters for the WorkItemConfigurationsClient.GetDefault method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigDefaultGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkItemConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetDefault(ctx,
		"my-resource-group",
		"my-component",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkItemConfigurationsClient) GetItem

func (client *WorkItemConfigurationsClient) GetItem(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string, options *WorkItemConfigurationsClientGetItemOptions) (WorkItemConfigurationsClientGetItemResponse, error)

GetItem - Gets specified work item configuration for an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. workItemConfigID - The unique work item configuration Id. This can be either friendly name of connector as defined in connector configuration options - WorkItemConfigurationsClientGetItemOptions contains the optional parameters for the WorkItemConfigurationsClient.GetItem method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkItemConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetItem(ctx,
		"my-resource-group",
		"my-component",
		"Visual Studio Team Services",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkItemConfigurationsClient) NewListPager added in v0.4.0

NewListPager - Gets the list work item configurations that exist for the application If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - WorkItemConfigurationsClientListOptions contains the optional parameters for the WorkItemConfigurationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

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

func (*WorkItemConfigurationsClient) UpdateItem

func (client *WorkItemConfigurationsClient) UpdateItem(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string, workItemConfigurationProperties WorkItemCreateConfiguration, options *WorkItemConfigurationsClientUpdateItemOptions) (WorkItemConfigurationsClientUpdateItemResponse, error)

UpdateItem - Update a work item configuration for an Application Insights component. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2015-05-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. workItemConfigID - The unique work item configuration Id. This can be either friendly name of connector as defined in connector configuration workItemConfigurationProperties - Properties that need to be specified to update a work item configuration for this Application Insights component. options - WorkItemConfigurationsClientUpdateItemOptions contains the optional parameters for the WorkItemConfigurationsClient.UpdateItem method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigUpdate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkItemConfigurationsClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.UpdateItem(ctx,
		"my-resource-group",
		"my-component",
		"Visual Studio Team Services",
		armapplicationinsights.WorkItemCreateConfiguration{
			ConnectorDataConfiguration: to.Ptr("{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"d0662b05-439a-4a1b-840b-33a7f8b42ebf\",\"Custom\":\"{\\\"/fields/System.WorkItemType\\\":\\\"Bug\\\",\\\"/fields/System.AreaPath\\\":\\\"todeletefirst\\\",\\\"/fields/System.AssignedTo\\\":\\\"\\\"}\"}"),
			ConnectorID:                to.Ptr("d334e2a4-6733-488e-8645-a9fdc1694f41"),
			ValidateOnly:               to.Ptr(true),
			WorkItemProperties: map[string]*string{
				"0": to.Ptr("[object Object]"),
				"1": to.Ptr("[object Object]"),
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type WorkItemConfigurationsClientCreateOptions added in v0.2.0

type WorkItemConfigurationsClientCreateOptions struct {
}

WorkItemConfigurationsClientCreateOptions contains the optional parameters for the WorkItemConfigurationsClient.Create method.

type WorkItemConfigurationsClientCreateResponse added in v0.2.0

type WorkItemConfigurationsClientCreateResponse struct {
	WorkItemConfiguration
}

WorkItemConfigurationsClientCreateResponse contains the response from method WorkItemConfigurationsClient.Create.

type WorkItemConfigurationsClientDeleteOptions added in v0.2.0

type WorkItemConfigurationsClientDeleteOptions struct {
}

WorkItemConfigurationsClientDeleteOptions contains the optional parameters for the WorkItemConfigurationsClient.Delete method.

type WorkItemConfigurationsClientDeleteResponse added in v0.2.0

type WorkItemConfigurationsClientDeleteResponse struct {
}

WorkItemConfigurationsClientDeleteResponse contains the response from method WorkItemConfigurationsClient.Delete.

type WorkItemConfigurationsClientGetDefaultOptions added in v0.2.0

type WorkItemConfigurationsClientGetDefaultOptions struct {
}

WorkItemConfigurationsClientGetDefaultOptions contains the optional parameters for the WorkItemConfigurationsClient.GetDefault method.

type WorkItemConfigurationsClientGetDefaultResponse added in v0.2.0

type WorkItemConfigurationsClientGetDefaultResponse struct {
	WorkItemConfiguration
}

WorkItemConfigurationsClientGetDefaultResponse contains the response from method WorkItemConfigurationsClient.GetDefault.

type WorkItemConfigurationsClientGetItemOptions added in v0.2.0

type WorkItemConfigurationsClientGetItemOptions struct {
}

WorkItemConfigurationsClientGetItemOptions contains the optional parameters for the WorkItemConfigurationsClient.GetItem method.

type WorkItemConfigurationsClientGetItemResponse added in v0.2.0

type WorkItemConfigurationsClientGetItemResponse struct {
	WorkItemConfiguration
}

WorkItemConfigurationsClientGetItemResponse contains the response from method WorkItemConfigurationsClient.GetItem.

type WorkItemConfigurationsClientListOptions added in v0.2.0

type WorkItemConfigurationsClientListOptions struct {
}

WorkItemConfigurationsClientListOptions contains the optional parameters for the WorkItemConfigurationsClient.List method.

type WorkItemConfigurationsClientListResponse added in v0.2.0

type WorkItemConfigurationsClientListResponse struct {
	WorkItemConfigurationsListResult
}

WorkItemConfigurationsClientListResponse contains the response from method WorkItemConfigurationsClient.List.

type WorkItemConfigurationsClientUpdateItemOptions added in v0.2.0

type WorkItemConfigurationsClientUpdateItemOptions struct {
}

WorkItemConfigurationsClientUpdateItemOptions contains the optional parameters for the WorkItemConfigurationsClient.UpdateItem method.

type WorkItemConfigurationsClientUpdateItemResponse added in v0.2.0

type WorkItemConfigurationsClientUpdateItemResponse struct {
	WorkItemConfiguration
}

WorkItemConfigurationsClientUpdateItemResponse contains the response from method WorkItemConfigurationsClient.UpdateItem.

type WorkItemConfigurationsListResult

type WorkItemConfigurationsListResult struct {
	// READ-ONLY; An array of work item configurations.
	Value []*WorkItemConfiguration `json:"value,omitempty" azure:"ro"`
}

WorkItemConfigurationsListResult - Work item configuration list result.

type WorkItemCreateConfiguration

type WorkItemCreateConfiguration struct {
	// Serialized JSON object for detailed properties
	ConnectorDataConfiguration *string `json:"ConnectorDataConfiguration,omitempty"`

	// Unique connector id
	ConnectorID *string `json:"ConnectorId,omitempty"`

	// Boolean indicating validate only
	ValidateOnly *bool `json:"ValidateOnly,omitempty"`

	// Custom work item properties
	WorkItemProperties map[string]*string `json:"WorkItemProperties,omitempty"`
}

WorkItemCreateConfiguration - Work item configuration creation payload

func (WorkItemCreateConfiguration) MarshalJSON

func (w WorkItemCreateConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkItemCreateConfiguration.

type Workbook

type Workbook struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Resource etag
	Etag *string `json:"etag,omitempty"`

	// Identity used for BYOS
	Identity *WorkbookResourceIdentity `json:"identity,omitempty"`

	// The kind of workbook. Only valid value is shared.
	Kind *Kind `json:"kind,omitempty"`

	// Metadata describing a workbook for an Azure resource.
	Properties *WorkbookProperties `json:"properties,omitempty"`

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

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

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

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Workbook - An Application Insights workbook definition.

func (Workbook) MarshalJSON

func (w Workbook) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Workbook.

type WorkbookError

type WorkbookError struct {
	// The error details.
	Error *WorkbookErrorDefinition `json:"error,omitempty"`
}

WorkbookError - Error response.

type WorkbookErrorDefinition

type WorkbookErrorDefinition struct {
	// READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; Internal error details.
	InnerError interface{} `json:"innerError,omitempty" azure:"ro"`

	// READ-ONLY; Description of the error.
	Message *string `json:"message,omitempty" azure:"ro"`
}

WorkbookErrorDefinition - Error definition.

type WorkbookInnerErrorTrace

type WorkbookInnerErrorTrace struct {
	// READ-ONLY; detailed error trace
	Trace []*string `json:"trace,omitempty" azure:"ro"`
}

WorkbookInnerErrorTrace - Error details

type WorkbookProperties

type WorkbookProperties struct {
	// REQUIRED; Workbook category, as defined by the user at creation time.
	Category *string `json:"category,omitempty"`

	// REQUIRED; The user-defined name (display name) of the workbook.
	DisplayName *string `json:"displayName,omitempty"`

	// REQUIRED; Configuration of this particular workbook. Configuration data is a string containing valid JSON
	SerializedData *string `json:"serializedData,omitempty"`

	// The description of the workbook.
	Description *string `json:"description,omitempty"`

	// ResourceId for a source resource.
	SourceID *string `json:"sourceId,omitempty"`

	// The resourceId to the storage account when bring your own storage is used
	StorageURI *string `json:"storageUri,omitempty"`

	// Being deprecated, please use the other tags field
	Tags []*string `json:"tags,omitempty"`

	// Workbook schema version format, like 'Notebook/1.0', which should match the workbook in serializedData
	Version *string `json:"version,omitempty"`

	// READ-ONLY; The unique revision id for this workbook definition
	Revision *string `json:"revision,omitempty" azure:"ro"`

	// READ-ONLY; Date and time in UTC of the last modification that was made to this workbook definition.
	TimeModified *time.Time `json:"timeModified,omitempty" azure:"ro"`

	// READ-ONLY; Unique user id of the specific user that owns this workbook.
	UserID *string `json:"userId,omitempty" azure:"ro"`
}

WorkbookProperties - Properties that contain a workbook.

func (WorkbookProperties) MarshalJSON

func (w WorkbookProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkbookProperties.

func (*WorkbookProperties) UnmarshalJSON

func (w *WorkbookProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookProperties.

type WorkbookPropertiesUpdateParameters

type WorkbookPropertiesUpdateParameters struct {
	// Workbook category, as defined by the user at creation time.
	Category *string `json:"category,omitempty"`

	// The description of the workbook.
	Description *string `json:"description,omitempty"`

	// The user-defined name (display name) of the workbook.
	DisplayName *string `json:"displayName,omitempty"`

	// The unique revision id for this workbook definition
	Revision *string `json:"revision,omitempty"`

	// Configuration of this particular workbook. Configuration data is a string containing valid JSON
	SerializedData *string `json:"serializedData,omitempty"`

	// A list of 0 or more tags that are associated with this workbook definition
	Tags []*string `json:"tags,omitempty"`
}

WorkbookPropertiesUpdateParameters - Properties that contain a workbook for PATCH operation.

func (WorkbookPropertiesUpdateParameters) MarshalJSON

func (w WorkbookPropertiesUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkbookPropertiesUpdateParameters.

type WorkbookResource

type WorkbookResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Resource etag
	Etag *string `json:"etag,omitempty"`

	// Identity used for BYOS
	Identity *WorkbookResourceIdentity `json:"identity,omitempty"`

	// The kind of workbook. Only valid value is shared.
	Kind *Kind `json:"kind,omitempty"`

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

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

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

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

WorkbookResource - An azure resource object

func (WorkbookResource) MarshalJSON

func (w WorkbookResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkbookResource.

type WorkbookResourceIdentity

type WorkbookResourceIdentity struct {
	// REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
	Type *ManagedServiceIdentityType `json:"type,omitempty"`

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

	// READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned
	// identity.
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

WorkbookResourceIdentity - Identity used for BYOS

func (WorkbookResourceIdentity) MarshalJSON added in v0.2.0

func (w WorkbookResourceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkbookResourceIdentity.

type WorkbookTemplate

type WorkbookTemplate struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

	// Metadata describing a workbook template for an Azure resource.
	Properties *WorkbookTemplateProperties `json:"properties,omitempty"`

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

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

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

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

WorkbookTemplate - An Application Insights workbook template definition.

func (WorkbookTemplate) MarshalJSON

func (w WorkbookTemplate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkbookTemplate.

type WorkbookTemplateError

type WorkbookTemplateError struct {
	// Error message object that will indicate why the operation failed.
	Error *WorkbookTemplateErrorBody `json:"error,omitempty"`
}

WorkbookTemplateError - Error message that will indicate why the operation failed.

type WorkbookTemplateErrorBody

type WorkbookTemplateErrorBody struct {
	// Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
	Code *string `json:"code,omitempty"`

	// The list of invalid fields send in request, in case of validation error.
	Details []*WorkbookTemplateErrorFieldContract `json:"details,omitempty"`

	// Human-readable representation of the error.
	Message *string `json:"message,omitempty"`
}

WorkbookTemplateErrorBody - Error message body that will indicate why the operation failed.

type WorkbookTemplateErrorFieldContract

type WorkbookTemplateErrorFieldContract struct {
	// Property level error code.
	Code *string `json:"code,omitempty"`

	// Human-readable representation of property-level error.
	Message *string `json:"message,omitempty"`

	// Property name.
	Target *string `json:"target,omitempty"`
}

WorkbookTemplateErrorFieldContract - Error Field contract.

type WorkbookTemplateGallery

type WorkbookTemplateGallery struct {
	// Category for the gallery.
	Category *string `json:"category,omitempty"`

	// Name of the workbook template in the gallery.
	Name *string `json:"name,omitempty"`

	// Order of the template within the gallery.
	Order *int32 `json:"order,omitempty"`

	// Azure resource type supported by the gallery.
	ResourceType *string `json:"resourceType,omitempty"`

	// Type of workbook supported by the workbook template.
	Type *string `json:"type,omitempty"`
}

WorkbookTemplateGallery - Gallery information for a workbook template.

type WorkbookTemplateLocalizedGallery

type WorkbookTemplateLocalizedGallery struct {
	// Workbook galleries supported by the template.
	Galleries []*WorkbookTemplateGallery `json:"galleries,omitempty"`

	// Valid JSON object containing workbook template payload.
	TemplateData interface{} `json:"templateData,omitempty"`
}

WorkbookTemplateLocalizedGallery - Localized template data and gallery information.

func (WorkbookTemplateLocalizedGallery) MarshalJSON

func (w WorkbookTemplateLocalizedGallery) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateLocalizedGallery.

type WorkbookTemplateProperties

type WorkbookTemplateProperties struct {
	// REQUIRED; Workbook galleries supported by the template.
	Galleries []*WorkbookTemplateGallery `json:"galleries,omitempty"`

	// REQUIRED; Valid JSON object containing workbook template payload.
	TemplateData interface{} `json:"templateData,omitempty"`

	// Information about the author of the workbook template.
	Author *string `json:"author,omitempty"`

	// Key value pair of localized gallery. Each key is the locale code of languages supported by the Azure portal.
	Localized map[string][]*WorkbookTemplateLocalizedGallery `json:"localized,omitempty"`

	// Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode.
	Priority *int32 `json:"priority,omitempty"`
}

WorkbookTemplateProperties - Properties that contain a workbook template.

func (WorkbookTemplateProperties) MarshalJSON

func (w WorkbookTemplateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateProperties.

type WorkbookTemplateResource

type WorkbookTemplateResource struct {
	// REQUIRED; Resource location
	Location *string `json:"location,omitempty"`

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

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

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

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

WorkbookTemplateResource - An azure resource object

func (WorkbookTemplateResource) MarshalJSON

func (w WorkbookTemplateResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateResource.

type WorkbookTemplateUpdateParameters

type WorkbookTemplateUpdateParameters struct {
	// Metadata describing a workbook for an Azure resource.
	Properties *WorkbookTemplateProperties `json:"properties,omitempty"`

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

WorkbookTemplateUpdateParameters - The parameters that can be provided when updating workbook template.

func (WorkbookTemplateUpdateParameters) MarshalJSON

func (w WorkbookTemplateUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateUpdateParameters.

type WorkbookTemplatesClient

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

WorkbookTemplatesClient contains the methods for the WorkbookTemplates group. Don't use this type directly, use NewWorkbookTemplatesClient() instead.

func NewWorkbookTemplatesClient

func NewWorkbookTemplatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkbookTemplatesClient, error)

NewWorkbookTemplatesClient creates a new instance of WorkbookTemplatesClient 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 (*WorkbookTemplatesClient) CreateOrUpdate

func (client *WorkbookTemplatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, workbookTemplateProperties WorkbookTemplate, options *WorkbookTemplatesClientCreateOrUpdateOptions) (WorkbookTemplatesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create a new workbook template. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-11-20 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. workbookTemplateProperties - Properties that need to be specified to create a new workbook. options - WorkbookTemplatesClientCreateOrUpdateOptions contains the optional parameters for the WorkbookTemplatesClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateAdd.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbookTemplatesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"my-resource-group",
		"testtemplate2",
		armapplicationinsights.WorkbookTemplate{
			Location: to.Ptr("west us"),
			Properties: &armapplicationinsights.WorkbookTemplateProperties{
				Author: to.Ptr("Contoso"),
				Galleries: []*armapplicationinsights.WorkbookTemplateGallery{
					{
						Name:         to.Ptr("Simple Template"),
						Type:         to.Ptr("tsg"),
						Category:     to.Ptr("Failures"),
						Order:        to.Ptr[int32](100),
						ResourceType: to.Ptr("microsoft.insights/components"),
					}},
				Priority: to.Ptr[int32](1),
				TemplateData: map[string]interface{}{
					"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json",
					"items": []interface{}{
						map[string]interface{}{
							"name": "text - 2",
							"type": float64(1),
							"content": map[string]interface{}{
								"json": "## New workbook\n---\n\nWelcome to your new workbook.  This area will display text formatted as markdown.\n\n\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.",
							},
						},
						map[string]interface{}{
							"name": "query - 2",
							"type": float64(3),
							"content": map[string]interface{}{
								"exportToExcelOptions": "visible",
								"query":                "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
								"queryType":            float64(0),
								"resourceType":         "microsoft.operationalinsights/workspaces",
								"size":                 float64(1),
								"version":              "KqlItem/1.0",
							},
						},
					},
					"styleSettings": map[string]interface{}{},
					"version":       "Notebook/1.0",
				},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkbookTemplatesClient) Delete

Delete - Delete a workbook template. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-11-20 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - WorkbookTemplatesClientDeleteOptions contains the optional parameters for the WorkbookTemplatesClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbookTemplatesClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"my-resource-group",
		"my-template-resource",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*WorkbookTemplatesClient) Get

Get - Get a single workbook template by its resourceName. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-11-20 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - WorkbookTemplatesClientGetOptions contains the optional parameters for the WorkbookTemplatesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbookTemplatesClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"my-resource-group",
		"my-resource-name",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkbookTemplatesClient) NewListByResourceGroupPager added in v0.4.0

NewListByResourceGroupPager - Get all Workbook templates defined within a specified resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-11-20 resourceGroupName - The name of the resource group. The name is case insensitive. options - WorkbookTemplatesClientListByResourceGroupOptions contains the optional parameters for the WorkbookTemplatesClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplatesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbookTemplatesClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("my-resource-group",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*WorkbookTemplatesClient) Update

Update - Updates a workbook template that has already been added. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-11-20 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - WorkbookTemplatesClientUpdateOptions contains the optional parameters for the WorkbookTemplatesClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbookTemplatesClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"my-resource-group",
		"my-template-resource",
		&armapplicationinsights.WorkbookTemplatesClientUpdateOptions{WorkbookTemplateUpdateParameters: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type WorkbookTemplatesClientCreateOrUpdateOptions added in v0.2.0

type WorkbookTemplatesClientCreateOrUpdateOptions struct {
}

WorkbookTemplatesClientCreateOrUpdateOptions contains the optional parameters for the WorkbookTemplatesClient.CreateOrUpdate method.

type WorkbookTemplatesClientCreateOrUpdateResponse added in v0.2.0

type WorkbookTemplatesClientCreateOrUpdateResponse struct {
	WorkbookTemplate
}

WorkbookTemplatesClientCreateOrUpdateResponse contains the response from method WorkbookTemplatesClient.CreateOrUpdate.

type WorkbookTemplatesClientDeleteOptions added in v0.2.0

type WorkbookTemplatesClientDeleteOptions struct {
}

WorkbookTemplatesClientDeleteOptions contains the optional parameters for the WorkbookTemplatesClient.Delete method.

type WorkbookTemplatesClientDeleteResponse added in v0.2.0

type WorkbookTemplatesClientDeleteResponse struct {
}

WorkbookTemplatesClientDeleteResponse contains the response from method WorkbookTemplatesClient.Delete.

type WorkbookTemplatesClientGetOptions added in v0.2.0

type WorkbookTemplatesClientGetOptions struct {
}

WorkbookTemplatesClientGetOptions contains the optional parameters for the WorkbookTemplatesClient.Get method.

type WorkbookTemplatesClientGetResponse added in v0.2.0

type WorkbookTemplatesClientGetResponse struct {
	WorkbookTemplate
}

WorkbookTemplatesClientGetResponse contains the response from method WorkbookTemplatesClient.Get.

type WorkbookTemplatesClientListByResourceGroupOptions added in v0.2.0

type WorkbookTemplatesClientListByResourceGroupOptions struct {
}

WorkbookTemplatesClientListByResourceGroupOptions contains the optional parameters for the WorkbookTemplatesClient.ListByResourceGroup method.

type WorkbookTemplatesClientListByResourceGroupResponse added in v0.2.0

type WorkbookTemplatesClientListByResourceGroupResponse struct {
	WorkbookTemplatesListResult
}

WorkbookTemplatesClientListByResourceGroupResponse contains the response from method WorkbookTemplatesClient.ListByResourceGroup.

type WorkbookTemplatesClientUpdateOptions added in v0.2.0

type WorkbookTemplatesClientUpdateOptions struct {
	// Properties that need to be specified to patch a workbook template.
	WorkbookTemplateUpdateParameters *WorkbookTemplateUpdateParameters
}

WorkbookTemplatesClientUpdateOptions contains the optional parameters for the WorkbookTemplatesClient.Update method.

type WorkbookTemplatesClientUpdateResponse added in v0.2.0

type WorkbookTemplatesClientUpdateResponse struct {
	WorkbookTemplate
}

WorkbookTemplatesClientUpdateResponse contains the response from method WorkbookTemplatesClient.Update.

type WorkbookTemplatesListResult

type WorkbookTemplatesListResult struct {
	// An array of workbook templates.
	Value []*WorkbookTemplate `json:"value,omitempty"`
}

WorkbookTemplatesListResult - WorkbookTemplate list result.

type WorkbookUpdateParameters

type WorkbookUpdateParameters struct {
	// The kind of workbook. Only valid value is shared.
	Kind *SharedTypeKind `json:"kind,omitempty"`

	// Metadata describing a workbook for an Azure resource.
	Properties *WorkbookPropertiesUpdateParameters `json:"properties,omitempty"`

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

WorkbookUpdateParameters - The parameters that can be provided when updating workbook properties properties.

func (WorkbookUpdateParameters) MarshalJSON

func (w WorkbookUpdateParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WorkbookUpdateParameters.

type WorkbooksClient

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

WorkbooksClient contains the methods for the Workbooks group. Don't use this type directly, use NewWorkbooksClient() instead.

func NewWorkbooksClient

func NewWorkbooksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkbooksClient, error)

NewWorkbooksClient creates a new instance of WorkbooksClient 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 (*WorkbooksClient) CreateOrUpdate

func (client *WorkbooksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook, options *WorkbooksClientCreateOrUpdateOptions) (WorkbooksClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create a new workbook. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. workbookProperties - Properties that need to be specified to create a new workbook. options - WorkbooksClientCreateOrUpdateOptions contains the optional parameters for the WorkbooksClient.CreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookAdd.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx,
		"my-resource-group",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		armapplicationinsights.Workbook{
			Location: to.Ptr("westus"),
			Tags: map[string]*string{
				"TagSample01": to.Ptr("sample01"),
				"TagSample02": to.Ptr("sample02"),
			},
			Kind: to.Ptr(armapplicationinsights.KindShared),
			Properties: &armapplicationinsights.WorkbookProperties{
				Description:    to.Ptr("Sample workbook"),
				Category:       to.Ptr("workbook"),
				DisplayName:    to.Ptr("Sample workbook"),
				SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook.  This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}"),
			},
		},
		&armapplicationinsights.WorkbooksClientCreateOrUpdateOptions{SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkbooksClient) Delete

func (client *WorkbooksClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientDeleteOptions) (WorkbooksClientDeleteResponse, error)

Delete - Delete a workbook. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - WorkbooksClientDeleteOptions contains the optional parameters for the WorkbooksClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"my-resource-group",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*WorkbooksClient) Get

func (client *WorkbooksClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientGetOptions) (WorkbooksClientGetResponse, error)

Get - Get a single workbook by its resourceName. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - WorkbooksClientGetOptions contains the optional parameters for the WorkbooksClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"my-resource-group",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		&armapplicationinsights.WorkbooksClientGetOptions{CanFetchContent: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkbooksClient) NewListByResourceGroupPager added in v0.4.0

func (client *WorkbooksClient) NewListByResourceGroupPager(resourceGroupName string, category CategoryType, options *WorkbooksClientListByResourceGroupOptions) *runtime.Pager[WorkbooksClientListByResourceGroupResponse]

NewListByResourceGroupPager - Get all Workbooks defined within a specified resource group and category. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-01 resourceGroupName - The name of the resource group. The name is case insensitive. category - Category of workbook to return. options - WorkbooksClientListByResourceGroupOptions contains the optional parameters for the WorkbooksClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("my-resource-group",
		armapplicationinsights.CategoryTypeWorkbook,
		&armapplicationinsights.WorkbooksClientListByResourceGroupOptions{Tags: []string{},
			SourceID:        to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"),
			CanFetchContent: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*WorkbooksClient) NewListBySubscriptionPager added in v0.4.0

NewListBySubscriptionPager - Get all Workbooks defined within a specified subscription and category. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-01 category - Category of workbook to return. options - WorkbooksClientListBySubscriptionOptions contains the optional parameters for the WorkbooksClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbooksList2.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(armapplicationinsights.CategoryTypeWorkbook,
		&armapplicationinsights.WorkbooksClientListBySubscriptionOptions{Tags: []string{},
			CanFetchContent: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*WorkbooksClient) NewRevisionsListPager added in v0.4.0

func (client *WorkbooksClient) NewRevisionsListPager(resourceGroupName string, resourceName string, options *WorkbooksClientRevisionsListOptions) *runtime.Pager[WorkbooksClientRevisionsListResponse]

NewRevisionsListPager - Get the revisions for the workbook defined by its resourceName. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - WorkbooksClientRevisionsListOptions contains the optional parameters for the WorkbooksClient.RevisionsList method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookRevisionsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewRevisionsListPager("my-resource-group",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*WorkbooksClient) RevisionGet

func (client *WorkbooksClient) RevisionGet(ctx context.Context, resourceGroupName string, resourceName string, revisionID string, options *WorkbooksClientRevisionGetOptions) (WorkbooksClientRevisionGetResponse, error)

RevisionGet - Get a single workbook revision defined by its revisionId. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. revisionID - The id of the workbook's revision. options - WorkbooksClientRevisionGetOptions contains the optional parameters for the WorkbooksClient.RevisionGet method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookRevisionGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.RevisionGet(ctx,
		"my-resource-group",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		"1e2f8435b98248febee70c64ac22e1ab",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*WorkbooksClient) Update

func (client *WorkbooksClient) Update(ctx context.Context, resourceGroupName string, resourceName string, options *WorkbooksClientUpdateOptions) (WorkbooksClientUpdateResponse, error)

Update - Updates a workbook that has already been added. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2021-08-01 resourceGroupName - The name of the resource group. The name is case insensitive. resourceName - The name of the Application Insights component resource. options - WorkbooksClientUpdateOptions contains the optional parameters for the WorkbooksClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-08-01/examples/WorkbookManagedUpdate.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/applicationinsights/armapplicationinsights"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armapplicationinsights.NewWorkbooksClient("6b643656-33eb-422f-aee8-3ac145d124af", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Update(ctx,
		"my-resource-group",
		"deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
		&armapplicationinsights.WorkbooksClientUpdateOptions{SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group"),
			WorkbookUpdateParameters: nil,
		})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type WorkbooksClientCreateOrUpdateOptions added in v0.2.0

type WorkbooksClientCreateOrUpdateOptions struct {
	// Azure Resource Id that will fetch all linked workbooks.
	SourceID *string
}

WorkbooksClientCreateOrUpdateOptions contains the optional parameters for the WorkbooksClient.CreateOrUpdate method.

type WorkbooksClientCreateOrUpdateResponse added in v0.2.0

type WorkbooksClientCreateOrUpdateResponse struct {
	Workbook
}

WorkbooksClientCreateOrUpdateResponse contains the response from method WorkbooksClient.CreateOrUpdate.

type WorkbooksClientDeleteOptions added in v0.2.0

type WorkbooksClientDeleteOptions struct {
}

WorkbooksClientDeleteOptions contains the optional parameters for the WorkbooksClient.Delete method.

type WorkbooksClientDeleteResponse added in v0.2.0

type WorkbooksClientDeleteResponse struct {
}

WorkbooksClientDeleteResponse contains the response from method WorkbooksClient.Delete.

type WorkbooksClientGetOptions added in v0.2.0

type WorkbooksClientGetOptions struct {
	// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content
	// for workbooks.
	CanFetchContent *bool
}

WorkbooksClientGetOptions contains the optional parameters for the WorkbooksClient.Get method.

type WorkbooksClientGetResponse added in v0.2.0

type WorkbooksClientGetResponse struct {
	Workbook
}

WorkbooksClientGetResponse contains the response from method WorkbooksClient.Get.

type WorkbooksClientListByResourceGroupOptions added in v0.2.0

type WorkbooksClientListByResourceGroupOptions struct {
	// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content
	// for workbooks.
	CanFetchContent *bool
	// Azure Resource Id that will fetch all linked workbooks.
	SourceID *string
	// Tags presents on each workbook returned.
	Tags []string
}

WorkbooksClientListByResourceGroupOptions contains the optional parameters for the WorkbooksClient.ListByResourceGroup method.

type WorkbooksClientListByResourceGroupResponse added in v0.2.0

type WorkbooksClientListByResourceGroupResponse struct {
	WorkbooksListResult
}

WorkbooksClientListByResourceGroupResponse contains the response from method WorkbooksClient.ListByResourceGroup.

type WorkbooksClientListBySubscriptionOptions added in v0.2.0

type WorkbooksClientListBySubscriptionOptions struct {
	// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content
	// for workbooks.
	CanFetchContent *bool
	// Tags presents on each workbook returned.
	Tags []string
}

WorkbooksClientListBySubscriptionOptions contains the optional parameters for the WorkbooksClient.ListBySubscription method.

type WorkbooksClientListBySubscriptionResponse added in v0.2.0

type WorkbooksClientListBySubscriptionResponse struct {
	WorkbooksListResult
}

WorkbooksClientListBySubscriptionResponse contains the response from method WorkbooksClient.ListBySubscription.

type WorkbooksClientRevisionGetOptions added in v0.2.0

type WorkbooksClientRevisionGetOptions struct {
}

WorkbooksClientRevisionGetOptions contains the optional parameters for the WorkbooksClient.RevisionGet method.

type WorkbooksClientRevisionGetResponse added in v0.2.0

type WorkbooksClientRevisionGetResponse struct {
	Workbook
}

WorkbooksClientRevisionGetResponse contains the response from method WorkbooksClient.RevisionGet.

type WorkbooksClientRevisionsListOptions added in v0.2.0

type WorkbooksClientRevisionsListOptions struct {
}

WorkbooksClientRevisionsListOptions contains the optional parameters for the WorkbooksClient.RevisionsList method.

type WorkbooksClientRevisionsListResponse added in v0.2.0

type WorkbooksClientRevisionsListResponse struct {
	WorkbooksListResult
}

WorkbooksClientRevisionsListResponse contains the response from method WorkbooksClient.RevisionsList.

type WorkbooksClientUpdateOptions added in v0.2.0

type WorkbooksClientUpdateOptions struct {
	// Azure Resource Id that will fetch all linked workbooks.
	SourceID *string
	// Properties that need to be specified to create a new workbook.
	WorkbookUpdateParameters *WorkbookUpdateParameters
}

WorkbooksClientUpdateOptions contains the optional parameters for the WorkbooksClient.Update method.

type WorkbooksClientUpdateResponse added in v0.2.0

type WorkbooksClientUpdateResponse struct {
	Workbook
}

WorkbooksClientUpdateResponse contains the response from method WorkbooksClient.Update.

type WorkbooksListResult

type WorkbooksListResult struct {
	NextLink *string `json:"nextLink,omitempty"`

	// READ-ONLY; An array of workbooks.
	Value []*Workbook `json:"value,omitempty" azure:"ro"`
}

WorkbooksListResult - Workbook list result.

Jump to

Keyboard shortcuts

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