kong的学习与总结常用命令的使用

1.kong常用的三个组件

a、Kong Server :基于 nginx 的服务器,用来接收API请求。

管理API的-->服务调用API 要经过kong网关(IP黑白名单,证书管理,服务路由,认证密钥,流量控制、速率限制、超时熔断、等功能)才能够调用后端的接口

b、Apache Cassandra/PostgreSQL :用来存储操作数据。(主要是存储操作日志的)

c、Kong dashboard:官方推荐 UI 管理工具

2.将API发布kong网关的流程

8001是管理 API 侦听的默认端口

1.service

a.概念

服务对象是每个上游服务的抽象

service主要是管理我们后端的接口的服务 ,service可以是一个URL ,也可以是 protocol(协议)host(IP/域名)、port(端口)、path(路径)拼接而成

服务与路由相关联(一个服务可以有多个与其关联的路由)。路由是 Kong 中的入口点,用于定义匹配客户端请求的规则。匹配路由后,Kong 会将请求代理到其关联的服务。

b.service的属性

name服务名称
protocol用于与上游通信的协议(必选)http、https、tcp、tls等
host上游服务器的主机 IP/域名(必选)
port上游服务器端口(必选)
path在对上游服务器的请求中使用的路径。
url简写属性一次性设置 protocol、host、port 和 path。
retries代理失败后重试的次数
connect_timeout连接上游服务超时时间,默认为 60000 毫秒
write_timeout将请求发送到上游服务的超时时间,默认为 60000 毫秒
read_timeout从上游服务器读取超时时间,默认为 60000 毫秒
tags与服务关联的一组可选字符串,用于分组和筛选。
client_certificateTLS 与上游服务器握手时用作客户端证书的证书
ca_certificates用于在验证上游服务器的 TLS 证书时构建信任存储的对象 UUID 数组。
tls_verify是否启用上游服务器TLS证书的验证。
tls_verify_depth验证上游服务器的 TLS 证书时的最大链深度
{
    "id": "9748f662-7711-4a90-8186-dc02f10eb0f5",
    "created_at": 1422386534,
    "updated_at": 1422386534,
    "name": "my-service",
    "retries": 5,
    "protocol": "http",
    "host": "example.com",
    "port": 80,
    "path": "/some_api",
    "connect_timeout": 60000,
    "write_timeout": 60000,
    "read_timeout": 60000,
    "tags": ["user-level", "low-priority"],
    "client_certificate": {"id":"4e3ad2e4-0bc4-4638-8e34-c84a417ba39b"},
    "tls_verify": true,
    "tls_verify_depth": null,
    "ca_certificates": ["4e3ad2e4-0bc4-4638-8e34-c84a417ba39b", "51e77dc2-8f3e-4afa-9d0e-0e3bbbcfd515"]
}
 
c.创建服务

官网

1.创建服务
POST/services
2.创建与特定证书关联的服务
POST/certificates/{certificate name or id}/services
1.第一种方式

curl -i -X POST http://localhost:8001/services/ \
  --data 'name=myservice' \
  --data 'url=http://www.javahly.com' 
2. 第二种方式

curl -i -X POST http://localhost:8001/services/ \
  --data 'name=myservice' \
  --data 'protocol=http' \
  --data 'host=www.javahly.com' \ 
  --data 'port=80' 
d.查询服务

官网

1.列出所有服务
GET/services
2.列出与特定证书关联的服务
GET/certificates/{certificate name or id}/services
3.检索服务
GET/services/{service name or id}
4.检索与特定路由关联的服务
GET/routes/{route name or id}/service
5.检索与特定插件关联的服务
GET/plugins/{plugin id}/service
1.查询所有服务

curl -i -X GET http://localhost:8001/services/ 
2.检索服务

curl -i -X GET http://localhost:8001/services/{service name or id}
c.更新服务

官网

1.更新服务
PATCH/services/{name or id}
2.更新与特定路由关联的服务
PATCH/routes/{route name or id}/service
创建或更新与特定路由关联的服务
PUT/routes/{route name or id}/service
3.与特定插件关联的更新服务
PATCH/plugins/{plugin id}/service
创建或更新与特定插件关联的服务
PUT/plugins/{plugin id}/service
1.4 版本后可用PUT
1.创建或更新服务
PUT/services/{name or id}
​
1.更新服务

