Chilkat Online Tools

SQL Server / Monitoring API / Removes any existing suppression for the specified alarm.

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'opc-request-id', 'pariatur nostrud eiusmod'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'x-content-sha256', '{{content_sha256}}'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Authorization', '{{signature}}'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Date', '{{date}}'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'if-match', 'pariatur nostrud eiusmod'

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'QuickRequest', @resp OUT, 'POST', 'https://telemetry.{{region}}.oraclecloud.com/20180401/alarms/:alarmId/actions/removeSuppression'
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        RETURN
      END

    EXEC sp_OAGetProperty @resp, 'StatusCode', @iTmp0 OUT
    PRINT @iTmp0
    EXEC sp_OAGetProperty @resp, 'BodyStr', @sTmp0 OUT
    PRINT @sTmp0
    EXEC @hr = sp_OADestroy @resp


    EXEC @hr = sp_OADestroy @http


END
GO

Curl Command

curl -X POST
	-H "if-match: pariatur nostrud eiusmod"
	-H "opc-request-id: pariatur nostrud eiusmod"
	-H "Date: {{date}}"
	-H "Authorization: {{signature}}"
	-H "x-content-sha256: {{content_sha256}}"
https://telemetry.{{region}}.oraclecloud.com/20180401/alarms/:alarmId/actions/removeSuppression

Postman Collection Item JSON

