This page shows how to get started with the Cloud Client Libraries for the Google Storage Transfer API. Read more about the client libraries for Cloud APIs, including the older Google API Client Libraries, in Client Libraries Explained.
For information about updating from the Google API Client Library to the Cloud Client Library that is described on this page, see the Storage Transfer Service Migration Guide.
Installing the client library
C++
For more information about installing the C++ library, see the Setting up a C++ development environment guide.
C#
For more information, see Setting Up a C# Development Environment.
If you are using Visual Studio 2017 or higher, open a nuget package manager window and type the following:Install-Package Google.Cloud.StorageTransfer.V1
If you are using .NET Core command-line interface tools to install your dependencies, run the following command:
dotnet add package Google.Cloud.StorageTransfer.V1
Go
For more information, see Setting Up a Go Development Environment.
go get cloud.google.com/go/storagetransfer
Java
For more information, see Setting Up a Java Development Environment.
If you are using Maven, add this to your pom.xml file:<dependency> <groupId>com.google.cloud</groupId> <artifactId>google-cloud-storage-transfer</artifactId> <version>0.2.3</version> </dependency>
If you are using Gradle without BOM, add this to your dependencies:
implementation 'com.google.cloud:google-cloud-storage-transfer:0.2.3'
Node.js
For more information, see Setting Up a Node.js Development Environment.
npm install --save @google-cloud/storage-transfer
PHP
For more information, see Using PHP on Google Cloud.
composer require google/cloud
Python
For more information, see Setting Up a Python Development Environment.
pip install --upgrade google-cloud-storage-transfer
Ruby
For more information, see Setting Up a Ruby Development Environment.
gem install google-cloud-storage_transfer
Setting up authentication
When you use client libraries, you use Application Default Credentials to authenticate. For more information, see Authenticate using client libraries.
Using the client library
The following examples show how to use the client library.
Before using these samples, follow the instructions in Configuring access to set up the required permissions.
C++
To learn how to install and use the client library for Storage Transfer Service, see Storage Transfer Service client libraries.
To authenticate to Storage Transfer Service, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
C#
To learn how to install and use the client library for Storage Transfer Service, see Storage Transfer Service client libraries. For more information, see the Storage Transfer Service C# API reference documentation.
To authenticate to Storage Transfer Service, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Go
To learn how to install and use the client library for Storage Transfer Service, see Storage Transfer Service client libraries. For more information, see the Storage Transfer Service Go API reference documentation.
To authenticate to Storage Transfer Service, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Java
To learn how to install and use the client library for Storage Transfer Service, see Storage Transfer Service client libraries. For more information, see the Storage Transfer Service Java API reference documentation.
To authenticate to Storage Transfer Service, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Node.js
To learn how to install and use the client library for Storage Transfer Service, see Storage Transfer Service client libraries. For more information, see the Storage Transfer Service Node.js API reference documentation.
To authenticate to Storage Transfer Service, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
PHP
To learn how to install and use the client library for Storage Transfer Service, see Storage Transfer Service client libraries. For more information, see the Storage Transfer Service PHP API reference documentation.
To authenticate to Storage Transfer Service, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Python
To learn how to install and use the client library for Storage Transfer Service, see Storage Transfer Service client libraries. For more information, see the Storage Transfer Service Python API reference documentation.
To authenticate to Storage Transfer Service, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Ruby
To learn how to install and use the client library for Storage Transfer Service, see Storage Transfer Service client libraries. For more information, see the Storage Transfer Service Ruby API reference documentation.
To authenticate to Storage Transfer Service, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Using the client library with Cloud Shell Editor
Java
To follow step-by-step guidance for this task directly in the Google Cloud console, click Guide me:
Node.js
To follow step-by-step guidance for this task directly in the Google Cloud console, click Guide me:
Python
To follow step-by-step guidance for this task directly in the Google Cloud console, click Guide me: