libZSservicesZSamazonka-configZSamazonka-config
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Config.PutOrganizationConfigRule

Description

Adds or updates organization config rule for your entire organization evaluating whether your Amazon Web Services 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 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. Config verifies the existence of role with GetRole action.

To use this API with delegated administrator, register a delegated administrator by calling Amazon Web Services Organization register-delegated-administrator for config-multiaccountsetup.amazonaws.com.

You can use this action to create both custom Config rules and Config managed rules. If you are adding a new custom Config rule, you must first create Lambda function in the master 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 the PutOrganizationConfigRule action to add the rule to Config, you must specify the Amazon Resource Name (ARN) that Lambda assigns to the function. If you are adding an Config managed rule, specify the rule's identifier for the RuleIdentifier key.

The maximum number of organization config rules that 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.

Synopsis

Creating a Request

data PutOrganizationConfigRule Source #

See: newPutOrganizationConfigRule smart constructor.

Constructors

PutOrganizationConfigRule' 

Fields

Instances

Instances details
Eq PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

Read PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

Show PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

Generic PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

Associated Types

type Rep PutOrganizationConfigRule :: Type -> Type #

NFData PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

Hashable PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

ToJSON PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

AWSRequest PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

ToHeaders PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

ToPath PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

ToQuery PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

type Rep PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

type Rep PutOrganizationConfigRule = D1 ('MetaData "PutOrganizationConfigRule" "Amazonka.Config.PutOrganizationConfigRule" "libZSservicesZSamazonka-configZSamazonka-config" 'False) (C1 ('MetaCons "PutOrganizationConfigRule'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "organizationManagedRuleMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe OrganizationManagedRuleMetadata)) :*: S1 ('MetaSel ('Just "excludedAccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))) :*: (S1 ('MetaSel ('Just "organizationCustomRuleMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe OrganizationCustomRuleMetadata)) :*: S1 ('MetaSel ('Just "organizationConfigRuleName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse PutOrganizationConfigRule Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

newPutOrganizationConfigRule Source #

Create a value of PutOrganizationConfigRule with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:organizationManagedRuleMetadata:PutOrganizationConfigRule', putOrganizationConfigRule_organizationManagedRuleMetadata - An OrganizationManagedRuleMetadata object.

$sel:excludedAccounts:PutOrganizationConfigRule', putOrganizationConfigRule_excludedAccounts - A comma-separated list of accounts that you want to exclude from an organization config rule.

$sel:organizationCustomRuleMetadata:PutOrganizationConfigRule', putOrganizationConfigRule_organizationCustomRuleMetadata - An OrganizationCustomRuleMetadata object.

$sel:organizationConfigRuleName:PutOrganizationConfigRule', putOrganizationConfigRule_organizationConfigRuleName - The name that you assign to an organization config rule.

Request Lenses

putOrganizationConfigRule_excludedAccounts :: Lens' PutOrganizationConfigRule (Maybe [Text]) Source #

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

putOrganizationConfigRule_organizationConfigRuleName :: Lens' PutOrganizationConfigRule Text Source #

The name that you assign to an organization config rule.

Destructuring the Response

data PutOrganizationConfigRuleResponse Source #

See: newPutOrganizationConfigRuleResponse smart constructor.

Constructors

PutOrganizationConfigRuleResponse' 

Fields

Instances

Instances details
Eq PutOrganizationConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

Read PutOrganizationConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

Show PutOrganizationConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

Generic PutOrganizationConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

Associated Types

type Rep PutOrganizationConfigRuleResponse :: Type -> Type #

NFData PutOrganizationConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

type Rep PutOrganizationConfigRuleResponse Source # 
Instance details

Defined in Amazonka.Config.PutOrganizationConfigRule

type Rep PutOrganizationConfigRuleResponse = D1 ('MetaData "PutOrganizationConfigRuleResponse" "Amazonka.Config.PutOrganizationConfigRule" "libZSservicesZSamazonka-configZSamazonka-config" 'False) (C1 ('MetaCons "PutOrganizationConfigRuleResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "organizationConfigRuleArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newPutOrganizationConfigRuleResponse Source #

Create a value of PutOrganizationConfigRuleResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:organizationConfigRuleArn:PutOrganizationConfigRuleResponse', putOrganizationConfigRuleResponse_organizationConfigRuleArn - The Amazon Resource Name (ARN) of an organization config rule.

$sel:httpStatus:PutOrganizationConfigRuleResponse', putOrganizationConfigRuleResponse_httpStatus - The response's http status code.

Response Lenses