diff --git a/README.md b/README.md index ee56fbc..f86111b 100644 --- a/README.md +++ b/README.md @@ -765,7 +765,7 @@ Flags: --file FILE Read JSON formatted input from FILE ``` -NOTE: The CLI currently limits the number of zones in a submit request to 1000. If an invocation presents more than 1000 zones, the zones will be submitted in batches of 1000 and multiple Request Ids will be returned. +NOTE: The CLI currently limits the number of zones in a submit request to 1000. If an invocation presents more than 1000 zones, the zones will be submitted in batches of 1000 and multiple Request Ids will be returned. The batch size can be changed by setting the environment variable AKAMAI_ZONES_BATCH_SIZE. An example create submit request would be as follows: diff --git a/command_submit_bulkzones.go b/command_submit_bulkzones.go index c8f3ed8..811c25e 100644 --- a/command_submit_bulkzones.go +++ b/command_submit_bulkzones.go @@ -107,6 +107,17 @@ func cmdSubmitBulkZones(c *cli.Context) error { outputPath = c.String("output") outputPath = filepath.FromSlash(outputPath) } + + val, ok := os.LookupEnv("AKAMAI_ZONES_BATCH_SIZE") + if ok { + batchsize, err := strconv.Atoi(val) + if err != nil { + akamai.StopSpinnerFail() + return cli.NewExitError(color.RedString(" Environ variable AKAMAI_ZONEBATCH has invalid value"), 1) + } + maxNumZones = batchsize + } + // Read in json file data, err := ioutil.ReadFile(inputPath) if err != nil {