Delete Membership Rule From Collection operation for Microsoft System Center Configuration Manager 2012


The Delete Membership Rule From Collection operation deletes a membership rule from the collection. This process is equivalent to removing a rule of "Query" type from the collection. 

The following table describes the <items> XML elements for the Delete Membership Rule From Collection operation:

Elements for the <items> XML element and adapter request for the Delete Membership Rule From Collection operation

Element

Definition

Required

<operation-name>

Specifies the name of the operation: delete-membership-rule-from-collection

Yes

<arguments>

Specifies a list of arguments required for this operation

Yes

<target>

Specifies the connection information for the Microsoft System Center Configuration Manager application 

Valid values: The value specified for the <target> element must be the same as that specified for the name attribute of the <config> element in the adapter configuration. 

Default value: The first configuration defined in the adapter configuration

No

<collection-id>

Specifies a string identifier for the collection whose membership rule is to be deleted

Yes

<all>

Specifies whether to delete all the membership rules of the collection 

You do not need to specify any value for the <all> element. When you specify the <all> element, the adapter ignores the <rule-name> element and deletes all membership rules.

No

<rule-name>

Specifies the name of the membership rule to be deleted

No

The following figure shows a sample adapter request for the Delete Membership Rule From Collection operation: 

Sample adapter request for the Delete Membership Rule From Collection operation
 

  <mssccm-request>
     <operation-name>delete-membership-rule-from-collection</operation-name>
     <arguments>
        <target>config1</target>
        <collection-id>PRI00033</collection-id>
        <rule-name>Test Rule</rule-name>
     </arguments>
  </mssccm-request>

The following figure shows the adapter response for the sample request: 

Sample adapter response for the Delete Membership Rule From Collection operation
 

<mssccm-response>
     <metadata>
       <status>success</status>
       <response-count>1</response-count>
     </metadata>
     <responses>
       <response>
         <metadata>
           <target>config1</target>
           <status>success</status>
           <count>1</count>
         </metadata>
         <output>
           <message>Membership rule with RuleName: Test Rule from collection PRI00033 is deleted successfully.</message>
         </output>
       </response>
     </responses>
   </mssccm-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 20.18.01