{
  "name": "Removes any existing suppression for the specified alarm.\n",
  "request": {
    "method": "POST",
    "header": [
      {
        "description": "For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`\nparameter to the value of the etag from a previous GET or POST response for that resource.  The resource\nwill be updated or deleted only if the etag you provide matches the resource's current etag value.\n",
        "key": "if-match",
        "value": "pariatur nostrud eiusmod"
      },
      {
        "description": "Customer part of the request identifier token. If you need to contact Oracle about a particular\nrequest, please provide the complete request ID.\n",
        "key": "opc-request-id",
        "value": "pariatur nostrud eiusmod"
      },
      {
        "key": "Date",
        "value": "{{date}}",
        "description": "(Required) Current Date",
        "type": "text"
      },
      {
        "key": "Authorization",
        "value": "{{signature}}",
        "description": "(Required) Signature Authentication on Authorization header",
        "type": "text"
      },
      {
        "key": "x-content-sha256",
        "value": "{{content_sha256}}",
        "description": "(Required) Content sha256 for POST, PUT and PATCH operations",
        "type": "text"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/alarms/:alarmId/actions/removeSuppression",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "alarms",
        ":alarmId",
        "actions",
        "removeSuppression"
      ],
      "variable": [
        {
          "key": "alarmId",
          "value": "mollit in Duis enim",
          "description": "(Required) The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of an alarm.\n"
        }
      ]
    },
    "description": "Removes any existing suppression for the specified alarm.\nFor important limits information, see [Limits on Monitoring](https://docs.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#Limits).\n\nThis call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.\nMonitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,\nor transactions, per second (TPS) for a given tenancy.\n"
  },
  "response": [
    {
      "name": "Successfully removed suppression for the specified alarm.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`\nparameter to the value of the etag from a previous GET or POST response for that resource.  The resource\nwill be updated or deleted only if the etag you provide matches the resource's current etag value.\n",
            "key": "if-match",
            "value": "pariatur nostrud eiusmod"
          },
          {
            "description": "Customer part of the request identifier token. If you need to contact Oracle about a particular\nrequest, please provide the complete request ID.\n",
            "key": "opc-request-id",
            "value": "pariatur nostrud eiusmod"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/alarms/:alarmId/actions/removeSuppression",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "alarms",
            ":alarmId",
            "actions",
            "removeSuppression"
          ],
          "variable": [
            {
              "key": "alarmId"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "opc-request-id",
          "value": "pariatur nostrud eiusmod",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact Oracle about\na particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "Bad Request",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`\nparameter to the value of the etag from a previous GET or POST response for that resource.  The resource\nwill be updated or deleted only if the etag you provide matches the resource's current etag value.\n",
            "key": "if-match",
            "value": "pariatur nostrud eiusmod"
          },
          {
            "description": "Customer part of the request identifier token. If you need to contact Oracle about a particular\nrequest, please provide the complete request ID.\n",
            "key": "opc-request-id",
            "value": "pariatur nostrud eiusmod"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/alarms/:alarmId/actions/removeSuppression",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "alarms",
            ":alarmId",
            "actions",
            "removeSuppression"
          ],
          "variable": [
            {
              "key": "alarmId"
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "pariatur nostrud eiusmod",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact Oracle about\na particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"qui anim ut\",\n \"message\": \"esse proident\"\n}"
    },
    {
      "name": "Unauthorized",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`\nparameter to the value of the etag from a previous GET or POST response for that resource.  The resource\nwill be updated or deleted only if the etag you provide matches the resource's current etag value.\n",
            "key": "if-match",
            "value": "pariatur nostrud eiusmod"
          },
          {
            "description": "Customer part of the request identifier token. If you need to contact Oracle about a particular\nrequest, please provide the complete request ID.\n",
            "key": "opc-request-id",
            "value": "pariatur nostrud eiusmod"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/alarms/:alarmId/actions/removeSuppression",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "alarms",
            ":alarmId",
            "actions",
            "removeSuppression"
          ],
          "variable": [
            {
              "key": "alarmId"
            }
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "pariatur nostrud eiusmod",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact Oracle about\na particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"qui anim ut\",\n \"message\": \"esse proident\"\n}"
    },
    {
      "name": "Conflict",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`\nparameter to the value of the etag from a previous GET or POST response for that resource.  The resource\nwill be updated or deleted only if the etag you provide matches the resource's current etag value.\n",
            "key": "if-match",
            "value": "pariatur nostrud eiusmod"
          },
          {
            "description": "Customer part of the request identifier token. If you need to contact Oracle about a particular\nrequest, please provide the complete request ID.\n",
            "key": "opc-request-id",
            "value": "pariatur nostrud eiusmod"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/alarms/:alarmId/actions/removeSuppression",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "alarms",
            ":alarmId",
            "actions",
            "removeSuppression"
          ],
          "variable": [
            {
              "key": "alarmId"
            }
          ]
        }
      },
      "status": "Conflict",
      "code": 409,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "pariatur nostrud eiusmod",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact Oracle about\na particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"qui anim ut\",\n \"message\": \"esse proident\"\n}"
    },
    {
      "name": "Precondition Failed",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`\nparameter to the value of the etag from a previous GET or POST response for that resource.  The resource\nwill be updated or deleted only if the etag you provide matches the resource's current etag value.\n",
            "key": "if-match",
            "value": "pariatur nostrud eiusmod"
          },
          {
            "description": "Customer part of the request identifier token. If you need to contact Oracle about a particular\nrequest, please provide the complete request ID.\n",
            "key": "opc-request-id",
            "value": "pariatur nostrud eiusmod"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/alarms/:alarmId/actions/removeSuppression",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "alarms",
            ":alarmId",
            "actions",
            "removeSuppression"
          ],
          "variable": [
            {
              "key": "alarmId"
            }
          ]
        }
      },
      "status": "Precondition Failed",
      "code": 412,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "pariatur nostrud eiusmod",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact Oracle about\na particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"qui anim ut\",\n \"message\": \"esse proident\"\n}"
    },
    {
      "name": "Client is getting throttled, please retry with backoff.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`\nparameter to the value of the etag from a previous GET or POST response for that resource.  The resource\nwill be updated or deleted only if the etag you provide matches the resource's current etag value.\n",
            "key": "if-match",
            "value": "pariatur nostrud eiusmod"
          },
          {
            "description": "Customer part of the request identifier token. If you need to contact Oracle about a particular\nrequest, please provide the complete request ID.\n",
            "key": "opc-request-id",
            "value": "pariatur nostrud eiusmod"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/alarms/:alarmId/actions/removeSuppression",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "alarms",
            ":alarmId",
            "actions",
            "removeSuppression"
          ],
          "variable": [
            {
              "key": "alarmId"
            }
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "pariatur nostrud eiusmod",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact Oracle about\na particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"qui anim ut\",\n \"message\": \"esse proident\"\n}"
    },
    {
      "name": "Internal Server Error",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`\nparameter to the value of the etag from a previous GET or POST response for that resource.  The resource\nwill be updated or deleted only if the etag you provide matches the resource's current etag value.\n",
            "key": "if-match",
            "value": "pariatur nostrud eiusmod"
          },
          {
            "description": "Customer part of the request identifier token. If you need to contact Oracle about a particular\nrequest, please provide the complete request ID.\n",
            "key": "opc-request-id",
            "value": "pariatur nostrud eiusmod"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/alarms/:alarmId/actions/removeSuppression",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "alarms",
            ":alarmId",
            "actions",
            "removeSuppression"
          ],
          "variable": [
            {
              "key": "alarmId"
            }
          ]
        }
      },
      "status": "Internal Server Error",
      "code": 500,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "pariatur nostrud eiusmod",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact Oracle about\na particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"qui anim ut\",\n \"message\": \"esse proident\"\n}"
    },
    {
      "name": "An error has occurred.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`\nparameter to the value of the etag from a previous GET or POST response for that resource.  The resource\nwill be updated or deleted only if the etag you provide matches the resource's current etag value.\n",
            "key": "if-match",
            "value": "pariatur nostrud eiusmod"
          },
          {
            "description": "Customer part of the request identifier token. If you need to contact Oracle about a particular\nrequest, please provide the complete request ID.\n",
            "key": "opc-request-id",
            "value": "pariatur nostrud eiusmod"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/alarms/:alarmId/actions/removeSuppression",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "alarms",
            ":alarmId",
            "actions",
            "removeSuppression"
          ],
          "variable": [
            {
              "key": "alarmId"
            }
          ]
        }
      },
      "status": "Internal Server Error",
      "code": 500,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "pariatur nostrud eiusmod",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact Oracle about\na particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"qui anim ut\",\n \"message\": \"esse proident\"\n}"
    }
  ]
}