Ruby Cloud Client Libraries

The Cloud Client Libraries are the recommended way to access Google Cloud APIs programmatically. The Cloud Client Libraries support accessing Google Cloud services in a way that significantly reduces the boilerplate code you have to write. The libraries provide high-level API abstractions so they're easier to understand. They embrace idioms of the language, work well with the standard library, and integrate better with your codebase.

For more information about client libraries for Cloud APIs, see Cloud Client Libraries explained.

Click an API to find out how to use it in Ruby:

Libraries
AI Platform google-cloud-ai_platform
google-cloud-ai_platform-v1
AI Platform Data Labeling Service google-cloud-data_labeling
google-cloud-data_labeling-v1beta1
API Gateway google-cloud-api_gateway
google-cloud-api_gateway-v1
API Keys API google-cloud-api_keys
google-cloud-api_keys-v2
Access Approval google-cloud-access_approval
google-cloud-access_approval-v1
Access Context Manager google-identity-access_context_manager
google-identity-access_context_manager-v1
Advisory Notifications google-cloud-advisory_notifications
google-cloud-advisory_notifications-v1
AlloyDB for PostgreSQL google-cloud-alloy_db
google-cloud-alloy_db-v1
google-cloud-alloy_db-v1alpha
google-cloud-alloy_db-v1beta
Analytics Admin API google-analytics-admin
google-analytics-admin-v1alpha
Analytics Data API google-analytics-data
google-analytics-data-v1beta
Analytics Hub API google-cloud-bigquery-analytics_hub
google-cloud-bigquery-analytics_hub-v1
google-cloud-bigquery-data_exchange
google-cloud-bigquery-data_exchange-v1beta1
Apigee Connect API google-cloud-apigee_connect
google-cloud-apigee_connect-v1
Apigee Registry google-cloud-apigee_registry
google-cloud-apigee_registry-v1
App Engine Admin API google-cloud-app_engine
google-cloud-app_engine-v1
App Hub google-cloud-app_hub
google-cloud-app_hub-v1
Artifact Registry google-cloud-artifact_registry
google-cloud-artifact_registry-v1
google-cloud-artifact_registry-v1beta2
Assured Workloads google-cloud-assured_workloads
google-cloud-assured_workloads-v1
google-cloud-assured_workloads-v1beta1
AutoML google-cloud-automl
google-cloud-automl-v1
google-cloud-automl-v1beta1
Backup and DR google-cloud-backupdr
google-cloud-backupdr-v1
Backup for GKE google-cloud-gke_backup
google-cloud-gke_backup-v1
Bare Metal Solution google-cloud-bare_metal_solution
google-cloud-bare_metal_solution-v2
Batch google-cloud-batch
google-cloud-batch-v1
BeyondCorp Enterprise google-cloud-beyond_corp
google-cloud-beyond_corp-app_connections-v1
google-cloud-beyond_corp-app_connectors-v1
google-cloud-beyond_corp-app_gateways-v1
google-cloud-beyond_corp-client_connector_services-v1
google-cloud-beyond_corp-client_gateways-v1
BigQuery google-cloud-bigquery
BigQuery Connection API google-cloud-bigquery-connection
google-cloud-bigquery-connection-v1
BigQuery Data QnA google-cloud-dataqna
google-cloud-dataqna-v1alpha
BigQuery Data Transfer Service google-cloud-bigquery-data_transfer
google-cloud-bigquery-data_transfer-v1
BigQuery DataPolicy API google-cloud-bigquery-data_policies
google-cloud-bigquery-data_policies-v1
google-cloud-bigquery-data_policies-v1beta1
BigQuery Migration google-cloud-bigquery-migration
google-cloud-bigquery-migration-v2
BigQuery Reservation API google-cloud-bigquery-reservation
google-cloud-bigquery-reservation-v1
BigQuery Storage google-cloud-bigquery-storage
google-cloud-bigquery-storage-v1
Bigtable google-cloud-bigtable
google-cloud-bigtable-v2
Binary Authorization google-cloud-binary_authorization
google-cloud-binary_authorization-v1
google-cloud-binary_authorization-v1beta1
Certificate Authority Service google-cloud-security-private_ca
google-cloud-security-private_ca-v1
google-cloud-security-private_ca-v1beta1
Certificate Manager google-cloud-certificate_manager
google-cloud-certificate_manager-v1
Channel Services google-cloud-channel
google-cloud-channel-v1
Chat API google-apps-chat
google-apps-chat-v1
Cloud Asset Inventory google-cloud-asset
google-cloud-asset-v1
Cloud Bigtable Admin API google-cloud-bigtable-admin-v2
Cloud Billing google-cloud-billing
google-cloud-billing-v1
Cloud Billing Budget API google-cloud-billing-budgets
google-cloud-billing-budgets-v1
google-cloud-billing-budgets-v1beta1
Cloud Build google-cloud-build
google-cloud-build-v1
google-cloud-build-v2
Cloud Composer google-cloud-orchestration-airflow-service
google-cloud-orchestration-airflow-service-v1
Cloud DNS google-cloud-dns
Cloud Data Fusion google-cloud-data_fusion
google-cloud-data_fusion-v1
Cloud Database Migration Service google-cloud-cloud_dms
google-cloud-cloud_dms-v1
Cloud Debugger google-cloud-debugger
google-cloud-debugger-v2
Cloud Domains google-cloud-domains
google-cloud-domains-v1
google-cloud-domains-v1beta1
Cloud IDS google-cloud-ids
google-cloud-ids-v1
Cloud Key Management Service google-cloud-kms
google-cloud-kms-v1
Cloud Life Sciences google-cloud-life_sciences
google-cloud-life_sciences-v2beta
Cloud Logging google-cloud-logging
google-cloud-logging-v2
Cloud Monitoring google-cloud-monitoring
google-cloud-monitoring-dashboard-v1
google-cloud-monitoring-metrics_scope-v1
google-cloud-monitoring-v3
Cloud Natural Language API google-cloud-language
google-cloud-language-v1
google-cloud-language-v1beta2
google-cloud-language-v2
Cloud OS Config google-cloud-os_config
google-cloud-os_config-v1
google-cloud-os_config-v1alpha
Cloud OS Login API google-cloud-os_login
google-cloud-os_login-v1
google-cloud-os_login-v1beta
Cloud Optimization AI google-cloud-optimization
google-cloud-optimization-v1
Cloud Profiler google-cloud-profiler
google-cloud-profiler-v2
Cloud Quotas google-cloud-cloud_quotas
google-cloud-cloud_quotas-v1
Cloud Run google-cloud-run-client
google-cloud-run-v2
Cloud Run functions google-cloud-functions
google-cloud-functions-v1
google-cloud-functions-v2
Cloud Scheduler google-cloud-scheduler
google-cloud-scheduler-v1
google-cloud-scheduler-v1beta1
Cloud Shell google-cloud-shell
google-cloud-shell-v1
Cloud Storage google-cloud-storage
google-cloud-storage-control
google-cloud-storage-control-v2
Cloud TPU google-cloud-tpu
google-cloud-tpu-v1
Cloud Talent Solution Job Search google-cloud-talent
google-cloud-talent-v4
google-cloud-talent-v4beta1
Cloud Tasks google-cloud-tasks
google-cloud-tasks-v2
google-cloud-tasks-v2beta2
google-cloud-tasks-v2beta3
Cloud Trace google-cloud-trace
google-cloud-trace-v1
google-cloud-trace-v2
Cloud Translation google-cloud-translate
google-cloud-translate-v2
google-cloud-translate-v3
Cloud Vision google-cloud-vision
google-cloud-vision-v1
google-cloud-vision-v1p3beta1
google-cloud-vision-v1p4beta1
Cloud Workstations google-cloud-workstations
google-cloud-workstations-v1
google-cloud-workstations-v1beta
Compute Engine google-cloud-compute
google-cloud-compute-v1
Confidential Space google-cloud-confidential_computing
google-cloud-confidential_computing-v1
Confidential VM google-cloud-confidential_computing
google-cloud-confidential_computing-v1
Connect Gateway API google-cloud-gke_connect-gateway
google-cloud-gke_connect-gateway-v1
google-cloud-gke_connect-gateway-v1beta1
Contact Center AI Insights google-cloud-contact_center_insights
google-cloud-contact_center_insights-v1
Container Analysis google-cloud-container_analysis
google-cloud-container_analysis-v1
grafeas-v1
Data Catalog google-cloud-data_catalog
google-cloud-data_catalog-v1
google-cloud-data_catalog-v1beta1
Data Lineage google-cloud-data_catalog-lineage
google-cloud-data_catalog-lineage-v1
Dataflow google-cloud-dataflow
google-cloud-dataflow-v1beta3
Dataform google-cloud-dataform
google-cloud-dataform-v1beta1
Dataplex google-cloud-dataplex
google-cloud-dataplex-v1
Dataproc google-cloud-dataproc
google-cloud-dataproc-v1
Dataproc Metastore google-cloud-metastore
google-cloud-metastore-v1
google-cloud-metastore-v1beta
Datastream google-cloud-datastream
google-cloud-datastream-v1
google-cloud-datastream-v1alpha1
Developer Connect google-cloud-developer_connect
google-cloud-developer_connect-v1
Dialogflow google-cloud-dialogflow
google-cloud-dialogflow-cx
google-cloud-dialogflow-cx-v3
google-cloud-dialogflow-v2
Discovery Engine API google-cloud-discovery_engine
google-cloud-discovery_engine-v1
google-cloud-discovery_engine-v1beta
Document AI google-cloud-document_ai
google-cloud-document_ai-v1
google-cloud-document_ai-v1beta3
Error Reporting google-cloud-error_reporting
google-cloud-error_reporting-v1beta1
Essential Contacts API google-cloud-essential_contacts
google-cloud-essential_contacts-v1
Eventarc google-cloud-eventarc
google-cloud-eventarc-v1
Eventarc Publishing API google-cloud-eventarc-publishing
google-cloud-eventarc-publishing-v1
Filestore google-cloud-filestore
google-cloud-filestore-v1
Firestore google-cloud-firestore
google-cloud-firestore-admin
google-cloud-firestore-admin-v1
google-cloud-firestore-v1
Firestore in Datastore mode google-cloud-datastore
google-cloud-datastore-admin
google-cloud-datastore-admin-v1
google-cloud-datastore-v1
Fleet Engine API google-maps-fleet_engine
google-maps-fleet_engine-v1
GKE Hub API google-cloud-gke_hub
google-cloud-gke_hub-v1
google-cloud-gke_hub-v1beta1
Game Servers google-cloud-gaming
google-cloud-gaming-v1
Google Cloud Deploy google-cloud-deploy
google-cloud-deploy-v1
Google Cloud Managed Service for Apache Kafka google-cloud-managed_kafka
google-cloud-managed_kafka-v1
Google Cloud VMware Engine google-cloud-vmware_engine
google-cloud-vmware_engine-v1
Google Meet google-apps-meet
google-apps-meet-v2
google-apps-meet-v2beta
Google Workspace Add-ons API google-cloud-gsuite_add_ons
google-cloud-gsuite_add_ons-v1
Google Workspace Events API google-apps-events-subscriptions
google-apps-events-subscriptions-v1
IAM Policy Troubleshooter API google-cloud-policy_troubleshooter
google-cloud-policy_troubleshooter-iam-v3
google-cloud-policy_troubleshooter-v1
IAM Service Account Credentials API google-iam-credentials
google-iam-credentials-v1
Identity and Access Management google-iam-client
google-iam-v1
google-iam-v1beta
google-iam-v2
Identity-Aware Proxy google-cloud-iap
google-cloud-iap-v1
Integration Connectors google-cloud-connectors
google-cloud-connectors-v1
IoT Core google-cloud-iot
google-cloud-iot-v1
Kubernetes Engine API google-cloud-container
google-cloud-container-v1
google-cloud-container-v1beta1
Live Stream API google-cloud-video-live_stream
google-cloud-video-live_stream-v1
Managed Service for Microsoft Active Directory google-cloud-managed_identities
google-cloud-managed_identities-v1
Media CDN google-cloud-network_services
google-cloud-network_services-v1
Media Translation google-cloud-media_translation
google-cloud-media_translation-v1beta1
Memorystore for Memcached google-cloud-memcache
google-cloud-memcache-v1
google-cloud-memcache-v1beta2
Memorystore for Redis google-cloud-redis
google-cloud-redis-cluster
google-cloud-redis-cluster-v1
google-cloud-redis-cluster-v1beta1
google-cloud-redis-v1
google-cloud-redis-v1beta1
Migrate to Virtual Machines google-cloud-vm_migration
google-cloud-vm_migration-v1
Migration Center google-cloud-migration_center
google-cloud-migration_center-v1
NetApp Volumes google-cloud-netapp
google-cloud-netapp-v1
Network Connectivity Center google-cloud-network_connectivity
google-cloud-network_connectivity-v1
google-cloud-network_connectivity-v1alpha1
Network Management API google-cloud-network_management
google-cloud-network_management-v1
Network Security API google-cloud-network_security
google-cloud-network_security-v1beta1
Oracle Database@Google Cloud google-cloud-oracle_database
google-cloud-oracle_database-v1
Organization Policy google-cloud-org_policy
google-cloud-org_policy-v2
Parallelstore google-cloud-parallelstore
google-cloud-parallelstore-v1beta
Phishing Protection google-cloud-phishing_protection
google-cloud-phishing_protection-v1beta1
Pub/Sub google-cloud-pubsub
google-cloud-pubsub-v1
Public Certificate Authority google-cloud-security-public_ca
google-cloud-security-public_ca-v1
google-cloud-security-public_ca-v1beta1
Recommendations AI google-cloud-recommendation_engine
google-cloud-recommendation_engine-v1beta1
Recommender google-cloud-recommender
google-cloud-recommender-v1
Resource Manager google-cloud-resource_manager
google-cloud-resource_manager-v3
Resource Settings API google-cloud-resource_settings
google-cloud-resource_settings-v1
Retail API google-cloud-retail
google-cloud-retail-v2
Secret Manager google-cloud-secret_manager
google-cloud-secret_manager-v1
google-cloud-secret_manager-v1beta1
google-cloud-secret_manager-v1beta2
Secure Source Manager google-cloud-secure_source_manager
google-cloud-secure_source_manager-v1
Security Command Center google-cloud-security_center
google-cloud-security_center-v1
google-cloud-security_center-v1p1beta1
google-cloud-security_center-v2
Sensitive Data Protection google-cloud-dlp
google-cloud-dlp-v2
Service Control API google-cloud-service_control
google-cloud-service_control-v1
Service Directory google-cloud-service_directory
google-cloud-service_directory-v1
google-cloud-service_directory-v1beta1
Service Health google-cloud-service_health
google-cloud-service_health-v1
Service Management API google-cloud-service_management
google-cloud-service_management-v1
Service Usage google-cloud-service_usage
google-cloud-service_usage-v1
Spanner google-cloud-spanner
google-cloud-spanner-admin-database-v1
google-cloud-spanner-admin-instance-v1
google-cloud-spanner-v1
Speech-to-Text google-cloud-speech
google-cloud-speech-v1
google-cloud-speech-v1p1beta1
google-cloud-speech-v2
Storage Insights google-cloud-storage_insights
google-cloud-storage_insights-v1
Storage Transfer Service google-cloud-storage_transfer
google-cloud-storage_transfer-v1
Tables by Area 120 google-area120-tables
google-area120-tables-v1alpha1
Text-to-Speech google-cloud-text_to_speech
google-cloud-text_to_speech-v1
google-cloud-text_to_speech-v1beta1
Transcoder API google-cloud-video-transcoder
google-cloud-video-transcoder-v1
google-cloud-video-transcoder-v1beta1
Vertex AI google-cloud-ai_platform
google-cloud-ai_platform-v1
Vertex AI Vision google-cloud-vision_ai
google-cloud-vision_ai-v1
Vertex AI Workbench google-cloud-notebooks
google-cloud-notebooks-v1
google-cloud-notebooks-v1beta1
google-cloud-notebooks-v2
Video Intelligence API google-cloud-video_intelligence
google-cloud-video_intelligence-v1
google-cloud-video_intelligence-v1beta2
google-cloud-video_intelligence-v1p1beta1
google-cloud-video_intelligence-v1p2beta1
google-cloud-video_intelligence-v1p3beta1
Video Stitcher API google-cloud-video-stitcher
google-cloud-video-stitcher-v1
Virtual Private Cloud google-cloud-vpc_access
google-cloud-vpc_access-v1
Web Risk google-cloud-web_risk
google-cloud-web_risk-v1
google-cloud-web_risk-v1beta1
Web Security Scanner google-cloud-web_security_scanner
google-cloud-web_security_scanner-v1
google-cloud-web_security_scanner-v1beta
Workflow Executions API google-cloud-workflows-executions-v1
google-cloud-workflows-executions-v1beta
Workflows google-cloud-workflows
google-cloud-workflows-v1
google-cloud-workflows-v1beta
reCAPTCHA google-cloud-recaptcha_enterprise
google-cloud-recaptcha_enterprise-v1
google-cloud-recaptcha_enterprise-v1beta1