Class: Ansible::Ruby::Modules::Proxysql_query_rules

Inherits:
Base show all
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

Methods inherited from Base

#ansible_name, #to_h

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

#activeInteger?

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.

Returns:

  • (Integer, nil)

    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

#applyObject?

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.

Returns:

  • (Object, nil)

    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_ttlObject?

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.

Returns:

  • (Object, nil)

    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_addrObject?

Returns Match traffic from a specific source.

Returns:

  • (Object, nil)

    Match traffic from a specific source.



29
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 29

attribute :client_addr

#commentObject?

Returns Free form text field, usable for a descriptive comment of the query rule.

Returns:

  • (Object, nil)

    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

#delayObject?

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.

Returns:

  • (Object, nil)

    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_hostgroupInteger?

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)).

Returns:

  • (Integer, nil)

    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

#digestObject?

Returns Match queries with a specific digest, as returned by stats_mysql_query_digest.digest.

Returns:

  • (Object, nil)

    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_msgObject?

Returns Query will be blocked, and the specified error_msg will be returned to the client.

Returns:

  • (Object, nil)

    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

#flagINObject?

Returns Used in combination with I(flagOUT) and I(apply) to create chains of rules.

Returns:

  • (Object, nil)

    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

#flagOUTObject?

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.

Returns:

  • (Object, nil)

    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_deleteBoolean?

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).

Returns:

  • (Boolean, nil)

    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

#logObject?

Returns Query will be logged.

Returns:

  • (Object, nil)

    Query will be logged.



83
# File 'lib/ansible/ruby/modules/generated/database/proxysql/proxysql_query_rules.rb', line 83

attribute :log

#match_digestObject?

Returns Regular expression that matches the query digest. The dialect of regular expressions used is that of re2 - github.com/google/re2.

Returns:

  • (Object, nil)

    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_patternString?

Returns Regular expression that matches the query text. The dialect of regular expressions used is that of re2 - github.com/google/re2.

Returns:

  • (String, nil)

    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_flagOUTObject?

Returns Enables query mirroring. If set I(mirror_flagOUT) can be used to evaluates the mirrored query against the specified chain of rules.

Returns:

  • (Object, nil)

    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_hostgroupObject?

Returns Enables query mirroring. If set I(mirror_hostgroup) can be used to mirror queries to the same or different hostgroup.

Returns:

  • (Object, nil)

    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_patternObject?

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.

Returns:

  • (Object, nil)

    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_addrObject?

Returns Match incoming traffic on a specific local IP.

Returns:

  • (Object, nil)

    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_portObject?

Returns Match incoming traffic on a specific local port.

Returns:

  • (Object, nil)

    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_patternObject?

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.

Returns:

  • (Object, nil)

    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

#retriesInteger?

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.

Returns:

  • (Integer, nil)

    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_idObject?

Returns The unique id of the rule. Rules are processed in rule_id order.

Returns:

  • (Object, nil)

    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

#schemanameObject?

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.

Returns:

  • (Object, nil)

    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.

Returns:

  • (:present, :absent, nil)

    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

#timeoutObject?

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.

Returns:

  • (Object, nil)

    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

#usernameString?

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.

Returns:

  • (String, nil)

    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