All URIs are relative to https://virtserver.swaggerhub.com/perimeter81/public-api-yaml/1.0.0
| Method | HTTP request | Description |
|---|---|---|
| GetGranularFirewallPolicy | Get /v3/networks/{networkId}/firewall-policy | Get firewall policy by network ID |
| UpdateGranularFirewallPolicy | Put /v3/networks/{networkId}/firewall-policy | Update firewall policy by network ID |
GranularFirewallPolicy GetGranularFirewallPolicy(ctx, networkId).Execute()
Get firewall policy by network ID
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CheckPointSW/perimeter-81-client-sdk/v3"
)
func main() {
networkId := "networkId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FirewallPolicyAPI.GetGranularFirewallPolicy(context.Background(), networkId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FirewallPolicyAPI.GetGranularFirewallPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetGranularFirewallPolicy`: GranularFirewallPolicy
fmt.Fprintf(os.Stdout, "Response from `FirewallPolicyAPI.GetGranularFirewallPolicy`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| networkId | string |
Other parameters are passed through a pointer to a apiGetGranularFirewallPolicyRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AsyncOperationResponse UpdateGranularFirewallPolicy(ctx, networkId).GranularFirewallPolicy(granularFirewallPolicy).Execute()
Update firewall policy by network ID
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/CheckPointSW/perimeter-81-client-sdk/v3"
)
func main() {
networkId := "networkId_example" // string |
granularFirewallPolicy := *openapiclient.NewGranularFirewallPolicy(false, false, "ZwAeo5wqiF", false, []openapiclient.GranularFirewallPolicyRule{*openapiclient.NewGranularFirewallPolicyRule("Name_example", false, false, openapiclient.SourcesAndDestinations{Addresses: openapiclient.NewAddresses([]string{"Addresses_example"})}, openapiclient.SourcesAndDestinations{Addresses: openapiclient.NewAddresses([]string{"Addresses_example"})}, false)}) // GranularFirewallPolicy |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FirewallPolicyAPI.UpdateGranularFirewallPolicy(context.Background(), networkId).GranularFirewallPolicy(granularFirewallPolicy).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FirewallPolicyAPI.UpdateGranularFirewallPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateGranularFirewallPolicy`: AsyncOperationResponse
fmt.Fprintf(os.Stdout, "Response from `FirewallPolicyAPI.UpdateGranularFirewallPolicy`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| networkId | string |
Other parameters are passed through a pointer to a apiUpdateGranularFirewallPolicyRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
granularFirewallPolicy | GranularFirewallPolicy | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]