laceworksdk.api.v2.schemas

Lacework Schemas API wrapper.

Module Contents

Classes

SchemasAPI

A class used to represent the Schemas API endpoint

class laceworksdk.api.v2.schemas.SchemasAPI(session)[source]

Bases: laceworksdk.api.base_endpoint.BaseEndpoint

A class used to represent the Schemas API endpoint

Get details about the available Lacework schemas.

property session

Get the HttpSession instance the object is using.

get(type=None, subtype=None)[source]

A method to get schema objects. Using no args will get all schemas.

Parameters:
  • type (str, optional) – The schema type to retrieve. Valid values are any API resource listed in the Lacework API documentation .Examples include “AlertChannels”, “CloudAccounts”, “AgentAccessTokens”, etc..

  • subtype (str, optional) –

    The subtype to retrieve. Subtypes are only available for API resources that have “type” like fields. For instance the “AlertChannels” resource has subtypes such as “AwsS3”, “SlackChannel”, etc. See the Lacework API documentation for more info.

Returns:

The requested schema

Return type:

dict

get_by_subtype(type, subtype)[source]

A method to fetch a specific subtype schema.

Parameters:
  • type (str) –

    The schema type to retrieve. Valid values are any API resource listed in the Lacework API documentation .Examples include “AlertChannels”, “CloudAccounts”, “AgentAccessTokens”, etc..

  • subtype (str) –

    The subtype to retrieve. Subtypes are only available for API resources that have “type” like fields. For instance the “AlertChannels” resource has subtypes such as “AwsS3”, “SlackChannel”, etc. See the Lacework API documentation for more info.

Returns:

The requested schema

Return type:

dict