@@ -110,6 +110,7 @@ the [SandboxNuts](https://github.com/salesforcecli/plugin-org/actions/workflows/
110110- [ ` sf org list metadata ` ] ( #sf-org-list-metadata )
111111- [ ` sf org list metadata-types ` ] ( #sf-org-list-metadata-types )
112112- [ ` sf org open ` ] ( #sf-org-open )
113+ - [ ` sf org refresh sandbox ` ] ( #sf-org-refresh-sandbox )
113114- [ ` sf org resume sandbox ` ] ( #sf-org-resume-sandbox )
114115- [ ` sf org resume scratch ` ] ( #sf-org-resume-scratch )
115116
@@ -147,21 +148,30 @@ DESCRIPTION
147148 --name and --license-type flags to specify the two required options. If you want to set an option other than name or
148149 license type, such as apexClassId, you must use a definition file.
149150
151+ You can also use this command to clone an existing sandbox. Use the --clone flag to specify the existing sandbox name
152+ and the --name flag to the name of the new sandbox.
153+
150154ALIASES
151155 $ sf env create sandbox
152156
153157EXAMPLES
154158 Create a sandbox org using a definition file and give it the alias "MyDevSandbox". The production org that contains
155159 the sandbox license has the alias "prodOrg".
156160
157- $ sf org create sandbox -f config/dev-sandbox-def.json --alias MyDevSandbox --target-org prodOrg
161+ $ sf org create sandbox --definition-file config/dev-sandbox-def.json --alias MyDevSandbox --target-org prodOrg
158162
159163 Create a sandbox org by directly specifying its name and type of license (Developer) instead of using a definition
160164 file. Set the sandbox org as your default.
161165
162166 $ sf org create sandbox --name mysandbox --license-type Developer --alias MyDevSandbox --target-org prodOrg \
163167 --set-default
164168
169+ Clone the existing sandbox with name "ExistingSandbox" and name the new sandbox "NewClonedSandbox". Set the new
170+ sandbox as your default org. Wait for 30 minutes for the sandbox creation to complete.
171+
172+ $ sf org create sandbox --clone ExistingSandbox --name NewClonedSandbox --target-org prodOrg --alias \
173+ MyDevSandbox --set-default --wait 30
174+
165175FLAG DESCRIPTIONS
166176 -a, --alias=<value> Alias for the sandbox org.
167177
@@ -173,14 +183,15 @@ FLAG DESCRIPTIONS
173183
174184 -c, --clone=<value> Name of the sandbox org to clone.
175185
176- The value of clone must be an existing sandbox in the same target-org.
186+ The value of --clone must be an existing sandbox. The existing sandbox, and the new sandbox specified with the
187+ --name flag, must both be associated with the production org (--target-org) that contains the sandbox licenses.
177188
178189 -f, --definition-file=<value> Path to a sandbox definition file.
179190
180191 The sandbox definition file is a blueprint for the sandbox. You can create different definition files for each
181192 sandbox type that you use in the development process. See
182193 <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_sandbox_definition.htm> for all
183- the options you can specify in the defintion file.
194+ the options you can specify in the definition file.
184195
185196 -n, --name=<value> Name of the sandbox org.
186197
@@ -216,7 +227,7 @@ FLAG DESCRIPTIONS
216227 sandbox.
217228```
218229
219- _ See code: [ src/commands/org/create/sandbox.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/create/sandbox.ts ) _
230+ _ See code: [ src/commands/org/create/sandbox.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/create/sandbox.ts ) _
220231
221232## ` sf org create scratch `
222233
@@ -369,7 +380,7 @@ FLAG DESCRIPTIONS
369380 Omit this flag to have Salesforce generate a unique username for your org.
370381```
371382
372- _ See code: [ src/commands/org/create/scratch.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/create/scratch.ts ) _
383+ _ See code: [ src/commands/org/create/scratch.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/create/scratch.ts ) _
373384
374385## ` sf org delete sandbox `
375386
@@ -413,7 +424,7 @@ EXAMPLES
413424 $ sf org delete sandbox --target-org my-sandbox --no-prompt
414425```
415426
416- _ See code: [ src/commands/org/delete/sandbox.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/delete/sandbox.ts ) _
427+ _ See code: [ src/commands/org/delete/sandbox.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/delete/sandbox.ts ) _
417428
418429## ` sf org delete scratch `
419430
@@ -455,7 +466,7 @@ EXAMPLES
455466 $ sf org delete scratch --target-org my-scratch-org --no-prompt
456467```
457468
458- _ See code: [ src/commands/org/delete/scratch.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/delete/scratch.ts ) _
469+ _ See code: [ src/commands/org/delete/scratch.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/delete/scratch.ts ) _
459470
460471## ` sf org disable tracking `
461472
@@ -493,7 +504,7 @@ EXAMPLES
493504 $ sf org disable tracking
494505```
495506
496- _ See code: [ src/commands/org/disable/tracking.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/disable/tracking.ts ) _
507+ _ See code: [ src/commands/org/disable/tracking.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/disable/tracking.ts ) _
497508
498509## ` sf org display `
499510
@@ -537,7 +548,7 @@ EXAMPLES
537548 $ sf org display --target-org TestOrg1 --verbose
538549```
539550
540- _ See code: [ src/commands/org/display.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/display.ts ) _
551+ _ See code: [ src/commands/org/display.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/display.ts ) _
541552
542553## ` sf org enable tracking `
543554
@@ -578,7 +589,7 @@ EXAMPLES
578589 $ sf org enable tracking
579590```
580591
581- _ See code: [ src/commands/org/enable/tracking.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/enable/tracking.ts ) _
592+ _ See code: [ src/commands/org/enable/tracking.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/enable/tracking.ts ) _
582593
583594## ` sf org list `
584595
@@ -616,7 +627,7 @@ EXAMPLES
616627 $ sf org list --clean
617628```
618629
619- _ See code: [ src/commands/org/list.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/list.ts ) _
630+ _ See code: [ src/commands/org/list.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/list.ts ) _
620631
621632## ` sf org list metadata `
622633
@@ -681,7 +692,7 @@ FLAG DESCRIPTIONS
681692 Examples of metadata types that use folders are Dashboard, Document, EmailTemplate, and Report.
682693```
683694
684- _ See code: [ src/commands/org/list/metadata.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/list/metadata.ts ) _
695+ _ See code: [ src/commands/org/list/metadata.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/list/metadata.ts ) _
685696
686697## ` sf org list metadata-types `
687698
@@ -735,7 +746,7 @@ FLAG DESCRIPTIONS
735746 Override the api version used for api requests made by this command
736747```
737748
738- _ See code: [ src/commands/org/list/metadata-types.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/list/metadata-types.ts ) _
749+ _ See code: [ src/commands/org/list/metadata-types.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/list/metadata-types.ts ) _
739750
740751## ` sf org open `
741752
@@ -806,7 +817,79 @@ EXAMPLES
806817 $ sf org open --source-file force-app/main/default/flows/Hello.flow-meta.xml
807818```
808819
809- _ See code: [ src/commands/org/open.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16/src/commands/org/open.ts ) _
820+ _ See code: [ src/commands/org/open.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0/src/commands/org/open.ts ) _
821+
822+ ## ` sf org refresh sandbox `
823+
824+ Refresh a sandbox org using the sandbox name.
825+
826+ ```
827+ USAGE
828+ $ sf org refresh sandbox -o <value> [--json] [--auto-activate] [-w <value> | --async] [-i <value> | ] [-n <value>] [-f
829+ <value>] [--no-prompt]
830+
831+ FLAGS
832+ -f, --definition-file=<value> Path to a sandbox definition file for overriding its configuration when you refresh it.
833+ -i, --poll-interval=<seconds> [default: 30 seconds] Number of seconds to wait between status polling requests.
834+ -n, --name=<value> Name of the existing sandbox org in your production org that you want to refresh.
835+ -o, --target-org=<value> (required) Username or alias of the production org that contains the sandbox license.
836+ -w, --wait=<minutes> [default: 30 minutes] Number of minutes to poll for sandbox refresh status.
837+ --async Request the sandbox refresh, but don't wait for it to complete.
838+ --[no-]auto-activate Activates the sandbox after a successful refresh.
839+ --no-prompt Don't prompt for confirmation about the sandbox refresh.
840+
841+ GLOBAL FLAGS
842+ --json Format output as json.
843+
844+ DESCRIPTION
845+ Refresh a sandbox org using the sandbox name.
846+
847+ Refreshing a sandbox copies the metadata, and optionally data, from your production org to the refreshed sandbox org.
848+ You can optionally specify a definition file if you want to change the configuration of the refreshed sandbox, such as
849+ its license type or template ID.
850+
851+ You're not allowed to change the sandbox name when you refresh it with this command. If you want to change the sandbox
852+ name, first delete it with the "org delete sandbox" command. And then recreate it with the "org create sandbox"
853+ command and give it a new name.
854+
855+ EXAMPLES
856+ Refresh the sandbox named "devSbx1". The production org that contains the sandbox license has the alias "prodOrg".
857+
858+ $ sf org refresh sandbox --name devSbx1 --target-org prodOrg
859+
860+ Refresh the sandbox named "devSbx2", and override the configuration of the refreshed sandbox with the properties in
861+ the specified defintion file. The default target org is the production org, so you don't need to specify the
862+ `--target-org` flag in this case.
863+
864+ $ sf org refresh sandbox --name devSbx2 --definition-file devSbx2-config.json
865+
866+ Refresh the sandbox using the name defined in the definition file. The production org that contains the sandbox
867+ license has the alias "prodOrg".
868+
869+ $ sf org refresh sandbox --definition-file devSbx3-config.json --target-org prodOrg
870+
871+ FLAG DESCRIPTIONS
872+ -f, --definition-file=<value> Path to a sandbox definition file for overriding its configuration when you refresh it.
873+
874+ The sandbox definition file is a blueprint for the sandbox; use the file to change the sandbox configuration during
875+ a refresh. If you don't want to change the sandbox configuration when you refresh it, then simply use the --name
876+ flag to specify the sandbox and don't use this flag. See
877+ <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_sandbox_definition.htm> for all
878+ the options you can specify in the definition file.
879+
880+ -w, --wait=<minutes> Number of minutes to poll for sandbox refresh status.
881+
882+ If the command continues to run after the wait period, the CLI returns control of the terminal to you and displays
883+ the "sf org resume sandbox" command for you run to check the status of the refresh. The displayed command includes
884+ the job ID for the running sandbox refresh.
885+
886+ --async Request the sandbox refresh, but don't wait for it to complete.
887+
888+ The command immediately displays the job ID and returns control of the terminal to you. This way, you can continue
889+ to use the CLI. To check the status of the sandbox refresh, run "sf org resume sandbox".
890+ ```
891+
892+ _ See code: [ src/commands/org/refresh/sandbox.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0/src/commands/org/refresh/sandbox.ts ) _
810893
811894## ` sf org resume sandbox `
812895
@@ -868,7 +951,7 @@ FLAG DESCRIPTIONS
868951 returns the job ID. To resume checking the sandbox creation, rerun this command.
869952```
870953
871- _ See code: [ src/commands/org/resume/sandbox.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/resume/sandbox.ts ) _
954+ _ See code: [ src/commands/org/resume/sandbox.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/resume/sandbox.ts ) _
872955
873956## ` sf org resume scratch `
874957
@@ -914,6 +997,6 @@ FLAG DESCRIPTIONS
914997 The job ID is valid for 24 hours after you start the scratch org creation.
915998```
916999
917- _ See code: [ src/commands/org/resume/scratch.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.3.16 /src/commands/org/resume/scratch.ts ) _
1000+ _ See code: [ src/commands/org/resume/scratch.ts] ( https://github.com/salesforcecli/plugin-org/blob/3.4.0 /src/commands/org/resume/scratch.ts ) _
9181001
9191002<!-- commandsstop -->
0 commit comments