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 AWS ElastiCache Cluster
query {
queryawsElastiCacheCluster {
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 {
address
port
}
notificationConfiguration {
topicArn
topicStatus
}
cacheSecurityGroups {
id
securityGroupId
status
}
cacheParameterGroup {
cacheParameterGroupName
parameterApplyStatus
cacheNodeIdsToReboot
}
cacheSubnetGroup {
cacheSubnetGroupName
cacheSubnetGroupDescription
vpcId
}
cacheNodes {
id
cacheNodeId
cacheNodeStatus
cacheNodeCreateTime
endpoint {
address
port
}
parameterGroupStatus
sourceCacheNodeId
customerAvailabilityZone
customerOutpostArn
}
logDeliveryConfigurations {
id
logType
destinationType
destinationDetails {
cloudWatchLogsDetails {
logGroup
}
kinesisFirehoseDetails {
deliveryStream
}
}
logFormat
status
message
}
tags {
id
key
value
}
securityGroups {
arn
}
subnets {
arn
}
vpc {
arn
}
}
}
Get data for a single AWS ElastiCache Cluster that you know the ID or arn for:
query {
getawsElastiCacheCluster(id: "12345") {
arn
}
}
query {
getawsElastiCacheCluster(arn: "elasticache:us-east-1:111122223333:cluster:cluster-11122223333f466ec") {
arn
}
}
Get data for all of the ElastiCache Clusters in a certain AWS account:
query {
queryawsElastiCacheCluster(filter: { accountId: { eq: "12345" } }) {
arn
}
}
Get data for all of the ElastiCache Clusters that are NOT in a certain AWS account:
query {
queryawsElastiCacheCluster(filter: { not: { accountId: { eq: "12345" } } }) {
arn
}
}
Get data for all of the ElastiCache Clusters that have a connected subnet:
query {
queryawsElastiCacheCluster(filter: { has: subnets }) {
arn
}
}
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:
query {
queryawsElastiCacheCluster(
filter: {
has: securityGroups
and: { has: subnets }
or: { not: { has: vpc } }
}
) {
arn
}
}
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:
query {
queryawsElastiCacheCluster(filter: { region: { regexp: "/.*us-*/" } }) {
arn
}
}
You can order the results you get back either asc or desc depending on your preference:
query {
queryawsElastiCacheCluster(order: { desc: region }) {
arn
}
}
Only select and return the first two ElastiCache Clusters that are found:
query {
queryawsElastiCacheCluster(first: 2, order: { desc: region }) {
arn
}
}
Only select and return the first two ElastiCache Clusters that are found, but offset by one so ElastiCache Clusters two & three are returned:
query {
queryawsElastiCacheCluster(first: 2, order: { desc: region }, offset: 1) {
arn
}
}
Count the number ElastiCache Clusters across all scanned AWS accounts:
query {
aggregateawsElastiCacheCluster {
count
}
}
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:
query {
aggregateawsElastiCacheCluster(filter: { accountId: { eq: "12345" } }) {
count
}
}
Find all of the ElastiCache Clusters that are in the us-east-1 region across all your accounts:
query {
queryawsElastiCacheCluster(filter: { region: { eq: "us-east-1" } }) {
arn
}
}
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:
query {
queryawsElastiCacheCluster {
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 {
address
port
}
notificationConfiguration {
topicArn
topicStatus
}
cacheSecurityGroups {
id
securityGroupId
status
}
cacheParameterGroup {
cacheParameterGroupName
parameterApplyStatus
cacheNodeIdsToReboot
}
cacheSubnetGroup {
cacheSubnetGroupName
cacheSubnetGroupDescription
vpcId
}
cacheNodes {
id
cacheNodeId
cacheNodeStatus
cacheNodeCreateTime
endpoint {
address
port
}
parameterGroupStatus
sourceCacheNodeId
customerAvailabilityZone
customerOutpostArn
}
logDeliveryConfigurations {
id
logType
destinationType
destinationDetails {
cloudWatchLogsDetails {
logGroup
}
kinesisFirehoseDetails {
deliveryStream
}
}
logFormat
status
message
}
tags {
id
key
value
}
securityGroups {
id
accountId
arn
name
vpcId
description
tags {
id
key
value
}
owner
default
inboundRules {
id
}
outboundRules {
id
}
inboundRuleCount
outboundRuleCount
alb {
arn
}
lambda {
arn
}
elb {
arn
}
ec2Instance {
arn
}
asg {
arn
}
rdsCluster {
arn
}
rdsDbInstance {
arn
}
}
subnets {
id
accountId
arn
autoAssignPublicIpv4Address
autoAssignPublicIpv6Address
availabilityZone
availableIpV4Addresses
defaultForAz
ipV4Cidr
ipV6Cidr
state
tags {
id
key
value
}
alb {
arn
}
asg {
arn
}
ec2Instance {
arn
}
elb {
arn
}
lambda {
arn
}
natGateway {
arn
}
networkInterface {
arn
}
routeTable {
arn
}
vpc {
arn
}
rdsDbInstance {
arn
}
}
vpc {
id
accountId
arn
region
defaultVpc
dhcpOptionsSet
enableDnsHostnames
enableDnsSupport
instanceTenancy
ipV4Cidr
ipV6Cidr
state
tags {
id
key
value
}
alb {
arn
}
eip {
arn
}
igw {
arn
}
lambda {
arn
}
nacl {
arn
}
natGateway {
arn
}
networkInterface {
arn
}
rdsDbInstance {
arn
}
redshiftCluster {
arn
}
route53HostedZone {
arn
}
routeTable {
arn
}
subnet {
arn
}
eksCluster {
arn
}
ecsService {
arn
}
}
}
}