设备发放 IoTDP-创建发放策略:请求示例

时间:2025-02-12 14:54:20

请求示例

  • 创建静态策略请求示例

    POST https://{endpoint}/v5/iotps/{project_id}/allocation-strategies/base{  "access_points" : [ {    "access_point_id" : "599d1975-ec30-4a5f-a390-ef388a1fbc71",    "region_id" : "cn-north-4"  } ],  "base_strategy_info" : {    "keyword" : "waterMeterDevice",    "keyword_from" : "deviceName",    "priority" : 0  }}
  • 创建证书策略请求示例

    POST https://{endpoint}/v5/iotps/{project_id}/allocation-strategies/certificates{  "access_points" : [ {    "access_point_id" : "599d1975-ec30-4a5f-a390-ef388a1fbc71",    "region_id" : "cn-north-4"  } ],  "cert_strategy_info" : {    "cert_id" : "dc0f1016f495157344ac5f1296335cff725ef22f"  }}
  • 创建自定义策略请求示例

    POST https://{endpoint}/v5/iotps/{project_id}/allocation-strategies/functions{  "access_points" : [ {    "access_point_id" : "599d1975-ec30-4a5f-a390-ef388a1fbc71",    "region_id" : "cn-north-4"  }, {    "access_point_id" : "dc0f1016f495157344ac5f1296335cff725ef22f",    "region_id" : "cn-north-1"  } ],  "function_strategy_info" : {    "func_urn" : "urn:fss:xxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test"  }}
support.huaweicloud.com/api-iotps/CreateStrategy.html