Note: if you are running CloudGraph locally you can view the interactive, automatically generated documentation in either GraphQL Playground or Altair by clicking the docs button on the right-hand side of the screen. After reading the below information we highly suggest you use one of these tools to test your queries as they will autocomplete fields for you and let you know if your queries are valid before you even submit them.
You can currently query the following attributes and connections on an Azure Event Hub
query {
queryazureEventHub{
id
name
type
subscriptionId
region
resourceGroupId
createdBy
createdByType
createdAt
lastModifiedBy
lastModifiedByType
lastModifiedAt
partitionIds
updatedAt
messageRetentionInDays
partitionCount
status
captureDescription{
enabled
encoding
intervalInSeconds
sizeLimitInBytes
destination{
name
storageAccountResourceId
blobContainer
archiveNameFormat
dataLakeSubscriptionId
dataLakeAccountName
dataLakeFolderPath
}
skipEmptyArchives
}
resourceGroup{
id
}
storageAccount {
id
}
}
}
Get data for a single Azure Event Hub key that you know the ID for:
query {
getazureEventHub(id: "12345") {
id
}
}
Get data for all of the Event Hubs in a certain Azure subscription:
query {
queryazureEventHub(filter: { subscriptionId: { eq: "12345" } }) {
id
}
}
Get data for all of the Event Hubs that are NOT in a certain Azure subscription:
query {
queryazureEventHub(filter: { not: { subscriptionId: { eq: "12345" } } }) {
id
}
}
Get data for all of the Event Hubs that are connected to a storageAccount:
query {
queryazureEventHub(filter: { has: storageAccounts }) {
id
}
}
You can order the results you get back either asc or desc depending on your preference:
query {
queryazureEventHub(order: { desc: name }) {
id
}
}
Only select and return the first two Event Hubs that are found:
query {
queryazureEventHub(first: 2, order: { desc: name }) {
id
}
}
Only select and return the first two Event Hubs that are found, but offset by one so keys two & three are returned:
query {
queryazureEventHub(first: 2, order: { desc: name }, offset: 1) {
id
}
}
Count the number of Event Hubs across all scanned Azure subscriptions:
query {
aggregateazureEventHub {
count
}
}
Count the number of Event Hubs in a single account. Note that you can apply all of the same filters that are listed above to aggregate queries:
query {
aggregateazureEventHub(filter: { subscriptionId: { eq: "12345" } }) {
count
}
}
Find all of the Event Hubs that are in the eastus region across all your accounts:
query {
queryazureEventHub(filter: { region: { eq: "eastus" } }) {
id
}
}
Putting it all together; get all data for all Event Hubs across all regions for all scanned Azure subscriptions in a single query. For the purposes of this example, we will only get direct children of the keys but if you want to it's easy to go from say, disk -> virtualMachine -> networkInterface ...etc:
query {
queryazureEventHub {
id
name
type
subscriptionId
region
resourceGroupId
createdBy
createdByType
createdAt
lastModifiedBy
lastModifiedByType
lastModifiedAt
partitionIds
updatedAt
messageRetentionInDays
partitionCount
status
captureDescription{
enabled
encoding
intervalInSeconds
sizeLimitInBytes
destination{
name
storageAccountResourceId
blobContainer
archiveNameFormat
dataLakeSubscriptionId
dataLakeAccountName
dataLakeFolderPath
}
skipEmptyArchives
}
resourceGroup{
id
name
type
kind
subscriptionId
region
managedBy
disks {
id
}
appServicePlans{
id
}
appServiceWebApps{
id
}
disks{
id
}
dns{
id
}
eventGrids{
id
}
eventHubs{
id
}
firewalls{
id
}
functionApps{
id
}
keyVaults{
id
}
networkInterfaces{
id
}
publicIps{
id
}
securityGroups{
id
}
storageAccounts{
id
}
storageBlobs{
id
}
storageContainers{
id
}
virtualMachines{
id
}
virtualMachineScaleSets{
id
}
virtualNetworks{
id
}
privateDns{
id
}
tags{
id
key
value
}
}
storageAccount {
id
name
type
kind
subscriptionId
region
resourceGroupId
extendedLocationName
extendedLocationType
provisioningState
primaryEndpoints{
blob
queue
table
file
web
dfs
}
primaryMicrosoftEndpoints {
blob
queue
table
file
web
dfs
}
primaryInternetEndpoints{
blob
file
web
dfs
}
primaryLocation
statusOfPrimary
lastGeoFailoverTime
secondaryLocation
statusOfSecondary
customDomainName
customDomainUseSubDomainName
sasPolicyExpirationPeriod
keyPolicyExpirationPeriodInDays
keyCreationTimeKey1
keyCreationTimeKey2
encryptionServiceBlob{
enabled
lastEnabledTime
keyType
}
encryptionServiceFile{
enabled
lastEnabledTime
keyType
}
encryptionServiceTable{
enabled
lastEnabledTime
keyType
}
encryptionServiceQueue{
enabled
lastEnabledTime
keyType
}
encryptionKeySource
encryptionRequireInfrastructureEncryption
encryptionKeyVaultPropertyKeyName
encryptionKeyVaultPropertyKeyVersion
encryptionKeyVaultPropertyKeyVaultUri
encryptionKeyVaultPropertyCurrentVersionedKeyIdentifier
encryptionKeyVaultPropertyLastKeyRotationTimestamp
encryptionUserAssignedIdentity
accessTier
azureFilesIdentityBasedAuthenticationDirectoryServiceOptions
azureFilesIdentityBasedAuthenticationADProperties{
domainName
netBiosDomainName
forestName
domainGuid
domainSid
azureStorageSid
}
enableHttpsTrafficOnly
networkRuleSetByPass
networkRuleResourceAccessRules {
id
tenantId
resourceId
}
networkRuleVirtualNetworkRules {
id
virtualNetworkResourceId
action
state
}
networkRuleIpRules{
id
iPAddressOrRange
action
}
networkRuleSetDefaultAction
isHnsEnabled
geoReplicationStatsStatus
geoReplicationStatsLastSyncTime
geoReplicationStatsCanFailover
failoverInProgress
largeFileSharesState
privateEndpointConnections{
id
privateEndpointId
privateLinkServiceConnectionStateStatus
privateLinkServiceConnectionStateDescription
privateLinkServiceConnectionStateActionRequired
provisioningState
}
routingPreferenceChoice
routingPreferencePublishMicrosoftEndpoints
routingPreferencePublishInternetEndpoints
allowBlobPublicAccess
minimumTlsVersion
allowSharedKeyAccess
enableNfsV3
resourceGroup {
id
}
storageContainers {
id
}
tags{
id
key
value
}
}
}
}