列出支持的数据库标志

此代码段展示了如何列出服务支持的数据库标志。您可以使用此代码段了解哪些标志可用于在集群上进行配置。

代码示例

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 示例浏览器