All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.configuration.kotlin.outputs.ConfigRuleSource.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.configuration.kotlin.outputs

import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 * Provides the CustomPolicyDetails, the rule owner (```` for managed rules, ``CUSTOM_POLICY`` for Custom Policy rules, and ``CUSTOM_LAMBDA`` for Custom Lambda rules), the rule identifier, and the events that cause the evaluation of your AWS resources.
 * @property customPolicyDetails Provides the runtime system, policy definition, and whether debug logging is enabled. Required when owner is set to ``CUSTOM_POLICY``.
 * @property owner Indicates whether AWS or the customer owns and manages the CC rule.
 *   CC Managed Rules are predefined rules owned by AWS. For more information, see [Managed Rules](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html) in the *developer guide*.
 *   CC Custom Rules are rules that you can develop either with Guard (``CUSTOM_POLICY``) or LAMlong (``CUSTOM_LAMBDA``). For more information, see [Custom Rules](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_develop-rules.html) in the *developer guide*.
 * @property sourceDetails Provides the source and the message types that cause CC to evaluate your AWS resources against a rule. It also provides the frequency with which you want CC to run evaluations for the rule if the trigger type is periodic.
 *  If the owner is set to ``CUSTOM_POLICY``, the only acceptable values for the CC rule trigger message type are ``ConfigurationItemChangeNotification`` and ``OversizedConfigurationItemChangeNotification``.
 * @property sourceIdentifier For CC Managed rules, a predefined identifier from a list. For example, ``IAM_PASSWORD_POLICY`` is a managed rule. To reference a managed rule, see [List of Managed Rules](https://docs.aws.amazon.com/config/latest/developerguide/managed-rules-by-aws-config.html).
 *  For CC Custom Lambda rules, the identifier is the Amazon Resource Name (ARN) of the rule's LAMlong function, such as ``arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name``.
 *  For CC Custom Policy rules, this field will be ignored.
 */
public data class ConfigRuleSource(
    public val customPolicyDetails: ConfigRuleCustomPolicyDetails? = null,
    public val owner: String,
    public val sourceDetails: List? = null,
    public val sourceIdentifier: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.configuration.outputs.ConfigRuleSource): ConfigRuleSource = ConfigRuleSource(
            customPolicyDetails = javaType.customPolicyDetails().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.configuration.kotlin.outputs.ConfigRuleCustomPolicyDetails.Companion.toKotlin(args0)
                })
            }).orElse(null),
            owner = javaType.owner(),
            sourceDetails = javaType.sourceDetails().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.configuration.kotlin.outputs.ConfigRuleSourceDetail.Companion.toKotlin(args0)
                })
            }),
            sourceIdentifier = javaType.sourceIdentifier().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy