Class Monitor
Defines monitors that will be associated with an AWS AppConfig environment.
Namespace: Amazon.CDK.AWS.AppConfig
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class Monitor : DeputyBase
Syntax (vb)
Public MustInherit Class Monitor Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
Application application;
Alarm alarm;
CompositeAlarm compositeAlarm;
new Environment(this, "MyEnvironment", new EnvironmentProps {
Application = application,
Monitors = new [] { Monitor.FromCloudWatchAlarm(alarm), Monitor.FromCloudWatchAlarm(compositeAlarm) }
});
Synopsis
Constructors
| Monitor() | Defines monitors that will be associated with an AWS AppConfig environment. |
Properties
| AlarmArn | The alarm ARN for AWS AppConfig to monitor. |
| AlarmRoleArn | The IAM role ARN for AWS AppConfig to view the alarm state. |
| IsCompositeAlarm | Indicates whether a CloudWatch alarm is a composite alarm. |
| MonitorType | The type of monitor. |
Methods
| FromCfnMonitorsProperty(IMonitorsProperty) | Creates a Monitor from a CfnEnvironment.MonitorsProperty construct. |
| FromCloudWatchAlarm(IAlarmRef, IRoleRef?) | Creates a Monitor from a CloudWatch alarm. |
Constructors
Monitor()
Defines monitors that will be associated with an AWS AppConfig environment.
protected Monitor()
Remarks
ExampleMetadata: infused
Examples
Application application;
Alarm alarm;
CompositeAlarm compositeAlarm;
new Environment(this, "MyEnvironment", new EnvironmentProps {
Application = application,
Monitors = new [] { Monitor.FromCloudWatchAlarm(alarm), Monitor.FromCloudWatchAlarm(compositeAlarm) }
});
Properties
AlarmArn
The alarm ARN for AWS AppConfig to monitor.
public abstract string AlarmArn { get; }
Property Value
Remarks
ExampleMetadata: infused
AlarmRoleArn
The IAM role ARN for AWS AppConfig to view the alarm state.
public abstract string? AlarmRoleArn { get; }
Property Value
Remarks
ExampleMetadata: infused
IsCompositeAlarm
Indicates whether a CloudWatch alarm is a composite alarm.
public abstract bool? IsCompositeAlarm { get; }
Property Value
bool?
Remarks
ExampleMetadata: infused
MonitorType
The type of monitor.
public abstract MonitorType MonitorType { get; }
Property Value
Remarks
ExampleMetadata: infused
Methods
FromCfnMonitorsProperty(IMonitorsProperty)
Creates a Monitor from a CfnEnvironment.MonitorsProperty construct.
public static Monitor FromCfnMonitorsProperty(CfnEnvironment.IMonitorsProperty monitorsProperty)
Parameters
- monitorsProperty CfnEnvironment.IMonitorsProperty
The monitors property.
Returns
Remarks
ExampleMetadata: infused
FromCloudWatchAlarm(IAlarmRef, IRoleRef?)
Creates a Monitor from a CloudWatch alarm.
public static Monitor FromCloudWatchAlarm(IAlarmRef alarm, IRoleRef? alarmRole = null)
Parameters
- alarm IAlarmRef
The Amazon CloudWatch alarm.
- alarmRole IRoleRef
The IAM role for AWS AppConfig to view the alarm state.
Returns
Remarks
If the alarm role is not specified, a role will be generated.