/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.cloudwatch.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutInsightRuleRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* A unique name for the rule. *
*/ private String ruleName; /** ** The state of the rule. Valid values are ENABLED and DISABLED. *
*/ private String ruleState; /** ** The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. *
*/ private String ruleDefinition; /** ** 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 the cloudwatch: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. *
*/ private com.amazonaws.internal.SdkInternalList* A unique name for the rule. *
* * @param ruleName * A unique name for the rule. */ public void setRuleName(String ruleName) { this.ruleName = ruleName; } /** ** A unique name for the rule. *
* * @return A unique name for the rule. */ public String getRuleName() { return this.ruleName; } /** ** A unique name for the rule. *
* * @param ruleName * A unique name for the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutInsightRuleRequest withRuleName(String ruleName) { setRuleName(ruleName); return this; } /** ** The state of the rule. Valid values are ENABLED and DISABLED. *
* * @param ruleState * The state of the rule. Valid values are ENABLED and DISABLED. */ public void setRuleState(String ruleState) { this.ruleState = ruleState; } /** ** The state of the rule. Valid values are ENABLED and DISABLED. *
* * @return The state of the rule. Valid values are ENABLED and DISABLED. */ public String getRuleState() { return this.ruleState; } /** ** The state of the rule. Valid values are ENABLED and DISABLED. *
* * @param ruleState * The state of the rule. Valid values are ENABLED and DISABLED. * @return Returns a reference to this object so that method calls can be chained together. */ public PutInsightRuleRequest withRuleState(String ruleState) { setRuleState(ruleState); return this; } /** ** The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. *
* * @param ruleDefinition * The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. */ public void setRuleDefinition(String ruleDefinition) { this.ruleDefinition = ruleDefinition; } /** ** The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. *
* * @return The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. */ public String getRuleDefinition() { return this.ruleDefinition; } /** ** The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. *
* * @param ruleDefinition * The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. * @return Returns a reference to this object so that method calls can be chained together. */ public PutInsightRuleRequest withRuleDefinition(String ruleDefinition) { setRuleDefinition(ruleDefinition); return this; } /** ** 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 the cloudwatch: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. *
* * @return 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 the cloudwatch: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.
*/
public java.util.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
* 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.
* cloudwatch:TagResource
permission in
* addition to the cloudwatch:PutInsightRule
permission.
*
* 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 the cloudwatch: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.
*/
public void setTags(java.util.Collection
* 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
* 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.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
* cloudwatch:TagResource
permission in
* addition to the cloudwatch:PutInsightRule
permission.
*
* 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 the cloudwatch: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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutInsightRuleRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new com.amazonaws.internal.SdkInternalList
* 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
* 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.
* cloudwatch:TagResource
permission in
* addition to the cloudwatch:PutInsightRule
permission.
*
* 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 the cloudwatch: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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutInsightRuleRequest withTags(java.util.Collection