OrganizationCustomRuleArgs

data class OrganizationCustomRuleArgs(val description: Output<String>? = null, val excludedAccounts: Output<List<String>>? = null, val inputParameters: Output<String>? = null, val lambdaFunctionArn: Output<String>? = null, val maximumExecutionFrequency: Output<String>? = null, val name: Output<String>? = null, val resourceIdScope: Output<String>? = null, val resourceTypesScopes: Output<List<String>>? = null, val tagKeyScope: Output<String>? = null, val tagValueScope: Output<String>? = null, val triggerTypes: Output<List<String>>? = null) : ConvertibleToJava<OrganizationCustomRuleArgs>

Manages a Config Organization Custom Rule. More information about these rules can be found in the Enabling AWS Config Rules Across all Accounts in Your Organization and AWS Config Managed Rules documentation. For working with Organization Managed Rules (those invoking an AWS managed rule), see the aws_config_organization_managed__rule resource.

NOTE: This resource must be created in the Organization master account and rules will include the master account unless its ID is added to the excluded_accounts argument. NOTE: The proper Lambda permission to allow the AWS Config service invoke the Lambda Function must be in place before the rule will successfully create or update. See also the aws.lambda.Permission resource.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lambda.Permission;
import com.pulumi.aws.lambda.PermissionArgs;
import com.pulumi.aws.organizations.Organization;
import com.pulumi.aws.organizations.OrganizationArgs;
import com.pulumi.aws.cfg.OrganizationCustomRule;
import com.pulumi.aws.cfg.OrganizationCustomRuleArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var examplePermission = new Permission("examplePermission", PermissionArgs.builder()
.action("lambda:InvokeFunction")
.function(aws_lambda_function.example().arn())
.principal("config.amazonaws.com")
.build());
var exampleOrganization = new Organization("exampleOrganization", OrganizationArgs.builder()
.awsServiceAccessPrincipals("config-multiaccountsetup.amazonaws.com")
.featureSet("ALL")
.build());
var exampleOrganizationCustomRule = new OrganizationCustomRule("exampleOrganizationCustomRule", OrganizationCustomRuleArgs.builder()
.lambdaFunctionArn(aws_lambda_function.example().arn())
.triggerTypes("ConfigurationItemChangeNotification")
.build(), CustomResourceOptions.builder()
.dependsOn(
examplePermission,
exampleOrganization)
.build());
}
}

Import

Config Organization Custom Rules can be imported using the name, e.g.,

$ pulumi import aws:cfg/organizationCustomRule:OrganizationCustomRule example example

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, excludedAccounts: Output<List<String>>? = null, inputParameters: Output<String>? = null, lambdaFunctionArn: Output<String>? = null, maximumExecutionFrequency: Output<String>? = null, name: Output<String>? = null, resourceIdScope: Output<String>? = null, resourceTypesScopes: Output<List<String>>? = null, tagKeyScope: Output<String>? = null, tagValueScope: Output<String>? = null, triggerTypes: Output<List<String>>? = null)

Properties

Link copied to clipboard
val description: Output<String>? = null

Description of the rule

Link copied to clipboard
val excludedAccounts: Output<List<String>>? = null

List of AWS account identifiers to exclude from the rule

Link copied to clipboard
val inputParameters: Output<String>? = null

A string in JSON format that is passed to the AWS Config Rule Lambda Function

Link copied to clipboard
val lambdaFunctionArn: Output<String>? = null

Amazon Resource Name (ARN) of the rule Lambda Function

Link copied to clipboard
val maximumExecutionFrequency: Output<String>? = null

The maximum frequency with which AWS Config runs evaluations for a rule, if the rule is triggered at a periodic frequency. Defaults to TwentyFour_Hours for periodic frequency triggered rules. Valid values: One_Hour, Three_Hours, Six_Hours, Twelve_Hours, or TwentyFour_Hours.

Link copied to clipboard
val name: Output<String>? = null

The name of the rule

Link copied to clipboard
val resourceIdScope: Output<String>? = null

Identifier of the AWS resource to evaluate

Link copied to clipboard
val resourceTypesScopes: Output<List<String>>? = null

List of types of AWS resources to evaluate

Link copied to clipboard
val tagKeyScope: Output<String>? = null

Tag key of AWS resources to evaluate

Link copied to clipboard
val tagValueScope: Output<String>? = null

Tag value of AWS resources to evaluate

Link copied to clipboard
val triggerTypes: Output<List<String>>? = null

List of notification types that trigger AWS Config to run an evaluation for the rule. Valid values: ConfigurationItemChangeNotification, OversizedConfigurationItemChangeNotification, and ScheduledNotification

Functions

Link copied to clipboard
open override fun toJava(): OrganizationCustomRuleArgs