Class: Ansible::Ruby::Modules::Proxysql_query_rules
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Proxysql_query_rules
- Defined in:
- lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb
Overview
The M(proxysql_query_rules) module modifies query rules using the proxysql admin interface.
Instance Method Summary collapse
-
#active ⇒ Integer?
A rule with I(active) set to C(False) will be tracked in the database, but will be never loaded in the in-memory data structures.
-
#apply ⇒ Object?
Used in combination with I(flagIN) and I(flagOUT) to create chains of rules.
-
#cache_ttl ⇒ Object?
The number of milliseconds for which to cache the result of the query.
-
#client_addr ⇒ Object?
Match traffic from a specific source.
-
#comment ⇒ Object?
Free form text field, usable for a descriptive comment of the query rule.
-
#delay ⇒ Object?
Number of milliseconds to delay the execution of the query.
-
#destination_hostgroup ⇒ Integer?
Route matched queries to this hostgroup.
-
#digest ⇒ Object?
Match queries with a specific digest, as returned by stats_mysql_query_digest.digest.
-
#error_msg ⇒ Object?
Query will be blocked, and the specified error_msg will be returned to the client.
-
#flagIN ⇒ Object?
Used in combination with I(flagOUT) and I(apply) to create chains of rules.
-
#flagOUT ⇒ Object?
Used in combination with I(flagIN) and apply to create chains of rules.
-
#force_delete ⇒ Boolean?
By default we avoid deleting more than one schedule in a single batch, however if you need this behaviour and you’re not concerned about the schedules deleted, you can set I(force_delete) to C(True).
-
#log ⇒ Object?
Query will be logged.
-
#match_digest ⇒ Object?
Regular expression that matches the query digest.
-
#match_pattern ⇒ String?
Regular expression that matches the query text.
-
#mirror_flagOUT ⇒ Object?
Enables query mirroring.
-
#mirror_hostgroup ⇒ Object?
Enables query mirroring.
-
#negate_match_pattern ⇒ Object?
If I(negate_match_pattern) is set to C(True), only queries not matching the query text will be considered as a match.
-
#proxy_addr ⇒ Object?
Match incoming traffic on a specific local IP.
-
#proxy_port ⇒ Object?
Match incoming traffic on a specific local port.
-
#replace_pattern ⇒ Object?
This is the pattern with which to replace the matched pattern.
-
#retries ⇒ Integer?
The maximum number of times a query needs to be re-executed in case of detected failure during the execution of the query.
-
#rule_id ⇒ Object?
The unique id of the rule.
-
#schemaname ⇒ Object?
Filtering criteria matching schemaname.
-
#state ⇒ :present, ...
When C(present) - adds the rule, when C(absent) - removes the rule.
-
#timeout ⇒ Object?
The maximum timeout in milliseconds with which the matched or rewritten query should be executed.
-
#username ⇒ String?
Filtering criteria matching username.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#active ⇒ Integer?
Returns A rule with I(active) set to C(False) will be tracked in the database, but will be never loaded in the in-memory data structures.
15 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 15 attribute :active |
#apply ⇒ Object?
Returns Used in combination with I(flagIN) and I(flagOUT) to create chains of rules. Setting apply to True signifies the last rule to be applied.
86 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 86 attribute :apply |
#cache_ttl ⇒ Object?
Returns The number of milliseconds for which to cache the result of the query. Note in ProxySQL 1.1 I(cache_ttl) was in seconds.
61 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 61 attribute :cache_ttl |
#client_addr ⇒ Object?
Returns Match traffic from a specific source.
29 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 29 attribute :client_addr |
#comment ⇒ Object?
Returns Free form text field, usable for a descriptive comment of the query rule.
89 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 89 attribute :comment |
#delay ⇒ Object?
Returns Number of milliseconds to delay the execution of the query. This is essentially a throttling mechanism and QoS, and allows a way to give priority to queries over others. This value is added to the mysql-default_query_delay global variable that applies to all queries.
71 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 71 attribute :delay |
#destination_hostgroup ⇒ Integer?
Returns Route matched queries to this hostgroup. This happens unless there is a started transaction and the logged in user has I(transaction_persistent) set to C(True) (see M(proxysql_mysql_users)).
57 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 57 attribute :destination_hostgroup |
#digest ⇒ Object?
Returns Match queries with a specific digest, as returned by stats_mysql_query_digest.digest.
38 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 38 attribute :digest |
#error_msg ⇒ Object?
Returns Query will be blocked, and the specified error_msg will be returned to the client.
80 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 80 attribute :error_msg |
#flagIN ⇒ Object?
Returns Used in combination with I(flagOUT) and I(apply) to create chains of rules.
26 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 26 attribute :flagIN |
#flagOUT ⇒ Object?
Returns Used in combination with I(flagIN) and apply to create chains of rules. When set, I(flagOUT) signifies the I(flagIN) to be used in the next chain of rules.
51 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 51 attribute :flagOUT |
#force_delete ⇒ Boolean?
Returns By default we avoid deleting more than one schedule in a single batch, however if you need this behaviour and you’re not concerned about the schedules deleted, you can set I(force_delete) to C(True).
96 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 96 attribute :force_delete |
#log ⇒ Object?
Returns Query will be logged.
83 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 83 attribute :log |
#match_digest ⇒ Object?
Returns Regular expression that matches the query digest. The dialect of regular expressions used is that of re2 - github.com/google/re2.
41 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 41 attribute :match_digest |
#match_pattern ⇒ String?
Returns Regular expression that matches the query text. The dialect of regular expressions used is that of re2 - github.com/google/re2.
44 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 44 attribute :match_pattern |
#mirror_flagOUT ⇒ Object?
Returns Enables query mirroring. If set I(mirror_flagOUT) can be used to evaluates the mirrored query against the specified chain of rules.
74 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 74 attribute :mirror_flagOUT |
#mirror_hostgroup ⇒ Object?
Returns Enables query mirroring. If set I(mirror_hostgroup) can be used to mirror queries to the same or different hostgroup.
77 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 77 attribute :mirror_hostgroup |
#negate_match_pattern ⇒ Object?
Returns If I(negate_match_pattern) is set to C(True), only queries not matching the query text will be considered as a match. This acts as a NOT operator in front of the regular expression matching against match_pattern.
48 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 48 attribute :negate_match_pattern |
#proxy_addr ⇒ Object?
Returns Match incoming traffic on a specific local IP.
32 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 32 attribute :proxy_addr |
#proxy_port ⇒ Object?
Returns Match incoming traffic on a specific local port.
35 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 35 attribute :proxy_port |
#replace_pattern ⇒ Object?
Returns This is the pattern with which to replace the matched pattern. Note that this is optional, and when omitted, the query processor will only cache, route, or set other parameters without rewriting.
54 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 54 attribute :replace_pattern |
#retries ⇒ Integer?
Returns The maximum number of times a query needs to be re-executed in case of detected failure during the execution of the query. If retries is not specified, the global variable mysql-query_retries_on_failure applies.
67 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 67 attribute :retries |
#rule_id ⇒ Object?
Returns The unique id of the rule. Rules are processed in rule_id order.
12 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 12 attribute :rule_id |
#schemaname ⇒ Object?
Returns Filtering criteria matching schemaname. If I(schemaname) is non-NULL, a query will match only if the connection uses schemaname as its default schema.
23 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 23 attribute :schemaname |
#state ⇒ :present, ...
Returns When C(present) - adds the rule, when C(absent) - removes the rule.
92 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 92 attribute :state |
#timeout ⇒ Object?
Returns The maximum timeout in milliseconds with which the matched or rewritten query should be executed. If a query run for longer than the specific threshold, the query is automatically killed. If timeout is not specified, the global variable mysql-default_query_timeout applies.
64 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 64 attribute :timeout |
#username ⇒ String?
Returns Filtering criteria matching username. If I(username) is non-NULL, a query will match only if the connection is made with the correct username.
19 |
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 19 attribute :username |