ITADN
googleapis/google-cloud-node
README.md
以下内容由 AI 翻译,如有问题请点此提交 issue 反馈

Google Cloud Node.js 客户端库

用于 Google Cloud Platform 服务的 Node.js 惯用客户端库。

这些库可在 GitHub 和 npm 上获取,用于开发与各个 Google Cloud 服务交互的 Node.js 应用程序:

仓库发布级别版本
Access ApprovalStablenpm
Access Context ManagerStablenpm
Advisory Notifications APIStablenpm
AI Platform NotebooksStablenpm
AlloyDB APIStablenpm
Analytics Hub APIStablenpm
Anthos Multi-Cloud APIStablenpm
API GatewayStablenpm
API Keys APIStablenpm
Apigee Connect APIStablenpm
App Engine Admin APIStablenpm
Artifact RegistryStablenpm
Asset InventoryStablenpm
Assured Workloads for GovernmentStablenpm
AutoMLStablenpm
Backup and DR Service APIStablenpm
GKE API 备份Stablenpm
Bare Metal Solution APIStablenpm
BeyondCorp APIStablenpm
BeyondCorp APIStablenpm
BigQuery Migration APIStablenpm
BillingStablenpm
Billing BudgetsStablenpm
Binary AuthorizationStablenpm
BuildStablenpm
Certificate Authority ServiceStablenpm
Certificate ManagerStablenpm
Channel APIStablenpm
Commerce Consumer Procurement APIStablenpm
ComposerStablenpm
Confidential Computing APIStablenpm
Connectors APIStablenpm
Contact Center AI Insights APIStablenpm
Controls Partner APIStablenpm
Data CatalogStablenpm
Data FusionStablenpm
Data Lineage APIStablenpm
Data Loss PreventionStablenpm
Database Migration ServiceStablenpm
DataplexStablenpm
DataprocStablenpm
Dataproc MetastoreStablenpm
DatastreamStablenpm
DeployStablenpm
Dialogflow APIStablenpm
Dialogflow CX APIStablenpm
Discovery Engine APIStablenpm
Distributed Cloud Edge Container APIStablenpm
分布式云边缘网络 APIStablenpm
DNSStablenpm
Document AIStablenpm
Document AI WarehouseStablenpm
DomainsStablenpm
Essential Contacts APIStablenpm
EventarcStablenpm
Eventarc Publishing APIStablenpm
FilestoreStablenpm
FunctionsStablenpm
GKE HubStablenpm
Google BigQuery ConnectionStablenpm
Google BigQuery Data Transfer ServiceStablenpm
Google BigQuery ReservationStablenpm
Google Compute EngineStablenpm
Google Container AnalysisStablenpm
Google Workspace 附加组件 APIStablenpm
GrafeasStablenpm
IAM 策略故障排除 APIStablenpm
IAM 服务账号凭据 APIStablenpm
身份和访问管理Stablenpm
身份感知代理Stablenpm
IDSStablenpm
基础设施管理器 APIStablenpm
物联网 (IoT) 核心Stablenpm
密钥管理服务Stablenpm
Kubernetes 引擎集群管理器 APIStablenpm
直播流 APIStablenpm
Winston 日志记录Stablenpm
Microsoft Active Directory 托管服务Stablenpm
媒体翻译Stablenpm
Memorystore for MemcachedStablenpm
Merchant APIStablenpm
Merchant APIStablenpm
Merchant APIStablenpm
Merchant APIStablenpm
Merchant APIStablenpm
Merchant APIStablenpm
Merchant APIStablenpm
Merchant APIStablenpm
Merchant APIStablenpm
Merchant APIStablenpm
Merchant APIStablenpm
Merchant APIStablenpm
Migrate for Compute EngineStablenpm
Migration Center APIStablenpm
Monitoring DashboardsStablenpm
Natural LanguageStablenpm
NetApp APIStablenpm
Network Connectivity CenterStablenpm
Network Management APIStablenpm
Network Security APIStablenpm
Network Services APIStablenpm
Organization PolicyStablenpm
OS Config APIStablenpm
OS LoginStablenpm
Policy Simulator APIStablenpm
Public Certificate AuthorityStablenpm
Quotas APIStablenpm
Rapid Migration Assessment APIStablenpm
reCAPTCHA EnterpriseStablenpm
RecommenderStablenpm
RedisStablenpm
Resource Manager APIStablenpm
Retail APIStablenpm
RunStablenpm
SchedulerStablenpm
Secret ManagerStablenpm
Secure Source Manager APIStablenpm
Security Center Management APIStablenpm
Security Command CenterStablenpm
Service Control APIStablenpm
Service DirectoryStablenpm
Service Health APIStablenpm
Service Management APIStablenpm
Service UsageStablenpm
ShellStablenpm
SpeechStablenpm
SQL Admin APIStablenpm
Stackdriver MonitoringStablenpm
Storage APIStablenpm
Storage Insights APIStablenpm
Storage Transfer ServiceStablenpm
Support APIStablenpm
Talent SolutionStablenpm
TasksStablenpm
Telco Automation APIStablenpm
Text-to-SpeechStablenpm
TPUStablenpm
Transcoder APIStablenpm
TranslationStablenpm
Vertex AIStablenpm
Video IntelligenceStablenpm
Video Stitcher APIStablenpm
Virtual Private CloudStablenpm
Vision APIStablenpm
VMware Engine APIStablenpm
Web Risk APIStablenpm
Web Security ScannerStablenpm
Workflow ExecutionsStablenpm
Workstations APIStablenpm
Previewnpm
API hub APIPreviewnpm
API Registry APIPreviewnpm
Apigee Registry APIPreviewnpm
App Hub APIPreviewnpm
Area120 Tables APIPreviewnpm
BatchPreviewnpm
BeyondCorp APIPreviewnpm
BeyondCorp APIPreviewnpm
BeyondCorp APIPreviewnpm
Capacity Planner APIPreviewnpm
Chronicle APIPreviewnpm
Cluster Director APIPreviewnpm
Config Delivery APIPreviewnpm
CSS APIPreviewnpm
Data Analytics API with GeminiPreviewnpm
Data LabelingPreviewnpm
Data Lineage APIPreviewnpm
Data Manager APIPreviewnpm
Data QnAPreviewnpm
DataflowPreviewnpm
Dataform APIPreviewnpm
Developer Connect APIPreviewnpm
Device Streaming APIPreviewnpm
Financial Services APIPreviewnpm
GDC Hardware Management APIPreviewnpm
Gemini Enterprise for Customer Experience APIPreviewnpm
Generative Language APIPreviewnpm
GKE Connect GatewayPreviewnpm
GKE Recommender APIPreviewnpm
Google Ad Manager APIPreviewnpm
Google Analytics AdminPreviewnpm
Google Analytics DataPreviewnpm
Google Chat APIPreviewnpm
Google Maps RoutingPreviewnpm
Google Marketing Platform Admin APIPreviewnpm
Google Meet APIPreviewnpm
Google Workspace Events APIPreviewnpm
Last Mile Fleet Solution Delivery APIPreviewnpm
License Manager APIPreviewnpm
Life SciencesPreviewnpm
Local Rides and Deliveries APIPreviewnpm
Location Finder APIPreviewnpm
Maintenance APIPreviewnpm
Managed Lustre APIPreviewnpm
Managed Service for Apache Kafka APIPreviewnpm
Managed Service for Apache Kafka APIPreviewnpm
Memorystore APIPreviewnpm
Memorystore for Redis APIPreviewnpm
Merchant APIPreviewnpm
Model Armor APIPreviewnpm
Navigation Connect APIPreviewnpm
Oracle Database@Google Cloud APIPreviewnpm
Parallelstore APIPreviewnpm
Parameter Manager APIPreviewnpm
Phishing ProtectionPreviewnpm
Places API (New)Previewnpm
Places Insights APIPreviewnpm
Policy Troubleshooter APIPreviewnpm
Private CatalogPreviewnpm
特权访问管理器 APIPreviewnpm
Profiler APIPreviewnpm
路由优化 APIPreviewnpm
SaaS 运行时 APIPreviewnpm
安全合规 APIPreviewnpm
Solar APIPreviewnpm
存储批量操作 APIPreviewnpm
向量搜索 APIPreviewnpm
视觉 AI APIPreviewnpm
工作负载管理器 APIPreviewnpm

