我们正在尝试以编程方式使用云控制器api
按顺序执行以下操作我不确定cli命令cf enable-service-access
的等效Cloud Controller API是什么有人可以帮忙解决这个问题吗?
答案 0 :(得分:1)
每个计划和组织级别启用和禁用服务 - 不是针对个人用户。
所有CF API调用都是pretty well documented。您正在寻找的API调用是Creating a Service Plan Visibility,如下所示:
curl "https://api.[your-domain.com]/v2/service_plan_visibilities" -d '{
"service_plan_guid": "ab5780a9-ac8e-4412-9496-4512e865011a",
"organization_guid": "55d0ff39-dac9-431f-ba6d-83f37381f1c3"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2NiIsImVtYWlsIjoiZW1haWwtMTIxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTF9.ekbGeGWE6KvbEBH-IcvRj1f5j2yonbeKQqq2M8vMjvA" \
-H "Host: example.org" \
-H "Content-Type: application/json" \
-H "Cookie: "