WAFV2 / Client / get_managed_rule_set
get_managed_rule_set#
- WAFV2.Client.get_managed_rule_set(**kwargs)#
Retrieves the specified managed rule set.
Note
This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Amazon Web Services Marketplace sellers.
Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are
ListManagedRuleSets
,GetManagedRuleSet
,PutManagedRuleSetVersions
, andUpdateManagedRuleSetVersionExpiryDate
.See also: AWS API Documentation
Request Syntax
response = client.get_managed_rule_set( Name='string', Scope='CLOUDFRONT'|'REGIONAL', Id='string' )
- Parameters:
Name (string) –
[REQUIRED]
The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set.
This name is assigned to the corresponding managed rule group, which your customers can access and use.
Scope (string) –
[REQUIRED]
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, or an App Runner service.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
.API and SDKs - For all calls, use the Region endpoint us-east-1.
Id (string) –
[REQUIRED]
A unique identifier for the managed rule set. The ID is returned in the responses to commands like
list
. You provide it to operations likeget
andupdate
.
- Return type:
dict
- Returns:
Response Syntax
{ 'ManagedRuleSet': { 'Name': 'string', 'Id': 'string', 'ARN': 'string', 'Description': 'string', 'PublishedVersions': { 'string': { 'AssociatedRuleGroupArn': 'string', 'Capacity': 123, 'ForecastedLifetime': 123, 'PublishTimestamp': datetime(2015, 1, 1), 'LastUpdateTimestamp': datetime(2015, 1, 1), 'ExpiryTimestamp': datetime(2015, 1, 1) } }, 'RecommendedVersion': 'string', 'LabelNamespace': 'string' }, 'LockToken': 'string' }
Response Structure
(dict) –
ManagedRuleSet (dict) –
The managed rule set that you requested.
Name (string) –
The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set.
This name is assigned to the corresponding managed rule group, which your customers can access and use.
Id (string) –
A unique identifier for the managed rule set. The ID is returned in the responses to commands like
list
. You provide it to operations likeget
andupdate
.ARN (string) –
The Amazon Resource Name (ARN) of the entity.
Description (string) –
A description of the set that helps with identification.
PublishedVersions (dict) –
The versions of this managed rule set that are available for use by customers.
(string) –
(dict) –
Information for a single version of a managed rule set.
Note
This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Amazon Web Services Marketplace sellers.
Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are
ListManagedRuleSets
,GetManagedRuleSet
,PutManagedRuleSetVersions
, andUpdateManagedRuleSetVersionExpiryDate
.AssociatedRuleGroupArn (string) –
The Amazon Resource Name (ARN) of the vendor rule group that’s used to define the published version of your managed rule group.
Capacity (integer) –
The web ACL capacity units (WCUs) required for this rule group.
WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. For more information, see WAF web ACL capacity units (WCU) in the WAF Developer Guide.
ForecastedLifetime (integer) –
The amount of time you expect this version of your managed rule group to last, in days.
PublishTimestamp (datetime) –
The time that you first published this version.
Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, “2016-09-27T14:50Z”.
LastUpdateTimestamp (datetime) –
The last time that you updated this version.
Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, “2016-09-27T14:50Z”.
ExpiryTimestamp (datetime) –
The time that this version is set to expire.
Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, “2016-09-27T14:50Z”.
RecommendedVersion (string) –
The version that you would like your customers to use.
LabelNamespace (string) –
The label namespace prefix for the managed rule groups that are offered to customers from this managed rule set. All labels that are added by rules in the managed rule group have this prefix.
The syntax for the label namespace prefix for a managed rule group is the following:
awswaf:managed:<vendor>:<rule group name>
:When a rule with a label matches a web request, WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon:
<label namespace>:<label from rule>
LockToken (string) –
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation.
Exceptions
WAFV2.Client.exceptions.WAFInternalErrorException
WAFV2.Client.exceptions.WAFInvalidParameterException
WAFV2.Client.exceptions.WAFNonexistentItemException
WAFV2.Client.exceptions.WAFInvalidOperationException