cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 10

Creating Subgroups via SDK

Jump to solution

Hi,

I am trying to create an subgroup via SDK. Therefore I use the SWQL-Studio.

For testing purposes I created a group 'Test' via WebGui this Container/Group has the ID 23.

Now I want to create an Subgroup:
pastedImage_0.png

But I dont know how to fill the "Name" and "Definition" tag at memberDefinitions.

<ArrayOfMemberDefinitionInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.solarwinds.com/2008/Orion"><MemberDefinitionInfo><Name>???</Name><Definition>???</Definition></MemberDefinitionInfo></ArrayOfMemberDefinitionInfo>

0 Kudos
1 Solution
MVP
MVP

You can use the following. I have used it in PowerShell scripts to create groups with no member definitions and have tested it with the SDK using your method.

The member definition isn't linking this child group to the parent group - it defines the members of the group you are creating (e.g. nodes, groups, dynamic queries, etc). In your instance, what objects would be a member of TestSub1. The below tells SolarWinds there are no members of the group and you will need to add the group members separately.

<ArrayOfMemberDefinitionInfo xmlns='http://schemas.solarwinds.com/2008/Orion' />

View solution in original post

4 Replies
MVP
MVP

You can use the following. I have used it in PowerShell scripts to create groups with no member definitions and have tested it with the SDK using your method.

The member definition isn't linking this child group to the parent group - it defines the members of the group you are creating (e.g. nodes, groups, dynamic queries, etc). In your instance, what objects would be a member of TestSub1. The below tells SolarWinds there are no members of the group and you will need to add the group members separately.

<ArrayOfMemberDefinitionInfo xmlns='http://schemas.solarwinds.com/2008/Orion' />

View solution in original post

Exactly what I needed!

0 Kudos
Level 13

Here is a example of the group creation and member assignment:.OrionSDK/Groups.ps1 at master · solarwinds/OrionSDK · GitHub

Thank you for your answer, but I already read this.

I dont know why I have to set a member definition, because the definition should be this group shouldnt it?

I'm confused about that. I want to create a container. Therefore I set all parameters (name, parentid), why do I have to define that this new container should be a child from the parentid?

0 Kudos