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 Storage Blob
query {
queryazureStorageBlob{
id
name
type
kind
subscriptionId
region
resourceGroupId
deleted
snapshot
versionId
properties{
createdOn
lastModified
etag
contentLength
contentType
contentEncoding
contentLanguage
contentDisposition
cacheControl
blobSequenceNumber
blobType
leaseStatus
leaseState
leaseDuration
copyId
copyStatus
copySource
copyProgress
copyCompletedOn
copyStatusDescription
serverEncrypted
incrementalCopy
destinationSnapshot
deletedOn
remainingRetentionDays
accessTier
accessTierInferred
archiveStatus
customerProvidedKeySha256
encryptionScope
accessTierChangedOn
tagCount
expiresOn
isSealed
rehydratePriority
lastAccessedOn
immutabilityPolicyExpiresOn
immutabilityPolicyMode
contentCRC64
legalHold
}
isCurrentVersion
hasVersionsOnly
objectReplicationSourceProperties{
id
policyId
rules{
ruleId
replicationStatus
}
}
resourceGroup{
id
}
storageContainer{
id
}
}
}
Get data for a single Azure Storage Blob key that you know the ID for:
query {
getazureStorageBlob(id: "12345") {
id
}
}
Get data for all of the Storage Blobs in a certain Azure subscription:
query {
queryazureStorageBlob(filter: { subscriptionId: { eq: "12345" } }) {
id
}
}
Get data for all of the Storage Blobs that are NOT in a certain Azure subscription:
query {
queryazureStorageBlob(filter: { not: { subscriptionId: { eq: "12345" } } }) {
id
}
}
Get data for all of the Storage Blobs that are connected to a storageContainer:
query {
queryazureStorageBlob(filter: { has: storageContainer }) {
id
}
}
You can order the results you get back either asc or desc depending on your preference:
query {
queryazureStorageBlob(order: { desc: name }) {
id
}
}
Only select and return the first two Storage Blobs that are found:
query {
queryazureStorageBlob(first: 2, order: { desc: name }) {
id
}
}
Only select and return the first two Storage Blobs that are found, but offset by one so keys two & three are returned:
query {
queryazureStorageBlob(first: 2, order: { desc: name }, offset: 1) {
id
}
}
Count the number of Storage Blobs across all scanned Azure subscriptions:
query {
aggregateazureStorageBlob {
count
}
}
Count the number of Storage Blobs in a single account. Note that you can apply all of the same filters that are listed above to aggregate queries:
query {
aggregateazureStorageBlob(filter: { subscriptionId: { eq: "12345" } }) {
count
}
}
Find all of the Storage Blobs that are in the eastus region across all your accounts:
query {
queryazureStorageBlob(filter: { region: { eq: "eastus" } }) {
id
}
}
Putting it all together; get all data for all Storage Blobs across all regions for all scanned Azure subscriptions in a single query.
query {
queryazureStorageBlob{
id
name
type
kind
subscriptionId
region
resourceGroupId
deleted
snapshot
versionId
properties{
createdOn
lastModified
etag
contentLength
contentType
contentEncoding
contentLanguage
contentDisposition
cacheControl
blobSequenceNumber
blobType
leaseStatus
leaseState
leaseDuration
copyId
copyStatus
copySource
copyProgress
copyCompletedOn
copyStatusDescription
serverEncrypted
incrementalCopy
destinationSnapshot
deletedOn
remainingRetentionDays
accessTier
accessTierInferred
archiveStatus
customerProvidedKeySha256
encryptionScope
accessTierChangedOn
tagCount
expiresOn
isSealed
rehydratePriority
lastAccessedOn
immutabilityPolicyExpiresOn
immutabilityPolicyMode
contentCRC64
legalHold
}
isCurrentVersion
hasVersionsOnly
objectReplicationSourceProperties{
id
policyId
rules{
ruleId
replicationStatus
}
}
resourceGroup{
id
}
storageContainer{
id
}
}
}