Skip to content

Commit 8630419

Browse files
author
awstools
committed
docs(client-config-service): Documentation update for PutConfigRule and PutOrganizationConfigRule
1 parent 9802d47 commit 8630419

12 files changed

+193
-136
lines changed

clients/client-config-service/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ try {
187187
const data = await client.send(command);
188188
// process data.
189189
} catch (error) {
190-
const { requestId, cfId, extendedRequestId } = error.$metadata;
190+
const { requestId, cfId, extendedRequestId } = error.$$metadata;
191191
console.log({ requestId, cfId, extendedRequestId });
192192
/**
193193
* The keys within exceptions are also parsed.

clients/client-config-service/src/ConfigService.ts

Lines changed: 61 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2867,7 +2867,10 @@ export class ConfigService extends ConfigServiceClient {
28672867
* <p>Returns a list of conformance pack compliance scores.
28682868
* A compliance score is the percentage of the number of compliant rule-resource combinations in a conformance pack compared to the number of total possible rule-resource combinations in the conformance pack.
28692869
* This metric provides you with a high-level view of the compliance state of your conformance packs, and can be used to identify, investigate, and understand
2870-
* compliance deviations in your conformance packs.</p>
2870+
* the level of compliance in your conformance packs.</p>
2871+
* <note>
2872+
* <p>Conformance packs with no evaluation results will have a compliance score of <code>INSUFFICIENT_DATA</code>.</p>
2873+
* </note>
28712874
*/
28722875
public listConformancePackComplianceScores(
28732876
args: ListConformancePackComplianceScoresCommandInput,
@@ -3044,23 +3047,33 @@ export class ConfigService extends ConfigServiceClient {
30443047
}
30453048

30463049
/**
3047-
* <p>Adds or updates an Config rule for evaluating whether your
3048-
* Amazon Web Services resources comply with your desired configurations.</p>
3049-
* <p>You can use this action for Config custom rules and Config
3050-
* managed rules. A Config custom rule is a rule that you
3051-
* develop and maintain. An Config managed rule is a customizable,
3052-
* predefined rule that Config provides.</p>
3053-
* <p>If you are adding a new Config custom rule, you must first
3054-
* create the Lambda function that the rule invokes to evaluate
3055-
* your resources. When you use the <code>PutConfigRule</code> action
3056-
* to add the rule to Config, you must specify the Amazon Resource
3057-
* Name (ARN) that Lambda assigns to the function. Specify the ARN
3058-
* for the <code>SourceIdentifier</code> key. This key is part of the
3059-
* <code>Source</code> object, which is part of the
3060-
* <code>ConfigRule</code> object. </p>
3061-
* <p>If you are adding an Config managed rule, specify the
3062-
* rule's identifier for the <code>SourceIdentifier</code> key. To
3063-
* reference Config managed rule identifiers, see <a href="https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html">About Config managed rules</a>.</p>
3050+
* <p>Adds or updates an Config rule to evaluate if your
3051+
* Amazon Web Services resources comply with your desired configurations. For information on how many Config rules you can have per account,
3052+
* see <a href="https://docs.aws.amazon.com/config/latest/developerguide/configlimits.html">
3053+
* <b>Service Limits</b>
3054+
* </a> in the <i>Config Developer Guide</i>.</p>
3055+
*
3056+
* <p>There are two types of rules: Config Custom Rules and Config Managed Rules.
3057+
* You can use <code>PutConfigRule</code> to create both Config custom rules and Config managed rules.</p>
3058+
*
3059+
* <p>Custom rules are rules that you can create using either Guard or Lambda functions.
3060+
* Guard (<a href="https://github.com/aws-cloudformation/cloudformation-guard">Guard GitHub
3061+
* Repository</a>) is a policy-as-code language that allows you to write policies that
3062+
* are enforced by Config Custom Policy rules. Lambda uses custom code that you upload to
3063+
* evaluate a custom rule. If you are adding a new Custom Lambda rule,
3064+
* you first need to create an Lambda function that the rule invokes to evaluate
3065+
* your resources. When you use <code>PutConfigRule</code> to add a Custom Lambda rule to Config, you must specify the Amazon Resource
3066+
* Name (ARN) that Lambda assigns to the function. You specify the ARN
3067+
* in the <code>SourceIdentifier</code> key. This key is part of the
3068+
* <code>Source</code> object, which is part of the
3069+
* <code>ConfigRule</code> object. </p>
3070+
*
3071+
* <p>Managed rules are predefined,
3072+
* customizable rules created by Config. For a list of managed rules, see
3073+
* <a href="https://docs.aws.amazon.com/config/latest/developerguide/managed-rules-by-aws-config.html">List of Config
3074+
* Managed Rules</a>. If you are adding an Config managed rule, you must specify the
3075+
* rule's identifier for the <code>SourceIdentifier</code> key.</p>
3076+
*
30643077
* <p>For any new rule that you add, specify the
30653078
* <code>ConfigRuleName</code> in the <code>ConfigRule</code>
30663079
* object. Do not specify the <code>ConfigRuleArn</code> or the
@@ -3070,10 +3083,6 @@ export class ConfigService extends ConfigServiceClient {
30703083
* <code>ConfigRuleId</code>, or <code>ConfigRuleArn</code> in the
30713084
* <code>ConfigRule</code> data type that you use in this
30723085
* request.</p>
3073-
* <p>For information on how many Config rules you can have per account,
3074-
* see <a href="https://docs.aws.amazon.com/config/latest/developerguide/configlimits.html">
3075-
* <b>Service Limits</b>
3076-
* </a> in the Config Developer Guide.</p>
30773086
*
30783087
* <p>For more information about developing and using Config
30793088
* rules, see <a href="https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html">Evaluating Amazon Web Services resource Configurations with Config</a>
@@ -3123,7 +3132,7 @@ export class ConfigService extends ConfigServiceClient {
31233132
* <p>If your source type is an organization, you must be signed in to the management account or a registered delegated administrator and all the features must be enabled in your organization.
31243133
* If the caller is a management account, Config calls <code>EnableAwsServiceAccess</code> API to enable integration between Config and Organizations.
31253134
* If the caller is a registered delegated administrator, Config calls <code>ListDelegatedAdministrators</code> API to verify whether the caller is a valid delegated administrator.</p>
3126-
* <p>To register a delegated administrator, see <a href="https://docs.aws.amazon.com/config/latest/developerguide/set-up-aggregator-cli.html#register-a-delegated-administrator-cli">Register a Delegated Administrator</a> in the Config developer guide. </p>
3135+
* <p>To register a delegated administrator, see <a href="https://docs.aws.amazon.com/config/latest/developerguide/set-up-aggregator-cli.html#register-a-delegated-administrator-cli">Register a Delegated Administrator</a> in the <i>Config developer guide</i>. </p>
31273136
* </note>
31283137
*/
31293138
public putConfigurationAggregator(
@@ -3206,8 +3215,8 @@ export class ConfigService extends ConfigServiceClient {
32063215
* see <a href="https://docs.aws.amazon.com/config/latest/developerguide/configlimits.html">
32073216
* <b>Service Limits</b>
32083217
* </a> in the Config Developer Guide.</p>
3209-
* <p>This API creates a service linked role <code>AWSServiceRoleForConfigConforms</code> in your account.
3210-
* The service linked role is created only when the role does not exist in your account. </p>
3218+
* <p>This API creates a service-linked role <code>AWSServiceRoleForConfigConforms</code> in your account.
3219+
* The service-linked role is created only when the role does not exist in your account. </p>
32113220
* <note>
32123221
* <p>You must specify either the <code>TemplateS3Uri</code> or the <code>TemplateBody</code> parameter, but not both.
32133222
* If you provide both Config uses the <code>TemplateS3Uri</code> parameter and ignores the <code>TemplateBody</code> parameter.</p>
@@ -3358,29 +3367,42 @@ export class ConfigService extends ConfigServiceClient {
33583367
}
33593368

33603369
/**
3361-
* <p>Adds or updates organization Config rule for your entire organization evaluating whether your Amazon Web Services resources comply with your
3370+
* <p>Adds or updates an Config rule for your entire organization to evaluate if your Amazon Web Services resources comply with your
33623371
* desired configurations. For information on how many organization Config rules you can have per account,
33633372
* see <a href="https://docs.aws.amazon.com/config/latest/developerguide/configlimits.html">
33643373
* <b>Service Limits</b>
3365-
* </a> in the Config Developer Guide.</p>
3374+
* </a> in the <i>Config Developer Guide</i>.</p>
33663375
* <p> Only a master account and a delegated administrator can create or update an organization Config rule.
33673376
* When calling this API with a delegated administrator, you must ensure Organizations
33683377
* <code>ListDelegatedAdministrator</code> permissions are added. An organization can have up to 3 delegated administrators.</p>
3369-
* <p>This API enables organization service access through the <code>EnableAWSServiceAccess</code> action and creates a service linked
3378+
* <p>This API enables organization service access through the <code>EnableAWSServiceAccess</code> action and creates a service-linked
33703379
* role <code>AWSServiceRoleForConfigMultiAccountSetup</code> in the master or delegated administrator account of your organization.
3371-
* The service linked role is created only when the role does not exist in the caller account.
3380+
* The service-linked role is created only when the role does not exist in the caller account.
33723381
* Config verifies the existence of role with <code>GetRole</code> action.</p>
33733382
* <p>To use this API with delegated administrator, register a delegated administrator by calling Amazon Web Services Organization
33743383
* <code>register-delegated-administrator</code> for <code>config-multiaccountsetup.amazonaws.com</code>. </p>
3375-
* <p>You can use this action to create both Config custom rules and Config managed rules.
3376-
* If you are adding a new Config custom rule, you must first create Lambda function in the master account or a delegated
3377-
* 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.
3378-
* When you use the <code>PutOrganizationConfigRule</code> action to add the rule to Config, you must
3379-
* specify the Amazon Resource Name (ARN) that Lambda assigns to the function.
3380-
* If you are adding an Config managed rule, specify the rule's identifier for the <code>RuleIdentifier</code> key.</p>
3384+
*
3385+
* <p>There are two types of rules: Config Custom Rules and Config Managed Rules.
3386+
* You can use <code>PutOrganizationConfigRule</code> to create both Config custom rules and Config managed rules.</p>
3387+
*
3388+
* <p>Custom rules are rules that you can create using either Guard or Lambda functions.
3389+
* Guard (<a href="https://github.com/aws-cloudformation/cloudformation-guard">Guard GitHub
3390+
* Repository</a>) is a policy-as-code language that allows you to write policies that
3391+
* are enforced by Config Custom Policy rules. Lambda uses custom code that you upload to
3392+
* evaluate a custom rule. If you are adding a new Custom Lambda rule, you first need to create an Lambda function in the master account or a delegated
3393+
* 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.
3394+
* When you use <code>PutOrganizationConfigRule</code> to add a Custom Lambda rule to Config, you must
3395+
* specify the Amazon Resource Name (ARN) that Lambda assigns to the function.</p>
3396+
*
3397+
* <p>Managed rules are predefined,
3398+
* customizable rules created by Config. For a list of managed rules, see
3399+
* <a href="https://docs.aws.amazon.com/config/latest/developerguide/managed-rules-by-aws-config.html">List of Config
3400+
* Managed Rules</a>. If you are adding an Config managed rule, you must specify the rule's identifier for the <code>RuleIdentifier</code> key.</p>
3401+
*
3402+
*
33813403
* <note>
33823404
* <p>Prerequisite: Ensure you call <code>EnableAllFeatures</code> API to enable all features in an organization.</p>
3383-
* <p>Specify either <code>OrganizationCustomRuleMetadata</code> or <code>OrganizationManagedRuleMetadata</code>.</p>
3405+
* <p>Make sure to specify one of either <code>OrganizationCustomPolicyRuleMetadata</code> for Custom Policy rules, <code>OrganizationCustomRuleMetadata</code> for Custom Lambda rules, or <code>OrganizationManagedRuleMetadata</code> for managed rules.</p>
33843406
* </note>
33853407
*/
33863408
public putOrganizationConfigRule(
@@ -3422,8 +3444,8 @@ export class ConfigService extends ConfigServiceClient {
34223444
* <code>ListDelegatedAdministrator</code> permissions are added. An organization can have up to 3 delegated administrators.</p>
34233445
* <p>This API enables organization service access for <code>config-multiaccountsetup.amazonaws.com</code>
34243446
* through the <code>EnableAWSServiceAccess</code> action and creates a
3425-
* service linked role <code>AWSServiceRoleForConfigMultiAccountSetup</code> in the master or delegated administrator account of your organization.
3426-
* The service linked role is created only when the role does not exist in the caller account.
3447+
* service-linked role <code>AWSServiceRoleForConfigMultiAccountSetup</code> in the master or delegated administrator account of your organization.
3448+
* The service-linked role is created only when the role does not exist in the caller account.
34273449
* To use this API with delegated administrator, register a delegated administrator by calling Amazon Web Services Organization
34283450
* <code>register-delegate-admin</code> for <code>config-multiaccountsetup.amazonaws.com</code>.</p>
34293451
*
@@ -3715,7 +3737,7 @@ export class ConfigService extends ConfigServiceClient {
37153737
* <p>For more information about query components, see the
37163738
* <a href="https://docs.aws.amazon.com/config/latest/developerguide/query-components.html">
37173739
* <b>Query Components</b>
3718-
* </a> section in the Config Developer Guide.</p>
3740+
* </a> section in the <i>Config Developer Guide</i>.</p>
37193741
*/
37203742
public selectResourceConfig(
37213743
args: SelectResourceConfigCommandInput,

clients/client-config-service/src/commands/ListConformancePackComplianceScoresCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ export interface ListConformancePackComplianceScoresCommandOutput
3333
* <p>Returns a list of conformance pack compliance scores.
3434
* A compliance score is the percentage of the number of compliant rule-resource combinations in a conformance pack compared to the number of total possible rule-resource combinations in the conformance pack.
3535
* This metric provides you with a high-level view of the compliance state of your conformance packs, and can be used to identify, investigate, and understand
36-
* compliance deviations in your conformance packs.</p>
36+
* the level of compliance in your conformance packs.</p>
37+
* <note>
38+
* <p>Conformance packs with no evaluation results will have a compliance score of <code>INSUFFICIENT_DATA</code>.</p>
39+
* </note>
3740
* @example
3841
* Use a bare-bones client and the command you need to make an API call.
3942
* ```javascript

clients/client-config-service/src/commands/PutConfigRuleCommand.ts

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,33 @@ export interface PutConfigRuleCommandInput extends PutConfigRuleRequest {}
2323
export interface PutConfigRuleCommandOutput extends __MetadataBearer {}
2424

2525
/**
26-
* <p>Adds or updates an Config rule for evaluating whether your
27-
* Amazon Web Services resources comply with your desired configurations.</p>
28-
* <p>You can use this action for Config custom rules and Config
29-
* managed rules. A Config custom rule is a rule that you
30-
* develop and maintain. An Config managed rule is a customizable,
31-
* predefined rule that Config provides.</p>
32-
* <p>If you are adding a new Config custom rule, you must first
33-
* create the Lambda function that the rule invokes to evaluate
34-
* your resources. When you use the <code>PutConfigRule</code> action
35-
* to add the rule to Config, you must specify the Amazon Resource
36-
* Name (ARN) that Lambda assigns to the function. Specify the ARN
37-
* for the <code>SourceIdentifier</code> key. This key is part of the
38-
* <code>Source</code> object, which is part of the
39-
* <code>ConfigRule</code> object. </p>
40-
* <p>If you are adding an Config managed rule, specify the
41-
* rule's identifier for the <code>SourceIdentifier</code> key. To
42-
* reference Config managed rule identifiers, see <a href="https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html">About Config managed rules</a>.</p>
26+
* <p>Adds or updates an Config rule to evaluate if your
27+
* Amazon Web Services resources comply with your desired configurations. For information on how many Config rules you can have per account,
28+
* see <a href="https://docs.aws.amazon.com/config/latest/developerguide/configlimits.html">
29+
* <b>Service Limits</b>
30+
* </a> in the <i>Config Developer Guide</i>.</p>
31+
*
32+
* <p>There are two types of rules: Config Custom Rules and Config Managed Rules.
33+
* You can use <code>PutConfigRule</code> to create both Config custom rules and Config managed rules.</p>
34+
*
35+
* <p>Custom rules are rules that you can create using either Guard or Lambda functions.
36+
* Guard (<a href="https://github.com/aws-cloudformation/cloudformation-guard">Guard GitHub
37+
* Repository</a>) is a policy-as-code language that allows you to write policies that
38+
* are enforced by Config Custom Policy rules. Lambda uses custom code that you upload to
39+
* evaluate a custom rule. If you are adding a new Custom Lambda rule,
40+
* you first need to create an Lambda function that the rule invokes to evaluate
41+
* your resources. When you use <code>PutConfigRule</code> to add a Custom Lambda rule to Config, you must specify the Amazon Resource
42+
* Name (ARN) that Lambda assigns to the function. You specify the ARN
43+
* in the <code>SourceIdentifier</code> key. This key is part of the
44+
* <code>Source</code> object, which is part of the
45+
* <code>ConfigRule</code> object. </p>
46+
*
47+
* <p>Managed rules are predefined,
48+
* customizable rules created by Config. For a list of managed rules, see
49+
* <a href="https://docs.aws.amazon.com/config/latest/developerguide/managed-rules-by-aws-config.html">List of Config
50+
* Managed Rules</a>. If you are adding an Config managed rule, you must specify the
51+
* rule's identifier for the <code>SourceIdentifier</code> key.</p>
52+
*
4353
* <p>For any new rule that you add, specify the
4454
* <code>ConfigRuleName</code> in the <code>ConfigRule</code>
4555
* object. Do not specify the <code>ConfigRuleArn</code> or the
@@ -49,10 +59,6 @@ export interface PutConfigRuleCommandOutput extends __MetadataBearer {}
4959
* <code>ConfigRuleId</code>, or <code>ConfigRuleArn</code> in the
5060
* <code>ConfigRule</code> data type that you use in this
5161
* request.</p>
52-
* <p>For information on how many Config rules you can have per account,
53-
* see <a href="https://docs.aws.amazon.com/config/latest/developerguide/configlimits.html">
54-
* <b>Service Limits</b>
55-
* </a> in the Config Developer Guide.</p>
5662
*
5763
* <p>For more information about developing and using Config
5864
* rules, see <a href="https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html">Evaluating Amazon Web Services resource Configurations with Config</a>

0 commit comments

Comments
 (0)