Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data PutOrganizationConfigRule = PutOrganizationConfigRule' {}
- newPutOrganizationConfigRule :: Text -> PutOrganizationConfigRule
- putOrganizationConfigRule_organizationManagedRuleMetadata :: Lens' PutOrganizationConfigRule (Maybe OrganizationManagedRuleMetadata)
- putOrganizationConfigRule_excludedAccounts :: Lens' PutOrganizationConfigRule (Maybe [Text])
- putOrganizationConfigRule_organizationCustomRuleMetadata :: Lens' PutOrganizationConfigRule (Maybe OrganizationCustomRuleMetadata)
- putOrganizationConfigRule_organizationConfigRuleName :: Lens' PutOrganizationConfigRule Text
- data PutOrganizationConfigRuleResponse = PutOrganizationConfigRuleResponse' {}
- newPutOrganizationConfigRuleResponse :: Int -> PutOrganizationConfigRuleResponse
- putOrganizationConfigRuleResponse_organizationConfigRuleArn :: Lens' PutOrganizationConfigRuleResponse (Maybe Text)
- putOrganizationConfigRuleResponse_httpStatus :: Lens' PutOrganizationConfigRuleResponse Int
Creating a Request
data PutOrganizationConfigRule Source #
See: newPutOrganizationConfigRule
smart constructor.
PutOrganizationConfigRule' | |
|
Instances
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_organizationManagedRuleMetadata :: Lens' PutOrganizationConfigRule (Maybe OrganizationManagedRuleMetadata) Source #
An OrganizationManagedRuleMetadata
object.
putOrganizationConfigRule_excludedAccounts :: Lens' PutOrganizationConfigRule (Maybe [Text]) Source #
A comma-separated list of accounts that you want to exclude from an organization config rule.
putOrganizationConfigRule_organizationCustomRuleMetadata :: Lens' PutOrganizationConfigRule (Maybe OrganizationCustomRuleMetadata) Source #
An OrganizationCustomRuleMetadata
object.
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.
PutOrganizationConfigRuleResponse' | |
|
Instances
Eq PutOrganizationConfigRuleResponse Source # | |
Read PutOrganizationConfigRuleResponse Source # | |
Show PutOrganizationConfigRuleResponse Source # | |
Generic PutOrganizationConfigRuleResponse Source # | |
NFData PutOrganizationConfigRuleResponse Source # | |
Defined in Amazonka.Config.PutOrganizationConfigRule rnf :: PutOrganizationConfigRuleResponse -> () # | |
type Rep PutOrganizationConfigRuleResponse Source # | |
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
putOrganizationConfigRuleResponse_organizationConfigRuleArn :: Lens' PutOrganizationConfigRuleResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of an organization config rule.
putOrganizationConfigRuleResponse_httpStatus :: Lens' PutOrganizationConfigRuleResponse Int Source #
The response's http status code.