4.7.4.3. Field schemas

Parsers for field schemas.

axonius_api_client.parsers.fields.parse_fields(raw)[source]

Parse all generic and adapter specific fields.

Parameters

raw (dict) – field schemas returned by axonius_api_client.api.assets.fields.Fields._get()

Return type

dict

axonius_api_client.parsers.fields.is_complex(field)[source]

Determine if a field is complex from its schema.

Parameters

field (dict) – field schema to parse

Return type

bool

axonius_api_client.parsers.fields.is_root(name, names)[source]

Determine if a field is a root field.

Parameters
  • name (str) – name of current field

  • names (typing.List[str]) – names of all fields

Return type

bool

axonius_api_client.parsers.fields.parse_complex(field)[source]

Parse a complex field schema.

Parameters

field (dict) – complex field schema

axonius_api_client.parsers.fields.parse_schemas(adapter_name_raw, adapter_name, adapter_prefix, adapter_title, all_field, raw_fields, agg_base_names=None, raw_data_feature=False)[source]

Parse field schemas for an adapter.

Parameters
  • adapter_name_raw (str) – raw name of current adapter (aws_adapter)

  • adapter_name (str) – user friendly name of current adapter (aws)

  • adapter_prefix (str) – fully qualified prefix of adapter (specific_data.data or adapters_data.aws_adapter)

  • adapter_title (str) – user friendly title of adapter

  • all_field (str) – name to use for all field schema

  • raw_fields (typing.List[dict]) – raw unparsed fields for current adapter

  • agg_base_names (typing.Optional[typing.List[str]]) – used to determine if a field is aggregated or not

  • raw_data_feature (bool) –

Return type

typing.List[dict]

axonius_api_client.parsers.fields.schema_custom(name, **kwargs)[source]

Create a custom field schema.

Parameters

name (str) –

Return type

dict