Skip to content

Commit

Permalink
feat(client-wafv2): Add a new CurrentDefaultVersion field to ListAvai…
Browse files Browse the repository at this point in the history
…lableManagedRuleGroupVersions API response; add a new VersioningSupported boolean to each ManagedRuleGroup returned from ListAvailableManagedRuleGroups API response.
  • Loading branch information
awstools committed Apr 8, 2022
1 parent d49135a commit 07f9765
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 6 deletions.
20 changes: 18 additions & 2 deletions clients/client-wafv2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1367,6 +1367,7 @@ export namespace UsernameField {
* <p>Additional information that's used by a managed rule group. Most managed rule groups don't require this.</p>
* <p>Use this for the account takeover prevention managed rule group
* <code>AWSManagedRulesATPRuleSet</code>, to provide information about the sign-in page of your application. </p>
* <p>You can provide multiple individual <code>ManagedRuleGroupConfig</code> objects for any rule group configuration, for example <code>UsernameField</code> and <code>PasswordField</code>. The configuration that you provide depends on the needs of the managed rule group. For the ATP managed rule group, you provide the following individual configuration objects: <code>LoginPath</code>, <code>PasswordField</code>, <code>PayloadType</code> and <code>UsernameField</code>.</p>
*/
export interface ManagedRuleGroupConfig {
/**
Expand Down Expand Up @@ -4743,6 +4744,11 @@ export interface ManagedRuleGroupSummary {
*/
Name?: string;

/**
* <p>Indicates whether the managed rule group is versioned. If it is, you can retrieve the versions list by calling <a>ListAvailableManagedRuleGroupVersions</a>. </p>
*/
VersioningSupported?: boolean;

/**
* <p>The description of the managed rule group, provided by Amazon Web Services Managed Rules or the Amazon Web Services Marketplace seller who manages it.</p>
*/
Expand Down Expand Up @@ -4867,6 +4873,11 @@ export interface ListAvailableManagedRuleGroupVersionsResponse {
* <p>The versions that are currently available for the specified managed rule group. </p>
*/
Versions?: ManagedRuleGroupVersion[];

/**
* <p>The name of the version that's currently set as the default. </p>
*/
CurrentDefaultVersion?: string;
}

export namespace ListAvailableManagedRuleGroupVersionsResponse {
Expand Down Expand Up @@ -5726,7 +5737,9 @@ export interface PutPermissionPolicyRequest {
* </li>
* <li>
* <p>
* <code>Action</code> must specify <code>wafv2:CreateWebACL</code>, <code>wafv2:UpdateWebACL</code>, and <code>wafv2:PutFirewallManagerRuleGroups</code>. WAF rejects any extra actions or wildcard actions in the policy.</p>
* <code>Action</code> must specify <code>wafv2:CreateWebACL</code>, <code>wafv2:UpdateWebACL</code>, and
* <code>wafv2:PutFirewallManagerRuleGroups</code> and may optionally specify <code>wafv2:GetRuleGroup</code>.
* WAF rejects any extra actions or wildcard actions in the policy.</p>
* </li>
* <li>
* <p>The policy must not include a <code>Resource</code> parameter.</p>
Expand Down Expand Up @@ -5774,7 +5787,9 @@ export namespace PutPermissionPolicyResponse {
* </li>
* <li>
* <p>
* <code>Action</code> must specify <code>wafv2:CreateWebACL</code>, <code>wafv2:UpdateWebACL</code>, and <code>wafv2:PutFirewallManagerRuleGroups</code>. WAF rejects any extra actions or wildcard actions in the policy.</p>
* <code>Action</code> must specify <code>wafv2:CreateWebACL</code>, <code>wafv2:UpdateWebACL</code>, and
* <code>wafv2:PutFirewallManagerRuleGroups</code> and may optionally specify <code>wafv2:GetRuleGroup</code>.
* WAF rejects any extra actions or wildcard actions in the policy.</p>
* </li>
* <li>
* <p>The policy must not include a <code>Resource</code> parameter.</p>
Expand Down Expand Up @@ -6300,6 +6315,7 @@ export interface ManagedRuleGroupStatement {
* <p>Additional information that's used by a managed rule group. Most managed rule groups don't require this.</p>
* <p>Use this for the account takeover prevention managed rule group
* <code>AWSManagedRulesATPRuleSet</code>, to provide information about the sign-in page of your application. </p>
* <p>You can provide multiple individual <code>ManagedRuleGroupConfig</code> objects for any rule group configuration, for example <code>UsernameField</code> and <code>PasswordField</code>. The configuration that you provide depends on the needs of the managed rule group. For the ATP managed rule group, you provide the following individual configuration objects: <code>LoginPath</code>, <code>PasswordField</code>, <code>PayloadType</code> and <code>UsernameField</code>.</p>
*/
ManagedRuleGroupConfigs?: ManagedRuleGroupConfig[];
}
Expand Down
5 changes: 5 additions & 0 deletions clients/client-wafv2/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2596,6 +2596,9 @@ const deserializeAws_json1_1ListAvailableManagedRuleGroupVersionsCommandError =
case "WAFInvalidParameterException":
case "com.amazonaws.wafv2#WAFInvalidParameterException":
throw await deserializeAws_json1_1WAFInvalidParameterExceptionResponse(parsedOutput, context);
case "WAFNonexistentItemException":
case "com.amazonaws.wafv2#WAFNonexistentItemException":
throw await deserializeAws_json1_1WAFNonexistentItemExceptionResponse(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
response = new __BaseException({
Expand Down Expand Up @@ -6154,6 +6157,7 @@ const deserializeAws_json1_1ListAvailableManagedRuleGroupVersionsResponse = (
context: __SerdeContext
): ListAvailableManagedRuleGroupVersionsResponse => {
return {
CurrentDefaultVersion: __expectString(output.CurrentDefaultVersion),
NextMarker: __expectString(output.NextMarker),
Versions:
output.Versions !== undefined && output.Versions !== null
Expand Down Expand Up @@ -6398,6 +6402,7 @@ const deserializeAws_json1_1ManagedRuleGroupSummary = (
Description: __expectString(output.Description),
Name: __expectString(output.Name),
VendorName: __expectString(output.VendorName),
VersioningSupported: __expectBoolean(output.VersioningSupported),
} as any;
};

Expand Down
29 changes: 25 additions & 4 deletions codegen/sdk-codegen/aws-models/wafv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2872,6 +2872,12 @@
"type": "list",
"member": {
"target": "com.amazonaws.wafv2#ExcludedRule"
},
"traits": {
"smithy.api#length": {
"min": 0,
"max": 100
}
}
},
"com.amazonaws.wafv2#FailureReason": {
Expand Down Expand Up @@ -4463,6 +4469,9 @@
},
{
"target": "com.amazonaws.wafv2#WAFInvalidParameterException"
},
{
"target": "com.amazonaws.wafv2#WAFNonexistentItemException"
}
],
"traits": {
Expand Down Expand Up @@ -4521,6 +4530,12 @@
"traits": {
"smithy.api#documentation": "<p>The versions that are currently available for the specified managed rule group. </p>"
}
},
"CurrentDefaultVersion": {
"target": "com.amazonaws.wafv2#VersionKeyString",
"traits": {
"smithy.api#documentation": "<p>The name of the version that's currently set as the default. </p>"
}
}
}
},
Expand Down Expand Up @@ -5302,7 +5317,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>Additional information that's used by a managed rule group. Most managed rule groups don't require this.</p>\n <p>Use this for the account takeover prevention managed rule group \n <code>AWSManagedRulesATPRuleSet</code>, to provide information about the sign-in page of your application. </p>"
"smithy.api#documentation": "<p>Additional information that's used by a managed rule group. Most managed rule groups don't require this.</p>\n <p>Use this for the account takeover prevention managed rule group \n <code>AWSManagedRulesATPRuleSet</code>, to provide information about the sign-in page of your application. </p> \n <p>You can provide multiple individual <code>ManagedRuleGroupConfig</code> objects for any rule group configuration, for example <code>UsernameField</code> and <code>PasswordField</code>. The configuration that you provide depends on the needs of the managed rule group. For the ATP managed rule group, you provide the following individual configuration objects: <code>LoginPath</code>, <code>PasswordField</code>, <code>PayloadType</code> and <code>UsernameField</code>.</p>"
}
},
"com.amazonaws.wafv2#ManagedRuleGroupConfigs": {
Expand Down Expand Up @@ -5354,7 +5369,7 @@
"ManagedRuleGroupConfigs": {
"target": "com.amazonaws.wafv2#ManagedRuleGroupConfigs",
"traits": {
"smithy.api#documentation": "<p>Additional information that's used by a managed rule group. Most managed rule groups don't require this.</p>\n <p>Use this for the account takeover prevention managed rule group \n <code>AWSManagedRulesATPRuleSet</code>, to provide information about the sign-in page of your application. </p>"
"smithy.api#documentation": "<p>Additional information that's used by a managed rule group. Most managed rule groups don't require this.</p>\n <p>Use this for the account takeover prevention managed rule group \n <code>AWSManagedRulesATPRuleSet</code>, to provide information about the sign-in page of your application. </p> \n <p>You can provide multiple individual <code>ManagedRuleGroupConfig</code> objects for any rule group configuration, for example <code>UsernameField</code> and <code>PasswordField</code>. The configuration that you provide depends on the needs of the managed rule group. For the ATP managed rule group, you provide the following individual configuration objects: <code>LoginPath</code>, <code>PasswordField</code>, <code>PayloadType</code> and <code>UsernameField</code>.</p>"
}
}
},
Expand Down Expand Up @@ -5383,6 +5398,12 @@
"smithy.api#documentation": "<p>The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.</p>"
}
},
"VersioningSupported": {
"target": "com.amazonaws.wafv2#Boolean",
"traits": {
"smithy.api#documentation": "<p>Indicates whether the managed rule group is versioned. If it is, you can retrieve the versions list by calling <a>ListAvailableManagedRuleGroupVersions</a>. </p>"
}
},
"Description": {
"target": "com.amazonaws.wafv2#EntityDescription",
"traits": {
Expand Down Expand Up @@ -6226,7 +6247,7 @@
"Policy": {
"target": "com.amazonaws.wafv2#PolicyString",
"traits": {
"smithy.api#documentation": "<p>The policy to attach to the specified rule group. </p>\n \n <p>The policy specifications must conform to the following:</p>\n <ul>\n <li> \n <p>The policy must be composed using IAM Policy version 2012-10-17 or version 2015-01-01.</p>\n </li>\n <li>\n <p>The policy must include specifications for <code>Effect</code>, <code>Action</code>, and <code>Principal</code>.</p>\n </li>\n <li>\n <p>\n <code>Effect</code> must specify <code>Allow</code>.</p>\n </li>\n <li>\n <p>\n <code>Action</code> must specify <code>wafv2:CreateWebACL</code>, <code>wafv2:UpdateWebACL</code>, and <code>wafv2:PutFirewallManagerRuleGroups</code>. WAF rejects any extra actions or wildcard actions in the policy.</p>\n </li>\n <li>\n <p>The policy must not include a <code>Resource</code> parameter.</p>\n </li>\n </ul> \n <p>For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html\">IAM Policies</a>. </p>",
"smithy.api#documentation": "<p>The policy to attach to the specified rule group. </p>\n \n <p>The policy specifications must conform to the following:</p>\n <ul>\n <li> \n <p>The policy must be composed using IAM Policy version 2012-10-17 or version 2015-01-01.</p>\n </li>\n <li>\n <p>The policy must include specifications for <code>Effect</code>, <code>Action</code>, and <code>Principal</code>.</p>\n </li>\n <li>\n <p>\n <code>Effect</code> must specify <code>Allow</code>.</p>\n </li>\n <li>\n <p>\n <code>Action</code> must specify <code>wafv2:CreateWebACL</code>, <code>wafv2:UpdateWebACL</code>, and \n <code>wafv2:PutFirewallManagerRuleGroups</code> and may optionally specify <code>wafv2:GetRuleGroup</code>. \n WAF rejects any extra actions or wildcard actions in the policy.</p>\n </li>\n <li>\n <p>The policy must not include a <code>Resource</code> parameter.</p>\n </li>\n </ul> \n <p>For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html\">IAM Policies</a>. </p>",
"smithy.api#required": {}
}
}
Expand Down Expand Up @@ -8287,7 +8308,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>The operation failed because the specified policy isn't in the proper format. </p>\n \n <p>The policy specifications must conform to the following:</p>\n <ul>\n <li> \n <p>The policy must be composed using IAM Policy version 2012-10-17 or version 2015-01-01.</p>\n </li>\n <li>\n <p>The policy must include specifications for <code>Effect</code>, <code>Action</code>, and <code>Principal</code>.</p>\n </li>\n <li>\n <p>\n <code>Effect</code> must specify <code>Allow</code>.</p>\n </li>\n <li>\n <p>\n <code>Action</code> must specify <code>wafv2:CreateWebACL</code>, <code>wafv2:UpdateWebACL</code>, and <code>wafv2:PutFirewallManagerRuleGroups</code>. WAF rejects any extra actions or wildcard actions in the policy.</p>\n </li>\n <li>\n <p>The policy must not include a <code>Resource</code> parameter.</p>\n </li>\n </ul> \n <p>For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html\">IAM Policies</a>. </p>",
"smithy.api#documentation": "<p>The operation failed because the specified policy isn't in the proper format. </p>\n \n <p>The policy specifications must conform to the following:</p>\n <ul>\n <li> \n <p>The policy must be composed using IAM Policy version 2012-10-17 or version 2015-01-01.</p>\n </li>\n <li>\n <p>The policy must include specifications for <code>Effect</code>, <code>Action</code>, and <code>Principal</code>.</p>\n </li>\n <li>\n <p>\n <code>Effect</code> must specify <code>Allow</code>.</p>\n </li>\n <li>\n <p>\n <code>Action</code> must specify <code>wafv2:CreateWebACL</code>, <code>wafv2:UpdateWebACL</code>, and \n <code>wafv2:PutFirewallManagerRuleGroups</code> and may optionally specify <code>wafv2:GetRuleGroup</code>. \n WAF rejects any extra actions or wildcard actions in the policy.</p>\n </li>\n <li>\n <p>The policy must not include a <code>Resource</code> parameter.</p>\n </li>\n </ul> \n <p>For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html\">IAM Policies</a>. </p>",
"smithy.api#error": "client"
}
},
Expand Down

0 comments on commit 07f9765

Please sign in to comment.