Service Client: Google::Cloud::Sql::V1::CloudSqlUsers::SqlUsersServiceClient

Client stub representing the remote SqlUsersService gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to sql.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Cloud::Sql::V1::CloudSqlUsers - Compiled Protocol Buffers messages for google/cloud/sql/v1/cloud_sql_users.proto

SYNOPSIS

use Google::Cloud::Sql::V1::CloudSqlUsers;

my $msg = Google::Cloud::Sql::V1::CloudSqlUsers::SqlUsersDeleteRequest->new({
    host => $host,
    instance => $instance,
    name => $name,
    project => $project,
});

# Read or update a field
my $val = $msg->host();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Sql::V1::CloudSqlUsers::SqlUsersDeleteRequest->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/sql/v1/cloud_sql_users.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Sql::V1::CloudSqlUsers::SqlUsersDeleteRequest

Inherits from Protobuf::Message.

Accessors

  • $msg->host() / $msg->host($value)

    Type: String

    Host of the user in the instance.

  • $msg->instance() / $msg->instance($value)

    Type: String

    Database instance ID. This does not include the project ID.

  • $msg->name() / $msg->name($value)

    Type: String

    Name of the user in the instance.

  • $msg->project() / $msg->project($value)

    Type: String

    Project ID of the project that contains the instance.

  • $msg->location() / $msg->location($value)

    Type: String

    Optional. Region of the Cloud SQL instance.

Google::Cloud::Sql::V1::CloudSqlUsers::SqlUsersGetRequest

Request message for Users Get RPC

Inherits from Protobuf::Message.

Accessors

  • $msg->instance() / $msg->instance($value)

    Type: String

    Database instance ID. This does not include the project ID.

  • $msg->name() / $msg->name($value)

    Type: String

    User of the instance.

  • $msg->project() / $msg->project($value)

    Type: String

    Project ID of the project that contains the instance.

  • $msg->host() / $msg->host($value)

    Type: String

    Host of a user of the instance.

  • $msg->location() / $msg->location($value)

    Type: String

    Optional. Region of the Cloud SQL instance.

Google::Cloud::Sql::V1::CloudSqlUsers::SqlUsersInsertRequest

Inherits from Protobuf::Message.

Accessors

  • $msg->instance() / $msg->instance($value)

    Type: String

    Database instance ID. This does not include the project ID.

  • $msg->project() / $msg->project($value)

    Type: String

    Project ID of the project that contains the instance.

  • $msg->body() / $msg->body($value)

    Type: Message (Google::Cloud::Sql::V1::CloudSqlUsers::User)

  • $msg->location() / $msg->location($value)

    Type: String

    Optional. Region of the Cloud SQL instance.

Google::Cloud::Sql::V1::CloudSqlUsers::SqlUsersListRequest

Inherits from Protobuf::Message.

Accessors

  • $msg->instance() / $msg->instance($value)

    Type: String

    Database instance ID. This does not include the project ID.

  • $msg->project() / $msg->project($value)

    Type: String

    Project ID of the project that contains the instance.

  • $msg->location() / $msg->location($value)

    Type: String

    Optional. Region of the Cloud SQL instance.

Google::Cloud::Sql::V1::CloudSqlUsers::SqlUsersUpdateRequest

Inherits from Protobuf::Message.

Accessors

  • $msg->host() / $msg->host($value)

    Type: String

    Optional. Host of the user in the instance.

  • $msg->instance() / $msg->instance($value)

    Type: String

    Database instance ID. This does not include the project ID.

  • $msg->name() / $msg->name($value)

    Type: String

    Name of the user in the instance.

  • $msg->project() / $msg->project($value)

    Type: String

    Project ID of the project that contains the instance.

  • $msg->database_roles() / $msg->database_roles($value)

    Type: String

    Optional. List of database roles to grant to the user. body.database_roles will be ignored for update request.

  • $msg->revoke_existing_roles() / $msg->revoke_existing_roles($value)

    Type: Bool

    Optional. Specifies whether to revoke existing roles that are not present in the `database_roles` field. If `false` or unset, the database roles specified in `database_roles` are added to the user's existing roles.

  • $msg->server_roles() / $msg->server_roles($value)

    Type: String

    Optional. The server roles to grant to the SQL Server login. Existing server roles will not be revoked if revoke_existing_roles is false. body.server_roles will be ignored for update request.

  • $msg->revoke_existing_server_roles() / $msg->revoke_existing_server_roles($value)

    Type: Bool

    Optional. Specifies whether to revoke existing roles that are not present in the `server_roles` field. If `false` or unset, the server roles specified in `server_roles` are added to the user's existing server roles.

  • $msg->body() / $msg->body($value)

    Type: Message (Google::Cloud::Sql::V1::CloudSqlUsers::User)

  • $msg->location() / $msg->location($value)

    Type: String

    Optional. Region of the Cloud SQL instance.

Google::Cloud::Sql::V1::CloudSqlUsers::UserPasswordValidationPolicy

User level password validation policy.

Inherits from Protobuf::Message.

