Skip to content

Commit

Permalink
Use different operation name for the new delivery rules resource (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-el authored Mar 31, 2024
1 parent 73e8b2d commit 6e392df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions incapsula/client_delivery_rules_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (c *Client) ReadDeliveryRuleConfiguration(siteID string, category string) (
log.Printf("[INFO] Getting Delivery rules Type Rule %s for Site ID %s\n", category, siteID)

reqURL := fmt.Sprintf("%s/sites/%s/delivery-rules-configuration?category=%s", c.config.BaseURLRev3, siteID, category)
resp, err := c.DoJsonRequestWithHeaders(http.MethodGet, reqURL, nil, ReadIncapRule)
resp, err := c.DoJsonRequestWithHeaders(http.MethodGet, reqURL, nil, ReadDeliveryRuleConfiguration)

if err != nil {
diags = append(diags, diag.Diagnostic{
Expand Down Expand Up @@ -98,7 +98,7 @@ func (c *Client) UpdateDeliveryRuleConfiguration(siteID string, category string,

// Put request to Incapsula
reqURL := fmt.Sprintf("%s/sites/%s/delivery-rules-configuration?category=%s", c.config.BaseURLRev3, siteID, category)
resp, err := c.DoJsonRequestWithHeaders(http.MethodPut, reqURL, ruleJSON, UpdateIncapRule)
resp, err := c.DoJsonRequestWithHeaders(http.MethodPut, reqURL, ruleJSON, UpdateDeliveryRuleConfiguration)
if err != nil {
diags = append(diags, diag.Diagnostic{
Severity: diag.Error,
Expand Down
3 changes: 3 additions & 0 deletions incapsula/operation_constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,6 @@ const CreateAbpWebsites = "create_abp_websites"
const ReadAbpWebsites = "read_abp_websites"
const UpdateAbpWebsites = "update_abp_websites"
const DeleteAbpWebsites = "delete_abp_websites"

const ReadDeliveryRuleConfiguration = "read_delivery_rules_configuration"
const UpdateDeliveryRuleConfiguration = "update_delivery_rules_configuration"

0 comments on commit 6e392df

Please sign in to comment.