Unterstützte Datenbank-Flags auflisten

In diesem Snippet wird gezeigt, wie Sie die Datenbank-Flags auflisten, die vom Dienst unterstützt werden. So können Sie herausfinden, welche Flags für die Konfiguration Ihrer Cluster verfügbar sind.

Codebeispiel

Node.js

Richten Sie die Standardanmeldedaten für Anwendungen ein, um sich bei AlloyDB zu authentifizieren. Weitere Informationen finden Sie unter Authentifizierung für eine lokale Entwicklungsumgebung einrichten.

/**
 * 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();

Nächste Schritte

Wenn Sie nach Codebeispielen für andere Produkte von Google Cloud suchen und filtern möchten, können Sie den Beispielbrowser fürGoogle Cloud verwenden.