@@ -76,13 +76,10 @@ def create_entity_examples(j1):
7676 'backupRetentionPeriod' : 7 ,
7777 'tag.Environment' : 'production' ,
7878 'tag.Team' : 'data' ,
79- 'metadata' : {
80- 'createdBy' : 'terraform' ,
81- 'lastBackup' : '2024-01-01T00:00:00Z' ,
82- 'maintenanceWindow' : 'sun:03:00-sun:04:00'
83- }
84- },
85- timestamp = int (time .time ()) * 1000
79+ 'createdBy' : 'terraform' ,
80+ 'lastBackup' : '2024-01-01T00:00:00Z' ,
81+ 'maintenanceWindow' : 'sun:03:00-sun:04:00'
82+ }
8683 )
8784 print (f"Created complex entity: { complex_entity ['entity' ]['_id' ]} \n " )
8885
@@ -122,16 +119,12 @@ def update_entity_examples(j1, entity_id):
122119 entity_id = entity_id ,
123120 properties = {
124121 'isActive' : False ,
125- 'maintenanceWindow' : {
126- 'start' : '2024-01-01T00:00:00Z' ,
127- 'end' : '2024-01-01T04:00:00Z' ,
128- 'reason' : 'scheduled_maintenance'
129- },
130- 'metadata' : {
131- 'maintenancePerformedBy' : 'admin@company.com' ,
132- 'maintenanceType' : 'security_patches' ,
133- 'estimatedDuration' : '4 hours'
134- }
122+ 'maintenanceWindowStart' : '2024-01-01T00:00:00Z' ,
123+ 'maintenanceWindowEnd' : '2024-01-01T04:00:00Z' ,
124+ 'maintenanceReason' : 'scheduled_maintenance' ,
125+ 'maintenancePerformedBy' : 'admin@company.com' ,
126+ 'maintenanceType' : 'security_patches' ,
127+ 'estimatedDuration' : '4 hours'
135128 }
136129 )
137130 print (f"Updated with complex properties\n " )
0 commit comments