diff --git a/.changelog/1463.txt b/.changelog/1463.txt new file mode 100644 index 000000000000..a6b8e2e2d6ce --- /dev/null +++ b/.changelog/1463.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +teams_rules: Added support for notification settings in a gateway rule +``` \ No newline at end of file diff --git a/teams_rules.go b/teams_rules.go index f179e81c61b4..cb27a4302f94 100644 --- a/teams_rules.go +++ b/teams_rules.go @@ -63,6 +63,8 @@ type TeamsRuleSettings struct { // Resolver policy settings. DnsResolverSettings *TeamsDnsResolverSettings `json:"dns_resolvers,omitempty"` + + NotificationSettings *TeamsNotificationSettings `json:"notification_settings"` } type TeamsGatewayUntrustedCertAction string @@ -77,6 +79,12 @@ type UntrustedCertSettings struct { Action TeamsGatewayUntrustedCertAction `json:"action"` } +type TeamsNotificationSettings struct { + Enabled bool `json:"enabled"` + Message string `json:"msg"` + SupportURL string `json:"support_url"` +} + type AuditSSHRuleSettings struct { CommandLogging bool `json:"command_logging"` } diff --git a/teams_rules_test.go b/teams_rules_test.go index 5fe9ac6c55bc..9474ba4a1236 100644 --- a/teams_rules_test.go +++ b/teams_rules_test.go @@ -66,6 +66,11 @@ func TestTeamsRules(t *testing.T) { "ipv6": [ {"ip": "2460::1"} ] + }, + "notification_settings": { + "enabled": true, + "msg": "message", + "support_url": "https://hello.com" } } }, @@ -161,6 +166,11 @@ func TestTeamsRules(t *testing.T) { }, }, }, + NotificationSettings: &TeamsNotificationSettings{ + Enabled: true, + Message: "message", + SupportURL: "https://hello.com", + }, }, CreatedAt: &createdAt, UpdatedAt: &updatedAt,