zonewatcher/linode-api

为 Linode V4 API 生成的 OpenAPI 包装器。

v4.107.0 2021-10-28 03:42 UTC

This package is auto-updated.

Last update: 2022-10-28 05:56:53 UTC


README

简介

Linode API 提供了通过程序管理 Linode 所有产品和服务的能力。

本参考旨在协助应用程序开发人员和系统管理员。每个端点都包括描述、请求语法以及使用标准 HTTP 请求的示例。响应数据以 JSON 格式返回。

本文件是根据我们的 OpenAPI 规范生成的。有关更多信息,请访问 <a target="_top" href="https://openapis.org.cn>OpenAPI</a> 网站。

<a target="_top" href="/docs/api/openapi.yaml">下载 Linode OpenAPI 规范。

变更日志

<a target="_top" href="https://developers.linode.com/changelog>查看我们的变更日志,了解我们对 API 所做的所有更改的说明。</a>

访问和认证

某些端点可以公开访问,无需认证。但是,影响您的所有端点都需要个人访问令牌或 OAuth 认证(当使用第三方应用程序时)。

个人访问令牌

通过 Linode 云管理器或 创建个人访问令牌 端点生成个人访问令牌(PAT)是最容易访问 API 的方式。

OAuth 安全模型的所有作用域(定义如下)也适用于此安全模型。

认证

安全方案类型 HTTP
HTTP 认证方案 bearer

OAuth

如果您只需要为个人用途访问 Linode API,我们建议您创建一个 个人访问令牌。如果您正在设计一个可以由任意 Linode 用户进行认证的应用程序,则应使用本节中介绍的 OAuth 2.0 工作流程。

有关 OAuth 2.0 实现的更详细示例,请参阅我们的指南:如何在 使用 Linode Python API 库创建 OAuth 应用程序

在您的应用程序中实现 OAuth 之前,您首先需要创建一个 OAuth 客户端。您可以使用 Linode API 或 通过云管理器 来完成此操作。

  • 在创建客户端时,您需要提供 labelredirect_uri(在云管理器中称为回调 URL)。
  • 此端点的响应将为您提供 client_idsecret
  • 客户端可以是公开的或私有的,默认情况下是私有的。您可以在创建时选择将其设置为公开。
    • 私有客户端用于可以安全存储客户端密钥的应用程序(即,首次创建客户端时返回给您的密钥)。例如,运行在只有开发人员可以访问的安全服务器上的应用程序将使用私有 OAuth 客户端。在某些 OAuth 文档中,这也称为机密客户端。
    • 公开客户端用于客户端密钥无法保证安全的应用程序。例如,在用户计算机上运行的本地应用可能无法安全地存储客户端密钥,因为用户可以检查应用程序的源代码。因此,本地应用或运行在用户浏览器中的应用应使用公开客户端。
    • 公开和私有客户端遵循不同的工作流程,如下所述。

OAuth 工作流程

OAuth 工作流程是第三方应用程序与 Linode 之间的一系列交换。工作流程用于在应用程序代表用户进行 API 调用之前对用户进行身份验证。

注意

  • 关于 RFC 6749 第 1.2 节中的图,login.linode.com(本节中称为 登录服务器)是资源所有者和授权服务器;api.linode.com(本节中称为 API 服务器)是资源服务器。
  • OAuth 规范将以下列出的私有和公开工作流程称为 授权码流隐式流
私有工作流程 公开工作流程
1. 用户访问应用程序的网站,并被引导到使用 Linode 登录。 1. 用户访问应用程序的网站,并被引导到使用 Linode 登录。
2. 然后,您的应用程序将用户重定向到 Linode 的 登录服务器,附带客户端应用程序的 client_id 和请求的 OAuth scope,这将出现在登录页面的 URL 中。 2. 然后,您的应用程序将用户重定向到 Linode 的 登录服务器,附带客户端应用程序的 client_id 和请求的 OAuth scope,这将出现在登录页面的 URL 中。
3. 用户使用用户名和密码登录到登录服务器。 3. 用户使用用户名和密码登录到登录服务器。
4. 登录服务器将用户重定向到指定的重定向 URL,并在 URL 中包含一个临时的授权 code(交换码)。 4. 登录服务器将用户重定向回您的应用程序,并在重定向 URL 的散列中嵌入 OAuth access_token。这是临时的,有效期为两小时。不颁发 refresh_token。因此,一旦 access_token 过期,就需要让用户再次登录来颁发新的 access_token
5. 应用程序使用交换码、client_id 和客户端应用程序的 client_secret 向登录服务器发出 POST 请求(见下文)。
6. 登录服务器以新的 OAuth access_tokenrefresh_token 响应客户端应用程序。该 access_token 设置为两小时后过期。
refresh_token 可以通过使用 client_idclient_secretgrant_typerefresh_token 联系登录服务器来获取新的 OAuth access_tokenrefresh_token。新的 access_token 有效期为两小时,新的 refresh_token 可以通过相同的方法再次扩展会话。

OAuth 私有工作流程 - 更多详细信息

以下信息扩展了私有工作流程的第 5 到 7 步。

用户登录Linode并收到交换码后,您需要将此交换码兑换为access_tokenrefresh_token。您可以通过向以下地址发送HTTP POST请求来完成此操作

https://login.linode.com/oauth/token

application/x-www-form-urlencodedmultipart/form-data的形式发送此请求,并在POST体中包含以下参数

参数 说明
grant_type 用于续订的授权类型。目前只接受字符串"refresh_token"。
client_id 您的应用程序的客户端ID。
client_secret 您的应用程序的客户端密钥。
code 您刚从重定向中收到的代码。

您将获得如下响应

{
  \"scope\": \"linodes:read_write\",
  \"access_token\": \"03d084436a6c91fbafd5c4b20c82e5056a2e9ce1635920c30dc8d81dc7a6665c\"
  \"token_type\": \"bearer\",
  \"expires_in\": 7200,
}

响应中包含一个access_token。使用此令牌,您可以通过在每次请求中添加此头信息来继续对API进行认证HTTP请求

Authorization: Bearer 03d084436a6c91fbafd5c4b20c82e5056a2e9ce1635920c30dc8d81dc7a6665c

OAuth参考

安全方案类型 OAuth 2.0
授权URL https://login.linode.com/oauth/authorize
令牌URL https://login.linode.com/oauth/token
作用域
  • account:read_only - 允许访问获取您的账户信息。
  • account:read_write - 允许访问与您的账户相关的所有端点。
  • domains:read_only - 允许访问获取您的域名。
  • domains:read_write - 允许访问所有域名端点。
  • events:read_only - 允许访问获取您的事件。
  • events:read_write - 允许访问与您的事件相关的所有端点。
  • firewall:read_only - 允许访问获取有关您防火墙的信息。
  • firewall:read_write - 允许访问所有防火墙端点。
  • images:read_only - 允许访问获取您的镜像。
  • images:read_write - 允许访问与您的镜像相关的所有端点。
  • ips:read_only - 允许访问获取您的IP地址。
  • ips:read_write - 允许访问与您的IP地址相关的所有端点。
  • linodes:read_only - 允许访问获取您的Linodes。
  • linodes:read_write - 允许访问与您的Linodes相关的所有端点。
  • lke:read_only - 允许访问获取您的LKE集群。
  • lke:read_write - 允许访问与您的LKE集群相关的所有端点。
  • longview:read_only - 允许访问获取您的Longview客户端。
  • longview:read_write - 允许访问与您的Longview客户端相关的所有端点。
  • maintenance:read_only - 允许访问获取有关您账户维护的信息。
  • nodebalancers:read_only - 允许访问获取您的负载均衡器。
  • nodebalancers:read_write - 允许访问所有负载均衡器端点。
  • object_storage:read_only - 允许访问获取有关您的对象存储的信息。
  • object_storage:read_write - 允许访问所有对象存储端点。
  • stackscripts:read_only - 允许访问获取您的StackScripts。
  • stackscripts:read_write - 允许访问与您的StackScripts相关的所有端点。
  • volumes:read_only - 允许访问获取您的卷。
  • volumes:read_write - 允许访问与您的卷相关的所有端点。

请求

请求必须通过HTTPS发送,以确保事务加密。以下请求方法受到支持

方法 用法
GET 检索集合和单个资源的数据。
POST 对于集合,创建该类型的新资源。还用于在操作端点上执行操作。
PUT 更新现有资源。
DELETE 删除资源。这是一个破坏性操作。

响应

操作将返回以下HTTP响应状态码

状态 说明
200 OK 请求成功。
202 已接受 请求成功,但处理尚未完成。响应体包含一个“warnings”数组,其中包含不完整过程的详细信息。
204 无内容 服务器已成功处理请求,没有其他内容需要发送。
400 错误请求 您提交了一个无效的请求(缺少参数等)。
401 未授权 您未能为此资源进行身份验证。
403 禁止 您已通过身份验证,但没有权限执行此操作。
404 未找到 您请求的资源不存在。
429 请求过多 您已达到请求限制。
500 内部服务器错误 提交支持工单

错误

成功通过标准HTTP状态码表示。 2xx 状态码表示成功,4xx 状态码表示请求错误,而 5xx 错误表示服务器错误。请求错误可能是一个无效的输入,省略了必需的参数,或者请求格式不正确。服务器错误表示在处理您的请求时出了问题。如果发生这种情况,请提交支持工单并告诉我们。尽管我们会记录错误并迅速解决问题,但提交工单并为我们提供可复现的步骤和数据总是很有帮助的。

errors 字段是表示您的请求中出现问题的事物的数组。我们将尽可能在响应中包含尽可能多的问题,但在我们能够进一步处理您的请求之后,修复这些错误并重新提交可能会再次出现新的错误。

在每个错误对象中,如果错误与您提交的JSON中的特定字段相关,将包含 field 参数。如果没有相关字段,将省略此参数。 reason 是对错误的可读性解释,并且始终包含。

分页

资源列表始终分页。响应将类似于以下内容

{
    \"data\": [ ... ],
    \"page\": 1,
    \"pages\": 3,
    \"results\": 300
}
  • 页码从1开始。您可以通过在URL中添加 ?page=x 来检索特定页面的结果(例如,?page=4)。如果 page 的值超过 2^64/page_size,则将返回最后一个可能的页面。

  • 默认页面大小为100,可以设置为返回25到500之间的值。可以使用 ?page_size=x 设置页面大小。

过滤和排序

集合可以通过它们包含的字段进行搜索,在规范中标记为 x-linode-filterable: true。过滤器通过 X-Filter 标头传递,格式为JSON对象。以下是我们“标准”类中Linode类型的请求调用示例

curl \"https://api.linode.com/v4/linode/types\" \\
  -H '
    X-Filter: {
      \"class\": \"standard\"
    }'

过滤器对象的键是您正在过滤的对象的键,值是接受的值。您可以通过包含多个键来添加多个过滤器。例如,过滤“标准”Linode类型提供1个vcpu

 curl \"https://api.linode.com/v4/linode/types\" \\
  -H '
    X-Filter: {
      \"class\": \"standard\",
      \"vcpus\": 1
    }'

在上面的示例中,两个过滤器通过“与”操作组合。但是,如果您想要具有1个vcpu的类型或我们“标准”类中的类型,您可以添加一个运算符

