Skip to content

Commit

Permalink
Rename cloudwatch metrics_alarm (ansible-collections#1304)
Browse files Browse the repository at this point in the history
Rename cloudwatch metrics_alarm

SUMMARY
In line with the new naming guidelines rename ec2_metric_alarm to cloudwatch_metric_alarm
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/modules/cloudwatch_metric_alarm.py
plugins/modules/ec2_metric_alarm.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
  • Loading branch information
tremble authored Jul 4, 2022
1 parent 1fca01a commit 941f289
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions ec2_metric_alarm.py → cloudwatch_metric_alarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@


DOCUMENTATION = r'''
module: ec2_metric_alarm
short_description: "Create/update or delete AWS Cloudwatch 'metric alarms'"
module: cloudwatch_metric_alarm
short_description: "Create/update or delete AWS CloudWatch 'metric alarms'"
version_added: 1.0.0
description:
- Can create or delete AWS metric alarms.
- Can create or delete AWS CloudWatch metric alarms.
- Metrics you wish to alarm on must already exist.
author: "Zacharie Eakin (@Zeekin)"
- Prior to release 5.0.0 this module was called C(community.aws.ec2_metric_alarm).
The usage did not change.
author:
- "Zacharie Eakin (@Zeekin)"
options:
state:
description:
Expand All @@ -46,7 +49,7 @@
type: str
namespace:
description:
- Name of the appropriate namespace (C(AWS/EC2), C(System/Linux), etc.), which determines the category it will appear under in cloudwatch.
- Name of the appropriate namespace (C(AWS/EC2), C(System/Linux), etc.), which determines the category it will appear under in CloudWatch.
required: false
type: str
statistic:
Expand Down Expand Up @@ -156,14 +159,13 @@
- 'missing'
default: 'missing'
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.aws
- amazon.aws.ec2
'''

EXAMPLES = r'''
- name: create alarm
community.aws.ec2_metric_alarm:
community.aws.cloudwatch_metric_alarm:
state: present
region: ap-southeast-2
name: "cpu-low"
Expand All @@ -180,7 +182,7 @@
alarm_actions: ["action1","action2"]
- name: Create an alarm to recover a failed instance
community.aws.ec2_metric_alarm:
community.aws.cloudwatch_metric_alarm:
state: present
region: us-west-1
name: "recover-instance"
Expand All @@ -195,7 +197,6 @@
description: "This will recover an instance when it fails"
dimensions: {"InstanceId":'i-XXX'}
alarm_actions: ["arn:aws:automate:us-west-1:ec2:recover"]
'''

try:
Expand Down

0 comments on commit 941f289

Please sign in to comment.