curl -i -X PATCH http://localhost:8001/services/{service name or id} \
  --data 'name=myservice' \
  --data 'protocol=http' \
  --data 'host=www.javahly.com' \ 
  --data 'port=80' \
2.1.4版本后的新增和更新服务

curl -i -X PUT http://localhost:8001/services/{service name or id} \
  --data 'protocol=http' \
  --data 'host=www.javahly.com' \ 
  --data 'port=80' 
d.删除服务

curl -i -X DELETE  http://localhost:8001/services/{service name or id} \

2.route

a.概念

route就是客户端用来请求service 客户端调用的API 每一个每个路由(Route)和一个服务(Service) 相关联,一个服务可有有多个路由,给定路由匹配的每个请求都将代理到其关联的服务

b.V0和V1的区别(path 处理算法)

service.pathroute.path是否忽略V0/V1request(用户调用自己添加)request.path(请求路径)upstream.path(上游路径)
/s/fv0trueV0req/fv0req/s/req
/s/fv0falseV0req/fv0req/s/fv0req
/s/fv1trueV1req/fv1req/sreq
/s/fv1falseV1req/fv1req/sfv1req

规律

  1. v0 通过/加入 服务路径/s 路由路径/r 请求路径q upstream.path =/s/re

  2. v1 忽略请求和路由路径的初始/ 服务路径/s 路由路径/r 请求路径e upstream.path =/sre

  3. 该算法的两个版本在组合路径时都会检测到“双斜杠”,并用单斜杠替换它们。

c. route 的属性

name路由的名称
protocols此路由应允许的协议列表,默认为 [“http”, “https”]
methods与此路由匹配的 HTTP 方法的列表,如 GET,POST,DELETE,PATCH,PUT
hosts与此路由匹配的域名列表 hosts[]=example.com&hosts[]=foo.test
paths与此路由匹配的路径列表 paths[]=/foo&paths[]=/bar
strip_path当通过其中一个匹配路由时,从上游请求 URL 中去除匹配的前缀
path_handlingV0 或V1
request_buffering是否启用请求正文缓冲
service服务
{
    "id": "d35165e2-d03e-461a-bdeb-dad0a112abfe",
    "created_at": 1422386534,
    "updated_at": 1422386534,
    "name": "my-route",
    "protocols": ["http", "https"],
    "methods": ["GET", "POST"],
    "hosts": ["example.com", "foo.test"],
    "paths": ["/foo", "/bar"],
    "headers": {"x-another-header":["bla"], "x-my-header":["foo", "bar"]},
    "https_redirect_status_code": 426,
    "regex_priority": 0,
    "strip_path": true,
    "path_handling": "v0",
    "preserve_host": false,
    "request_buffering": true,
    "response_buffering": true,
    "tags": ["user-level", "low-priority"],
    "service": {"id":"af8330d3-dbdc-48bd-b1be-55b98608834b"}
}
d.创建路由

官网

1.创建路由
POST /routes
2.创建与特定服务关联的路由
POST /services/{service name or id}/routes
1.创建与特定服务关联的路由

curl -i -X POST  http://localhost:8001/services/{service name or id}/routes \
  --data 'hosts[]=gateway.com' \
  --data 'name=myroute' \
  --data 'strip_path=false' \
  --data 'paths[]=/blackRoles'\
  --data 'methods[]=GET&methods[]=POST' 
e.查询路由

官网

1.列出所有路由
GET /routes
2.列出与特定服务关联的路由
GET /services/{service name or id}/routes
1.查询所有路由

curl -i -X GET  http://localhost:8001/routes \
2.查询某个服务的路由

curl -i -X GET  http://localhost:8001/services/{service name or id}/routes \
f.搜索路由

官网

1.检索路由
GET /routes/{name or id}
2.检索与特定插件关联的路由
GET /plugins/{plugin id}/route
3.搜索特定服务的路由
GET /services/{service name or id}/routes/{route name or id}
1.根据路由名称或 id 搜索

curl -i -X GET  http://localhost:8001/routes/{route name or id} \
2.搜索特定服务的路由

curl -i -X GET http://localhost:8001/services/{service name or id}/routes/{route name or id} \
g.更新路由

官网

