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.
Overview
You can currently query the following attributes and connections on an AWS ElastiCache Cluster
GraphQL
|
query{queryawsElastiCacheCluster{idarnaccountIdregioncacheClusterIdclientDownloadLandingPagecacheNodeTypeengineengineVersioncacheClusterStatusnumCacheNodespreferredAvailabilityZonepreferredOutpostArnpreferredMaintenanceWindowcacheClusterCreateTimeautoMinorVersionUpgradereplicationGroupIdsnapshotRetentionLimitsnapshotWindowauthTokenEnabledauthTokenLastModifiedDatetransitEncryptionEnabledatRestEncryptionEnabledreplicationGroupLogDeliveryEnabledconfigurationEndpoint{addressport}notificationConfiguration{topicArntopicStatus}cacheSecurityGroups{idsecurityGroupIdstatus}cacheParameterGroup{cacheParameterGroupNameparameterApplyStatuscacheNodeIdsToReboot}cacheSubnetGroup{cacheSubnetGroupNamecacheSubnetGroupDescriptionvpcId}cacheNodes{idcacheNodeIdcacheNodeStatuscacheNodeCreateTimeendpoint{addressport}parameterGroupStatussourceCacheNodeIdcustomerAvailabilityZonecustomerOutpostArn}logDeliveryConfigurations{idlogTypedestinationTypedestinationDetails{cloudWatchLogsDetails{logGroup}kinesisFirehoseDetails{deliveryStream}}logFormatstatusmessage}tags{idkeyvalue}securityGroups{arn# Other fields and connections here...}subnets{arn# Other fields and connections here...}vpc{arn# Other fields and connections here...}}}
Filtering
Get data for a single AWS ElastiCache Cluster that you know the ID or arn for:
GraphQL
|
query{getawsElastiCacheCluster(id:"12345"){arn# Other fields and connections here...}}
GraphQL
|
query{getawsElastiCacheCluster(arn:"elasticache:us-east-1:111122223333:cluster:cluster-11122223333f466ec"){arn# Other fields and connections here...}}
Get data for all of the ElastiCache Clusters in a certain AWS account:
GraphQL
|
query{queryawsElastiCacheCluster(filter:{accountId:{eq:"12345"}}){arn# Other fields and connections here...}}# Note that in addition to "accountId" you can# Filter based on any of the following attributes:# id# arn# region# cacheClusterId# clientDownloadLandingPage# cacheNodeType# engine# engineVersion# cacheClusterStatus# numCacheNodes# preferredAvailabilityZone# preferredOutpostArn# preferredMaintenanceWindow# cacheClusterCreateTime# autoMinorVersionUpgrade# replicationGroupId# snapshotRetentionLimit# snapshotWindow# authTokenEnabled# authTokenLastModifiedDate# transitEncryptionEnabled# atRestEncryptionEnabled# replicationGroupLogDeliveryEnabled# And the following Dgraph filters can also be applied:# has# and# or# not# regexp (regular expressions)
Get data for all of the ElastiCache Clusters that are NOT in a certain AWS account:
GraphQL
|
query{queryawsElastiCacheCluster(filter:{not:{accountId:{eq:"12345"}}}){arn# Other fields and connections here...}}
Advanced Filtering
Get data for all of the ElastiCache Clusters that have a connected subnet:
GraphQL
|
query{queryawsElastiCacheCluster(filter:{has:subnets}){arn# Other fields and connections here...}}# Note that in addition to "subnets" you can filter# Using "has" based on any of the following attributes:# id# arn# accountId# region# cacheClusterId# clientDownloadLandingPage# cacheNodeType# engine# engineVersion# cacheClusterStatus# numCacheNodes# preferredAvailabilityZone# preferredOutpostArn# preferredMaintenanceWindow# cacheClusterCreateTime# autoMinorVersionUpgrade# replicationGroupId# snapshotRetentionLimit# snapshotWindow# authTokenEnabled# authTokenLastModifiedDate# transitEncryptionEnabled# atRestEncryptionEnabled# replicationGroupLogDeliveryEnabled# configurationEndpoint# notificationConfiguration# cacheSecurityGroups# cacheParameterGroup# cacheSubnetGroup# cacheNodes# logDeliveryConfigurations# tags# securityGroups# vpc
Use multiple filter selectors, (i.e. has, and, not, or) to get data for all of the ElastiCache Clusters that have securityGroups instances AND subnets instances connected to them OR that do not have vpc instances connected to them. Note that you can use has, and, not, or completely independently of each other:
GraphQL
|
query{queryawsElastiCacheCluster(filter:{has:securityGroupsand:{has:subnets}or:{not:{has:vpc}}}){arn# Other fields and connections here...}}
You may also filter using a regex when filtering on a string field like, region if you want to look for a value that matches say, us- to get all ElastiCache Clusters in us regions:
GraphQL
|
query{queryawsElastiCacheCluster(filter:{region:{regexp:"/.*us-*/"}}){arn# Other fields and connections here...}}
Ordering
You can order the results you get back either asc or desc depending on your preference:
GraphQL
|
query{queryawsElastiCacheCluster(order:{desc:region}){arn# Other fields and connections here...}}# Note that in addition to "region" you can filter# Using "asc" or "desc" based on any of the following attributes:# id# accountId# arn# cacheClusterId# clientDownloadLandingPage# cacheNodeType# engine# engineVersion# cacheClusterStatus# numCacheNodes# preferredAvailabilityZone# preferredOutpostArn# preferredMaintenanceWindow# cacheClusterCreateTime# autoMinorVersionUpgrade# replicationGroupId# snapshotRetentionLimit# snapshotWindow# authTokenEnabled# authTokenLastModifiedDate# transitEncryptionEnabled# atRestEncryptionEnabled# replicationGroupLogDeliveryEnabled
Only select and return the first two ElastiCache Clusters that are found:
GraphQL
|
query{queryawsElastiCacheCluster(first:2,order:{desc:region}){arn# Other fields and connections here...}}
Only select and return the first two ElastiCache Clusters that are found, but offset by one so ElastiCache Clusters two & three are returned:
GraphQL
|
query{queryawsElastiCacheCluster(first:2,order:{desc:region},offset:1){arn# Other fields and connections here...}}
Aggregation
Count the number ElastiCache Clusters across all scanned AWS accounts:
GraphQL
|
query{aggregateawsElastiCacheCluster{count# Other fields and connections here...}}# Note that in addition to "count" you can request the# Following min and max values based on attributes of your ElastiCache Cluster:# idMin# idMax# accountIdMin# accountIdMax# arnMin# arnMax# regionMin# regionMax# cacheClusterIdMin# cacheClusterIdMax# clientDownloadLandingPageMin# clientDownloadLandingPageMax# cacheNodeTypeMin# cacheNodeTypeMax# engineMin# engineMax# engineVersionMin# engineVersionMax# cacheClusterStatusMin# cacheClusterStatusMax# numCacheNodesMin# numCacheNodesMax# preferredAvailabilityZoneMin# preferredAvailabilityZoneMax# preferredOutpostArnMin# preferredOutpostArnMax# preferredMaintenanceWindowMin# preferredMaintenanceWindowMax# cacheClusterCreateTimeMin# cacheClusterCreateTimeMax# replicationGroupIdMin# replicationGroupIdMax# snapshotRetentionLimitMin# snapshotRetentionLimitMax# snapshotWindowMin# snapshotWindowMax# authTokenEnabledMin# authTokenEnabledMax# authTokenLastModifiedDateMin# authTokenLastModifiedDateMAx
Count the number of ElastiCache Clusters in a single account. Note that you can apply all of the same filters that are listed above to aggregate queries:
GraphQL
|
query{aggregateawsElastiCacheCluster(filter:{accountId:{eq:"12345"}}){count# Other fields and connections here...}}
Examples
Find all of the ElastiCache Clusters that are in the us-east-1 region across all your accounts:
GraphQL
|
query{queryawsElastiCacheCluster(filter:{region:{eq:"us-east-1"}}){arn# Other fields and connections here...}}
Kitchen Sink
Putting it all together; get all data for all ElastiCache Clusters across all regions for all scanned AWS accounts in a single query. For the purposes of this example we will only get direct children of the ElastiCache Clusters but if you want to it's easy to go from say, elastiCacheClusters-> subnet -> alb ...etc:
GraphQL
|
query{queryawsElastiCacheCluster{idarnaccountIdregioncacheClusterIdclientDownloadLandingPagecacheNodeTypeengineengineVersioncacheClusterStatusnumCacheNodespreferredAvailabilityZonepreferredOutpostArnpreferredMaintenanceWindowcacheClusterCreateTimeautoMinorVersionUpgradereplicationGroupIdsnapshotRetentionLimitsnapshotWindowauthTokenEnabledauthTokenLastModifiedDatetransitEncryptionEnabledatRestEncryptionEnabledreplicationGroupLogDeliveryEnabledconfigurationEndpoint{addressport}notificationConfiguration{topicArntopicStatus}cacheSecurityGroups{idsecurityGroupIdstatus}cacheParameterGroup{cacheParameterGroupNameparameterApplyStatuscacheNodeIdsToReboot}cacheSubnetGroup{cacheSubnetGroupNamecacheSubnetGroupDescriptionvpcId}cacheNodes{idcacheNodeIdcacheNodeStatuscacheNodeCreateTimeendpoint{addressport}parameterGroupStatussourceCacheNodeIdcustomerAvailabilityZonecustomerOutpostArn}logDeliveryConfigurations{idlogTypedestinationTypedestinationDetails{cloudWatchLogsDetails{logGroup}kinesisFirehoseDetails{deliveryStream}}logFormatstatusmessage}tags{idkeyvalue}securityGroups{idaccountIdarnnamevpcIddescriptiontags{idkeyvalue}ownerdefaultinboundRules{id# Other fields and connections here...}outboundRules{id# Other fields and connections here...}inboundRuleCountoutboundRuleCountalb{arn# Other fields and connections here...}lambda{arn# Other fields and connections here...}elb{arn# Other fields and connections here...}ec2Instance{arn# Other fields and connections here...}asg{arn# Other fields and connections here...}rdsCluster{arn# Other fields and connections here...}rdsDbInstance{arn# Other fields and connections here...}}subnets{idaccountIdarnautoAssignPublicIpv4AddressautoAssignPublicIpv6AddressavailabilityZoneavailableIpV4AddressesdefaultForAzipV4CidripV6Cidrstatetags{idkeyvalue}alb{arn# Other fields and connections here...}asg{arn# Other fields and connections here...}ec2Instance{arn# Other fields and connections here...}elb{arn# Other fields and connections here...}lambda{arn# Other fields and connections here...}natGateway{arn# Other fields and connections here...}networkInterface{arn# Other fields and connections here...}routeTable{arn# Other fields and connections here...}vpc{arn# Other fields and connections here...}rdsDbInstance{arn# Other fields and connections here...}}vpc{idaccountIdarnregiondefaultVpcdhcpOptionsSetenableDnsHostnamesenableDnsSupportinstanceTenancyipV4CidripV6Cidrstatetags{idkeyvalue}alb{arn# Other fields and connections here...}eip{arn# Other fields and connections here...}igw{arn# Other fields and connections here...}lambda{arn# Other fields and connections here...}nacl{arn# Other fields and connections here...}natGateway{arn# Other fields and connections here...}networkInterface{arn# Other fields and connections here...}rdsDbInstance{arn# Other fields and connections here...}redshiftCluster{arn# Other fields and connections here...}route53HostedZone{arn# Other fields and connections here...}routeTable{arn# Other fields and connections here...}subnet{arn# Other fields and connections here...}eksCluster{arn# Other fields and connections here...}ecsService{arn# Other fields and connections here...}}}}