Skip to content

Commit ef55fe5

Browse files
authored
⭐ Add new field ms365.exchangeonline.hostedContentFilterPolicy (#6100)
* add hostedContentFilterPolicy * refactor * fixes
1 parent e6b53f0 commit ef55fe5

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

providers/ms365/resources/ms365.lr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,8 @@ ms365.exchangeonline {
14811481
malwareFilterPolicy() []dict
14821482
// List of hosted outbound spam filter policies
14831483
hostedOutboundSpamFilterPolicy() []dict
1484+
// List of hosted spam filter policies
1485+
hostedContentFilterPolicy() []dict
14841486
// Transport rules
14851487
transportRule() []dict
14861488
// List of remote domains

providers/ms365/resources/ms365.lr.go

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

providers/ms365/resources/ms365.lr.manifest.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,7 @@ resources:
905905
authenticationPolicy: {}
906906
dkimSigningConfig: {}
907907
externalInOutlook: {}
908+
hostedContentFilterPolicy: {}
908909
hostedOutboundSpamFilterPolicy: {}
909910
mailbox: {}
910911
mailboxAuditBypassAssociation: {}

providers/ms365/resources/ms365_exchange.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ $MailboxAuditBypassAssociation = (Get-MailboxAuditBypassAssociation -ResultSize
5555
5656
$MalwareFilterPolicy = (Get-MalwareFilterPolicy)
5757
$HostedOutboundSpamFilterPolicy = (Get-HostedOutboundSpamFilterPolicy)
58+
$HostedContentFilterPolicy = (Get-HostedContentFilterPolicy)
5859
$TransportRule = (Get-TransportRule)
5960
$RemoteDomain = (Get-RemoteDomain Default)
6061
$SafeLinksPolicy = (Get-SafeLinksPolicy)
@@ -79,6 +80,7 @@ $TransportConfig = (Get-TransportConfig)
7980
$exchangeOnline = New-Object PSObject
8081
Add-Member -InputObject $exchangeOnline -MemberType NoteProperty -Name MalwareFilterPolicy -Value @($MalwareFilterPolicy)
8182
Add-Member -InputObject $exchangeOnline -MemberType NoteProperty -Name HostedOutboundSpamFilterPolicy -Value @($HostedOutboundSpamFilterPolicy)
83+
Add-Member -InputObject $exchangeOnline -MemberType NoteProperty -Name HostedContentFilterPolicy -Value @($HostedContentFilterPolicy)
8284
Add-Member -InputObject $exchangeOnline -MemberType NoteProperty -Name TransportRule -Value @($TransportRule)
8385
Add-Member -InputObject $exchangeOnline -MemberType NoteProperty -Name RemoteDomain -Value @($RemoteDomain)
8486
Add-Member -InputObject $exchangeOnline -MemberType NoteProperty -Name SafeLinksPolicy -Value @($SafeLinksPolicy)
@@ -109,6 +111,7 @@ ConvertTo-Json -Depth 4 $exchangeOnline
109111
type ExchangeOnlineReport struct {
110112
MalwareFilterPolicy []any `json:"MalwareFilterPolicy"`
111113
HostedOutboundSpamFilterPolicy []any `json:"HostedOutboundSpamFilterPolicy"`
114+
HostedContentFilterPolicy []any `json:"HostedContentFilterPolicy"`
112115
TransportRule []any `json:"TransportRule"`
113116
RemoteDomain []any `json:"RemoteDomain"`
114117
SafeLinksPolicy []any `json:"SafeLinksPolicy"`
@@ -392,6 +395,9 @@ func (r *mqlMs365Exchangeonline) getExchangeReport() error {
392395
hostedOutboundSpamFilterPolicy, hostedOutboundSpamFilterPolicyErr := convert.JsonToDictSlice(report.HostedOutboundSpamFilterPolicy)
393396
r.HostedOutboundSpamFilterPolicy = plugin.TValue[[]any]{Data: hostedOutboundSpamFilterPolicy, State: plugin.StateIsSet, Error: hostedOutboundSpamFilterPolicyErr}
394397

398+
hostedContentFilterPolicy, hostedContentFilterPolicyErr := convert.JsonToDictSlice(report.HostedContentFilterPolicy)
399+
r.HostedContentFilterPolicy = plugin.TValue[[]any]{Data: hostedContentFilterPolicy, State: plugin.StateIsSet, Error: hostedContentFilterPolicyErr}
400+
395401
transportRule, transportRuleErr := convert.JsonToDictSlice(report.TransportRule)
396402
r.TransportRule = plugin.TValue[[]any]{Data: transportRule, State: plugin.StateIsSet, Error: transportRuleErr}
397403

@@ -524,6 +530,10 @@ func (r *mqlMs365Exchangeonline) hostedOutboundSpamFilterPolicy() ([]any, error)
524530
return nil, r.getExchangeReport()
525531
}
526532

533+
func (r *mqlMs365Exchangeonline) hostedContentFilterPolicy() ([]any, error) {
534+
return nil, r.getExchangeReport()
535+
}
536+
527537
func (r *mqlMs365Exchangeonline) transportRule() ([]any, error) {
528538
return nil, r.getExchangeReport()
529539
}

0 commit comments

Comments
 (0)