Skip to main content

alarms

Creates, updates, deletes, gets or lists an alarms resource.

Overview​

Namealarms
TypeResource
Idoci.monitoring.alarms

Fields​

The following fields are returned by SELECT queries:

Successfully retrieved alarm.

NameDatatypeDescription
idstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the alarm.
alarmSummarystringCustomizable alarm summary (alarmSummary [alarm message parameter](/iaas/Content/Monitoring/alarm-message-format.htm)). Optionally include [dynamic variables](/iaas/Content/Monitoring/Tasks/update-alarm-dynamic-variables.htm). The alarm summary appears within the body of the alarm message and in responses to [ListAlarmStatus](#/en/monitoring/latest/AlarmStatusSummary/ListAlarmsStatus) [GetAlarmHistory](#/en/monitoring/latest/AlarmHistoryCollection/GetAlarmHistory) and [RetrieveDimensionStates](#/en/monitoring/latest/AlarmDimensionStatesCollection/RetrieveDimensionStates).
bodystringThe human-readable content of the delivered alarm notification. Optionally include [dynamic variables](/iaas/Content/Monitoring/Tasks/update-alarm-dynamic-variables.htm). Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the alarm.
definedTagsobjectUsage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations": {"CostCenter": "42"}}
destinationsarrayA list of destinations for alarm notifications. Each destination is represented by the [OCID](/iaas/Content/General/Concepts/identifiers.htm) of a related resource, such as a [topic](#/en/notification/latest/NotificationTopic). Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
displayNamestringA user-friendly name for the alarm. It does not have to be unique, and it's changeable. This value determines the title of each alarm notification. Example: High CPU Utilization
evaluationSlackDurationstringCustomizable slack period to wait for metric ingestion before evaluating the alarm. Specify a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT3M. Maximum: PT2H. Default: PT3M. For more information about the slack period, see [About the Internal Reset Period](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#reset).
freeformTagsobjectSimple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
isEnabledbooleanWhether the alarm is enabled. Example: true
isNotificationsPerMetricDimensionEnabledbooleanWhen set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams.
lifecycleStatestringThe current lifecycle state of the alarm. Example: DELETED (ACTIVE, DELETING, DELETED)
messageFormatstringThe format to use for alarm notifications. The formats are: * RAW - Raw JSON blob. Default value. When the destinations attribute specifies Streaming, all alarm notifications use this format. * PRETTY_JSON: JSON with new lines and indents. Available when the destinations attribute specifies Notifications only. * ONS_OPTIMIZED: Simplified, user-friendly layout. Available when the destinations attribute specifies Notifications only. Applies to Email subscription types only. (RAW, PRETTY_JSON, ONS_OPTIMIZED) (default: RAW)
metricCompartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the metric being evaluated by the alarm.
metricCompartmentIdInSubtreebooleanWhen true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
namespacestringThe source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
notificationTitlestringCustomizable notification title (title [alarm message parameter](/iaas/Content/Monitoring/alarm-message-format.htm)). Optionally include [dynamic variables](/iaas/Content/Monitoring/Tasks/update-alarm-dynamic-variables.htm). The notification title appears as the subject line in a formatted email message and as the title in a Slack message.
notificationVersionstringThe version of the alarm notification to be delivered. Allowed value: 1.X The value must start with a number (up to four digits), followed by a period and an uppercase X.
overridesarrayA set of overrides that control evaluations of the alarm. Each override can specify values for query, severity, body, and pending duration. When an alarm contains overrides, the Monitoring service evaluates each override in order, beginning with the first override in the array (index position 0), and then evaluates the alarm's base values (ruleName value of BASE).
pendingDurationstringThe period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING". The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT24H. Default: PT1M. Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING". The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute. Example: PT5M
querystringThe Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Also, you can customize the [absence detection period](/iaas/Content/Monitoring/Tasks/create-edit-alarm-query-absence-detection-period.htm). Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see [Editing the MQL Expression for a Query](/iaas/Content/Monitoring/Tasks/query-metric-mql.htm). For details about MQL, see [Monitoring Query Language (MQL) Reference](/iaas/Content/Monitoring/Reference/mql.htm). For available dimensions, review the metric definition for the supported service. See [Supported Services](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#SupportedServices). Example of threshold alarm: ----- CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85 ----- Example of absence alarm: ----- CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent() ----- Example of absence alarm with custom absence detection period of 20 hours: ----- CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent(20h) -----
repeatNotificationDurationstringThe frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. As another example, PT0M indicates a repeat notification each time the alarm trigger condition is met, otherwise known as an event-based notification. For more information, see [Getting Event-Based Notifications for an Alarm](/iaas/Content/Monitoring/Tasks/update-alarm-event.htm). Minimum: PT0M. Maximum: P30D.
resolutionstringThe time between calculated aggregation windows for the alarm. Supported value: 1m
resourceGroupstringResource group to match for metric data retrieved by the alarm. A resource group is a custom string that you can match when retrieving custom metrics. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Example: frontend-fleet
ruleNamestringIdentifier of the alarm's base values for alarm evaluation, for use when the alarm contains overrides. Default value is BASE. For information about alarm overrides, see [AlarmOverride](#/en/monitoring/latest/datatypes/AlarmOverride).
severitystringThe perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL (CRITICAL, ERROR, WARNING, INFO)
suppressionobjectThe configuration details for an alarm-wide suppression. For dimension-specific suppressions, see [AlarmSuppression](#/en/monitoring/latest/AlarmSuppression). For information about alarms, see [Alarms Overview](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#AlarmsOverview). (x-example: {<br /> "description": "Planned outage due to change IT-1234.",<br /> "timeSuppressFrom": "2023-02-01T01:02:29.600Z",<br /> "timeSuppressUntil": "2023-02-01T02:02:29.600Z"<br />}<br />)
timeCreatedstring (date-time)The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
timeUpdatedstring (date-time)The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectalarmId, regionopc-request-idGets the specified alarm.<br />For more information, see<br />[Getting an Alarm](/iaas/Content/Monitoring/Tasks/get-alarm.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />
listselectcompartmentId, regionopc-request-id, page, limit, displayName, lifecycleState, sortBy, sortOrder, compartmentIdInSubtreeLists the alarms for the specified compartment.<br />For more information, see<br />[Listing Alarms](/iaas/Content/Monitoring/Tasks/list-alarm.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />
createinsertregion, displayName, compartmentId, metricCompartmentId, namespace, query, severity, destinations, isEnabledopc-request-id, opc-retry-tokenCreates a new alarm in the specified compartment.<br />For more information, see<br />[Creating an Alarm](/iaas/Content/Monitoring/Tasks/create-alarm.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />
updateupdatealarmId, regionif-match, opc-request-idUpdates the specified alarm.<br />For more information, see<br />[Updating an Alarm](/iaas/Content/Monitoring/Tasks/update-alarm.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />
deletedeletealarmId, regionif-match, opc-request-idDeletes the specified alarm.<br />For more information, see<br />[Deleting an Alarm](/iaas/Content/Monitoring/Tasks/delete-alarm.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />
change_compartmentexecalarmId, region, compartmentIdif-match, opc-request-id, opc-retry-tokenMoves an alarm into a different compartment within the same tenancy.<br />For more information, see<br />[Moving an Alarm](/iaas/Content/Monitoring/Tasks/change-compartment-alarm.htm).<br />
remove_alarm_suppressionexecalarmId, regionif-match, opc-request-idRemoves any existing suppression for the specified alarm.<br />For more information, see<br />[Removing a Suppression from a Single Alarm](/iaas/Content/Monitoring/Tasks/delete-alarm-suppression.htm) and<br />[Removing a Suppression from Multiple Alarms](/iaas/Content/Monitoring/Tasks/delete-alarm-suppression-multiple.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />
retrieve_dimension_statesexecalarmId, regionopc-request-id, page, limitLists the current alarm status of each metric stream, where status is derived from the metric stream's last associated transition.<br />Optionally filter by status value and one or more dimension key-value pairs.<br /><br />For more information, see<br />[Listing Metric Stream Status in an Alarm](/iaas/Content/Monitoring/Tasks/list-alarm-status-metric-stream.htm).<br /><br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />
summarize_alarm_suppression_historyexecalarmId, regionopc-request-id, page, limitReturns history of suppressions for the specified alarm, including both dimension-specific and and alarm-wide suppressions. For more information, see<br />[Getting Suppression History for an Alarm](/iaas/Content/Monitoring/Tasks/summarize-alarm-suppression-history.htm).<br /><br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
alarmIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of an alarm.
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
compartmentIdInSubtreebooleanWhen true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
displayNamestringA filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.
if-matchstringFor optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
lifecycleStatestringA filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.
limitintegerFor list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Default: 1000 Example: 500
opc-request-idstringCustomer part of the request identifier token. If you need to contact Oracle about a particular request, please provide the complete request ID.
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
pagestringFor list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).
sortBystringThe field to use when sorting returned alarm definitions. Only one sorting level is provided. Example: severity
sortOrderstringThe sort order to use when sorting returned alarm definitions. Ascending (ASC) or descending (DESC). Example: ASC

SELECT examples​

Gets the specified alarm.<br />For more information, see<br />[Getting an Alarm](/iaas/Content/Monitoring/Tasks/get-alarm.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />

SELECT
id,
alarmSummary,
body,
compartmentId,
definedTags,
destinations,
displayName,
evaluationSlackDuration,
freeformTags,
isEnabled,
isNotificationsPerMetricDimensionEnabled,
lifecycleState,
messageFormat,
metricCompartmentId,
metricCompartmentIdInSubtree,
namespace,
notificationTitle,
notificationVersion,
overrides,
pendingDuration,
query,
repeatNotificationDuration,
resolution,
resourceGroup,
ruleName,
severity,
suppression,
timeCreated,
timeUpdated
FROM oci.monitoring.alarms
WHERE alarmId = '{{ alarmId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;

INSERT examples​

Creates a new alarm in the specified compartment.<br />For more information, see<br />[Creating an Alarm](/iaas/Content/Monitoring/Tasks/create-alarm.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />

INSERT INTO oci.monitoring.alarms (
alarmSummary,
body,
compartmentId,
definedTags,
destinations,
displayName,
evaluationSlackDuration,
freeformTags,
isEnabled,
isNotificationsPerMetricDimensionEnabled,
messageFormat,
metricCompartmentId,
metricCompartmentIdInSubtree,
namespace,
notificationTitle,
notificationVersion,
overrides,
pendingDuration,
query,
repeatNotificationDuration,
resolution,
resourceGroup,
ruleName,
severity,
suppression,
region,
opc-request-id,
opc-retry-token
)
SELECT
'{{ alarmSummary }}',
'{{ body }}',
'{{ compartmentId }}' /* required */,
'{{ definedTags }}',
'{{ destinations }}' /* required */,
'{{ displayName }}' /* required */,
'{{ evaluationSlackDuration }}',
'{{ freeformTags }}',
{{ isEnabled }} /* required */,
{{ isNotificationsPerMetricDimensionEnabled }},
'{{ messageFormat }}',
'{{ metricCompartmentId }}' /* required */,
{{ metricCompartmentIdInSubtree }},
'{{ namespace }}' /* required */,
'{{ notificationTitle }}',
'{{ notificationVersion }}',
'{{ overrides }}',
'{{ pendingDuration }}',
'{{ query }}' /* required */,
'{{ repeatNotificationDuration }}',
'{{ resolution }}',
'{{ resourceGroup }}',
'{{ ruleName }}',
'{{ severity }}' /* required */,
'{{ suppression }}',
'{{ region }}',
'{{ opc-request-id }}',
'{{ opc-retry-token }}'
RETURNING
id,
alarmSummary,
body,
compartmentId,
definedTags,
destinations,
displayName,
evaluationSlackDuration,
freeformTags,
isEnabled,
isNotificationsPerMetricDimensionEnabled,
lifecycleState,
messageFormat,
metricCompartmentId,
metricCompartmentIdInSubtree,
namespace,
notificationTitle,
notificationVersion,
overrides,
pendingDuration,
query,
repeatNotificationDuration,
resolution,
resourceGroup,
ruleName,
severity,
suppression,
timeCreated,
timeUpdated
;

UPDATE examples​

Updates the specified alarm.<br />For more information, see<br />[Updating an Alarm](/iaas/Content/Monitoring/Tasks/update-alarm.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />

UPDATE oci.monitoring.alarms
SET
alarmSummary = '{{ alarmSummary }}',
body = '{{ body }}',
compartmentId = '{{ compartmentId }}',
definedTags = '{{ definedTags }}',
destinations = '{{ destinations }}',
displayName = '{{ displayName }}',
evaluationSlackDuration = '{{ evaluationSlackDuration }}',
freeformTags = '{{ freeformTags }}',
isEnabled = {{ isEnabled }},
isNotificationsPerMetricDimensionEnabled = {{ isNotificationsPerMetricDimensionEnabled }},
messageFormat = '{{ messageFormat }}',
metricCompartmentId = '{{ metricCompartmentId }}',
metricCompartmentIdInSubtree = {{ metricCompartmentIdInSubtree }},
namespace = '{{ namespace }}',
notificationTitle = '{{ notificationTitle }}',
notificationVersion = '{{ notificationVersion }}',
overrides = '{{ overrides }}',
pendingDuration = '{{ pendingDuration }}',
query = '{{ query }}',
repeatNotificationDuration = '{{ repeatNotificationDuration }}',
resolution = '{{ resolution }}',
resourceGroup = '{{ resourceGroup }}',
ruleName = '{{ ruleName }}',
severity = '{{ severity }}',
suppression = '{{ suppression }}'
WHERE
alarmId = '{{ alarmId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
AND opc-request-id = '{{ opc-request-id}}'
RETURNING
id,
alarmSummary,
body,
compartmentId,
definedTags,
destinations,
displayName,
evaluationSlackDuration,
freeformTags,
isEnabled,
isNotificationsPerMetricDimensionEnabled,
lifecycleState,
messageFormat,
metricCompartmentId,
metricCompartmentIdInSubtree,
namespace,
notificationTitle,
notificationVersion,
overrides,
pendingDuration,
query,
repeatNotificationDuration,
resolution,
resourceGroup,
ruleName,
severity,
suppression,
timeCreated,
timeUpdated;

DELETE examples​

Deletes the specified alarm.<br />For more information, see<br />[Deleting an Alarm](/iaas/Content/Monitoring/Tasks/delete-alarm.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations.<br />Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests,<br />or transactions, per second (TPS) for a given tenancy.<br />

DELETE FROM oci.monitoring.alarms
WHERE alarmId = '{{ alarmId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
AND opc-request-id = '{{ opc-request-id }}'
;

Lifecycle Methods​

Moves an alarm into a different compartment within the same tenancy.<br />For more information, see<br />[Moving an Alarm](/iaas/Content/Monitoring/Tasks/change-compartment-alarm.htm).<br />

EXEC oci.monitoring.alarms.change_compartment
@alarmId='{{ alarmId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-request-id='{{ opc-request-id }}',
@opc-retry-token='{{ opc-retry-token }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;