@@ -1115,3 +1115,60 @@ def upload_plugin(self, plugin_path):
1115
1115
).headers ["upm-token" ]
1116
1116
url = "rest/plugins/1.0/?token={upm_token}" .format (upm_token = upm_token )
1117
1117
return self .post (url , files = files , headers = self .no_check_headers )
1118
+
1119
+ def get_elastic_instance_logs (self , instance_id ):
1120
+ """
1121
+ Get logs from an EC2 instance
1122
+ :param instance_id:
1123
+ :return:
1124
+ """
1125
+ resource = "/elasticInstances/instance/{instance_id}/logs" .format (instance_id = instance_id )
1126
+ return self .get (self .resource_url (resource ))
1127
+
1128
+ def get_elastic_configurations (self ):
1129
+ """
1130
+ Get list of all elastic configurations
1131
+ :return:
1132
+ """
1133
+ resource = "elasticConfiguration"
1134
+ return self .get (self .resource_url (resource ))
1135
+
1136
+ def create_elastic_configuration (self , json ):
1137
+ """
1138
+ Create an elastic configuration
1139
+ :param json:
1140
+ :return:
1141
+ """
1142
+ resource = "elasticConfiguration"
1143
+ return self .post (self .resource_url (resource ), json = json )
1144
+
1145
+ def get_elastic_configuration (self , configuration_id ):
1146
+ """
1147
+ Get informatin of an elastic configuration
1148
+ :param configuration_id:
1149
+ :return:
1150
+ """
1151
+
1152
+ resource = "elasticConfiguration/{configuration_id}" .format (configuration_id = configuration_id )
1153
+ return self .get (self .resource_url (resource ))
1154
+
1155
+ def update_elastic_configuration (self , configuration_id , data ):
1156
+ """
1157
+ Update an elastic configuration
1158
+ :param configuration_id:
1159
+ :param data:
1160
+ :return:
1161
+ """
1162
+
1163
+ resource = "elasticConfiguration/{configuration_id}" .format (configuration_id = configuration_id )
1164
+ return self .put (self .resource_url (resource ), data = data )
1165
+
1166
+ def delete_elastic_configuration (self , configuration_id ):
1167
+ """
1168
+ Delete an elastic configuration
1169
+ :param configuration_id:
1170
+ :return:
1171
+ """
1172
+
1173
+ resource = "elasticConfiguration/{configuration_id}" .format (configuration_id = configuration_id )
1174
+ return self .delete (self .resource_url (resource ))
0 commit comments