pycti.entities.opencti_marking_definition ========================================= .. py:module:: pycti.entities.opencti_marking_definition Classes ------- .. autoapisummary:: pycti.entities.opencti_marking_definition.MarkingDefinition Module Contents --------------- .. py:class:: MarkingDefinition(opencti) Main MarkingDefinition class for OpenCTI Manages marking definitions (TLP, statements) in the OpenCTI platform. :param opencti: instance of :py:class:`~pycti.api.opencti_api_client.OpenCTIApiClient` :type opencti: OpenCTIApiClient Initialize the MarkingDefinition instance. :param opencti: OpenCTI API client instance :type opencti: OpenCTIApiClient .. py:attribute:: opencti .. py:attribute:: properties :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ id standard_id entity_type parent_types definition_type definition x_opencti_order x_opencti_color created modified created_at updated_at """ .. raw:: html
.. py:method:: generate_id(definition_type, definition) :staticmethod: Generate a STIX ID for a Marking Definition. :param definition_type: The type of marking (TLP, statement, etc.) :type definition_type: str :param definition: The definition value :type definition: str :return: STIX ID for the marking definition :rtype: str .. py:method:: generate_id_from_data(data) :staticmethod: Generate a STIX ID from marking definition data. :param data: Dictionary containing 'definition_type' and 'definition' keys :type data: dict :return: STIX ID for the marking definition :rtype: str .. py:method:: list(**kwargs) List Marking-Definition objects. :param filters: the filters to apply :type filters: dict :param first: return the first n rows from the after ID (or the beginning if not set) :type first: int :param after: ID of the first row for pagination :type after: str :param orderBy: field to order results by :type orderBy: str :param orderMode: ordering mode (asc/desc) :type orderMode: str :param customAttributes: custom attributes to return :type customAttributes: list :param withPagination: whether to include pagination info :type withPagination: bool :return: List of Marking-Definition objects :rtype: list .. py:method:: read(**kwargs) Read a Marking-Definition object. :param id: the id of the Marking-Definition :type id: str :param filters: the filters to apply if no id provided :type filters: dict :return: Marking-Definition object :rtype: dict or None .. py:method:: create(**kwargs) Create a Marking-Definition object. :param stix_id: (optional) the STIX ID :type stix_id: str :param created: (optional) creation date :type created: datetime :param modified: (optional) modification date :type modified: datetime :param definition_type: the definition type (required) :type definition_type: str :param definition: the definition value (required) :type definition: str :param x_opencti_order: (optional) order (default: 0) :type x_opencti_order: int :param x_opencti_color: (optional) color :type x_opencti_color: str :param x_opencti_stix_ids: (optional) list of additional STIX IDs :type x_opencti_stix_ids: list :param update: (optional) whether to update if exists (default: False) :type update: bool :return: Marking-Definition object :rtype: dict or None .. py:method:: update_field(**kwargs) Update a Marking Definition object field. :param id: the Marking Definition id :type id: str :param input: the input of the field :type input: list :return: The updated Marking Definition object :rtype: dict or None .. py:method:: import_from_stix2(**kwargs) Import a Marking Definition object from a STIX2 object. :param stixObject: the Stix-Object Marking Definition :type stixObject: dict :param update: set the update flag on import :type update: bool :return: Marking Definition object :rtype: dict or None .. py:method:: delete(**kwargs) Delete a Marking-Definition object. :param id: the id of the Marking-Definition to delete :type id: str :return: None