SSM / Client / get_ops_item

get_ops_item#

SSM.Client.get_ops_item(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.get_ops_item(
    OpsItemId='string',
    OpsItemArn='string'
)
Parameters:
  • OpsItemId (string) –

    [REQUIRED]

    The ID of the OpsItem that you want to get.

  • OpsItemArn (string) – The OpsItem Amazon Resource Name (ARN).

Return type:

dict

Returns:

Response Syntax

{
    'OpsItem': {
        'CreatedBy': 'string',
        'OpsItemType': 'string',
        'CreatedTime': datetime(2015, 1, 1),
        'Description': 'string',
        'LastModifiedBy': 'string',
        'LastModifiedTime': datetime(2015, 1, 1),
        'Notifications': [
            {
                'Arn': 'string'
            },
        ],
        'Priority': 123,
        'RelatedOpsItems': [
            {
                'OpsItemId': 'string'
            },
        ],
        'Status': 'Open'|'InProgress'|'Resolved'|'Pending'|'TimedOut'|'Cancelling'|'Cancelled'|'Failed'|'CompletedWithSuccess'|'CompletedWithFailure'|'Scheduled'|'RunbookInProgress'|'PendingChangeCalendarOverride'|'ChangeCalendarOverrideApproved'|'ChangeCalendarOverrideRejected'|'PendingApproval'|'Approved'|'Rejected'|'Closed',
        'OpsItemId': 'string',
        'Version': 'string',
        'Title': 'string',
        'Source': 'string',
        'OperationalData': {
            'string': {
                'Value': 'string',
                'Type': 'SearchableString'|'String'
            }
        },
        'Category': 'string',
        'Severity': 'string',
        'ActualStartTime': datetime(2015, 1, 1),
        'ActualEndTime': datetime(2015, 1, 1),
        'PlannedStartTime': datetime(2015, 1, 1),
        'PlannedEndTime': datetime(2015, 1, 1),
        'OpsItemArn': 'string'
    }
}

Response Structure

  • (dict) –

    • OpsItem (dict) –

      The OpsItem.

      • CreatedBy (string) –

        The ARN of the Amazon Web Services account that created the OpsItem.

      • OpsItemType (string) –

        The 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.

      • CreatedTime (datetime) –

        The date and time the OpsItem was created.

      • Description (string) –

        The OpsItem description.

      • LastModifiedBy (string) –

        The ARN of the Amazon Web Services account that last updated the OpsItem.

      • LastModifiedTime (datetime) –

        The date and time the OpsItem was last updated.

      • Notifications (list) –

        The Amazon Resource Name (ARN) of an Amazon Simple Notification Service (Amazon SNS) topic where notifications are sent when this OpsItem is edited or changed.

        • (dict) –

          A notification about the OpsItem.

          • Arn (string) –

            The Amazon Resource Name (ARN) of an Amazon Simple Notification Service (Amazon SNS) topic where notifications are sent when this OpsItem is edited or changed.

      • Priority (integer) –

        The importance of this OpsItem in relation to other OpsItems in the system.

      • RelatedOpsItems (list) –

        One 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.

        • (dict) –

          An OpsItems that shares 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.

          • OpsItemId (string) –

            The ID of an OpsItem related to the current OpsItem.

      • Status (string) –

        The OpsItem status. Status can be Open, In Progress, or Resolved. For more information, see Editing OpsItem details in the Amazon Web Services Systems Manager User Guide.

      • OpsItemId (string) –

        The ID of the OpsItem.

      • Version (string) –

        The version of this OpsItem. Each time the OpsItem is edited the version number increments by one.

      • Title (string) –

        A short heading that describes the nature of the OpsItem and the impacted resource.

      • Source (string) –

        The origin of the OpsItem, such as Amazon EC2 or Systems Manager. The impacted resource is a subset of source.

      • OperationalData (dict) –

        Operational 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.

        Warning

        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.

        • (string) –

          • (dict) –

            An object that defines the value of the key and its type in the OperationalData map.

            • Value (string) –

              The value of the OperationalData key.

            • Type (string) –

              The type of key-value pair. Valid types include SearchableString and String.

      • Category (string) –

        An OpsItem category. Category options include: Availability, Cost, Performance, Recovery, Security.

      • Severity (string) –

        The severity of the OpsItem. Severity options range from 1 to 4.

      • ActualStartTime (datetime) –

        The time a runbook workflow started. Currently reported only for the OpsItem type /aws/changerequest.

      • ActualEndTime (datetime) –

        The time a runbook workflow ended. Currently reported only for the OpsItem type /aws/changerequest.

      • PlannedStartTime (datetime) –

        The time specified in a change request for a runbook workflow to start. Currently supported only for the OpsItem type /aws/changerequest.

      • PlannedEndTime (datetime) –

        The time specified in a change request for a runbook workflow to end. Currently supported only for the OpsItem type /aws/changerequest.

      • OpsItemArn (string) –

        The OpsItem Amazon Resource Name (ARN).

Exceptions

  • SSM.Client.exceptions.InternalServerError

  • SSM.Client.exceptions.OpsItemNotFoundException

  • SSM.Client.exceptions.OpsItemAccessDeniedException