configservice_put_organization_config_rule: Adds or updates organization config rule for your entire...

Description Usage Arguments Value Request syntax

View source: R/configservice_operations.R

Description

Adds or updates organization config rule for your entire organization evaluating whether your AWS resources comply with your desired configurations.

Only a master account and a delegated administrator can create or update an organization config rule. When calling this API with a delegated administrator, you must ensure AWS Organizations ListDelegatedAdministrator permissions are added.

This API enables organization service access through the EnableAWSServiceAccess action and creates a service linked role AWSServiceRoleForConfigMultiAccountSetup in the master 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 this API with delegated administrator, register a delegated administrator by calling AWS Organization register-delegated-administrator for config-multiaccountsetup.amazonaws.com.

You can use this action to create both custom AWS Config rules and AWS managed Config rules. If you are adding a new custom AWS Config rule, you must first create AWS Lambda function in the master account or a delegated administrator that the rule invokes to evaluate your resources. When you use the put_organization_config_rule action to add the rule to AWS Config, you must specify the Amazon Resource Name (ARN) that AWS Lambda assigns to the function. If you are adding an AWS managed Config rule, specify the rule's identifier for the RuleIdentifier key.

The maximum number of organization config rules that AWS Config supports is 150 and 3 delegated administrator per organization.

Prerequisite: Ensure you call EnableAllFeatures API to enable all features in an organization.

Specify either OrganizationCustomRuleMetadata or OrganizationManagedRuleMetadata.

Usage

1
2
3
configservice_put_organization_config_rule(OrganizationConfigRuleName,
  OrganizationManagedRuleMetadata, OrganizationCustomRuleMetadata,
  ExcludedAccounts)

Arguments

OrganizationConfigRuleName

[required] The name that you assign to an organization config rule.

OrganizationManagedRuleMetadata

An OrganizationManagedRuleMetadata object.

OrganizationCustomRuleMetadata

An OrganizationCustomRuleMetadata object.

ExcludedAccounts

A comma-separated list of accounts that you want to exclude from an organization config rule.

Value

A list with the following syntax:

1
2
3
list(
  OrganizationConfigRuleArn = "string"
)

Request syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
svc$put_organization_config_rule(
  OrganizationConfigRuleName = "string",
  OrganizationManagedRuleMetadata = list(
    Description = "string",
    RuleIdentifier = "string",
    InputParameters = "string",
    MaximumExecutionFrequency = "One_Hour"|"Three_Hours"|"Six_Hours"|"Twelve_Hours"|"TwentyFour_Hours",
    ResourceTypesScope = list(
      "string"
    ),
    ResourceIdScope = "string",
    TagKeyScope = "string",
    TagValueScope = "string"
  ),
  OrganizationCustomRuleMetadata = list(
    Description = "string",
    LambdaFunctionArn = "string",
    OrganizationConfigRuleTriggerTypes = list(
      "ConfigurationItemChangeNotification"|"OversizedConfigurationItemChangeNotification"|"ScheduledNotification"
    ),
    InputParameters = "string",
    MaximumExecutionFrequency = "One_Hour"|"Three_Hours"|"Six_Hours"|"Twelve_Hours"|"TwentyFour_Hours",
    ResourceTypesScope = list(
      "string"
    ),
    ResourceIdScope = "string",
    TagKeyScope = "string",
    TagValueScope = "string"
  ),
  ExcludedAccounts = list(
    "string"
  )
)

paws.management documentation built on March 8, 2021, 1:07 a.m.