/* * 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.config.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* An object that specifies metadata for your organization's Config Custom Policy rule. The metadata includes the * runtime system in use, which accounts have debug logging enabled, and other custom rule metadata, such as resource * type, resource ID of Amazon Web Services resource, and organization trigger types that initiate Config to evaluate * Amazon Web Services resources against a rule. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class OrganizationCustomPolicyRuleMetadata implements Serializable, Cloneable, StructuredPojo { /** ** The description that you provide for your organization Config Custom Policy rule. *
*/ private String description; /** ** The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules, * Config supports change-initiated notification types: *
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
* A string, in JSON format, that is passed to your organization Config Custom Policy rule. *
*/ private String inputParameters; /** ** The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is triggered * when Config delivers the configuration snapshot. For more information, see * ConfigSnapshotDeliveryProperties. *
*/ private String maximumExecutionFrequency; /** ** The type of the Amazon Web Services resource that was evaluated. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the Amazon Web Services resource that was evaluated. *
*/ private String resourceIdScope; /** ** One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more * specific tag values. *
*/ private String tagKeyScope; /** ** The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category * (key). *
*/ private String tagValueScope; /** ** The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language that * allows you to write policies that are enforced by Config Custom Policy rules. For more information about Guard, * see the Guard GitHub Repository. *
*/ private String policyRuntime; /** ** The policy definition containing the logic for your organization Config Custom Policy rule. *
*/ private String policyText; /** ** A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List is * null when debug logging is enabled for all accounts. *
*/ private com.amazonaws.internal.SdkInternalList* The description that you provide for your organization Config Custom Policy rule. *
* * @param description * The description that you provide for your organization Config Custom Policy rule. */ public void setDescription(String description) { this.description = description; } /** ** The description that you provide for your organization Config Custom Policy rule. *
* * @return The description that you provide for your organization Config Custom Policy rule. */ public String getDescription() { return this.description; } /** ** The description that you provide for your organization Config Custom Policy rule. *
* * @param description * The description that you provide for your organization Config Custom Policy rule. * @return Returns a reference to this object so that method calls can be chained together. */ public OrganizationCustomPolicyRuleMetadata withDescription(String description) { setDescription(description); return this; } /** ** The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules, * Config supports change-initiated notification types: *
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a
* configuration item as a result of a resource change.
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers
* an oversized configuration item. Config may generate this notification type when a resource changes and
* the notification exceeds the maximum size allowed by Amazon SNS.
*
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules, * Config supports change-initiated notification types: *
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a
* configuration item as a result of a resource change.
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers
* an oversized configuration item. Config may generate this notification type when a resource changes and
* the notification exceeds the maximum size allowed by Amazon SNS.
*
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules, * Config supports change-initiated notification types: *
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setOrganizationConfigRuleTriggerTypes(java.util.Collection)} or * {@link #withOrganizationConfigRuleTriggerTypes(java.util.Collection)} if you want to override the existing * values. *
* * @param organizationConfigRuleTriggerTypes * The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy * rules, Config supports change-initiated notification types: *
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a
* configuration item as a result of a resource change.
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers
* an oversized configuration item. Config may generate this notification type when a resource changes and
* the notification exceeds the maximum size allowed by Amazon SNS.
*
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules, * Config supports change-initiated notification types: *
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a
* configuration item as a result of a resource change.
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers
* an oversized configuration item. Config may generate this notification type when a resource changes and
* the notification exceeds the maximum size allowed by Amazon SNS.
*
* The type of notification that initiates Config to run an evaluation for a rule. For Config Custom Policy rules, * Config supports change-initiated notification types: *
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a configuration
* item as a result of a resource change.
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers an
* oversized configuration item. Config may generate this notification type when a resource changes and the
* notification exceeds the maximum size allowed by Amazon SNS.
*
* ConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers a
* configuration item as a result of a resource change.
*
* OversizedConfigurationItemChangeNotification
- Initiates an evaluation when Config delivers
* an oversized configuration item. Config may generate this notification type when a resource changes and
* the notification exceeds the maximum size allowed by Amazon SNS.
*
* A string, in JSON format, that is passed to your organization Config Custom Policy rule. *
* * @param inputParameters * A string, in JSON format, that is passed to your organization Config Custom Policy rule. */ public void setInputParameters(String inputParameters) { this.inputParameters = inputParameters; } /** ** A string, in JSON format, that is passed to your organization Config Custom Policy rule. *
* * @return A string, in JSON format, that is passed to your organization Config Custom Policy rule. */ public String getInputParameters() { return this.inputParameters; } /** ** A string, in JSON format, that is passed to your organization Config Custom Policy rule. *
* * @param inputParameters * A string, in JSON format, that is passed to your organization Config Custom Policy rule. * @return Returns a reference to this object so that method calls can be chained together. */ public OrganizationCustomPolicyRuleMetadata withInputParameters(String inputParameters) { setInputParameters(inputParameters); return this; } /** ** The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is triggered * when Config delivers the configuration snapshot. For more information, see * ConfigSnapshotDeliveryProperties. *
* * @param maximumExecutionFrequency * The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is * triggered when Config delivers the configuration snapshot. For more information, see * ConfigSnapshotDeliveryProperties. * @see MaximumExecutionFrequency */ public void setMaximumExecutionFrequency(String maximumExecutionFrequency) { this.maximumExecutionFrequency = maximumExecutionFrequency; } /** ** The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is triggered * when Config delivers the configuration snapshot. For more information, see * ConfigSnapshotDeliveryProperties. *
* * @return The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is * triggered when Config delivers the configuration snapshot. For more information, see * ConfigSnapshotDeliveryProperties. * @see MaximumExecutionFrequency */ public String getMaximumExecutionFrequency() { return this.maximumExecutionFrequency; } /** ** The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is triggered * when Config delivers the configuration snapshot. For more information, see * ConfigSnapshotDeliveryProperties. *
* * @param maximumExecutionFrequency * The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is * triggered when Config delivers the configuration snapshot. For more information, see * ConfigSnapshotDeliveryProperties. * @return Returns a reference to this object so that method calls can be chained together. * @see MaximumExecutionFrequency */ public OrganizationCustomPolicyRuleMetadata withMaximumExecutionFrequency(String maximumExecutionFrequency) { setMaximumExecutionFrequency(maximumExecutionFrequency); return this; } /** ** The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is triggered * when Config delivers the configuration snapshot. For more information, see * ConfigSnapshotDeliveryProperties. *
* * @param maximumExecutionFrequency * The maximum frequency with which Config runs evaluations for a rule. Your Config Custom Policy rule is * triggered when Config delivers the configuration snapshot. For more information, see * ConfigSnapshotDeliveryProperties. * @return Returns a reference to this object so that method calls can be chained together. * @see MaximumExecutionFrequency */ public OrganizationCustomPolicyRuleMetadata withMaximumExecutionFrequency(MaximumExecutionFrequency maximumExecutionFrequency) { this.maximumExecutionFrequency = maximumExecutionFrequency.toString(); return this; } /** ** The type of the Amazon Web Services resource that was evaluated. *
* * @return The type of the Amazon Web Services resource that was evaluated. */ public java.util.List* The type of the Amazon Web Services resource that was evaluated. *
* * @param resourceTypesScope * The type of the Amazon Web Services resource that was evaluated. */ public void setResourceTypesScope(java.util.Collection* The type of the Amazon Web Services resource that was evaluated. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setResourceTypesScope(java.util.Collection)} or {@link #withResourceTypesScope(java.util.Collection)} if * you want to override the existing values. *
* * @param resourceTypesScope * The type of the Amazon Web Services resource that was evaluated. * @return Returns a reference to this object so that method calls can be chained together. */ public OrganizationCustomPolicyRuleMetadata withResourceTypesScope(String... resourceTypesScope) { if (this.resourceTypesScope == null) { setResourceTypesScope(new com.amazonaws.internal.SdkInternalList* The type of the Amazon Web Services resource that was evaluated. *
* * @param resourceTypesScope * The type of the Amazon Web Services resource that was evaluated. * @return Returns a reference to this object so that method calls can be chained together. */ public OrganizationCustomPolicyRuleMetadata withResourceTypesScope(java.util.Collection* The ID of the Amazon Web Services resource that was evaluated. *
* * @param resourceIdScope * The ID of the Amazon Web Services resource that was evaluated. */ public void setResourceIdScope(String resourceIdScope) { this.resourceIdScope = resourceIdScope; } /** ** The ID of the Amazon Web Services resource that was evaluated. *
* * @return The ID of the Amazon Web Services resource that was evaluated. */ public String getResourceIdScope() { return this.resourceIdScope; } /** ** The ID of the Amazon Web Services resource that was evaluated. *
* * @param resourceIdScope * The ID of the Amazon Web Services resource that was evaluated. * @return Returns a reference to this object so that method calls can be chained together. */ public OrganizationCustomPolicyRuleMetadata withResourceIdScope(String resourceIdScope) { setResourceIdScope(resourceIdScope); return this; } /** ** One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more * specific tag values. *
* * @param tagKeyScope * One part of a key-value pair that make up a tag. A key is a general label that acts like a category for * more specific tag values. */ public void setTagKeyScope(String tagKeyScope) { this.tagKeyScope = tagKeyScope; } /** ** One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more * specific tag values. *
* * @return One part of a key-value pair that make up a tag. A key is a general label that acts like a category for * more specific tag values. */ public String getTagKeyScope() { return this.tagKeyScope; } /** ** One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more * specific tag values. *
* * @param tagKeyScope * One part of a key-value pair that make up a tag. A key is a general label that acts like a category for * more specific tag values. * @return Returns a reference to this object so that method calls can be chained together. */ public OrganizationCustomPolicyRuleMetadata withTagKeyScope(String tagKeyScope) { setTagKeyScope(tagKeyScope); return this; } /** ** The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category * (key). *
* * @param tagValueScope * The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag * category (key). */ public void setTagValueScope(String tagValueScope) { this.tagValueScope = tagValueScope; } /** ** The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category * (key). *
* * @return The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag * category (key). */ public String getTagValueScope() { return this.tagValueScope; } /** ** The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category * (key). *
* * @param tagValueScope * The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag * category (key). * @return Returns a reference to this object so that method calls can be chained together. */ public OrganizationCustomPolicyRuleMetadata withTagValueScope(String tagValueScope) { setTagValueScope(tagValueScope); return this; } /** ** The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language that * allows you to write policies that are enforced by Config Custom Policy rules. For more information about Guard, * see the Guard GitHub Repository. *
* * @param policyRuntime * The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language * that allows you to write policies that are enforced by Config Custom Policy rules. For more information * about Guard, see the Guard GitHub * Repository. */ public void setPolicyRuntime(String policyRuntime) { this.policyRuntime = policyRuntime; } /** ** The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language that * allows you to write policies that are enforced by Config Custom Policy rules. For more information about Guard, * see the Guard GitHub Repository. *
* * @return The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language * that allows you to write policies that are enforced by Config Custom Policy rules. For more information * about Guard, see the Guard GitHub * Repository. */ public String getPolicyRuntime() { return this.policyRuntime; } /** ** The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language that * allows you to write policies that are enforced by Config Custom Policy rules. For more information about Guard, * see the Guard GitHub Repository. *
* * @param policyRuntime * The runtime system for your organization Config Custom Policy rules. Guard is a policy-as-code language * that allows you to write policies that are enforced by Config Custom Policy rules. For more information * about Guard, see the Guard GitHub * Repository. * @return Returns a reference to this object so that method calls can be chained together. */ public OrganizationCustomPolicyRuleMetadata withPolicyRuntime(String policyRuntime) { setPolicyRuntime(policyRuntime); return this; } /** ** The policy definition containing the logic for your organization Config Custom Policy rule. *
* * @param policyText * The policy definition containing the logic for your organization Config Custom Policy rule. */ public void setPolicyText(String policyText) { this.policyText = policyText; } /** ** The policy definition containing the logic for your organization Config Custom Policy rule. *
* * @return The policy definition containing the logic for your organization Config Custom Policy rule. */ public String getPolicyText() { return this.policyText; } /** ** The policy definition containing the logic for your organization Config Custom Policy rule. *
* * @param policyText * The policy definition containing the logic for your organization Config Custom Policy rule. * @return Returns a reference to this object so that method calls can be chained together. */ public OrganizationCustomPolicyRuleMetadata withPolicyText(String policyText) { setPolicyText(policyText); return this; } /** ** A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List is * null when debug logging is enabled for all accounts. *
* * @return A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. * List is null when debug logging is enabled for all accounts. */ public java.util.List* A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List is * null when debug logging is enabled for all accounts. *
* * @param debugLogDeliveryAccounts * A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List * is null when debug logging is enabled for all accounts. */ public void setDebugLogDeliveryAccounts(java.util.Collection* A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List is * null when debug logging is enabled for all accounts. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDebugLogDeliveryAccounts(java.util.Collection)} or * {@link #withDebugLogDeliveryAccounts(java.util.Collection)} if you want to override the existing values. *
* * @param debugLogDeliveryAccounts * A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List * is null when debug logging is enabled for all accounts. * @return Returns a reference to this object so that method calls can be chained together. */ public OrganizationCustomPolicyRuleMetadata withDebugLogDeliveryAccounts(String... debugLogDeliveryAccounts) { if (this.debugLogDeliveryAccounts == null) { setDebugLogDeliveryAccounts(new com.amazonaws.internal.SdkInternalList* A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List is * null when debug logging is enabled for all accounts. *
* * @param debugLogDeliveryAccounts * A list of accounts that you can enable debug logging for your organization Config Custom Policy rule. List * is null when debug logging is enabled for all accounts. * @return Returns a reference to this object so that method calls can be chained together. */ public OrganizationCustomPolicyRuleMetadata withDebugLogDeliveryAccounts(java.util.Collection