I want to use the boto3 to view my config rules.
> import boto3
> client = boto3.client('config')
> client.describe_config_rules()
The previous snippet returns the rule information, but does not include the filed 'Description' for rules with a long description. I can see the whole description in the AWS console, but boto3 does not retrieve the description. Why is that? Can we control this behaviour?
The CLI command
$ aws configservice describe-config-rules
also does not return the description
Thank you for your help!
I can see the description in the console
But describe_config_rules
does not retrieve the description
response = client.describe_config_rules(
ConfigRuleNames=[
's3-bucket-logging-enabled-conformance-pack',
]
)
'ConfigRules': [{'ConfigRuleArn': 'arn:aws:config:eu-central-1:xxxxxxxx:config-rule/aws-service-rule/config-conforms.amazonaws.com/config-rule',
'ConfigRuleId': 'config-rule-xxxx',
'ConfigRuleName': 's3-bucket-logging-enabled-conformance-pack',
'ConfigRuleState': 'ACTIVE',
'CreatedBy': 'config-conforms.amazonaws.com',
'Scope': {'ComplianceResourceTypes': ['AWS::S3::Bucket']},
'Source': {'Owner': 'AWS',
'SourceIdentifier': 'S3_BUCKET_LOGGING_ENABLED'}}],
...