1.根据路由 ID 或名称更新路由
PATCH /routes/{route name or id}
2.更新与特定插件关联的路由
PATCH /plugins/{plugin id}/route 
3.更新指定服务的路由
PATCH /services/{service name or id}/routes/{route name or id}
1.4版本后支持
PUT /routes/{route name or id}
PUT /services/{service name or id}/routes/{route name or id}
1.根据路由 ID 或名称更新路由

curl -i -X PATCH http://localhost:8001/routes/{route name or id} \
  --data 'hosts[]=gateway.com' \
  --data 'name=getBlackRole' \
  --data 'strip_path=false' \
  --data 'paths[]=/blackRoles'\
  --data 'methods[]=GET&methods[]=POST' \
2.更新指定服务的路由

curl -i -X PATCH http://localhost:8001/services/{service name or id}/routes/{route name or id} \
  --data 'hosts[]=gateway.com' \
  --data 'name=getBlackRoles' \
  --data 'strip_path=false' \
  --data 'paths[]=/blackRoles'\
  --data 'methods[]=GET&methods[]=POST' \
h.删除路由

官网

1.根据路由ID或名称删除路由
DELETE /routes/{route name or id}
2.删除指定服务的路由
DELETE /services/{service name or id}/routes/{route name or id}
1.根据路由ID或名称删除路由

curl -i -X DELETE  http://localhost:8001/routes/{route name or id} \
2.删除指定服务的路由

curl -i -X DELETE  http://localhost:8001/services/{service name or id}/routes/{route name or id} \

3.consumer(使用者)

a.consumer介绍

Consumer 对象表示服务的使用者或用户

b.consumer的属性

username使用者的唯一用户名
custom_id使用者的唯一ID
tags标签
{
    "id": "ec1a1f6f-2aa4-4e58-93ff-b56368f19b27",
    "created_at": 1422386534,
    "username": "my-username",
    "custom_id": "my-custom-id",
    "tags": ["user-level", "low-priority"]
}

c.添加consumer

官网

POST/consumers
d.查询consumer

官网

1.查询所有的consumer
GET/consumers
2.检索使用者
GET/consumers/{consumer id or name}
3.检索使用者
/plugins/{plugin id}/consumer
c.更新consumer

官网

1.更新使用者
PATCH/consumers/{username or id}
2.更新与特定插件关联的使用者
PATCH/plugins/{plugin id}/consumer
1.4版本后可用PUT
d.删除consumer

官网

1.删除使用者
DELETE/consumer/{username or id}

4.Plugin (插件)

a.plugin介绍

插件对象表示将在 HTTP 请求/响应生命周期中执行的插件配置。例如身份验证或速率限制。

将插件配置添加到服务时,客户端向该服务发出的每个请求都将运行所述插件。如果需要为某些特定使用者调整插件的不同值,则可以通过创建一个单独的插件实例来执行此操作,该实例通过 和 字段指定服务和使用者。

插件可以按标签进行标记和过滤

{
    "id": "ce44eef5-41ed-47f6-baab-f725cecf98c7",
    "name": "rate-limiting",
    "created_at": 1422386534,
    "route": null,
    "service": null,
    "consumer": null,
    "config": {"hour":500, "minute":20},
    "protocols": ["http", "https"],
    "enabled": true,
    "tags": ["user-level", "low-priority"]
}

b.优先级

1.插件将始终运行一次,并且每个请求仅运行一次。但是,它将用于运行的配置取决于为其配置的实体。

2.插件在多少个实体上配置得越具体,其优先级就越高

3.完整优先级顺序如下

plugin主要在service consumer route上配置(表示使用者必须对请求进行身份验证)

a. consumer 与route配置插件 (表示使用者必须对请求进行身份验证)

b.consumer 与service配置插件 (表示使用者必须对请求进行身份验证)

c.service 与route配置插件

d.consumer配置插件(表示使用者必须对请求进行身份验证)

e.service配置插件

f.route 配置插件

g.配置为全局运行的插件

c.plugin的属性

name要添加的插件的名称。插件必须单独安装在每个 Kong 实例中。
route插件将仅在通过指定路由接收请求时激活
service插件将仅在通过指定路由接收请求时激活
consumer插件将仅对指定已通过身份验证的请求激活
config插件的配置属性
protocols将触发此插件的请求协议列表。http、https、tcp、tls
enabled是否使用插件 默认是true
tags标签
{
    "id": "ce44eef5-41ed-47f6-baab-f725cecf98c7",
    "name": "rate-limiting",
    "created_at": 1422386534,
    "route": null,
    "service": null,
    "consumer": null,
    "config": {"hour":500, "minute":20},
    "protocols": ["http", "https"],
    "enabled": true,
    "tags": ["user-level", "low-priority"]
}
d.创建plugin

官网

1.创建插件
POST/plugins
2.创建与特定路由关联的插件
POST/routes/{route id}/plugins
3.创建与特定服务关联的插件
POST/services/{service id}/plugins
4.创建与特定使用者关联的插件
POST/consumer/{consumer name or id}/plugins
e.查询插件

1.列出所有插件
GET/plugins
2.检索插件
GET/plugins/{plugin id}
2.列出(检索)与特定路由关联的插件
GET/routes/{route name or id}/plugins
GET/routes/{route name or id}/plugins/{plugin id}
3.列出(检索)与特定路由关联的插件
GET/services/{route name or id}/plugins
GET/services/{service name or id}/plugins/{plugin id}
4.列出(检索)与特定路由关联的插件
GET/consumers/{route name or id}/plugins
GET/consumers/{route name or id}/plugins/{plugin id}
f.更新插件

声明:可以用PUT 表示更新和创建
1.更新插件
PATCH/plugins/{plugin id}
2.更新与特定路由关联的插件
PATCH/routes/{route name or id}/plugins/{plugin id}
3.更新与特定路由关联的插件
PATCH/services/{service name or id}/plugins/{plugin id}
4.更新与特定使用者关联的插件
PATCH/consumer/{consumer username or id}/plugins/{plugin id}
g.删除插件

1.删除插件
DELETE/plugins/{plugin id}
2.删除与特定路由关联的插件
DELETE/routes/{route name or id}/plugins/{plugin id}
3.删除与特定路由关联的插件
DELETE/services/{service name or id}/plugins/{plugin id}
4.删除与特定路由关联的插件
DELETE/consumer/{consumer username or id}/plugins/{plugin id}
h.检索已启用的插件

GET/plugins/enabled
J.例子(设置IP黑白名单)

1.查看 consumers 、routes、 services 是否添加黑白名单插件

curl -i -X GET localhost:8001/consumers/{consumer name or id}/plugins
2.添加黑白名单插件

name: ip-restriction 插件名字
service.name : 服务的名字或ID
config.allow : 允许的IP
config.deny : 不被允许的IP

curl -i -X POST localhost:8001/consumers/{consumer name or id}/plugins \
  --data "name=ip-restriction"  \
  --data "config.allow=54.13.21.1" \
  --data "config.allow=143.1.0.0/24"

5.upstream(上游对象)

a.概念

The upstream object represents a virtual hostname and can be used to loadbalance incoming requests over multiple services (targets).

upstream表示虚拟主机名(host),可用于在多个service(target)上负载传入请求

So for example an upstream named service.v1.xyz for a Service object whose host is service.v1.xyz. Requests for this Service would be proxied to the targets defined within the upstream.

An upstream also includes a health checker, which is able to enable and disable targets based on their ability or inability to serve requests. The configuration for the health checker is stored in the upstream object, and applies to all of its targets.

upstream还包括一个运行状况检查器,该检查器能够根据target处理请求的能力或能力来启用和禁用target。运行状况检查器的配置存储在upstream中,并应用于其所有target

b.属性

{
    "id": "58c8ccbb-eafb-4566-991f-2ed4f678fa70",
    "created_at": 1422386534,
    //这是一个主机名,它必须等于服务的 主机名(service中的host)
    "name": "my-upstream",
    //使用的负载平衡算法(round-robin、consistent-hashing、least-connections)
    "algorithm": "round-robin",
    //用作哈希输入的内容(none、consumer...)
    "hash_on": "none",
    //主节点不返回哈希值用作哈希输入的内容(none、consumer...)
    "hash_fallback": "none",
    要在响应标头中设置的 Cookie 路径
    "hash_on_cookie_path": "/",
    //要在响应标头中设置的 Cookie 路径
    "slots": 10000,
    "healthchecks": {
        "active": {
            "timeout": 1,
            "unhealthy": {
            //不正常目标的活动运行状况检查之间的时间间隔
                "interval": 0,
                "tcp_failures": 0,
                "timeouts": 0,
                "http_failures": 0,
                "http_statuses": [429, 404, 500, 501, 502, 503, 504, 505]
            },
            "type": "http",
            "concurrency": 10,
            "headers": [{"x-another-header":["bla"], "x-my-header":["foo", "bar"]}],
            "healthy": {
                "interval": 0,
                "successes": 0,
                "http_statuses": [200, 302]
            },
            "http_path": "/",
            "https_sni": "example.com",
            "https_verify_certificate": true
        },
        "passive": {
            "type": "http",
            "unhealthy": {
                "http_statuses": [429, 500, 503],
                "http_failures": 0,
                "timeouts": 0,
                "tcp_failures": 0
            },
            "healthy": {
                "http_statuses": [200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308],
                "successes": 0
            }
        },
        "threshold": 0
    },
    "tags": ["user-level", "low-priority"],
    "host_header": "example.com",
    "client_certificate": {"id":"ea29aaa3-3b2d-488c-b90c-56df8e0dd8c6"}
}
c.添加upstream