如果上述列表中未包含该服务,google-api-nodejs-client 通过遗留的 REST 接口与额外的 Google Cloud API 进行交互。

在构建 Node.js 应用程序时,应优先使用表中列出的库。

启用 API

在能够与特定的 Google Cloud 服务交互之前,你必须启用其 API。

本文档开头的表格中以及每个库的 README.md 中,都提供了用于启用 API 的链接。

身份验证

下载你的服务账号凭据 JSON 文件

若要使用 Application Default Credentials,你首先需要下载一组用于你项目的 JSON 凭据。前往 Google Developers Console 中的 APIs & Auth > Credentials,并从 Add credentials 下拉菜单中选择 Service account

此文件是这些凭据的唯一副本。它绝不应与你的源代码一起提交,并且应安全地存储。

下载完成后,将此文件的路径存储在 GOOGLE_APPLICATION_CREDENTIALS 环境变量中。

其他身份验证方法

其他身份验证方法在 google-auth-library-nodejs 的 README 中有详细说明, 该库是所有 Google Cloud Node.js 客户端使用的身份验证库。

示例应用程序

  • nodejs-getting-started - 一个示例和教程,演示如何使用 Cloud Datastore、Cloud Storage 和 Cloud Pub/Sub 构建完整的 Web 应用程序,并将其部署到 Google App Engine 或 Google Compute Engine。
  • gcloud-node-todos - 使用 google-cloud-node 和 Datastore 构建的 TodoMVC 后端。
  • gitnpm - 使用 google-cloud-node 和 Google App Engine 轻松查找 npm 包的 GitHub 仓库。
  • gcloud-kvstore - 将 Datastore 用作简单的键值存储。
  • hya-wave - 基于云的 Web 示例编辑器。属于 hya-io 产品系列的一部分。
  • gstore-node - Google Datastore 实体建模库。
  • gstore-api - 用于 Google Datastore 实体的 REST API 构建器。

