1+ name : " Oracle Autonomous Database"
2+ label : " {{ LABELS.OracleAutonomousDB }}"
3+ table_name : " resources"
4+ resource_type : " oracle.database/autonomousdatabases"
5+ properties :
6+ - " /id"
7+ - " /properties"
8+ cypher : |
9+ UNWIND $batch AS row
10+ MERGE (obj:{{ LABELS.ArmResource }} {id: toLower(row.id)})
11+ SET obj:{{ LABELS.OracleAutonomousDB }}
12+
13+ SET obj += {
14+ actualUsedDataStorageSizeInTbs: row.properties.actualUsedDataStorageSizeInTbs,
15+ allocatedStorageSizeInTbs: row.properties.allocatedStorageSizeInTbs,
16+ backupRententionPeriodInDays: row.properties.backupRetentionPeriodInDays,
17+ characterSet: row.properties.characterSet,
18+ databaseType: row.properties.dataBaseType, // Note: property name in ARM is "dataBaseType" with a capital B
19+ dbVersion: row.properties.dbVersion,
20+ displayName: row.properties.displayName,
21+ isLocalDataGuardEnabled: row.properties.isLocalDataGuardEnabled,
22+ isMtlsConnectionRequired: row.properties.isMtlsConnectionRequired,
23+ isRemoteDataGuardEnabled: row.properties.isRemoteDataGuardEnabled,
24+ localDisasterRecoveryType: row.properties.localDisasterRecoveryType,
25+ ociUrl: row.properties.ociUrl,
26+ ocid: row.properties.ocid,
27+ openMode: row.properties.openMode,
28+ permissionLevel: row.properties.permissionLevel,
29+ privateEndpoint: row.properties.privateEndpoint,
30+ privateEndpointIp: row.properties.privateEndpointIp,
31+ privateEndpointLabel: row.properties.privateEndpointLabel,
32+ timeCreated: row.properties.timeCreated,
33+ timeLocalDataGuardEnabled: row.properties.timeLocalDataGuardEnabled,
34+
35+ highConnectionString: row.properties.connectionStrings.high,
36+ mediumConnectionString: row.properties.connectionStrings.medium,
37+ lowConnectionString: row.properties.connectionStrings.low
38+ }
39+
40+ // Connection URLs. Not sure of all values so adding them dynamically
41+ FOREACH (k IN coalesce(keys(row.properties.connectionUrls), []) |
42+ SET obj[k] = row.properties.connectionUrls[k]
43+ )
44+
45+ MERGE (sub: {{ LABELS.ArmResource }} {id: toLower(row.properties.subnetId)})
46+ MERGE (sub)-[:{{ REL.HAS_ORACLE_RESOURCE }}]->(obj)
47+ RETURN count(*) AS _
0 commit comments