サポートされているデータベース フラグを一覧表示する

このスニペットは、サービスでサポートされているデータベース フラグを一覧表示する方法を示しています。これを使用して、クラスタで構成できるフラグを確認できます。

コードサンプル

Node.js

AlloyDB に対する認証を行うには、アプリケーションのデフォルト認証情報を設定します。 詳細については、 ローカル開発環境の認証の設定をご覧ください。

/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. The name of the parent resource. The required format is:
 *   * projects/{project}/locations/{location}
 *  Regardless of the parent specified here, as long it is contains a valid
 *  project and location, the service will return a static list of supported
 *  flags resources. Note that we do not yet support region-specific
 *  flags.
 */
// const parent = 'abc123'
/**
 *  Requested page size. Server may return fewer items than requested.
 *  If unspecified, server will pick an appropriate default.
 */
// const pageSize = 1234
/**
 *  A token identifying a page of results the server should return.
 */
// const pageToken = 'abc123'

// Imports the Alloydb library
const {AlloyDBAdminClient} = require('@google-cloud/alloydb').v1alpha;

// Instantiates a client
const alloydbClient = new AlloyDBAdminClient();

async function callListSupportedDatabaseFlags() {
  // Construct request
  const request = {
    parent,
  };

  // Run request
  const iterable =
    await alloydbClient.listSupportedDatabaseFlagsAsync(request);
  for await (const response of iterable) {
    console.log(response);
  }
}

callListSupportedDatabaseFlags();

次のステップ

他の Google Cloud プロダクトのコードサンプルを検索およびフィルタするには、Google Cloud サンプル ブラウザをご覧ください。