Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.
Ripristino a una versione precedente del documento AWS Systems Manager
Scoprite come ripristinare una versione precedente del documento AWS Systems Manager. Per ulteriori informazioni sui documenti SSM, vedere AWS Systems Manager Documents nella AWS Systems Manager User Guide.
Quando si utilizza l'interfaccia a riga di AWS ParallelCluster comando (CLI) o l'API, si pagano solo le AWS risorse create quando si creano o si aggiornano AWS ParallelCluster immagini e cluster. Per ulteriori informazioni, consulta AWS servizi usati da AWS ParallelCluster.
Il PCUI è basato su un'architettura serverless ed è possibile utilizzarlo nella categoria AWS Free Tier nella maggior parte dei casi. Per ulteriori informazioni, consulta Costi PCUI.
Prerequisiti:
-
E Account AWS con le autorizzazioni per gestire i documenti SSM.
-
AWS CLI È installato e configurato.
Ripristina una versione precedente del documento SSM
-
Nel tuo terminale, esegui il seguente comando per ottenere l'elenco dei documenti SSM esistenti di cui sei proprietario.
$
aws ssm list-documents --document-filter "key=Owner,value=Self"
-
Ripristina una versione precedente di un documento SSM. In questo esempio, torniamo a una versione precedente del documento.
SessionManagerRunShell
È possibile utilizzare ilSessionManagerRunShell
documento SSM per personalizzare ogni sessione della shell SSM che si avvia.-
Trovate il
DocumentVersion
parametro perSessionManagerRunShell
eseguendo il seguente comando:$
aws ssm describe-document --name
"SSM-SessionManagerRunShell"
{ "Document": { "Hash": "...", "HashType": "Sha256", "Name": "SSM-SessionManagerRunShell", "Owner": "123456789012", "CreatedDate": "2023-02-20T19:04:32.390000+00:00", "Status": "Active", "DocumentVersion": "1", "Parameters": [ { "Name": "linuxcmd", "Type": "String", "Description": "The command to run on connection...", "DefaultValue": "if [ -d '/opt/parallelcluster' ]; then source /opt/parallelcluster/cfnconfig; sudo su - $cfn_cluster_user; fi; /bin/bash" } ], "PlatformTypes": [ "Windows", "Linux", "MacOS" ], "DocumentType": "Session", "SchemaVersion": "1.0", "LatestVersion": "2", "DefaultVersion": "1", "DocumentFormat": "JSON", "Tags": [] } }
La versione più recente è
2
. -
Tornate alla versione precedente eseguendo il comando seguente:
$
aws ssm delete-document --name
"SSM-SessionManagerRunShell"
--document-version2
-
-
Verificate che la versione del documento sia stata ripristinata eseguendo nuovamente il
describe-document
comando:$
aws ssm describe-document --name
"SSM-SessionManagerRunShell"
{ "Document": { "Hash": "...", "HashType": "Sha256", "Name": "SSM-SessionManagerRunShell", "Owner": "123456789012", "CreatedDate": "2023-02-20T19:04:32.390000+00:00", "Status": "Active", "DocumentVersion": "1", "Parameters": [ { "Name": "linuxcmd", "Type": "String", "Description": "The command to run on connection...", "DefaultValue": "if [ -d '/opt/parallelcluster' ]; then source /opt/parallelcluster/cfnconfig; sudo su - $cfn_cluster_user; fi; /bin/bash" } ], "PlatformTypes": [ "Windows", "Linux", "MacOS" ], "DocumentType": "Session", "SchemaVersion": "1.0", "LatestVersion": "1", "DefaultVersion": "1", "DocumentFormat": "JSON", "Tags": [] } }
La versione più recente è
1
.