| 1 | import type * as WAFV2 from "@distilled.cloud/aws/wafv2"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `wafv2:DescribeManagedRuleGroup` — read the rules, |
| 7 | * labels, and WCU capacity of a vendor managed rule group. |
| 8 | * |
| 9 | * Provide `WAFv2.DescribeManagedRuleGroupHttp` on the hosting Lambda |
| 10 | * Function to satisfy the requirement. |
| 11 | * ### Managed Rule Group Catalog |
| 12 | * **Example:** Describe the AWS Common Rule Set |
| 13 | * ```typescript |
| 14 | * // init — grants wafv2:DescribeManagedRuleGroup |
| 15 | * const describeManagedRuleGroup = yield* AWS.WAFv2.DescribeManagedRuleGroup(); |
| 16 | * |
| 17 | * // runtime |
| 18 | * const { Capacity, Rules } = yield* describeManagedRuleGroup({ |
| 19 | * VendorName: "AWS", |
| 20 | * Name: "AWSManagedRulesCommonRuleSet", |
| 21 | * Scope: "REGIONAL", |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface DescribeManagedRuleGroup extends Binding.Service< |
| 28 | DescribeManagedRuleGroup, |
| 29 | "AWS.WAFv2.DescribeManagedRuleGroup", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request: WAFV2.DescribeManagedRuleGroupRequest, |
| 33 | ) => Effect.Effect< |
| 34 | WAFV2.DescribeManagedRuleGroupResponse, |
| 35 | WAFV2.DescribeManagedRuleGroupError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | |
| 40 | export const DescribeManagedRuleGroup = |
| 41 | Binding.Service<DescribeManagedRuleGroup>( |
| 42 | "AWS.WAFv2.DescribeManagedRuleGroup", |
| 43 | ); |
| 44 | |
| 45 | /** |
| 46 | * Runtime binding for `wafv2:ListAvailableManagedRuleGroups` — list the |
| 47 | * vendor managed rule groups available to the account (AWS Managed Rules + |
| 48 | * subscribed Marketplace groups). |
| 49 | * |
| 50 | * Provide `WAFv2.ListAvailableManagedRuleGroupsHttp` on the hosting Lambda |
| 51 | * Function to satisfy the requirement. |
| 52 | * ### Managed Rule Group Catalog |
| 53 | * **Example:** List Available Managed Rule Groups |
| 54 | * ```typescript |
| 55 | * // init — grants wafv2:ListAvailableManagedRuleGroups |
| 56 | * const listManagedRuleGroups = yield* AWS.WAFv2.ListAvailableManagedRuleGroups(); |
| 57 | * |
| 58 | * // runtime |
| 59 | * const { ManagedRuleGroups } = yield* listManagedRuleGroups({ |
| 60 | * Scope: "REGIONAL", |
| 61 | * }); |
| 62 | * ``` |
| 63 | * |
| 64 | * @binding |
| 65 | */ |
| 66 | export interface ListAvailableManagedRuleGroups extends Binding.Service< |
| 67 | ListAvailableManagedRuleGroups, |
| 68 | "AWS.WAFv2.ListAvailableManagedRuleGroups", |
| 69 | () => Effect.Effect< |
| 70 | ( |
| 71 | request: WAFV2.ListAvailableManagedRuleGroupsRequest, |
| 72 | ) => Effect.Effect< |
| 73 | WAFV2.ListAvailableManagedRuleGroupsResponse, |
| 74 | WAFV2.ListAvailableManagedRuleGroupsError |
| 75 | > |
| 76 | > |
| 77 | > {} |
| 78 | |
| 79 | export const ListAvailableManagedRuleGroups = |
| 80 | Binding.Service<ListAvailableManagedRuleGroups>( |
| 81 | "AWS.WAFv2.ListAvailableManagedRuleGroups", |
| 82 | ); |
| 83 | |
| 84 | /** |
| 85 | * Runtime binding for `wafv2:ListAvailableManagedRuleGroupVersions` — list |
| 86 | * the published versions of a vendor managed rule group. |
| 87 | * |
| 88 | * Provide `WAFv2.ListAvailableManagedRuleGroupVersionsHttp` on the hosting |
| 89 | * Lambda Function to satisfy the requirement. |
| 90 | * ### Managed Rule Group Catalog |
| 91 | * **Example:** List Versions of the Common Rule Set |
| 92 | * ```typescript |
| 93 | * // init — grants wafv2:ListAvailableManagedRuleGroupVersions |
| 94 | * const listVersions = yield* AWS.WAFv2.ListAvailableManagedRuleGroupVersions(); |
| 95 | * |
| 96 | * // runtime |
| 97 | * const { Versions, CurrentDefaultVersion } = yield* listVersions({ |
| 98 | * VendorName: "AWS", |
| 99 | * Name: "AWSManagedRulesCommonRuleSet", |
| 100 | * Scope: "REGIONAL", |
| 101 | * }); |
| 102 | * ``` |
| 103 | * |
| 104 | * @binding |
| 105 | */ |
| 106 | export interface ListAvailableManagedRuleGroupVersions extends Binding.Service< |
| 107 | ListAvailableManagedRuleGroupVersions, |
| 108 | "AWS.WAFv2.ListAvailableManagedRuleGroupVersions", |
| 109 | () => Effect.Effect< |
| 110 | ( |
| 111 | request: WAFV2.ListAvailableManagedRuleGroupVersionsRequest, |
| 112 | ) => Effect.Effect< |
| 113 | WAFV2.ListAvailableManagedRuleGroupVersionsResponse, |
| 114 | WAFV2.ListAvailableManagedRuleGroupVersionsError |
| 115 | > |
| 116 | > |
| 117 | > {} |
| 118 | |
| 119 | export const ListAvailableManagedRuleGroupVersions = |
| 120 | Binding.Service<ListAvailableManagedRuleGroupVersions>( |
| 121 | "AWS.WAFv2.ListAvailableManagedRuleGroupVersions", |
| 122 | ); |
| 123 | |
| 124 | /** |
| 125 | * Runtime binding for `wafv2:DescribeAllManagedProducts` — read the |
| 126 | * catalog of managed rule group products from AWS and Marketplace vendors. |
| 127 | * |
| 128 | * Provide `WAFv2.DescribeAllManagedProductsHttp` on the hosting Lambda |
| 129 | * Function to satisfy the requirement. |
| 130 | * ### Managed Rule Group Catalog |
| 131 | * **Example:** List All Managed Products |
| 132 | * ```typescript |
| 133 | * // init — grants wafv2:DescribeAllManagedProducts |
| 134 | * const describeAllManagedProducts = yield* AWS.WAFv2.DescribeAllManagedProducts(); |
| 135 | * |
| 136 | * // runtime |
| 137 | * const { ManagedProducts } = yield* describeAllManagedProducts({ |
| 138 | * Scope: "REGIONAL", |
| 139 | * }); |
| 140 | * ``` |
| 141 | * |
| 142 | * @binding |
| 143 | */ |
| 144 | export interface DescribeAllManagedProducts extends Binding.Service< |
| 145 | DescribeAllManagedProducts, |
| 146 | "AWS.WAFv2.DescribeAllManagedProducts", |
| 147 | () => Effect.Effect< |
| 148 | ( |
| 149 | request: WAFV2.DescribeAllManagedProductsRequest, |
| 150 | ) => Effect.Effect< |
| 151 | WAFV2.DescribeAllManagedProductsResponse, |
| 152 | WAFV2.DescribeAllManagedProductsError |
| 153 | > |
| 154 | > |
| 155 | > {} |
| 156 | |
| 157 | export const DescribeAllManagedProducts = |
| 158 | Binding.Service<DescribeAllManagedProducts>( |
| 159 | "AWS.WAFv2.DescribeAllManagedProducts", |
| 160 | ); |
| 161 | |
| 162 | /** |
| 163 | * Runtime binding for `wafv2:DescribeManagedProductsByVendor` — read the |
| 164 | * managed rule group products of a single vendor. |
| 165 | * |
| 166 | * Provide `WAFv2.DescribeManagedProductsByVendorHttp` on the hosting |
| 167 | * Lambda Function to satisfy the requirement. |
| 168 | * ### Managed Rule Group Catalog |
| 169 | * **Example:** List AWS-Vended Managed Products |
| 170 | * ```typescript |
| 171 | * // init — grants wafv2:DescribeManagedProductsByVendor |
| 172 | * const describeByVendor = yield* AWS.WAFv2.DescribeManagedProductsByVendor(); |
| 173 | * |
| 174 | * // runtime |
| 175 | * const { ManagedProducts } = yield* describeByVendor({ |
| 176 | * VendorName: "AWS", |
| 177 | * Scope: "REGIONAL", |
| 178 | * }); |
| 179 | * ``` |
| 180 | * |
| 181 | * @binding |
| 182 | */ |
| 183 | export interface DescribeManagedProductsByVendor extends Binding.Service< |
| 184 | DescribeManagedProductsByVendor, |
| 185 | "AWS.WAFv2.DescribeManagedProductsByVendor", |
| 186 | () => Effect.Effect< |
| 187 | ( |
| 188 | request: WAFV2.DescribeManagedProductsByVendorRequest, |
| 189 | ) => Effect.Effect< |
| 190 | WAFV2.DescribeManagedProductsByVendorResponse, |
| 191 | WAFV2.DescribeManagedProductsByVendorError |
| 192 | > |
| 193 | > |
| 194 | > {} |
| 195 | |
| 196 | export const DescribeManagedProductsByVendor = |
| 197 | Binding.Service<DescribeManagedProductsByVendor>( |
| 198 | "AWS.WAFv2.DescribeManagedProductsByVendor", |
| 199 | ); |