PATH:
usr
/
local
/
jetapps
/
var
/
lib
/
aws
/
lib
/
python2.7
/
site-packages
/
awscli
/
examples
/
ssm
**To list all active Session Manager sessions** This example retrieves a list of the active sessions created most recently (both connected and disconnected sessions) over the past 30 days that were started by a particular user. Command:: aws ssm describe-sessions --state "Active" --filters "key=Owner,value=arn:aws:sts::123456789012:assumed-role/Administrator/Matt" Output:: { "Sessions": [ { "SessionId": "Matt-07a16060613c408b5", "Target": "i-1234567890abcdef0", "Status": "Connected", "StartDate": 1550676938.352, "Owner": "arn:aws:sts::123456789012:assumed-role/Administrator/Matt", "OutputUrl": {} }, { "SessionId": "Matt-01edf534b8b56e8eb", "Target": "i-9876543210abcdef0", "Status": "Connected", "StartDate": 1550676842.194, "Owner": "arn:aws:sts::123456789012:assumed-role/Administrator/Matt", "OutputUrl": {} } ] } **To list all terminated Session Manager sessions** This example retrieves a list of the most recently terminated sessions from the past 30 days for all users. Command:: aws ssm describe-sessions --state "History" Output:: { "Sessions": [ { "SessionId": "Dan-0022b1eb2b0d9e3bd", "Target": "i-1234567890abcdef0", "Status": "Terminated", "StartDate": 1550520701.256, "EndDate": 1550521931.563, "Owner": "arn:aws:sts::123456789012:assumed-role/Administrator/Dan" }, { "SessionId": "Erik-0db53f487931ed9d4", "Target": "i-9876543210abcdef0", "Status": "Terminated", "StartDate": 1550161369.149, "EndDate": 1550162580.329, "Owner": "arn:aws:sts::123456789012:assumed-role/Administrator/Erik" }, ... ], "NextToken": "--token string truncated--" }
[+]
..
[-] list-compliance-items.rst
[edit]
[-] list-command-invocations.rst
[edit]
[-] describe-automation-step-executions.rst
[edit]
[-] update-service-setting.rst
[edit]
[-] get-parameters.rst
[edit]
[-] send-automation-signal.rst
[edit]
[-] get-service-setting.rst
[edit]
[-] describe-maintenance-windows.rst
[edit]
[-] create-maintenance-window.rst
[edit]
[-] put-parameter.rst
[edit]
[-] delete-maintenance-window.rst
[edit]
[-] get-maintenance-window-task.rst
[edit]
[-] describe-association-execution-targets.rst
[edit]
[-] delete-inventory.rst
[edit]
[-] describe-patch-baselines.rst
[edit]
[-] list-associations.rst
[edit]
[-] get-maintenance-window-execution-task-invocation.rst
[edit]
[-] get-parameters-by-path.rst
[edit]
[-] get-parameter-history.rst
[edit]
[-] start-session.rst
[edit]
[-] update-maintenance-window-target.rst
[edit]
[-] get-default-patch-baseline.rst
[edit]
[-] describe-sessions.rst
[edit]
[-] put-inventory.rst
[edit]
[-] list-document-versions.rst
[edit]
[-] describe-instance-patch-states-for-patch-group.rst
[edit]
[-] describe-effective-patches-for-patch-baseline.rst
[edit]
[-] describe-maintenance-window-execution-tasks.rst
[edit]
[-] describe-association.rst
[edit]
[-] describe-effective-instance-associations.rst
[edit]
[-] describe-document-permission.rst
[edit]
[-] delete-association.rst
[edit]
[-] update-patch-baseline.rst
[edit]
[-] describe-instance-associations-status.rst
[edit]
[-] list-resource-data-sync.rst
[edit]
[-] describe-maintenance-window-tasks.rst
[edit]
[-] describe-document.rst
[edit]
[-] register-target-with-maintenance-window.rst
[edit]
[-] remove-tags-from-resource.rst
[edit]
[-] get-inventory.rst
[edit]
[-] delete-document.rst
[edit]
[-] list-compliance-summaries.rst
[edit]
[-] resume-session.rst
[edit]
[-] put-compliance-items.rst
[edit]
[-] create-association-batch.rst
[edit]
[-] delete-parameters.rst
[edit]
[-] delete-activation.rst
[edit]
[-] stop-automation-execution.rst
[edit]
[-] describe-maintenance-window-targets.rst
[edit]
[-] create-association.rst
[edit]
[-] update-maintenance-window.rst
[edit]
[-] update-document-default-version.rst
[edit]
[-] delete-resource-data-sync.rst
[edit]
[-] list-inventory-entries.rst
[edit]
[-] describe-maintenance-windows-for-target.rst
[edit]
[-] describe-maintenance-window-schedule.rst
[edit]
[-] create-patch-baseline.rst
[edit]
[-] describe-patch-groups.rst
[edit]
[-] describe-parameters.rst
[edit]
[-] get-parameter.rst
[edit]
[-] get-inventory-schema.rst
[edit]
[-] start-automation-execution.rst
[edit]
[-] cancel-command.rst
[edit]
[-] list-tags-for-resource.rst
[edit]
[-] get-automation-execution.rst
[edit]
[-] get-patch-baseline-for-patch-group.rst
[edit]
[-] create-activation.rst
[edit]
[-] describe-maintenance-window-executions.rst
[edit]
[-] list-documents.rst
[edit]
[-] register-task-with-maintenance-window.rst
[edit]
[-] deregister-target-from-maintenance-window.rst
[edit]
[-] get-deployable-patch-snapshot-for-instance.rst
[edit]
[-] describe-association-executions.rst
[edit]
[-] describe-activations.rst
[edit]
[-] update-association.rst
[edit]
[-] terminate-session.rst
[edit]
[-] deregister-managed-instance.rst
[edit]
[-] create-resource-data-sync.rst
[edit]
[-] describe-instance-information.rst
[edit]
[-] update-managed-instance-role.rst
[edit]
[-] get-document.rst
[edit]
[-] list-resource-compliance-summaries.rst
[edit]
[-] register-default-patch-baseline.rst
[edit]
[-] describe-maintenance-window-execution-task-invocations.rst
[edit]
[-] deregister-patch-baseline-for-patch-group.rst
[edit]
[-] get-maintenance-window-execution-task.rst
[edit]
[-] register-patch-baseline-for-patch-group.rst
[edit]
[-] create-document.rst
[edit]
[-] update-document.rst
[edit]
[-] update-association-status.rst
[edit]
[-] list-association-versions.rst
[edit]
[-] list-commands.rst
[edit]
[-] update-maintenance-window-task.rst
[edit]
[-] describe-instance-patch-states.rst
[edit]
[-] describe-instance-patches.rst
[edit]
[-] label-parameter-version.rst
[edit]
[-] describe-inventory-deletions.rst
[edit]
[-] describe-automation-executions.rst
[edit]
[-] get-command-invocation.rst
[edit]
[-] get-maintenance-window-execution.rst
[edit]
[-] deregister-task-from-maintenance-window.rst
[edit]
[-] start-associations-once.rst
[edit]
[-] send-command.rst
[edit]
[-] get-patch-baseline.rst
[edit]
[-] add-tags-to-resource.rst
[edit]
[-] get-maintenance-window.rst
[edit]
[-] cancel-maintenance-window-execution.rst
[edit]
[-] modify-document-permission.rst
[edit]
[-] get-connection-status.rst
[edit]
[-] delete-patch-baseline.rst
[edit]
[-] delete-parameter.rst
[edit]
[-] describe-available-patches.rst
[edit]
[-] describe-patch-group-state.rst
[edit]