Docs 菜单

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

PATCH /admin/accessList/{ACCESS-LIST-ID}

要求调用此端点的API密钥具有Global Owner角色。

名称
类型
说明

ACCESS-LIST-ID

字符串

Unique identifier for the Global Access List Entry.

以下查询参数为可选参数:

名称
类型
必要性
说明
默认

pretty

布尔

Optional

指示响应正文是否应采用 prettyprint 格式的标记。

false

envelope

布尔

Optional

指示是否将响应包装在信封中的标志。

某些 API 客户端无法访问 HTTP 响应标头或状态代码。要解决这个问题,可在查询中设置 envelope=true

对于返回一个结果的端点,响应体包括:

名称
说明

status

HTTP 响应代码

content

预期响应正文

false

此端点不使用 HTTP 请求正文参数。

名称
类型
说明

cidrBlock

字符串

Range of IP addresses in an access list in IPv4 or IPv6 CIDR notation.

created

字符串

Timestamp, in the number of seconds that have elapsed since the UNIX epoch when you added this CIDR block to the Global Access List.

description

字符串

Explanation of the purpose of this Global Access List Entry.

id

字符串

Unique identifier for this Global Access List Entry.

type

字符串

Scope of the Global Access List Entry.

updated

字符串

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.

1curl --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"
HTTP/1.1 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
HTTP/1.1 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}