Class: Google::Apis::SqladminV1::ExecuteSqlPayload

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

The request payload used to execute SQL statements.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ExecuteSqlPayload

Returns a new instance of ExecuteSqlPayload.



1960
1961
1962
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1960

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

Instance Attribute Details

#applicationString

Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters. Corresponds to the JSON property application

Returns:

  • (String)


1909
1910
1911
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1909

def application
  @application
end

#auto_iam_authnBoolean Also known as: auto_iam_authn?

Optional. When set to true, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database. Corresponds to the JSON property autoIamAuthn

Returns:

  • (Boolean)


1916
1917
1918
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1916

def auto_iam_authn
  @auto_iam_authn
end

#databaseString

Optional. Name of the database on which the statement will be executed. Corresponds to the JSON property database

Returns:

  • (String)


1922
1923
1924
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1922

def database
  @database
end

#partial_result_modeString

Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error. Corresponds to the JSON property partialResultMode

Returns:

  • (String)


1929
1930
1931
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1929

def partial_result_mode
  @partial_result_mode
end

#password_secret_versionString

Optional. The resource name of the Secret Manager secret holding the password for the user to log into the database. The secret should be created using the regional endpoint (for API) or from the Regional Secrets page (for UI), and stored in the same region as the Cloud SQL instance. The expected resource name format is projects/project/locations/location/secrets/secret/ versions/secret_version`. Used together with theuserfield. The secret resource name will not be stored. Corresponds to the JSON propertypasswordSecretVersion`

Returns:

  • (String)


1940
1941
1942
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1940

def password_secret_version
  @password_secret_version
end

#row_limitFixnum

Optional. The maximum number of rows returned per SQL statement. Corresponds to the JSON property rowLimit

Returns:

  • (Fixnum)


1945
1946
1947
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1945

def row_limit
  @row_limit
end

#sql_statementString

Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons. Corresponds to the JSON property sqlStatement

Returns:

  • (String)


1951
1952
1953
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1951

def sql_statement
  @sql_statement
end

#userString

Optional. The name of an existing database user to connect to the database. When auto_iam_authn is set to true, this field is ignored and the API caller' s IAM user is used. Corresponds to the JSON property user

Returns:

  • (String)


1958
1959
1960
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1958

def user
  @user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1965

def update!(**args)
  @application = args[:application] if args.key?(:application)
  @auto_iam_authn = args[:auto_iam_authn] if args.key?(:auto_iam_authn)
  @database = args[:database] if args.key?(:database)
  @partial_result_mode = args[:partial_result_mode] if args.key?(:partial_result_mode)
  @password_secret_version = args[:password_secret_version] if args.key?(:password_secret_version)
  @row_limit = args[:row_limit] if args.key?(:row_limit)
  @sql_statement = args[:sql_statement] if args.key?(:sql_statement)
  @user = args[:user] if args.key?(:user)
end