클라이언트 라이브러리 설정

이 페이지에서는 Memorystore for Redis API용 클라이언트 라이브러리를 설치하여 원하는 언어로 API에 연결할 수 있는 방법을 보여줍니다.

클라이언트 라이브러리 설치

C++

이 클라이언트 라이브러리 요구사항 및 설치 종속 항목에 대한 자세한 내용은 C++ 개발 환경 설정을 참조하세요.

C#

Visual Studio에서 Google.Cloud.Redis.V1 패키지 설치

Go

go get cloud.google.com/go/redis/apiv1

Java

Maven을 사용하는 경우 pom.xml 파일에 다음을 추가합니다.

<dependency>
    <groupId>com.google.cloud</groupId>
    <artifactId>google-cloud-redis</artifactId>
    <version>0.62.0-alpha</version>
</dependency>

Gradle을 사용하는 경우 종속 항목에 다음을 추가합니다.

compile 'com.google.cloud:google-cloud-redis:0.62.0-alpha'

SBT를 사용하는 경우 종속 항목에 다음을 추가합니다.

libraryDependencies += "com.google.cloud" % "google-cloud-redis" % "0.62.0-alpha"

VS Code, IntelliJ, Eclipse를 사용하는 경우 다음과 같은 IDE 플러그인을 사용하여 클라이언트 라이브러리를 프로젝트에 추가할 수 있습니다.

이 플러그인은 서비스 계정의 키 관리와 같은 추가 기능을 제공합니다. 자세한 내용은 각 플러그인의 문서를 참조하세요.

Node.js

npm install --save @google-cloud/redis

PHP

composer require google/cloud-redis

Python

Python 개발 환경 설정에 관한 자세한 내용은 Python 개발 환경 설정 가이드를 참조하세요.
pip install --upgrade google-cloud-redis

Ruby

gem install google-cloud-redis

인증 설정

  1. Install the Google Cloud CLI. After installation, initialize the Google Cloud CLI by running the following command:

    gcloud init

    If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

  2. If you're using a local shell, then create local authentication credentials for your user account:

    gcloud auth application-default login

    You don't need to do this if you're using Cloud Shell.

    If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.

    로그인 화면이 표시됩니다. 로그인하면 사용자 인증 정보는 ADC에서 사용하는 로컬 사용자 인증 정보 파일에 저장됩니다.

추가 리소스