支持的 Node.js 版本

我们的客户端库遵循 Node.js 发布计划。 库兼容所有当前的 activemaintenance 版本的 Node.js。 如果您使用的是已停止支持的 Node.js 版本,我们建议您尽快更新 到当前受支持的 LTS 版本。

Google 的客户端库以尽力而为的方式支持旧版本的 Node.js 运行时,并附带以下警告:

  • 旧版本未在持续集成中进行测试。
  • 某些安全补丁和功能无法回溯移植。
  • 依赖项无法保持最新。

针对某些已停止维护的 Node.js 版本的客户端库是可用的, 并且可以通过 npm 安装 dist-tags. dist-tags 遵循命名约定 legacy-(version). 例如,{{ metadata['lib_install_cmd'] }}@legacy-10 安装与 Node.js 10 兼容的版本的客户端库。

版本控制

我们的库遵循 语义化版本

请注意,目前仍处于积极开发阶段。任何版本号为 0.x.y 的发布版本随时都可能发生向后不兼容的更改。

稳定版:定义为稳定质量级别的库是稳定的。除非绝对必要(例如由于严重的安全问题)或经过广泛的弃用期,否则代码接口不会以向后不兼容的方式发生变化。针对稳定库的问题和请求将以最高优先级处理。

预览版:定义为预览质量级别的库仍在开发中,更有可能出现向后不兼容的更新。

贡献

我们随时欢迎并高度鼓励对本库的贡献。

有关如何开始的更多信息,请参阅 CONTRIBUTING

许可证

Apache 2.0 - 有关更多信息,请参阅 LICENSE