Accessors

  • $msg->allowed_failed_attempts() / $msg->allowed_failed_attempts($value)

    Type: Int32

    Number of failed login attempts allowed before user get locked.

  • $msg->password_expiration_duration() / $msg->password_expiration_duration($value)

    Type: Message (Google::Protobuf::Duration::Duration)

    Expiration duration after password is updated.

  • $msg->enable_failed_attempts_check() / $msg->enable_failed_attempts_check($value)

    Type: Bool

    If true, failed login attempts check will be enabled.

  • $msg->status() / $msg->status($value)

    Type: Message (Google::Cloud::Sql::V1::CloudSqlUsers::PasswordStatus)

    Output only. Read-only password status.

  • $msg->enable_password_verification() / $msg->enable_password_verification($value)

    Type: Bool

    If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.

Google::Cloud::Sql::V1::CloudSqlUsers::PasswordStatus

Read-only password status.

Inherits from Protobuf::Message.

Accessors

  • $msg->locked() / $msg->locked($value)

    Type: Bool

    If true, user does not have login privileges.

  • $msg->password_expiration_time() / $msg->password_expiration_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    The expiration time of the current password.

Google::Cloud::Sql::V1::CloudSqlUsers::User

A Cloud SQL user resource.

Inherits from Protobuf::Message.

Accessors

  • $msg->kind() / $msg->kind($value)

    Type: String

    This is always `sql#user`.

  • $msg->password() / $msg->password($value)

    Type: String

    The password for the user.

  • $msg->etag() / $msg->etag($value)

    Type: String

    This field is deprecated and will be removed from a future version of the API.

  • $msg->name() / $msg->name($value)

    Type: String

    The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL.

  • $msg->host() / $msg->host($value)

    Type: String

    Optional. The host from which the user can connect. For `insert` operations, host defaults to an empty string. For `update` operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional.

  • $msg->instance() / $msg->instance($value)

    Type: String

    The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for `update` because it is already specified on the URL.

  • $msg->project() / $msg->project($value)

    Type: String

    The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for `update` because it is already specified on the URL.

  • $msg->type() / $msg->type($value)

    Type: Enum (Google::Cloud::Sql::V1::User::SqlUserType)

    The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.

  • $msg->sqlserver_user_details() / $msg->sqlserver_user_details($value)

    Type: Message (Google::Cloud::Sql::V1::CloudSqlUsers::SqlServerUserDetails)

  • $msg->iam_email() / $msg->iam_email($value)

    Type: String

    Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users.

  • $msg->password_policy() / $msg->password_policy($value)

    Type: Message (Google::Cloud::Sql::V1::CloudSqlUsers::UserPasswordValidationPolicy)

    User level password validation policy.

  • $msg->dual_password_type() / $msg->dual_password_type($value)

    Type: Enum (Google::Cloud::Sql::V1::User::DualPasswordType)

    Dual password status for the user.

  • $msg->iam_status() / $msg->iam_status($value)

    Type: Enum (Google::Cloud::Sql::V1::User::IamStatus)

    Indicates if a group is active or inactive for IAM database authentication.

  • $msg->database_roles() / $msg->database_roles($value)

    Type: String

    Optional. Role memberships of the user

  • $msg->server_roles() / $msg->server_roles($value)

    Type: String

    Optional. The server roles for the SQL Server login.

Enum: User::SqlUserType

  • BUILT_IN => 0

  • CLOUD_IAM_USER => 1

  • CLOUD_IAM_SERVICE_ACCOUNT => 2

  • CLOUD_IAM_GROUP => 3

  • CLOUD_IAM_GROUP_USER => 4

  • CLOUD_IAM_GROUP_SERVICE_ACCOUNT => 5

  • CLOUD_IAM_WORKFORCE_IDENTITY => 6

  • ENTRAID_USER => 7

  • ACTIVE_DIRECTORY_USER => 8

Enum: User::DualPasswordType

  • DUAL_PASSWORD_TYPE_UNSPECIFIED => 0

  • NO_MODIFY_DUAL_PASSWORD => 1

  • NO_DUAL_PASSWORD => 2

  • DUAL_PASSWORD => 3

Enum: User::IamStatus

  • IAM_STATUS_UNSPECIFIED => 0

  • INACTIVE => 1

  • ACTIVE => 2

Google::Cloud::Sql::V1::CloudSqlUsers::SqlServerUserDetails

Represents a Sql Server user on the Cloud SQL instance.

Inherits from Protobuf::Message.

Accessors

  • $msg->disabled() / $msg->disabled($value)

    Type: Bool

    Indicates if the user has been disabled.

  • $msg->server_roles() / $msg->server_roles($value)

    Type: String

    Indicates the server roles for this user.

Google::Cloud::Sql::V1::CloudSqlUsers::UsersListResponse

User list response.

Inherits from Protobuf::Message.

Accessors

  • $msg->kind() / $msg->kind($value)

    Type: String

    This is always `sql#usersList`.

  • $msg->items() / $msg->items($value)

    Type: Message (Google::Cloud::Sql::V1::CloudSqlUsers::User)

    List of user resources in the instance.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    Unused.

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Sql::V1::CloudSqlUsers::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.