SqlServerDsc.SqlAudit.dsc.adaptedResource.json

{
  "$schema": "https://aka.ms/dsc/schemas/v3/bundled/adaptedresource/manifest.json",
  "type": "SqlServerDsc/SqlAudit",
  "kind": "resource",
  "version": "17.6.0",
  "capabilities": [
    "get",
    "test",
    "set"
  ],
  "description": "The `SqlAudit` DSC resource is used to create, modify, or remove server audits.",
  "author": "DSC Community",
  "requireAdapter": "Microsoft.Adapter/PowerShell",
  "path": "SqlServerDsc.psd1",
  "schema": {
    "embedded": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "InstanceName": {
          "type": "string",
          "title": "InstanceName",
          "description": "The InstanceName property."
        },
        "ServerName": {
          "type": "string",
          "title": "ServerName",
          "description": "The ServerName property."
        },
        "Credential": {
          "type": "string",
          "title": "Credential",
          "description": "The Credential property."
        },
        "Protocol": {
          "type": "string",
          "enum": [
            "tcp",
            "np",
            "lpc"
          ],
          "title": "Protocol",
          "description": "The Protocol property."
        },
        "Port": {
          "type": "string",
          "title": "Port",
          "description": "The Port property."
        },
        "Reasons": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Reasons",
          "readOnly": true,
          "description": "The Reasons property."
        },
        "Name": {
          "type": "string",
          "title": "Name",
          "description": "The name of the audit."
        },
        "LogType": {
          "type": "string",
          "enum": [
            "SecurityLog",
            "ApplicationLog"
          ],
          "title": "LogType",
          "description": "Specifies the to which log an audit logs to. Mutually exclusive to parameter **Path**."
        },
        "Path": {
          "type": "string",
          "title": "Path",
          "description": "Specifies the destination path for a file audit. Mutually exclusive to parameter **LogType**."
        },
        "AuditFilter": {
          "type": "string",
          "title": "AuditFilter",
          "description": "The AuditFilter property."
        },
        "MaximumFiles": {
          "type": "string",
          "title": "MaximumFiles",
          "description": "Specifies the number of files on disk. Mutually exclusive to parameter **MaximumRolloverFiles**. Mutually exclusive to parameter **LogType**."
        },
        "MaximumFileSize": {
          "type": "string",
          "title": "MaximumFileSize",
          "description": "Specifies the maximum file size in units by parameter **MaximumFileSizeUnit**. If this is specified the parameter **MaximumFileSizeUnit** must also be specified. Mutually exclusive to parameter **LogType**. Minimum allowed value is 2 (MB). It also allowed to set the value to 0 which mean unlimited file size."
        },
        "MaximumFileSizeUnit": {
          "type": "string",
          "enum": [
            "Megabyte",
            "Gigabyte",
            "Terabyte"
          ],
          "title": "MaximumFileSizeUnit",
          "description": "Specifies the unit that is used for the file size. If this is specified the parameter **MaximumFileSize** must also be specified. Mutually exclusive to parameter **LogType**."
        },
        "MaximumRolloverFiles": {
          "type": "string",
          "title": "MaximumRolloverFiles",
          "description": "Specifies the amount of files on disk before SQL Server starts reusing the files. Mutually exclusive to parameter **MaximumFiles** and **LogType**."
        },
        "OnFailure": {
          "type": "string",
          "enum": [
            "Continue",
            "FailOperation",
            "Shutdown"
          ],
          "title": "OnFailure",
          "description": "Specifies what should happen when writing events to the store fails. This can be `Continue`, `FailOperation`, or `Shutdown`."
        },
        "QueueDelay": {
          "type": "string",
          "title": "QueueDelay",
          "description": "Specifies the maximum delay before a event is written to the store. When set to low this could impact server performance. When set to high events could be missing when a server crashes."
        },
        "AuditGuid": {
          "type": "string",
          "title": "AuditGuid",
          "pattern": "^[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$",
          "description": "The AuditGuid property."
        },
        "ReserveDiskSpace": {
          "type": "string",
          "title": "ReserveDiskSpace",
          "description": "Specifies if the needed file space should be reserved. only needed when writing to a file log. Mutually exclusive to parameter **LogType**."
        },
        "Enabled": {
          "type": "string",
          "title": "Enabled",
          "description": "Specifies if the audit should be enabled. Defaults to `$false`."
        },
        "Ensure": {
          "type": "string",
          "title": "Ensure",
          "description": "Specifies if the server audit should be present or absent. If set to `Present` the audit will be added if it does not exist, or updated if the audit exist. If `Absent` then the audit will be removed from the server. Defaults to `Present`."
        },
        "Force": {
          "type": "string",
          "title": "Force",
          "description": "Specifies if it is allowed to re-create the server audit if a current audit exist with the same name but of a different audit type. Defaults to `$false` not allowing server audits to be re-created."
        }
      },
      "description": "The `SqlAudit` DSC resource is used to create, modify, or remove server audits.",
      "additionalProperties": false,
      "required": [
        "InstanceName",
        "Name"
      ],
      "title": "SqlServerDsc/SqlAudit",
      "type": "object"
    }
  }
}