Class: Google::Apis::SqladminV1::User

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/sqladmin_v1/classes.rb,
lib/google/apis/sqladmin_v1/representations.rb,
lib/google/apis/sqladmin_v1/representations.rb

Overview

A Cloud SQL user resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ User

Returns a new instance of User.



6456
6457
6458
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6456

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#database_rolesArray<String>

Optional. Role memberships of the user Corresponds to the JSON property databaseRoles

Returns:

  • (Array<String>)


6379
6380
6381
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6379

def database_roles
  @database_roles
end

#dual_password_typeString

Dual password status for the user. Corresponds to the JSON property dualPasswordType

Returns:

  • (String)


6384
6385
6386
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6384

def dual_password_type
  @dual_password_type
end

#etagString

This field is deprecated and will be removed from a future version of the API. Corresponds to the JSON property etag

Returns:

  • (String)


6389
6390
6391
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6389

def etag
  @etag
end

#hostString

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. Corresponds to the JSON property host

Returns:

  • (String)


6398
6399
6400
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6398

def host
  @host
end

#iam_emailString

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

Returns:

  • (String)


6404
6405
6406
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6404

def iam_email
  @iam_email
end

#iam_statusString

Indicates if a group is active or inactive for IAM database authentication. Corresponds to the JSON property iamStatus

Returns:

  • (String)


6409
6410
6411
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6409

def iam_status
  @iam_status
end

#instanceString

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. Corresponds to the JSON property instance

Returns:

  • (String)


6415
6416
6417
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6415

def instance
  @instance
end

#kindString

This is always sql#user. Corresponds to the JSON property kind

Returns:

  • (String)


6420
6421
6422
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6420

def kind
  @kind
end

#nameString

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

Returns:

  • (String)


6426
6427
6428
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6426

def name
  @name
end

#passwordString

The password for the user. Corresponds to the JSON property password

Returns:

  • (String)


6431
6432
6433
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6431

def password
  @password
end

#password_policyGoogle::Apis::SqladminV1::UserPasswordValidationPolicy

User level password validation policy. Corresponds to the JSON property passwordPolicy



6436
6437
6438
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6436

def password_policy
  @password_policy
end

#projectString

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. Corresponds to the JSON property project

Returns:

  • (String)


6443
6444
6445
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6443

def project
  @project
end

#sqlserver_user_detailsGoogle::Apis::SqladminV1::SqlServerUserDetails

Represents a Sql Server user on the Cloud SQL instance. Corresponds to the JSON property sqlserverUserDetails



6448
6449
6450
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6448

def sqlserver_user_details
  @sqlserver_user_details
end

#typeString

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

Returns:

  • (String)


6454
6455
6456
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6454

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 6461

def update!(**args)
  @database_roles = args[:database_roles] if args.key?(:database_roles)
  @dual_password_type = args[:dual_password_type] if args.key?(:dual_password_type)
  @etag = args[:etag] if args.key?(:etag)
  @host = args[:host] if args.key?(:host)
  @iam_email = args[:iam_email] if args.key?(:iam_email)
  @iam_status = args[:iam_status] if args.key?(:iam_status)
  @instance = args[:instance] if args.key?(:instance)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @password = args[:password] if args.key?(:password)
  @password_policy = args[:password_policy] if args.key?(:password_policy)
  @project = args[:project] if args.key?(:project)
  @sqlserver_user_details = args[:sqlserver_user_details] if args.key?(:sqlserver_user_details)
  @type = args[:type] if args.key?(:type)
end