-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new types for Intune & directory namespace
- Loading branch information
Showing
32 changed files
with
385 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from office365.directory.permissions.identity import Identity | ||
|
||
|
||
class EmailIdentity(Identity): | ||
"""Represents the email identity of a user.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class AlertHistoryState(ClientValue): | ||
"""Stores changes made to alerts.""" |
16 changes: 16 additions & 0 deletions
16
office365/directory/security/attacksimulations/automation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
from office365.directory.permissions.email_identity import EmailIdentity | ||
from office365.directory.security.attacksimulations.automation_run import SimulationAutomationRun | ||
from office365.entity import Entity | ||
from office365.entity_collection import EntityCollection | ||
from office365.runtime.paths.resource_path import ResourcePath | ||
|
||
|
||
class SimulationAutomation(Entity): | ||
"""Represents simulation automation created to run on a tenant.""" | ||
|
||
@property | ||
def created_by(self): | ||
"""Identity of the user who created the attack simulation automation.""" | ||
return self.properties.get('createdBy', EmailIdentity()) | ||
|
||
@property | ||
def runs(self): | ||
"""A collection of simulation automation runs.""" | ||
return self.properties.get('runs', | ||
EntityCollection(self.context, SimulationAutomationRun, | ||
ResourcePath("runs", self.resource_path))) |
5 changes: 5 additions & 0 deletions
5
office365/directory/security/attacksimulations/automation_run.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from office365.entity import Entity | ||
|
||
|
||
class SimulationAutomationRun(Entity): | ||
"""Represents a run of an attack simulation automation on a tenant.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class AuditActor(ClientValue): | ||
"""A class containing the properties for Audit Actor.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,27 @@ | ||
from office365.entity import Entity | ||
from office365.entity_collection import EntityCollection | ||
from office365.runtime.client_result import ClientResult | ||
from office365.runtime.queries.function import FunctionQuery | ||
from office365.runtime.types.collections import StringCollection | ||
from office365.intune.audit.actor import AuditActor | ||
from office365.intune.audit.resource import AuditResource | ||
from office365.runtime.client_value_collection import ClientValueCollection | ||
|
||
|
||
class AuditEvent(Entity): | ||
"""A class containing the properties for Audit Event.""" | ||
|
||
|
||
class AuditEventCollection(EntityCollection): | ||
|
||
def __init__(self, context, resource_path=None): | ||
super(AuditEventCollection, self).__init__(context, AuditEvent, resource_path) | ||
|
||
def get_audit_categories(self): | ||
"""Not yet documented""" | ||
return_type = ClientResult(self.context, StringCollection()) | ||
qry = FunctionQuery(self, "getAuditCategories", None, return_type) | ||
self.context.add_query(qry) | ||
return return_type | ||
|
||
def get_audit_activity_types(self, category): | ||
"""Not yet documented""" | ||
return_type = ClientResult(self.context, StringCollection()) | ||
params = {"category": category} | ||
qry = FunctionQuery(self, "getAuditActivityTypes", params, return_type) | ||
self.context.add_query(qry) | ||
return return_type | ||
|
||
@property | ||
def activity(self): | ||
"""Friendly name of the activity. | ||
:rtype: str | ||
""" | ||
return self.properties.get("activity", None) | ||
|
||
@property | ||
def actor(self): | ||
""" | ||
AAD user and application that are associated with the audit event. | ||
""" | ||
return self.properties.get("actor", AuditActor()) | ||
|
||
@property | ||
def resources(self): | ||
"""Resources being modified""" | ||
return self.properties.get("resources", ClientValueCollection(AuditResource)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from office365.entity_collection import EntityCollection | ||
from office365.intune.audit.event import AuditEvent | ||
from office365.runtime.client_result import ClientResult | ||
from office365.runtime.queries.function import FunctionQuery | ||
from office365.runtime.types.collections import StringCollection | ||
|
||
|
||
class AuditEventCollection(EntityCollection): | ||
|
||
def __init__(self, context, resource_path=None): | ||
super(AuditEventCollection, self).__init__(context, AuditEvent, resource_path) | ||
|
||
def get_audit_categories(self): | ||
"""Not yet documented""" | ||
return_type = ClientResult(self.context, StringCollection()) | ||
qry = FunctionQuery(self, "getAuditCategories", None, return_type) | ||
self.context.add_query(qry) | ||
return return_type | ||
|
||
def get_audit_activity_types(self, category): | ||
"""Not yet documented""" | ||
return_type = ClientResult(self.context, StringCollection()) | ||
params = {"category": category} | ||
qry = FunctionQuery(self, "getAuditActivityTypes", params, return_type) | ||
self.context.add_query(qry) | ||
return return_type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class AuditProperty(ClientValue): | ||
"""A class containing the properties for Audit Property.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class AuditResource(ClientValue): | ||
"""A class containing the properties for Audit Resource.""" | ||
|
||
def __init__(self, audit_resource_type=None): | ||
""" | ||
:param str audit_resource_type: Audit resource's type. | ||
""" | ||
self.auditResourceType = audit_resource_type |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class DeviceManagementSettings(ClientValue): | ||
"""""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from office365.intune.organizations.branding_properties import OrganizationalBrandingProperties | ||
|
||
|
||
class OrganizationalBranding(OrganizationalBrandingProperties): | ||
""" | ||
Contains details about the organization's default branding. Inherits from organizationalBrandingProperties. | ||
Organizations can customize their Azure Active Directory (Azure AD) sign-in pages which appear when users sign | ||
in to their organization's tenant-specific apps, or when Azure AD identifies the user's tenant from their username. | ||
A developer can also read the company's branding information and customize their app experience to tailor | ||
it specifically for the signed-in user using their company's branding. | ||
You can't change your original configuration's language. However, companies can add different branding based on | ||
locale. For language-specific branding, see the organizationalBrandingLocalization object. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.