mon-set-alarm-state
Description
Temporarily changes the alarm state of the specified alarm. On the next period, the alarm is set to its true state.
Syntax
mon-set-alarm-state AlarmName
--state-reason
value
--state-value value
[--state-reason-data value
] [Common Options]
Options
Name | Description |
---|---|
|
The name of the alarm. You can also set this value using
Type: Argument Valid values: A UTF-8 string. Default: n/a Required: Yes |
|
The reason why this alarm was set to this state (human readable). Type: String Valid values: A UTF-8 string between 1 and 1023 characters. Default: n/a Required: Yes |
|
The reason why this alarm was set to this state. This data is
intended to be machine-readable JSON. Type: String Valid values: A valid machine-readable JSON string between 1 and 4000 characters. Default: n/a Required: No |
|
The state the alarm should be set to. Type: Enumeration Valid values: ALARM, OK or INSUFFICIENT_DATA Default: n/a Required: Yes |
Common options
Name | Description |
---|---|
|
The location of the file with your AWS credentials. You can set this
value using the environment variable Type: String Valid values: A valid path to a file containing your access key ID and secret access key. Default: Uses the environment variable |
|
The location of your EC2 certificate file for signing requests. You
can use the environment variable Type: String Valid values: A valid file path to the PEM file provided by Amazon EC2 or AWS Identity and Access Management. Default: Uses the environment variable |
|
The connection timeout value, in seconds. Type: Integer Valid values: Any positive number. Default: 30 |
|
The delimiter to use when displaying delimited (long) results. Type: String Valid values: Any string. Default: Comma (,) |
|
If you are displaying tabular or delimited results, include the column headers. If you are showing XML results, return the HTTP headers from the service request, if applicable. Type: Flag Valid values: When present, shows headers. Default: The |
|
The access key ID that will be used, in conjunction with the secret key, to sign the request. This must be used in conjunction with --secret-key, otherwise the option is ignored. All requests to CloudWatch must be signed, otherwise the request is rejected. Type: String Valid values: A valid access key ID. Default: None |
|
The private key that will be used to sign the
request. Using public/private keys causes the CLI to use SOAP. The request is
signed with a public certificate and private key. This parameter must be used in
conjunction with Type: String Valid values: The path to a valid ASN.1 private key. Default: None |
|
The region requests are directed to. You can use the environment
variable Type: String Valid values: Any AWS region, for example, us-east-1. Default: us-east-1, unless the |
|
The secret access key that will be used to sign the request, in conjunction with an access
key ID. This parameter must be used in conjunction with
Type: String Valid values: Your access key ID. Default: None |
|
Shows empty fields using (nil) as a placeholder to indicate that this data was not requested. Type: Flag Valid values: None Default: Empty fields are not shown by default. |
|
Displays the URL the CLI uses to call AWS. Type: Flag Valid values: None Default: false |
|
Specifies how the results are displayed: in a table, delimited (long), XML, or
no output (quiet). The Type: Flag Valid values: None Default: |
|
The URL used to contact CloudWatch. You can set this value using the
environment variable Type: String Valid values: A valid HTTP or HTTPS URL. Default: Uses the value specified in |
Output
This command temporarily changes an alarm's state and displays OK-Set alarm state value
when the request is successful.
The Amazon CloudWatch CLI displays errors on stderr.
Examples
Example request
This example sets the state of the alarm named my-alarm to OK.
mon-set-alarm-state --alarm-name my-alarm --state OK