Cloud Foundry OpsManager API

时间:2018-11-30 06:03:15

标签: pivotal-cloud-foundry

亲爱的

我使用下面的JSON创建一个新计划mysql:

{
         "properties": {
           ".properties.plan_collection": {
             "value": [
               {
                 "name": {"value": "microplan"},
                 "description": {"value": "Micro Service Plan (10mb)"},
                 "max_storage_mb": {"value": "10"},
                 "max_user_connections": {"value": "10"},
                 "private": {"value": "true"}
               }
             ]
           }
         }
}

但是,它总是抛出此错误:

{"errors":{".properties.plan_collection":["Record 1: Name can't be blank","Record 1: Name must only contain lowercase letters, numbers, hyphen(-), or underscore(_)","Record 1: Description can't be blank","Record 1: Max Storage Mb can't be blank","Record 1: Max User Connections can't be blank"]}}

我使用的卷发是:

curl -k "https://opsmanager.domain.com/api/v0/staged/products/p-mysql-50e42f2a0862baa9827a/properties" -H "Authorization: bearer $accesstoken" -H "Content-Type: application/json" -X PUT -d @microplan.json

我的JSON有效负载有什么问题?我遵循PCF API文档:https://docs.pivotal.io/pivotalcf/2-0/opsman-api/#updating-a-collection-property

BR

0 个答案:

没有答案
相关问题