curl \"https://api.linode.com/v4/linode/types\" \\
 -H '
   X-Filter: {
     \"+or\": [
       { \"vcpus\": 1 },
       { \"class\": \"standard\" }
     ]
   }'

+or数组中,每个过滤器都是其自身的过滤器对象,其中所有的条件都通过“与”操作符进行组合,就像上一个例子中一样。

还有其他操作符可用。操作符是过滤器JSON对象的键。它们的值必须是适当的数据类型,并按照以下方式评估。

操作符 类型 说明
+and 数组 所有条件都必须为真。
+or 数组 至少有一个条件必须为真。
+gt 数字 值必须大于指定的数字。
+gte 数字 值必须大于或等于指定的数字。
+lt 数字 值必须小于指定的数字。
+lte 数字 值必须小于或等于指定的数字。
+contains 字符串 指定的字符串必须在值中。
+neq 字符串 值不等于指定的值。
+order_by 字符串 用于排序结果的属性 - 必须是可过滤的。
+order 字符串 可以是 "asc" 或 "desc"。默认为 "asc"。需要 +order_by

例如,过滤出内存等于或高于 61440 的Linode 类型

curl \"https://api.linode.com/v4/linode/types\" \\
  -H '
    X-Filter: {
      \"memory\": {
        \"+gte\": 61440
      }
    }'

您可以组合并嵌套操作符以构建任意复杂的查询。例如,给出所有既属于 standardhighmem 类,或者有 12 到 20 个 vcpus 的 Linode 类型

curl \"https://api.linode.com/v4/linode/types\" \\
  -H '
    X-Filter: {
      \"+or\": [
        {
          \"+or\": [
            {
              \"class\": \"standard\"
            },
            {
              \"class\": \"highmem\"
            }
          ]
        },
        {
          \"+and\": [
            {
              \"vcpus\": {
                \"+gte\": 12
              }
            },
            {
              \"vcpus\": {
                \"+lte\": 20
              }
            }
          ]
        }
      ]
    }'

速率限制

使用 Linode API,您可以每两分钟通过 IP 地址或 OAuth 令牌对每个用户进行最多 1,600 次通用 API 请求。此外,还定义了以下特定端点的限制。

注意:API之外可能存在速率限制,例如在负载均衡器上。

/stats 端点每分钟为每个用户的专用限制为 100 个请求。这些端点是

对象存储端点每秒为每个用户的专用限制为 750 个请求。对象存储端点是

提交支持工单的专用限制为每分钟每个用户 2 个请求。该端点是

接受服务迁移的专用限制为每分钟每个用户 2 个请求。该端点是

CLI(命令行界面)

<a href="https://github.com/linode/linode-cli" target="_top">Linode CLI允许您使用直观和简单的语法轻松使用 API。它需要一个个人访问令牌进行身份验证,并为您提供所有在此处用 CLI 例子记录的 Linode API 功能和功能。

没有 CLI 例子端点当前通过 CLI 不可用,但可以通过其他方法访问,如 Shell 命令和其他第三方应用程序。

有关更多信息,请访问 https://linode.com

安装 & 使用

要求

PHP 7.3 及更高版本。也应在 PHP 8.0 上工作,但尚未经过测试。

Composer

通过Composer安装绑定,请在composer.json中添加以下内容

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

入门指南

请遵循安装步骤,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure OAuth2 access token for authorization: oauth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure Bearer authorization: personalAccessToken
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\AccountApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$token = 'token_example'; // string | The UUID of the Entity Transfer.

