\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Nehemiah (nehem87)} \pdfinfo{ /Title (sitecore-xm-cloud-cli.pdf) /Creator (Cheatography) /Author (Nehemiah (nehem87)) /Subject (Sitecore XM Cloud CLI Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{0808A3} \definecolor{LightBackground}{HTML}{F7F7FC} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Sitecore XM Cloud CLI Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Nehemiah (nehem87)} via \textcolor{DarkBackground}{\uline{cheatography.com/192697/cs/40102/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Nehemiah (nehem87) \\ \uline{cheatography.com/nehem87} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 1st September, 2023.\\ Updated 23rd October, 2024.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Login \& Logout}} \tn % Row 0 \SetRowColor{LightBackground} To login to XM Cloud Organization using a device code flow with writing allowed & \{\{noshy\}\}dotnet sitecore cloud login -{}-allow-write\{\{noshy\}\} & Can access the XM Cloud Deploy API and the CM instance APIs of all environments in an organization \tn % Row Count 8 (+ 8) % Row 1 \SetRowColor{white} To login to XM Cloud Organization using a credentials flow \seqsplit{(Organization} Credentials) & \{\{noshy\}\}dotnet sitecore cloud login -{}-allow-write -{}-client-credentials -{}-client-id \textless{}Org-Client-Id\textgreater{} -{}-client-secret \textless{}Org-Client-Secret\textgreater{}\{\{noshy\}\} & Can access the XM Cloud Deploy API and the CM instance APIs of all environments in an organization \tn % Row Count 20 (+ 12) % Row 2 \SetRowColor{LightBackground} To login to XM Cloud Environment using a credentials flow (Automation Credentials) & \{\{noshy\}\}dotnet sitecore cloud login -{}-allow-write -{}-client-credentials -{}-client-id \textless{}Automation-Client-Id\textgreater{} -{}-client-secret \textless{}Automation-Client-Secret\textgreater{}\{\{noshy\}\} & Can access the CM instance APIs of a specific environment. No Deploy API Access. \tn % Row Count 33 (+ 13) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Login \& Logout (cont)}} \tn % Row 3 \SetRowColor{LightBackground} To login to XM Cloud Organization using a credentials flow including authority and audience \seqsplit{(Organization} Credentials) & \{\{noshy\}\}dotnet sitecore cloud login -{}-allow-write -{}-authority \seqsplit{https://auth.sitecorecloud.io/} -{}-audience \seqsplit{https://api.sitecorecloud.io} -{}-client-id \textless{}Org-Client-Id\textgreater{} -{}-client-secret \textless{}Org-Client-Secret\textgreater{} -{}-client-credentials\{\{noshy\}\} & Can access the XM Cloud Deploy API and the CM instance APIs of all environments in an organization \tn % Row Count 18 (+ 18) % Row 4 \SetRowColor{white} To login to Edge \seqsplit{administration} using a credentials flow (Edge \seqsplit{Administration} Credentials) & \{\{noshy\}\}dotnet sitecore cloud login -{}-allow-write -{}-client-credentials -{}-client-id \textless{}Edge-Client-Id\textgreater{} -{}-client-secret \textless{}Edge-Client-Secret\textgreater{}\{\{noshy\}\} & Can manage the Experience Edge for XM Cloud settings of an environment \tn % Row Count 30 (+ 12) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Login \& Logout (cont)}} \tn % Row 5 \SetRowColor{LightBackground} To logout of an XM Cloud Environment & \{\{noshy\}\}dotnet sitecore cloud logout\{\{noshy\}\} & Same for all type of login flow. \tn % Row Count 4 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{7.0854 cm} x{7.2541 cm} x{2.5305 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Organization}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{3}{x{17.67cm}}{{\bf{\{\{fa-exclamation-triangle\}\}Need Organization Credentials for using Client Credentials or Use code flow. Automation or Edge Administration credentials will return forbidden error.}}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \mymulticolumn{3}{x{17.67cm}}{} \tn % Row Count 4 (+ 0) % Row 2 \SetRowColor{LightBackground} To display information about the current user's organizations & \{\{noshy\}\}dotnet sitecore cloud organization info -{}-organization-id \textless{}id\textgreater{}\{\{noshy\}\} & - \tn % Row Count 9 (+ 5) % Row 3 \SetRowColor{white} To display information about the current user's organizations as JSON & \{\{noshy\}\}dotnet sitecore cloud organization info -{}-organization-id \textless{}id\textgreater{} -{}-json\{\{noshy\}\} & \seqsplit{Output} as Json \tn % Row Count 15 (+ 6) % Row 4 \SetRowColor{LightBackground} To display the health status of the organization's resources & \{\{noshy\}\}dotnet sitecore cloud organization health -{}-organization-id \textless{}id\textgreater{}\{\{noshy\}\} & - \tn % Row Count 20 (+ 5) % Row 5 \SetRowColor{white} To display the health status of the organization's resources as JSON & \{\{noshy\}\}dotnet sitecore cloud organization health -{}-organization-id \textless{}id\textgreater{} -{}-json\{\{noshy\}\} & \seqsplit{Output} as Json \tn % Row Count 26 (+ 6) % Row 6 \SetRowColor{LightBackground} To download the organization's license to the current folder & \{\{noshy\}\}dotnet sitecore cloud organization license -{}-organization-id \textless{}id\textgreater{}\{\{noshy\}\} & - \tn % Row Count 31 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Project}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{3}{x{17.67cm}}{{\bf{\{\{fa-exclamation-triangle\}\}Need Organization Credentials for using Client Credentials or Use code flow. Automation or Edge Administration credentials will return forbidden error.}}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \mymulticolumn{3}{x{17.67cm}}{} \tn % Row Count 4 (+ 0) % Row 2 \SetRowColor{LightBackground} To list all the XM Cloud projects & \{\{noshy\}\}dotnet sitecore cloud project list\{\{noshy\}\} & - \tn % Row Count 8 (+ 4) % Row 3 \SetRowColor{white} To list all the XM Cloud projects as JSON & \{\{noshy\}\}dotnet sitecore cloud project list -{}-json\{\{noshy\}\} & Output as Json \tn % Row Count 13 (+ 5) % Row 4 \SetRowColor{LightBackground} To get information about a XM Cloud Project & \{\{noshy\}\}dotnet sitecore cloud project info -{}-project-id \textless{}Project-Id\textgreater{}\{\{noshy\}\} & - \tn % Row Count 19 (+ 6) % Row 5 \SetRowColor{white} To get information about a XM Cloud Project as JSON & \{\{noshy\}\}dotnet sitecore cloud project info -{}-project-id \textless{}Project-Id\textgreater{} -{}-json\{\{noshy\}\} & Output as Json \tn % Row Count 26 (+ 7) % Row 6 \SetRowColor{LightBackground} To create a new XM Cloud Project & \{\{noshy\}\}dotnet sitecore cloud project create -{}-name "\textless{}Project-Name\textgreater{}"\{\{noshy\}\} & - \tn % Row Count 32 (+ 6) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Project (cont)}} \tn % Row 7 \SetRowColor{LightBackground} To update the XM Cloud Project details & \{\{noshy\}\}dotnet sitecore cloud project update -{}-project-id \textless{}Project-Id\textgreater{} -{}-name "Nehem"\{\{noshy\}\} & Only one attribute (name) can be updated at this time. \tn % Row Count 8 (+ 8) % Row 8 \SetRowColor{white} To delete the XM Cloud Project & \{\{noshy\}\}dotnet sitecore cloud project delete -{}-project-id \textless{}Project-Id\textgreater{}\{\{noshy\}\} & Cannot delete the project if 1 or more active \seqsplit{environments.} Should delete all the environment at first and then project can be deleted. \tn % Row Count 19 (+ 11) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Deployment}} \tn % Row 0 \SetRowColor{LightBackground} To create a deployment request & dotnet sitecore cloud deployment create -{}-environment-id \textless{}Environment-Id\textgreater{} & Deployment request created and started immediately for the environment. \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} To queue a deployment request & dotnet sitecore cloud deployment create -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-no-start & Need to call `deployment start` to start the deployment \tn % Row Count 13 (+ 7) % Row 2 \SetRowColor{LightBackground} To create the deployment request without showing the status in CLI Console & dotnet sitecore cloud deployment create -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-no-watch & - \tn % Row Count 20 (+ 7) % Row 3 \SetRowColor{white} To create the deployment request and upload the assets from current working directory & dotnet sitecore cloud deployment create -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-upload & - \tn % Row Count 27 (+ 7) % Row 4 \SetRowColor{LightBackground} To create the deployment request and upload the assets from a custom working directory & dotnet sitecore cloud deployment create -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-upload -{}-working-dir "C:\textbackslash{}Artifacts" & - \tn % Row Count 36 (+ 9) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Deployment (cont)}} \tn % Row 5 \SetRowColor{LightBackground} To view the existing deployment request information & dotnet sitecore cloud deployment info -{}-deployment-id \textless{}Deployment-Id\textgreater{} & - \tn % Row Count 6 (+ 6) % Row 6 \SetRowColor{white} To list all the deployment requests on an XM Cloud Environment & dotnet sitecore cloud deployment list -{}-environment-id \textless{}Environment-Id\textgreater{} & - \tn % Row Count 12 (+ 6) % Row 7 \SetRowColor{LightBackground} To start a deployment which is in queue & dotnet sitecore cloud deployment start -{}-deployment-id \textless{}Environment-Id\textgreater{} & - \tn % Row Count 18 (+ 6) % Row 8 \SetRowColor{white} To start the deployment and watch the post actions in CLI Console & dotnet sitecore cloud deployment start -{}-deployment-id \textless{}Environment-Id\textgreater{} -{}-waitForPostActions & - \tn % Row Count 26 (+ 8) % Row 9 \SetRowColor{LightBackground} To watch the status of the deployment request in Console & dotnet sitecore cloud deployment watch -{}-deployment-id \textless{}Deployment-Id\textgreater{} & Will attach the console to see the status realtime \tn % Row Count 32 (+ 6) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Deployment (cont)}} \tn % Row 10 \SetRowColor{LightBackground} To view the deployment log in console & dotnet sitecore cloud deployment log -{}-deployment-id \textless{}Deployment-Id\textgreater{} & - \tn % Row Count 6 (+ 6) % Row 11 \SetRowColor{white} To download the deployment log to a specific folder & dotnet sitecore cloud deployment log -{}-deployment-id \textless{}Deployment-Id\textgreater{} -{}-outputpath . & Downloads the deployment log to the current working folder. \tn % Row Count 13 (+ 7) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{3}{x{17.67cm}}{Output of the log file will be saved in the current folder in this format. Deployment\_\textless{}DEPLOYMENTID\textgreater{}\_logs.json} \tn % Row Count 16 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Environment}} \tn % Row 0 \SetRowColor{LightBackground} To list all XM Cloud Environment for a project & \{\{noshy\}\}dotnet sitecore cloud environment list -{}-project-id \textless{}Project-Id\textgreater{}\{\{noshy\}\} & Need specific Project ID \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} To list all XM Cloud Environment for a project as JSON & \{\{noshy\}\}dotnet sitecore cloud environment list -{}-project-id \textless{}Project-Id\textgreater{} -{}-json\{\{noshy\}\} & Output as JSON \tn % Row Count 14 (+ 7) % Row 2 \SetRowColor{LightBackground} To get the information & \{\{noshy\}\}dotnet sitecore cloud environment get -{}-environment-id \textless{}Environment-Id\textgreater{}\{\{noshy\}\} & - \tn % Row Count 21 (+ 7) % Row 3 \SetRowColor{white} To get the information as JSON & \{\{noshy\}\}dotnet sitecore cloud environment info -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-json\{\{noshy\}\} & Output as JSON \tn % Row Count 29 (+ 8) % Row 4 \SetRowColor{LightBackground} To create a new XM Cloud Environment & \{\{noshy\}\}dotnet sitecore cloud environment create -{}-name "QA" -{}-project-id \textless{}Project-Id\textgreater{}\{\{noshy\}\} & Need specific Project ID under which Environment will be created \tn % Row Count 37 (+ 8) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Environment (cont)}} \tn % Row 5 \SetRowColor{LightBackground} To create a new XM Cloud Production Environment & \{\{noshy\}\}dotnet sitecore cloud environment create -{}-name "Production" -{}-project-id \textless{}Project-Id\textgreater{} -{}-prod\{\{noshy\}\} & Need {\emph{-{}-prod}} to indicate that it is a production Environment \tn % Row Count 9 (+ 9) % Row 6 \SetRowColor{white} To create a new XM Cloud Environment as JSON & \{\{noshy\}\}dotnet sitecore cloud environment create -{}-name "QA" -{}-project-id \textless{}Project-Id\textgreater{} -{}-json\{\{noshy\}\} & Output as JSON \tn % Row Count 17 (+ 8) % Row 7 \SetRowColor{LightBackground} To update an XM Cloud Environment & \{\{noshy\}\}dotnet sitecore cloud environment update -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-name "\textless{}New-Name\textgreater{}"\{\{noshy\}\} & Need the specific Environment ID. Only name can be updated as of now \tn % Row Count 26 (+ 9) % Row 8 \SetRowColor{white} To delete an XM Cloud Environment & \{\{noshy\}\}dotnet sitecore cloud environment delete -{}-environment-id \textless{}Environment-Id\textgreater{}\{\{noshy\}\} & Need the specific Environment ID \tn % Row Count 34 (+ 8) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Environment (cont)}} \tn % Row 9 \SetRowColor{LightBackground} To connect current Sitecore solution to an XM Cloud Environment & \{\{noshy\}\}dotnet sitecore cloud environment connect -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-name "Staging"\{\{noshy\}\} & Establish connection info for an XM Cloud Environment (updates endpoints in user.json). Add a new endpoint in user.json with name. {\emph{-{}-name}} is optional. \tn % Row Count 12 (+ 12) % Row 10 \SetRowColor{white} To disconnect current Sitecore solution to an XM Cloud Environment & \{\{noshy\}\}sitecore cloud environment disconnect -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-name "Staging"\{\{noshy\}\} & Remove connection info for an XM Cloud Environment (updates endpoints in user.json). {\emph{-{}-name}} is optional. \tn % Row Count 21 (+ 9) % Row 11 \SetRowColor{LightBackground} To promote a deployment to another XM Cloud Environment & \{\{noshy\}\}dotnet sitecore cloud environment promote -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-source-id \textless{}Deployment-Id\textgreater{}\{\{noshy\}\} & Similar to {\emph{Deployment Create}} command. Need the source deployment ID which should be promoted to. Can create the promotion deployment request without starting it. \tn % Row Count 34 (+ 13) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Environment (cont)}} \tn % Row 12 \SetRowColor{LightBackground} & \{\{noshy\}\}dotnet sitecore cloud environment promote -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-source-id \textless{}Deployment-Id\textgreater{} -{}-no-start\{\{noshy\}\} & Similar to {\emph{deployment create}} command, deployment can be queued. \tn % Row Count 11 (+ 11) % Row 13 \SetRowColor{white} & \{\{noshy\}\}dotnet sitecore cloud environment promote -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-source-id \textless{}Deployment-Id\textgreater{} -{}-no-watch\{\{noshy\}\} & Will not show the deployment progress in CLI \tn % Row Count 22 (+ 11) % Row 14 \SetRowColor{LightBackground} & \{\{noshy\}\}dotnet sitecore cloud environment promote -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-source-id \textless{}Deployment-Id\textgreater{} -{}-waitForPostActions\{\{noshy\}\} & Will show the Post Actions progress in the CLI. Be default, post actions are not shown in real time in CLI. {\emph{-{}-no-watch}} has high precedence than {\emph{-{}-waitForPostActions}} \tn % Row Count 35 (+ 13) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Environment (cont)}} \tn % Row 15 \SetRowColor{LightBackground} To list all the available logs from an XM Cloud Environment & \{\{noshy\}\}dotnet sitecore cloud environment log list -{}-environment-id \textless{}Environment-Id\textgreater{}\{\{noshy\}\} & - \tn % Row Count 8 (+ 8) % Row 16 \SetRowColor{white} & \{\{noshy\}\}dotnet sitecore cloud environment log list -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-latest\{\{noshy\}\} & Gets only the latest set of log files \tn % Row Count 16 (+ 8) % Row 17 \SetRowColor{LightBackground} & \{\{noshy\}\}dotnet sitecore cloud environment log list -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-latest -{}-json\{\{noshy\}\} & Get the latest log files in a JSON format and it has the API path property to get the log file. \tn % Row Count 25 (+ 9) % Row 18 \SetRowColor{white} To download the specific log file & \{\{noshy\}\}dotnet sitecore cloud environment log download -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-logfile \textless{}LogFile\textgreater{} -{}-outputpath .\{\{noshy\}\} & Downloads in the current folder (.) \tn % Row Count 36 (+ 11) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Environment (cont)}} \tn % Row 19 \SetRowColor{LightBackground} To view the log file in the console & \{\{noshy\}\}dotnet sitecore cloud environment log view -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-logfile \textless{}LogFile\textgreater{}\{\{noshy\}\} & Similar to Download except it is rendered in console. There is no tail option. \tn % Row Count 9 (+ 9) % Row 20 \SetRowColor{white} To get the health of the environment & \{\{noshy\}\}dotnet sitecore cloud environment health -{}-environment-id \textless{}Environment-Id\textgreater{}\{\{noshy\}\} & Calls https://\textless{}Environment-Host\textgreater{}/healthz/ready and provides whether it is healthy or not. \seqsplit{/healthz/ready}. Healthy if 200 and Unhealthy if 503 response code. \tn % Row Count 21 (+ 12) % Row 21 \SetRowColor{LightBackground} To list all the environment variables of an Environment & \{\{noshy\}\}dotnet sitecore cloud environment variable list -{}-environment-id \textless{}Environment-Id\textgreater{}\{\{noshy\}\} & To print all the variables in the Console \tn % Row Count 29 (+ 8) % Row 22 \SetRowColor{white} & \{\{noshy\}\}dotnet sitecore cloud environment variable list -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-json\{\{noshy\}\} & Output as JSON \tn % Row Count 38 (+ 9) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Environment (cont)}} \tn % Row 23 \SetRowColor{LightBackground} \mymulticolumn{3}{x{17.67cm}}{{\bf{\{\{nl\}\}\{\{fa-exclamation-triangle\}\} - \seqsplit{Creating/Updating/Deleting} Environment Variable requires a rebuild/redeploy of XM Cloud environment for the changes to take effect. \{\{nl\}\}}}} \tn % Row Count 4 (+ 4) % Row 24 \SetRowColor{white} To \seqsplit{create/update} an environment variable of an Environment & \{\{noshy\}\}dotnet sitecore cloud environment variable upsert -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-name \seqsplit{"Variable-Name"} -{}-value "Variable-Value"\{\{noshy\}\} & - \tn % Row Count 16 (+ 12) % Row 25 \SetRowColor{LightBackground} & \{\{noshy\}\}dotnet sitecore cloud environment variable upsert -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-name \seqsplit{"Variable-Name"} -{}-value \seqsplit{"Variable-Value"} -{}-target CM\{\{noshy\}\} & Target this variable for CM only \tn % Row Count 29 (+ 13) % Row 26 \SetRowColor{white} & \{\{noshy\}\}dotnet sitecore cloud environment variable upsert -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-name \seqsplit{"Variable-Name"} -{}-value \seqsplit{"Variable-Value"} -{}-target \textless{}Rendering-Host-Name\textgreater{}\{\{noshy\}\} & Target this variable for Rendering Host \tn % Row Count 43 (+ 14) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.7358 cm} x{5.5671 cm} x{5.5671 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{17.67cm}}{\bf\textcolor{white}{XM Cloud CLI - Environment (cont)}} \tn % Row 27 \SetRowColor{LightBackground} & \{\{noshy\}\}dotnet sitecore cloud environment variable upsert -{}-environment-id \textless{}Environment-Id\textgreater{} -{}-name \seqsplit{"Variable-Name"} -{}-value \seqsplit{"Variable-Value"} -{}-secret\{\{noshy\}\} & This bool sets the variable encrypted \tn % Row Count 13 (+ 13) % Row 28 \SetRowColor{white} To delete an environment variable & \{\{noshy\}\}dotnet sitecore cloud environment variable delete \seqsplit{-environment-id} \textless{}Environment-Id\textgreater{} -{}-name "Variable-Name"\{\{noshy\}\} & - \tn % Row Count 23 (+ 10) % Row 29 \SetRowColor{LightBackground} To restart an environment & \{\{noshy\}\}dotnet sitecore cloud environment restart -{}-environment-id \textless{}environment-id\textgreater{}\{\{noshy\}\} & Environment will be restarted without any intervention to CM instance. \tn % Row Count 31 (+ 8) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \end{document}