ステップ 3: API を有効にする

Apigee ハイブリッドを使用するには、Google Cloud コンソールでプロジェクトに対して次の API を有効にする必要があります。

  • Apigee API: プロジェクトと他のハイブリッド サービスや Google Cloud APIs との通信を可能にします。
  • Apigee Connect API: Apigee 管理プレーンと、ランタイム プレーンの MART サービスとの通信を提供します。
  • Cloud Pub/Sub API: 割り当てを機能させるために必要です。
  • Cloud Resource Manager API: サービス アカウントを検証するハイブリッドによって使用されます。
  • Compute Engine API: クラスタ管理に使用されます(GKE ベースのクラスタのみ)。
  • Kubernetes Engine API: ハイブリッド ランタイムのインストールに Google Kubernetes Engine(GKE)または GKE On-Prem(Anthos)を使用する場合に有効にします。

Google Cloud プロジェクトに必要な API を有効にする:

API を有効にするには、CLI または Google Cloud コンソールの UI を使用します。

Google Cloud UI

UI を使用して API を有効にする手順は次のとおりです。

  1. Google Cloud コンソールを開き、ステップ 1: Google Cloud アカウントを作成するで作成したアカウントでログインします。
  2. ステップ 2: Google Cloud プロジェクトを作成するで作成したプロジェクトを選択します。
  3. 次のように Apigee API を有効にします。
    1. ナビゲーション メニューから、[API とサービス] > [ライブラリ] を選択します。

      ハイライトされたナビゲーション メニュー

      [API とサービス] をクリックした後に選択された [ライブラリ] オプション

    2. [API ライブラリ] ビューで「Apigee」を検索します。

      API ライブラリ検索ボックス

      Google Cloud に、「Apigee」に一致する API の一覧が表示されます。

    3. Apigee API サービスを探してクリックします。
    4. Apigee API サービス オプション

    5. [Apigee API] ビューで [有効にする] をクリックします。

      Google Cloud で、Google Cloud プロジェクトの Apigee API を有効にします。

  4. Apigee Connect API を有効にします。
    1. [API ライブラリ] ビューで「Apigee Connect」を検索します。
    2. Apigee Connect API を探して有効にします。

      Google Cloud で、Google Cloud プロジェクトの Apigee Connect API が有効になります。

  5. Cloud Pub/Sub API を有効にします。
    1. [API ライブラリ] ビューで「Cloud Pub/Sub API」を検索します。
    2. Cloud Pub/Sub API を探して有効にします。

      Google Cloud で、Google Cloud プロジェクトの Cloud Pub/Sub API が有効になります。

  6. Cloud Resource Manager API を有効にします。
    1. [API ライブラリ] ビューで「Cloud Resource Manager」を検索します。
    2. Cloud Resource Manager を探して有効にします。

      Google Cloud で、Google Cloud プロジェクトの Cloud Resource Manager API が有効になります。

  7. (GKE ベースのクラスタのみ)Compute Engine API を有効にします。
    1. [API ライブラリ] ビューで「Compute Engine」を検索します。
    2. Compute Engine API を検索して有効にします。

      Google Cloud で、Google Cloud プロジェクトの Compute Engine API が有効になります。

  8. (GKE ベースのクラスタのみ)Google Kubernetes Engine API を有効にします。
    1. [API ライブラリ] ビューで「Google Kubernetes Engine」を検索します。
    2. Google Kubernetes API を探して有効にします。

      Google Cloud で、Google Cloud プロジェクトの Google Kubernetes API が有効になります。

  9. API が有効になっていることを確認するには、[API とサービス] > [ダッシュボード] を選択します。

    追加した API は、有効な API のリストに表示されます。

    • Apigee API
    • Apigee Connect API
    • Cloud Pub/Sub API
    • Cloud Resource Manager API
    • Compute Engine API
    • Kubernetes Engine API

gcloud CLI