try {
    $result = $apiInstance->acceptEntityTransfer($token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->acceptEntityTransfer: ', $e->getMessage(), PHP_EOL;
}

API 端点

所有 URI 都相对于https://api.linode.com/v4

方法 HTTP 请求 描述
AccountApi acceptEntityTransfer POST /account/entity-transfers/{token}/accept 实体转移接受
AccountApi acceptServiceTransfer POST /account/service-transfers/{token}/accept 服务迁移接受
AccountApi cancelAccount POST /account/cancel 账户取消
AccountApi createClient POST /account/oauth-clients 创建 OAuth 客户端
AccountApi createCreditCard POST /account/credit-card 添加/编辑信用卡
AccountApi createEntityTransfer POST /account/entity-transfers 创建实体转移
AccountApi createPayPalPayment POST /account/payments/paypal PayPal 付款阶段
AccountApi createPayment POST /account/payments 创建付款
AccountApi createPaymentMethod POST /account/payment-methods 添加付款方式
AccountApi createPromoCredit POST /account/promo-codes 添加促销信用额度
AccountApi createServiceTransfer POST /account/service-transfers 创建服务转移
AccountApi createUser POST /account/users 创建用户
AccountApi deleteClient DELETE /account/oauth-clients/{clientId} 删除 OAuth 客户端
AccountApi deleteEntityTransfer DELETE /account/entity-transfers/{token} 取消实体转移
AccountApi deletePaymentMethod DELETE /account/payment-methods/{paymentMethodId} 删除付款方式
AccountApi deleteServiceTransfer DELETE /account/service-transfers/{token} 取消服务转移
AccountApi deleteUser DELETE /account/users/{username} 删除用户
AccountApi enableAccountManged POST /account/settings/managed-enable 启用 Linode 管理服务
AccountApi eventRead POST /account/events/{eventId}/read 标记事件为已读
AccountApi eventSeen POST /account/events/{eventId}/seen 标记事件为已查看
AccountApi executePayPalPayment POST /account/payments/paypal/execute 执行已安排/已批准的 PayPal 付款
AccountApi getAccount GET /account 查看账户
AccountApi getAccountLogin GET /account/logins/{loginId} 查看登录
AccountApi getAccountLogins GET /account/logins 用户登录列表
AccountApi getAccountSettings GET /account/settings 查看账户设置
AccountApi getClient GET /account/oauth-clients/{clientId} 查看 OAuth 客户端
AccountApi getClientThumbnail GET /account/oauth-clients/{clientId}/thumbnail 查看 OAuth 客户端缩略图
AccountApi getClients GET /account/oauth-clients OAuth 客户端列表
AccountApi getEntityTransfer GET /account/entity-transfers/{token} 查看实体转移
AccountApi getEntityTransfers GET /account/entity-transfers 实体转移列表
AccountApi getEvent GET /account/events/{eventId} 查看事件
AccountApi getEvents GET /account/events 事件列表
AccountApi getInvoice GET /account/invoices/{invoiceId} 查看发票
AccountApi getInvoiceItems GET /account/invoices/{invoiceId}/items 发票项目列表
AccountApi getInvoices GET /account/invoices 发票列表
AccountApi getMaintenance GET /account/maintenance 维护列表
AccountApi getNotifications GET /account/notifications 通知列表
AccountApi getPayment GET /account/payments/{paymentId} 付款视图
AccountApi getPaymentMethod GET /account/payment-methods/{paymentMethodId} 付款方式视图
AccountApi getPaymentMethods GET /account/payment-methods 付款方式列表
AccountApi getPayments GET /account/payments 付款列表
AccountApi getServiceTransfer GET /account/service-transfers/{token} 服务转移视图
AccountApi getServiceTransfers GET /account/service-transfers 服务转移列表
AccountApi getTransfer GET /account/transfer 网络利用率视图
AccountApi getUser GET /account/users/{username} 用户视图
AccountApi getUserGrants GET /account/users/{username}/grants 用户的授权视图
AccountApi getUsers GET /account/users 用户列表
AccountApi makePaymentMethodDefault POST /account/payment-methods/{paymentMethodId}/make-default 付款方式设为默认
AccountApi resetClientSecret POST /account/oauth-clients/{clientId}/reset-secret OAuth客户端密钥重置
AccountApi setClientThumbnail PUT /account/oauth-clients/{clientId}/thumbnail OAuth客户端缩略图更新
AccountApi updateAccount PUT /account 账户更新
AccountApi updateAccountSettings PUT /account/settings 账户设置更新
AccountApi updateClient PUT /account/oauth-clients/{clientId} OAuth客户端更新
AccountApi updateUser PUT /account/users/{username} 用户更新
AccountApi updateUserGrants PUT /account/users/{username}/grants 用户的授权更新
DomainsApi cloneDomain POST /domains/{domainId}/clone 域名克隆
DomainsApi createDomain POST /domains 域名创建
DomainsApi createDomainRecord POST /domains/{domainId}/records 域名记录创建
DomainsApi deleteDomain DELETE /domains/{domainId} 域名删除
DomainsApi deleteDomainRecord DELETE /domains/{domainId}/records/{recordId} 域名记录删除
DomainsApi getDomain GET /domains/{domainId} 域名视图
DomainsApi getDomainRecord GET /domains/{domainId}/records/{recordId} 域名记录视图
DomainsApi getDomainRecords GET /domains/{domainId}/records 域名记录列表
DomainsApi getDomainZone GET /domains/{domainId}/zone-file 域名区域文件视图
DomainsApi getDomains GET /domains 域名列表
DomainsApi importDomain POST /domains/import 域名导入
DomainsApi updateDomain PUT /domains/{domainId} 域名更新
DomainsApi updateDomainRecord PUT /domains/{domainId}/records/{recordId} 域名记录更新
ImagesApi createImage POST /images 图片创建
ImagesApi deleteImage DELETE /images/{imageId} 图片删除
ImagesApi getImage GET /images/{imageId} 图片视图
ImagesApi getImages GET /images 图片列表
ImagesApi imagesUploadPost POST /images/upload 图片上传
ImagesApi updateImage PUT /images/{imageId} 图片更新
LinodeInstancesApi addLinodeConfig POST /linode/instances/{linodeId}/configs 配置配置文件创建
LinodeInstancesApi addLinodeDisk POST /linode/instances/{linodeId}/disks 磁盘创建
LinodeInstancesApi addLinodeIP POST /linode/instances/{linodeId}/ips IPv4地址分配
LinodeInstancesApi bootLinodeInstance POST /linode/instances/{linodeId}/boot Linode引导
LinodeInstancesApi cancelBackups POST /linode/instances/{linodeId}/backups/cancel 备份取消
LinodeInstancesApi cloneLinodeDisk POST /linode/instances/{linodeId}/disks/{diskId}/clone 磁盘克隆
LinodeInstancesApi cloneLinodeInstance POST /linode/instances/{linodeId}/clone Linode克隆
LinodeInstancesApi createLinodeInstance POST /linode/instances Linode创建
LinodeInstancesApi createSnapshot POST /linode/instances/{linodeId}/backups 快照创建
LinodeInstancesApi deleteDisk DELETE /linode/instances/{linodeId}/disks/{diskId} 磁盘删除
LinodeInstancesApi deleteLinodeConfig DELETE /linode/instances/{linodeId}/configs/{configId} 配置配置文件删除
LinodeInstancesApi deleteLinodeInstance DELETE /linode/instances/{linodeId} Linode 删除
LinodeInstancesApi enableBackups POST /linode/instances/{linodeId}/backups/enable 启用备份
LinodeInstancesApi getBackup GET /linode/instances/{linodeId}/backups/{backupId} 备份查看
LinodeInstancesApi getBackups GET /linode/instances/{linodeId}/backups 备份列表
LinodeInstancesApi getKernel GET /linode/kernels/{kernelId} 内核查看
LinodeInstancesApi getKernels GET /linode/kernels 内核列表
LinodeInstancesApi getLinodeConfig GET /linode/instances/{linodeId}/configs/{configId} 配置配置文件查看
LinodeInstancesApi getLinodeConfigs GET /linode/instances/{linodeId}/configs 配置配置文件列表
LinodeInstancesApi getLinodeDisk GET /linode/instances/{linodeId}/disks/{diskId} 磁盘查看
LinodeInstancesApi getLinodeDisks GET /linode/instances/{linodeId}/disks 磁盘列表
LinodeInstancesApi getLinodeFirewalls GET /linode/instances/{linodeId}/firewalls 防火墙列表
LinodeInstancesApi getLinodeIP GET /linode/instances/{linodeId}/ips/{address} IP 地址查看
LinodeInstancesApi getLinodeIPs GET /linode/instances/{linodeId}/ips 网络信息列表
LinodeInstancesApi getLinodeInstance GET /linode/instances/{linodeId} Linode 查看
LinodeInstancesApi getLinodeInstances GET /linode/instances Linodes 列表
LinodeInstancesApi getLinodeNodeBalancers GET /linode/instances/{linodeId}/nodebalancers Linode 节点均衡器查看
LinodeInstancesApi getLinodeStats GET /linode/instances/{linodeId}/stats Linode 统计查看
LinodeInstancesApi getLinodeStatsByYearMonth GET /linode/instances/{linodeId}/stats/{year}/{month} 统计查看(年/月)
LinodeInstancesApi getLinodeTransfer GET /linode/instances/{linodeId}/transfer 网络传输查看
LinodeInstancesApi getLinodeTransferByYearMonth GET /linode/instances/{linodeId}/transfer/{year}/{month} 网络传输查看(年/月)
LinodeInstancesApi getLinodeVolumes GET /linode/instances/{linodeId}/volumes Linode 的卷列表
LinodeInstancesApi migrateLinodeInstance POST /linode/instances/{linodeId}/migrate DC 迁移/待定主机迁移启动
LinodeInstancesApi mutateLinodeInstance POST /linode/instances/{linodeId}/mutate Linode 升级
LinodeInstancesApi rebootLinodeInstance POST /linode/instances/{linodeId}/reboot Linode 重启
LinodeInstancesApi rebuildLinodeInstance POST /linode/instances/{linodeId}/rebuild Linode 重建
LinodeInstancesApi removeLinodeIP DELETE /linode/instances/{linodeId}/ips/{address} IPv4 地址删除
LinodeInstancesApi rescueLinodeInstance POST /linode/instances/{linodeId}/rescue Linode 进入救援模式
LinodeInstancesApi resetDiskPassword POST /linode/instances/{linodeId}/disks/{diskId}/password 磁盘根密码重置
LinodeInstancesApi resetLinodePassword POST /linode/instances/{linodeId}/password Linode 根密码重置
LinodeInstancesApi resizeDisk POST /linode/instances/{linodeId}/disks/{diskId}/resize 磁盘调整大小
LinodeInstancesApi resizeLinodeInstance POST /linode/instances/{linodeId}/resize Linode 调整大小
LinodeInstancesApi restoreBackup POST /linode/instances/{linodeId}/backups/{backupId}/restore 备份恢复
LinodeInstancesApi shutdownLinodeInstance POST /linode/instances/{linodeId}/shutdown Linode 关闭
LinodeInstancesApi updateDisk PUT /linode/instances/{linodeId}/disks/{diskId} 磁盘更新
LinodeInstancesApi updateLinodeConfig PUT /linode/instances/{linodeId}/configs/{configId} 配置配置文件更新
LinodeInstancesApi updateLinodeIP PUT /linode/instances/{linodeId}/ips/{address} IP 地址更新
LinodeInstancesApi updateLinodeInstance PUT /linode/instances/{linodeId} Linode 更新
LinodeKubernetesEngineLKEApi createLKECluster POST /lke/clusters Kubernetes 集群创建
LinodeKubernetesEngineLKEApi deleteLKECluster 删除 /lke/clusters/{clusterId} Kubernetes 集群删除
LinodeKubernetesEngineLKEApi deleteLKEClusterKubeconfig 删除 /lke/clusters/{clusterId}/kubeconfig Kubeconfig 删除
LinodeKubernetesEngineLKEApi deleteLKEClusterNode 删除 /lke/clusters/{clusterId}/nodes/{nodeId} 节点删除
LinodeKubernetesEngineLKEApi deleteLKENodePool 删除 /lke/clusters/{clusterId}/pools/{poolId} 节点池删除
LinodeKubernetesEngineLKEApi getLKECluster GET /lke/clusters/{clusterId} Kubernetes 集群查看
LinodeKubernetesEngineLKEApi getLKEClusterAPIEndpoints GET /lke/clusters/{clusterId}/api-endpoints Kubernetes API 端点列表
LinodeKubernetesEngineLKEApi getLKEClusterKubeconfig GET /lke/clusters/{clusterId}/kubeconfig Kubeconfig 查看
LinodeKubernetesEngineLKEApi getLKEClusterNode GET /lke/clusters/{clusterId}/nodes/{nodeId} 节点查看
LinodeKubernetesEngineLKEApi getLKEClusterPools GET /lke/clusters/{clusterId}/pools 节点池列表
LinodeKubernetesEngineLKEApi getLKEClusters GET /lke/clusters Kubernetes 集群列表
LinodeKubernetesEngineLKEApi getLKENodePool GET /lke/clusters/{clusterId}/pools/{poolId} 节点池查看
LinodeKubernetesEngineLKEApi getLKEVersion GET /lke/versions/{version} Kubernetes 版本查看
LinodeKubernetesEngineLKEApi getLKEVersions GET /lke/versions Kubernetes 版本列表
LinodeKubernetesEngineLKEApi postLKEClusterNodeRecycle POST /lke/clusters/{clusterId}/nodes/{nodeId}/recycle 节点回收
LinodeKubernetesEngineLKEApi postLKEClusterPoolRecycle POST /lke/clusters/{clusterId}/pools/{poolId}/recycle 节点池回收
LinodeKubernetesEngineLKEApi postLKEClusterPools POST /lke/clusters/{clusterId}/pools 节点池创建
LinodeKubernetesEngineLKEApi postLKEClusterRecycle POST /lke/clusters/{clusterId}/recycle 集群节点回收
LinodeKubernetesEngineLKEApi putLKECluster PUT /lke/clusters/{clusterId} Kubernetes 集群更新
LinodeKubernetesEngineLKEApi putLKENodePool PUT /lke/clusters/{clusterId}/pools/{poolId} 节点池更新
LinodeTypesApi getLinodeType GET /linode/types/{typeId} 类型查看
LinodeTypesApi getLinodeTypes GET /linode/types 类型列表
LongviewApi createLongviewClient POST /longview/clients Longview 客户端创建
LongviewApi deleteLongviewClient DELETE /longview/clients/{clientId} Longview 客户端删除
LongviewApi getLongviewClient GET /longview/clients/{clientId} Longview 客户端查看
LongviewApi getLongviewClients GET /longview/clients Longview 客户端列表
LongviewApi getLongviewPlan GET /longview/plan Longview 计划查看
LongviewApi getLongviewSubscription GET /longview/subscriptions/{subscriptionId} Longview 订阅查看
LongviewApi getLongviewSubscriptions GET /longview/subscriptions Longview 订阅列表
LongviewApi updateLongviewClient PUT /longview/clients/{clientId} Longview 客户端更新
LongviewApi updateLongviewPlan PUT /longview/plan Longview 计划更新
ManagedApi createManagedContact POST /managed/contacts Managed 联系人创建
ManagedApi createManagedCredential POST /managed/credentials Managed 凭证创建
ManagedApi createManagedService POST /managed/services Managed 服务创建
ManagedApi deleteManagedContact DELETE /managed/contacts/{contactId} Managed 联系人删除
ManagedApi deleteManagedCredential POST /managed/credentials/{credentialId}/revoke Managed 凭证删除
ManagedApi deleteManagedService DELETE /managed/services/{serviceId} Managed 服务删除
ManagedApi disableManagedService POST /managed/services/{serviceId}/disable Managed 服务禁用
ManagedApi enableManagedService POST /managed/services/{serviceId}/enable Managed 服务启用
ManagedApi getManagedContact GET /managed/contacts/{contactId} Managed 联系人查看
ManagedApi getManagedContacts GET /managed/contacts Managed 联系人列表
ManagedApi getManagedCredential GET /managed/credentials/{credentialId} Managed 凭证查看
ManagedApi getManagedCredentials GET /managed/credentials 管理凭证列表
ManagedApi getManagedIssue GET /managed/issues/{issueId} 管理问题视图
ManagedApi getManagedIssues GET /managed/issues 管理问题列表
ManagedApi getManagedLinodeSetting GET /managed/linode-settings/{linodeId} Linode 管理设置视图
ManagedApi getManagedLinodeSettings GET /managed/linode-settings 管理 Linode 设置列表
ManagedApi getManagedService GET /managed/services/{serviceId} 管理服务视图
ManagedApi getManagedServices GET /managed/services 管理服务列表
ManagedApi getManagedStats GET /managed/stats 管理统计列表
ManagedApi updateManagedContact PUT /managed/contacts/{contactId} 管理联系人更新
ManagedApi updateManagedCredential PUT /managed/credentials/{credentialId} 管理凭证更新
ManagedApi updateManagedCredentialUsernamePassword POST /managed/credentials/{credentialId}/update 管理凭证用户名和密码更新
ManagedApi updateManagedLinodeSetting PUT /managed/linode-settings/{linodeId} Linode 管理设置更新
ManagedApi updateManagedService PUT /managed/services/{serviceId} 管理服务更新
ManagedApi viewManagedSSHKey GET /managed/credentials/sshkey 管理 SSH 密钥视图
NetworkingApi allocateIP POST /networking/ips IP 地址分配
NetworkingApi assignIPs POST /networking/ipv4/assign Linodes 分配 IP 地址
NetworkingApi createFirewallDevice POST /networking/firewalls/{firewallId}/devices 防火墙设备创建
NetworkingApi createFirewalls POST /networking/firewalls 防火墙创建
NetworkingApi deleteFirewall DELETE /networking/firewalls/{firewallId} 防火墙删除
NetworkingApi deleteFirewallDevice DELETE /networking/firewalls/{firewallId}/devices/{deviceId} 防火墙设备删除
NetworkingApi getFirewall GET /networking/firewalls/{firewallId} 防火墙视图
NetworkingApi getFirewallDevice GET /networking/firewalls/{firewallId}/devices/{deviceId} 防火墙设备视图
NetworkingApi getFirewallDevices GET /networking/firewalls/{firewallId}/devices 防火墙设备列表
NetworkingApi getFirewallRules GET /networking/firewalls/{firewallId}/rules 防火墙规则列表
NetworkingApi getFirewalls GET /networking/firewalls 防火墙列表
NetworkingApi getIP GET /networking/ips/{address} IP 地址查看
NetworkingApi getIPs GET /networking/ips IP 地址列表
NetworkingApi getIPv6Pools GET /networking/ipv6/pools IPv6 池列表
NetworkingApi getIPv6Ranges GET /networking/ipv6/ranges IPv6 范围列表
NetworkingApi getVLANs GET /networking/vlans VLAN 列表
NetworkingApi shareIPs POST /networking/ipv4/share IP 共享配置
NetworkingApi updateFirewall PUT /networking/firewalls/{firewallId} 防火墙更新
NetworkingApi updateFirewallRules PUT /networking/firewalls/{firewallId}/rules 防火墙规则更新
NetworkingApi updateIP PUT /networking/ips/{address} IP 地址 RDNS 更新
NodeBalancersApi createNodeBalancer POST /nodebalancers 负载均衡器创建
NodeBalancersApi createNodeBalancerConfig POST /nodebalancers/{nodeBalancerId}/configs 配置创建
NodeBalancersApi createNodeBalancerNode POST /nodebalancers/{nodeBalancerId}/configs/{configId}/nodes 节点创建
NodeBalancersApi deleteNodeBalancer DELETE /nodebalancers/{nodeBalancerId} 负载均衡器删除
NodeBalancersApi deleteNodeBalancerConfig DELETE /nodebalancers/{nodeBalancerId}/configs/{configId} 配置删除
NodeBalancersApi deleteNodeBalancerConfigNode DELETE /nodebalancers/{nodeBalancerId}/configs/{configId}/nodes/{nodeId} 节点删除
NodeBalancersApi getNodeBalancer GET /nodebalancers/{nodeBalancerId} 负载均衡器视图
NodeBalancersApi getNodeBalancerConfig GET /nodebalancers/{nodeBalancerId}/configs/{configId} 配置视图
NodeBalancersApi getNodeBalancerConfigNodes GET /nodebalancers/{nodeBalancerId}/configs/{configId}/nodes 节点列表
NodeBalancersApi getNodeBalancerConfigs GET /nodebalancers/{nodeBalancerId}/configs 配置列表
NodeBalancersApi getNodeBalancerNode GET /nodebalancers/{nodeBalancerId}/configs/{configId}/nodes/{nodeId} 节点查看
NodeBalancersApi getNodeBalancers GET /nodebalancers 节点均衡器列表
NodeBalancersApi nodebalancersNodeBalancerIdStatsGet GET /nodebalancers/{nodeBalancerId}/stats 节点均衡器统计视图
NodeBalancersApi rebuildNodeBalancerConfig POST /nodebalancers/{nodeBalancerId}/configs/{configId}/rebuild 配置重建
NodeBalancersApi updateNodeBalancer PUT /nodebalancers/{nodeBalancerId} 节点均衡器更新
NodeBalancersApi updateNodeBalancerConfig PUT /nodebalancers/{nodeBalancerId}/configs/{configId} 配置更新
NodeBalancersApi updateNodeBalancerNode PUT /nodebalancers/{nodeBalancerId}/configs/{configId}/nodes/{nodeId} 节点更新
ObjectStorageApi cancelObjectStorage POST /object-storage/cancel 对象存储取消
ObjectStorageApi createObjectStorageBucket POST /object-storage/buckets 对象存储桶创建
ObjectStorageApi createObjectStorageKeys POST /object-storage/keys 对象存储密钥创建
ObjectStorageApi createObjectStorageObjectURL POST /object-storage/buckets/{clusterId}/{bucket}/object-url 对象存储对象URL创建
ObjectStorageApi createObjectStorageSSL POST /object-storage/buckets/{clusterId}/{bucket}/ssl 对象存储TLS/SSL证书上传
ObjectStorageApi deleteObjectStorageBucket DELETE /object-storage/buckets/{clusterId}/{bucket} 对象存储桶移除
ObjectStorageApi deleteObjectStorageKey DELETE /object-storage/keys/{keyId} 对象存储密钥吊销
ObjectStorageApi deleteObjectStorageSSL DELETE /object-storage/buckets/{clusterId}/{bucket}/ssl 对象存储TLS/SSL证书删除
ObjectStorageApi getObjectStorageBucket GET /object-storage/buckets/{clusterId}/{bucket} 对象存储桶查看
ObjectStorageApi getObjectStorageBucketContent GET /object-storage/buckets/{clusterId}/{bucket}/object-list 对象存储桶内容列表
ObjectStorageApi getObjectStorageBucketinCluster GET /object-storage/buckets/{clusterId} 集群中对象存储桶列表
ObjectStorageApi getObjectStorageBuckets GET /object-storage/buckets 对象存储桶列表
ObjectStorageApi getObjectStorageCluster GET /object-storage/clusters/{clusterId} 集群查看
ObjectStorageApi getObjectStorageClusters GET /object-storage/clusters 集群列表
ObjectStorageApi getObjectStorageKey GET /object-storage/keys/{keyId} 对象存储密钥查看
ObjectStorageApi getObjectStorageKeys GET /object-storage/keys 对象存储密钥列表
ObjectStorageApi getObjectStorageSSL GET /object-storage/buckets/{clusterId}/{bucket}/ssl 对象存储TLS/SSL证书查看
ObjectStorageApi getObjectStorageTransfer GET /object-storage/transfer 对象存储传输查看
ObjectStorageApi modifyObjectStorageBucketAccess POST /object-storage/buckets/{clusterId}/{bucket}/access 对象存储桶访问修改
ObjectStorageApi updateObjectStorageBucketACL PUT /object-storage/buckets/{clusterId}/{bucket}/object-acl 对象存储对象ACL配置更新
ObjectStorageApi updateObjectStorageBucketAccess PUT /object-storage/buckets/{clusterId}/{bucket}/access 对象存储桶访问更新
ObjectStorageApi updateObjectStorageKey PUT /object-storage/keys/{keyId} 对象存储密钥更新
ObjectStorageApi viewObjectStorageBucketACL GET /object-storage/buckets/{clusterId}/{bucket}/object-acl 对象存储对象ACL配置查看
ProfileApi addSSHKey POST /profile/sshkeys 添加SSH密钥
ProfileApi createPersonalAccessToken POST /profile/tokens 创建个人访问令牌
ProfileApi deletePersonalAccessToken DELETE /profile/tokens/{tokenId} 吊销个人访问令牌
ProfileApi deleteProfileApp DELETE /profile/apps/{appId} 吊销应用程序访问
ProfileApi deleteSSHKey DELETE /profile/sshkeys/{sshKeyId} 删除SSH密钥
ProfileApi getDevices GET /profile/devices 受信任设备列表
ProfileApi getPersonalAccessToken GET /profile/tokens/{tokenId} 查看个人访问令牌
ProfileApi getPersonalAccessTokens GET /profile/tokens 个人访问令牌列表
ProfileApi getProfile GET /profile 查看配置文件
ProfileApi getProfileApp GET /profile/apps/{appId} 授权应用程序查看
ProfileApi getProfileApps GET /profile/apps 授权应用程序列表
ProfileApi getProfileGrants GET /profile/grants 资助列表
ProfileApi getProfileLogin GET /profile/logins/{loginId} 查看登录
ProfileApi getProfileLogins GET /profile/logins 登录列表
ProfileApi getSSHKey GET /profile/sshkeys/{sshKeyId} SSH密钥查看
ProfileApi getSSHKeys GET /profile/sshkeys SSH密钥列表
ProfileApi getTrustedDevice GET /profile/devices/{deviceId} 受信任设备查看
ProfileApi getUserPreferences GET /profile/preferences 用户偏好查看
ProfileApi revokeTrustedDevice DELETE /profile/devices/{deviceId} 撤销受信任设备
ProfileApi tfaConfirm POST /profile/tfa-enable-confirm 双因素认证确认/启用
ProfileApi tfaDisable POST /profile/tfa-disable 禁用双因素认证
ProfileApi tfaEnable POST /profile/tfa-enable 创建双因素密钥
ProfileApi updatePersonalAccessToken PUT /profile/tokens/{tokenId} 个人访问令牌更新
ProfileApi updateProfile PUT /profile 更新个人资料
ProfileApi updateSSHKey PUT /profile/sshkeys/{sshKeyId} 更新SSH密钥
ProfileApi updateUserPreferences PUT /profile/preferences 更新用户偏好
RegionsApi getRegion GET /regions/{regionId} 区域查看
RegionsApi getRegions GET /regions 区域列表
StackScriptsApi addStackScript POST /linode/stackscripts 创建StackScript
StackScriptsApi deleteStackScript DELETE /linode/stackscripts/{stackscriptId} 删除StackScript
StackScriptsApi getStackScript GET /linode/stackscripts/{stackscriptId} StackScript查看
StackScriptsApi getStackScripts GET /linode/stackscripts StackScripts列表
StackScriptsApi updateStackScript PUT /linode/stackscripts/{stackscriptId} 更新StackScript
SupportApi closeTicket POST /support/tickets/{ticketId}/close 关闭支持票据
SupportApi createTicket POST /support/tickets 打开支持票据
SupportApi createTicketAttachment POST /support/tickets/{ticketId}/attachments 创建票据附件
SupportApi createTicketReply POST /support/tickets/{ticketId}/replies 创建回复
SupportApi getTicket GET /support/tickets/{ticketId} 支持票据查看
SupportApi getTicketReplies GET /support/tickets/{ticketId}/replies 回复列表
SupportApi getTickets GET /support/tickets 支持票据列表
TagsApi createTag POST /tags 创建新标签
TagsApi deleteTag DELETE /tags/{label} 删除标签
TagsApi getTaggedObjects GET /tags/{label} 标签对象列表
TagsApi getTags GET /tags 标签列表
VolumesApi attachVolume POST /volumes/{volumeId}/attach 挂载卷
VolumesApi cloneVolume POST /volumes/{volumeId}/clone 克隆卷
VolumesApi createVolume POST /volumes 创建卷
VolumesApi deleteVolume DELETE /volumes/{volumeId} 删除卷
VolumesApi detachVolume POST /volumes/{volumeId}/detach 取消挂载卷
VolumesApi getVolume GET /volumes/{volumeId} 查看卷
VolumesApi getVolumes GET /volumes 卷列表
VolumesApi resizeVolume POST /volumes/{volumeId}/resize 调整卷大小
VolumesApi updateVolume PUT /volumes/{volumeId} 更新卷

模型

授权

oauth

  • 类型: OAuth
  • 流程: accessCode
  • 授权URL: https://login.linode.com/oauth/authorize
  • 作用域:
    • account:read_only: 允许访问获取您的账户信息。
    • account:read_write: 允许访问与您的账户相关的所有端点。
    • domains:read_only: 允许访问获取您的域名。
    • domains:read_write: 允许访问所有域名端点。
    • events:read_only: 允许访问获取您的事件。
    • events:read_write: 允许访问与您的事件相关的所有端点。
    • firewall:read_only: 允许访问获取您的防火墙信息。
    • firewall:read_write: 允许访问所有防火墙端点。
    • images:read_only: 允许访问获取您的镜像。
    • images:read_write: 允许访问与您的镜像相关的所有端点。
    • ips:read_only: 允许访问获取您的IP。
    • ips:read_write: 允许访问与您的IP相关的所有端点。
    • linodes:read_only: 允许访问获取您的Linodes。
    • linodes:read_write: 允许访问与您的Linodes相关的所有端点。
    • lke:read_only: 允许访问获取您的LKE集群。
    • lke:read_write: 允许访问与您的LKE集群相关的所有端点。
    • longview:read_only: 允许访问获取您的Longview客户端。
    • longview:read_write: 允许访问与您的Longview客户端相关的所有端点。
    • maintenance:read_only: 允许访问获取您的账户维护信息。
    • nodebalancers:read_only: 允许访问获取您的NodeBalancers。
    • nodebalancers:read_write: 允许访问所有NodeBalancer端点。
    • object_storage:read_only: 允许访问获取与您的对象存储相关的信息。
    • object_storage:read_write: 允许访问所有对象存储端点。
    • stackscripts:read_only: 允许访问获取您的StackScripts。
    • stackscripts:read_write: 允许访问与您的StackScripts相关的所有端点。
    • volumes:read_only: 允许访问获取您的卷。
    • volumes:read_write: 允许访问与您的卷相关的所有端点。

个人访问令牌

  • 类型: 带证认证

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

support@linode.com

关于此包

此PHP包由OpenAPI Generator项目自动生成

  • API版本: 4.107.0
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen