Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . configservice ]

put-organization-config-rule

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 can create or update an organization config rule.

This API enables organization service access through the EnableAWSServiceAccess action and creates a service linked role AWSServiceRoleForConfigMultiAccountSetup in the master account of your organization. The service linked role is created only when the role does not exist in the master account. AWS Config verifies the existence of role with GetRole action.

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 that the rule invokes to evaluate your resources. When you use the PutOrganizationConfigRule 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.

Note

Specify either OrganizationCustomRuleMetadata or OrganizationManagedRuleMetadata .

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  put-organization-config-rule
--organization-config-rule-name <value>
[--organization-managed-rule-metadata <value>]
[--organization-custom-rule-metadata <value>]
[--excluded-accounts <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--organization-config-rule-name (string)

The name that you assign to an organization config rule.

--organization-managed-rule-metadata (structure)

An OrganizationManagedRuleMetadata object.

Shorthand Syntax:

Description=string,RuleIdentifier=string,InputParameters=string,MaximumExecutionFrequency=string,ResourceTypesScope=string,string,ResourceIdScope=string,TagKeyScope=string,TagValueScope=string

JSON Syntax:

{
  "Description": "string",
  "RuleIdentifier": "string",
  "InputParameters": "string",
  "MaximumExecutionFrequency": "One_Hour"|"Three_Hours"|"Six_Hours"|"Twelve_Hours"|"TwentyFour_Hours",
  "ResourceTypesScope": ["string", ...],
  "ResourceIdScope": "string",
  "TagKeyScope": "string",
  "TagValueScope": "string"
}

--organization-custom-rule-metadata (structure)

An OrganizationCustomRuleMetadata object.

Shorthand Syntax:

Description=string,LambdaFunctionArn=string,OrganizationConfigRuleTriggerTypes=string,string,InputParameters=string,MaximumExecutionFrequency=string,ResourceTypesScope=string,string,ResourceIdScope=string,TagKeyScope=string,TagValueScope=string

JSON Syntax:

{
  "Description": "string",
  "LambdaFunctionArn": "string",
  "OrganizationConfigRuleTriggerTypes": ["ConfigurationItemChangeNotification"|"OversizedConfigurationItemChangeNotification"|"ScheduledNotification", ...],
  "InputParameters": "string",
  "MaximumExecutionFrequency": "One_Hour"|"Three_Hours"|"Six_Hours"|"Twelve_Hours"|"TwentyFour_Hours",
  "ResourceTypesScope": ["string", ...],
  "ResourceIdScope": "string",
  "TagKeyScope": "string",
  "TagValueScope": "string"
}

--excluded-accounts (list)

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

Syntax:

"string" "string" ...

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

OrganizationConfigRuleArn -> (string)

The Amazon Resource Name (ARN) of an organization config rule.