1.创建上游
POST/upstreams
2.创建与特定证书关联的上游
POST/certificates/{certificate name or id}/upstreams
d.检索upstream

1.列出所有上游
GET/upstreams
2.检索特点给的上游
GET/upstreams/{upstream name or id}
3.列出与特定证书关联的上游
GET/certificates/{certificate id}/upstreams
4.检索与特定证书关联的上游
GET/certificates/{certificate id}/upstreams/{upstream name or id}
e.修改upstream

声明:1.4之后可以使用PUT
1.更新上游
PUT/upstreams/{upstream name or id}
2.更新与特定证书关联的上游
PUT/certificates/{certificate id}/upstreams/{upstream name or id}
f.删除upstream

1.删除上游
DELETE/upstreams/{upstream name or id}
2.删除与特定证书关联的上游
DELETE/certificates/{certificate id}/upstreams/{upstream name or id}

g.显示节点的上游运行状况

根据特定 Kong 节点的视角,显示给定上游的所有目标或整个上游的运行状况。请注意,作为特定于节点的信息,向 Kong 集群的不同节点发出相同的请求可能会产生不同的结果。例如,Kong 群集的一个特定节点可能遇到网络问题,导致它无法连接到某些目标:这些目标将被该节点标记为不正常(将流量从此节点定向到它可以成功到达的其他目标),但对所有其他 Kong 节点(使用该目标没有问题)正常。

响应的字段包含一个 Target 对象数组。每个目标的运行状况将在其字段中返回:data``health

GET/upstreams/{name or id}/health/

6.Target(目标对象)

a.概念

A target is an ip address/hostname with a port that identifies an instance of a backend service. Every upstream can have many targets, and the targets can be dynamically added, modified, or deleted. Changes take effect on the fly.

目标是一个 IP 地址/主机名,其端口用于标识后端服务的实例。每个上游都可以有许多目标,并且可以动态添加、修改或删除这些目标。更改会即时生效

To disable a target, post a new one with weight=0; alternatively, use the DELETE convenience method to accomplish the same.

b.属性

targetIP/域名:端口
weight负载均衡的权重
tags用于分组和筛选
{
    "id": "173a6cee-90d1-40a7-89cf-0329eca780a6",
    "created_at": 1422386534,
    "upstream": {"id":"bdab0e47-4e37-4f0b-8fd0-87d95cc4addc"},
    "target": "example.com:8000",
    "weight": 100,
    "tags": ["user-level", "low-priority"]
}
c.添加target

1.创建与特定上游关联的目标
POST/upstreams/{upstream_id}/targets
d.检索target

1.列出与特定上游关联的目标
GET/upstreams/{upstream_id}/targets
e.修改target

1.更新目标
PATCH/upstreams/{upstream_id}/targets//{host:port or id}
f.删除target

1.从负载均衡器中删除目标
DELETE/upstreams/{upstream_id}/targets//{host:port or id}
g.将目标地址设置为正常

POST/upstreams/{upstream name or id}/targets/{target or id}/{address}/healthy
h.将目标地址设置为不正常

POST/upstreams/{upstream name or id}/targets/{target or id}/{address}/unhealthy
j.将目标设置为正常

POST/upstreams/{upstream name or id}/targets/{target or id}/healthy
k.将目标设置为不正常

POST/upstreams/{upstream name or id}/targets/{target or id}/unhealthy

7.Certificate(证书)

a.概念

