The cloud editinghost command

Note

To use the editinghost command, you need the Sitecore CLI XM Cloud plugin version 1.1.120 or later.

The editinghost command only works with environments created with cloud environment create --cm-only and environments created using the Decoupled Deployments beta feature.

XM Cloud is now SitecoreAI

Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

The XM Cloud plugin for Sitecore CLI provides the cloud editinghost command to help you manage editing hosts for a given SitecoreAI environment.

Usage

You can use the cloud editinghost command as follows:

RequestResponse
dotnet sitecore cloud editinghost [subcommand] [options] 

Subcommands

You can use the following subcommands to interact with editing hosts:

  • create - creates an editing host.

  • update - updates the name of an existing editing host.

  • delete - deletes an existing editing host.

  • deploy - creates a new deployment with the specified editing host.

The create subcommand

You can create a new editing host using the create subcommand. You must specify the name of your new editing host and the unique identifier of the authoring environment that you want to link to your editing host.

You can use the following options with the create subcommand:

Option

Description

--name, -n

Required.

The name of the new editing host.

--cm-environment-id, -cm

Required.

The unique identifier of the authoring environment that you want to link to your editing host.

--json

Changes the response format from plain text to JSON.

--config

Path to the folder containing the sitecore.json file.

Default: the root directory of the Sitecore project solution.

--verbose, -v

Write additional information about the command.

--trace, -t

Write diagnostics and detailed information about the command.

-?, -h, --help

Displays help and usage information about the command.

For example:

RequestResponse
dotnet sitecore cloud editinghost create --cm-environment-id <cm-id> --name "Staging"

The update subcommand

Use the update subcommand to update the name of an existing editing host. You must specify the unique identifier of the editing host and the new name for your editing host.

You can use the following options with the update subcommand:

Option

Description

--environment-id, -id

Required.

The unique identifier for the editing host to update. To find the unique identifier of an editing host, use the cloud environment list command.

--name, -n

Required.

The new editing host name.

--json

Changes the response format from plain text to JSON.

--config

Path to the folder containing the sitecore.json file.

Default: the root directory of the Sitecore project solution.

--verbose, -v

Write additional information about the command.

--trace, -t

Write diagnostics and detailed information about the command.

-?, -h, --help

Display help and usage information about the command.

For example:

RequestResponse
dotnet sitecore cloud editinghost update --environment-id <editinghost-id> --name "Staging updated"

The delete subcommand

The delete subcommand permanently deletes an editing host. You must specify the unique identifier of the editing host you want to delete.

You can use the following options with the delete subcommand:

Option

Description

--environment-id, -id

Required.

The unique identifier of the editing host to delete. To find the unique identifier of an editing host, use the cloud environment list command.

--json

Changes the response format from plain text to JSON.

--config

Path to the folder containing the sitecore.json file.

Default: the root directory of the Sitecore project solution.

--verbose, -v

Write additional information about the command.

--trace, -t

Write diagnostics and detailed information about the command.

-?, -h, --help

Display help and usage information about the command.

For example:

RequestResponse
dotnet sitecore cloud editinghost delete --environment-id <editinghost-id>  

The deploy subcommand

The deploy subcommand creates and starts a deployment entity for an editing host. You must specify the unique identifier of the editing host.

You can use the following options with the deploy subcommand:

Option

Description

--environment-id, -id

Required.

The unique identifier of the editing host used when establishing a connection.

--upload, -u

If specified, the process uploads the current solution.

--working-dir, -dir

If specified, the process treats the path as the current solution.

Default: current solution path.

--no-watch

Hides the status/progress information during the deployment process. When the deployment finishes, the command instantly detaches.

--no-start

When used, the deployment entities are created, but the deployment process won't start. You can start the deployment later using the cloud deployment start command.

--timeout, -to

The time in seconds to wait for the creation process to finish.

--json

Changes the response format from plain text to JSON.

--config

Path to the folder containing the sitecore.json file.

Default: the root directory of the Sitecore project solution.

--verbose, -v

Write additional information about the command.

--trace, -t

Write diagnostics and detailed information about the command.

-?, -h, --help

Display help and usage information about the command.

For example:

RequestResponse
dotnet sitecore cloud editinghost deploy --environment-id <editinghost-id> 

Do you have some feedback for us?

If you have suggestions for improving this article,