To list all XM Cloud Environment for a project |
dotnet sitecore cloud environment list --project-id <Project-Id> |
Need specific Project ID |
To list all XM Cloud Environment for a project as JSON |
dotnet sitecore cloud environment list --project-id <Project-Id> --json |
Output as JSON |
To get the information |
dotnet sitecore cloud environment get --environment-id <Environment-Id> |
- |
To get the information as JSON |
dotnet sitecore cloud environment info --environment-id <Environment-Id> --json |
Output as JSON |
To create a new XM Cloud Environment |
dotnet sitecore cloud environment create --name "QA" --project-id <Project-Id> |
Need specific Project ID under which Environment will be created |
To create a new XM Cloud Production Environment |
dotnet sitecore cloud environment create --name "Production" --project-id <Project-Id> --prod |
Need --prod to indicate that it is a production Environment |
To create a new XM Cloud Environment as JSON |
dotnet sitecore cloud environment create --name "QA" --project-id <Project-Id> --json |
Output as JSON |
To update an XM Cloud Environment |
dotnet sitecore cloud environment update --environment-id <Environment-Id> --name "<New-Name>" |
Need the specific Environment ID. Only name can be updated as of now |
To delete an XM Cloud Environment |
dotnet sitecore cloud environment delete --environment-id <Environment-Id> |
Need the specific Environment ID |
To connect current Sitecore solution to an XM Cloud Environment |
dotnet sitecore cloud environment connect --environment-id <Environment-Id> --name "Staging" |
Establish connection info for an XM Cloud Environment (updates endpoints in user.json). Add a new endpoint in user.json with name. --name is optional. |
To disconnect current Sitecore solution to an XM Cloud Environment |
sitecore cloud environment disconnect --environment-id <Environment-Id> --name "Staging" |
Remove connection info for an XM Cloud Environment (updates endpoints in user.json). --name is optional. |
To promote a deployment to another XM Cloud Environment |
dotnet sitecore cloud environment promote --environment-id <Environment-Id> --source-id <Deployment-Id> |
Similar to Deployment Create command. Need the source deployment ID which should be promoted to. Can create the promotion deployment request without starting it. |
|
dotnet sitecore cloud environment promote --environment-id <Environment-Id> --source-id <Deployment-Id> --no-start |
Similar to deployment create command, deployment can be queued. |
|
dotnet sitecore cloud environment promote --environment-id <Environment-Id> --source-id <Deployment-Id> --no-watch |
Will not show the deployment progress in CLI |
|
dotnet sitecore cloud environment promote --environment-id <Environment-Id> --source-id <Deployment-Id> --waitForPostActions |
Will show the Post Actions progress in the CLI. Be default, post actions are not shown in real time in CLI. --no-watch has high precedence than --waitForPostActions |
To list all the available logs from an XM Cloud Environment |
dotnet sitecore cloud environment log list --environment-id <Environment-Id> |
- |
|
dotnet sitecore cloud environment log list --environment-id <Environment-Id> --latest |
Gets only the latest set of log files |
|
dotnet sitecore cloud environment log list --environment-id <Environment-Id> --latest --json |
Get the latest log files in a JSON format and it has the API path property to get the log file. |
To download the specific log file |
dotnet sitecore cloud environment log download --environment-id <Environment-Id> --logfile <LogFile> --outputpath . |
Downloads in the current folder (.) |
To view the log file in the console |
dotnet sitecore cloud environment log view --environment-id <Environment-Id> --logfile <LogFile> |
Similar to Download except it is rendered in console. There is no tail option. |
To get the health of the environment |
dotnet sitecore cloud environment health --environment-id <Environment-Id> |
Calls https://<Environment-Host>/healthz/ready and provides whether it is healthy or not. /healthz/ready. Healthy if 200 and Unhealthy if 503 response code. |
To list all the environment variables of an Environment |
dotnet sitecore cloud environment variable list --environment-id <Environment-Id> |
To print all the variables in the Console |
|
dotnet sitecore cloud environment variable list --environment-id <Environment-Id> --json |
Output as JSON |
- Creating/Updating/Deleting Environment Variable requires a rebuild/redeploy of XM Cloud environment for the changes to take effect.
|
To create/update an environment variable of an Environment |
dotnet sitecore cloud environment variable upsert --environment-id <Environment-Id> --name "Variable-Name" --value "Variable-Value" |
- |
|
dotnet sitecore cloud environment variable upsert --environment-id <Environment-Id> --name "Variable-Name" --value "Variable-Value" --target CM |
Target this variable for CM only |
|
dotnet sitecore cloud environment variable upsert --environment-id <Environment-Id> --name "Variable-Name" --value "Variable-Value" --target <Rendering-Host-Name> |
Target this variable for Rendering Host |
|
dotnet sitecore cloud environment variable upsert --environment-id <Environment-Id> --name "Variable-Name" --value "Variable-Value" --secret |
This bool sets the variable encrypted |
To delete an environment variable |
dotnet sitecore cloud environment variable delete -environment-id <Environment-Id> --name "Variable-Name" |
- |
To restart an environment |
dotnet sitecore cloud environment restart --environment-id <environment-id> |
Environment will be restarted without any intervention to CM instance. |
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by nehem87