Skip to content

Commit 5a6fae6

Browse files
committed
chore: fix dynatrace_disk_edge_anomaly_detectors documentation
The description of some fields escaped their indentation, which incorrectly showed them as other required/optional fields instead of being a sub-bullet point list of the current field.
1 parent 1045ed2 commit 5a6fae6

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

dynatrace/api/builtin/infrastructure/diskedge/anomalydetectors/settings/alert.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type Alert struct {
5555
ThresholdMilliseconds *float64 `json:"thresholdMilliseconds,omitempty"`
5656
ThresholdNumber *float64 `json:"thresholdNumber,omitempty"`
5757
ThresholdPercent *float64 `json:"thresholdPercent,omitempty"`
58-
Trigger Trigger `json:"trigger"` // Possible Values: `AVAILABLE_DISK_SPACE_MEBIBYTES_BELOW`, `AVAILABLE_DISK_SPACE_PERCENT_BELOW`, `AVAILABLE_INODES_NUMBER_BELOW`, `AVAILABLE_INODES_PERCENT_BELOW`, `READ_ONLY_FILE_SYSTEM`, `READ_TIME_EXCEEDING`, `WRITE_TIME_EXCEEDING`
58+
Trigger Trigger `json:"trigger"` // Possible values: `AVAILABLE_DISK_SPACE_MEBIBYTES_BELOW`, `AVAILABLE_DISK_SPACE_PERCENT_BELOW`, `AVAILABLE_INODES_NUMBER_BELOW`, `AVAILABLE_INODES_PERCENT_BELOW`, `READ_ONLY_FILE_SYSTEM`, `READ_TIME_EXCEEDING`, `WRITE_TIME_EXCEEDING`
5959
}
6060

6161
func (me *Alert) Schema() map[string]*schema.Schema {
@@ -98,7 +98,7 @@ func (me *Alert) Schema() map[string]*schema.Schema {
9898
},
9999
"trigger": {
100100
Type: schema.TypeString,
101-
Description: "Possible Values: `AVAILABLE_DISK_SPACE_MEBIBYTES_BELOW`, `AVAILABLE_DISK_SPACE_PERCENT_BELOW`, `AVAILABLE_INODES_NUMBER_BELOW`, `AVAILABLE_INODES_PERCENT_BELOW`, `READ_ONLY_FILE_SYSTEM`, `READ_TIME_EXCEEDING`, `WRITE_TIME_EXCEEDING`",
101+
Description: "Possible values: `AVAILABLE_DISK_SPACE_MEBIBYTES_BELOW`, `AVAILABLE_DISK_SPACE_PERCENT_BELOW`, `AVAILABLE_INODES_NUMBER_BELOW`, `AVAILABLE_INODES_PERCENT_BELOW`, `READ_ONLY_FILE_SYSTEM`, `READ_TIME_EXCEEDING`, `WRITE_TIME_EXCEEDING`",
102102
Required: true,
103103
},
104104
}

dynatrace/api/builtin/infrastructure/diskedge/anomalydetectors/settings/host_metadata_condition.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ import (
2323
)
2424

2525
type HostMetadataCondition struct {
26-
KeyMustExist bool `json:"keyMustExist"` // When enabled, the condition requires a metadata key to exist and match the constraints; when disabled, the key is optional but must still match the constrains if it is present.
27-
MetadataCondition string `json:"metadataCondition"` // This string has to match a required format.\n\n- `$contains(production)` – Matches if `production` appears anywhere in the host metadata value.\n- `$eq(production)` – Matches if `production` matches the host metadata value exactly.\n- `$prefix(production)` – Matches if `production` matches the prefix of the host metadata value.\n- `$suffix(production)` – Matches if `production` matches the suffix of the host metadata value.\n\nAvailable logic operations:\n- `$not($eq(production))` – Matches if the host metadata value is different from `production`.\n- `$and($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` and ends with `main`.\n- `$or($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` or ends with `main`.\n\nBrackets **(** and **)** that are part of the matched property **must be escaped with a tilde (~)**
26+
KeyMustExist bool `json:"keyMustExist"` // When enabled, the condition requires a resource attribute to exist and match the constraints; when disabled, the key is optional but must still match the constrains if it is present.
27+
MetadataCondition string `json:"metadataCondition"` // This string has to match a required format.\n\n - `$match(ver*_1.2.?)` – Matches string with wildcards: `*` any number (including zero) of characters and `?` exactly one character.\n - `$contains(production)` – Matches if `production` appears anywhere in the host metadata value.\n - `$eq(production)` – Matches if `production` matches the host metadata value exactly.\n - `$prefix(production)` – Matches if `production` matches the prefix of the host metadata value.\n - `$suffix(production)` – Matches if `production` matches the suffix of the host metadata value.\n\n Available logic operations:\n - `$not($eq(production))` – Matches if the host metadata value is different from `production`.\n - `$and($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` and ends with `main`.\n - `$or($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` or ends with `main`.\n\n Brackets **(** and **)** that are part of the matched property **must be escaped with a tilde (~)**
2828
MetadataKey string `json:"metadataKey"` // Key
2929
}
3030

