Functions/Get-RSCEvents/Get-RSCEventObjectTypes.ps1
################################################ # Function - Get-RSCEventObjectTypes - Getting all object types usable on the Events API in RSC ################################################ Function Get-RSCEventObjectTypes { <# .SYNOPSIS A Rubrik Security Cloud (RSC) Reporting Module Function returning a list of all valid ObjectTypes for filtering Get-RSCEvent and Write-RSCEvent functions. .DESCRIPTION Uses a static list, periodically updated, for the latest event object types required for event filtering to reduce query times (as it's a pre-filter). .LINK GraphQL schema reference: https://rubrikinc.github.io/rubrik-api-documentation/schema/reference .OUTPUTS Returns an array of all the available information on the GraphQL endpoint in a uniform and usable format. .EXAMPLE Get-RSCEventObjectTypes .NOTES Author: Joshua Stenhouse Date: 05/11/2023 #> # Static array of object types last updated 05/25/23 $EventObjectTypes = "UNKNOWN_EVENT_OBJECT_TYPE, RUBRIK_SAAS_ACCOUNT, APP_BLUEPRINT, APP_FLOWS, OBJECT_TYPE_AUTH_DOMAIN, AWS_ACCOUNT, AWS_EVENT_TYPE, AZURE_NATIVE_SUBSCRIPTION, AZURE_NATIVE_VM, AZURE_NATIVE_DISK, AZURE_SQL_DATABASE, AZURE_SQL_MANAGED_INSTANCE, AZURE_SQL_DATABASE_SERVER, AZURE_SQL_MANAGED_INSTANCE_DATABASE, CAPACITY_BUNDLE, OBJECT_TYPE_CLOUD_NATIVE_VIRTUAL_MACHINE, OBJECT_TYPE_CLOUD_NATIVE_VM, CERTIFICATE, CLUSTER, COMPUTE_INSTANCE, DATA_LOCATION, DB2_DATABASE, DB2_INSTANCE, EC2_INSTANCE, ENVOY, FAILOVER_CLUSTER_APP, EXOCOMPUTE, EXCHANGE_DATABASE, OBJECT_TYPE_HDFS, HOST, OBJECT_TYPE_HYPERV_SCVMM, OBJECT_TYPE_HYPERV_SERVER, HYPERV_VM, JOB_INSTANCE, LDAP, LINUX_FILESET, LINUX_HOST, MANAGED_VOLUME, MSSQL, NAS_FILESET, WEBHOOK, NAS_HOST, NAS_SYSTEM, OBJECT_TYPE_NUTANIX_CLUSTER, NUTANIX_VM, O365_CALENDAR, O365_MAILBOX, O365_ONEDRIVE, O365_SITE, O365_SHARE_POINT_DRIVE, O365_SHARE_POINT_LIST, O365_TEAM, O365_ORGANIZATION, O365_GROUP, OBJECT_PROTECTION, ORACLE, ORACLE_DB, ORACLE_HOST, ORACLE_RAC, AWS_NATIVE_ACCOUNT, AWS_NATIVE_EBS_VOLUME, AWS_NATIVE_EC2_INSTANCE, RUBRIK_SAAS_EBS_VOLUME, RUBRIK_SAAS_EC2_INSTANCE, PUBLIC_CLOUD_MACHINE_INSTANCE, SAML_SSO, SAP_HANA_DB, SAP_HANA_SYSTEM, SHARE_FILESET, SLA_DOMAIN, SMB_DOMAIN, SNAP_MIRROR_CLOUD, OBJECT_TYPE_STORAGE_ARRAY, STORAGE_ARRAY_VOLUME_GROUP, STORAGE_LOCATION, STORM, SUPPORT_BUNDLE, USER, OBJECT_TYPE_UPGRADE, OBJECT_TYPE_VCD, VCD_VAPP, OBJECT_TYPE_VCENTER, VMWARE_COMPUTE_CLUSTER, VMWARE_VM, OBJECT_TYPE_VOLUME_GROUP, WINDOWS_FILESET, WINDOWS_HOST, GCP_NATIVE_PROJECT, AWS_NATIVE_RDS_INSTANCE, GCP_NATIVE_GCE_INSTANCE, GCP_NATIVE_DISK, KUPR_CLUSTER, KUPR_NAMESPACE, CASSANDRA_COLUMN_FAMILY, CASSANDRA_KEYSPACE, CASSANDRA_SOURCE, MONGODB_COLLECTION, MONGODB_DATABASE, MONGODB_SOURCE, CLOUD_DIRECT_NAS_EXPORT, MONGO_COLLECTION, MONGO_DATABASE, MONGO_SOURCE, CERTIFICATE_MANAGEMENT, AWS_NATIVE_S3_BUCKET, AZURE_STORAGE_ACCOUNT, K8S_CLUSTER, K8S_RESOURCE_SET, AZURE_AD_DIRECTORY, ENCRYPTION_MANAGEMENT, ACTIVE_DIRECTORY_DOMAIN, ACTIVE_DIRECTORY_DOMAIN_CONTROLLER, OBJECT_TYPE_NUTANIX_PRISM_CENTRAL, VMWARE_HOST, ATLASSIAN_SITE, JIRA_PROJECT, JIRA_SETTINGS" # Removing spaces $EventObjectTypes = $EventObjectTypes.Replace(" ","") # Removing line breaks $EventObjectTypes = [string]::join("",($EventObjectTypes.Split("`n"))) # Splitting $EventObjectTypes = $EventObjectTypes.Split(",") # Ordering $EventObjectTypes = $EventObjectTypes| Sort-Object # Returning array Return $EventObjectTypes # End of function } |