oci.Monitoring.getAlarmHistoryCollection
Explore with Pulumi AI
This data source provides details about a specific Alarm History Collection resource in Oracle Cloud Infrastructure Monitoring service.
Get the history of the specified alarm. For more information, see Getting History of an Alarm. For important limits information, see Limits on Monitoring.
This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations. Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, or transactions, per second (TPS) for a given tenancy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testAlarmHistoryCollection = oci.Monitoring.getAlarmHistoryCollection({
alarmId: testAlarm.id,
alarmHistorytype: alarmHistoryCollectionAlarmHistorytype,
timestampGreaterThanOrEqualTo: alarmHistoryCollectionTimestampGreaterThanOrEqualTo,
timestampLessThan: alarmHistoryCollectionTimestampLessThan,
});
import pulumi
import pulumi_oci as oci
test_alarm_history_collection = oci.Monitoring.get_alarm_history_collection(alarm_id=test_alarm["id"],
alarm_historytype=alarm_history_collection_alarm_historytype,
timestamp_greater_than_or_equal_to=alarm_history_collection_timestamp_greater_than_or_equal_to,
timestamp_less_than=alarm_history_collection_timestamp_less_than)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Monitoring"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Monitoring.GetAlarmHistoryCollection(ctx, &monitoring.GetAlarmHistoryCollectionArgs{
AlarmId: testAlarm.Id,
AlarmHistorytype: pulumi.StringRef(alarmHistoryCollectionAlarmHistorytype),
TimestampGreaterThanOrEqualTo: pulumi.StringRef(alarmHistoryCollectionTimestampGreaterThanOrEqualTo),
TimestampLessThan: pulumi.StringRef(alarmHistoryCollectionTimestampLessThan),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testAlarmHistoryCollection = Oci.Monitoring.GetAlarmHistoryCollection.Invoke(new()
{
AlarmId = testAlarm.Id,
AlarmHistorytype = alarmHistoryCollectionAlarmHistorytype,
TimestampGreaterThanOrEqualTo = alarmHistoryCollectionTimestampGreaterThanOrEqualTo,
TimestampLessThan = alarmHistoryCollectionTimestampLessThan,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Monitoring.MonitoringFunctions;
import com.pulumi.oci.Monitoring.inputs.GetAlarmHistoryCollectionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var testAlarmHistoryCollection = MonitoringFunctions.getAlarmHistoryCollection(GetAlarmHistoryCollectionArgs.builder()
.alarmId(testAlarm.id())
.alarmHistorytype(alarmHistoryCollectionAlarmHistorytype)
.timestampGreaterThanOrEqualTo(alarmHistoryCollectionTimestampGreaterThanOrEqualTo)
.timestampLessThan(alarmHistoryCollectionTimestampLessThan)
.build());
}
}
variables:
testAlarmHistoryCollection:
fn::invoke:
Function: oci:Monitoring:getAlarmHistoryCollection
Arguments:
alarmId: ${testAlarm.id}
alarmHistorytype: ${alarmHistoryCollectionAlarmHistorytype}
timestampGreaterThanOrEqualTo: ${alarmHistoryCollectionTimestampGreaterThanOrEqualTo}
timestampLessThan: ${alarmHistoryCollectionTimestampLessThan}
Using getAlarmHistoryCollection
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAlarmHistoryCollection(args: GetAlarmHistoryCollectionArgs, opts?: InvokeOptions): Promise<GetAlarmHistoryCollectionResult>
function getAlarmHistoryCollectionOutput(args: GetAlarmHistoryCollectionOutputArgs, opts?: InvokeOptions): Output<GetAlarmHistoryCollectionResult>
def get_alarm_history_collection(alarm_historytype: Optional[str] = None,
alarm_id: Optional[str] = None,
timestamp_greater_than_or_equal_to: Optional[str] = None,
timestamp_less_than: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAlarmHistoryCollectionResult
def get_alarm_history_collection_output(alarm_historytype: Optional[pulumi.Input[str]] = None,
alarm_id: Optional[pulumi.Input[str]] = None,
timestamp_greater_than_or_equal_to: Optional[pulumi.Input[str]] = None,
timestamp_less_than: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAlarmHistoryCollectionResult]
func GetAlarmHistoryCollection(ctx *Context, args *GetAlarmHistoryCollectionArgs, opts ...InvokeOption) (*GetAlarmHistoryCollectionResult, error)
func GetAlarmHistoryCollectionOutput(ctx *Context, args *GetAlarmHistoryCollectionOutputArgs, opts ...InvokeOption) GetAlarmHistoryCollectionResultOutput
> Note: This function is named GetAlarmHistoryCollection
in the Go SDK.
public static class GetAlarmHistoryCollection
{
public static Task<GetAlarmHistoryCollectionResult> InvokeAsync(GetAlarmHistoryCollectionArgs args, InvokeOptions? opts = null)
public static Output<GetAlarmHistoryCollectionResult> Invoke(GetAlarmHistoryCollectionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAlarmHistoryCollectionResult> getAlarmHistoryCollection(GetAlarmHistoryCollectionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Monitoring/getAlarmHistoryCollection:getAlarmHistoryCollection
arguments:
# arguments dictionary
The following arguments are supported:
- Alarm
Id string - The OCID of an alarm.
- Alarm
Historytype string - The type of history entries to retrieve. State history (STATE_HISTORY), state transition history (STATE_TRANSITION_HISTORY), rule history (RULE_HISTORY) or rule transition history (RULE_TRANSITION_HISTORY). If not specified, entries of all types are retrieved. Example:
STATE_HISTORY
- Timestamp
Greater stringThan Or Equal To - A filter to return only alarm history entries with timestamps occurring on or after the specified date and time. Format defined by RFC3339. Example:
2023-01-01T01:00:00.789Z
- Timestamp
Less stringThan - A filter to return only alarm history entries with timestamps occurring before the specified date and time. Format defined by RFC3339. Example:
2023-01-02T01:00:00.789Z
- Alarm
Id string - The OCID of an alarm.
- Alarm
Historytype string - The type of history entries to retrieve. State history (STATE_HISTORY), state transition history (STATE_TRANSITION_HISTORY), rule history (RULE_HISTORY) or rule transition history (RULE_TRANSITION_HISTORY). If not specified, entries of all types are retrieved. Example:
STATE_HISTORY
- Timestamp
Greater stringThan Or Equal To - A filter to return only alarm history entries with timestamps occurring on or after the specified date and time. Format defined by RFC3339. Example:
2023-01-01T01:00:00.789Z
- Timestamp
Less stringThan - A filter to return only alarm history entries with timestamps occurring before the specified date and time. Format defined by RFC3339. Example:
2023-01-02T01:00:00.789Z
- alarm
Id String - The OCID of an alarm.
- alarm
Historytype String - The type of history entries to retrieve. State history (STATE_HISTORY), state transition history (STATE_TRANSITION_HISTORY), rule history (RULE_HISTORY) or rule transition history (RULE_TRANSITION_HISTORY). If not specified, entries of all types are retrieved. Example:
STATE_HISTORY
- timestamp
Greater StringThan Or Equal To - A filter to return only alarm history entries with timestamps occurring on or after the specified date and time. Format defined by RFC3339. Example:
2023-01-01T01:00:00.789Z
- timestamp
Less StringThan - A filter to return only alarm history entries with timestamps occurring before the specified date and time. Format defined by RFC3339. Example:
2023-01-02T01:00:00.789Z
- alarm
Id string - The OCID of an alarm.
- alarm
Historytype string - The type of history entries to retrieve. State history (STATE_HISTORY), state transition history (STATE_TRANSITION_HISTORY), rule history (RULE_HISTORY) or rule transition history (RULE_TRANSITION_HISTORY). If not specified, entries of all types are retrieved. Example:
STATE_HISTORY
- timestamp
Greater stringThan Or Equal To - A filter to return only alarm history entries with timestamps occurring on or after the specified date and time. Format defined by RFC3339. Example:
2023-01-01T01:00:00.789Z
- timestamp
Less stringThan - A filter to return only alarm history entries with timestamps occurring before the specified date and time. Format defined by RFC3339. Example:
2023-01-02T01:00:00.789Z
- alarm_
id str - The OCID of an alarm.
- alarm_
historytype str - The type of history entries to retrieve. State history (STATE_HISTORY), state transition history (STATE_TRANSITION_HISTORY), rule history (RULE_HISTORY) or rule transition history (RULE_TRANSITION_HISTORY). If not specified, entries of all types are retrieved. Example:
STATE_HISTORY
- timestamp_
greater_ strthan_ or_ equal_ to - A filter to return only alarm history entries with timestamps occurring on or after the specified date and time. Format defined by RFC3339. Example:
2023-01-01T01:00:00.789Z
- timestamp_
less_ strthan - A filter to return only alarm history entries with timestamps occurring before the specified date and time. Format defined by RFC3339. Example:
2023-01-02T01:00:00.789Z
- alarm
Id String - The OCID of an alarm.
- alarm
Historytype String - The type of history entries to retrieve. State history (STATE_HISTORY), state transition history (STATE_TRANSITION_HISTORY), rule history (RULE_HISTORY) or rule transition history (RULE_TRANSITION_HISTORY). If not specified, entries of all types are retrieved. Example:
STATE_HISTORY
- timestamp
Greater StringThan Or Equal To - A filter to return only alarm history entries with timestamps occurring on or after the specified date and time. Format defined by RFC3339. Example:
2023-01-01T01:00:00.789Z
- timestamp
Less StringThan - A filter to return only alarm history entries with timestamps occurring before the specified date and time. Format defined by RFC3339. Example:
2023-01-02T01:00:00.789Z
getAlarmHistoryCollection Result
The following output properties are available:
- Alarm
Id string - The OCID of the alarm to retrieve history for.
- Entries
List<Get
Alarm History Collection Entry> - The set of history entries retrieved for the alarm.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Enabled bool - Whether the alarm is enabled. Example:
true
- Alarm
Historytype string - Timestamp
Greater stringThan Or Equal To - Timestamp
Less stringThan
- Alarm
Id string - The OCID of the alarm to retrieve history for.
- Entries
[]Get
Alarm History Collection Entry - The set of history entries retrieved for the alarm.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Enabled bool - Whether the alarm is enabled. Example:
true
- Alarm
Historytype string - Timestamp
Greater stringThan Or Equal To - Timestamp
Less stringThan
- alarm
Id String - The OCID of the alarm to retrieve history for.
- entries
List<Get
Alarm History Collection Entry> - The set of history entries retrieved for the alarm.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Enabled Boolean - Whether the alarm is enabled. Example:
true
- alarm
Historytype String - timestamp
Greater StringThan Or Equal To - timestamp
Less StringThan
- alarm
Id string - The OCID of the alarm to retrieve history for.
- entries
Get
Alarm History Collection Entry[] - The set of history entries retrieved for the alarm.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Enabled boolean - Whether the alarm is enabled. Example:
true
- alarm
Historytype string - timestamp
Greater stringThan Or Equal To - timestamp
Less stringThan
- alarm_
id str - The OCID of the alarm to retrieve history for.
- entries
Sequence[monitoring.
Get Alarm History Collection Entry] - The set of history entries retrieved for the alarm.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
enabled bool - Whether the alarm is enabled. Example:
true
- alarm_
historytype str - timestamp_
greater_ strthan_ or_ equal_ to - timestamp_
less_ strthan
- alarm
Id String - The OCID of the alarm to retrieve history for.
- entries List<Property Map>
- The set of history entries retrieved for the alarm.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Enabled Boolean - Whether the alarm is enabled. Example:
true
- alarm
Historytype String - timestamp
Greater StringThan Or Equal To - timestamp
Less StringThan
Supporting Types
GetAlarmHistoryCollectionEntry
- Alarm
Summary string - Customizable alarm summary (
alarmSummary
alarm message parameter). Optionally include dynamic variables. The alarm summary appears within the body of the alarm message and in responses to ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates. - Summary string
- Description for this alarm history entry.
- Timestamp string
- Timestamp for this alarm history entry. Format defined by RFC3339. Example:
2023-02-01T01:02:29.600Z
- Timestamp
Triggered string - Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Available for state transition entries only. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example:
2023-02-01T0:59:00.789Z
- Alarm
Summary string - Customizable alarm summary (
alarmSummary
alarm message parameter). Optionally include dynamic variables. The alarm summary appears within the body of the alarm message and in responses to ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates. - Summary string
- Description for this alarm history entry.
- Timestamp string
- Timestamp for this alarm history entry. Format defined by RFC3339. Example:
2023-02-01T01:02:29.600Z
- Timestamp
Triggered string - Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Available for state transition entries only. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example:
2023-02-01T0:59:00.789Z
- alarm
Summary String - Customizable alarm summary (
alarmSummary
alarm message parameter). Optionally include dynamic variables. The alarm summary appears within the body of the alarm message and in responses to ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates. - summary String
- Description for this alarm history entry.
- timestamp String
- Timestamp for this alarm history entry. Format defined by RFC3339. Example:
2023-02-01T01:02:29.600Z
- timestamp
Triggered String - Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Available for state transition entries only. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example:
2023-02-01T0:59:00.789Z
- alarm
Summary string - Customizable alarm summary (
alarmSummary
alarm message parameter). Optionally include dynamic variables. The alarm summary appears within the body of the alarm message and in responses to ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates. - summary string
- Description for this alarm history entry.
- timestamp string
- Timestamp for this alarm history entry. Format defined by RFC3339. Example:
2023-02-01T01:02:29.600Z
- timestamp
Triggered string - Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Available for state transition entries only. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example:
2023-02-01T0:59:00.789Z
- alarm_
summary str - Customizable alarm summary (
alarmSummary
alarm message parameter). Optionally include dynamic variables. The alarm summary appears within the body of the alarm message and in responses to ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates. - summary str
- Description for this alarm history entry.
- timestamp str
- Timestamp for this alarm history entry. Format defined by RFC3339. Example:
2023-02-01T01:02:29.600Z
- timestamp_
triggered str - Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Available for state transition entries only. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example:
2023-02-01T0:59:00.789Z
- alarm
Summary String - Customizable alarm summary (
alarmSummary
alarm message parameter). Optionally include dynamic variables. The alarm summary appears within the body of the alarm message and in responses to ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates. - summary String
- Description for this alarm history entry.
- timestamp String
- Timestamp for this alarm history entry. Format defined by RFC3339. Example:
2023-02-01T01:02:29.600Z
- timestamp
Triggered String - Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Available for state transition entries only. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example:
2023-02-01T0:59:00.789Z
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.