summaryrefslogtreecommitdiffstats
path: root/ansible_collections/lowlydba/sqlserver/plugins/modules/resource_governor.py
blob: 66b789d22a6d3d6138c51bda1e45cc6f784288e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/python
# -*- coding: utf-8 -*-

# (c) 2022, John McCall (@lowlydba)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

DOCUMENTATION = r'''
---
module: resource_governor
short_description: Configures the resource governor on a SQL Server instance
description:
  - Enables or disables and optionally sets the classifier function for the resource governor feature.
version_added: 0.1.0
options:
  enabled:
    description:
      - Whether to enable or disable resource governor.
    type: bool
    required: false
    default: true
  classifier_function:
    description:
      - The name of the classifier function that resource governor will use. To clear the function, use the string C(NULL).
    type: str
    required: false
author: "John McCall (@lowlydba)"
requirements:
  - L(dbatools,https://www.powershellgallery.com/packages/dbatools/) PowerShell module
extends_documentation_fragment:
  - lowlydba.sqlserver.sql_credentials
  - lowlydba.sqlserver.attributes.check_mode
  - lowlydba.sqlserver.attributes.platform_all
'''

EXAMPLES = r'''
- name: Enable resource governor
  lowlydba.sqlserver.resource_governor:
    sql_instance: sql-01.myco.io
    enabled: true
'''

RETURN = r'''
data:
  description: Output from the C(Set-DbaResourceGovernor) function.
  returned: success, but not in check_mode.
  type: dict
'''