Machine Groups - Create

Creates a new machine group.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/features/serviceMap/machineGroups?api-version=2015-11-01-preview

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

Resource group name within the specified subscriptionId.

Regex pattern: [a-zA-Z0-9_-]+

subscriptionId
path True

string

Azure subscription identifier.

workspaceName
path True

string

OMS workspace containing the resources of interest.

Regex pattern: [a-zA-Z0-9_][a-zA-Z0-9_-]+[a-zA-Z0-9_]

api-version
query True

string

API version.

Request Body

Name Required Type Description
kind True string:

machineGroup

Additional resource type qualifier.

properties.displayName True

string

User defined name for the group

etag

string

Resource ETAG.

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

properties.groupType

MachineGroupType

Type of the machine group

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

Responses

Name Type Description
201 Created

MachineGroup

The operation completed successfully.

Other Status Codes

ErrorResponse

An error occurred while processing the request. See the error.code parameter to identify the specific error.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

SMMachineGroupsCreatePost

Sample Request

POST https://management.azure.com/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/features/serviceMap/machineGroups?api-version=2015-11-01-preview

{
  "kind": "machineGroup",
  "properties": {
    "displayName": "Foo",
    "count": 1,
    "machines": [
      {
        "kind": "ref:machinewithhints",
        "id": "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-2f2506f5-cf18-4dc6-98ba-d84ce2610ae0"
      }
    ]
  },
  "etag": "e20e75b5-5765-48a5-9503-9d1b7fd20925"
}

Sample Response

{
  "kind": "machineGroup",
  "properties": {
    "groupType": "unknown",
    "displayName": "Foo",
    "count": 1,
    "machines": [
      {
        "kind": "ref:machinewithhints",
        "properties": {
          "displayNameHint": "MachineName",
          "osFamilyHint": "windows"
        },
        "id": "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machines/m-2f2506f5-cf18-4dc6-98ba-d84ce2610ae0",
        "type": "Microsoft.OperationalInsights/workspaces/features/machines",
        "name": "m-2f2506f5-cf18-4dc6-98ba-d84ce2610ae0"
      }
    ]
  },
  "etag": "e20e75b5-5765-48a5-9503-9d1b7fd20925",
  "id": "/subscriptions/63BE4E24-FDF0-4E9C-9342-6A5D5A359722/resourceGroups/rg-sm/providers/Microsoft.OperationalInsights/workspaces/D6F79F14-E563-469B-84B5-9286D2803B2F/machineGroups/ccaf142f-57f7-4510-bd80-b073cd5dcdec",
  "type": "Microsoft.OperationalInsights/workspaces/features/machineGroups",
  "name": "ccaf142f-57f7-4510-bd80-b073cd5dcdec"
}

Definitions

Name Description
Error

Error details.

ErrorResponse

An error response from the API.

MachineGroup

A user-defined logical grouping of machines.

MachineGroupType

Type of the machine group

MachineReferenceWithHints

A machine reference with a hint of the machine's name and operating system.

OperatingSystemFamily

Specifies the operating system family, e.g., Linux, Windows, etc.

Error

Error details.

Name Type Description
code

string

Error code identifying the specific error.

message

string

Error message in the caller's locale.

ErrorResponse

An error response from the API.

Name Type Description
error

Error

Error information.

MachineGroup

A user-defined logical grouping of machines.

Name Type Description
etag

string

Resource ETAG.

id

string

Resource identifier.

kind string:

machineGroup

Additional resource type qualifier.

name

string

Resource name.

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

properties.displayName

string

User defined name for the group

properties.groupType

MachineGroupType

Type of the machine group

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

type

string

Resource type.

MachineGroupType

Type of the machine group

Name Type Description
azure-cs

string

azure-sf

string

azure-vmss

string

unknown

string

user-static

string

MachineReferenceWithHints

A machine reference with a hint of the machine's name and operating system.

Name Type Description
id

string

Resource URI.

kind string:

ref:machinewithhints

Specifies the sub-class of the reference.

name

string

Resource name.

properties.displayNameHint

string

Last known display name.

properties.osFamilyHint

OperatingSystemFamily

Last known operating system family.

type

string

Resource type qualifier.

OperatingSystemFamily

Specifies the operating system family, e.g., Linux, Windows, etc.

Name Type Description
aix

string

linux

string

solaris

string

unknown

string

windows

string