CLI を使用して API を有効にする手順は次のとおりです。

  1. Apigee の管理に使用しているデバイスでターミナル ウィンドウを開きます。
  2. 次のコマンドを実行して、ローカルシェルに gcloud がインストールされていることを確認します。gcloud ツールは、Cloud の主要なコマンドライン インターフェースを提供します。
    gcloud -h

    gcloud がインストールされていない場合は、Cloud SDK をインストールします。

  3. PROJECT_ID 変数が、ステップ 2: Google Cloud プロジェクトを作成するで作成したプロジェクトの ID で定義されていることを確認します。
    echo $PROJECT_ID

    定義されていない場合は、次のコマンドを使用して PROJECT_ID 環境変数を定義します。

    export PROJECT_ID=your_project_id
    末尾にピリオドが付いたプロジェクト ID 名
  4. 目的のインストールのタブを選択すると、API を有効にするコマンドが表示されます。

    GKE

    Google Cloud(GKE)でクラスタを実行する場合は、次のコマンドを使用して API を有効にします。

    gcloud services enable \
        apigee.googleapis.com \
        apigeeconnect.googleapis.com \
        pubsub.googleapis.com \
        cloudresourcemanager.googleapis.com \
        compute.googleapis.com \
        container.googleapis.com --project $PROJECT_ID
    

    GKE On-Prem

    GKE On-Prem(Anthos)でクラスタを実行する場合は、次のコマンドを使用して API を有効にします。

    gcloud services enable \
        apigee.googleapis.com \
        apigeeconnect.googleapis.com \
        cloudresourcemanager.googleapis.com \
        pubsub.googleapis.com  --project $PROJECT_ID
    

    AKS

    Azure Kubernetes Service(AKS)でクラスタを実行する場合は、次のコマンドを使用して API を有効にします。

    gcloud services enable \
        apigee.googleapis.com \
        apigeeconnect.googleapis.com \
        pubsub.googleapis.com \
        cloudresourcemanager.googleapis.com  --project $PROJECT_ID
    

    GKE on AWS

    GKE on AWS でクラスタを実行する場合は、次のコマンドを使用して API を有効にします。

    gcloud services enable \
        apigee.googleapis.com \
        apigeeconnect.googleapis.com \
        pubsub.googleapis.com \
        cloudresourcemanager.googleapis.com  --project $PROJECT_ID
    

    EKS

    Amazon EKS でクラスタを実行する場合は、次のコマンドを使用して API を有効にします。

    gcloud services enable \
        apigee.googleapis.com \
        apigeeconnect.googleapis.com \
        pubsub.googleapis.com \
        cloudresourcemanager.googleapis.com  --project $PROJECT_ID
    
  5. 次のコマンドを使用して、すべての API が有効になっていることを確認します。
    gcloud services list

    次のコードが返されます。

    NAME                                 TITLE
    apigee.googleapis.com                Apigee API
    apigeeconnect.googleapis.com         Apigee Connect API
    bigquery.googleapis.com              BigQuery API
    bigquery.googleapis.com              BigQuery API
    bigquerystorage.googleapis.com       BigQuery Storage API
    cloudapis.googleapis.com             Google Cloud APIs
    clouddebugger.googleapis.com         Cloud Debugger API
    cloudresourcemanager.googleapis.com  Cloud Resource Manager API
    cloudtrace.googleapis.com            Cloud Trace API
    compute.googleapis.com               Compute Engine API
    container.googleapis.com             Kubernetes Engine API
    containeranalysis.googleapis.com     Container Analysis API
    containerregistry.googleapis.com     Container Registry API
    datastore.googleapis.com             Cloud Datastore API
    iam.googleapis.com                   Identity and Access Management (IAM) API
    iamcredentials.googleapis.com        IAM Service Account Credentials API
    logging.googleapis.com               Cloud Logging API
    monitoring.googleapis.com            Cloud Monitoring API
    oslogin.googleapis.com               Cloud OS Login API
    pubsub.googleapis.com                Cloud Pub/Sub API
    servicemanagement.googleapis.com     Service Management API
    serviceusage.googleapis.com          Service Usage API
    sql-component.googleapis.com         Cloud SQL
    storage-api.googleapis.com           Google Cloud Storage JSON API
    storage-component.googleapis.com     Cloud Storage

Google Cloud コンソールで API を有効にする方法については、Cloud ドキュメントの Google Cloud プロジェクトでの API の有効化をご覧ください。

次のステップ

1 2 3 (次)ステップ 4: 組織を作成する 5