Exemples d'événements Amazon EventBridge pour Systems Manager - AWS Systems Manager

Exemples d'événements Amazon EventBridge pour Systems Manager

Voici des exemples, au format JSON, d'événements EventBridge pris en charge pour AWS Systems Manager.

Événements Automation AWS Systems Manager

Notification de changement de statut d'une étape d'automatisation

{ "version": "0", "id": "eeca120b-a321-433e-9635-dab369006a6b", "detail-type": "EC2 Automation Step Status-change Notification", "source": "aws.ssm", "account": "123456789012", "time": "2016-11-29T19:43:35Z", "region": "us-east-1", "resources": ["arn:aws:ssm:us-east-2:123456789012:automation-execution/333ba70b-2333-48db-b17e-a5e69c6f4d1c", "arn:aws:ssm:us-east-2:123456789012:automation-definition/runcommand1:1"], "detail": { "ExecutionId": "333ba70b-2333-48db-b17e-a5e69c6f4d1c", "Definition": "runcommand1", "DefinitionVersion": 1.0, "Status": "Success", "EndTime": "Nov 29, 2016 7:43:25 PM", "StartTime": "Nov 29, 2016 7:43:23 PM", "Time": 2630.0, "StepName": "runFixedCmds", "Action": "aws:runCommand" } }

Notification de changement de statut d'exécution de l'automatisation

{ "version": "0", "id": "d290ece9-1088-4383-9df6-cd5b4ac42b99", "detail-type": "EC2 Automation Execution Status-change Notification", "source": "aws.ssm", "account": "123456789012", "time": "2016-11-29T19:43:35Z", "region": "us-east-2", "resources": ["arn:aws:ssm:us-east-2:123456789012:automation-execution/333ba70b-2333-48db-b17e-a5e69c6f4d1c", "arn:aws:ssm:us-east-2:123456789012:automation-definition/runcommand1:1"], "detail": { "ExecutionId": "333ba70b-2333-48db-b17e-a5e69c6f4d1c", "Definition": "runcommand1", "DefinitionVersion": 1.0, "Status": "Success", "StartTime": "Nov 29, 2016 7:43:20 PM", "EndTime": "Nov 29, 2016 7:43:26 PM", "Time": 5753.0, "ExecutedBy": "arn:aws:iam::123456789012:user/userName" } }

Événements AWS Systems ManagerChange Calendar

Voici des exemples d'événements pour AWS Systems Manager Change Calendar.

Note

Les modifications d'état pour les planifications partagées à partir d'autres AWS ne sont pas prises en charge actuellement.

Calendrier OPEN (OUVERT)

{ "version": "0", "id": "47a3f03a-f30d-1011-ac9a-du3bdEXAMPLE", "detail-type": "Calendar State Change", "source": "aws.ssm", "account": "123456789012", "time": "2020-09-19T18:00:07Z", "region": "us-east-2", "resources": [ "arn:aws:ssm:us-east-2:123456789012:document/MyCalendar" ], "detail": { "state": "OPEN", "atTime": "2020-09-19T18:00:07Z", "nextTransitionTime": "2020-10-11T18:00:07Z" } }

Calendrier CLOSED (FERMÉ)

{ "version": "0", "id": "f30df03a-1011-ac9a-47a3-f761eEXAMPLE", "detail-type": "Calendar State Change", "source": "aws.ssm", "account": "123456789012", "time": "2020-09-17T21:40:02Z", "region": "us-east-2", "resources": [ "arn:aws:ssm:us-east-2:123456789012:document/MyCalendar" ], "detail": { "state": "CLOSED", "atTime": "2020-08-17T21:40:00Z", "nextTransitionTime": "2020-09-19T18:00:07Z" } }

Événements de conformité AWS Systems Manager

Voici des exemples d'événements pour la conformité de AWS Systems Manager.

