class CfnOrganizationConfigRulePropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.Config.Mixins.CfnOrganizationConfigRulePropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsconfig/mixins#CfnOrganizationConfigRulePropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.config.mixins.CfnOrganizationConfigRulePropsMixin |
Python | aws_cdk.mixins_preview.aws_config.mixins.CfnOrganizationConfigRulePropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_config » mixins » CfnOrganizationConfigRulePropsMixin |
Implements
IMixin
Extends
Mixin
Adds or updates an AWS Config rule for your entire organization to evaluate if your AWS resources comply with your desired configurations.
For information on how many organization AWS Config rules you can have per account, see Service Limits in the AWS Config Developer Guide .
Only a management account and a delegated administrator can create or update an organization AWS Config rule. When calling the OrganizationConfigRule resource with a delegated administrator, you must ensure AWS Organizations ListDelegatedAdministrator permissions are added. An organization can have up to 3 delegated administrators.
The OrganizationConfigRule resource enables organization service access through the EnableAWSServiceAccess action and creates a service-linked role AWSServiceRoleForConfigMultiAccountSetup in the management or delegated administrator account of your organization. The service-linked role is created only when the role does not exist in the caller account. AWS Config verifies the existence of role with GetRole action.
To use the OrganizationConfigRule resource with delegated administrator, register a delegated administrator by calling AWS Organization register-delegated-administrator for config-multiaccountsetup.amazonaws.com .
There are two types of rules: AWS Config Managed Rules and AWS Config Custom Rules . You can use PutOrganizationConfigRule to create both AWS Config Managed Rules and AWS Config Custom Rules.
AWS Config Managed Rules are predefined, customizable rules created by AWS Config . For a list of managed rules, see List of AWS Config Managed Rules . If you are adding an AWS Config managed rule, you must specify the rule's identifier for the RuleIdentifier key.
AWS Config Custom Rules are rules that you create from scratch. There are two ways to create AWS Config custom rules: with Lambda functions ( AWS Lambda Developer Guide ) and with Guard ( Guard GitHub Repository ), a policy-as-code language. AWS Config custom rules created with AWS Lambda are called AWS Config Custom Lambda Rules and AWS Config custom rules created with Guard are called AWS Config Custom Policy Rules .
If you are adding a new AWS Config Custom Lambda rule, you first need to create an AWS Lambda function in the management account or a delegated administrator that the rule invokes to evaluate your resources. You also need to create an IAM role in the managed account that can be assumed by the Lambda function. When you use PutOrganizationConfigRule to add a Custom Lambda rule to AWS Config , you must specify the Amazon Resource Name (ARN) that AWS Lambda assigns to the function.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as config_mixins } from '@aws-cdk/mixins-preview/aws-config';
const cfnOrganizationConfigRulePropsMixin = new config_mixins.CfnOrganizationConfigRulePropsMixin({
excludedAccounts: ['excludedAccounts'],
organizationConfigRuleName: 'organizationConfigRuleName',
organizationCustomPolicyRuleMetadata: {
debugLogDeliveryAccounts: ['debugLogDeliveryAccounts'],
description: 'description',
inputParameters: 'inputParameters',
maximumExecutionFrequency: 'maximumExecutionFrequency',
organizationConfigRuleTriggerTypes: ['organizationConfigRuleTriggerTypes'],
policyText: 'policyText',
resourceIdScope: 'resourceIdScope',
resourceTypesScope: ['resourceTypesScope'],
runtime: 'runtime',
tagKeyScope: 'tagKeyScope',
tagValueScope: 'tagValueScope',
},
organizationCustomRuleMetadata: {
description: 'description',
inputParameters: 'inputParameters',
lambdaFunctionArn: 'lambdaFunctionArn',
maximumExecutionFrequency: 'maximumExecutionFrequency',
organizationConfigRuleTriggerTypes: ['organizationConfigRuleTriggerTypes'],
resourceIdScope: 'resourceIdScope',
resourceTypesScope: ['resourceTypesScope'],
tagKeyScope: 'tagKeyScope',
tagValueScope: 'tagValueScope',
},
organizationManagedRuleMetadata: {
description: 'description',
inputParameters: 'inputParameters',
maximumExecutionFrequency: 'maximumExecutionFrequency',
resourceIdScope: 'resourceIdScope',
resourceTypesScope: ['resourceTypesScope'],
ruleIdentifier: 'ruleIdentifier',
tagKeyScope: 'tagKeyScope',
tagValueScope: 'tagValueScope',
},
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnOrganizationConfigRulePropsMixin(props: CfnOrganizationConfigRuleMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Organization Config Rule Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::Config::OrganizationConfigRule.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript