Intel AMT Features > Storage Administration and Operations > Use Cases > Storage: Modify Block Attributes (Name, Visibility)
CollapseAll image

Storage: Modify Block Attributes (Name, Visibility)

Two operations allow you to change the name of a block and a block’s visibility.  These operations may only be performed by the registered application on blocks that it owns.

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.  Perform one or both of the following operations:

a.   Change the block’s name by invoking AMT_ThirdPartyDataStorageService.SetBlockName with the following input parameters:

Parameter

Description/Value

SessionHandle

The session handle.

BlockHandle

The handle of the block.

BlockName

The new block name as a string of up to 32 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("SetBlockName")

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

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

# $blockHandles contains one or more block handles returned by 'GetAllocatedBlocks' method.

$inputObject.SetProperty("BlockHandle", $blockHandles.Item(0).ToString())

$inputObject.SetProperty("BlockName", "MyBlock")

$outputObject = $thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)

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

 

 

b.   Change the block’s visibility by invoking AMT_ThirdPartyDataStorageService.SetBlockVisibility with the following input parameters:

Parameter

Description/Value

SessionHandle

The session handle.

BlockHandle

The handle of the block.

BlockHidden

The hidden status as a Boolean (true = hidden).

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("SetBlockVisibility")

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

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

# $blockHandles contains one or more block handles returned by 'GetAllocatedBlocks' method.

$inputObject.SetProperty("BlockHandle", $blockHandles.Item(0).ToString())

$inputObject.SetProperty("BlockHidden", "true")

$outputObject = $thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)

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

 

 

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

Additional Information

Intel AMT allows multiple blocks to have the same name. It is the block handle which distinguishes one block from another.

Instance Diagram

Not applicable

Classes Used in This Flow

SDK Sample

Located at:<SDK_root> \Windows\Intel_AMT\Samples\WS-Management\Storage

 

See Also:

   Storage Concepts and Objects

   Application Development Guidelines

   Examples of Using the Storage Feature

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