loganalytics

package
v3.30.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataExportRule added in v3.29.0

type DataExportRule struct {
	pulumi.CustomResourceState

	// The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If the destination is an event hub namespace, an event hub would be created for each table automatically.
	DestinationResourceId pulumi.StringOutput `pulumi:"destinationResourceId"`
	// Is this Log Analytics Data Export Rule when enabled? Possible values include `true` or `false`. Defaults to `false`.
	Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
	// The ID of the created Data Export Rule.
	ExportRuleId pulumi.StringOutput `pulumi:"exportRuleId"`
	// The name of the Log Analytics Data Export Rule. Changing this forces a new Log Analytics Data Export Rule to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the Resource Group where the Log Analytics Data Export should exist. Changing this forces a new Log Analytics Data Export Rule to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// A list of table names to export to the destination resource, for example: `["Heartbeat", "SecurityEvent"]`.
	TableNames pulumi.StringArrayOutput `pulumi:"tableNames"`
	// The resource ID of the workspace. Changing this forces a new Log Analytics Data Export Rule to be created.
	WorkspaceResourceId pulumi.StringOutput `pulumi:"workspaceResourceId"`
}

Manages a Log Analytics Data Export Rule.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/loganalytics"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/operationalinsights"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "exampleAnalyticsWorkspace", &operationalinsights.AnalyticsWorkspaceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Sku:               pulumi.String("PerGB2018"),
			RetentionInDays:   pulumi.Int(30),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
			ResourceGroupName:      exampleResourceGroup.Name,
			Location:               exampleResourceGroup.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountReplicationType: pulumi.String("LRS"),
		})
		if err != nil {
			return err
		}
		_, err = loganalytics.NewDataExportRule(ctx, "exampleDataExportRule", &loganalytics.DataExportRuleArgs{
			ResourceGroupName:     exampleResourceGroup.Name,
			WorkspaceResourceId:   exampleAnalyticsWorkspace.ID(),
			DestinationResourceId: exampleAccount.ID(),
			TableNames: pulumi.StringArray{
				pulumi.String("Heartbeat"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetDataExportRule added in v3.29.0

func GetDataExportRule(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *DataExportRuleState, opts ...pulumi.ResourceOption) (*DataExportRule, error)

GetDataExportRule gets an existing DataExportRule resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewDataExportRule added in v3.29.0

func NewDataExportRule(ctx *pulumi.Context,
	name string, args *DataExportRuleArgs, opts ...pulumi.ResourceOption) (*DataExportRule, error)

NewDataExportRule registers a new resource with the given unique name, arguments, and options.

type DataExportRuleArgs added in v3.29.0

type DataExportRuleArgs struct {
	// The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If the destination is an event hub namespace, an event hub would be created for each table automatically.
	DestinationResourceId pulumi.StringInput
	// Is this Log Analytics Data Export Rule when enabled? Possible values include `true` or `false`. Defaults to `false`.
	Enabled pulumi.BoolPtrInput
	// The name of the Log Analytics Data Export Rule. Changing this forces a new Log Analytics Data Export Rule to be created.
	Name pulumi.StringPtrInput
	// The name of the Resource Group where the Log Analytics Data Export should exist. Changing this forces a new Log Analytics Data Export Rule to be created.
	ResourceGroupName pulumi.StringInput
	// A list of table names to export to the destination resource, for example: `["Heartbeat", "SecurityEvent"]`.
	TableNames pulumi.StringArrayInput
	// The resource ID of the workspace. Changing this forces a new Log Analytics Data Export Rule to be created.
	WorkspaceResourceId pulumi.StringInput
}

The set of arguments for constructing a DataExportRule resource.

func (DataExportRuleArgs) ElementType added in v3.29.0

func (DataExportRuleArgs) ElementType() reflect.Type

type DataExportRuleState added in v3.29.0

type DataExportRuleState struct {
	// The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If the destination is an event hub namespace, an event hub would be created for each table automatically.
	DestinationResourceId pulumi.StringPtrInput
	// Is this Log Analytics Data Export Rule when enabled? Possible values include `true` or `false`. Defaults to `false`.
	Enabled pulumi.BoolPtrInput
	// The ID of the created Data Export Rule.
	ExportRuleId pulumi.StringPtrInput
	// The name of the Log Analytics Data Export Rule. Changing this forces a new Log Analytics Data Export Rule to be created.
	Name pulumi.StringPtrInput
	// The name of the Resource Group where the Log Analytics Data Export should exist. Changing this forces a new Log Analytics Data Export Rule to be created.
	ResourceGroupName pulumi.StringPtrInput
	// A list of table names to export to the destination resource, for example: `["Heartbeat", "SecurityEvent"]`.
	TableNames pulumi.StringArrayInput
	// The resource ID of the workspace. Changing this forces a new Log Analytics Data Export Rule to be created.
	WorkspaceResourceId pulumi.StringPtrInput
}

func (DataExportRuleState) ElementType added in v3.29.0

func (DataExportRuleState) ElementType() reflect.Type

type DataSourceWindowsEvent

type DataSourceWindowsEvent struct {
	pulumi.CustomResourceState

	// Specifies the name of the Windows Event Log to collect events from.
	EventLogName pulumi.StringOutput `pulumi:"eventLogName"`
	// Specifies an array of event types applied to the specified event log. Possible values include `error`, `warning` and `information`.
	EventTypes pulumi.StringArrayOutput `pulumi:"eventTypes"`
	// The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
	WorkspaceName pulumi.StringOutput `pulumi:"workspaceName"`
}

Manages a Log Analytics Windows Event DataSource.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/loganalytics"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/operationalinsights"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "exampleAnalyticsWorkspace", &operationalinsights.AnalyticsWorkspaceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Sku:               pulumi.String("PerGB2018"),
		})
		if err != nil {
			return err
		}
		_, err = loganalytics.NewDataSourceWindowsEvent(ctx, "exampleDataSourceWindowsEvent", &loganalytics.DataSourceWindowsEventArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			WorkspaceName:     exampleAnalyticsWorkspace.Name,
			EventLogName:      pulumi.String("Application"),
			EventTypes: pulumi.StringArray{
				pulumi.String("error"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetDataSourceWindowsEvent

func GetDataSourceWindowsEvent(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *DataSourceWindowsEventState, opts ...pulumi.ResourceOption) (*DataSourceWindowsEvent, error)

GetDataSourceWindowsEvent gets an existing DataSourceWindowsEvent resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewDataSourceWindowsEvent

func NewDataSourceWindowsEvent(ctx *pulumi.Context,
	name string, args *DataSourceWindowsEventArgs, opts ...pulumi.ResourceOption) (*DataSourceWindowsEvent, error)

NewDataSourceWindowsEvent registers a new resource with the given unique name, arguments, and options.

type DataSourceWindowsEventArgs

type DataSourceWindowsEventArgs struct {
	// Specifies the name of the Windows Event Log to collect events from.
	EventLogName pulumi.StringInput
	// Specifies an array of event types applied to the specified event log. Possible values include `error`, `warning` and `information`.
	EventTypes pulumi.StringArrayInput
	// The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
	Name pulumi.StringPtrInput
	// The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
	ResourceGroupName pulumi.StringInput
	// The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
	WorkspaceName pulumi.StringInput
}

The set of arguments for constructing a DataSourceWindowsEvent resource.

func (DataSourceWindowsEventArgs) ElementType

func (DataSourceWindowsEventArgs) ElementType() reflect.Type

type DataSourceWindowsEventState

type DataSourceWindowsEventState struct {
	// Specifies the name of the Windows Event Log to collect events from.
	EventLogName pulumi.StringPtrInput
	// Specifies an array of event types applied to the specified event log. Possible values include `error`, `warning` and `information`.
	EventTypes pulumi.StringArrayInput
	// The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
	Name pulumi.StringPtrInput
	// The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
	ResourceGroupName pulumi.StringPtrInput
	// The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
	WorkspaceName pulumi.StringPtrInput
}

func (DataSourceWindowsEventState) ElementType

type DataSourceWindowsPerformanceCounter

type DataSourceWindowsPerformanceCounter struct {
	pulumi.CustomResourceState

	// The friendly name of the performance counter.
	CounterName pulumi.StringOutput `pulumi:"counterName"`
	// The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a `*` will apply to all instances.
	InstanceName pulumi.StringOutput `pulumi:"instanceName"`
	// The time of sample interval in seconds. Supports values between 10 and 2147483647.
	IntervalSeconds pulumi.IntOutput `pulumi:"intervalSeconds"`
	// The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The object name of the Log Analytics Windows Performance Counter DataSource.
	ObjectName pulumi.StringOutput `pulumi:"objectName"`
	// The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
	WorkspaceName pulumi.StringOutput `pulumi:"workspaceName"`
}

Manages a Log Analytics (formally Operational Insights) Windows Performance Counter DataSource.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/loganalytics"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/operationalinsights"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "exampleAnalyticsWorkspace", &operationalinsights.AnalyticsWorkspaceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Sku:               pulumi.String("PerGB2018"),
		})
		if err != nil {
			return err
		}
		_, err = loganalytics.NewDataSourceWindowsPerformanceCounter(ctx, "exampleDataSourceWindowsPerformanceCounter", &loganalytics.DataSourceWindowsPerformanceCounterArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			WorkspaceName:     exampleAnalyticsWorkspace.Name,
			ObjectName:        pulumi.String("CPU"),
			InstanceName:      pulumi.String("*"),
			CounterName:       pulumi.String("CPU"),
			IntervalSeconds:   pulumi.Int(10),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetDataSourceWindowsPerformanceCounter

func GetDataSourceWindowsPerformanceCounter(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *DataSourceWindowsPerformanceCounterState, opts ...pulumi.ResourceOption) (*DataSourceWindowsPerformanceCounter, error)

GetDataSourceWindowsPerformanceCounter gets an existing DataSourceWindowsPerformanceCounter resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewDataSourceWindowsPerformanceCounter

func NewDataSourceWindowsPerformanceCounter(ctx *pulumi.Context,
	name string, args *DataSourceWindowsPerformanceCounterArgs, opts ...pulumi.ResourceOption) (*DataSourceWindowsPerformanceCounter, error)

NewDataSourceWindowsPerformanceCounter registers a new resource with the given unique name, arguments, and options.

type DataSourceWindowsPerformanceCounterArgs

type DataSourceWindowsPerformanceCounterArgs struct {
	// The friendly name of the performance counter.
	CounterName pulumi.StringInput
	// The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a `*` will apply to all instances.
	InstanceName pulumi.StringInput
	// The time of sample interval in seconds. Supports values between 10 and 2147483647.
	IntervalSeconds pulumi.IntInput
	// The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
	Name pulumi.StringPtrInput
	// The object name of the Log Analytics Windows Performance Counter DataSource.
	ObjectName pulumi.StringInput
	// The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
	ResourceGroupName pulumi.StringInput
	// The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
	WorkspaceName pulumi.StringInput
}

The set of arguments for constructing a DataSourceWindowsPerformanceCounter resource.

func (DataSourceWindowsPerformanceCounterArgs) ElementType

type DataSourceWindowsPerformanceCounterState

type DataSourceWindowsPerformanceCounterState struct {
	// The friendly name of the performance counter.
	CounterName pulumi.StringPtrInput
	// The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a `*` will apply to all instances.
	InstanceName pulumi.StringPtrInput
	// The time of sample interval in seconds. Supports values between 10 and 2147483647.
	IntervalSeconds pulumi.IntPtrInput
	// The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
	Name pulumi.StringPtrInput
	// The object name of the Log Analytics Windows Performance Counter DataSource.
	ObjectName pulumi.StringPtrInput
	// The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
	ResourceGroupName pulumi.StringPtrInput
	// The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
	WorkspaceName pulumi.StringPtrInput
}

func (DataSourceWindowsPerformanceCounterState) ElementType

type LinkedService

type LinkedService struct {
	pulumi.CustomResourceState

	// Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in `workspaceName`. Currently it defaults to and only supports `automation` as a value. Changing this forces a new resource to be created.
	LinkedServiceName pulumi.StringPtrOutput `pulumi:"linkedServiceName"`
	// The automatically generated name of the Linked Service. This cannot be specified. The format is always `<workspace_name>/<linked_service_name>` e.g. `workspace1/Automation`
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// The ID of the Resource that will be linked to the workspace. Changing this forces a new resource to be created.
	ResourceId pulumi.StringOutput `pulumi:"resourceId"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.
	WorkspaceName pulumi.StringOutput `pulumi:"workspaceName"`
}

Links a Log Analytics (formally Operational Insights) Workspace to another resource. The (currently) only linkable service is an Azure Automation Account.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/automation"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/loganalytics"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/operationalinsights"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := automation.NewAccount(ctx, "exampleAccount", &automation.AccountArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			SkuName:           pulumi.String("Basic"),
			Tags: pulumi.StringMap{
				"environment": pulumi.String("development"),
			},
		})
		if err != nil {
			return err
		}
		exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "exampleAnalyticsWorkspace", &operationalinsights.AnalyticsWorkspaceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Sku:               pulumi.String("PerGB2018"),
			RetentionInDays:   pulumi.Int(30),
		})
		if err != nil {
			return err
		}
		_, err = loganalytics.NewLinkedService(ctx, "exampleLinkedService", &loganalytics.LinkedServiceArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			WorkspaceName:     exampleAnalyticsWorkspace.Name,
			ResourceId:        exampleAccount.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetLinkedService

func GetLinkedService(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LinkedServiceState, opts ...pulumi.ResourceOption) (*LinkedService, error)

GetLinkedService gets an existing LinkedService resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewLinkedService

func NewLinkedService(ctx *pulumi.Context,
	name string, args *LinkedServiceArgs, opts ...pulumi.ResourceOption) (*LinkedService, error)

NewLinkedService registers a new resource with the given unique name, arguments, and options.

type LinkedServiceArgs

type LinkedServiceArgs struct {
	// Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in `workspaceName`. Currently it defaults to and only supports `automation` as a value. Changing this forces a new resource to be created.
	LinkedServiceName pulumi.StringPtrInput
	// The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringInput
	// The ID of the Resource that will be linked to the workspace. Changing this forces a new resource to be created.
	ResourceId pulumi.StringInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.
	WorkspaceName pulumi.StringInput
}

The set of arguments for constructing a LinkedService resource.

func (LinkedServiceArgs) ElementType

func (LinkedServiceArgs) ElementType() reflect.Type

type LinkedServiceState

type LinkedServiceState struct {
	// Name of the type of linkedServices resource to connect to the Log Analytics Workspace specified in `workspaceName`. Currently it defaults to and only supports `automation` as a value. Changing this forces a new resource to be created.
	LinkedServiceName pulumi.StringPtrInput
	// The automatically generated name of the Linked Service. This cannot be specified. The format is always `<workspace_name>/<linked_service_name>` e.g. `workspace1/Automation`
	Name pulumi.StringPtrInput
	// The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringPtrInput
	// The ID of the Resource that will be linked to the workspace. Changing this forces a new resource to be created.
	ResourceId pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// Name of the Log Analytics Workspace that will contain the linkedServices resource. Changing this forces a new resource to be created.
	WorkspaceName pulumi.StringPtrInput
}

func (LinkedServiceState) ElementType

func (LinkedServiceState) ElementType() reflect.Type

type LinkedStorageAccount added in v3.29.0

type LinkedStorageAccount struct {
	pulumi.CustomResourceState

	// The data source type which should be used for this Log Analytics Linked Storage Account. Possible values are "customlogs", "azurewatson", "query", "ingestion" and "alerts". Changing this forces a new Log Analytics Linked Storage Account to be created.
	DataSourceType pulumi.StringOutput `pulumi:"dataSourceType"`
	// The name of the Resource Group where the Log Analytics Linked Storage Account should exist. Changing this forces a new Log Analytics Linked Storage Account to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// The storage account resource ids to be linked.
	StorageAccountIds pulumi.StringArrayOutput `pulumi:"storageAccountIds"`
	// The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created.
	WorkspaceResourceId pulumi.StringOutput `pulumi:"workspaceResourceId"`
}

Manages a Log Analytics Linked Storage Account.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/loganalytics"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/operationalinsights"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
			ResourceGroupName:      exampleResourceGroup.Name,
			Location:               exampleResourceGroup.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountReplicationType: pulumi.String("GRS"),
		})
		if err != nil {
			return err
		}
		exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "exampleAnalyticsWorkspace", &operationalinsights.AnalyticsWorkspaceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Sku:               pulumi.String("PerGB2018"),
		})
		if err != nil {
			return err
		}
		_, err = loganalytics.NewLinkedStorageAccount(ctx, "exampleLinkedStorageAccount", &loganalytics.LinkedStorageAccountArgs{
			DataSourceType:      pulumi.String("customlogs"),
			ResourceGroupName:   exampleResourceGroup.Name,
			WorkspaceResourceId: exampleAnalyticsWorkspace.ID(),
			StorageAccountIds: pulumi.StringArray{
				exampleAccount.ID(),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetLinkedStorageAccount added in v3.29.0

func GetLinkedStorageAccount(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LinkedStorageAccountState, opts ...pulumi.ResourceOption) (*LinkedStorageAccount, error)

GetLinkedStorageAccount gets an existing LinkedStorageAccount resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewLinkedStorageAccount added in v3.29.0

func NewLinkedStorageAccount(ctx *pulumi.Context,
	name string, args *LinkedStorageAccountArgs, opts ...pulumi.ResourceOption) (*LinkedStorageAccount, error)

NewLinkedStorageAccount registers a new resource with the given unique name, arguments, and options.

type LinkedStorageAccountArgs added in v3.29.0

type LinkedStorageAccountArgs struct {
	// The data source type which should be used for this Log Analytics Linked Storage Account. Possible values are "customlogs", "azurewatson", "query", "ingestion" and "alerts". Changing this forces a new Log Analytics Linked Storage Account to be created.
	DataSourceType pulumi.StringInput
	// The name of the Resource Group where the Log Analytics Linked Storage Account should exist. Changing this forces a new Log Analytics Linked Storage Account to be created.
	ResourceGroupName pulumi.StringInput
	// The storage account resource ids to be linked.
	StorageAccountIds pulumi.StringArrayInput
	// The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created.
	WorkspaceResourceId pulumi.StringInput
}

The set of arguments for constructing a LinkedStorageAccount resource.

func (LinkedStorageAccountArgs) ElementType added in v3.29.0

func (LinkedStorageAccountArgs) ElementType() reflect.Type

type LinkedStorageAccountState added in v3.29.0

type LinkedStorageAccountState struct {
	// The data source type which should be used for this Log Analytics Linked Storage Account. Possible values are "customlogs", "azurewatson", "query", "ingestion" and "alerts". Changing this forces a new Log Analytics Linked Storage Account to be created.
	DataSourceType pulumi.StringPtrInput
	// The name of the Resource Group where the Log Analytics Linked Storage Account should exist. Changing this forces a new Log Analytics Linked Storage Account to be created.
	ResourceGroupName pulumi.StringPtrInput
	// The storage account resource ids to be linked.
	StorageAccountIds pulumi.StringArrayInput
	// The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created.
	WorkspaceResourceId pulumi.StringPtrInput
}

func (LinkedStorageAccountState) ElementType added in v3.29.0

func (LinkedStorageAccountState) ElementType() reflect.Type

type SavedSearch added in v3.20.0

type SavedSearch struct {
	pulumi.CustomResourceState

	// The category that the Saved Search will be listed under. Changing this forces a new resource to be created.
	Category pulumi.StringOutput `pulumi:"category"`
	// The name that Saved Search will be displayed as. Changing this forces a new resource to be created.
	DisplayName pulumi.StringOutput `pulumi:"displayName"`
	// The function alias if the query serves as a function. Changing this forces a new resource to be created.
	FunctionAlias pulumi.StringPtrOutput `pulumi:"functionAlias"`
	// The function parameters if the query serves as a function. Changing this forces a new resource to be created.
	FunctionParameters pulumi.StringArrayOutput `pulumi:"functionParameters"`
	// Specifies the ID of the Log Analytics Workspace that the Saved Search will be associated with. Changing this forces a new resource to be created.
	LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"`
	// Specifies the name of the Log Analytics Saved Search. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The query expression for the saved search. Changing this forces a new resource to be created.
	Query pulumi.StringOutput `pulumi:"query"`
	// A mapping of tags which should be assigned to the Logs Analytics Saved Search.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
}

Manages a Log Analytics (formally Operational Insights) Saved Search.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/loganalytics"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/operationalinsights"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("East US"),
		})
		if err != nil {
			return err
		}
		_, err = operationalinsights.NewAnalyticsWorkspace(ctx, "exampleAnalyticsWorkspace", &operationalinsights.AnalyticsWorkspaceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Sku:               pulumi.String("PerGB2018"),
			RetentionInDays:   pulumi.Int(30),
		})
		if err != nil {
			return err
		}
		_, err = loganalytics.NewSavedSearch(ctx, "exampleSavedSearch", &loganalytics.SavedSearchArgs{
			LogAnalyticsWorkspaceId: pulumi.Any(azurerm_log_analytics_workspace.Test.Id),
			Category:                pulumi.String("exampleCategory"),
			DisplayName:             pulumi.String("exampleDisplayName"),
			Query:                   pulumi.String("exampleQuery"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetSavedSearch added in v3.20.0

func GetSavedSearch(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SavedSearchState, opts ...pulumi.ResourceOption) (*SavedSearch, error)

GetSavedSearch gets an existing SavedSearch resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewSavedSearch added in v3.20.0

func NewSavedSearch(ctx *pulumi.Context,
	name string, args *SavedSearchArgs, opts ...pulumi.ResourceOption) (*SavedSearch, error)

NewSavedSearch registers a new resource with the given unique name, arguments, and options.

type SavedSearchArgs added in v3.20.0

type SavedSearchArgs struct {
	// The category that the Saved Search will be listed under. Changing this forces a new resource to be created.
	Category pulumi.StringInput
	// The name that Saved Search will be displayed as. Changing this forces a new resource to be created.
	DisplayName pulumi.StringInput
	// The function alias if the query serves as a function. Changing this forces a new resource to be created.
	FunctionAlias pulumi.StringPtrInput
	// The function parameters if the query serves as a function. Changing this forces a new resource to be created.
	FunctionParameters pulumi.StringArrayInput
	// Specifies the ID of the Log Analytics Workspace that the Saved Search will be associated with. Changing this forces a new resource to be created.
	LogAnalyticsWorkspaceId pulumi.StringInput
	// Specifies the name of the Log Analytics Saved Search. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The query expression for the saved search. Changing this forces a new resource to be created.
	Query pulumi.StringInput
	// A mapping of tags which should be assigned to the Logs Analytics Saved Search.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a SavedSearch resource.

func (SavedSearchArgs) ElementType added in v3.20.0

func (SavedSearchArgs) ElementType() reflect.Type

type SavedSearchState added in v3.20.0

type SavedSearchState struct {
	// The category that the Saved Search will be listed under. Changing this forces a new resource to be created.
	Category pulumi.StringPtrInput
	// The name that Saved Search will be displayed as. Changing this forces a new resource to be created.
	DisplayName pulumi.StringPtrInput
	// The function alias if the query serves as a function. Changing this forces a new resource to be created.
	FunctionAlias pulumi.StringPtrInput
	// The function parameters if the query serves as a function. Changing this forces a new resource to be created.
	FunctionParameters pulumi.StringArrayInput
	// Specifies the ID of the Log Analytics Workspace that the Saved Search will be associated with. Changing this forces a new resource to be created.
	LogAnalyticsWorkspaceId pulumi.StringPtrInput
	// Specifies the name of the Log Analytics Saved Search. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The query expression for the saved search. Changing this forces a new resource to be created.
	Query pulumi.StringPtrInput
	// A mapping of tags which should be assigned to the Logs Analytics Saved Search.
	Tags pulumi.StringMapInput
}

func (SavedSearchState) ElementType added in v3.20.0

func (SavedSearchState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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