【问题标题】:Could I request volume to get encrypted volume through Softlayer API我可以通过 Softlayer API 请求音量以获取加密音量吗
【发布时间】:2018-01-10 03:50:08
【问题描述】:

目前,我会调用“SoftLayer_Virtual_Guest/getUpgradeItemPrices”来获取本地或 SAN 磁盘,并调用“SoftLayer_Product_Package/id”(该块基于“222”)来获取外部磁盘。而且我注意到 SoftLayer 门户可以提供加密的文件/块卷。

我的问题是,我如何通过这些方法通过 Softlayer API 请求加密磁盘。

谢谢。 :)

【问题讨论】:

    标签: ibm-cloud ibm-cloud-infrastructure


    【解决方案1】:

    更新

    一旦完成设置,加密将自动设置。

    注意加密仅在带有星号的数据中心(所谓的升级数据中心)中可用。您可以使用SoftLayer_Network_Storage::getFileBlockEncryptedLocations 方法来识别它们是.

    尝试以下 REST 请求:

    对于存储:

    https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder
    method: POST
    
    {
    "parameters":[
        {
        "complexType": "SoftLayer_Container_Product_Order_Network_Storage_AsAService",
        "location": 449494,
        "packageId": 759,
        "volumeSize": 500,
        "prices": [
        {
            "id": 189433
        }, 
        {
            "id": 189443
        }, 
        {
            "id": 193373
        }, 
        {
            "id": 194633
        }, 
        {
            "id": 193433
        }],
    
        "osFormatType": {
            "keyName": "LINUX"
        }
    }
    ]
    }
    

    对于文件存储:

    https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder
    method: POST
    
    {
    "parameters":[
        {
        "complexType": "SoftLayer_Container_Product_Order_Network_Storage_AsAService",
        "location": 449600,
        "packageId": 759,
        "volumeSize": 250,
        "prices": [
        {
            "id": 189433
        }, 
        {
            "id": 189453
        }, 
        {
            "id": 192043
        }, 
        {
            "id": 193013
        }, 
        {
            "id": 192053
        }
        ],
        "osFormatType": {
            "keyName": "LINUX"
        }
        }
        ]
    }
    

    更多信息请见下文:

    https://knowledgelayer.softlayer.com/procedure/migrate-file-storage-encrypted-file-storage

    https://knowledgelayer.softlayer.com/faqs/1483#7277

    【讨论】:

    • 我正在更新答案,将请求添加到订单文件和块存储
    • 更新答案,见上文。
    • 谢谢。我可以运行一些命令来检查加密状态吗?
    • 是的,您可以使用以下请求作为示例,加密卷的 hasEncryptionAtRest 属性应为“true”。 https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/12345678/getObject?objectMask=mask[accountId, username,capacityGb,id,notes,hasEncryptionAtRest]
    • 没问题爱德华。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多