Sono disponibili altri esempi AWS SDK nel repository AWS Doc SDK
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à.
Utilizzare DescribeStackEvents con una CLI
Gli esempi di codice seguenti mostrano come utilizzare DescribeStackEvents.
- CLI
-
- AWS CLI
-
Per descrivere gli eventi dello stack
L'
describe-stack-eventsesempio seguente visualizza i 2 eventi più recenti per lo stack specificato.aws cloudformation describe-stack-events \ --stack-namemy-stack\ --max-items2{"StackEvents":[{"StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204", "EventId": "4e1516d0-e4d6-xmpl-b94f-0a51958a168c", "StackName": "my-stack", "LogicalResourceId": "my-stack", "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204", "ResourceType": "AWS::CloudFormation::Stack", "Timestamp": "2019-10-02T05:34:29.556Z", "ResourceStatus":"UPDATE_COMPLETE"},{"StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204", "EventId": "4dd3c810-e4d6-xmpl-bade-0aaf8b31ab7a", "StackName": "my-stack", "LogicalResourceId": "my-stack", "PhysicalResourceId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack/d0a825a0-e4cd-xmpl-b9fb-061c69e99204", "ResourceType": "AWS::CloudFormation::Stack", "Timestamp": "2019-10-02T05:34:29.127Z", "ResourceStatus":"UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"}],"NextToken":"eyJOZXh0VG9XMPLiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAyfQ=="}-
Per i dettagli sull'API, vedere DescribeStackEvents
in AWS CLI Command Reference.
-
- PowerShell
-
- Strumenti per PowerShell V4
-
Esempio 1: restituisce tutti gli eventi relativi allo stack per lo stack specificato.
Get-CFNStackEvent -StackName "myStack"-
Per i dettagli sull'API, vedere DescribeStackEventsin AWS Strumenti per PowerShell Cmdlet Reference (V4).
-
- Strumenti per V5 PowerShell
-
Esempio 1: restituisce tutti gli eventi relativi allo stack per lo stack specificato.
Get-CFNStackEvent -StackName "myStack"-
Per i dettagli sull'API, vedere DescribeStackEventsin AWS Strumenti per PowerShell Cmdlet Reference (V5).
-