Update One Global Access List Entry
Update the values of one Global Access List Entry using the unique identifier for the desired IP address.
To find a specific Global Access List Entry,
get the list of Global Access List Entries,
then find the {ACCESS-LIST-ID}
you need.
基本 URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Resource
PATCH /admin/accessList/{ACCESS-LIST-ID}
所需角色
要求调用此端点的API密钥具有Global Owner
角色。
请求参数
请求路径参数
名称 | 类型 | 说明 |
---|---|---|
| 字符串 | Unique identifier for the Global Access List Entry. |
请求查询参数
以下查询参数为可选参数:
名称 | 类型 | 必要性 | 说明 | 默认 | ||||||
---|---|---|---|---|---|---|---|---|---|---|
pretty | 布尔 | Optional | 指示响应正文是否应采用 prettyprint 格式的标记。 |
| ||||||
envelope | 布尔 | Optional | 指示是否将响应包装在信封中的标志。 某些 API 客户端无法访问 HTTP 响应标头或状态代码。要解决这个问题,可在查询中设置 envelope=true。 对于返回一个结果的端点,响应体包括:
|
|
请求正文参数
此端点不使用 HTTP 请求正文参数。
响应
名称 | 类型 | 说明 |
---|---|---|
| 字符串 | Range of IP addresses in an access list in IPv4 or IPv6 CIDR notation. |
| 字符串 | Timestamp, in the number of seconds that have elapsed since the UNIX epoch when you added this CIDR block to the Global Access List. |
| 字符串 | Explanation of the purpose of this Global Access List Entry. |
| 字符串 | Unique identifier for this Global Access List Entry. |
| 字符串 | Scope of the Global Access List Entry. |
| 字符串 | Timestamp, in the number of seconds that have elapsed since the UNIX epoch when you last changed the CIDR block of this Global Access List Entry. |
请求示例
1 curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ 2 --header "Accept: application/json" \ 3 --header "Content-Type: application/json" \ 4 --request PATCH "https://<OpsManagerHost>:<Port>/api/public/v1.0/admin/accessList/{ACCESS-LIST-ID}?pretty=true"
响应示例
响应标头
401 Unauthorized Content-Type: application/json;charset=ISO-8859-1 Date: {dateInUnixFormat} WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false Content-Length: {requestLengthInBytes} Connection: keep-alive
200 OK Vary: Accept-Encoding Content-Type: application/json Strict-Transport-Security: max-age=300 Date: {dateInUnixFormat} Connection: keep-alive Content-Length: {requestLengthInBytes} X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
响应体
1 { 2 "cidrBlock" : "127.0.0.1/32", 3 "created" : "2019-09-04T17:45:33Z", 4 "description" : "Docs Example", 5 "expires" : null, 6 "id" : "{ACCESS-LIST-ID}", 7 "lastUsed" : null, 8 "type" : "GLOBAL_ROLE", 9 "updated" : "2019-09-04T17:45:33Z" 10 }