mongocli iam organizations apiKeys accessLists delete
从您的API密钥中删除指定的IP访问列表条目。
使用此命令,您必须使用具有读写角色的用户帐户或API密钥进行认证。
语法
命令语法
mongocli iam organizations apiKeys accessLists delete <entry> [options]
参数
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
entry | 字符串 | true | 您要从访问列表中删除的IP或CIDR地址。如果条目包含子网掩码,例如192.0.2.0/24,请使用URL编码值%2F代替正斜杠/。 |
选项
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
--apiKey | 字符串 | false | 一个唯一的24位数字ID,用于标识您的API密钥。 |
--force | false | 标志,表示是否在执行请求的操作之前跳过确认提示。 | |
-h, --help | false | delete的帮助信息 | |
--orgId | 字符串 | false | 要使用的组织ID。此选项将覆盖配置文件或环境变量中的设置。 |
继承选项
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
-P, --profile | 字符串 | false | 配置文件中要使用的配置文件名称。有关MongoCLI配置文件的配置文件信息,请参阅https://dochub.mongodb.org/core/atlas-cli-configuration-file. |
输出
如果命令成功执行,CLI将返回类似于以下示例的输出。括号中的值代表您的值。
Access list entry '<Name>' deleted
示例
# Remove the IP address 192.0.2.0 from the access list for the API key with the ID 5f24084d8dbffa3ad3f21234 in the organization with the ID 5a1b39eec902201990f12345: mongocli iam organizations apiKeys accessLists delete 192.0.2.0 --apiKey 5f24084d8dbffa3ad3f21234 --orgId 5a1b39eec902201990f12345