class Monitor
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.AppConfig.Monitor |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappconfig#Monitor |
Java | software.amazon.awscdk.services.appconfig.Monitor |
Python | aws_cdk.aws_appconfig.Monitor |
TypeScript (source) | aws-cdk-lib » aws_appconfig » Monitor |
Defines monitors that will be associated with an AWS AppConfig environment.
Example
declare const application: appconfig.Application;
declare const alarm: cloudwatch.Alarm;
declare const compositeAlarm: cloudwatch.CompositeAlarm;
new appconfig.Environment(this, 'MyEnvironment', {
application,
monitors: [
appconfig.Monitor.fromCloudWatchAlarm(alarm),
appconfig.Monitor.fromCloudWatchAlarm(compositeAlarm),
],
});
Initializer
new Monitor()
Properties
| Name | Type | Description |
|---|---|---|
| alarm | string | The alarm ARN for AWS AppConfig to monitor. |
| monitor | Monitor | The type of monitor. |
| alarm | string | The IAM role ARN for AWS AppConfig to view the alarm state. |
| is | boolean | Indicates whether a CloudWatch alarm is a composite alarm. |
alarmArn
Type:
string
The alarm ARN for AWS AppConfig to monitor.
monitorType
Type:
Monitor
The type of monitor.
alarmRoleArn?
Type:
string
(optional)
The IAM role ARN for AWS AppConfig to view the alarm state.
isCompositeAlarm?
Type:
boolean
(optional)
Indicates whether a CloudWatch alarm is a composite alarm.
Methods
| Name | Description |
|---|---|
| static from | Creates a Monitor from a CfnEnvironment.MonitorsProperty construct. |
| static from | Creates a Monitor from a CloudWatch alarm. |
static fromCfnMonitorsProperty(monitorsProperty)
public static fromCfnMonitorsProperty(monitorsProperty: MonitorsProperty): Monitor
Parameters
- monitorsProperty
Monitors— The monitors property.Property
Returns
Creates a Monitor from a CfnEnvironment.MonitorsProperty construct.
static fromCloudWatchAlarm(alarm, alarmRole?)
public static fromCloudWatchAlarm(alarm: IAlarm, alarmRole?: IRoleRef): Monitor
Parameters
- alarm
IAlarm— The Amazon CloudWatch alarm. - alarmRole
IRole— The IAM role for AWS AppConfig to view the alarm state.Ref
Returns
Creates a Monitor from a CloudWatch alarm.
If the alarm role is not specified, a role will be generated.

.NET
Go
Java
Python
TypeScript (