/* * 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; /** *
* Contains the information that's required to enable a managed Contributor Insights rule for an Amazon Web Services * resource. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ManagedRule implements Serializable, Cloneable { /** *
* The template name for the managed Contributor Insights rule, as returned by ListManagedInsightRules
.
*
* The ARN of an Amazon Web Services resource that has managed Contributor Insights rules. *
*/ private String resourceARN; /** *
* A list of key-value pairs that you can associate with a managed Contributor Insights rule. You can associate as
* many as 50 tags with a rule. Tags can help you organize and categorize your resources. You also can use them to
* scope user permissions by granting a user permission to access or change only the resources that have certain tag
* values. 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 that you specify in this parameter are ignored. To change the tags
* of an existing rule, use TagResource
.
*
* The template name for the managed Contributor Insights rule, as returned by ListManagedInsightRules
.
*
ListManagedInsightRules
.
*/
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
/**
*
* The template name for the managed Contributor Insights rule, as returned by ListManagedInsightRules
.
*
ListManagedInsightRules
.
*/
public String getTemplateName() {
return this.templateName;
}
/**
*
* The template name for the managed Contributor Insights rule, as returned by ListManagedInsightRules
.
*
ListManagedInsightRules
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ManagedRule withTemplateName(String templateName) {
setTemplateName(templateName);
return this;
}
/**
* * The ARN of an Amazon Web Services resource that has managed Contributor Insights rules. *
* * @param resourceARN * The ARN of an Amazon Web Services resource that has managed Contributor Insights rules. */ public void setResourceARN(String resourceARN) { this.resourceARN = resourceARN; } /** ** The ARN of an Amazon Web Services resource that has managed Contributor Insights rules. *
* * @return The ARN of an Amazon Web Services resource that has managed Contributor Insights rules. */ public String getResourceARN() { return this.resourceARN; } /** ** The ARN of an Amazon Web Services resource that has managed Contributor Insights rules. *
* * @param resourceARN * The ARN of an Amazon Web Services resource that has managed Contributor Insights rules. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedRule withResourceARN(String resourceARN) { setResourceARN(resourceARN); return this; } /** *
* A list of key-value pairs that you can associate with a managed Contributor Insights rule. You can associate as
* many as 50 tags with a rule. Tags can help you organize and categorize your resources. You also can use them to
* scope user permissions by granting a user permission to access or change only the resources that have certain tag
* values. 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 that 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. If you are using this operation to update an existing Contributor Insights rule, any tags
* that 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 that you can associate with a managed Contributor Insights rule. You can associate as
* many as 50 tags with a rule. Tags can help you organize and categorize your resources. You also can use them to
* scope user permissions by granting a user permission to access or change only the resources that have certain tag
* values. 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 that 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. If you are using this operation to update an existing Contributor Insights rule, any tags that
* 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 that you can associate with a managed Contributor Insights rule. You can associate as
* many as 50 tags with a rule. Tags can help you organize and categorize your resources. You also can use them to
* scope user permissions by granting a user permission to access or change only the resources that have certain tag
* values. 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 that 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. *
* * @param tags * A list of key-value pairs that you can associate with a managed Contributor Insights rule. You can * associate as many as 50 tags with a rule. Tags can help you organize and categorize your resources. You * also can use them to scope user permissions by granting a user permission to access or change only the * resources that have certain tag values. 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 that
* 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 ManagedRule withTags(Tag... tags) {
if (this.tags == null) {
setTags(new com.amazonaws.internal.SdkInternalList
* A list of key-value pairs that you can associate with a managed Contributor Insights rule. You can associate as
* many as 50 tags with a rule. Tags can help you organize and categorize your resources. You also can use them to
* scope user permissions by granting a user permission to access or change only the resources that have certain tag
* values. 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 that 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. If you are using this operation to update an existing Contributor Insights rule, any tags that
* 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 ManagedRule withTags(java.util.Collection