curl -sS "$BMA_BASE_URL/v1/machine_pools/<pool_id>/grants/<grant_id>" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"type": "machine_pool_grant",
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"machine_pool_id": "<string>",
"description": "<string>",
"default_machine_cpu": 1073741824,
"default_machine_memory_mb": 1073741824,
"default_machine_env_overlay": {},
"default_machine_secret_env_overlay": {},
"default_machine_provider_options_overlay": {},
"default_cwd": "<string>",
"max_total_machines": 1073741823,
"max_total_cpu": 1073741823,
"max_total_memory_mb": 1073741823,
"min_machine_cpu": 1073741823,
"min_machine_memory_mb": 1073741823,
"max_machine_cpu": 1073741824,
"max_machine_memory_mb": 1073741824,
"delete_after_idle_minutes": 0,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"machine_pool": {
"id": "<string>",
"org_id": "<string>",
"name": "<string>",
"management_kind": "tenant",
"description": "<string>",
"provider": "<string>",
"default_machine_cpu": 1073741824,
"default_machine_memory_mb": 1073741824,
"default_machine_env": {},
"default_machine_secret_env": {},
"default_machine_provider_options": {},
"default_cwd": "<string>",
"provider_config": {},
"runtime_protection_enabled": true,
"max_total_machines": 1073741823,
"max_total_cpu": 1073741823,
"max_total_memory_mb": 1073741823,
"min_machine_cpu": 1073741823,
"min_machine_memory_mb": 1073741823,
"max_machine_cpu": 1073741824,
"max_machine_memory_mb": 1073741824,
"delete_after_idle_minutes": 1073741826,
"pause_after_idle_minutes": 1073741826,
"archive_after_paused_days": 1825,
"delete_after_paused_days": 1825,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"provider_auth_secret_id": "<string>",
"usage": {
"machines": 1,
"cpu": 1,
"memory_mb": 1
}
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}Machine pools
Retrieve a pool grant
GET
/
v1
/
machine_pools
/
{pool_id}
/
grants
/
{grant_id}
curl -sS "$BMA_BASE_URL/v1/machine_pools/<pool_id>/grants/<grant_id>" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"type": "machine_pool_grant",
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"machine_pool_id": "<string>",
"description": "<string>",
"default_machine_cpu": 1073741824,
"default_machine_memory_mb": 1073741824,
"default_machine_env_overlay": {},
"default_machine_secret_env_overlay": {},
"default_machine_provider_options_overlay": {},
"default_cwd": "<string>",
"max_total_machines": 1073741823,
"max_total_cpu": 1073741823,
"max_total_memory_mb": 1073741823,
"min_machine_cpu": 1073741823,
"min_machine_memory_mb": 1073741823,
"max_machine_cpu": 1073741824,
"max_machine_memory_mb": 1073741824,
"delete_after_idle_minutes": 0,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"machine_pool": {
"id": "<string>",
"org_id": "<string>",
"name": "<string>",
"management_kind": "tenant",
"description": "<string>",
"provider": "<string>",
"default_machine_cpu": 1073741824,
"default_machine_memory_mb": 1073741824,
"default_machine_env": {},
"default_machine_secret_env": {},
"default_machine_provider_options": {},
"default_cwd": "<string>",
"provider_config": {},
"runtime_protection_enabled": true,
"max_total_machines": 1073741823,
"max_total_cpu": 1073741823,
"max_total_memory_mb": 1073741823,
"min_machine_cpu": 1073741823,
"min_machine_memory_mb": 1073741823,
"max_machine_cpu": 1073741824,
"max_machine_memory_mb": 1073741824,
"delete_after_idle_minutes": 1073741826,
"pause_after_idle_minutes": 1073741826,
"archive_after_paused_days": 1825,
"delete_after_paused_days": 1825,
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"provider_auth_secret_id": "<string>",
"usage": {
"machines": 1,
"cpu": 1,
"memory_mb": 1
}
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}请求头
响应
Success.