Conforme à l'association

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "Configuration Compliance State Change", "source": "aws.ssm", "account": "123456789012", "time": "2017-07-17T19:03:26Z", "region": "us-east-2", "resources": [ "arn:aws:ssm:us-east-2:123456789012:managed-instance/i-01234567890abcdef" ], "detail": { "last-runtime": "2017-01-01T10:10:10Z", "compliance-status": "compliant", "resource-type": "managed-instance", "resource-id": "i-01234567890abcdef", "compliance-type": "Association" } }

Non conforme à l'association

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "Configuration Compliance State Change", "source": "aws.ssm", "account": "123456789012", "time": "2017-07-17T19:02:31Z", "region": "us-east-2", "resources": [ "arn:aws:ssm:us-east-2:123456789012:managed-instance/i-01234567890abcdef" ], "detail": { "last-runtime": "2017-01-01T10:10:10Z", "compliance-status": "non_compliant", "resource-type": "managed-instance", "resource-id": "i-01234567890abcdef", "compliance-type": "Association" } }

Conforme aux correctifs

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "Configuration Compliance State Change", "source": "aws.123456789012", "account": "123456789012", "time": "2017-07-17T19:03:26Z", "region": "us-east-2", "resources": [ "arn:aws:ssm:us-east-2:123456789012:managed-instance/i-01234567890abcdef" ], "detail": { "resource-type": "managed-instance", "resource-id": "i-01234567890abcdef", "compliance-status": "compliant", "compliance-type": "Patch", "patch-baseline-id": "PB789", "severity": "critical" } }

Non conforme aux correctifs

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "Configuration Compliance State Change", "source": "aws.ssm", "account": "123456789012", "time": "2017-07-17T19:02:31Z", "region": "us-east-2", "resources": [ "arn:aws:ssm:us-east-2:123456789012:managed-instance/i-01234567890abcdef" ], "detail": { "resource-type": "managed-instance", "resource-id": "i-01234567890abcdef", "compliance-status": "non_compliant", "compliance-type": "Patch", "patch-baseline-id": "PB789", "severity": "critical" } }

Événements AWS Systems ManagerMaintenance Windows

Vous trouverez ci-dessous des exemples d'événements pour Systems Manager Maintenance Windows.

Enregistrer une cible

L'autre valeur d'état valide est DEREGISTERED.

{ "version":"0", "id":"01234567-0123-0123-0123-0123456789ab", "detail-type":"Maintenance Window Target Registration Notification", "source":"aws.ssm", "account":"123456789012", "time":"2016-11-16T00:58:37Z", "region":"us-east-2", "resources":[ "arn:aws:ssm:us-east-2:123456789012:maintenancewindow/mw-0ed7251d3fcf6e0c2", "arn:aws:ssm:us-east-2:123456789012:windowtarget/e7265f13-3cc5-4f2f-97a9-7d3ca86c32a6" ], "detail":{ "window-target-id":"e7265f13-3cc5-4f2f-97a9-7d3ca86c32a6", "window-id":"mw-0ed7251d3fcf6e0c2", "status":"REGISTERED" } }

Type d'exécution de fenêtre

Les autres valeurs d'état valides sont PENDING, IN_PROGRESS, SUCCESS, FAILED, TIMED_OUT et SKIPPED_OVERLAPPING.

{ "version":"0", "id":"01234567-0123-0123-0123-0123456789ab", "detail-type":"Maintenance Window Execution State-change Notification", "source":"aws.ssm", "account":"123456789012", "time":"2016-11-16T01:00:57Z", "region":"us-east-2", "resources":[ "arn:aws:ssm:us-east-2:123456789012:maintenancewindow/mw-123456789012345678" ], "detail":{ "start-time":"2016-11-16T01:00:56.427Z", "end-time":"2016-11-16T01:00:57.070Z", "window-id":"mw-0ed7251d3fcf6e0c2", "window-execution-id":"b60fb56e-776c-4e5c-84ee-123456789012", "status":"TIMED_OUT" } }

Type d'exécution de tâche

Les autres valeurs d'état valides sont IN_PROGRESS, SUCCESS, FAILED et TIMED_OUT.

