Class: OpsgenieSdk::NotificationRuleStepApi
- Inherits:
-
Object
- Object
- OpsgenieSdk::NotificationRuleStepApi
- Defined in:
- lib/opsgenie_sdk/api/notification_rule_step_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_notification_rule_step(identifier, rule_id, body, opts = {}) ⇒ SuccessResponse
Create Notification Rule Step Creates a new notification rule step.
-
#create_notification_rule_step_with_http_info(identifier, rule_id, body, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>
Create Notification Rule Step Creates a new notification rule step.
-
#delete_notification_rule_step(identifier, rule_id, id, opts = {}) ⇒ SuccessResponse
Delete Notification Rule Step Deletes a notification rule step using user identifier, rule id, notification rule step id.
-
#delete_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>
Delete Notification Rule Step Deletes a notification rule step using user identifier, rule id, notification rule step id.
-
#disable_notification_rule_step(identifier, rule_id, id, opts = {}) ⇒ SuccessResponse
Disable Notification Rule Step Disables a new notification rule step.
-
#disable_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>
Disable Notification Rule Step Disables a new notification rule step.
-
#enable_notification_rule_step(identifier, rule_id, id, opts = {}) ⇒ SuccessResponse
Enable Notification Rule Step Enables a new notification rule step.
-
#enable_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>
Enable Notification Rule Step Enables a new notification rule step.
-
#get_notification_rule_step(identifier, rule_id, id, opts = {}) ⇒ GetNotificationRuleStepResponse
Get Notification Rule Step Returns notification rule step with given user identifier and rule id.
-
#get_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) ⇒ Array<(GetNotificationRuleStepResponse, Fixnum, Hash)>
Get Notification Rule Step Returns notification rule step with given user identifier and rule id.
-
#initialize(api_client = ApiClient.default) ⇒ NotificationRuleStepApi
constructor
A new instance of NotificationRuleStepApi.
-
#list_notification_rule_steps(identifier, rule_id, opts = {}) ⇒ ListNotificationRuleStepsResponse
List Notification Rule Steps Returns list of notification rule steps.
-
#list_notification_rule_steps_with_http_info(identifier, rule_id, opts = {}) ⇒ Array<(ListNotificationRuleStepsResponse, Fixnum, Hash)>
List Notification Rule Steps Returns list of notification rule steps.
-
#update_notification_rule_step(identifier, rule_id, id, opts = {}) ⇒ SuccessResponse
Update Notification Rule Step (Partial) Update a notification rule step with given user identifier, rule id, and notification rule step id.
-
#update_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>
Update Notification Rule Step (Partial) Update a notification rule step with given user identifier, rule id, and notification rule step id.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ NotificationRuleStepApi
Returns a new instance of NotificationRuleStepApi.
19 20 21 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_notification_rule_step(identifier, rule_id, body, opts = {}) ⇒ SuccessResponse
Create Notification Rule Step Creates a new notification rule step
29 30 31 32 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 29 def create_notification_rule_step(identifier, rule_id, body, opts = {}) data, _status_code, _headers = create_notification_rule_step_with_http_info(identifier, rule_id, body, opts) data end |
#create_notification_rule_step_with_http_info(identifier, rule_id, body, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>
Create Notification Rule Step Creates a new notification rule step
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 41 def create_notification_rule_step_with_http_info(identifier, rule_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationRuleStepApi.create_notification_rule_step ...' end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling NotificationRuleStepApi.create_notification_rule_step" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling NotificationRuleStepApi.create_notification_rule_step" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NotificationRuleStepApi.create_notification_rule_step" end # resource path local_var_path = '/v2/users/{identifier}/notification-rules/{ruleId}/steps'.sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'ruleId' + '}', rule_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['GenieKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SuccessResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationRuleStepApi#create_notification_rule_step\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_notification_rule_step(identifier, rule_id, id, opts = {}) ⇒ SuccessResponse
Delete Notification Rule Step Deletes a notification rule step using user identifier, rule id, notification rule step id
93 94 95 96 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 93 def delete_notification_rule_step(identifier, rule_id, id, opts = {}) data, _status_code, _headers = delete_notification_rule_step_with_http_info(identifier, rule_id, id, opts) data end |
#delete_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>
Delete Notification Rule Step Deletes a notification rule step using user identifier, rule id, notification rule step id
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 105 def delete_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationRuleStepApi.delete_notification_rule_step ...' end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling NotificationRuleStepApi.delete_notification_rule_step" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling NotificationRuleStepApi.delete_notification_rule_step" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NotificationRuleStepApi.delete_notification_rule_step" end # resource path local_var_path = '/v2/users/{identifier}/notification-rules/{ruleId}/steps/{id}'.sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'ruleId' + '}', rule_id.to_s).sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['GenieKey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SuccessResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationRuleStepApi#delete_notification_rule_step\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#disable_notification_rule_step(identifier, rule_id, id, opts = {}) ⇒ SuccessResponse
Disable Notification Rule Step Disables a new notification rule step
157 158 159 160 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 157 def disable_notification_rule_step(identifier, rule_id, id, opts = {}) data, _status_code, _headers = disable_notification_rule_step_with_http_info(identifier, rule_id, id, opts) data end |
#disable_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>
Disable Notification Rule Step Disables a new notification rule step
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 169 def disable_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationRuleStepApi.disable_notification_rule_step ...' end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling NotificationRuleStepApi.disable_notification_rule_step" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling NotificationRuleStepApi.disable_notification_rule_step" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NotificationRuleStepApi.disable_notification_rule_step" end # resource path local_var_path = '/v2/users/{identifier}/notification-rules/{ruleId}/steps/{id}/disable'.sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'ruleId' + '}', rule_id.to_s).sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['GenieKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SuccessResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationRuleStepApi#disable_notification_rule_step\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#enable_notification_rule_step(identifier, rule_id, id, opts = {}) ⇒ SuccessResponse
Enable Notification Rule Step Enables a new notification rule step
221 222 223 224 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 221 def enable_notification_rule_step(identifier, rule_id, id, opts = {}) data, _status_code, _headers = enable_notification_rule_step_with_http_info(identifier, rule_id, id, opts) data end |
#enable_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>
Enable Notification Rule Step Enables a new notification rule step
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 233 def enable_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationRuleStepApi.enable_notification_rule_step ...' end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling NotificationRuleStepApi.enable_notification_rule_step" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling NotificationRuleStepApi.enable_notification_rule_step" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NotificationRuleStepApi.enable_notification_rule_step" end # resource path local_var_path = '/v2/users/{identifier}/notification-rules/{ruleId}/steps/{id}/enable'.sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'ruleId' + '}', rule_id.to_s).sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['GenieKey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SuccessResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationRuleStepApi#enable_notification_rule_step\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_notification_rule_step(identifier, rule_id, id, opts = {}) ⇒ GetNotificationRuleStepResponse
Get Notification Rule Step Returns notification rule step with given user identifier and rule id
285 286 287 288 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 285 def get_notification_rule_step(identifier, rule_id, id, opts = {}) data, _status_code, _headers = get_notification_rule_step_with_http_info(identifier, rule_id, id, opts) data end |
#get_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) ⇒ Array<(GetNotificationRuleStepResponse, Fixnum, Hash)>
Get Notification Rule Step Returns notification rule step with given user identifier and rule id
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 297 def get_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationRuleStepApi.get_notification_rule_step ...' end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling NotificationRuleStepApi.get_notification_rule_step" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling NotificationRuleStepApi.get_notification_rule_step" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NotificationRuleStepApi.get_notification_rule_step" end # resource path local_var_path = '/v2/users/{identifier}/notification-rules/{ruleId}/steps/{id}'.sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'ruleId' + '}', rule_id.to_s).sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['GenieKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetNotificationRuleStepResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationRuleStepApi#get_notification_rule_step\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_notification_rule_steps(identifier, rule_id, opts = {}) ⇒ ListNotificationRuleStepsResponse
List Notification Rule Steps Returns list of notification rule steps
348 349 350 351 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 348 def list_notification_rule_steps(identifier, rule_id, opts = {}) data, _status_code, _headers = list_notification_rule_steps_with_http_info(identifier, rule_id, opts) data end |
#list_notification_rule_steps_with_http_info(identifier, rule_id, opts = {}) ⇒ Array<(ListNotificationRuleStepsResponse, Fixnum, Hash)>
List Notification Rule Steps Returns list of notification rule steps
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 359 def list_notification_rule_steps_with_http_info(identifier, rule_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationRuleStepApi.list_notification_rule_steps ...' end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling NotificationRuleStepApi.list_notification_rule_steps" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling NotificationRuleStepApi.list_notification_rule_steps" end # resource path local_var_path = '/v2/users/{identifier}/notification-rules/{ruleId}/steps'.sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'ruleId' + '}', rule_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['GenieKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ListNotificationRuleStepsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationRuleStepApi#list_notification_rule_steps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_notification_rule_step(identifier, rule_id, id, opts = {}) ⇒ SuccessResponse
Update Notification Rule Step (Partial) Update a notification rule step with given user identifier, rule id, and notification rule step id
408 409 410 411 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 408 def update_notification_rule_step(identifier, rule_id, id, opts = {}) data, _status_code, _headers = update_notification_rule_step_with_http_info(identifier, rule_id, id, opts) data end |
#update_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>
Update Notification Rule Step (Partial) Update a notification rule step with given user identifier, rule id, and notification rule step id
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/opsgenie_sdk/api/notification_rule_step_api.rb', line 421 def update_notification_rule_step_with_http_info(identifier, rule_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotificationRuleStepApi.update_notification_rule_step ...' end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling NotificationRuleStepApi.update_notification_rule_step" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling NotificationRuleStepApi.update_notification_rule_step" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NotificationRuleStepApi.update_notification_rule_step" end # resource path local_var_path = '/v2/users/{identifier}/notification-rules/{ruleId}/steps/{id}'.sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'ruleId' + '}', rule_id.to_s).sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['GenieKey'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SuccessResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotificationRuleStepApi#update_notification_rule_step\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |