Skip to main content

ops_items

Creates, updates, deletes, gets or lists an ops_items resource.

Overview

Nameops_items
TypeResource
Idaws.ssm.ops_items

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
actual_end_timestring (date-time)The time a runbook workflow ended. Currently reported only for the OpsItem type /aws/changerequest.
actual_start_timestring (date-time)The time a runbook workflow started. Currently reported only for the OpsItem type /aws/changerequest.
categorystringAn OpsItem category. Category options include: Availability, Cost, Performance, Recovery, Security. (pattern: <code>^(?!\s*$).+</code>)
created_bystringThe ARN of the Amazon Web Services account that created the OpsItem.
created_timestring (date-time)The date and time the OpsItem was created.
descriptionstringThe OpsItem description. (pattern: <code>[\s\S]\S[\s\S]</code>)
last_modified_bystringThe ARN of the Amazon Web Services account that last updated the OpsItem.
last_modified_timestring (date-time)The date and time the OpsItem was last updated.
notificationsarrayThe Amazon Resource Name (ARN) of an Amazon Simple Notification Service (Amazon SNS) topic where notifications are sent when this OpsItem is edited or changed.
operational_dataobjectOperational data is custom data that provides useful reference details about the OpsItem. For example, you can specify log files, error strings, license keys, troubleshooting tips, or other relevant data. You enter operational data as key-value pairs. The key has a maximum length of 128 characters. The value has a maximum size of 20 KB. Operational data keys can't begin with the following: amazon, aws, amzn, ssm, /amazon, /aws, /amzn, /ssm. You can choose to make the data searchable by other users in the account or you can restrict search access. Searchable data means that all users with access to the OpsItem Overview page (as provided by the DescribeOpsItems API operation) can view and search on the specified data. Operational data that isn't searchable is only viewable by users who have access to the OpsItem (as provided by the GetOpsItem API operation). Use the /aws/resources key in OperationalData to specify a related resource in the request. Use the /aws/automations key in OperationalData to associate an Automation runbook with the OpsItem. To view Amazon Web Services CLI example commands that use these keys, see Creating OpsItems manually in the Amazon Web Services Systems Manager User Guide.
ops_item_arnstringThe OpsItem Amazon Resource Name (ARN). (pattern: <code>arn:(aws[a-zA-Z-])?:ssm:[a-z0-9-.]{0,63}:[0-9]{12}:opsitem.</code>)
ops_item_idstringThe ID of the OpsItem. (pattern: <code>^(oi)-[0-9a-f]{12}$</code>)
ops_item_typestringThe type of OpsItem. Systems Manager supports the following types of OpsItems: /aws/issue This type of OpsItem is used for default OpsItems created by OpsCenter. /aws/changerequest This type of OpsItem is used by Change Manager for reviewing and approving or rejecting change requests. /aws/insight This type of OpsItem is used by OpsCenter for aggregating and reporting on duplicate OpsItems.
planned_end_timestring (date-time)The time specified in a change request for a runbook workflow to end. Currently supported only for the OpsItem type /aws/changerequest.
planned_start_timestring (date-time)The time specified in a change request for a runbook workflow to start. Currently supported only for the OpsItem type /aws/changerequest.
priorityintegerThe importance of this OpsItem in relation to other OpsItems in the system.
related_ops_itemsarrayOne or more OpsItems that share something in common with the current OpsItem. For example, related OpsItems can include OpsItems with similar error messages, impacted resources, or statuses for the impacted resource.
severitystringThe severity of the OpsItem. Severity options range from 1 to 4. (pattern: <code>^(?!\s*$).+</code>)
sourcestringThe origin of the OpsItem, such as Amazon EC2 or Systems Manager. The impacted resource is a subset of source. (pattern: <code>^(?!\s*$).+</code>)
statusstringThe OpsItem status. For more information, see Editing OpsItem details in the Amazon Web Services Systems Manager User Guide. (Open, InProgress, Resolved, Pending, TimedOut, Cancelling, Cancelled, Failed, CompletedWithSuccess, CompletedWithFailure, Scheduled, RunbookInProgress, PendingChangeCalendarOverride, ChangeCalendarOverrideApproved, ChangeCalendarOverrideRejected, PendingApproval, Approved, Revoked, Rejected, Closed)
titlestringA short heading that describes the nature of the OpsItem and the impacted resource. (pattern: <code>^(?!\s*$).+</code>)
versionstringThe version of this OpsItem. Each time the OpsItem is edited the version number increments by one.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_ops_itemselectregionGet information about an OpsItem by using the ID. You must have permission in Identity and Access Management (IAM) to view information about an OpsItem. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide. Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see Amazon Web Services Systems Manager OpsCenter in the Amazon Web Services Systems Manager User Guide.
describe_ops_itemsselectregionQuery a set of OpsItems. You must have permission in Identity and Access Management (IAM) to query a list of OpsItems. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide. Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see Amazon Web Services Systems Manager OpsCenter in the Amazon Web Services Systems Manager User Guide.
create_ops_iteminsertregion, DescriptionCreates a new OpsItem. You must have permission in Identity and Access Management (IAM) to create a new OpsItem. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide. Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see Amazon Web Services Systems Manager OpsCenter in the Amazon Web Services Systems Manager User Guide.
update_ops_itemupdateregion, OpsItemIdEdit or change an OpsItem. You must have permission in Identity and Access Management (IAM) to update an OpsItem. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide. Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see Amazon Web Services Systems Manager OpsCenter in the Amazon Web Services Systems Manager User Guide.
delete_ops_itemdeleteregionDelete an OpsItem. You must have permission in Identity and Access Management (IAM) to delete an OpsItem. Note the following important information about this operation. Deleting an OpsItem is irreversible. You can't restore a deleted OpsItem. This operation uses an eventual consistency model, which means the system can take a few minutes to complete this operation. If you delete an OpsItem and immediately call, for example, GetOpsItem, the deleted OpsItem might still appear in the response. This operation is idempotent. The system doesn't throw an exception if you repeatedly call this operation for the same OpsItem. If the first call is successful, all additional calls return the same successful response as the first call. This operation doesn't support cross-account calls. A delegated administrator or management account can't delete OpsItems in other accounts, even if OpsCenter has been set up for cross-account administration. For more information about cross-account administration, see Setting up OpsCenter to centrally manage OpsItems across accounts in the Systems Manager User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Get information about an OpsItem by using the ID. You must have permission in Identity and Access Management (IAM) to view information about an OpsItem. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide. Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see Amazon Web Services Systems Manager OpsCenter in the Amazon Web Services Systems Manager User Guide.

SELECT
actual_end_time,
actual_start_time,
category,
created_by,
created_time,
description,
last_modified_by,
last_modified_time,
notifications,
operational_data,
ops_item_arn,
ops_item_id,
ops_item_type,
planned_end_time,
planned_start_time,
priority,
related_ops_items,
severity,
source,
status,
title,
version
FROM aws.ssm.ops_items
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new OpsItem. You must have permission in Identity and Access Management (IAM) to create a new OpsItem. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide. Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see Amazon Web Services Systems Manager OpsCenter in the Amazon Web Services Systems Manager User Guide.

INSERT INTO aws.ssm.ops_items (
Description,
OpsItemType,
OperationalData,
Notifications,
Priority,
RelatedOpsItems,
Source,
Title,
Tags,
Category,
Severity,
ActualStartTime,
ActualEndTime,
PlannedStartTime,
PlannedEndTime,
AccountId,
region
)
SELECT
'{{ Description }}' /* required */,
'{{ OpsItemType }}',
'{{ OperationalData }}',
'{{ Notifications }}',
{{ Priority }},
'{{ RelatedOpsItems }}',
'{{ Source }}',
'{{ Title }}',
'{{ Tags }}',
'{{ Category }}',
'{{ Severity }}',
'{{ ActualStartTime }}',
'{{ ActualEndTime }}',
'{{ PlannedStartTime }}',
'{{ PlannedEndTime }}',
'{{ AccountId }}',
'{{ region }}'
RETURNING
ops_item_arn,
ops_item_id
;

UPDATE examples

Edit or change an OpsItem. You must have permission in Identity and Access Management (IAM) to update an OpsItem. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide. Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see Amazon Web Services Systems Manager OpsCenter in the Amazon Web Services Systems Manager User Guide.

UPDATE aws.ssm.ops_items
SET
Description = '{{ Description }}',
OperationalData = '{{ OperationalData }}',
OperationalDataToDelete = '{{ OperationalDataToDelete }}',
Notifications = '{{ Notifications }}',
Priority = {{ Priority }},
RelatedOpsItems = '{{ RelatedOpsItems }}',
Status = '{{ Status }}',
OpsItemId = '{{ OpsItemId }}',
Title = '{{ Title }}',
Category = '{{ Category }}',
Severity = '{{ Severity }}',
ActualStartTime = '{{ ActualStartTime }}',
ActualEndTime = '{{ ActualEndTime }}',
PlannedStartTime = '{{ PlannedStartTime }}',
PlannedEndTime = '{{ PlannedEndTime }}',
OpsItemArn = '{{ OpsItemArn }}'
WHERE
region = '{{ region }}' --required
AND OpsItemId = '{{ OpsItemId }}' --required;

DELETE examples

Delete an OpsItem. You must have permission in Identity and Access Management (IAM) to delete an OpsItem. Note the following important information about this operation. Deleting an OpsItem is irreversible. You can't restore a deleted OpsItem. This operation uses an eventual consistency model, which means the system can take a few minutes to complete this operation. If you delete an OpsItem and immediately call, for example, GetOpsItem, the deleted OpsItem might still appear in the response. This operation is idempotent. The system doesn't throw an exception if you repeatedly call this operation for the same OpsItem. If the first call is successful, all additional calls return the same successful response as the first call. This operation doesn't support cross-account calls. A delegated administrator or management account can't delete OpsItems in other accounts, even if OpsCenter has been set up for cross-account administration. For more information about cross-account administration, see Setting up OpsCenter to centrally manage OpsItems across accounts in the Systems Manager User Guide.

DELETE FROM aws.ssm.ops_items
WHERE region = '{{ region }}' --required
;