3131
func (me *HostMetadataCondition) Schema() map[string]*schema.Schema {
3232
return map[string]*schema.Schema{
3333
"key_must_exist": {
3434
Type: schema.TypeBool,
35-
Description: "When enabled, the condition requires a metadata key to exist and match the constraints; when disabled, the key is optional but must still match the constrains if it is present.",
35+
Description: "When enabled, the condition requires a resource attribute to exist and match the constraints; when disabled, the key is optional but must still match the constrains if it is present.",
3636
Optional: true,
3737
Default: true,
3838
},
3939
"metadata_condition": {
4040
Type: schema.TypeString,
41-
Description: "This string has to match a required format.\n\n- `$contains(production)` – Matches if `production` appears anywhere in the host metadata value.\n- `$eq(production)` – Matches if `production` matches the host metadata value exactly.\n- `$prefix(production)` – Matches if `production` matches the prefix of the host metadata value.\n- `$suffix(production)` – Matches if `production` matches the suffix of the host metadata value.\n\nAvailable logic operations:\n- `$not($eq(production))` – Matches if the host metadata value is different from `production`.\n- `$and($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` and ends with `main`.\n- `$or($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` or ends with `main`.\n\nBrackets **(** and **)** that are part of the matched property **must be escaped with a tilde (~)**",
41+
Description: "This string has to match a required format.\n\n - `$match(ver*_1.2.?)` – Matches string with wildcards: `*` any number (including zero) of characters and `?` exactly one character.\n - `$contains(production)` – Matches if `production` appears anywhere in the host metadata value.\n - `$eq(production)` – Matches if `production` matches the host metadata value exactly.\n - `$prefix(production)` – Matches if `production` matches the prefix of the host metadata value.\n - `$suffix(production)` – Matches if `production` matches the suffix of the host metadata value.\n\n Available logic operations:\n - `$not($eq(production))` – Matches if the host metadata value is different from `production`.\n - `$and($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` and ends with `main`.\n - `$or($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` or ends with `main`.\n\n Brackets **(** and **)** that are part of the matched property **must be escaped with a tilde (~)**",
4242
Required: true,
4343
},
4444
"metadata_key": {

dynatrace/api/builtin/infrastructure/diskedge/anomalydetectors/settings/settings.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ type Settings struct {
2727
DiskNameFilters []string `json:"diskNameFilters,omitempty"` // Disk will be included in this policy if **any** of the filters match
2828
Enabled bool `json:"enabled"` // This setting is enabled (`true`) or disabled (`false`)
2929
EventProperties MetadataItems `json:"eventProperties,omitempty"` // Set of additional key-value properties to be attached to the triggered event. You can retrieve the available property keys using the [Events API v2](https://dt-url.net/9622g1w). Additionally any Host resource attribute can be dynamically substituted (agent 1.325+)
30-
HostMetadataConditions HostMetadataConditionTypes `json:"hostMetadataConditions,omitempty"` // The policy will be enabled if **all** conditions are met
31-
OperatingSystem []EoperatingSystem `json:"operatingSystem,omitempty"` // Select the operating systems on which policy should be applied
30+
HostMetadataConditions HostMetadataConditionTypes `json:"hostMetadataConditions,omitempty"` // Host resource attributes are dimensions enriching the host including custom metadata which are user-defined key-value pairs that you can assign to hosts monitored by Dynatrace.\n\n By defining custom metadata, you can enrich the monitoring data with context specific to your organization's needs, such as environment names, team ownership, application versions, or any other relevant details.\n\n See [Define tags and metadata for hosts](https://dt-url.net/w3hv0kbw).\n\n Note: Starting from version 1.325 host resource attributes are supported in addition to host custom metadata.
31+
OperatingSystem []EoperatingSystem `json:"operatingSystem,omitempty"` // Select the operating systems on which policy should be applied. Possible values: `AIX`, `LINUX`, `WINDOWS`
3232
PolicyName string `json:"policyName"` // Policy name
3333
Scope *string `json:"-" scope:"scope"` // The scope of this setting (HOST, HOST_GROUP). Omit this property if you want to cover the whole environment.
3434
InsertAfter string `json:"-"`
@@ -72,15 +72,15 @@ func (me *Settings) Schema() map[string]*schema.Schema {
7272
},
7373
"host_metadata_conditions": {
7474
Type: schema.TypeList,
75-
Description: "The policy will be enabled if **all** conditions are met",
75+
Description: "Host resource attributes are dimensions enriching the host including custom metadata which are user-defined key-value pairs that you can assign to hosts monitored by Dynatrace.\n\n By defining custom metadata, you can enrich the monitoring data with context specific to your organization's needs, such as environment names, team ownership, application versions, or any other relevant details.\n\n See [Define tags and metadata for hosts](https://dt-url.net/w3hv0kbw).\n\n Note: Starting from version 1.325 host resource attributes are supported in addition to host custom metadata.",
7676
Optional: true, // minobjects == 0
7777
Elem: &schema.Resource{Schema: new(HostMetadataConditionTypes).Schema()},
7878
MinItems: 1,
7979
MaxItems: 1,
8080
},
8181
"operating_system": {
8282
Type: schema.TypeSet,
83-
Description: "Select the operating systems on which policy should be applied",
83+
Description: "Select the operating systems on which policy should be applied. Possible values: `AIX`, `LINUX`, `WINDOWS`",
8484
Optional: true, // minobjects == 0
8585
Elem: &schema.Schema{Type: schema.TypeString},
8686
},

0 commit comments

Comments
 (0)