1. Packages
  2. Azure Native
  3. API Docs
  4. operationalinsights
  5. MachineGroup
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.operationalinsights.MachineGroup

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

A user-defined logical grouping of machines.

Uses Azure REST API version 2015-11-01-preview. In version 2.x of the Azure Native provider, it used API version 2015-11-01-preview.

Example Usage

SMMachineGroupsUpdatePut

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var machineGroup = new AzureNative.OperationalInsights.MachineGroup("machineGroup", new()
    {
        Count = 1,
        DisplayName = "Foo",
        Kind = "machineGroup",
        MachineGroupName = "ccfbf4bf-dc08-4371-9e9b-00a8d875d45a",
        Machines = new[]
        {
            new AzureNative.OperationalInsights.Inputs.MachineReferenceWithHintsArgs
            {
                Id = "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-0fe4b501-7ac9-41d7-a4e1-1591a0789519",
                Kind = "ref:machinewithhints",
            },
        },
        ResourceGroupName = "rg-sm",
        WorkspaceName = "D6F79F14-E563-469B-84B5-9286D2803B2F",
    });

});
Copy
package main

import (
	operationalinsights "github.com/pulumi/pulumi-azure-native-sdk/operationalinsights/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := operationalinsights.NewMachineGroup(ctx, "machineGroup", &operationalinsights.MachineGroupArgs{
			Count:            pulumi.Int(1),
			DisplayName:      pulumi.String("Foo"),
			Kind:             pulumi.String("machineGroup"),
			MachineGroupName: pulumi.String("ccfbf4bf-dc08-4371-9e9b-00a8d875d45a"),
			Machines: operationalinsights.MachineReferenceWithHintsArray{
				&operationalinsights.MachineReferenceWithHintsArgs{
					Id:   pulumi.String("/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-0fe4b501-7ac9-41d7-a4e1-1591a0789519"),
					Kind: pulumi.String("ref:machinewithhints"),
				},
			},
			ResourceGroupName: pulumi.String("rg-sm"),
			WorkspaceName:     pulumi.String("D6F79F14-E563-469B-84B5-9286D2803B2F"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.operationalinsights.MachineGroup;
import com.pulumi.azurenative.operationalinsights.MachineGroupArgs;
import com.pulumi.azurenative.operationalinsights.inputs.MachineReferenceWithHintsArgs;
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 machineGroup = new MachineGroup("machineGroup", MachineGroupArgs.builder()
            .count(1)
            .displayName("Foo")
            .kind("machineGroup")
            .machineGroupName("ccfbf4bf-dc08-4371-9e9b-00a8d875d45a")
            .machines(MachineReferenceWithHintsArgs.builder()
                .id("/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-0fe4b501-7ac9-41d7-a4e1-1591a0789519")
                .kind("ref:machinewithhints")
                .build())
            .resourceGroupName("rg-sm")
            .workspaceName("D6F79F14-E563-469B-84B5-9286D2803B2F")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const machineGroup = new azure_native.operationalinsights.MachineGroup("machineGroup", {
    count: 1,
    displayName: "Foo",
    kind: "machineGroup",
    machineGroupName: "ccfbf4bf-dc08-4371-9e9b-00a8d875d45a",
    machines: [{
        id: "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-0fe4b501-7ac9-41d7-a4e1-1591a0789519",
        kind: "ref:machinewithhints",
    }],
    resourceGroupName: "rg-sm",
    workspaceName: "D6F79F14-E563-469B-84B5-9286D2803B2F",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

machine_group = azure_native.operationalinsights.MachineGroup("machineGroup",
    count=1,
    display_name="Foo",
    kind="machineGroup",
    machine_group_name="ccfbf4bf-dc08-4371-9e9b-00a8d875d45a",
    machines=[{
        "id": "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-0fe4b501-7ac9-41d7-a4e1-1591a0789519",
        "kind": "ref:machinewithhints",
    }],
    resource_group_name="rg-sm",
    workspace_name="D6F79F14-E563-469B-84B5-9286D2803B2F")
Copy
resources:
  machineGroup:
    type: azure-native:operationalinsights:MachineGroup
    properties:
      count: 1
      displayName: Foo
      kind: machineGroup
      machineGroupName: ccfbf4bf-dc08-4371-9e9b-00a8d875d45a
      machines:
        - id: /subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-0fe4b501-7ac9-41d7-a4e1-1591a0789519
          kind: ref:machinewithhints
      resourceGroupName: rg-sm
      workspaceName: D6F79F14-E563-469B-84B5-9286D2803B2F
Copy

Create MachineGroup Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new MachineGroup(name: string, args: MachineGroupArgs, opts?: CustomResourceOptions);
@overload
def MachineGroup(resource_name: str,
                 args: MachineGroupArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def MachineGroup(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 display_name: Optional[str] = None,
                 resource_group_name: Optional[str] = None,
                 workspace_name: Optional[str] = None,
                 count: Optional[int] = None,
                 group_type: Optional[Union[str, MachineGroupType]] = None,
                 machine_group_name: Optional[str] = None,
                 machines: Optional[Sequence[MachineReferenceWithHintsArgs]] = None)
func NewMachineGroup(ctx *Context, name string, args MachineGroupArgs, opts ...ResourceOption) (*MachineGroup, error)
public MachineGroup(string name, MachineGroupArgs args, CustomResourceOptions? opts = null)
public MachineGroup(String name, MachineGroupArgs args)
public MachineGroup(String name, MachineGroupArgs args, CustomResourceOptions options)
type: azure-native:operationalinsights:MachineGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. MachineGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. MachineGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. MachineGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. MachineGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MachineGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var machineGroupResource = new AzureNative.OperationalInsights.MachineGroup("machineGroupResource", new()
{
    DisplayName = "string",
    Kind = "string",
    ResourceGroupName = "string",
    WorkspaceName = "string",
    Count = 0,
    GroupType = "string",
    MachineGroupName = "string",
    Machines = new[]
    {
        new AzureNative.OperationalInsights.Inputs.MachineReferenceWithHintsArgs
        {
            Id = "string",
            Kind = "ref:machinewithhints",
        },
    },
});
Copy
example, err := operationalinsights.NewMachineGroup(ctx, "machineGroupResource", &operationalinsights.MachineGroupArgs{
	DisplayName:       pulumi.String("string"),
	Kind:              pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	WorkspaceName:     pulumi.String("string"),
	Count:             pulumi.Int(0),
	GroupType:         pulumi.String("string"),
	MachineGroupName:  pulumi.String("string"),
	Machines: operationalinsights.MachineReferenceWithHintsArray{
		&operationalinsights.MachineReferenceWithHintsArgs{
			Id:   pulumi.String("string"),
			Kind: pulumi.String("ref:machinewithhints"),
		},
	},
})
Copy
var machineGroupResource = new MachineGroup("machineGroupResource", MachineGroupArgs.builder()
    .displayName("string")
    .kind("string")
    .resourceGroupName("string")
    .workspaceName("string")
    .count(0)
    .groupType("string")
    .machineGroupName("string")
    .machines(MachineReferenceWithHintsArgs.builder()
        .id("string")
        .kind("ref:machinewithhints")
        .build())
    .build());
Copy
machine_group_resource = azure_native.operationalinsights.MachineGroup("machineGroupResource",
    display_name="string",
    kind="string",
    resource_group_name="string",
    workspace_name="string",
    count=0,
    group_type="string",
    machine_group_name="string",
    machines=[{
        "id": "string",
        "kind": "ref:machinewithhints",
    }])
Copy
const machineGroupResource = new azure_native.operationalinsights.MachineGroup("machineGroupResource", {
    displayName: "string",
    kind: "string",
    resourceGroupName: "string",
    workspaceName: "string",
    count: 0,
    groupType: "string",
    machineGroupName: "string",
    machines: [{
        id: "string",
        kind: "ref:machinewithhints",
    }],
});
Copy
type: azure-native:operationalinsights:MachineGroup
properties:
    count: 0
    displayName: string
    groupType: string
    kind: string
    machineGroupName: string
    machines:
        - id: string
          kind: ref:machinewithhints
    resourceGroupName: string
    workspaceName: string
Copy

MachineGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The MachineGroup resource accepts the following input properties:

DisplayName This property is required. string
User defined name for the group
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Resource group name within the specified subscriptionId.
WorkspaceName
This property is required.
Changes to this property will trigger replacement.
string
OMS workspace containing the resources of interest.
Count int
Count of machines in this group. The value of count may be bigger than the number of machines in case of the group has been truncated due to exceeding the max number of machines a group can handle.
GroupType string | Pulumi.AzureNative.OperationalInsights.MachineGroupType
Type of the machine group
MachineGroupName Changes to this property will trigger replacement. string
Machine Group resource name.
Machines List<Pulumi.AzureNative.OperationalInsights.Inputs.MachineReferenceWithHints>
References of the machines in this group. The hints within each reference do not represent the current value of the corresponding fields. They are a snapshot created during the last time the machine group was updated.
DisplayName This property is required. string
User defined name for the group
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Resource group name within the specified subscriptionId.
WorkspaceName
This property is required.
Changes to this property will trigger replacement.
string
OMS workspace containing the resources of interest.
Count int
Count of machines in this group. The value of count may be bigger than the number of machines in case of the group has been truncated due to exceeding the max number of machines a group can handle.
GroupType string | MachineGroupType
Type of the machine group
MachineGroupName Changes to this property will trigger replacement. string
Machine Group resource name.
Machines []MachineReferenceWithHintsArgs
References of the machines in this group. The hints within each reference do not represent the current value of the corresponding fields. They are a snapshot created during the last time the machine group was updated.
displayName This property is required. String
User defined name for the group
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Resource group name within the specified subscriptionId.
workspaceName
This property is required.
Changes to this property will trigger replacement.
String
OMS workspace containing the resources of interest.
count Integer
Count of machines in this group. The value of count may be bigger than the number of machines in case of the group has been truncated due to exceeding the max number of machines a group can handle.
groupType String | MachineGroupType
Type of the machine group
machineGroupName Changes to this property will trigger replacement. String
Machine Group resource name.
machines List<MachineReferenceWithHints>
References of the machines in this group. The hints within each reference do not represent the current value of the corresponding fields. They are a snapshot created during the last time the machine group was updated.
displayName This property is required. string
User defined name for the group
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Resource group name within the specified subscriptionId.
workspaceName
This property is required.
Changes to this property will trigger replacement.
string
OMS workspace containing the resources of interest.
count number
Count of machines in this group. The value of count may be bigger than the number of machines in case of the group has been truncated due to exceeding the max number of machines a group can handle.
groupType string | MachineGroupType
Type of the machine group
machineGroupName Changes to this property will trigger replacement. string
Machine Group resource name.
machines MachineReferenceWithHints[]
References of the machines in this group. The hints within each reference do not represent the current value of the corresponding fields. They are a snapshot created during the last time the machine group was updated.
display_name This property is required. str
User defined name for the group
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
Resource group name within the specified subscriptionId.
workspace_name
This property is required.
Changes to this property will trigger replacement.
str
OMS workspace containing the resources of interest.
count int
Count of machines in this group. The value of count may be bigger than the number of machines in case of the group has been truncated due to exceeding the max number of machines a group can handle.
group_type str | MachineGroupType
Type of the machine group
machine_group_name Changes to this property will trigger replacement. str
Machine Group resource name.
machines Sequence[MachineReferenceWithHintsArgs]
References of the machines in this group. The hints within each reference do not represent the current value of the corresponding fields. They are a snapshot created during the last time the machine group was updated.
displayName This property is required. String
User defined name for the group
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Resource group name within the specified subscriptionId.
workspaceName
This property is required.
Changes to this property will trigger replacement.
String
OMS workspace containing the resources of interest.
count Number
Count of machines in this group. The value of count may be bigger than the number of machines in case of the group has been truncated due to exceeding the max number of machines a group can handle.
groupType String | "unknown" | "azure-cs" | "azure-sf" | "azure-vmss" | "user-static"
Type of the machine group
machineGroupName Changes to this property will trigger replacement. String
Machine Group resource name.
machines List<Property Map>
References of the machines in this group. The hints within each reference do not represent the current value of the corresponding fields. They are a snapshot created during the last time the machine group was updated.

Outputs

All input properties are implicitly available as output properties. Additionally, the MachineGroup resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
Type string
Resource type.
Etag string
Resource ETAG.
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
Type string
Resource type.
Etag string
Resource ETAG.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
type String
Resource type.
etag String
Resource ETAG.
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name.
type string
Resource type.
etag string
Resource ETAG.
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name.
type str
Resource type.
etag str
Resource ETAG.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
type String
Resource type.
etag String
Resource ETAG.

Supporting Types

MachineGroupType
, MachineGroupTypeArgs

Unknown
unknown
Azure_cs
azure-cs
Azure_sf
azure-sf
Azure_vmss
azure-vmss
User_static
user-static
MachineGroupTypeUnknown
unknown
MachineGroupType_Azure_Cs
azure-cs
MachineGroupType_Azure_Sf
azure-sf
MachineGroupType_Azure_Vmss
azure-vmss
MachineGroupType_User_Static
user-static
Unknown
unknown
Azurecs
azure-cs
Azuresf
azure-sf
Azurevmss
azure-vmss
Userstatic
user-static
Unknown
unknown
Azure_cs
azure-cs
Azure_sf
azure-sf
Azure_vmss
azure-vmss
User_static
user-static
UNKNOWN
unknown
AZURE_CS
azure-cs
AZURE_SF
azure-sf
AZURE_VMSS
azure-vmss
USER_STATIC
user-static
"unknown"
unknown
"azure-cs"
azure-cs
"azure-sf"
azure-sf
"azure-vmss"
azure-vmss
"user-static"
user-static

MachineReferenceWithHints
, MachineReferenceWithHintsArgs

Id This property is required. string
Resource URI.
Id This property is required. string
Resource URI.
id This property is required. String
Resource URI.
id This property is required. string
Resource URI.
id This property is required. str
Resource URI.
id This property is required. String
Resource URI.

MachineReferenceWithHintsResponse
, MachineReferenceWithHintsResponseArgs

DisplayNameHint This property is required. string
Last known display name.
Id This property is required. string
Resource URI.
Name This property is required. string
Resource name.
OsFamilyHint This property is required. string
Last known operating system family.
Type This property is required. string
Resource type qualifier.
DisplayNameHint This property is required. string
Last known display name.
Id This property is required. string
Resource URI.
Name This property is required. string
Resource name.
OsFamilyHint This property is required. string
Last known operating system family.
Type This property is required. string
Resource type qualifier.
displayNameHint This property is required. String
Last known display name.
id This property is required. String
Resource URI.
name This property is required. String
Resource name.
osFamilyHint This property is required. String
Last known operating system family.
type This property is required. String
Resource type qualifier.
displayNameHint This property is required. string
Last known display name.
id This property is required. string
Resource URI.
name This property is required. string
Resource name.
osFamilyHint This property is required. string
Last known operating system family.
type This property is required. string
Resource type qualifier.
display_name_hint This property is required. str
Last known display name.
id This property is required. str
Resource URI.
name This property is required. str
Resource name.
os_family_hint This property is required. str
Last known operating system family.
type This property is required. str
Resource type qualifier.
displayNameHint This property is required. String
Last known display name.
id This property is required. String
Resource URI.
name This property is required. String
Resource name.
osFamilyHint This property is required. String
Last known operating system family.
type This property is required. String
Resource type qualifier.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:operationalinsights:MachineGroup ccfbf4bf-dc08-4371-9e9b-00a8d875d45a /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machineGroups/{machineGroupName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi