list method

Future<FlagsListResponse> list({
  1. String? databaseVersion,
  2. String? flagScope,
  3. String? $fields,
})

Lists all available database flags for Cloud SQL instances.

Request parameters:

databaseVersion - Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions.

flagScope - Optional. Specify the scope of flags to be returned by SqlFlagsListService. Return list of database flags if unspecified. Possible string values are:

  • "SQL_FLAG_SCOPE_UNSPECIFIED" : Assume database flags if unspecified
  • "SQL_FLAG_SCOPE_DATABASE" : database flags
  • "SQL_FLAG_SCOPE_CONNECTION_POOL" : connection pool configuration flags

$fields - Selector specifying which fields to include in a partial response.

Completes with a FlagsListResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<FlagsListResponse> list({
  core.String? databaseVersion,
  core.String? flagScope,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'databaseVersion': ?databaseVersion == null ? null : [databaseVersion],
    'flagScope': ?flagScope == null ? null : [flagScope],
    'fields': ?$fields == null ? null : [$fields],
  };

  const url_ = 'v1/flags';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return FlagsListResponse.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}