{ "version":"0", "id":"01234567-0123-0123-0123-0123456789ab", "detail-type":"Maintenance Window Task Execution State-change Notification", "source":"aws.ssm", "account":"123456789012", "time":"2016-11-16T01:00:56Z", "region":"us-east-2", "resources":[ "arn:aws:ssm:us-east-2:123456789012:maintenancewindow/mw-123456789012345678" ], "detail":{ "start-time":"2016-11-16T01:00:56.759Z", "task-execution-id":"6417e808-7f35-4d1a-843f-123456789012", "end-time":"2016-11-16T01:00:56.847Z", "window-id":"mw-0ed7251d3fcf6e0c2", "window-execution-id":"b60fb56e-776c-4e5c-84ee-123456789012", "status":"TIMED_OUT" } }

Cible de tâche traitée

Les autres valeurs d'état valides sont IN_PROGRESS, SUCCESS, FAILED et TIMED_OUT.

{ "version":"0", "id":"01234567-0123-0123-0123-0123456789ab", "detail-type":"Maintenance Window Task Target Invocation State-change Notification", "source":"aws.ssm", "account":"123456789012", "time":"2016-11-16T01:00:57Z", "region":"us-east-2", "resources":[ "arn:aws:ssm:us-east-2:123456789012:maintenancewindow/mw-123456789012345678" ], "detail":{ "start-time":"2016-11-16T01:00:56.427Z", "end-time":"2016-11-16T01:00:57.070Z", "window-id":"mw-0ed7251d3fcf6e0c2", "window-execution-id":"b60fb56e-776c-4e5c-84ee-123456789012", "task-execution-id":"6417e808-7f35-4d1a-843f-123456789012", "window-target-id":"e7265f13-3cc5-4f2f-97a9-123456789012", "status":"TIMED_OUT", "owner-information":"Owner" } }

Changement d'état de la fenêtre

Les valeurs d'état valides sont ENABLED et DISABLED.

{ "version":"0", "id":"01234567-0123-0123-0123-0123456789ab", "detail-type":"Maintenance Window State-change Notification", "source":"aws.ssm", "account":"123456789012", "time":"2016-11-16T00:58:37Z", "region":"us-east-2", "resources":[ "arn:aws:ssm:us-east-2:123456789012:maintenancewindow/mw-123456789012345678" ], "detail":{ "window-id":"mw-123456789012", "status":"DISABLED" } }

Événements AWS Systems ManagerParameter Store

Vous trouverez ci-dessous des exemples d'événements pour Systems Manager Parameter Store.

Création de paramètre

{ "version": "0", "id": "6a7e4feb-b491-4cf7-a9f1-bf3703497718", "detail-type": "Parameter Store Change", "source": "aws.ssm", "account": "123456789012", "time": "2017-05-22T16:43:48Z", "region": "us-east-2", "resources": [ "arn:aws:ssm:us-east-2:123456789012:parameter/MyExampleParameter" ], "detail": { "operation": "Create", "name": "MyExampleParameter", "type": "String", "description": "Sample Parameter" } }

Mise à jour de paramètre

{ "version": "0", "id": "9547ef2d-3b7e-4057-b6cb-5fdf09ee7c8f", "detail-type": "Parameter Store Change", "source": "aws.ssm", "account": "123456789012", "time": "2017-05-22T16:44:48Z", "region": "us-east-2", "resources": [ "arn:aws:ssm:us-east-2:123456789012:parameter/MyExampleParameter" ], "detail": { "operation": "Update", "name": "MyExampleParameter", "type": "String", "description": "Sample Parameter" } }

Suppression de paramètre

{ "version": "0", "id": "80e9b391-6a9b-413c-839a-453b528053af", "detail-type": "Parameter Store Change", "source": "aws.ssm", "account": "123456789012", "time": "2017-05-22T16:45:48Z", "region": "us-east-2", "resources": [ "arn:aws:ssm:us-east-2:123456789012:parameter/MyExampleParameter" ], "detail": { "operation": "Delete", "name": "MyExampleParameter", "type": "String", "description": "Sample Parameter" } }

