Intel AMT Features > Storage Administration and Operations > Use Cases > Storage: Modify a Block's Permission Group (Name, Permission, Removing an Entry)
CollapseAll image

Storage: Modify a Block’s Permission Group (Name, Permission, Removing an Entry)

Given a permissions group handle, you can modify the permission value, change the group’s name, or remove entries in the group.  (For information about adding entries to the group, see Storage: Add a Permissions Group to a Block, and Add Applications or Filters to it.)

1.  Register the application, as described in the Storage: Register Application, Perform Task, Unregister Application flow. You should have the session handle and application handle available.

2.  Retrieve the block handle for the block of interest, as described in the Storage: Get the Block Handles for an Application flow.

3.  Retrieve the permissions group handle of interest, as described in the Storage: Retrieve all Permission Groups Associated with a Block flow.

4.  Perform one or more of the following operations:

a.   Change the permissions group’s name by invoking AMT_ThirdPartyDataStorageService.SetPermissionsGroupName with the following input parameters:

Parameter

Description/Value

SessionHandle

The session handle.

BlockHandle

The handle of the block.

GroupHandle

The permissions group handle.

GroupName

The new name as a string of up to 16 characters.

Click here for a snippet demonstrating this step

You can execute this snippet by inserting it into the execution template found here.

  

$thirdPartyDataStorageServiceRef =$wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageService WHERE Name='Intel(r) AMT Third Party Data Storage Service'")

$inputObject =$thirdPartyDataStorageServiceRef.CreateMethodInput("SetPermissionsGroupName")

# $sessionHandle is the session handle returned by 'RegisterApplication' method.

$inputObject.SetProperty("SessionHandle",$sessionHandle.ToString())

# $blockHandle is the block handle returned by 'Create a block for the registered application' use case.

$inputObject.SetProperty("BlockHandle",$blockHandle.ToString())

# $groupHandle is the group handle returned by 'AddPermissionsGroup' method.

$inputObject.SetProperty("GroupHandle",$groupHandle.ToString())

$inputObject.SetProperty("GroupName","MyGroup")

$outputObject =$thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)

$returnValue =$outputObject.GetProperty("ReturnValue")

 

 

b.   Change the permissions group’s permission by invoking AMT_ThirdPartyDataStorageService.SetPermissionsGroupPermissions with the following input parameters:

Parameter

Description/Value

SessionHandle

The session handle.

BlockHandle

The handle of the block.

GroupHandle

The permissions group handle.

Permissions

The new permissions value. A value of 1 means read-only. A value of 2 means read-write.

Click here for a snippet demonstrating this step

You can execute this snippet by inserting it into the execution template found here.

  

$thirdPartyDataStorageServiceRef =$wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageService WHERE Name='Intel(r) AMT Third Party Data Storage Service'")

$inputObject =$thirdPartyDataStorageServiceRef.CreateMethodInput("SetPermissionsGroupPermissions")

# $sessionHandle is the session handle returned by 'RegisterApplication' method.

$inputObject.SetProperty("SessionHandle",$sessionHandle.ToString())

# $blockHandle is the block handle returned by 'Create a block for the registered application' use case.

$inputObject.SetProperty("BlockHandle",$blockHandle.ToString())

# $groupHandle is the group handle returned by 'AddPermissionsGroup' method.

$inputObject.SetProperty("GroupHandle",$groupHandle.ToString())

$inputObject.SetProperty("Permissions","1")

$outputObject =$thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)

$returnValue =$outputObject.GetProperty("ReturnValue")

 

 

c.    Remove one or more application handles from the group by invoking AMT_ThirdPartyDataStorageService.RemovePermissionsGroupMembers with the following input parameters:

Parameter

Description/Value

SessionHandle

The session handle.

BlockHandle

The handle of the block.

GroupHandle

The permissions group handle.

MemberHandles

An array of application handles or filters to be removed from the group.

Click here for a snippet demonstrating this step

You can execute this snippet by inserting it into the execution template found here.

  

$thirdPartyDataStorageServiceRef =$wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageService WHERE Name='Intel(r) AMT Third Party Data Storage Service'")

$inputObject =$thirdPartyDataStorageServiceRef.CreateMethodInput("RemovePermissionsGroupMembers")

# $sessionHandle is the session handle returned by 'RegisterApplication' method.

$inputObject.SetProperty("SessionHandle",$sessionHandle.ToString())

# $blockHandle is the block handle returned by 'Create a block for the registered application' use case.

$inputObject.SetProperty("BlockHandle",$blockHandle.ToString())

# $groupHandle is the group handle returned by 'AddPermissionsGroup' method.

$inputObject.SetProperty("GroupHandle",$groupHandle.ToString())

$inputObject.SetProperty("MemberHandles","21")

$outputObject =$thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)

$returnValue =$outputObject.GetProperty("ReturnValue")

 

 

5.  Unregister the application when done. See Storage: Register Application, Perform Task, Unregister Application.

Instance Diagram

Not applicable

Classes Used in This Flow

SDK Sample

If there is a sample demonstrating this flow, it is included in the SDK installation file. See SDK Installation Layout for details.

 

See Also:

   Storage Concepts and Objects

   Application Development Guidelines

   Examples of Using the Storage Feature

Copyright © 2006-2022, Intel Corporation. All rights reserved.