证书对象表示公共证书,可以选择与相应的私钥配对。Kong 使用这些对象来处理加密请求的 SSL/TLS 终止,或者在验证客户端/服务的对等证书时用作受信任的 CA 存储。可以选择将证书与 SNI 对象关联,以将证书/密钥对绑定到一个或多个主机名。

b.属性

certSSL 密钥对的 PEM 编码的公有证书链(公钥)。
keySSL 密钥对的 PEM 编码的私钥(私钥)
cert_alt备用 SSL 密钥对的 PEM 编码的公有证书链
key_alt备用 SSL 密钥对的 PEM 编码私钥
tags与证书关联的一组可选字符串,用于分组和筛选。
snis包含零个或多个主机名的数组,要作为 SNI 与此证书关联
{
    "id": "7fca84d6-7d37-4a74-a7b0-93e576089a41",
    "created_at": 1422386534,
    "cert": "-----BEGIN CERTIFICATE-----...",
    "key": "-----BEGIN RSA PRIVATE KEY-----...",
    "tags": ["user-level", "low-priority"]
}
c.添加证书

1.添加证书
POST/certificates
d.检索证书

1.列出所有证书
GET/certificates
2.检索证书
GET/certificates/{certificate id}
3.检索与特定上游关联的证书(客户端证书)
GET/upstreams/{upstream name or id}/client_certificate
e.更新证书

1.4 版本后PUT创建和更新证书
1.更新证书
PATCH/certificates/{certificate id}
2.更新与特定上游关联的证书
PATCH/upstreams/{upstream name or id}/client_certificate
f.删除证书

1.删除证书
DELETE/certificates/{certificate id}
2.删除与特定上游关联的证书
DELETE/upstreams/{upstream name or id}/client_certificate

8.CA Certificate

a.概念

CA 证书对象表示受信任的 CA。Kong 使用这些对象来验证客户端或服务器证书的有效性。

b.属性

certCA 的 PEM 编码公共证书
cert_digestCA 的 PEM 编码公共证书
tags用于分组和筛选
{
    "id": "04fbeacf-a9f1-4a5d-ae4a-b0407445db3f",
    "created_at": 1422386534,
    "cert": "-----BEGIN CERTIFICATE-----...",
    "cert_digest": "c641e28d77e93544f2fa87b2cf3f3d51...",
    "tags": ["user-level", "low-priority"]
}
c.添加CA证书

POST/ca_certificates
d.检索CA证书

1.列出所有的CA证书
GET/ca_certificates
2.查询CA证书
GET/ca_certificates/{ca_certificates id}
e.修改CA证书

1.4之后使用PUT可以修改也可以添加
PATCH/ca_certificates/{ca_certificates id}
f.删除CA证书

DELETE/ca_certificates/{ca_certificates id}

9.SIN(对象)

a.概念

SNI 对象表示主机名到证书的多对一映射 一个证书可以有多个与之相关的额主机名,Kong收到SSL请求,客户端中的SNI更具与证书关联的SNI来找证书

b.属性

name要与给定证书关联的 SNI 名称。
certificate要与 SNI 主机名关联的证书的 ID,证书必须具有与其关联的有效私钥,以供 SNI 对象使用
tags用于分组和筛选
{
    "id": "91020192-062d-416f-a275-9addeeaffaf2",
    "name": "my-sni",
    "created_at": 1422386534,
    "tags": ["user-level", "low-priority"],
    "certificate": {"id":"a2e013e8-7623-4494-a347-6d29108ff68b"}
}
c.添加SNI

1.创建 SNI
POST/snis
2.创建与特定证书关联的 SNI
POST/certificates/{certificate name or id}/sins
d.检索SNI

1.列出所有 SNI
GET/snis
2.检索 SNI
GET/snis/{sni name or id}
3.列出与特定证书关联的 SNI
GET/certificates/{certificate name or id}/snis
4.检索与特定证书关联的 SNI
GET/certificates/{certificate id}/snis/{sni name or id}
e.修改SNI

声明:可以用PUT来更新和添加SNI
1.更新 SNI
PATCH/snis/{sni name or id}
2.更新与特定证书关联的 SNI
PATCH/certificates/{certificate id}/snis/{sni name or id}
f.删除SNI

1.删除 SNI
DELETE/snis/{sni name or id}
2.除与特定证书关联的 SNI
DELETE/certificates/{certificate id}/snis/{sni name or id}

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值