Événements AWS Systems ManagerRun Command

Notification de changement de statut Run Command

{ "version": "0", "id": "51c0891d-0e34-45b1-83d6-95db273d1602", "detail-type": "EC2 Command Status-change Notification", "source": "aws.ssm", "account": "123456789012", "time": "2016-07-10T21:51:32Z", "region": "us-east-2", "resources": ["arn:aws:ec2:us-east-2:123456789012:instance/i-abcd1111"], "detail": { "command-id": "e8d3c0e4-71f7-4491-898f-c9b35bee5f3b", "document-name": "AWS-RunPowerShellScript", "expire-after": "2016-07-14T22:01:30.049Z", "parameters": { "executionTimeout": ["3600"], "commands": ["date"] }, "requested-date-time": "2016-07-10T21:51:30.049Z", "status": "Success" } }

Notification de changement de statut d'un appel Run Command

{ "version": "0", "id": "4780e1b8-f56b-4de5-95f2-95db273d1602", "detail-type": "EC2 Command Invocation Status-change Notification", "source": "aws.ssm", "account": "123456789012", "time": "2016-07-10T21:51:32Z", "region": "us-east-2", "resources": ["arn:aws:ec2:us-east-2:123456789012:instance/i-abcd1111"], "detail": { "command-id": "e8d3c0e4-71f7-4491-898f-c9b35bee5f3b", "document-name": "AWS-RunPowerShellScript", "instance-id": "i-9bb89e2b", "requested-date-time": "2016-07-10T21:51:30.049Z", "status": "Success" } }

Événements AWS Systems ManagerState Manager

Changement d'état d'association State Manager

{ "version":"0", "id":"db839caf-6f6c-40af-9a48-25b2ae2b7774", "detail-type":"EC2 State Manager Association State Change", "source":"aws.ssm", "account":"123456789012", "time":"2017-05-16T23:01:10Z", "region":"us-east-2", "resources":[ "arn:aws:ssm:us-east-2::document/AWS-RunPowerShellScript" ], "detail":{ "association-id":"6e37940a-23ba-4ab0-9b96-5d0a1a05464f", "document-name":"AWS-RunPowerShellScript", "association-version":"1", "document-version":"Optional.empty", "targets":"[{\"key\":\"InstanceIds\",\"values\":[\"i-12345678\"]}]", "creation-date":"2017-02-13T17:22:54.458Z", "last-successful-execution-date":"2017-05-16T23:00:01Z", "last-execution-date":"2017-05-16T23:00:01Z", "last-updated-date":"2017-02-13T17:22:54.458Z", "status":"Success", "association-status-aggregated-count":"{\"Success\":1}", "schedule-expression":"cron(0 */30 * * * ? *)", "association-cwe-version":"1.0" } }

Changements d'état d'association d'instance State Manager

{ "version":"0", "id":"6a7e8feb-b491-4cf7-a9f1-bf3703467718", "detail-type":"EC2 State Manager Instance Association State Change", "source":"aws.ssm", "account":"123456789012", "time":"2017-02-23T15:23:48Z", "region":"us-east-2", "resources":[ "arn:aws:ec2:us-east-2:123456789012:instance/i-12345678", "arn:aws:ssm:us-east-2:123456789012:document/my-custom-document" ], "detail":{ "association-id":"34fcb7e0-9a14-4984-9989-0e04e3f60bd8", "instance-id":"i-12345678", "document-name":"my-custom-document", "document-version":"1", "targets":"[{\"key\":\"instanceids\",\"values\":[\"i-12345678\"]}]", "creation-date":"2017-02-23T15:23:48Z", "last-successful-execution-date":"2017-02-23T16:23:48Z", "last-execution-date":"2017-02-23T16:23:48Z", "status":"Success", "detailed-status":"", "error-code":"testErrorCode", "execution-summary":"testExecutionSummary", "output-url":"sampleurl", "instance-association-cwe-version":"1" } }