We recommend using Azure Native.
azure.loganalytics.DataSourceWindowsPerformanceCounter
Explore with Pulumi AI
Manages a Log Analytics (formally Operational Insights) Windows Performance Counter DataSource.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Sku = "PerGB2018",
});
var exampleDataSourceWindowsPerformanceCounter = new Azure.LogAnalytics.DataSourceWindowsPerformanceCounter("exampleDataSourceWindowsPerformanceCounter", new()
{
ResourceGroupName = exampleResourceGroup.Name,
WorkspaceName = exampleAnalyticsWorkspace.Name,
ObjectName = "CPU",
InstanceName = "*",
CounterName = "CPU",
IntervalSeconds = 10,
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/loganalytics"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/operationalinsights"
"github.com/pulumi/pulumi/sdk/v3/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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import com.pulumi.azure.loganalytics.DataSourceWindowsPerformanceCounter;
import com.pulumi.azure.loganalytics.DataSourceWindowsPerformanceCounterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("PerGB2018")
.build());
var exampleDataSourceWindowsPerformanceCounter = new DataSourceWindowsPerformanceCounter("exampleDataSourceWindowsPerformanceCounter", DataSourceWindowsPerformanceCounterArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.workspaceName(exampleAnalyticsWorkspace.name())
.objectName("CPU")
.instanceName("*")
.counterName("CPU")
.intervalSeconds(10)
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
sku="PerGB2018")
example_data_source_windows_performance_counter = azure.loganalytics.DataSourceWindowsPerformanceCounter("exampleDataSourceWindowsPerformanceCounter",
resource_group_name=example_resource_group.name,
workspace_name=example_analytics_workspace.name,
object_name="CPU",
instance_name="*",
counter_name="CPU",
interval_seconds=10)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
sku: "PerGB2018",
});
const exampleDataSourceWindowsPerformanceCounter = new azure.loganalytics.DataSourceWindowsPerformanceCounter("exampleDataSourceWindowsPerformanceCounter", {
resourceGroupName: exampleResourceGroup.name,
workspaceName: exampleAnalyticsWorkspace.name,
objectName: "CPU",
instanceName: "*",
counterName: "CPU",
intervalSeconds: 10,
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleAnalyticsWorkspace:
type: azure:operationalinsights:AnalyticsWorkspace
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
sku: PerGB2018
exampleDataSourceWindowsPerformanceCounter:
type: azure:loganalytics:DataSourceWindowsPerformanceCounter
properties:
resourceGroupName: ${exampleResourceGroup.name}
workspaceName: ${exampleAnalyticsWorkspace.name}
objectName: CPU
instanceName: '*'
counterName: CPU
intervalSeconds: 10
Create DataSourceWindowsPerformanceCounter Resource
new DataSourceWindowsPerformanceCounter(name: string, args: DataSourceWindowsPerformanceCounterArgs, opts?: CustomResourceOptions);
@overload
def DataSourceWindowsPerformanceCounter(resource_name: str,
opts: Optional[ResourceOptions] = None,
counter_name: Optional[str] = None,
instance_name: Optional[str] = None,
interval_seconds: Optional[int] = None,
name: Optional[str] = None,
object_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
workspace_name: Optional[str] = None)
@overload
def DataSourceWindowsPerformanceCounter(resource_name: str,
args: DataSourceWindowsPerformanceCounterArgs,
opts: Optional[ResourceOptions] = None)
func NewDataSourceWindowsPerformanceCounter(ctx *Context, name string, args DataSourceWindowsPerformanceCounterArgs, opts ...ResourceOption) (*DataSourceWindowsPerformanceCounter, error)
public DataSourceWindowsPerformanceCounter(string name, DataSourceWindowsPerformanceCounterArgs args, CustomResourceOptions? opts = null)
public DataSourceWindowsPerformanceCounter(String name, DataSourceWindowsPerformanceCounterArgs args)
public DataSourceWindowsPerformanceCounter(String name, DataSourceWindowsPerformanceCounterArgs args, CustomResourceOptions options)
type: azure:loganalytics:DataSourceWindowsPerformanceCounter
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DataSourceWindowsPerformanceCounterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DataSourceWindowsPerformanceCounterArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DataSourceWindowsPerformanceCounterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DataSourceWindowsPerformanceCounterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DataSourceWindowsPerformanceCounterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DataSourceWindowsPerformanceCounter Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The DataSourceWindowsPerformanceCounter resource accepts the following input properties:
- Counter
Name string The friendly name of the performance counter.
- Instance
Name string The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- Interval
Seconds int The time of sample interval in seconds. Supports values between 10 and 2147483647.
- Object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- Resource
Group stringName 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.
- Workspace
Name string 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.
- Name string
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.
- Counter
Name string The friendly name of the performance counter.
- Instance
Name string The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- Interval
Seconds int The time of sample interval in seconds. Supports values between 10 and 2147483647.
- Object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- Resource
Group stringName 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.
- Workspace
Name string 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.
- Name string
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.
- counter
Name String The friendly name of the performance counter.
- instance
Name String The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- interval
Seconds Integer The time of sample interval in seconds. Supports values between 10 and 2147483647.
- object
Name String The object name of the Log Analytics Windows Performance Counter DataSource.
- resource
Group StringName 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.
- workspace
Name String 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.
- name String
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.
- counter
Name string The friendly name of the performance counter.
- instance
Name string The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- interval
Seconds number The time of sample interval in seconds. Supports values between 10 and 2147483647.
- object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- resource
Group stringName 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.
- workspace
Name string 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.
- name string
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.
- counter_
name str The friendly name of the performance counter.
- instance_
name str The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- interval_
seconds int The time of sample interval in seconds. Supports values between 10 and 2147483647.
- object_
name str The object name of the Log Analytics Windows Performance Counter DataSource.
- resource_
group_ strname 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.
- workspace_
name str 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.
- name str
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.
- counter
Name String The friendly name of the performance counter.
- instance
Name String The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- interval
Seconds Number The time of sample interval in seconds. Supports values between 10 and 2147483647.
- object
Name String The object name of the Log Analytics Windows Performance Counter DataSource.
- resource
Group StringName 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.
- workspace
Name String 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.
- name String
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.
Outputs
All input properties are implicitly available as output properties. Additionally, the DataSourceWindowsPerformanceCounter resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing DataSourceWindowsPerformanceCounter Resource
Get an existing DataSourceWindowsPerformanceCounter resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DataSourceWindowsPerformanceCounterState, opts?: CustomResourceOptions): DataSourceWindowsPerformanceCounter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
counter_name: Optional[str] = None,
instance_name: Optional[str] = None,
interval_seconds: Optional[int] = None,
name: Optional[str] = None,
object_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
workspace_name: Optional[str] = None) -> DataSourceWindowsPerformanceCounter
func GetDataSourceWindowsPerformanceCounter(ctx *Context, name string, id IDInput, state *DataSourceWindowsPerformanceCounterState, opts ...ResourceOption) (*DataSourceWindowsPerformanceCounter, error)
public static DataSourceWindowsPerformanceCounter Get(string name, Input<string> id, DataSourceWindowsPerformanceCounterState? state, CustomResourceOptions? opts = null)
public static DataSourceWindowsPerformanceCounter get(String name, Output<String> id, DataSourceWindowsPerformanceCounterState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Counter
Name string The friendly name of the performance counter.
- Instance
Name string The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- Interval
Seconds int The time of sample interval in seconds. Supports values between 10 and 2147483647.
- Name string
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.
- Object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- Resource
Group stringName 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.
- Workspace
Name string 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.
- Counter
Name string The friendly name of the performance counter.
- Instance
Name string The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- Interval
Seconds int The time of sample interval in seconds. Supports values between 10 and 2147483647.
- Name string
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.
- Object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- Resource
Group stringName 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.
- Workspace
Name string 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.
- counter
Name String The friendly name of the performance counter.
- instance
Name String The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- interval
Seconds Integer The time of sample interval in seconds. Supports values between 10 and 2147483647.
- name String
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.
- object
Name String The object name of the Log Analytics Windows Performance Counter DataSource.
- resource
Group StringName 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.
- workspace
Name String 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.
- counter
Name string The friendly name of the performance counter.
- instance
Name string The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- interval
Seconds number The time of sample interval in seconds. Supports values between 10 and 2147483647.
- name string
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.
- object
Name string The object name of the Log Analytics Windows Performance Counter DataSource.
- resource
Group stringName 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.
- workspace
Name string 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.
- counter_
name str The friendly name of the performance counter.
- instance_
name str The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- interval_
seconds int The time of sample interval in seconds. Supports values between 10 and 2147483647.
- name str
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.
- object_
name str The object name of the Log Analytics Windows Performance Counter DataSource.
- resource_
group_ strname 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.
- workspace_
name str 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.
- counter
Name String The friendly name of the performance counter.
- instance
Name String The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a
*
will apply to all instances.- interval
Seconds Number The time of sample interval in seconds. Supports values between 10 and 2147483647.
- name String
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.
- object
Name String The object name of the Log Analytics Windows Performance Counter DataSource.
- resource
Group StringName 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.
- workspace
Name String 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.
Import
Log Analytics Windows Performance Counter DataSources can be imported using the resource id
, e.g.
$ pulumi import azure:loganalytics/dataSourceWindowsPerformanceCounter:DataSourceWindowsPerformanceCounter example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/dataSources/datasource1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.