SSM / Client / create_ops_item

create_ops_item#

SSM.Client.create_ops_item(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.create_ops_item(
    Description='string',
    OpsItemType='string',
    OperationalData={
        'string': {
            'Value': 'string',
            'Type': 'SearchableString'|'String'
        }
    },
    Notifications=[
        {
            'Arn': 'string'
        },
    ],
    Priority=123,
    RelatedOpsItems=[
        {
            'OpsItemId': 'string'
        },
    ],
    Source='string',
    Title='string',
    Tags=[
        {
            'Key': 'string',
            'Value': '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),
    AccountId='string'
)
Parameters:
  • Description (string) –

    [REQUIRED]

    User-defined text that contains information about the OpsItem, in Markdown format.

    Note

    Provide enough information so that users viewing this OpsItem for the first time understand the issue.

  • OpsItemType (string) –

    The type of OpsItem to create. 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.

  • 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 Create 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.

  • Notifications (list) –

    The Amazon Resource Name (ARN) of an 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 OpsItems. 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) – [REQUIRED]

        The ID of an OpsItem related to the current OpsItem.

  • Source (string) –

    [REQUIRED]

    The origin of the OpsItem, such as Amazon EC2 or Systems Manager.

    Note

    The source name can’t contain the following strings: aws, amazon, and amzn.

  • Title (string) –

    [REQUIRED]

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

  • Tags (list) –

    Optional metadata that you assign to a resource.

    Tags use a key-value pair. For example:

    Key=Department,Value=Finance

    Warning

    To add tags to a new OpsItem, a user must have IAM permissions for both the ssm:CreateOpsItems operation and the ssm:AddTagsToResource operation. To add tags to an existing OpsItem, use the AddTagsToResource operation.

    • (dict) –

      Metadata that you assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Amazon Web Services Systems Manager, you can apply tags to Systems Manager documents (SSM documents), managed nodes, maintenance windows, parameters, patch baselines, OpsItems, and OpsMetadata.

      • Key (string) – [REQUIRED]

        The name of the tag.

      • Value (string) – [REQUIRED]

        The value of the tag.

  • Category (string) – Specify a category to assign to an OpsItem.

  • Severity (string) – Specify a severity to assign to an OpsItem.

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

  • AccountId (string) – The target Amazon Web Services account where you want to create an OpsItem. To make this call, your account must be configured to work with OpsItems across accounts. For more information, see Set up OpsCenter in the Amazon Web Services Systems Manager User Guide.

Return type:

dict

Returns:

Response Syntax

{
    'OpsItemId': 'string',
    'OpsItemArn': 'string'
}

Response Structure

  • (dict) –

    • OpsItemId (string) –

      The ID of the OpsItem.

    • OpsItemArn (string) –

      The OpsItem Amazon Resource Name (ARN).

Exceptions

  • SSM.Client.exceptions.InternalServerError

  • SSM.Client.exceptions.OpsItemAlreadyExistsException

  • SSM.Client.exceptions.OpsItemLimitExceededException

  • SSM.Client.exceptions.OpsItemInvalidParameterException

  • SSM.Client.exceptions.OpsItemAccessDeniedException