Skip to content

Commit 6e392df

Browse files
authored
Use different operation name for the new delivery rules resource (#407)
1 parent 73e8b2d commit 6e392df

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

incapsula/client_delivery_rules_configuration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (c *Client) ReadDeliveryRuleConfiguration(siteID string, category string) (
4141
log.Printf("[INFO] Getting Delivery rules Type Rule %s for Site ID %s\n", category, siteID)
4242

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

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

9999
// Put request to Incapsula
100100
reqURL := fmt.Sprintf("%s/sites/%s/delivery-rules-configuration?category=%s", c.config.BaseURLRev3, siteID, category)
101-
resp, err := c.DoJsonRequestWithHeaders(http.MethodPut, reqURL, ruleJSON, UpdateIncapRule)
101+
resp, err := c.DoJsonRequestWithHeaders(http.MethodPut, reqURL, ruleJSON, UpdateDeliveryRuleConfiguration)
102102
if err != nil {
103103
diags = append(diags, diag.Diagnostic{
104104
Severity: diag.Error,

incapsula/operation_constants.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,6 @@ const CreateAbpWebsites = "create_abp_websites"
196196
const ReadAbpWebsites = "read_abp_websites"
197197
const UpdateAbpWebsites = "update_abp_websites"
198198
const DeleteAbpWebsites = "delete_abp_websites"
199+
200+
const ReadDeliveryRuleConfiguration = "read_delivery_rules_configuration"
201+
const UpdateDeliveryRuleConfiguration = "update_delivery_rules_configuration"

0 commit comments

Comments
 (0)