armapplicationinsights

package module
v2.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 15 Imported by: 5

README

Azure Application Insight Module for Go

PkgGoDev

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

Source code

Getting started

Prerequisites

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

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure 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.

Client Factory

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

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

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

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

Clients

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

client := clientFactory.NewAPIKeysClient()

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.

func (*APIKeyRequest) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller 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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIKeysClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentAPIKey = armapplicationinsights.ComponentAPIKey{
// 	Name: to.Ptr("test"),
// 	APIKey: to.Ptr("eip8wlzuzlf4wzczhnzao54zcswew25azs4kadhb"),
// 	CreatedDate: to.Ptr("Thu, 28 Sep 2017 16:58:52 GMT"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/Microsoft.Insights/components/my-component/apikeys/fe2e0138-47c1-46c5-8726-872f54c1ca08"),
// 	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")},
// 		}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIKeysClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentAPIKey = armapplicationinsights.ComponentAPIKey{
// 	Name: to.Ptr("test2"),
// 	CreatedDate: to.Ptr("Thu, 28 Sep 2017 16:59:18 GMT"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/Microsoft.Insights/components/my-component/apikeys/bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a"),
// 	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/draft"),
// 		to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/extendqueries"),
// 		to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/search"),
// 		to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/aggregate"),
// 		to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/agentconfig")},
// 		LinkedWriteProperties: []*string{
// 		},
// 	}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/APIKeysGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAPIKeysClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentAPIKey = armapplicationinsights.ComponentAPIKey{
// 	Name: to.Ptr("test2"),
// 	CreatedDate: to.Ptr("Thu, 28 Sep 2017 16:59:18 GMT"),
// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/Microsoft.Insights/components/my-component/apikeys/bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a"),
// 	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/draft"),
// 		to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/extendqueries"),
// 		to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/search"),
// 		to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/aggregate"),
// 		to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/agentconfig")},
// 		LinkedWriteProperties: []*string{
// 		},
// 	}
Output:

func (*APIKeysClient) NewListPager

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.

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.NewListPager method.
Example

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAPIKeysClient().NewListPager("my-resource-group", "my-component", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ComponentAPIKeyListResult = armapplicationinsights.ComponentAPIKeyListResult{
	// 	Value: []*armapplicationinsights.ComponentAPIKey{
	// 		{
	// 			Name: to.Ptr("test"),
	// 			CreatedDate: to.Ptr("Thu, 28 Sep 2017 16:58:52 GMT"),
	// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/Microsoft.Insights/components/my-component/apikeys/fe2e0138-47c1-46c5-8726-872f54c1ca08"),
	// 			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/draft"),
	// 				to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/extendqueries"),
	// 				to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/search"),
	// 				to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/aggregate"),
	// 				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")},
	// 				},
	// 				{
	// 					Name: to.Ptr("test2"),
	// 					CreatedDate: to.Ptr("Thu, 28 Sep 2017 16:59:18 GMT"),
	// 					ID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/Microsoft.Insights/components/my-component/apikeys/bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a"),
	// 					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/draft"),
	// 						to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/extendqueries"),
	// 						to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/search"),
	// 						to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/aggregate"),
	// 						to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/agentconfig")},
	// 						LinkedWriteProperties: []*string{
	// 						},
	// 				}},
	// 			}
}
Output:

type APIKeysClientCreateOptions

type APIKeysClientCreateOptions struct {
}

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

type APIKeysClientCreateResponse

type APIKeysClientCreateResponse struct {
	ComponentAPIKey
}

APIKeysClientCreateResponse contains the response from method APIKeysClient.Create.

type APIKeysClientDeleteOptions

type APIKeysClientDeleteOptions struct {
}

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

type APIKeysClientDeleteResponse

type APIKeysClientDeleteResponse struct {
	ComponentAPIKey
}

APIKeysClientDeleteResponse contains the response from method APIKeysClient.Delete.

type APIKeysClientGetOptions

type APIKeysClientGetOptions struct {
}

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

type APIKeysClientGetResponse

type APIKeysClientGetResponse struct {
	ComponentAPIKey
}

APIKeysClientGetResponse contains the response from method APIKeysClient.Get.

type APIKeysClientListOptions

type APIKeysClientListOptions struct {
}

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

type APIKeysClientListResponse

type APIKeysClientListResponse struct {
	ComponentAPIKeyListResult
}

APIKeysClientListResponse contains the response from method APIKeysClient.NewListPager.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAnalyticsItemsClient().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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAnalyticsItemsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentAnalyticsItem = 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"),
// 	ID: to.Ptr("3466c160-4a10-4df8-afdf-0007f3f6dee5"),
// 	Name: to.Ptr("Exceptions - New in the last 24 hours"),
// 	Scope: to.Ptr(armapplicationinsights.ItemScopeShared),
// 	TimeCreated: to.Ptr("2018-02-12T11:44:39.2980634Z"),
// 	TimeModified: to.Ptr("2018-02-14T13:13:19.3381394Z"),
// 	Type: to.Ptr(armapplicationinsights.ItemTypeQuery),
// 	Version: to.Ptr("1.0"),
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAnalyticsItemsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentAnalyticsItemArray = []*armapplicationinsights.ComponentAnalyticsItem{
// 	{
// 		Content: to.Ptr("//Top 10 countries by traffic in the past 24 hours\nrequests \n | where  timestamp > ago(24h) \n | summarize count() by client_CountryOrRegion\n | top 10 by count_ \n | render piechart"),
// 		ID: to.Ptr("b753348d-333a-4678-a684-c0e9090713b7"),
// 		Name: to.Ptr("1"),
// 		Scope: to.Ptr(armapplicationinsights.ItemScopeUser),
// 		TimeModified: to.Ptr("2017-06-29T10:27:03Z"),
// 		Type: to.Ptr(armapplicationinsights.ItemTypeQuery),
// 		Version: to.Ptr("1.0"),
// 	},
// 	{
// 		Content: to.Ptr("//Top 10 countries by traffic in the past 24 hours\nrequests \n | where  timestamp > ago(24h) \n | summarize count() by client_CountryOrRegion\n | top 10 by count_ \n | render piechart"),
// 		ID: to.Ptr("0d2f1b19-04b2-4c93-bc6f-2466b23c5284"),
// 		Name: to.Ptr("4"),
// 		Scope: to.Ptr(armapplicationinsights.ItemScopeUser),
// 		TimeModified: to.Ptr("2017-06-29T10:27:13Z"),
// 		Type: to.Ptr(armapplicationinsights.ItemTypeQuery),
// 		Version: to.Ptr("1.0"),
// 	},
// 	{
// 		Content: to.Ptr("//Top 10 countries by traffic in the past 24 hours\nrequests \n | where  timestamp > ago(24h) \n | summarize count() by client_CountryOrRegion\n | top 10 by count_ \n | render piechart"),
// 		ID: to.Ptr("3d17bebb-0b20-4b58-9bbd-22aeed70be51"),
// 		Name: to.Ptr("2"),
// 		Scope: to.Ptr(armapplicationinsights.ItemScopeUser),
// 		TimeModified: to.Ptr("2018-02-10T23:21:05.9952874Z"),
// 		Type: to.Ptr(armapplicationinsights.ItemTypeQuery),
// 		Version: to.Ptr("1.0"),
// 	},
// 	{
// 		Content: to.Ptr("//Top 10 countries by traffic in the past 24 hours\nrequests \n | where  timestamp > ago(24h) \n | summarize count() by client_CountryOrRegion\n | top 10 by count_ \n | render piechart"),
// 		ID: to.Ptr("2be491c6-10d9-4cf6-9490-2a7ce7270c54"),
// 		Name: to.Ptr("5"),
// 		Scope: to.Ptr(armapplicationinsights.ItemScopeUser),
// 		TimeModified: to.Ptr("2017-06-29T10:27:17Z"),
// 		Type: to.Ptr(armapplicationinsights.ItemTypeQuery),
// 		Version: to.Ptr("1.0"),
// 	},
// 	{
// 		Content: to.Ptr("//Top 10 countries by traffic in the past 24 hours\nrequests \n | where  timestamp > ago(24h) \n | summarize count() by client_CountryOrRegion\n | top 10 by count_ \n | render piechart"),
// 		ID: to.Ptr("d8f83601-4a40-4dc1-8516-0a28dcb74420"),
// 		Name: to.Ptr("8"),
// 		Scope: to.Ptr(armapplicationinsights.ItemScopeUser),
// 		TimeCreated: to.Ptr("2018-02-10T23:20:19.0174631Z"),
// 		TimeModified: to.Ptr("2018-02-10T23:20:19.0174631Z"),
// 		Type: to.Ptr(armapplicationinsights.ItemTypeQuery),
// 		Version: to.Ptr("1.0"),
// 	},
// 	{
// 		Content: to.Ptr("let newExceptionsTimeRange = 7d;\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"),
// 		ID: to.Ptr("fd3afe4d-9139-4c76-9b47-81d0fada977b"),
// 		Name: to.Ptr("Exceptions - New in the last 7 days"),
// 		Scope: to.Ptr(armapplicationinsights.ItemScopeUser),
// 		TimeCreated: to.Ptr("2018-02-11T22:05:57.6019354Z"),
// 		TimeModified: to.Ptr("2018-02-12T11:01:15.5687326Z"),
// 		Type: to.Ptr(armapplicationinsights.ItemTypeQuery),
// 		Version: to.Ptr("1.0"),
// 	},
// 	{
// 		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"),
// 		ID: to.Ptr("3466c160-4a10-4df8-afdf-0007f3f6dee5"),
// 		Name: to.Ptr("Exceptions - New in the last 24 hours"),
// 		Scope: to.Ptr(armapplicationinsights.ItemScopeShared),
// 		TimeCreated: to.Ptr("2018-02-12T11:44:39.2980634Z"),
// 		TimeModified: to.Ptr("2018-02-14T13:13:19.3381394Z"),
// 		Type: to.Ptr(armapplicationinsights.ItemTypeQuery),
// 		Version: to.Ptr("1.0"),
// }}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnalyticsItemPut.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAnalyticsItemsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentAnalyticsItem = 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"),
// 	ID: to.Ptr("3466c160-4a10-4df8-afdf-0007f3f6dee5"),
// 	Name: to.Ptr("Exceptions - New in the last 24 hours"),
// 	Scope: to.Ptr(armapplicationinsights.ItemScopeShared),
// 	TimeCreated: to.Ptr("2018-02-12T11:44:39.2980634Z"),
// 	TimeModified: to.Ptr("2018-02-14T13:13:19.3381394Z"),
// 	Type: to.Ptr(armapplicationinsights.ItemTypeQuery),
// 	Version: to.Ptr("1.0"),
// }
Output:

type AnalyticsItemsClientDeleteOptions

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

type AnalyticsItemsClientDeleteResponse struct {
}

AnalyticsItemsClientDeleteResponse contains the response from method AnalyticsItemsClient.Delete.

type AnalyticsItemsClientGetOptions

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

type AnalyticsItemsClientGetResponse struct {
	ComponentAnalyticsItem
}

AnalyticsItemsClientGetResponse contains the response from method AnalyticsItemsClient.Get.

type AnalyticsItemsClientListOptions

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

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

AnalyticsItemsClientListResponse contains the response from method AnalyticsItemsClient.List.

type AnalyticsItemsClientPutOptions

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

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

func (AnnotationError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AnnotationError.

func (*AnnotationError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AnnotationError.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAnnotationsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AnnotationArray = []*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.657+00:00"); return t}()),
// 		ID: to.Ptr("444e2c08-274a-4bbb-a89e-d77bb720f44a"),
// 		Properties: to.Ptr("{\"Comments\":\"Testing\",\"Label\":\"Success\"}"),
// }}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewAnnotationsClient().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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AnnotationsGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAnnotationsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.AnnotationArray = []*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.657+00:00"); return t}()),
// 		ID: to.Ptr("444e2c08-274a-4bbb-a89e-d77bb720f44a"),
// 		Properties: to.Ptr("{\"Comments\":\"Testing\",\"Label\":\"Success\"}"),
// }}
Output:

func (*AnnotationsClient) NewListPager

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

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.NewListPager method.
Example

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAnnotationsClient().NewListPager("my-resource-group", "my-component", "2018-02-05T00%253A30%253A00.000Z", "2018-02-06T00%253A33A00.000Z", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.AnnotationsListResult = armapplicationinsights.AnnotationsListResult{
	// }
}
Output:

type AnnotationsClientCreateOptions

type AnnotationsClientCreateOptions struct {
}

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

type AnnotationsClientCreateResponse

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

AnnotationsClientCreateResponse contains the response from method AnnotationsClient.Create.

type AnnotationsClientDeleteOptions

type AnnotationsClientDeleteOptions struct {
}

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

type AnnotationsClientDeleteResponse

type AnnotationsClientDeleteResponse struct {
}

AnnotationsClientDeleteResponse contains the response from method AnnotationsClient.Delete.

type AnnotationsClientGetOptions

type AnnotationsClientGetOptions struct {
}

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

type AnnotationsClientGetResponse

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

AnnotationsClientGetResponse contains the response from method AnnotationsClient.Get.

type AnnotationsClientListOptions

type AnnotationsClientListOptions struct {
}

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

type AnnotationsClientListResponse

type AnnotationsClientListResponse struct {
	AnnotationsListResult
}

AnnotationsClientListResponse contains the response from method AnnotationsClient.NewListPager.

type AnnotationsListResult

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

AnnotationsListResult - Annotations list result.

func (AnnotationsListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AnnotationsListResult.

func (*AnnotationsListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AnnotationsListResult.

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 ClientFactory

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

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

func NewClientFactory

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

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

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

func (*ClientFactory) NewAPIKeysClient

func (c *ClientFactory) NewAPIKeysClient() *APIKeysClient

func (*ClientFactory) NewAnalyticsItemsClient

func (c *ClientFactory) NewAnalyticsItemsClient() *AnalyticsItemsClient

func (*ClientFactory) NewAnnotationsClient

func (c *ClientFactory) NewAnnotationsClient() *AnnotationsClient

func (*ClientFactory) NewComponentAvailableFeaturesClient

func (c *ClientFactory) NewComponentAvailableFeaturesClient() *ComponentAvailableFeaturesClient

func (*ClientFactory) NewComponentCurrentBillingFeaturesClient

func (c *ClientFactory) NewComponentCurrentBillingFeaturesClient() *ComponentCurrentBillingFeaturesClient

func (*ClientFactory) NewComponentFeatureCapabilitiesClient

func (c *ClientFactory) NewComponentFeatureCapabilitiesClient() *ComponentFeatureCapabilitiesClient

func (*ClientFactory) NewComponentLinkedStorageAccountsClient

func (c *ClientFactory) NewComponentLinkedStorageAccountsClient() *ComponentLinkedStorageAccountsClient

func (*ClientFactory) NewComponentQuotaStatusClient

func (c *ClientFactory) NewComponentQuotaStatusClient() *ComponentQuotaStatusClient

func (*ClientFactory) NewComponentsClient

func (c *ClientFactory) NewComponentsClient() *ComponentsClient

func (*ClientFactory) NewExportConfigurationsClient

func (c *ClientFactory) NewExportConfigurationsClient() *ExportConfigurationsClient

func (*ClientFactory) NewFavoritesClient

func (c *ClientFactory) NewFavoritesClient() *FavoritesClient

func (*ClientFactory) NewLiveTokenClient

func (c *ClientFactory) NewLiveTokenClient() *LiveTokenClient

func (*ClientFactory) NewMyWorkbooksClient

func (c *ClientFactory) NewMyWorkbooksClient() *MyWorkbooksClient

func (*ClientFactory) NewProactiveDetectionConfigurationsClient

func (c *ClientFactory) NewProactiveDetectionConfigurationsClient() *ProactiveDetectionConfigurationsClient

func (*ClientFactory) NewWebTestLocationsClient

func (c *ClientFactory) NewWebTestLocationsClient() *WebTestLocationsClient

func (*ClientFactory) NewWebTestsClient

func (c *ClientFactory) NewWebTestsClient() *WebTestsClient

func (*ClientFactory) NewWorkItemConfigurationsClient

func (c *ClientFactory) NewWorkItemConfigurationsClient() *WorkItemConfigurationsClient

func (*ClientFactory) NewWorkbookTemplatesClient

func (c *ClientFactory) NewWorkbookTemplatesClient() *WorkbookTemplatesClient

func (*ClientFactory) NewWorkbooksClient

func (c *ClientFactory) NewWorkbooksClient() *WorkbooksClient

type Component

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

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

MarshalJSON implements the json.Marshaller interface for type Component.

func (*Component) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Component.

type ComponentAPIKey

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.

func (ComponentAPIKey) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentAPIKey.

func (*ComponentAPIKey) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentAPIKey.

type ComponentAPIKeyListResult

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.

func (ComponentAPIKeyListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentAPIKeyListResult.

func (*ComponentAPIKeyListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentAPIKeyListResult.

type ComponentAnalyticsItem

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.

func (ComponentAnalyticsItem) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentAnalyticsItem.

func (*ComponentAnalyticsItem) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentAnalyticsItem.

type ComponentAnalyticsItemProperties

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.

func (ComponentAnalyticsItemProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentAnalyticsItemProperties.

func (*ComponentAnalyticsItemProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentAnalyticsItemProperties.

type ComponentAvailableFeatures

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.

func (ComponentAvailableFeatures) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentAvailableFeatures.

func (*ComponentAvailableFeatures) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentAvailableFeatures.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/AvailableBillingFeaturesGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentAvailableFeaturesClient().Get(ctx, "my-resource-group", "my-component", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentAvailableFeatures = armapplicationinsights.ComponentAvailableFeatures{
// 	Result: []*armapplicationinsights.ComponentFeature{
// 		{
// 			Capabilities: []*armapplicationinsights.ComponentFeatureCapability{
// 				{
// 					Description: to.Ptr("Number of application hosts"),
// 					Name: to.Ptr("hostnumber"),
// 					Value: to.Ptr("Unlimited"),
// 				},
// 				{
// 					Description: to.Ptr("Included data"),
// 					MeterID: to.Ptr("acf26b15-ee92-440d-9973-9a72d77641aa"),
// 					MeterRateFrequency: to.Ptr("GB/month"),
// 					Name: to.Ptr("includeddata"),
// 					Value: to.Ptr("1"),
// 				},
// 				{
// 					Description: to.Ptr("Additional data"),
// 					MeterID: to.Ptr("b90f8b65-6c3e-43fc-9149-bdfc73b6a5b9"),
// 					MeterRateFrequency: to.Ptr("/GB"),
// 					Name: to.Ptr("additionaldata"),
// 				},
// 				{
// 					Description: to.Ptr("Data retention"),
// 					Name: to.Ptr("dataretention"),
// 					Unit: to.Ptr("days"),
// 					Value: to.Ptr("90"),
// 				},
// 				{
// 					Description: to.Ptr("Response time monitoring and diagnostics"),
// 					Name: to.Ptr("responsetimemonitoring"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Failed requests monitoring and diagnostics"),
// 					Name: to.Ptr("failedrequestsmonitoring"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Browser performance"),
// 					Name: to.Ptr("browserperformance"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Usage analysis"),
// 					Name: to.Ptr("usageanalysis"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Server monitoring"),
// 					Name: to.Ptr("servermonitoring"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Alerting and notifications"),
// 					Name: to.Ptr("alertingandnotifications"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Daily notification of failed request rate spikes"),
// 					Name: to.Ptr("notificationfailedrequestrate"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Telemetry analyzer"),
// 					Name: to.Ptr("telemetryanalyzer"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Search and Analytics"),
// 					Name: to.Ptr("searchandanalytics"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Web tests (multi-step tests)"),
// 					MeterID: to.Ptr("0aa0e0e9-3f58-4dcf-9bb0-9db7ae1d5954"),
// 					MeterRateFrequency: to.Ptr("/test (per month)"),
// 					Name: to.Ptr("webtests"),
// 				},
// 				{
// 					Description: to.Ptr("Live stream metrics"),
// 					Name: to.Ptr("livestreammetrics"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Application map"),
// 					Name: to.Ptr("applicationmap"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Daily notification for many key metrics"),
// 					Name: to.Ptr("dailynotificationforkeymetrics"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Work item integration"),
// 					Name: to.Ptr("workitemintegration"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("API access"),
// 					Name: to.Ptr("apiaccess"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Power BI integration"),
// 					Name: to.Ptr("powerbiintegration"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Bulk data import"),
// 					Name: to.Ptr("bulkdataimport"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Automatic data evaluation"),
// 					Name: to.Ptr("automaticdataevaluation"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Analytics integration with Azure dashboards"),
// 					Name: to.Ptr("analyticsintegration"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Continuous export"),
// 					MeterID: to.Ptr("90fa4d31-3ea2-4178-a894-ec4c76c712b2"),
// 					MeterRateFrequency: to.Ptr("/GB"),
// 					Name: to.Ptr("continuousexport"),
// 					Value: to.Ptr("Enabled"),
// 				},
// 				{
// 					Description: to.Ptr("Default daily cap"),
// 					Name: to.Ptr("defaultdailycap"),
// 					Unit: to.Ptr("G"),
// 					Value: to.Ptr("100"),
// 				},
// 				{
// 					Description: to.Ptr("Default maximum daily cap"),
// 					Name: to.Ptr("defaultmaxdailycap"),
// 					Unit: to.Ptr("G"),
// 					Value: to.Ptr("1000"),
// 			}},
// 			FeatureName: to.Ptr("Basic"),
// 			IsHidden: to.Ptr(true),
// 			IsMainFeature: to.Ptr(true),
// 			MeterID: to.Ptr("c9a05f12-4910-4527-a9ec-1db4e4dba60e"),
// 			MeterRateFrequency: to.Ptr("/month"),
// 			SupportedAddonFeatures: to.Ptr("Application Insights Enterprise"),
// 			Title: to.Ptr("Application Insights Basic"),
// 		},
// 		{
// 			Capabilities: []*armapplicationinsights.ComponentFeatureCapability{
// 				{
// 					Description: to.Ptr("Enterprise Included data"),
// 					MeterID: to.Ptr("acf26b15-ee92-440d-9973-9a72d77641aa"),
// 					MeterRateFrequency: to.Ptr("GB/month"),
// 					Name: to.Ptr("enterpriseincludeddata"),
// 					Value: to.Ptr("0.20"),
// 				},
// 				{
// 					Description: to.Ptr("Enterprise Additional data"),
// 					MeterID: to.Ptr("3fedc88a-b68f-4936-bbf0-f290a254388c"),
// 					MeterRateFrequency: to.Ptr("/GB"),
// 					Name: to.Ptr("enterpriseadditionaldata"),
// 				},
// 				{
// 					Description: to.Ptr("Default daily cap"),
// 					Name: to.Ptr("defaultdailycap"),
// 					Unit: to.Ptr("G"),
// 					Value: to.Ptr("100"),
// 				},
// 				{
// 					Description: to.Ptr("Default maximum daily cap"),
// 					Name: to.Ptr("defaultmaxdailycap"),
// 					Unit: to.Ptr("G"),
// 					Value: to.Ptr("1000"),
// 			}},
// 			FeatureName: to.Ptr("Application Insights Enterprise"),
// 			IsHidden: to.Ptr(false),
// 			IsMainFeature: to.Ptr(false),
// 			MeterID: to.Ptr("222f32c5-a319-4787-b934-5fb95105b2c8"),
// 			MeterRateFrequency: to.Ptr("/node/month"),
// 			Title: to.Ptr("Enterprise"),
// 	}},
// }
Output:

type ComponentAvailableFeaturesClientGetOptions

type ComponentAvailableFeaturesClientGetOptions struct {
}

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

type ComponentAvailableFeaturesClientGetResponse

type ComponentAvailableFeaturesClientGetResponse struct {
	ComponentAvailableFeatures
}

ComponentAvailableFeaturesClientGetResponse contains the response from method ComponentAvailableFeaturesClient.Get.

type ComponentBillingFeatures

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

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

MarshalJSON implements the json.Marshaller interface for type ComponentBillingFeatures.

func (*ComponentBillingFeatures) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller 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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentCurrentBillingFeaturesClient().Get(ctx, "my-resource-group", "my-component", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentBillingFeatures = armapplicationinsights.ComponentBillingFeatures{
// 	CurrentBillingFeatures: []*string{
// 		to.Ptr("Basic")},
// 		DataVolumeCap: &armapplicationinsights.ComponentDataVolumeCap{
// 			Cap: to.Ptr[float32](500),
// 			MaxHistoryCap: to.Ptr[float32](500),
// 			ResetTime: to.Ptr[int32](16),
// 			StopSendNotificationWhenHitCap: to.Ptr(false),
// 			StopSendNotificationWhenHitThreshold: to.Ptr(false),
// 			WarningThreshold: to.Ptr[int32](90),
// 		},
// 	}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/CurrentBillingFeaturesUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentCurrentBillingFeaturesClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentBillingFeatures = armapplicationinsights.ComponentBillingFeatures{
// 	CurrentBillingFeatures: []*string{
// 		to.Ptr("Basic"),
// 		to.Ptr("Application Insights Enterprise")},
// 		DataVolumeCap: &armapplicationinsights.ComponentDataVolumeCap{
// 			Cap: to.Ptr[float32](100),
// 			MaxHistoryCap: to.Ptr[float32](500),
// 			ResetTime: to.Ptr[int32](16),
// 			StopSendNotificationWhenHitCap: to.Ptr(true),
// 			StopSendNotificationWhenHitThreshold: to.Ptr(false),
// 			WarningThreshold: to.Ptr[int32](90),
// 		},
// 	}
Output:

type ComponentCurrentBillingFeaturesClientGetOptions

type ComponentCurrentBillingFeaturesClientGetOptions struct {
}

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

type ComponentCurrentBillingFeaturesClientGetResponse

type ComponentCurrentBillingFeaturesClientGetResponse struct {
	ComponentBillingFeatures
}

ComponentCurrentBillingFeaturesClientGetResponse contains the response from method ComponentCurrentBillingFeaturesClient.Get.

type ComponentCurrentBillingFeaturesClientUpdateOptions

type ComponentCurrentBillingFeaturesClientUpdateOptions struct {
}

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

type ComponentCurrentBillingFeaturesClientUpdateResponse

type ComponentCurrentBillingFeaturesClientUpdateResponse struct {
	ComponentBillingFeatures
}

ComponentCurrentBillingFeaturesClientUpdateResponse contains the response from method ComponentCurrentBillingFeaturesClient.Update.

type ComponentDataVolumeCap

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

func (ComponentDataVolumeCap) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentDataVolumeCap.

func (*ComponentDataVolumeCap) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentDataVolumeCap.

type ComponentExportConfiguration

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.

func (ComponentExportConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentExportConfiguration.

func (*ComponentExportConfiguration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentExportConfiguration.

type ComponentExportRequest

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.

func (ComponentExportRequest) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentExportRequest.

func (*ComponentExportRequest) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentExportRequest.

type ComponentFavorite

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

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

MarshalJSON implements the json.Marshaller interface for type ComponentFavorite.

func (*ComponentFavorite) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentFavorite.

type ComponentFeature

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

func (ComponentFeature) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentFeature.

func (*ComponentFeature) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentFeature.

type ComponentFeatureCapabilities

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

func (ComponentFeatureCapabilities) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentFeatureCapabilities.

func (*ComponentFeatureCapabilities) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentFeatureCapabilities.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FeatureCapabilitiesGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentFeatureCapabilitiesClient().Get(ctx, "my-resource-group", "my-component", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentFeatureCapabilities = armapplicationinsights.ComponentFeatureCapabilities{
// 	AnalyticsIntegration: to.Ptr(true),
// 	APIAccessLevel: to.Ptr("Premium"),
// 	ApplicationMap: to.Ptr(true),
// 	BurstThrottlePolicy: to.Ptr("B2"),
// 	DailyCap: to.Ptr[float32](0.0323),
// 	DailyCapResetTime: to.Ptr[float32](4),
// 	LiveStreamMetrics: to.Ptr(true),
// 	MultipleStepWebTest: to.Ptr(true),
// 	OpenSchema: to.Ptr(true),
// 	PowerBIIntegration: to.Ptr(true),
// 	ProactiveDetection: to.Ptr(false),
// 	SupportExportData: to.Ptr(true),
// 	ThrottleRate: to.Ptr[float32](0),
// 	TrackingType: to.Ptr("Basic"),
// 	WorkItemIntegration: to.Ptr(true),
// }
Output:

type ComponentFeatureCapabilitiesClientGetOptions

type ComponentFeatureCapabilitiesClientGetOptions struct {
}

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

type ComponentFeatureCapabilitiesClientGetResponse

type ComponentFeatureCapabilitiesClientGetResponse struct {
	ComponentFeatureCapabilities
}

ComponentFeatureCapabilitiesClientGetResponse contains the response from method ComponentFeatureCapabilitiesClient.Get.

type ComponentFeatureCapability

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

func (ComponentFeatureCapability) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentFeatureCapability.

func (*ComponentFeatureCapability) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentFeatureCapability.

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

func (ComponentLinkedStorageAccounts) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentLinkedStorageAccounts.

func (*ComponentLinkedStorageAccounts) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentLinkedStorageAccounts.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsCreateAndUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentLinkedStorageAccountsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentLinkedStorageAccounts = armapplicationinsights.ComponentLinkedStorageAccounts{
// 	Name: to.Ptr("serviceprofile"),
// 	Type: to.Ptr("microsoft.insights/components/linkedStorageAccounts"),
// 	ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupNameproviders/microsoft.insights/components/myComponent/linkedStorageAccounts/serviceprofiler"),
// 	Properties: &armapplicationinsights.LinkedStorageAccountsProperties{
// 		LinkedStorageAccount: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname"),
// 	},
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewComponentLinkedStorageAccountsClient().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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentLinkedStorageAccountsClient().Get(ctx, "someResourceGroupName", "myComponent", armapplicationinsights.StorageTypeServiceProfiler, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentLinkedStorageAccounts = armapplicationinsights.ComponentLinkedStorageAccounts{
// 	Name: to.Ptr("serviceprofile"),
// 	Type: to.Ptr("microsoft.insights/components/linkedStorageAccounts"),
// 	ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/microsoft.insights/components/myComponent/linkedStorageAccounts/serviceprofiler"),
// 	Properties: &armapplicationinsights.LinkedStorageAccountsProperties{
// 		LinkedStorageAccount: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname"),
// 	},
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2020-03-01-preview/examples/ComponentLinkedStorageAccountsUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentLinkedStorageAccountsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentLinkedStorageAccounts = armapplicationinsights.ComponentLinkedStorageAccounts{
// 	Name: to.Ptr("serviceprofile"),
// 	Type: to.Ptr("microsoft.insights/components/linkedStorageAccounts"),
// 	ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/microsoft.insights/components/myComponent/linkedStorageAccounts/serviceprofiler"),
// 	Properties: &armapplicationinsights.LinkedStorageAccountsProperties{
// 		LinkedStorageAccount: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/someResourceGroupName/providers/Microsoft.Storage/storageAccounts/storageaccountname"),
// 	},
// }
Output:

type ComponentLinkedStorageAccountsClientCreateAndUpdateOptions

type ComponentLinkedStorageAccountsClientCreateAndUpdateOptions struct {
}

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

type ComponentLinkedStorageAccountsClientCreateAndUpdateResponse

type ComponentLinkedStorageAccountsClientCreateAndUpdateResponse struct {
	ComponentLinkedStorageAccounts
}

ComponentLinkedStorageAccountsClientCreateAndUpdateResponse contains the response from method ComponentLinkedStorageAccountsClient.CreateAndUpdate.

type ComponentLinkedStorageAccountsClientDeleteOptions

type ComponentLinkedStorageAccountsClientDeleteOptions struct {
}

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

type ComponentLinkedStorageAccountsClientDeleteResponse

type ComponentLinkedStorageAccountsClientDeleteResponse struct {
}

ComponentLinkedStorageAccountsClientDeleteResponse contains the response from method ComponentLinkedStorageAccountsClient.Delete.

type ComponentLinkedStorageAccountsClientGetOptions

type ComponentLinkedStorageAccountsClientGetOptions struct {
}

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

type ComponentLinkedStorageAccountsClientGetResponse

type ComponentLinkedStorageAccountsClientGetResponse struct {
	ComponentLinkedStorageAccounts
}

ComponentLinkedStorageAccountsClientGetResponse contains the response from method ComponentLinkedStorageAccountsClient.Get.

type ComponentLinkedStorageAccountsClientUpdateOptions

type ComponentLinkedStorageAccountsClientUpdateOptions struct {
}

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

type ComponentLinkedStorageAccountsClientUpdateResponse

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.

func (*ComponentLinkedStorageAccountsPatch) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentLinkedStorageAccountsPatch.

type ComponentListResult

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.

func (ComponentListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentListResult.

func (*ComponentListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentListResult.

type ComponentProactiveDetectionConfiguration

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

MarshalJSON implements the json.Marshaller interface for type ComponentProactiveDetectionConfiguration.

func (*ComponentProactiveDetectionConfiguration) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentProactiveDetectionConfiguration.

type ComponentProactiveDetectionConfigurationRuleDefinitions

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).

func (ComponentProactiveDetectionConfigurationRuleDefinitions) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type ComponentProactiveDetectionConfigurationRuleDefinitions.

func (*ComponentProactiveDetectionConfigurationRuleDefinitions) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentProactiveDetectionConfigurationRuleDefinitions.

type ComponentProperties

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

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

MarshalJSON implements the json.Marshaller interface for type ComponentProperties.

func (*ComponentProperties) UnmarshalJSON

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.

func (*ComponentPurgeBody) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller 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 any `json:"value,omitempty"`
}

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

func (ComponentPurgeBodyFilters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentPurgeBodyFilters.

func (*ComponentPurgeBodyFilters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentPurgeBodyFilters.

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.

func (ComponentPurgeResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentPurgeResponse.

func (*ComponentPurgeResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentPurgeResponse.

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.

func (ComponentPurgeStatusResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentPurgeStatusResponse.

func (*ComponentPurgeStatusResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentPurgeStatusResponse.

type ComponentQuotaStatus

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

func (ComponentQuotaStatus) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentQuotaStatus.

func (*ComponentQuotaStatus) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentQuotaStatus.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/QuotaStatusGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentQuotaStatusClient().Get(ctx, "my-resource-group", "my-component", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentQuotaStatus = armapplicationinsights.ComponentQuotaStatus{
// 	AppID: to.Ptr("887f4bfd-b5fd-40d7-9fc3-123456789abc"),
// 	ExpirationTime: to.Ptr("2017-08-10T05:00:00"),
// 	ShouldBeThrottled: to.Ptr(true),
// }
Output:

type ComponentQuotaStatusClientGetOptions

type ComponentQuotaStatusClientGetOptions struct {
}

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

type ComponentQuotaStatusClientGetResponse

type ComponentQuotaStatusClientGetResponse struct {
	ComponentQuotaStatus
}

ComponentQuotaStatusClientGetResponse contains the response from method ComponentQuotaStatusClient.Get.

type ComponentWebTestLocation

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.

func (ComponentWebTestLocation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ComponentWebTestLocation.

func (*ComponentWebTestLocation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ComponentWebTestLocation.

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 (ComponentCreate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Component = armapplicationinsights.Component{
// 	Name: to.Ptr("my-component"),
// 	Type: to.Ptr("Microsoft.Insights/components"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component"),
// 	Location: to.Ptr("South Central US"),
// 	Tags: map[string]*string{
// 	},
// 	Kind: to.Ptr("web"),
// 	Properties: &armapplicationinsights.ComponentProperties{
// 		AppID: to.Ptr("887f4bfd-b5fd-40d7-9fc3-123456789abc"),
// 		ApplicationID: to.Ptr("my-component"),
// 		ApplicationType: to.Ptr(armapplicationinsights.ApplicationTypeWeb),
// 		ConnectionString: to.Ptr("InstrumentationKey=bc095013-3cf2-45ac-ab47-123456789abc"),
// 		CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-24T01:05:38.5934061+00:00"); return t}()),
// 		DisableIPMasking: to.Ptr(false),
// 		FlowType: to.Ptr(armapplicationinsights.FlowTypeBluefield),
// 		HockeyAppID: to.Ptr(""),
// 		HockeyAppToken: to.Ptr(""),
// 		IngestionMode: to.Ptr(armapplicationinsights.IngestionModeLogAnalytics),
// 		InstrumentationKey: to.Ptr("bc095013-3cf2-45ac-ab47-123456789abc"),
// 		RequestSource: to.Ptr(armapplicationinsights.RequestSourceRest),
// 		SamplingPercentage: to.Ptr[float64](100),
// 		TenantID: to.Ptr("f438d567-7177-4fe1-a5e3-123456789abc"),
// 		WorkspaceResourceID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicNetworkAccessForIngestion: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
// 		PublicNetworkAccessForQuery: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
// 	},
// }
Output:

Example (ComponentUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentsClient().CreateOrUpdate(ctx, "my-resource-group", "my-component", armapplicationinsights.Component{
	Location: to.Ptr("South Central US"),
	Tags: map[string]*string{
		"ApplicationGatewayType": to.Ptr("Internal-Only"),
		"BillingEntity":          to.Ptr("Self"),
	},
	Kind: to.Ptr("web"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Component = armapplicationinsights.Component{
// 	Name: to.Ptr("my-component"),
// 	Type: to.Ptr("Microsoft.Insights/components"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component"),
// 	Location: to.Ptr("South Central US"),
// 	Tags: map[string]*string{
// 		"ApplicationGatewayType": to.Ptr("Internal-Only"),
// 		"BillingEntity": to.Ptr("Self"),
// 	},
// 	Kind: to.Ptr("web"),
// 	Properties: &armapplicationinsights.ComponentProperties{
// 		AppID: to.Ptr("887f4bfd-b5fd-40d7-9fc3-123456789abc"),
// 		ApplicationID: to.Ptr("my-component"),
// 		ApplicationType: to.Ptr(armapplicationinsights.ApplicationTypeWeb),
// 		ConnectionString: to.Ptr("InstrumentationKey=bc095013-3cf2-45ac-ab47-123456789abc"),
// 		CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-24T01:05:38.5934061+00:00"); return t}()),
// 		DisableIPMasking: to.Ptr(false),
// 		FlowType: to.Ptr(armapplicationinsights.FlowTypeBluefield),
// 		HockeyAppID: to.Ptr(""),
// 		HockeyAppToken: to.Ptr(""),
// 		IngestionMode: to.Ptr(armapplicationinsights.IngestionModeLogAnalytics),
// 		InstrumentationKey: to.Ptr("bc095013-3cf2-45ac-ab47-123456789abc"),
// 		RequestSource: to.Ptr(armapplicationinsights.RequestSourceRest),
// 		SamplingPercentage: to.Ptr[float64](100),
// 		TenantID: to.Ptr("f438d567-7177-4fe1-a5e3-123456789abc"),
// 		WorkspaceResourceID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicNetworkAccessForIngestion: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
// 		PublicNetworkAccessForQuery: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
// 	},
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewComponentsClient().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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentsClient().Get(ctx, "my-resource-group", "my-component", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Component = armapplicationinsights.Component{
// 	Name: to.Ptr("my-component"),
// 	Type: to.Ptr("Microsoft.Insights/components"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component"),
// 	Location: to.Ptr("South Central US"),
// 	Tags: map[string]*string{
// 	},
// 	Kind: to.Ptr("web"),
// 	Properties: &armapplicationinsights.ComponentProperties{
// 		AppID: to.Ptr("887f4bfd-b5fd-40d7-9fc3-123456789abc"),
// 		ApplicationID: to.Ptr("my-component"),
// 		ApplicationType: to.Ptr(armapplicationinsights.ApplicationTypeWeb),
// 		ConnectionString: to.Ptr("InstrumentationKey=bc095013-3cf2-45ac-ab47-123456789abc"),
// 		CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-24T01:05:38.5934061+00:00"); return t}()),
// 		DisableIPMasking: to.Ptr(false),
// 		FlowType: to.Ptr(armapplicationinsights.FlowTypeBluefield),
// 		HockeyAppID: to.Ptr(""),
// 		HockeyAppToken: to.Ptr(""),
// 		IngestionMode: to.Ptr(armapplicationinsights.IngestionModeLogAnalytics),
// 		InstrumentationKey: to.Ptr("bc095013-3cf2-45ac-ab47-123456789abc"),
// 		RequestSource: to.Ptr(armapplicationinsights.RequestSourceRest),
// 		SamplingPercentage: to.Ptr[float64](100),
// 		TenantID: to.Ptr("f438d567-7177-4fe1-a5e3-123456789abc"),
// 		WorkspaceResourceID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicNetworkAccessForIngestion: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
// 		PublicNetworkAccessForQuery: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
// 	},
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurgeStatus.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentsClient().GetPurgeStatus(ctx, "OIAutoRest5123", "aztest5048", "purge-970318e7-b859-4edb-8903-83b1b54d0b74", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentPurgeStatusResponse = armapplicationinsights.ComponentPurgeStatusResponse{
// 	Status: to.Ptr(armapplicationinsights.PurgeStateCompleted),
// }
Output:

func (*ComponentsClient) NewListByResourceGroupPager

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

NewListByResourceGroupPager - Gets a list of Application Insights components within a resource group.

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.NewListByResourceGroupPager method.
Example

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewComponentsClient().NewListByResourceGroupPager("my-resource-group", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ComponentListResult = armapplicationinsights.ComponentListResult{
	// 	Value: []*armapplicationinsights.Component{
	// 		{
	// 			Name: to.Ptr("my-component"),
	// 			Type: to.Ptr("Microsoft.Insights/components"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component"),
	// 			Location: to.Ptr("South Central US"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Kind: to.Ptr("web"),
	// 			Properties: &armapplicationinsights.ComponentProperties{
	// 				AppID: to.Ptr("16526d1a-dfba-4362-a9e9-123456789abc"),
	// 				ApplicationID: to.Ptr("my-component"),
	// 				ApplicationType: to.Ptr(armapplicationinsights.ApplicationTypeWeb),
	// 				ConnectionString: to.Ptr("InstrumentationKey=dc5931c7-a7ad-4ad0-89d6-123456789abc"),
	// 				CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-14T12:24:05.0041213+00:00"); return t}()),
	// 				DisableIPMasking: to.Ptr(false),
	// 				FlowType: to.Ptr(armapplicationinsights.FlowTypeBluefield),
	// 				HockeyAppID: to.Ptr(""),
	// 				HockeyAppToken: to.Ptr(""),
	// 				IngestionMode: to.Ptr(armapplicationinsights.IngestionModeLogAnalytics),
	// 				InstrumentationKey: to.Ptr("dc5931c7-a7ad-4ad0-89d6-123456789abc"),
	// 				RequestSource: to.Ptr(armapplicationinsights.RequestSourceRest),
	// 				SamplingPercentage: to.Ptr[float64](100),
	// 				TenantID: to.Ptr("f438d567-7177-4fe1-a5e3-123456789abc"),
	// 				WorkspaceResourceID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace"),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				PublicNetworkAccessForIngestion: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
	// 				PublicNetworkAccessForQuery: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("my-other-component"),
	// 			Type: to.Ptr("Microsoft.Insights/components"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/my-other-resource-group/providers/Microsoft.Insights/components/my-other-component"),
	// 			Location: to.Ptr("South Central US"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Kind: to.Ptr("web"),
	// 			Properties: &armapplicationinsights.ComponentProperties{
	// 				AppID: to.Ptr("887f4bfd-b5fd-40d7-9fc3-123456789abc"),
	// 				ApplicationID: to.Ptr("my-other-component"),
	// 				ApplicationType: to.Ptr(armapplicationinsights.ApplicationTypeWeb),
	// 				ConnectionString: to.Ptr("InstrumentationKey=bc095013-3cf2-45ac-ab47-123456789abc"),
	// 				CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-24T01:05:38.5934061+00:00"); return t}()),
	// 				DisableIPMasking: to.Ptr(false),
	// 				FlowType: to.Ptr(armapplicationinsights.FlowTypeBluefield),
	// 				HockeyAppID: to.Ptr(""),
	// 				HockeyAppToken: to.Ptr(""),
	// 				IngestionMode: to.Ptr(armapplicationinsights.IngestionModeLogAnalytics),
	// 				InstrumentationKey: to.Ptr("bc095013-3cf2-45ac-ab47-123456789abc"),
	// 				RequestSource: to.Ptr(armapplicationinsights.RequestSourceRest),
	// 				SamplingPercentage: to.Ptr[float64](50),
	// 				TenantID: to.Ptr("f438d567-7177-4fe1-a5e3-123456789abc"),
	// 				WorkspaceResourceID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace"),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				PublicNetworkAccessForIngestion: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
	// 				PublicNetworkAccessForQuery: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
	// 			},
	// 	}},
	// }
}
Output:

func (*ComponentsClient) NewListPager

NewListPager - Gets a list of all Application Insights components within a subscription.

Generated from API version 2020-02-02

  • options - ComponentsClientListOptions contains the optional parameters for the ComponentsClient.NewListPager method.
Example

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewComponentsClient().NewListPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ComponentListResult = armapplicationinsights.ComponentListResult{
	// 	Value: []*armapplicationinsights.Component{
	// 		{
	// 			Name: to.Ptr("my-component"),
	// 			Type: to.Ptr("Microsoft.Insights/components"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component"),
	// 			Location: to.Ptr("South Central US"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Kind: to.Ptr("web"),
	// 			Properties: &armapplicationinsights.ComponentProperties{
	// 				AppID: to.Ptr("16526d1a-dfba-4362-a9e9-123456789abc"),
	// 				ApplicationID: to.Ptr("my-component"),
	// 				ApplicationType: to.Ptr(armapplicationinsights.ApplicationTypeWeb),
	// 				ConnectionString: to.Ptr("InstrumentationKey=dc5931c7-a7ad-4ad0-89d6-123456789abc"),
	// 				CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-14T12:24:05.0041213+00:00"); return t}()),
	// 				DisableIPMasking: to.Ptr(false),
	// 				FlowType: to.Ptr(armapplicationinsights.FlowTypeBluefield),
	// 				HockeyAppID: to.Ptr(""),
	// 				HockeyAppToken: to.Ptr(""),
	// 				IngestionMode: to.Ptr(armapplicationinsights.IngestionModeLogAnalytics),
	// 				InstrumentationKey: to.Ptr("dc5931c7-a7ad-4ad0-89d6-123456789abc"),
	// 				RequestSource: to.Ptr(armapplicationinsights.RequestSourceRest),
	// 				SamplingPercentage: to.Ptr[float64](75),
	// 				TenantID: to.Ptr("f438d567-7177-4fe1-a5e3-123456789abc"),
	// 				WorkspaceResourceID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace"),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				PublicNetworkAccessForIngestion: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
	// 				PublicNetworkAccessForQuery: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("my-other-component"),
	// 			Type: to.Ptr("Microsoft.Insights/components"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/my-other-resource-group/providers/Microsoft.Insights/components/my-other-component"),
	// 			Location: to.Ptr("South Central US"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Kind: to.Ptr("web"),
	// 			Properties: &armapplicationinsights.ComponentProperties{
	// 				AppID: to.Ptr("887f4bfd-b5fd-40d7-9fc3-123456789abc"),
	// 				ApplicationID: to.Ptr("my-other-component"),
	// 				ApplicationType: to.Ptr(armapplicationinsights.ApplicationTypeWeb),
	// 				ConnectionString: to.Ptr("InstrumentationKey=bc095013-3cf2-45ac-ab47-123456789abc"),
	// 				CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-24T01:05:38.5934061+00:00"); return t}()),
	// 				DisableIPMasking: to.Ptr(false),
	// 				FlowType: to.Ptr(armapplicationinsights.FlowTypeBluefield),
	// 				HockeyAppID: to.Ptr(""),
	// 				HockeyAppToken: to.Ptr(""),
	// 				IngestionMode: to.Ptr(armapplicationinsights.IngestionModeLogAnalytics),
	// 				InstrumentationKey: to.Ptr("bc095013-3cf2-45ac-ab47-123456789abc"),
	// 				RequestSource: to.Ptr(armapplicationinsights.RequestSourceRest),
	// 				SamplingPercentage: to.Ptr[float64](30),
	// 				TenantID: to.Ptr("f438d567-7177-4fe1-a5e3-123456789abc"),
	// 				WorkspaceResourceID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace"),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				PublicNetworkAccessForIngestion: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
	// 				PublicNetworkAccessForQuery: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
	// 			},
	// 	}},
	// }
}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsPurge.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewComponentsClient().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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-02-02/examples/ComponentsUpdateTagsOnly.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewComponentsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Component = armapplicationinsights.Component{
// 	Name: to.Ptr("my-component"),
// 	Type: to.Ptr("Microsoft.Insights/components"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component"),
// 	Location: to.Ptr("South Central US"),
// 	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"),
// 	},
// 	Kind: to.Ptr("web"),
// 	Properties: &armapplicationinsights.ComponentProperties{
// 		AppID: to.Ptr("887f4bfd-b5fd-40d7-9fc3-123456789abc"),
// 		ApplicationID: to.Ptr("my-component"),
// 		ApplicationType: to.Ptr(armapplicationinsights.ApplicationTypeWeb),
// 		ConnectionString: to.Ptr("InstrumentationKey=bc095013-3cf2-45ac-ab47-123456789abc"),
// 		CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-24T01:05:38.5934061+00:00"); return t}()),
// 		DisableIPMasking: to.Ptr(false),
// 		FlowType: to.Ptr(armapplicationinsights.FlowTypeBluefield),
// 		HockeyAppID: to.Ptr(""),
// 		HockeyAppToken: to.Ptr(""),
// 		IngestionMode: to.Ptr(armapplicationinsights.IngestionModeLogAnalytics),
// 		InstrumentationKey: to.Ptr("bc095013-3cf2-45ac-ab47-123456789abc"),
// 		RequestSource: to.Ptr(armapplicationinsights.RequestSourceRest),
// 		SamplingPercentage: to.Ptr[float64](100),
// 		TenantID: to.Ptr("f438d567-7177-4fe1-a5e3-123456789abc"),
// 		WorkspaceResourceID: to.Ptr("/subscriptions/subid/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicNetworkAccessForIngestion: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
// 		PublicNetworkAccessForQuery: to.Ptr(armapplicationinsights.PublicNetworkAccessTypeEnabled),
// 	},
// }
Output:

type ComponentsClientCreateOrUpdateOptions

type ComponentsClientCreateOrUpdateOptions struct {
}

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

type ComponentsClientCreateOrUpdateResponse

type ComponentsClientCreateOrUpdateResponse struct {
	Component
}

ComponentsClientCreateOrUpdateResponse contains the response from method ComponentsClient.CreateOrUpdate.

type ComponentsClientDeleteOptions

type ComponentsClientDeleteOptions struct {
}

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

type ComponentsClientDeleteResponse

type ComponentsClientDeleteResponse struct {
}

ComponentsClientDeleteResponse contains the response from method ComponentsClient.Delete.

type ComponentsClientGetOptions

type ComponentsClientGetOptions struct {
}

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

type ComponentsClientGetPurgeStatusOptions

type ComponentsClientGetPurgeStatusOptions struct {
}

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

type ComponentsClientGetPurgeStatusResponse

type ComponentsClientGetPurgeStatusResponse struct {
	ComponentPurgeStatusResponse
}

ComponentsClientGetPurgeStatusResponse contains the response from method ComponentsClient.GetPurgeStatus.

type ComponentsClientGetResponse

type ComponentsClientGetResponse struct {
	Component
}

ComponentsClientGetResponse contains the response from method ComponentsClient.Get.

type ComponentsClientListByResourceGroupOptions

type ComponentsClientListByResourceGroupOptions struct {
}

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

type ComponentsClientListByResourceGroupResponse

type ComponentsClientListByResourceGroupResponse struct {
	ComponentListResult
}

ComponentsClientListByResourceGroupResponse contains the response from method ComponentsClient.NewListByResourceGroupPager.

type ComponentsClientListOptions

type ComponentsClientListOptions struct {
}

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

type ComponentsClientListResponse

type ComponentsClientListResponse struct {
	ComponentListResult
}

ComponentsClientListResponse contains the response from method ComponentsClient.NewListPager.

type ComponentsClientPurgeOptions

type ComponentsClientPurgeOptions struct {
}

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

type ComponentsClientPurgeResponse

type ComponentsClientPurgeResponse struct {
	ComponentPurgeResponse
}

ComponentsClientPurgeResponse contains the response from method ComponentsClient.Purge.

type ComponentsClientUpdateTagsOptions

type ComponentsClientUpdateTagsOptions struct {
}

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

type ComponentsClientUpdateTagsResponse

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.

func (*ComponentsResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller 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 any `json:"innererror,omitempty" azure:"ro"`

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

ErrorDefinition - Error definition.

func (ErrorDefinition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDefinition.

func (*ErrorDefinition) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDefinition.

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.

func (ErrorResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type ErrorResponseComponents

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"`
}

func (ErrorResponseComponents) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponseComponents.

func (*ErrorResponseComponents) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseComponents.

type ErrorResponseComponentsError

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.

func (ErrorResponseComponentsError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponseComponentsError.

func (*ErrorResponseComponentsError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseComponentsError.

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"`
}

func (ErrorResponseLinkedStorage) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponseLinkedStorage.

func (*ErrorResponseLinkedStorage) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseLinkedStorage.

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.

func (ErrorResponseLinkedStorageError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponseLinkedStorageError.

func (*ErrorResponseLinkedStorageError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseLinkedStorageError.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsPost.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewExportConfigurationsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentExportConfigurationArray = []*armapplicationinsights.ComponentExportConfiguration{
// 	{
// 		ApplicationName: to.Ptr("my-component"),
// 		ContainerName: to.Ptr("mystorageblob"),
// 		DestinationAccountID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorageblob"),
// 		DestinationStorageLocationID: to.Ptr("eastasia"),
// 		DestinationStorageSubscriptionID: to.Ptr("subidc"),
// 		DestinationType: to.Ptr("Blob"),
// 		ExportID: to.Ptr("uGOoki0jQsyEs3IdQ83Q4QsNr4="),
// 		ExportStatus: to.Ptr("Preparing"),
// 		InstrumentationKey: to.Ptr("8330b4a4-0b8e-40cf-a643-bbaf60d375c9"),
// 		IsUserEnabled: to.Ptr("False"),
// 		LastGapTime: to.Ptr("9999-12-31T23:59:59.999Z"),
// 		LastSuccessTime: to.Ptr("9999-12-31T23:59:59.999Z"),
// 		LastUserUpdate: to.Ptr("2017-06-05T06:34:26.957Z"),
// 		NotificationQueueEnabled: to.Ptr("False"),
// 		PermanentErrorReason: to.Ptr("None"),
// 		RecordTypes: to.Ptr("Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd, PerformanceCounters, Availability"),
// 		ResourceGroup: to.Ptr("2"),
// 		StorageName: to.Ptr("mystorageblob"),
// 		SubscriptionID: to.Ptr("subid"),
// }}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewExportConfigurationsClient().Delete(ctx, "my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentExportConfiguration = armapplicationinsights.ComponentExportConfiguration{
// 	ApplicationName: to.Ptr("my-component"),
// 	ContainerName: to.Ptr("mystorageblob"),
// 	DestinationAccountID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorageblob"),
// 	DestinationStorageLocationID: to.Ptr("eastasia"),
// 	DestinationStorageSubscriptionID: to.Ptr("subidc"),
// 	DestinationType: to.Ptr("Blob"),
// 	ExportID: to.Ptr("uGOoki0jQsyEs3IdQ83Q4QsNr4="),
// 	ExportStatus: to.Ptr("Preparing"),
// 	InstrumentationKey: to.Ptr("8330b4a4-0b8e-40cf-a643-bbaf60d375c9"),
// 	IsUserEnabled: to.Ptr("False"),
// 	LastGapTime: to.Ptr("9999-12-31T23:59:59.999Z"),
// 	LastSuccessTime: to.Ptr("9999-12-31T23:59:59.999Z"),
// 	LastUserUpdate: to.Ptr("2017-06-05T06:34:26.957Z"),
// 	NotificationQueueEnabled: to.Ptr("False"),
// 	PermanentErrorReason: to.Ptr("None"),
// 	RecordTypes: to.Ptr("Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd, PerformanceCounters, Availability"),
// 	ResourceGroup: to.Ptr("2"),
// 	StorageName: to.Ptr("mystorageblob"),
// 	SubscriptionID: to.Ptr("subid"),
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewExportConfigurationsClient().Get(ctx, "my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentExportConfiguration = armapplicationinsights.ComponentExportConfiguration{
// 	ApplicationName: to.Ptr("my-component"),
// 	ContainerName: to.Ptr("mystorageblob"),
// 	DestinationAccountID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorageblob"),
// 	DestinationStorageLocationID: to.Ptr("eastasia"),
// 	DestinationStorageSubscriptionID: to.Ptr("subidc"),
// 	DestinationType: to.Ptr("Blob"),
// 	ExportID: to.Ptr("uGOoki0jQsyEs3IdQ83Q4QsNr4="),
// 	ExportStatus: to.Ptr("Preparing"),
// 	InstrumentationKey: to.Ptr("8330b4a4-0b8e-40cf-a643-bbaf60d375c9"),
// 	IsUserEnabled: to.Ptr("False"),
// 	LastGapTime: to.Ptr("9999-12-31T23:59:59.999Z"),
// 	LastSuccessTime: to.Ptr("9999-12-31T23:59:59.999Z"),
// 	LastUserUpdate: to.Ptr("2017-06-05T06:34:26.957Z"),
// 	NotificationQueueEnabled: to.Ptr("False"),
// 	PermanentErrorReason: to.Ptr("None"),
// 	RecordTypes: to.Ptr("Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd, PerformanceCounters, Availability"),
// 	ResourceGroup: to.Ptr("2"),
// 	StorageName: to.Ptr("mystorageblob"),
// 	SubscriptionID: to.Ptr("subid"),
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationsList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewExportConfigurationsClient().List(ctx, "my-resource-group", "my-component", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentExportConfigurationArray = []*armapplicationinsights.ComponentExportConfiguration{
// 	{
// 		ApplicationName: to.Ptr("my-component"),
// 		ContainerName: to.Ptr("mystorageblob"),
// 		DestinationAccountID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorageblob"),
// 		DestinationStorageLocationID: to.Ptr("eastasia"),
// 		DestinationStorageSubscriptionID: to.Ptr("subidc"),
// 		DestinationType: to.Ptr("Blob"),
// 		ExportID: to.Ptr("uGOoki0jQsyEs3IdQ83Q4QsNr4="),
// 		ExportStatus: to.Ptr("Preparing"),
// 		InstrumentationKey: to.Ptr("8330b4a4-0b8e-40cf-a643-bbaf60d375c9"),
// 		IsUserEnabled: to.Ptr("False"),
// 		LastGapTime: to.Ptr("9999-12-31T23:59:59.999Z"),
// 		LastSuccessTime: to.Ptr("9999-12-31T23:59:59.999Z"),
// 		LastUserUpdate: to.Ptr("2017-06-05T06:34:26.957Z"),
// 		NotificationQueueEnabled: to.Ptr("False"),
// 		PermanentErrorReason: to.Ptr("None"),
// 		RecordTypes: to.Ptr("Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd, PerformanceCounters, Availability"),
// 		ResourceGroup: to.Ptr("2"),
// 		StorageName: to.Ptr("mystorageblob"),
// 		SubscriptionID: to.Ptr("subid"),
// }}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ExportConfigurationUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewExportConfigurationsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentExportConfiguration = armapplicationinsights.ComponentExportConfiguration{
// 	ApplicationName: to.Ptr("my-component"),
// 	ContainerName: to.Ptr("mystorageblob"),
// 	DestinationAccountID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorageblob"),
// 	DestinationStorageLocationID: to.Ptr("eastasia"),
// 	DestinationStorageSubscriptionID: to.Ptr("subidc"),
// 	DestinationType: to.Ptr("Blob"),
// 	ExportID: to.Ptr("uGOoki0jQsyEs3IdQ83Q4QsNr4="),
// 	ExportStatus: to.Ptr("Preparing"),
// 	InstrumentationKey: to.Ptr("8330b4a4-0b8e-40cf-a643-bbaf60d375c9"),
// 	IsUserEnabled: to.Ptr("False"),
// 	LastGapTime: to.Ptr("9999-12-31T23:59:59.999Z"),
// 	LastSuccessTime: to.Ptr("9999-12-31T23:59:59.999Z"),
// 	LastUserUpdate: to.Ptr("2017-06-05T06:34:26.957Z"),
// 	NotificationQueueEnabled: to.Ptr("False"),
// 	PermanentErrorReason: to.Ptr("None"),
// 	RecordTypes: to.Ptr("Requests, Event, Exceptions, Metrics, PageViews, PageViewPerformance, Rdd, PerformanceCounters, Availability"),
// 	ResourceGroup: to.Ptr("2"),
// 	StorageName: to.Ptr("mystorageblob"),
// 	SubscriptionID: to.Ptr("subid"),
// }
Output:

type ExportConfigurationsClientCreateOptions

type ExportConfigurationsClientCreateOptions struct {
}

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

type ExportConfigurationsClientCreateResponse

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

ExportConfigurationsClientCreateResponse contains the response from method ExportConfigurationsClient.Create.

type ExportConfigurationsClientDeleteOptions

type ExportConfigurationsClientDeleteOptions struct {
}

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

type ExportConfigurationsClientDeleteResponse

type ExportConfigurationsClientDeleteResponse struct {
	ComponentExportConfiguration
}

ExportConfigurationsClientDeleteResponse contains the response from method ExportConfigurationsClient.Delete.

type ExportConfigurationsClientGetOptions

type ExportConfigurationsClientGetOptions struct {
}

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

type ExportConfigurationsClientGetResponse

type ExportConfigurationsClientGetResponse struct {
	ComponentExportConfiguration
}

ExportConfigurationsClientGetResponse contains the response from method ExportConfigurationsClient.Get.

type ExportConfigurationsClientListOptions

type ExportConfigurationsClientListOptions struct {
}

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

type ExportConfigurationsClientListResponse

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

ExportConfigurationsClientListResponse contains the response from method ExportConfigurationsClient.List.

type ExportConfigurationsClientUpdateOptions

type ExportConfigurationsClientUpdateOptions struct {
}

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

type ExportConfigurationsClientUpdateResponse

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteAdd.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFavoritesClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentFavorite = armapplicationinsights.ComponentFavorite{
// 	Category: to.Ptr(""),
// 	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"),
// 	SourceType: to.Ptr(""),
// 	Tags: []*string{
// 		to.Ptr("TagSample01"),
// 		to.Ptr("TagSample02")},
// 		TimeModified: to.Ptr("2018-02-02T23:18:32.1850959Z"),
// 		Version: to.Ptr("ME"),
// 	}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewFavoritesClient().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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFavoritesClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentFavorite = armapplicationinsights.ComponentFavorite{
// 	Config: to.Ptr("{\"TimeSelection\":{\"durationMs\":1800000,\"endTime\":\"2018-01-31T23:56:15.493Z\",\"createdTime\":\"Wed Jan 31 2018 15:58:36 GMT-0800 (Pacific Standard Time)\",\"isInitialTime\":false,\"grain\":1,\"useDashboardTimeRange\":false},\"SearchFilter\":{\"eventTypes\":[1,2],\"typeFacets\":{},\"isPermissive\":false},\"QueryText\":\"*\",\"partId\":\"99e33a16-1b00-4a7d-b98f-a3c1bb3a4df8\"}"),
// 	FavoriteID: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	FavoriteType: to.Ptr(armapplicationinsights.FavoriteTypeShared),
// 	IsGeneratedFromTemplate: to.Ptr(false),
// 	Name: to.Ptr("Example Search Blade Favorite"),
// 	Tags: []*string{
// 		to.Ptr("SampleTag1"),
// 		to.Ptr("SampleTag2")},
// 		TimeModified: to.Ptr("2018-01-31T23:59:25.4594264Z"),
// 		Version: to.Ptr("Search"),
// 	}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoritesList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFavoritesClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentFavoriteArray = []*armapplicationinsights.ComponentFavorite{
// 	{
// 		Config: to.Ptr("blah blah"),
// 		FavoriteID: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1c3b5722"),
// 		FavoriteType: to.Ptr(armapplicationinsights.FavoriteTypeShared),
// 		IsGeneratedFromTemplate: to.Ptr(false),
// 		Name: to.Ptr("Example Metric Chart Favorite"),
// 		Tags: []*string{
// 		},
// 		TimeModified: to.Ptr("2018-01-31T23:56:16.008902Z"),
// 		Version: to.Ptr("ME"),
// 	},
// 	{
// 		Config: to.Ptr("{\"TimeSelection\":{\"durationMs\":1800000,\"endTime\":\"2018-01-31T23:56:15.493Z\",\"createdTime\":\"Wed Jan 31 2018 15:58:36 GMT-0800 (Pacific Standard Time)\",\"isInitialTime\":false,\"grain\":1,\"useDashboardTimeRange\":false},\"SearchFilter\":{\"eventTypes\":[1,2],\"typeFacets\":{},\"isPermissive\":false},\"QueryText\":\"*\",\"partId\":\"99e33a16-1b00-4a7d-b98f-a3c1bb3a4df8\"}"),
// 		FavoriteID: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 		FavoriteType: to.Ptr(armapplicationinsights.FavoriteTypeShared),
// 		IsGeneratedFromTemplate: to.Ptr(false),
// 		Name: to.Ptr("Example Search Blade Favorite"),
// 		Tags: []*string{
// 			to.Ptr("SampleTag01"),
// 			to.Ptr("SampleTag2")},
// 			TimeModified: to.Ptr("2018-01-31T23:59:25.4594264Z"),
// 			Version: to.Ptr("Search"),
// 	}}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/FavoriteUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFavoritesClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentFavorite = 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"),
// 	}
Output:

type FavoritesClientAddOptions

type FavoritesClientAddOptions struct {
}

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

type FavoritesClientAddResponse

type FavoritesClientAddResponse struct {
	ComponentFavorite
}

FavoritesClientAddResponse contains the response from method FavoritesClient.Add.

type FavoritesClientDeleteOptions

type FavoritesClientDeleteOptions struct {
}

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

type FavoritesClientDeleteResponse

type FavoritesClientDeleteResponse struct {
}

FavoritesClientDeleteResponse contains the response from method FavoritesClient.Delete.

type FavoritesClientGetOptions

type FavoritesClientGetOptions struct {
}

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

type FavoritesClientGetResponse

type FavoritesClientGetResponse struct {
	ComponentFavorite
}

FavoritesClientGetResponse contains the response from method FavoritesClient.Get.

type FavoritesClientListOptions

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

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

FavoritesClientListResponse contains the response from method FavoritesClient.List.

type FavoritesClientUpdateOptions

type FavoritesClientUpdateOptions struct {
}

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

type FavoritesClientUpdateResponse

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) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type InnerError.

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

func (InnerErrorTrace) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type InnerErrorTrace.

func (*InnerErrorTrace) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type InnerErrorTrace.

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

func (LinkedStorageAccountsProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LinkedStorageAccountsProperties.

func (*LinkedStorageAccountsProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedStorageAccountsProperties.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-10-14/examples/LiveTokenGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewLiveTokenClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.LiveTokenResponse = armapplicationinsights.LiveTokenResponse{
// 	LiveToken: to.Ptr("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"),
// }
Output:

type LiveTokenClientGetOptions

type LiveTokenClientGetOptions struct {
}

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

type LiveTokenClientGetResponse

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.

func (LiveTokenResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type LiveTokenResponse.

func (*LiveTokenResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type LiveTokenResponse.

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.

func (*ManagedServiceIdentity) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

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

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

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type 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.

func (*MyWorkbook) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type MyWorkbook.

type MyWorkbookError

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

MyWorkbookError - Error response.

func (MyWorkbookError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MyWorkbookError.

func (*MyWorkbookError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type MyWorkbookError.

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

func (MyWorkbookManagedIdentity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MyWorkbookManagedIdentity.

func (*MyWorkbookManagedIdentity) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type MyWorkbookManagedIdentity.

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.

func (*MyWorkbookProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller 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.

func (*MyWorkbookResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller 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

func (MyWorkbookUserAssignedIdentities) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MyWorkbookUserAssignedIdentities.

func (*MyWorkbookUserAssignedIdentities) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type MyWorkbookUserAssignedIdentities.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookAdd.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMyWorkbooksClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MyWorkbook = armapplicationinsights.MyWorkbook{
// 	Name: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"),
// 	Type: to.Ptr("Microsoft.Insights/myworkbooks"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group/providers/Microsoft.Insights/myworkbooks/deadb33f-8bee-4d3b-a059-9be8dac93960"),
// 	Location: to.Ptr("westus"),
// 	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"),
// 	},
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewMyWorkbooksClient().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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMyWorkbooksClient().Get(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MyWorkbook = armapplicationinsights.MyWorkbook{
// 	Name: to.Ptr("deadb33f-8bee-4d3b-a059-9be8dac93960"),
// 	Type: to.Ptr("Microsoft.Insights/myworkbooks"),
// 	ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Insights/myworkbooks/deadb33f-8bee-4d3b-a059-9be8dac93960"),
// 	Location: to.Ptr("westus"),
// 	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("My New 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}"),
// 		SourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens"),
// 		UserID: to.Ptr("userId"),
// 		Version: to.Ptr("ME"),
// 	},
// }
Output:

func (*MyWorkbooksClient) NewListByResourceGroupPager

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.

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.NewListByResourceGroupPager method.
Example (WorkbooksList)

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewMyWorkbooksClient().NewListByResourceGroupPager("my-resource-group", armapplicationinsights.CategoryTypeWorkbook, &armapplicationinsights.MyWorkbooksClientListByResourceGroupOptions{Tags: []string{},
	SourceID:        nil,
	CanFetchContent: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.MyWorkbooksListResult = armapplicationinsights.MyWorkbooksListResult{
	// }
}
Output:

Example (WorkbooksList2)

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewMyWorkbooksClient().NewListByResourceGroupPager("my-resource-group", armapplicationinsights.CategoryTypeWorkbook, &armapplicationinsights.MyWorkbooksClientListByResourceGroupOptions{Tags: []string{},
	SourceID:        nil,
	CanFetchContent: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.MyWorkbooksListResult = armapplicationinsights.MyWorkbooksListResult{
	// }
}
Output:

func (*MyWorkbooksClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Get all private workbooks defined within a specified subscription and category.

Generated from API version 2021-03-08

  • category - Category of workbook to return.
  • options - MyWorkbooksClientListBySubscriptionOptions contains the optional parameters for the MyWorkbooksClient.NewListBySubscriptionPager method.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewMyWorkbooksClient().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

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

type MyWorkbooksClientCreateOrUpdateResponse struct {
	MyWorkbook
}

MyWorkbooksClientCreateOrUpdateResponse contains the response from method MyWorkbooksClient.CreateOrUpdate.

type MyWorkbooksClientDeleteOptions

type MyWorkbooksClientDeleteOptions struct {
}

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

type MyWorkbooksClientDeleteResponse

type MyWorkbooksClientDeleteResponse struct {
}

MyWorkbooksClientDeleteResponse contains the response from method MyWorkbooksClient.Delete.

type MyWorkbooksClientGetOptions

type MyWorkbooksClientGetOptions struct {
}

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

type MyWorkbooksClientGetResponse

type MyWorkbooksClientGetResponse struct {
	MyWorkbook
}

MyWorkbooksClientGetResponse contains the response from method MyWorkbooksClient.Get.

type MyWorkbooksClientListByResourceGroupOptions

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.NewListByResourceGroupPager method.

type MyWorkbooksClientListByResourceGroupResponse

type MyWorkbooksClientListByResourceGroupResponse struct {
	MyWorkbooksListResult
}

MyWorkbooksClientListByResourceGroupResponse contains the response from method MyWorkbooksClient.NewListByResourceGroupPager.

type MyWorkbooksClientListBySubscriptionOptions

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.NewListBySubscriptionPager method.

type MyWorkbooksClientListBySubscriptionResponse

type MyWorkbooksClientListBySubscriptionResponse struct {
	MyWorkbooksListResult
}

MyWorkbooksClientListBySubscriptionResponse contains the response from method MyWorkbooksClient.NewListBySubscriptionPager.

type MyWorkbooksClientUpdateOptions

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

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.

func (MyWorkbooksListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MyWorkbooksListResult.

func (*MyWorkbooksListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type MyWorkbooksListResult.

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

func (Operation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// 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.

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type 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

func (OperationInfo) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationInfo.

func (*OperationInfo) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationInfo.

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.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type 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 any `json:"properties,omitempty"`
}

OperationLive - Represents an operation returned by the GetOperations request

func (OperationLive) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationLive.

func (*OperationLive) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationLive.

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

func (OperationsListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationsListResult.

func (*OperationsListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationsListResult.

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.

func (PrivateLinkScopedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkScopedResource.

func (*PrivateLinkScopedResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkScopedResource.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProactiveDetectionConfigurationsClient().Get(ctx, "my-resource-group", "my-component", "slowpageloadtime", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentProactiveDetectionConfiguration = 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),
// 	}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationsList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProactiveDetectionConfigurationsClient().List(ctx, "my-resource-group", "my-component", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentProactiveDetectionConfigurationArray = []*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),
// 		},
// 		{
// 			CustomEmails: []*string{
// 			},
// 			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 server response 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("slowserverresponsetime"),
// 				SupportsEmailNotifications: to.Ptr(true),
// 			},
// 			SendEmailsToSubscriptionOwners: to.Ptr(true),
// 	}}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/ProactiveDetectionConfigurationUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProactiveDetectionConfigurationsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ComponentProactiveDetectionConfiguration = 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),
// 	}
Output:

type ProactiveDetectionConfigurationsClientGetOptions

type ProactiveDetectionConfigurationsClientGetOptions struct {
}

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

type ProactiveDetectionConfigurationsClientGetResponse

type ProactiveDetectionConfigurationsClientGetResponse struct {
	ComponentProactiveDetectionConfiguration
}

ProactiveDetectionConfigurationsClientGetResponse contains the response from method ProactiveDetectionConfigurationsClient.Get.

type ProactiveDetectionConfigurationsClientListOptions

type ProactiveDetectionConfigurationsClientListOptions struct {
}

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

type ProactiveDetectionConfigurationsClientListResponse

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

ProactiveDetectionConfigurationsClientListResponse contains the response from method ProactiveDetectionConfigurationsClient.List.

type ProactiveDetectionConfigurationsClientUpdateOptions

type ProactiveDetectionConfigurationsClientUpdateOptions struct {
}

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

type ProactiveDetectionConfigurationsClientUpdateResponse

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

func (ProxyResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type 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

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type 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.

func (*TagsResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller 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.

func (*TrackedResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller 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

func (UserAssignedIdentity) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type 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.

func (*WebTest) UnmarshalJSON

func (w *WebTest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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.

func (WebTestGeolocation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WebTestGeolocation.

func (*WebTestGeolocation) UnmarshalJSON

func (w *WebTestGeolocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebTestGeolocation.

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.

func (WebTestListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WebTestListResult.

func (*WebTestListResult) UnmarshalJSON

func (w *WebTestListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebTestListResult.

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

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.

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.NewListPager method.
Example

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

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

type WebTestLocationsClientListOptions

type WebTestLocationsClientListOptions struct {
}

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

type WebTestLocationsClientListResponse

type WebTestLocationsClientListResponse struct {
	WebTestLocationsListResult
}

WebTestLocationsClientListResponse contains the response from method WebTestLocationsClient.NewListPager.

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.

func (WebTestLocationsListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WebTestLocationsListResult.

func (*WebTestLocationsListResult) UnmarshalJSON

func (w *WebTestLocationsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebTestLocationsListResult.

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.

func (*WebTestProperties) UnmarshalJSON

func (w *WebTestProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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.

func (WebTestPropertiesConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WebTestPropertiesConfiguration.

func (*WebTestPropertiesConfiguration) UnmarshalJSON

func (w *WebTestPropertiesConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WebTestPropertiesConfiguration.

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 (WebTestCreate)

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWebTestsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.WebTest = armapplicationinsights.WebTest{
// 	Name: to.Ptr("my-webtest-my-component"),
// 	Type: to.Ptr("Microsoft.Insights/webtests"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component"),
// 	Location: to.Ptr("southcentralus"),
// 	Tags: map[string]*string{
// 		"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"),
// 	},
// 	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),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 	},
// }
Output:

Example (WebTestUpdate)

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWebTestsClient().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=\"30\" 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=\"30\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"),
		},
		Frequency:   to.Ptr[int32](600),
		WebTestKind: to.Ptr(armapplicationinsights.WebTestKindPing),
		Locations: []*armapplicationinsights.WebTestGeolocation{
			{
				Location: to.Ptr("us-fl-mia-edge"),
			},
			{
				Location: to.Ptr("apac-hk-hkn-azr"),
			}},
		WebTestName:        to.Ptr("my-webtest-my-component"),
		SyntheticMonitorID: to.Ptr("my-webtest-my-component"),
		Timeout:            to.Ptr[int32](30),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.WebTest = armapplicationinsights.WebTest{
// 	Name: to.Ptr("my-webtest-my-component"),
// 	Type: to.Ptr("Microsoft.Insights/webtests"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component"),
// 	Location: to.Ptr("southcentralus"),
// 	Tags: map[string]*string{
// 		"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"),
// 	},
// 	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=\"30\" 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=\"30\" 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](600),
// 		WebTestKind: to.Ptr(armapplicationinsights.WebTestKindPing),
// 		Locations: []*armapplicationinsights.WebTestGeolocation{
// 			{
// 				Location: to.Ptr("us-fl-mia-edge"),
// 			},
// 			{
// 				Location: to.Ptr("apac-hk-hkn-azr"),
// 		}},
// 		WebTestName: to.Ptr("my-webtest-my-component"),
// 		RetryEnabled: to.Ptr(true),
// 		SyntheticMonitorID: to.Ptr("my-webtest-my-component"),
// 		Timeout: to.Ptr[int32](30),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 	},
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewWebTestsClient().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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWebTestsClient().Get(ctx, "my-resource-group", "my-webtest-01-mywebservice", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.WebTest = armapplicationinsights.WebTest{
// 	Name: to.Ptr("my-webtest-01-mywebservice"),
// 	Type: to.Ptr("Microsoft.Insights/webtests"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/my-test-resources/providers/Microsoft.Insights/webtests/my-webtest-01-mywebservice"),
// 	Location: to.Ptr("southcentralus"),
// 	Tags: map[string]*string{
// 		"hidden-link:/subscriptions/subid/resourceGroups/my-test-resources/providers/Microsoft.Insights/components/mytester": to.Ptr("Resource"),
// 		"hidden-link:/subscriptions/subid/resourceGroups/my-test-resources/providers/Microsoft.Web/sites/mytester": to.Ptr("Resource"),
// 	},
// 	Kind: to.Ptr(armapplicationinsights.WebTestKindPing),
// 	Properties: &armapplicationinsights.WebTestProperties{
// 		Configuration: &armapplicationinsights.WebTestPropertiesConfiguration{
// 			WebTest: to.Ptr("<WebTest Name=\"mytest-webtest-01\" Id=\"0317d26b-8672-4370-bd6b-123456789abc\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"30\" 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=\"a55ce143-4f1e-a7e6-b69e-123456789abc\" Version=\"1.1\" Url=\"http://mytester.azurewebsites.net\" ThinkTime=\"0\" Timeout=\"30\" ParseDependentRequests=\"False\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /></Items></WebTest>"),
// 		},
// 		Description: to.Ptr(""),
// 		Enabled: to.Ptr(false),
// 		Frequency: to.Ptr[int32](900),
// 		WebTestKind: to.Ptr(armapplicationinsights.WebTestKindPing),
// 		Locations: []*armapplicationinsights.WebTestGeolocation{
// 			{
// 				Location: to.Ptr("us-fl-mia-edge"),
// 			},
// 			{
// 				Location: to.Ptr("apac-hk-hkn-azr"),
// 		}},
// 		WebTestName: to.Ptr("mytest-webtest-01"),
// 		RetryEnabled: to.Ptr(true),
// 		SyntheticMonitorID: to.Ptr("my-webtest-01-mywebservice"),
// 		Timeout: to.Ptr[int32](30),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 	},
// }
Output:

func (*WebTestsClient) NewListByComponentPager

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.

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.NewListByComponentPager method.
Example

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWebTestsClient().NewListByComponentPager("my-component", "my-resource-group", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.WebTestListResult = armapplicationinsights.WebTestListResult{
	// 	Value: []*armapplicationinsights.WebTest{
	// 		{
	// 			Name: to.Ptr("my-webtest-my-component"),
	// 			Type: to.Ptr("Microsoft.Insights/webtests"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component"),
	// 			Location: to.Ptr("southcentralus"),
	// 			Tags: map[string]*string{
	// 				"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"),
	// 			},
	// 			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(""),
	// 				Enabled: to.Ptr(false),
	// 				Frequency: to.Ptr[int32](900),
	// 				WebTestKind: to.Ptr(armapplicationinsights.WebTestKindPing),
	// 				Locations: []*armapplicationinsights.WebTestGeolocation{
	// 					{
	// 						Location: to.Ptr("apac-hk-hkn-azr"),
	// 				}},
	// 				WebTestName: to.Ptr("my-webtest"),
	// 				RetryEnabled: to.Ptr(true),
	// 				SyntheticMonitorID: to.Ptr("my-webtest-my-component"),
	// 				Timeout: to.Ptr[int32](120),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 			},
	// 	}},
	// }
}
Output:

func (*WebTestsClient) NewListByResourceGroupPager

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

NewListByResourceGroupPager - Get all Application Insights web tests defined within a specified resource group.

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.NewListByResourceGroupPager method.
Example

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWebTestsClient().NewListByResourceGroupPager("my-resource-group", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.WebTestListResult = armapplicationinsights.WebTestListResult{
	// 	Value: []*armapplicationinsights.WebTest{
	// 		{
	// 			Name: to.Ptr("my-webtest-my-component"),
	// 			Type: to.Ptr("Microsoft.Insights/webtests"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component"),
	// 			Location: to.Ptr("southcentralus"),
	// 			Tags: map[string]*string{
	// 				"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"),
	// 			},
	// 			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(""),
	// 				Enabled: to.Ptr(false),
	// 				Frequency: to.Ptr[int32](900),
	// 				WebTestKind: to.Ptr(armapplicationinsights.WebTestKindPing),
	// 				Locations: []*armapplicationinsights.WebTestGeolocation{
	// 					{
	// 						Location: to.Ptr("apac-hk-hkn-azr"),
	// 				}},
	// 				WebTestName: to.Ptr("my-webtest"),
	// 				RetryEnabled: to.Ptr(true),
	// 				SyntheticMonitorID: to.Ptr("my-webtest-my-component"),
	// 				Timeout: to.Ptr[int32](120),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("my-webtest-my-other-component"),
	// 			Type: to.Ptr("Microsoft.Insights/webtests"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-other-component"),
	// 			Location: to.Ptr("southcentralus"),
	// 			Tags: map[string]*string{
	// 				"Test": to.Ptr("You can delete this synthetic monitor anytime"),
	// 				"hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-other-component": to.Ptr("Resource"),
	// 			},
	// 			Kind: to.Ptr(armapplicationinsights.WebTestKindPing),
	// 			Properties: &armapplicationinsights.WebTestProperties{
	// 				Configuration: &armapplicationinsights.WebTestPropertiesConfiguration{
	// 					WebTest: to.Ptr("<WebTest Name=\"342bccf4-722f-496d-b064-123456789abc\" Id=\"00a15cc1-c903-4f97-9af4-123456789abc\" Enabled=\"False\" 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=\"347e1924-9899-4c6e-ad78-123456789abc\" Version=\"1.1\" Url=\"http://my-other-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(""),
	// 				Enabled: to.Ptr(false),
	// 				Frequency: to.Ptr[int32](300),
	// 				WebTestKind: to.Ptr(armapplicationinsights.WebTestKindPing),
	// 				Locations: []*armapplicationinsights.WebTestGeolocation{
	// 					{
	// 						Location: to.Ptr("us-fl-mia-edge"),
	// 				}},
	// 				WebTestName: to.Ptr("342bccf4-722f-496d-b064-123456789abc"),
	// 				RetryEnabled: to.Ptr(false),
	// 				SyntheticMonitorID: to.Ptr("my-webtest-my-other-component"),
	// 				Timeout: to.Ptr[int32](90),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 			},
	// 	}},
	// }
}
Output:

func (*WebTestsClient) NewListPager

NewListPager - Get all Application Insights web test alerts definitions within a subscription.

Generated from API version 2015-05-01

  • options - WebTestsClientListOptions contains the optional parameters for the WebTestsClient.NewListPager method.
Example

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWebTestsClient().NewListPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.WebTestListResult = armapplicationinsights.WebTestListResult{
	// 	Value: []*armapplicationinsights.WebTest{
	// 		{
	// 			Name: to.Ptr("my-webtest-my-component"),
	// 			Type: to.Ptr("Microsoft.Insights/webtests"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component"),
	// 			Location: to.Ptr("southcentralus"),
	// 			Tags: map[string]*string{
	// 				"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"),
	// 			},
	// 			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(""),
	// 				Enabled: to.Ptr(false),
	// 				Frequency: to.Ptr[int32](900),
	// 				WebTestKind: to.Ptr(armapplicationinsights.WebTestKindPing),
	// 				Locations: []*armapplicationinsights.WebTestGeolocation{
	// 				},
	// 				WebTestName: to.Ptr("my-webtest"),
	// 				RetryEnabled: to.Ptr(true),
	// 				SyntheticMonitorID: to.Ptr("my-webtest-my-component"),
	// 				Timeout: to.Ptr[int32](120),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("my-webtest-my-other-component"),
	// 			Type: to.Ptr("Microsoft.Insights/webtests"),
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/my-other-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-other-component"),
	// 			Location: to.Ptr("southcentralus"),
	// 			Tags: map[string]*string{
	// 				"Test": to.Ptr("You can delete this synthetic monitor anytime"),
	// 				"hidden-link:/subscriptions/subid/resourceGroups/my-other-resource-group/providers/Microsoft.Insights/components/my-other-component": to.Ptr("Resource"),
	// 			},
	// 			Kind: to.Ptr(armapplicationinsights.WebTestKindPing),
	// 			Properties: &armapplicationinsights.WebTestProperties{
	// 				Configuration: &armapplicationinsights.WebTestPropertiesConfiguration{
	// 					WebTest: to.Ptr("<WebTest Name=\"342bccf4-722f-496d-b064-123456789abc\" Id=\"00a15cc1-c903-4f97-9af4-123456789abc\" Enabled=\"False\" 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=\"347e1924-9899-4c6e-ad78-123456789abc\" Version=\"1.1\" Url=\"http://my-other-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(""),
	// 				Enabled: to.Ptr(false),
	// 				Frequency: to.Ptr[int32](900),
	// 				WebTestKind: to.Ptr(armapplicationinsights.WebTestKindPing),
	// 				Locations: []*armapplicationinsights.WebTestGeolocation{
	// 				},
	// 				WebTestName: to.Ptr("342bccf4-722f-496d-b064-123456789abc"),
	// 				RetryEnabled: to.Ptr(false),
	// 				SyntheticMonitorID: to.Ptr("my-webtest-my-other-component"),
	// 				Timeout: to.Ptr[int32](120),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 			},
	// 	}},
	// }
}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestUpdateTagsOnly.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWebTestsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.WebTest = armapplicationinsights.WebTest{
// 	Name: to.Ptr("my-webtest-my-component"),
// 	Type: to.Ptr("Microsoft.Insights/webtests"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/webtests/my-webtest-my-component"),
// 	Location: to.Ptr("southcentralus"),
// 	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"),
// 	},
// 	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=\"30\" 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=\"30\" 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](600),
// 		WebTestKind: to.Ptr(armapplicationinsights.WebTestKindPing),
// 		Locations: []*armapplicationinsights.WebTestGeolocation{
// 			{
// 				Location: to.Ptr("us-fl-mia-edge"),
// 			},
// 			{
// 				Location: to.Ptr("apac-hk-hkn-azr"),
// 		}},
// 		WebTestName: to.Ptr("my-webtest-my-component"),
// 		RetryEnabled: to.Ptr(true),
// 		SyntheticMonitorID: to.Ptr("my-webtest-my-component"),
// 		Timeout: to.Ptr[int32](30),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 	},
// }
Output:

type WebTestsClientCreateOrUpdateOptions

type WebTestsClientCreateOrUpdateOptions struct {
}

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

type WebTestsClientCreateOrUpdateResponse

type WebTestsClientCreateOrUpdateResponse struct {
	WebTest
}

WebTestsClientCreateOrUpdateResponse contains the response from method WebTestsClient.CreateOrUpdate.

type WebTestsClientDeleteOptions

type WebTestsClientDeleteOptions struct {
}

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

type WebTestsClientDeleteResponse

type WebTestsClientDeleteResponse struct {
}

WebTestsClientDeleteResponse contains the response from method WebTestsClient.Delete.

type WebTestsClientGetOptions

type WebTestsClientGetOptions struct {
}

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

type WebTestsClientGetResponse

type WebTestsClientGetResponse struct {
	WebTest
}

WebTestsClientGetResponse contains the response from method WebTestsClient.Get.

type WebTestsClientListByComponentOptions

type WebTestsClientListByComponentOptions struct {
}

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

type WebTestsClientListByComponentResponse

type WebTestsClientListByComponentResponse struct {
	WebTestListResult
}

WebTestsClientListByComponentResponse contains the response from method WebTestsClient.NewListByComponentPager.

type WebTestsClientListByResourceGroupOptions

type WebTestsClientListByResourceGroupOptions struct {
}

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

type WebTestsClientListByResourceGroupResponse

type WebTestsClientListByResourceGroupResponse struct {
	WebTestListResult
}

WebTestsClientListByResourceGroupResponse contains the response from method WebTestsClient.NewListByResourceGroupPager.

type WebTestsClientListOptions

type WebTestsClientListOptions struct {
}

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

type WebTestsClientListResponse

type WebTestsClientListResponse struct {
	WebTestListResult
}

WebTestsClientListResponse contains the response from method WebTestsClient.NewListPager.

type WebTestsClientUpdateTagsOptions

type WebTestsClientUpdateTagsOptions struct {
}

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

type WebTestsClientUpdateTagsResponse

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.

func (*WebtestsResource) UnmarshalJSON

func (w *WebtestsResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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.

func (WorkItemConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkItemConfiguration.

func (*WorkItemConfiguration) UnmarshalJSON

func (w *WorkItemConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkItemConfiguration.

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

func (WorkItemConfigurationError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkItemConfigurationError.

func (*WorkItemConfigurationError) UnmarshalJSON

func (w *WorkItemConfigurationError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkItemConfigurationError.

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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigCreate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkItemConfigurationsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.WorkItemConfiguration = armapplicationinsights.WorkItemConfiguration{
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewWorkItemConfigurationsClient().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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigDefaultGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkItemConfigurationsClient().GetDefault(ctx, "my-resource-group", "my-component", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.WorkItemConfiguration = armapplicationinsights.WorkItemConfiguration{
// 	ConfigDisplayName: to.Ptr("Visual Studio Team Services"),
// 	ConfigProperties: to.Ptr("{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"d0662b05-439a-4a1b-840b-33a7f8b42ebf\",\"ConfigurationType\":\"Standard\",\"WorkItemType\":\"Bug\",\"AreaPath\":\"todeletefirst\",\"AssignedTo\":\"\"}"),
// 	ConnectorID: to.Ptr("d334e2a4-6733-488e-8645-a9fdc1694f41"),
// 	ID: to.Ptr("Visual Studio Team Services"),
// 	IsDefault: to.Ptr(true),
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkItemConfigurationsClient().GetItem(ctx, "my-resource-group", "my-component", "Visual Studio Team Services", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.WorkItemConfiguration = armapplicationinsights.WorkItemConfiguration{
// 	ConfigDisplayName: to.Ptr("Visual Studio Team Services"),
// 	ConfigProperties: to.Ptr("{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"d0662b05-439a-4a1b-840b-33a7f8b42ebf\",\"ConfigurationType\":\"Standard\",\"WorkItemType\":\"Bug\",\"AreaPath\":\"todeletefirst\",\"AssignedTo\":\"\"}"),
// 	ConnectorID: to.Ptr("d334e2a4-6733-488e-8645-a9fdc1694f41"),
// 	ID: to.Ptr("Visual Studio Team Services"),
// 	IsDefault: to.Ptr(true),
// }
Output:

func (*WorkItemConfigurationsClient) NewListPager

NewListPager - Gets the list work item configurations that exist for the application

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.NewListPager method.
Example

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

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWorkItemConfigurationsClient().NewListPager("my-resource-group", "my-component", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.WorkItemConfigurationsListResult = armapplicationinsights.WorkItemConfigurationsListResult{
	// }
}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkItemConfigUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkItemConfigurationsClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.WorkItemConfiguration = armapplicationinsights.WorkItemConfiguration{
// 	ConfigDisplayName: to.Ptr("Visual Studio Team Services"),
// 	ConfigProperties: to.Ptr("{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"d0662b05-439a-4a1b-840b-33a7f8b42ebf\",\"ConfigurationType\":\"Standard\",\"WorkItemType\":\"Bug\",\"AreaPath\":\"todeletefirst\",\"AssignedTo\":\"\"}"),
// 	ConnectorID: to.Ptr("d334e2a4-6733-488e-8645-a9fdc1694f41"),
// 	ID: to.Ptr("Visual Studio Team Services"),
// 	IsDefault: to.Ptr(true),
// }
Output:

type WorkItemConfigurationsClientCreateOptions

type WorkItemConfigurationsClientCreateOptions struct {
}

WorkItemConfigurationsClientCreateOptions contains the optional parameters for the WorkItemConfigurationsClient.Create method.

type WorkItemConfigurationsClientCreateResponse

type WorkItemConfigurationsClientCreateResponse struct {
	WorkItemConfiguration
}

WorkItemConfigurationsClientCreateResponse contains the response from method WorkItemConfigurationsClient.Create.

type WorkItemConfigurationsClientDeleteOptions

type WorkItemConfigurationsClientDeleteOptions struct {
}

WorkItemConfigurationsClientDeleteOptions contains the optional parameters for the WorkItemConfigurationsClient.Delete method.

type WorkItemConfigurationsClientDeleteResponse

type WorkItemConfigurationsClientDeleteResponse struct {
}

WorkItemConfigurationsClientDeleteResponse contains the response from method WorkItemConfigurationsClient.Delete.

type WorkItemConfigurationsClientGetDefaultOptions

type WorkItemConfigurationsClientGetDefaultOptions struct {
}

WorkItemConfigurationsClientGetDefaultOptions contains the optional parameters for the WorkItemConfigurationsClient.GetDefault method.

type WorkItemConfigurationsClientGetDefaultResponse

type WorkItemConfigurationsClientGetDefaultResponse struct {
	WorkItemConfiguration
}

WorkItemConfigurationsClientGetDefaultResponse contains the response from method WorkItemConfigurationsClient.GetDefault.

type WorkItemConfigurationsClientGetItemOptions

type WorkItemConfigurationsClientGetItemOptions struct {
}

WorkItemConfigurationsClientGetItemOptions contains the optional parameters for the WorkItemConfigurationsClient.GetItem method.

type WorkItemConfigurationsClientGetItemResponse

type WorkItemConfigurationsClientGetItemResponse struct {
	WorkItemConfiguration
}

WorkItemConfigurationsClientGetItemResponse contains the response from method WorkItemConfigurationsClient.GetItem.

type WorkItemConfigurationsClientListOptions

type WorkItemConfigurationsClientListOptions struct {
}

WorkItemConfigurationsClientListOptions contains the optional parameters for the WorkItemConfigurationsClient.NewListPager method.

type WorkItemConfigurationsClientListResponse

type WorkItemConfigurationsClientListResponse struct {
	WorkItemConfigurationsListResult
}

WorkItemConfigurationsClientListResponse contains the response from method WorkItemConfigurationsClient.NewListPager.

type WorkItemConfigurationsClientUpdateItemOptions

type WorkItemConfigurationsClientUpdateItemOptions struct {
}

WorkItemConfigurationsClientUpdateItemOptions contains the optional parameters for the WorkItemConfigurationsClient.UpdateItem method.

type WorkItemConfigurationsClientUpdateItemResponse

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.

func (WorkItemConfigurationsListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkItemConfigurationsListResult.

func (*WorkItemConfigurationsListResult) UnmarshalJSON

func (w *WorkItemConfigurationsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkItemConfigurationsListResult.

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.

func (*WorkItemCreateConfiguration) UnmarshalJSON

func (w *WorkItemCreateConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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 *WorkbookSharedTypeKind `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 - A workbook definition.

func (Workbook) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Workbook.

func (*Workbook) UnmarshalJSON

func (w *Workbook) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Workbook.

type WorkbookError

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

WorkbookError - Error response.

func (WorkbookError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkbookError.

func (*WorkbookError) UnmarshalJSON

func (w *WorkbookError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookError.

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 any `json:"innerError,omitempty" azure:"ro"`

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

WorkbookErrorDefinition - Error definition.

func (WorkbookErrorDefinition) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkbookErrorDefinition.

func (*WorkbookErrorDefinition) UnmarshalJSON

func (w *WorkbookErrorDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookErrorDefinition.

type WorkbookInnerErrorTrace

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

WorkbookInnerErrorTrace - Error details

func (WorkbookInnerErrorTrace) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkbookInnerErrorTrace.

func (*WorkbookInnerErrorTrace) UnmarshalJSON

func (w *WorkbookInnerErrorTrace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookInnerErrorTrace.

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.

func (*WorkbookPropertiesUpdateParameters) UnmarshalJSON

func (w *WorkbookPropertiesUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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 *WorkbookSharedTypeKind `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.

func (*WorkbookResource) UnmarshalJSON

func (w *WorkbookResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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

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

MarshalJSON implements the json.Marshaller interface for type WorkbookResourceIdentity.

func (*WorkbookResourceIdentity) UnmarshalJSON

func (w *WorkbookResourceIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookResourceIdentity.

type WorkbookSharedTypeKind

type WorkbookSharedTypeKind string

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

const (
	WorkbookSharedTypeKindShared WorkbookSharedTypeKind = "shared"
)

func PossibleWorkbookSharedTypeKindValues

func PossibleWorkbookSharedTypeKindValues() []WorkbookSharedTypeKind

PossibleWorkbookSharedTypeKindValues returns the possible values for the WorkbookSharedTypeKind const type.

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.

func (*WorkbookTemplate) UnmarshalJSON

func (w *WorkbookTemplate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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.

func (WorkbookTemplateError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateError.

func (*WorkbookTemplateError) UnmarshalJSON

func (w *WorkbookTemplateError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateError.

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.

func (WorkbookTemplateErrorBody) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateErrorBody.

func (*WorkbookTemplateErrorBody) UnmarshalJSON

func (w *WorkbookTemplateErrorBody) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateErrorBody.

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.

func (WorkbookTemplateErrorFieldContract) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateErrorFieldContract.

func (*WorkbookTemplateErrorFieldContract) UnmarshalJSON

func (w *WorkbookTemplateErrorFieldContract) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateErrorFieldContract.

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.

func (WorkbookTemplateGallery) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkbookTemplateGallery.

func (*WorkbookTemplateGallery) UnmarshalJSON

func (w *WorkbookTemplateGallery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplateGallery.

type WorkbookTemplateLocalizedGallery

type WorkbookTemplateLocalizedGallery struct {
	// Workbook galleries supported by the template.
	Galleries []*WorkbookTemplateGallery `json:"galleries,omitempty"`

	// Valid JSON object containing workbook template payload.
	TemplateData any `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.

func (*WorkbookTemplateLocalizedGallery) UnmarshalJSON

func (w *WorkbookTemplateLocalizedGallery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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 any `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.

func (*WorkbookTemplateProperties) UnmarshalJSON

func (w *WorkbookTemplateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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.

func (*WorkbookTemplateResource) UnmarshalJSON

func (w *WorkbookTemplateResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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.

func (*WorkbookTemplateUpdateParameters) UnmarshalJSON

func (w *WorkbookTemplateUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller 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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateAdd.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkbookTemplatesClient().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]any{
			"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json",
			"items": []any{
				map[string]any{
					"name": "text - 2",
					"type": float64(1),
					"content": map[string]any{
						"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]any{
					"name": "query - 2",
					"type": float64(3),
					"content": map[string]any{
						"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]any{},
			"version":       "Notebook/1.0",
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.WorkbookTemplate = armapplicationinsights.WorkbookTemplate{
// 	Name: to.Ptr("testtemplate2"),
// 	Type: to.Ptr("microsoft.insights/workbooktemplates"),
// 	ID: to.Ptr("/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba95/resourceGroups/testrg/providers/microsoft.insights/workbooktemplates/testtemplate2"),
// 	Location: to.Ptr("westeurope"),
// 	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]any{
// 			"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json",
// 			"items":[]any{
// 				map[string]any{
// 					"name": "text - 2",
// 					"type": float64(1),
// 					"content":map[string]any{
// 						"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]any{
// 					"name": "query - 2",
// 					"type": float64(3),
// 					"content":map[string]any{
// 						"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]any{
// 			},
// 			"version": "Notebook/1.0",
// 		},
// 	},
// }
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewWorkbookTemplatesClient().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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkbookTemplatesClient().Get(ctx, "my-resource-group", "my-resource-name", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.WorkbookTemplate = armapplicationinsights.WorkbookTemplate{
// 	Name: to.Ptr("my-resource-name"),
// 	Type: to.Ptr("microsoft.insights/workbooktemplate"),
// 	ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/microsoft.insights/workbooktemplates/my-resource-name"),
// 	Location: to.Ptr("westus"),
// 	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]any{
// 			"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json",
// 			"items":[]any{
// 				map[string]any{
// 					"name": "text - 2",
// 					"type": float64(1),
// 					"content":map[string]any{
// 						"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]any{
// 					"name": "query - 2",
// 					"type": float64(3),
// 					"content":map[string]any{
// 						"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]any{
// 			},
// 			"version": "Notebook/1.0",
// 		},
// 	},
// }
Output:

func (*WorkbookTemplatesClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Get all Workbook templates defined within a specified resource group.

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.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplatesList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWorkbookTemplatesClient().NewListByResourceGroupPager("my-resource-group", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.WorkbookTemplatesListResult = armapplicationinsights.WorkbookTemplatesListResult{
	// }
}
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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/examples/WorkbookTemplateUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkbookTemplatesClient().Update(ctx, "my-resource-group", "my-template-resource", &armapplicationinsights.WorkbookTemplatesClientUpdateOptions{WorkbookTemplateUpdateParameters: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.WorkbookTemplate = armapplicationinsights.WorkbookTemplate{
// 	Name: to.Ptr("testtemplate2"),
// 	Type: to.Ptr("microsoft.insights/workbooktemplates"),
// 	ID: to.Ptr("/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba95/resourceGroups/testrg/providers/microsoft.insights/workbooktemplates/testtemplate2"),
// 	Location: to.Ptr("westeurope"),
// 	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]any{
// 			"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json",
// 			"items":[]any{
// 				map[string]any{
// 					"name": "text - 2",
// 					"type": float64(1),
// 					"content":map[string]any{
// 						"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]any{
// 					"name": "query - 2",
// 					"type": float64(3),
// 					"content":map[string]any{
// 						"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]any{
// 			},
// 			"version": "Notebook/1.0",
// 		},
// 	},
// }
Output:

type WorkbookTemplatesClientCreateOrUpdateOptions

type WorkbookTemplatesClientCreateOrUpdateOptions struct {
}

WorkbookTemplatesClientCreateOrUpdateOptions contains the optional parameters for the WorkbookTemplatesClient.CreateOrUpdate method.

type WorkbookTemplatesClientCreateOrUpdateResponse

type WorkbookTemplatesClientCreateOrUpdateResponse struct {
	WorkbookTemplate
}

WorkbookTemplatesClientCreateOrUpdateResponse contains the response from method WorkbookTemplatesClient.CreateOrUpdate.

type WorkbookTemplatesClientDeleteOptions

type WorkbookTemplatesClientDeleteOptions struct {
}

WorkbookTemplatesClientDeleteOptions contains the optional parameters for the WorkbookTemplatesClient.Delete method.

type WorkbookTemplatesClientDeleteResponse

type WorkbookTemplatesClientDeleteResponse struct {
}

WorkbookTemplatesClientDeleteResponse contains the response from method WorkbookTemplatesClient.Delete.

type WorkbookTemplatesClientGetOptions

type WorkbookTemplatesClientGetOptions struct {
}

WorkbookTemplatesClientGetOptions contains the optional parameters for the WorkbookTemplatesClient.Get method.

type WorkbookTemplatesClientGetResponse

type WorkbookTemplatesClientGetResponse struct {
	WorkbookTemplate
}

WorkbookTemplatesClientGetResponse contains the response from method WorkbookTemplatesClient.Get.

type WorkbookTemplatesClientListByResourceGroupOptions

type WorkbookTemplatesClientListByResourceGroupOptions struct {
}

WorkbookTemplatesClientListByResourceGroupOptions contains the optional parameters for the WorkbookTemplatesClient.NewListByResourceGroupPager method.

type WorkbookTemplatesClientListByResourceGroupResponse

type WorkbookTemplatesClientListByResourceGroupResponse struct {
	WorkbookTemplatesListResult
}

WorkbookTemplatesClientListByResourceGroupResponse contains the response from method WorkbookTemplatesClient.NewListByResourceGroupPager.

type WorkbookTemplatesClientUpdateOptions

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

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.

func (WorkbookTemplatesListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkbookTemplatesListResult.

func (*WorkbookTemplatesListResult) UnmarshalJSON

func (w *WorkbookTemplatesListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookTemplatesListResult.

type WorkbookUpdateParameters

type WorkbookUpdateParameters struct {
	// The kind of workbook. Only valid value is shared.
	Kind *WorkbookUpdateSharedTypeKind `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.

func (*WorkbookUpdateParameters) UnmarshalJSON

func (w *WorkbookUpdateParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbookUpdateParameters.

type WorkbookUpdateSharedTypeKind

type WorkbookUpdateSharedTypeKind string

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

const (
	WorkbookUpdateSharedTypeKindShared WorkbookUpdateSharedTypeKind = "shared"
)

func PossibleWorkbookUpdateSharedTypeKindValues

func PossibleWorkbookUpdateSharedTypeKindValues() []WorkbookUpdateSharedTypeKind

PossibleWorkbookUpdateSharedTypeKindValues returns the possible values for the WorkbookUpdateSharedTypeKind const type.

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 2022-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the 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 (WorkbookAdd)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookAdd.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkbooksClient().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.WorkbookSharedTypeKindShared),
	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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Workbook = armapplicationinsights.Workbook{
// 	Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Type: to.Ptr("Microsoft.Insights/workbooks"),
// 	ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Location: to.Ptr("westus"),
// 	Tags: map[string]*string{
// 		"TagSample01": to.Ptr("sample01"),
// 		"TagSample02": to.Ptr("sample02"),
// 	},
// 	Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
// 	Properties: &armapplicationinsights.WorkbookProperties{
// 		Description: to.Ptr("Sample workbook"),
// 		Category: to.Ptr("workbook"),
// 		DisplayName: to.Ptr("Sample workbook"),
// 		Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"),
// 		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/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group"),
// 		TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T06:56:31.6301521Z"); return t}()),
// 		UserID: to.Ptr("userId"),
// 		Version: to.Ptr("Notebook/1.0"),
// 	},
// }
Output:

Example (WorkbookManagedAdd)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedAdd.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkbooksClient().CreateOrUpdate(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", armapplicationinsights.Workbook{
	Location: to.Ptr("westus"),
	Identity: &armapplicationinsights.WorkbookResourceIdentity{
		Type: to.Ptr(armapplicationinsights.ManagedServiceIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]*armapplicationinsights.UserAssignedIdentity{
			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid": {},
		},
	},
	Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
	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\":\"test\"},\"name\":\"text - 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group\"]}"),
		StorageURI:     to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer"),
		Version:        to.Ptr("Notebook/1.0"),
	},
}, &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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Workbook = armapplicationinsights.Workbook{
// 	Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Type: to.Ptr("Microsoft.Insights/workbooks"),
// 	ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Location: to.Ptr("westus"),
// 	Identity: &armapplicationinsights.WorkbookResourceIdentity{
// 		Type: to.Ptr(armapplicationinsights.ManagedServiceIdentityTypeUserAssigned),
// 		UserAssignedIdentities: map[string]*armapplicationinsights.UserAssignedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid": &armapplicationinsights.UserAssignedIdentity{
// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 			},
// 		},
// 	},
// 	Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
// 	Properties: &armapplicationinsights.WorkbookProperties{
// 		Description: to.Ptr("Sample workbook"),
// 		Category: to.Ptr("workbook"),
// 		DisplayName: to.Ptr("Sample workbook"),
// 		Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"),
// 		SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/test-ws\"]}"),
// 		SourceID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group"),
// 		StorageURI: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer"),
// 		TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-20T22:00:26.4229554Z"); return t}()),
// 		UserID: to.Ptr("70d90f65-8a70-4e42-b8d5-86gv25e0a90f"),
// 		Version: to.Ptr("Notebook/1.0"),
// 	},
// }
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 2022-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the 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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookDelete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewWorkbooksClient().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 2022-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • options - WorkbooksClientGetOptions contains the optional parameters for the WorkbooksClient.Get method.
Example (WorkbookGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkbooksClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Workbook = armapplicationinsights.Workbook{
// 	Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Type: to.Ptr("Microsoft.Insights/workbooks"),
// 	ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Location: to.Ptr("westus"),
// 	Tags: map[string]*string{
// 		"TagSample01": to.Ptr("sample01"),
// 		"TagSample02": to.Ptr("sample02"),
// 	},
// 	Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
// 	Properties: &armapplicationinsights.WorkbookProperties{
// 		Description: to.Ptr("Sample workbook"),
// 		Category: to.Ptr("workbook"),
// 		DisplayName: to.Ptr("Sample workbook"),
// 		Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"),
// 		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}"),
// 		TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T06:56:31.6301521Z"); return t}()),
// 		UserID: to.Ptr("userId"),
// 		Version: to.Ptr("Notebook/1.0"),
// 	},
// }
Output:

Example (WorkbookGet1)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet1.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkbooksClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Workbook = armapplicationinsights.Workbook{
// 	Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Type: to.Ptr("Microsoft.Insights/workbooks"),
// 	ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Location: to.Ptr("westus"),
// 	Tags: map[string]*string{
// 		"TagSample01": to.Ptr("sample01"),
// 		"TagSample02": to.Ptr("sample02"),
// 	},
// 	Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
// 	Properties: &armapplicationinsights.WorkbookProperties{
// 		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}"),
// 		TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-24T06:56:31.6301521Z"); return t}()),
// 		UserID: to.Ptr("userId"),
// 		Version: to.Ptr("Notebook/1.0"),
// 	},
// }
Output:

Example (WorkbookManagedGet)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkbooksClient().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)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Workbook = armapplicationinsights.Workbook{
// 	Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Type: to.Ptr("Microsoft.Insights/workbooks"),
// 	ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Location: to.Ptr("westus"),
// 	Identity: &armapplicationinsights.WorkbookResourceIdentity{
// 		Type: to.Ptr(armapplicationinsights.ManagedServiceIdentityTypeUserAssigned),
// 		UserAssignedIdentities: map[string]*armapplicationinsights.UserAssignedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid": &armapplicationinsights.UserAssignedIdentity{
// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 			},
// 		},
// 	},
// 	Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
// 	Properties: &armapplicationinsights.WorkbookProperties{
// 		Description: to.Ptr("Sample workbook"),
// 		Category: to.Ptr("workbook"),
// 		DisplayName: to.Ptr("azuremon"),
// 		Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"),
// 		SerializedData: to.Ptr("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"testing1\"},\"showPin\":false,\"name\":\"text - 0\"}],\"isLocked\":true,\"fallbackResourceIds\":[\"Azure Monitor\"]}"),
// 		SourceID: to.Ptr("azure monitor"),
// 		StorageURI: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer"),
// 		TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-04T09:07:17.735638Z"); return t}()),
// 		UserID: to.Ptr("51d1409c-d725-4550-ac03-98c0bef9ef07"),
// 		Version: to.Ptr("Notebook/1.0"),
// 	},
// }
Output:

func (*WorkbooksClient) NewListByResourceGroupPager

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.

Generated from API version 2022-04-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.NewListByResourceGroupPager method.
Example (WorkbooksList)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWorkbooksClient().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() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.WorkbooksListResult = armapplicationinsights.WorkbooksListResult{
	// 	Value: []*armapplicationinsights.Workbook{
	// 		{
	// 			Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
	// 			Type: to.Ptr("Microsoft.Insights/workbooks"),
	// 			ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
	// 			Properties: &armapplicationinsights.WorkbookProperties{
	// 				Description: to.Ptr("Sample workbook"),
	// 				Category: to.Ptr("workbook"),
	// 				DisplayName: to.Ptr("My Workbook 1"),
	// 				Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"),
	// 				SerializedData: to.Ptr("{\"verion\":\"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/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"),
	// 				TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-04T09:07:17.735638Z"); return t}()),
	// 				UserID: to.Ptr("userId"),
	// 				Version: to.Ptr("Notebook/1.0"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1c3b5722"),
	// 			Type: to.Ptr("Microsoft.Insights/workbooks"),
	// 			ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/c0deea5e-3344-40f2-96f8-6f8e1c3b5722"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 				"TagSample01": to.Ptr("sample01"),
	// 				"TagSample02": to.Ptr("sample02"),
	// 			},
	// 			Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
	// 			Properties: &armapplicationinsights.WorkbookProperties{
	// 				Description: to.Ptr("Sample workbook"),
	// 				Category: to.Ptr("workbook"),
	// 				DisplayName: to.Ptr("My Workbook 2"),
	// 				Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bc"),
	// 				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/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"),
	// 				TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-04T09:07:17.735638Z"); return t}()),
	// 				UserID: to.Ptr("userId"),
	// 				Version: to.Ptr("Notebook/1.0"),
	// 			},
	// 	}},
	// }
}
Output:

Example (WorkbooksManagedList)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksManagedList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWorkbooksClient().NewListByResourceGroupPager("my-resource-group", armapplicationinsights.CategoryTypeWorkbook, &armapplicationinsights.WorkbooksClientListByResourceGroupOptions{Tags: []string{},
	SourceID:        to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"),
	CanFetchContent: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.WorkbooksListResult = armapplicationinsights.WorkbooksListResult{
	// 	Value: []*armapplicationinsights.Workbook{
	// 		{
	// 			Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
	// 			Type: to.Ptr("Microsoft.Insights/workbooks"),
	// 			ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Identity: &armapplicationinsights.WorkbookResourceIdentity{
	// 				Type: to.Ptr(armapplicationinsights.ManagedServiceIdentityTypeUserAssigned),
	// 				UserAssignedIdentities: map[string]*armapplicationinsights.UserAssignedIdentity{
	// 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myid": &armapplicationinsights.UserAssignedIdentity{
	// 						ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 						PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					},
	// 				},
	// 			},
	// 			Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
	// 			Properties: &armapplicationinsights.WorkbookProperties{
	// 				Description: to.Ptr("Sample workbook"),
	// 				Category: to.Ptr("workbook"),
	// 				DisplayName: to.Ptr("My Workbook 1"),
	// 				Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"),
	// 				SerializedData: to.Ptr("{\"verion\":\"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/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"),
	// 				StorageURI: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/mystorage/blobServices/default/containers/mycontainer"),
	// 				TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-20T22:00:26.4229554Z"); return t}()),
	// 				UserID: to.Ptr("userId"),
	// 				Version: to.Ptr("Notebook/1.0"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1cdd5722"),
	// 			Type: to.Ptr("Microsoft.Insights/workbooks"),
	// 			ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/c0deea5e-3344-40f2-96f8-6f8e1cdd5722"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 				"TagSample01": to.Ptr("sample01"),
	// 				"TagSample02": to.Ptr("sample02"),
	// 			},
	// 			Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
	// 			Properties: &armapplicationinsights.WorkbookProperties{
	// 				Description: to.Ptr("Sample workbook"),
	// 				Category: to.Ptr("workbook"),
	// 				DisplayName: to.Ptr("My Workbook 2"),
	// 				Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bc"),
	// 				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/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"),
	// 				TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-20T21:00:26.4229555Z"); return t}()),
	// 				UserID: to.Ptr("userId"),
	// 				Version: to.Ptr("Notebook/1.0"),
	// 			},
	// 	}},
	// }
}
Output:

func (*WorkbooksClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Get all Workbooks defined within a specified subscription and category.

Generated from API version 2022-04-01

  • category - Category of workbook to return.
  • options - WorkbooksClientListBySubscriptionOptions contains the optional parameters for the WorkbooksClient.NewListBySubscriptionPager method.
Example (WorkbooksList2)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList2.json

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

Example (WorkbooksListSub)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksListSub.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWorkbooksClient().NewListBySubscriptionPager(armapplicationinsights.CategoryTypeWorkbook, &armapplicationinsights.WorkbooksClientListBySubscriptionOptions{Tags: []string{},
	CanFetchContent: nil,
})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.WorkbooksListResult = armapplicationinsights.WorkbooksListResult{
	// 	Value: []*armapplicationinsights.Workbook{
	// 		{
	// 			Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
	// 			Type: to.Ptr("Microsoft.Insights/workbooks"),
	// 			ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
	// 			Properties: &armapplicationinsights.WorkbookProperties{
	// 				Description: to.Ptr("Sample workbook"),
	// 				Category: to.Ptr("workbook"),
	// 				DisplayName: to.Ptr("My Workbook 1"),
	// 				Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"),
	// 				SerializedData: to.Ptr("{\"verion\":\"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/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"),
	// 				TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-20T22:00:26.4229554Z"); return t}()),
	// 				UserID: to.Ptr("userId"),
	// 				Version: to.Ptr("Notebook/1.0"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("c0deea5e-3344-40f2-96f8-6f8e1c3b5722"),
	// 			Type: to.Ptr("Microsoft.Insights/workbooks"),
	// 			ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/c0deea5e-3344-40f2-96f8-6f8e1c3b5722"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 				"TagSample01": to.Ptr("sample01"),
	// 				"TagSample02": to.Ptr("sample02"),
	// 			},
	// 			Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
	// 			Properties: &armapplicationinsights.WorkbookProperties{
	// 				Description: to.Ptr("Sample workbook"),
	// 				Category: to.Ptr("workbook"),
	// 				DisplayName: to.Ptr("My Workbook 2"),
	// 				Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bc"),
	// 				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/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Web/sites/MyApp"),
	// 				TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-20T22:00:26.4229554Z"); return t}()),
	// 				UserID: to.Ptr("userId"),
	// 				Version: to.Ptr("Notebook/1.0"),
	// 			},
	// 	}},
	// }
}
Output:

func (*WorkbooksClient) NewRevisionsListPager

func (client *WorkbooksClient) NewRevisionsListPager(resourceGroupName string, resourceName string, options *WorkbooksClientRevisionsListOptions) *runtime.Pager[WorkbooksClientRevisionsListResponse]

NewRevisionsListPager - Get the revisions for the workbook defined by its resourceName.

Generated from API version 2022-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • options - WorkbooksClientRevisionsListOptions contains the optional parameters for the WorkbooksClient.NewRevisionsListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionsList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewWorkbooksClient().NewRevisionsListPager("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.WorkbooksListResult = armapplicationinsights.WorkbooksListResult{
	// 	Value: []*armapplicationinsights.Workbook{
	// 		{
	// 			Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
	// 			Type: to.Ptr("Microsoft.Insights/workbooks"),
	// 			ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
	// 			Properties: &armapplicationinsights.WorkbookProperties{
	// 				Description: to.Ptr("Sample workbook"),
	// 				Category: to.Ptr("workbook"),
	// 				DisplayName: to.Ptr("My Workbook 1"),
	// 				Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1ab"),
	// 				SourceID: to.Ptr("Azure Monitor"),
	// 				TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-04T09:07:17.735638Z"); return t}()),
	// 				UserID: to.Ptr("userId"),
	// 				Version: to.Ptr("Notebook/1.0"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
	// 			Type: to.Ptr("Microsoft.Insights/workbooks"),
	// 			ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 				"TagSample01": to.Ptr("sample01"),
	// 				"TagSample02": to.Ptr("sample02"),
	// 			},
	// 			Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
	// 			Properties: &armapplicationinsights.WorkbookProperties{
	// 				Description: to.Ptr("Sample workbook"),
	// 				Category: to.Ptr("workbook"),
	// 				DisplayName: to.Ptr("My Workbook 2"),
	// 				Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1bb"),
	// 				SourceID: to.Ptr("Azure Monitor"),
	// 				TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-04T09:07:17.735638Z"); return t}()),
	// 				UserID: to.Ptr("userId"),
	// 				Version: to.Ptr("Notebook/1.0"),
	// 			},
	// 	}},
	// }
}
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 2022-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the 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/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewWorkbooksClient().RevisionGet(ctx, "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", "1e2f8435b98248febee70c64ac22e1ab", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Workbook = armapplicationinsights.Workbook{
// 	Name: to.Ptr("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Type: to.Ptr("Microsoft.Insights/workbooks"),
// 	ID: to.Ptr("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"),
// 	Location: to.Ptr("westus"),
// 	Tags: map[string]*string{
// 		"TagSample01": to.Ptr("sample01"),
// 		"TagSample02": to.Ptr("sample02"),
// 	},
// 	Kind: to.Ptr(armapplicationinsights.WorkbookSharedTypeKindShared),
// 	Properties: &armapplicationinsights.WorkbookProperties{
// 		Description: to.Ptr("Sample workbook"),
// 		Category: to.Ptr("workbook"),
// 		DisplayName: to.Ptr("My New Workbook"),
// 		Revision: to.Ptr("1e2f8435b98248febee70c64ac22e1ab"),
// 		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}"),
// 		TimeModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-09-04T09:07:17.735638Z"); return t}()),
// 		UserID: to.Ptr("userId"),
// 		Version: to.Ptr("Notebook/1.0"),
// 	},
// }
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 2022-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • resourceName - The name of the resource.
  • options - WorkbooksClientUpdateOptions contains the optional parameters for the WorkbooksClient.Update method.
Example (WorkbookManagedUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewWorkbooksClient().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:

Example (WorkbookUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7932c2df6c8435d6c0e5cbebbca79bce627d5f06/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armapplicationinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewWorkbooksClient().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/providers/Microsoft.Web/sites/MyApp"),
	WorkbookUpdateParameters: nil,
})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

type WorkbooksClientCreateOrUpdateOptions

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

type WorkbooksClientCreateOrUpdateResponse struct {
	Workbook
}

WorkbooksClientCreateOrUpdateResponse contains the response from method WorkbooksClient.CreateOrUpdate.

type WorkbooksClientDeleteOptions

type WorkbooksClientDeleteOptions struct {
}

WorkbooksClientDeleteOptions contains the optional parameters for the WorkbooksClient.Delete method.

type WorkbooksClientDeleteResponse

type WorkbooksClientDeleteResponse struct {
}

WorkbooksClientDeleteResponse contains the response from method WorkbooksClient.Delete.

type WorkbooksClientGetOptions

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

type WorkbooksClientGetResponse struct {
	Workbook
}

WorkbooksClientGetResponse contains the response from method WorkbooksClient.Get.

type WorkbooksClientListByResourceGroupOptions

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.NewListByResourceGroupPager method.

type WorkbooksClientListByResourceGroupResponse

type WorkbooksClientListByResourceGroupResponse struct {
	WorkbooksListResult
}

WorkbooksClientListByResourceGroupResponse contains the response from method WorkbooksClient.NewListByResourceGroupPager.

type WorkbooksClientListBySubscriptionOptions

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.NewListBySubscriptionPager method.

type WorkbooksClientListBySubscriptionResponse

type WorkbooksClientListBySubscriptionResponse struct {
	WorkbooksListResult
}

WorkbooksClientListBySubscriptionResponse contains the response from method WorkbooksClient.NewListBySubscriptionPager.

type WorkbooksClientRevisionGetOptions

type WorkbooksClientRevisionGetOptions struct {
}

WorkbooksClientRevisionGetOptions contains the optional parameters for the WorkbooksClient.RevisionGet method.

type WorkbooksClientRevisionGetResponse

type WorkbooksClientRevisionGetResponse struct {
	Workbook
}

WorkbooksClientRevisionGetResponse contains the response from method WorkbooksClient.RevisionGet.

type WorkbooksClientRevisionsListOptions

type WorkbooksClientRevisionsListOptions struct {
}

WorkbooksClientRevisionsListOptions contains the optional parameters for the WorkbooksClient.NewRevisionsListPager method.

type WorkbooksClientRevisionsListResponse

type WorkbooksClientRevisionsListResponse struct {
	WorkbooksListResult
}

WorkbooksClientRevisionsListResponse contains the response from method WorkbooksClient.NewRevisionsListPager.

type WorkbooksClientUpdateOptions

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

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.

func (WorkbooksListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type WorkbooksListResult.

func (*WorkbooksListResult) UnmarshalJSON

func (w *WorkbooksListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WorkbooksListResult.

Jump to

Keyboard shortcuts

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