NetworkSecurityManagerCustomerAPI / Client / generate_rule_configuration
generate_rule_configuration¶
- NetworkSecurityManagerCustomerAPI.Client.generate_rule_configuration(**kwargs)¶
Generates a rule configuration from a natural-language description. Provide a prompt along with the rule’s firewall type and rule type. The service returns a configuration that you can use when you create or update a rule. If you also provide an existing configuration, the service edits that configuration instead of generating a new one.
See also: AWS API Documentation
Request Syntax
response = client.generate_rule_configuration( prompt='string', ruleFirewallType='WAF', ruleType='CONFIGURATION'|'INSPECTION', wafConfigDataType='DefaultAction'|'VisibilityConfig'|'CaptchaConfig'|'ChallengeConfig'|'CustomResponseBodies'|'LoggingConfiguration'|'DataProtectionConfig'|'AssociationConfig'|'OnSourceDDoSProtectionConfig'|'TokenDomains', currentConfiguration='string', clientToken='string' )
- Parameters:
prompt (string) –
[REQUIRED]
A natural-language description of the configuration that you want to generate.
ruleFirewallType (string) –
[REQUIRED]
The firewall type of the rule.
ruleType (string) –
[REQUIRED]
The type of the rule.
CONFIGURATIONrules contain firewall settings, andINSPECTIONrules contain rule groups.wafConfigDataType (string) – For AWS WAF configuration rules, the specific AWS WAF configuration variant to generate. This is optional; if you omit it, the service selects the variant.
currentConfiguration (string) – An existing configuration to edit, as a JSON string. When you provide this value, the operation edits the configuration. When you omit it, the operation generates a new configuration.
clientToken (string) –
A unique, case-sensitive token that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token and the same parameters, the service returns the result of the original successful request.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'configuration': 'string', 'description': 'string' }
Response Structure
(dict) –
configuration (string) –
The generated configuration, as a JSON string. You can use this value in the
configurationfield of a rule.description (string) –
Reserved for a future human-readable description of the generated configuration. This field is currently not populated.
Exceptions