mcloud-organizations
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCloud CLI: Organizations Commands
Cloud CLI:组织命令
Execute commands to list and retrieve Cloud organizations.
mcloud organizations执行命令来列出和检索云组织信息。
mcloud organizationsConstraints
约束条件
- requires personal auth (browser login or personal access key). Organization access keys return 401 on this command.
organizations list - When authenticated with using an org access key, use
MCLOUD_TOKENto get the organization ID instead.mcloud whoami --json
- 命令需要个人认证(浏览器登录或个人访问密钥)。使用组织访问密钥执行此命令会返回401错误。
organizations list - 若使用组织访问密钥通过认证,请改用
MCLOUD_TOKEN命令获取组织ID。mcloud whoami --json
Commands
命令说明
organizations list
organizations list
List all organizations your account has access to.
bash
mcloud organizations list --jsonOptions:
- — Output as JSON
--json
列出您的账号有权访问的所有组织。
bash
mcloud organizations list --json选项:
- — 以JSON格式输出
--json
organizations get
organizations get
Retrieve a single organization by ID. Returns metadata, subscription details, and members.
bash
mcloud organizations get <organization-id> --jsonArguments:
- — Organization ID (required)
organization
Options:
- — Override the organization in active context (must match the argument)
-o/--organization <id> - — Output as JSON
--json
通过ID获取单个组织的信息。返回元数据、订阅详情及成员信息。
bash
mcloud organizations get <organization-id> --json参数:
- — 组织ID(必填)
organization
选项:
- — 覆盖当前上下文的组织(必须与参数匹配)
-o/--organization <id> - — 以JSON格式输出
--json
Organization Fields (JSON)
组织字段(JSON格式)
| Field | Description |
|---|---|
| Organization ID |
| Organization display name |
| Billing contact email |
| |
| Array of member objects with |
| Current plan, period, and |
| Billing account holder details |
| 字段 | 描述 |
|---|---|
| 组织ID |
| 组织显示名称 |
| 账单联系人邮箱 |
| 状态( |
| 成员对象数组,包含 |
| 当前套餐、周期及 |
| 账单账户持有人详情 |
Examples
示例
bash
undefinedbash
undefinedList all organizations
列出所有组织
mcloud organizations list --json
mcloud organizations list --json
Set context to first organization
将上下文切换至第一个组织
ORGANIZATION_ID=$(
mcloud organizations list --json
| jq -r '.[0].id' ) mcloud use --organization "$ORGANIZATION_ID"
| jq -r '.[0].id' ) mcloud use --organization "$ORGANIZATION_ID"
ORGANIZATION_ID=$(
mcloud organizations list --json
| jq -r '.[0].id' ) mcloud use --organization "$ORGANIZATION_ID"
| jq -r '.[0].id' ) mcloud use --organization "$ORGANIZATION_ID"
Find organization ID by name
通过名称查找组织ID
ORGANIZATION_ID=$(
mcloud organizations list --json
| jq -r '.[] | select(.name == "My Organization") | .id' )
| jq -r '.[] | select(.name == "My Organization") | .id' )
ORGANIZATION_ID=$(
mcloud organizations list --json
| jq -r '.[] | select(.name == "My Organization") | .id' )
| jq -r '.[] | select(.name == "My Organization") | .id' )
Get organization details (subscription, members)
获取组织详情(订阅、成员)
mcloud organizations get org_123 --json
mcloud organizations get org_123 --json
List member emails
列出成员邮箱
mcloud organizations get org_123 --json
| jq -r '.members[].user.email'
| jq -r '.members[].user.email'
mcloud organizations get org_123 --json
| jq -r '.members[].user.email'
| jq -r '.members[].user.email'
Check subscription plan
检查订阅套餐
mcloud organizations get org_123 --json
| jq '{plan: .subscription.plan.name, status: .subscription.is_active}'
| jq '{plan: .subscription.plan.name, status: .subscription.is_active}'
undefinedmcloud organizations get org_123 --json
| jq '{plan: .subscription.plan.name, status: .subscription.is_active}'
| jq '{plan: .subscription.plan.name, status: .subscription.is_active}'
undefined