[ aws . cloudwatch ]
Creates a Contributor Insights rule. Rules evaluate log events in a CloudWatch Logs log group, enabling you to find contributor data for the log events in that log group. For more information, see Using Contributor Insights to Analyze High-Cardinality Data .
If you create a rule, delete it, and then re-create it with the same name, historical data from the first time the rule was created might not be available.
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
put-insight-rule
--rule-name <value>
[--rule-state <value>]
--rule-definition <value>
[--tags <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--rule-name
(string)
A unique name for the rule.
--rule-state
(string)
The state of the rule. Valid values are ENABLED and DISABLED.
--rule-definition
(string)
The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax .
--tags
(list)
A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 tags with a rule.
Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only the resources that have certain tag values.
To be able to associate tags with a rule, you must have the
cloudwatch:TagResource
permission in addition to thecloudwatch:PutInsightRule
permission.If you are using this operation to update an existing Contributor Insights rule, any tags you specify in this parameter are ignored. To change the tags of an existing rule, use TagResource .
(structure)
A key-value pair associated with a CloudWatch resource.
Key -> (string)
A string that you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.
Value -> (string)
The value for the specified tag key.
Shorthand Syntax:
Key=string,Value=string ...
JSON Syntax:
[
{
"Key": "string",
"Value": "string"
}
...
]
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
See ‘aws help’ for descriptions of global parameters.
None