Skip to content

Commit 1ad2141

Browse files
feat(albwaf): onboard albwaf custom rule group
Relates to STACKITCLI-443
1 parent 815dd61 commit 1ad2141

30 files changed

Lines changed: 2624 additions & 0 deletions

docs/stackit_beta.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ stackit beta [flags]
4242

4343
* [stackit](./stackit.md) - Manage STACKIT resources using the command line
4444
* [stackit beta alb](./stackit_beta_alb.md) - Manages application loadbalancers
45+
* [stackit beta alb-waf](./stackit_beta_alb-waf.md) - Provides functionality for Application Load Balancer Web Application Firwall
4546
* [stackit beta cdn](./stackit_beta_cdn.md) - Manage CDN resources
4647
* [stackit beta edge-cloud](./stackit_beta_edge-cloud.md) - Provides functionality for Edge Cloud services.
4748
* [stackit beta intake](./stackit_beta_intake.md) - Provides functionality for intake

docs/stackit_beta_alb-waf.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## stackit beta alb-waf
2+
3+
Provides functionality for Application Load Balancer Web Application Firwall
4+
5+
### Synopsis
6+
7+
Provides functionality for Application Load Balancer Web Application Firwall.
8+
9+
```
10+
stackit beta alb-waf [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
-h, --help Help for "stackit beta alb-waf"
17+
```
18+
19+
### Options inherited from parent commands
20+
21+
```
22+
-y, --assume-yes If set, skips all confirmation prompts
23+
--async If set, runs the command asynchronously
24+
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
25+
-p, --project-id string Project ID
26+
--region string Target region for region-specific requests
27+
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
28+
```
29+
30+
### SEE ALSO
31+
32+
* [stackit beta](./stackit_beta.md) - Contains beta STACKIT CLI commands
33+
* [stackit beta alb-waf custom-rule-group](./stackit_beta_alb-waf_custom-rule-group.md) - Provides functionality for alb-waf Custom Rule Group
34+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## stackit beta alb-waf custom-rule-group
2+
3+
Provides functionality for alb-waf Custom Rule Group
4+
5+
### Synopsis
6+
7+
Provides functionality for alb-waf Custom Rule Group.
8+
9+
```
10+
stackit beta alb-waf custom-rule-group [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
-h, --help Help for "stackit beta alb-waf custom-rule-group"
17+
```
18+
19+
### Options inherited from parent commands
20+
21+
```
22+
-y, --assume-yes If set, skips all confirmation prompts
23+
--async If set, runs the command asynchronously
24+
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
25+
-p, --project-id string Project ID
26+
--region string Target region for region-specific requests
27+
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
28+
```
29+
30+
### SEE ALSO
31+
32+
* [stackit beta alb-waf](./stackit_beta_alb-waf.md) - Provides functionality for Application Load Balancer Web Application Firwall
33+
* [stackit beta alb-waf custom-rule-group create](./stackit_beta_alb-waf_custom-rule-group_create.md) - Creates an ALB WAF custom rule group
34+
* [stackit beta alb-waf custom-rule-group delete](./stackit_beta_alb-waf_custom-rule-group_delete.md) - Deletes an ALB WAF custom rule group
35+
* [stackit beta alb-waf custom-rule-group describe](./stackit_beta_alb-waf_custom-rule-group_describe.md) - Shows details of an ALB WAF custom rule group
36+
* [stackit beta alb-waf custom-rule-group generate-payload](./stackit_beta_alb-waf_custom-rule-group_generate-payload.md) - Generates a payload to create/update an ALB WAF custom rule group
37+
* [stackit beta alb-waf custom-rule-group list](./stackit_beta_alb-waf_custom-rule-group_list.md) - Lists all ALB WAF custom rule groups
38+
* [stackit beta alb-waf custom-rule-group update](./stackit_beta_alb-waf_custom-rule-group_update.md) - Updates an ALB WAF custom rule group
39+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## stackit beta alb-waf custom-rule-group create
2+
3+
Creates an ALB WAF custom rule group
4+
5+
### Synopsis
6+
7+
Creates a STACKIT Application Load Balancer (ALB) Web Application Firewall (WAF) custom rule group.
8+
The payload can be provided as a JSON string or a file path prefixed with "@".
9+
See https://docs.api.stackit.cloud/documentation/alb-waf/version/v1 for information regarding the payload structure.
10+
11+
```
12+
stackit beta alb-waf custom-rule-group create [flags]
13+
```
14+
15+
### Examples
16+
17+
```
18+
Create an ALB WAF custom rule group using an API payload sourced from the file "./payload.json"
19+
$ stackit beta alb-waf custom-rule-group create --payload @./payload.json
20+
21+
Create an ALB WAF custom rule group using an API payload provided as a JSON string
22+
$ stackit beta alb-waf custom-rule-group create --payload "{...}"
23+
```
24+
25+
### Options
26+
27+
```
28+
-h, --help Help for "stackit beta alb-waf custom-rule-group create"
29+
--payload string Request payload (JSON). Can be a string or a file path, if prefixed with "@" (example: @./payload.json).
30+
```
31+
32+
### Options inherited from parent commands
33+
34+
```
35+
-y, --assume-yes If set, skips all confirmation prompts
36+
--async If set, runs the command asynchronously
37+
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
38+
-p, --project-id string Project ID
39+
--region string Target region for region-specific requests
40+
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
41+
```
42+
43+
### SEE ALSO
44+
45+
* [stackit beta alb-waf custom-rule-group](./stackit_beta_alb-waf_custom-rule-group.md) - Provides functionality for alb-waf Custom Rule Group
46+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## stackit beta alb-waf custom-rule-group delete
2+
3+
Deletes an ALB WAF custom rule group
4+
5+
### Synopsis
6+
7+
Deletes a STACKIT Application Load Balancer (ALB) Web Application Firewall (WAF) custom rule group.
8+
A custom rule group can only be deleted if it is not referenced by any WAF configuration.
9+
10+
```
11+
stackit beta alb-waf custom-rule-group delete CUSTOM_RULE_GROUP_NAME [flags]
12+
```
13+
14+
### Examples
15+
16+
```
17+
Delete an ALB WAF custom rule group with name "my-custom-rule-group"
18+
$ stackit beta alb-waf custom-rule-group delete my-custom-rule-group
19+
```
20+
21+
### Options
22+
23+
```
24+
-h, --help Help for "stackit beta alb-waf custom-rule-group delete"
25+
```
26+
27+
### Options inherited from parent commands
28+
29+
```
30+
-y, --assume-yes If set, skips all confirmation prompts
31+
--async If set, runs the command asynchronously
32+
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
33+
-p, --project-id string Project ID
34+
--region string Target region for region-specific requests
35+
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
36+
```
37+
38+
### SEE ALSO
39+
40+
* [stackit beta alb-waf custom-rule-group](./stackit_beta_alb-waf_custom-rule-group.md) - Provides functionality for alb-waf Custom Rule Group
41+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## stackit beta alb-waf custom-rule-group describe
2+
3+
Shows details of an ALB WAF custom rule group
4+
5+
### Synopsis
6+
7+
Shows details of a STACKIT Application Load Balancer (ALB) Web Application Firewall (WAF) custom rule group.
8+
9+
```
10+
stackit beta alb-waf custom-rule-group describe CUSTOM_RULE_GROUP_NAME [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
Show details of an ALB WAF custom rule group with name "my-custom-rule-group"
17+
$ stackit beta alb-waf custom-rule-group describe my-custom-rule-group
18+
```
19+
20+
### Options
21+
22+
```
23+
-h, --help Help for "stackit beta alb-waf custom-rule-group describe"
24+
```
25+
26+
### Options inherited from parent commands
27+
28+
```
29+
-y, --assume-yes If set, skips all confirmation prompts
30+
--async If set, runs the command asynchronously
31+
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
32+
-p, --project-id string Project ID
33+
--region string Target region for region-specific requests
34+
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
35+
```
36+
37+
### SEE ALSO
38+
39+
* [stackit beta alb-waf custom-rule-group](./stackit_beta_alb-waf_custom-rule-group.md) - Provides functionality for alb-waf Custom Rule Group
40+
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
## stackit beta alb-waf custom-rule-group generate-payload
2+
3+
Generates a payload to create/update an ALB WAF custom rule group
4+
5+
### Synopsis
6+
7+
Generates a JSON payload with values to be used as --payload input for ALB WAF custom rule group creation or update.
8+
If --name is set, the payload is generated with the current values of the given custom rule group, to be used with the update command. If unset, a payload with default values for the create command is generated.
9+
See https://docs.api.stackit.cloud/documentation/alb-waf/version/v1 for information regarding the payload structure.
10+
11+
```
12+
stackit beta alb-waf custom-rule-group generate-payload [flags]
13+
```
14+
15+
### Examples
16+
17+
```
18+
Generate a payload with default values, and adapt it with custom values for the different configuration options
19+
$ stackit beta alb-waf custom-rule-group generate-payload --file-path ./payload.json
20+
<Modify payload in file, if needed>
21+
$ stackit beta alb-waf custom-rule-group create --payload @./payload.json
22+
23+
Generate a payload with the current values of an existing custom rule group, and adapt it with custom values for the different configuration options
24+
$ stackit beta alb-waf custom-rule-group generate-payload --name my-custom-rule-group --file-path ./payload.json
25+
<Modify payload in file>
26+
$ stackit beta alb-waf custom-rule-group update my-custom-rule-group --payload @./payload.json
27+
28+
Generate a payload with the current values of an existing custom rule group, and preview it in the terminal
29+
$ stackit beta alb-waf custom-rule-group generate-payload --name my-custom-rule-group
30+
```
31+
32+
### Options
33+
34+
```
35+
-f, --file-path string If set, writes the payload to the given file. If unset, writes the payload to the standard output
36+
-h, --help Help for "stackit beta alb-waf custom-rule-group generate-payload"
37+
-n, --name string If set, generates the payload with the current values of the given custom rule group (to be used with the update command). If unset, generates the payload with default values (to be used with the create command)
38+
```
39+
40+
### Options inherited from parent commands
41+
42+
```
43+
-y, --assume-yes If set, skips all confirmation prompts
44+
--async If set, runs the command asynchronously
45+
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
46+
-p, --project-id string Project ID
47+
--region string Target region for region-specific requests
48+
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
49+
```
50+
51+
### SEE ALSO
52+
53+
* [stackit beta alb-waf custom-rule-group](./stackit_beta_alb-waf_custom-rule-group.md) - Provides functionality for alb-waf Custom Rule Group
54+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## stackit beta alb-waf custom-rule-group list
2+
3+
Lists all ALB WAF custom rule groups
4+
5+
### Synopsis
6+
7+
Lists all STACKIT Application Load Balancer (ALB) Web Application Firewall (WAF) custom rule groups.
8+
9+
```
10+
stackit beta alb-waf custom-rule-group list [flags]
11+
```
12+
13+
### Examples
14+
15+
```
16+
List all ALB WAF custom rule groups
17+
$ stackit beta alb-waf custom-rule-group list
18+
19+
List the first 10 ALB WAF custom rule groups
20+
$ stackit beta alb-waf custom-rule-group list --limit=10
21+
```
22+
23+
### Options
24+
25+
```
26+
-h, --help Help for "stackit beta alb-waf custom-rule-group list"
27+
--limit int Limit the output to the first n elements
28+
```
29+
30+
### Options inherited from parent commands
31+
32+
```
33+
-y, --assume-yes If set, skips all confirmation prompts
34+
--async If set, runs the command asynchronously
35+
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
36+
-p, --project-id string Project ID
37+
--region string Target region for region-specific requests
38+
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
39+
```
40+
41+
### SEE ALSO
42+
43+
* [stackit beta alb-waf custom-rule-group](./stackit_beta_alb-waf_custom-rule-group.md) - Provides functionality for alb-waf Custom Rule Group
44+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## stackit beta alb-waf custom-rule-group update
2+
3+
Updates an ALB WAF custom rule group
4+
5+
### Synopsis
6+
7+
Updates a STACKIT Application Load Balancer (ALB) Web Application Firewall (WAF) custom rule group.
8+
The rules of the custom rule group are replaced atomically: send the complete desired rule set, per-rule partial merge is not supported.
9+
The payload can be provided as a JSON string or a file path prefixed with "@". The rule IDs and the rule behavior severity are managed by the server and cannot be set.
10+
See https://docs.api.stackit.cloud/documentation/alb-waf/version/v1 for information regarding the payload structure.
11+
12+
```
13+
stackit beta alb-waf custom-rule-group update CUSTOM_RULE_GROUP_NAME [flags]
14+
```
15+
16+
### Examples
17+
18+
```
19+
Update an ALB WAF custom rule group using an API payload sourced from the file "./payload.json"
20+
$ stackit beta alb-waf custom-rule-group update my-custom-rule-group --payload @./payload.json
21+
22+
Update an ALB WAF custom rule group using an API payload provided as a JSON string
23+
$ stackit beta alb-waf custom-rule-group update my-custom-rule-group --payload "{...}"
24+
25+
Generate a payload with the current values of an existing custom rule group, adapt it and update the custom rule group with it
26+
$ stackit beta alb-waf custom-rule-group generate-payload --name my-custom-rule-group > ./payload.json
27+
<Modify payload in file>
28+
$ stackit beta alb-waf custom-rule-group update my-custom-rule-group --payload @./payload.json
29+
```
30+
31+
### Options
32+
33+
```
34+
-h, --help Help for "stackit beta alb-waf custom-rule-group update"
35+
--payload string Request payload (JSON). Can be a string or a file path, if prefixed with "@" (example: @./payload.json).
36+
```
37+
38+
### Options inherited from parent commands
39+
40+
```
41+
-y, --assume-yes If set, skips all confirmation prompts
42+
--async If set, runs the command asynchronously
43+
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
44+
-p, --project-id string Project ID
45+
--region string Target region for region-specific requests
46+
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
47+
```
48+
49+
### SEE ALSO
50+
51+
* [stackit beta alb-waf custom-rule-group](./stackit_beta_alb-waf_custom-rule-group.md) - Provides functionality for alb-waf Custom Rule Group
52+

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ require (
1717
github.com/spf13/viper v1.21.0
1818
github.com/stackitcloud/stackit-sdk-go/core v0.26.0
1919
github.com/stackitcloud/stackit-sdk-go/services/alb v0.14.2
20+
github.com/stackitcloud/stackit-sdk-go/services/albwaf v0.13.1
2021
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.15.2
2122
github.com/stackitcloud/stackit-sdk-go/services/cdn v1.16.0
2223
github.com/stackitcloud/stackit-sdk-go/services/dns v0.21.0

0 commit comments

Comments
 (0)