azure-native.operationalinsights.MachineGroup
Explore with Pulumi AI
A user-defined logical grouping of machines. Azure REST API version: 2015-11-01-preview. Prior API version in Azure Native 1.x: 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",
});
});
package main
import (
operationalinsights "github.com/pulumi/pulumi-azure-native-sdk/operationalinsights/v2"
"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
})
}
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());
}
}
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")
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",
});
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
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 string
- The unique name of the resource.
- args MachineGroupArgs
- 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 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 string
- The unique name of the resource.
- args MachineGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MachineGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
},
},
});
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"),
},
},
})
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());
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",
}])
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",
}],
});
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
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
The MachineGroup resource accepts the following input properties:
- Display
Name string - User defined name for the group
- Resource
Group stringName - Resource group name within the specified subscriptionId.
- Workspace
Name 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.
- Group
Type string | Pulumi.Azure Native. Operational Insights. Machine Group Type - Type of the machine group
- Machine
Group stringName - Machine Group resource name.
- Machines
List<Pulumi.
Azure Native. Operational Insights. Inputs. Machine Reference With Hints> - 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 string - User defined name for the group
- Resource
Group stringName - Resource group name within the specified subscriptionId.
- Workspace
Name 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.
- Group
Type string | MachineGroup Type - Type of the machine group
- Machine
Group stringName - Machine Group resource name.
- Machines
[]Machine
Reference With Hints Args - 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 String - User defined name for the group
- resource
Group StringName - Resource group name within the specified subscriptionId.
- workspace
Name 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.
- group
Type String | MachineGroup Type - Type of the machine group
- machine
Group StringName - Machine Group resource name.
- machines
List<Machine
Reference With Hints> - 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 string - User defined name for the group
- resource
Group stringName - Resource group name within the specified subscriptionId.
- workspace
Name 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.
- group
Type string | MachineGroup Type - Type of the machine group
- machine
Group stringName - Machine Group resource name.
- machines
Machine
Reference With Hints[] - 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 str - User defined name for the group
- resource_
group_ strname - Resource group name within the specified subscriptionId.
- workspace_
name 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 | MachineGroup Type - Type of the machine group
- machine_
group_ strname - Machine Group resource name.
- machines
Sequence[Machine
Reference With Hints Args] - 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 String - User defined name for the group
- resource
Group StringName - Resource group name within the specified subscriptionId.
- workspace
Name 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.
- group
Type String | "unknown" | "azure-cs" | "azure-sf" | "azure-vmss" | "user-static" - Type of the machine group
- machine
Group StringName - 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:
Supporting Types
MachineGroupType, MachineGroupTypeArgs
- Unknown
- unknown
- Azure_
cs - azure-cs
- Azure_
sf - azure-sf
- Azure_
vmss - azure-vmss
- User_
static - user-static
- Machine
Group Type Unknown - unknown
- Machine
Group Type_Azure_Cs - azure-cs
- Machine
Group Type_Azure_Sf - azure-sf
- Machine
Group Type_Azure_Vmss - azure-vmss
- Machine
Group Type_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 string
- Resource URI.
- Id string
- Resource URI.
- id String
- Resource URI.
- id string
- Resource URI.
- id str
- Resource URI.
- id String
- Resource URI.
MachineReferenceWithHintsResponse, MachineReferenceWithHintsResponseArgs
- Display
Name stringHint - Last known display name.
- Id string
- Resource URI.
- Name string
- Resource name.
- Os
Family stringHint - Last known operating system family.
- Type string
- Resource type qualifier.
- Display
Name stringHint - Last known display name.
- Id string
- Resource URI.
- Name string
- Resource name.
- Os
Family stringHint - Last known operating system family.
- Type string
- Resource type qualifier.
- display
Name StringHint - Last known display name.
- id String
- Resource URI.
- name String
- Resource name.
- os
Family StringHint - Last known operating system family.
- type String
- Resource type qualifier.
- display
Name stringHint - Last known display name.
- id string
- Resource URI.
- name string
- Resource name.
- os
Family stringHint - Last known operating system family.
- type string
- Resource type qualifier.
- display_
name_ strhint - Last known display name.
- id str
- Resource URI.
- name str
- Resource name.
- os_
family_ strhint - Last known operating system family.
- type str
- Resource type qualifier.
- display
Name StringHint - Last known display name.
- id String
- Resource URI.
- name String
- Resource name.
- os
Family StringHint - Last known operating system family.
- type 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}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0