Connectors¶
Table of Contents
Client¶
-
class
Connectors.
Client
¶ A client object representing ‘Connectors’ Service:
import almdrlib client = almdrlib.client('connectors')
Available methods:
-
create_connection
(**kwargs)¶ Create connection
Request Syntax
response = client.create_connection( account_id='string' data='dict' dry_run='False|True' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
data (dict) – Valid Integration Connection object
dry_run (boolean) – When present and set to
true
just tests the connection without creating a connection instance.
- Return type
dict
- Returns
Response Syntax
'dict'
Response Definitions
-
create_connection_target
(**kwargs)¶ Create connection target
Request Syntax
response = client.create_connection_target( account_id='string' data='dict' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
data (dict) – Valid Connection Target object
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions
-
delete_connection
(**kwargs)¶ Deletes existing connection
Request Syntax
response = client.delete_connection( account_id='string' id='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
id (uuid) –
[REQUIRED]
Integration Connection ID
- Returns
None
-
delete_connection_target
(**kwargs)¶ Deletes existing connection target
Request Syntax
response = client.delete_connection_target( account_id='string' id='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
id (uuid) –
[REQUIRED]
Connection Target ID
- Returns
None
-
get_account_connection_target_definition
(**kwargs)¶ Returns connection target definition
Request Syntax
response = client.get_account_connection_target_definition( account_id='string' name='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
name (string) – [REQUIRED]
- Return type
dict
- Returns
Response Syntax
{ 'active': 'False|True', 'display_name': 'string', 'form': { 'controls': {} }, 'icon': 'string', 'name': 'string' }
Response Definitions
active (boolean) –
Active status of the connection
Default:
True
display_name (string) –
Connection target isplay name
form (dict) – [REQUIRED]
UI Rendering form
controls (dict) –
UI Form Controls object
icon (string) –
An icon from Alert Logic’s library of icons to use to display an integration
name (string) –
Connection target name
-
get_account_integration_type
(**kwargs)¶ Returns account-specific schema of parameters required to create a connection
Request Syntax
response = client.get_account_integration_type( account_id='string' name='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
name (string) – [REQUIRED]
- Return type
dict
- Returns
Response Syntax
{ 'category': 'string', 'description': 'string', 'display_name': 'string', 'dry_run_message': 'string', 'form': { 'controls': {} }, 'icon': 'string', 'name': 'string', 'payload_templates': { 'health': { 'default': 'string', 'jq': 'string' }, 'incident': { 'default': 'string', 'jq': 'string' }, 'observation': { 'default': 'string', 'jq': 'string' }, 'scheduled_report': { 'default': 'string', 'jq': 'string' } }, 'subject_templates': { 'health': { 'default': 'string', 'jq': 'string' }, 'incident': { 'default': 'string', 'jq': 'string' }, 'observation': { 'default': 'string', 'jq': 'string' }, 'scheduled_report': { 'default': 'string', 'jq': 'string' } } }
Response Definitions
category (string) –
Business category an integration type belongs to
description (string) –
Integration type description
display_name (string) –
Integration type display name
dry_run_message (string) –
form (dict) – [REQUIRED]
UI Rendering form
controls (dict) –
UI Form Controls object
icon (string) –
An icon from Alert Logic’s library of icons to use to display an integration
name (string) –
Integration type name.
payload_templates (dict) –
DefaultTemplates Object Schema
health (dict) –
Health Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
incident (dict) –
Incident Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
observation (dict) –
Observation Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
scheduled_report (dict) –
Scheduled Report Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
subject_templates (dict) –
DefaultTemplates Object Schema
health (dict) –
Health Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
incident (dict) –
Incident Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
observation (dict) –
Observation Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
scheduled_report (dict) –
Scheduled Report Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
-
get_connection
(**kwargs)¶ Returns Connection Information
Request Syntax
response = client.get_connection( account_id='string' id='string' include_sample_payload='False|True' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
id (uuid) –
[REQUIRED]
Integration Connection ID
include_sample_payload (boolean) – Include sample payload in the result?
- Return type
dict
- Returns
Response Syntax
'dict'
Response Definitions
-
get_connection_by_id
(**kwargs)¶ Returns Connection Information
Request Syntax
response = client.get_connection_by_id( id='string' )
- Parameters
id (uuid) –
[REQUIRED]
Integration Connection ID
- Return type
dict
- Returns
Response Syntax
'dict'
Response Definitions
-
get_connection_target
(**kwargs)¶ Returns Connection Target Information
Request Syntax
response = client.get_connection_target( account_id='string' id='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
id (uuid) –
[REQUIRED]
Connection Target ID
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions
-
get_connection_target_definition
(**kwargs)¶ Returns connection target definition
Request Syntax
response = client.get_connection_target_definition( name='string' )
- Parameters
name (string) – [REQUIRED]
- Return type
dict
- Returns
Response Syntax
{ 'active': 'False|True', 'display_name': 'string', 'form': { 'controls': {} }, 'icon': 'string', 'name': 'string' }
Response Definitions
active (boolean) –
Active status of the connection
Default:
True
display_name (string) –
Connection target isplay name
form (dict) – [REQUIRED]
UI Rendering form
controls (dict) –
UI Form Controls object
icon (string) –
An icon from Alert Logic’s library of icons to use to display an integration
name (string) –
Connection target name
-
get_connection_target_full
(**kwargs)¶ Returns Connection Target Full Information
Request Syntax
response = client.get_connection_target_full( account_id='string' id='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
id (uuid) –
[REQUIRED]
Connection Target ID
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions
-
get_healthcheck
(**kwargs)¶ Check health status of the service.
Request Syntax
response = client.get_healthcheck( )
- Returns
None
-
get_integration_type
(**kwargs)¶ Returns JSON Schema of parameters required to create a connection
Request Syntax
response = client.get_integration_type( name='string' )
- Parameters
name (string) – [REQUIRED]
- Return type
dict
- Returns
Response Syntax
{ 'category': 'string', 'description': 'string', 'display_name': 'string', 'dry_run_message': 'string', 'form': { 'controls': {} }, 'icon': 'string', 'name': 'string', 'payload_templates': { 'health': { 'default': 'string', 'jq': 'string' }, 'incident': { 'default': 'string', 'jq': 'string' }, 'observation': { 'default': 'string', 'jq': 'string' }, 'scheduled_report': { 'default': 'string', 'jq': 'string' } }, 'subject_templates': { 'health': { 'default': 'string', 'jq': 'string' }, 'incident': { 'default': 'string', 'jq': 'string' }, 'observation': { 'default': 'string', 'jq': 'string' }, 'scheduled_report': { 'default': 'string', 'jq': 'string' } } }
Response Definitions
category (string) –
Business category an integration type belongs to
description (string) –
Integration type description
display_name (string) –
Integration type display name
dry_run_message (string) –
form (dict) – [REQUIRED]
UI Rendering form
controls (dict) –
UI Form Controls object
icon (string) –
An icon from Alert Logic’s library of icons to use to display an integration
name (string) –
Integration type name.
payload_templates (dict) –
DefaultTemplates Object Schema
health (dict) –
Health Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
incident (dict) –
Incident Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
observation (dict) –
Observation Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
scheduled_report (dict) –
Scheduled Report Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
subject_templates (dict) –
DefaultTemplates Object Schema
health (dict) –
Health Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
incident (dict) –
Incident Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
observation (dict) –
Observation Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
scheduled_report (dict) –
Scheduled Report Payload conversion object
default (string) –
default
(JSON) conversion templatejq (string) –
jq
conversion template
-
list_account_connection_targets_definitions
(**kwargs)¶ Returns definitions of supported connection targets
Request Syntax
response = client.list_account_connection_targets_definitions( account_id='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
- Return type
list
- Returns
Response Syntax
[ { 'active': 'False|True', 'display_name': 'string', 'form': { 'controls': {} }, 'icon': 'string', 'name': 'string' } ]
Response Definitions
(dict) –
Connection Target Definition
active (boolean) –
Active status of the connection
Default:
True
display_name (string) –
Connection target isplay name
form (dict) – [REQUIRED]
UI Rendering form
controls (dict) –
UI Form Controls object
icon (string) –
An icon from Alert Logic’s library of icons to use to display an integration
name (string) –
Connection target name
-
list_connection_targets
(**kwargs)¶ Returns a list of all connections targets for an account
Request Syntax
response = client.list_connection_targets( account_id='string' filter={} )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
filter (dict) – When present, list only connection targets with the specified values of the given fields. Multiple values can be separated using comma:
param=foo,bar
.
- Return type
list
- Returns
Response Syntax
[ {} ]
Response Definitions
(dict) –
-
list_connection_targets_definitions
(**kwargs)¶ Returns definitions of supported connection targets
Request Syntax
response = client.list_connection_targets_definitions( )
- Return type
list
- Returns
Response Syntax
[ { 'active': 'False|True', 'display_name': 'string', 'form': { 'controls': {} }, 'icon': 'string', 'name': 'string' } ]
Response Definitions
(dict) –
Connection Target Definition
active (boolean) –
Active status of the connection
Default:
True
display_name (string) –
Connection target isplay name
form (dict) – [REQUIRED]
UI Rendering form
controls (dict) –
UI Form Controls object
icon (string) –
An icon from Alert Logic’s library of icons to use to display an integration
name (string) –
Connection target name
-
list_connection_targets_full
(**kwargs)¶ Returns A List Of Connection Targets With Full Information
Request Syntax
response = client.list_connection_targets_full( account_id='string' filter={} )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
filter (dict) – When present, list only connection targets with the specified values of the given fields. Multiple values can be separated using comma:
param=foo,bar
.
- Return type
list
- Returns
Response Syntax
[ 'None' ]
Response Definitions
-
list_connections
(**kwargs)¶ Returns a list of all integration connections for an account
Request Syntax
response = client.list_connections( account_id='string' connection_target_id='string' include_sample_payload='False|True' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
connection_target_id (string) – Filter by the connection target id
include_sample_payload (boolean) – Include sample payload in the result?
- Return type
list
- Returns
Response Syntax
[ 'dict' ]
Response Definitions
(dict) –
-
list_integration_types
(**kwargs)¶ Returns a list of supported integration types
Request Syntax
response = client.list_integration_types( category='email'|'webhook' )
- Parameters
category (string) –
Filter by category
Valid values:
email
,webhook
- Return type
list
- Returns
Response Syntax
[ { 'category': 'string', 'description': 'string', 'display_name': 'string', 'icon': 'string', 'name': 'string' } ]
Response Definitions
(dict) –
IntegrationType just the fields important for listing
category (string) –
Business category an integration type belongs to
description (string) –
Integration type description
display_name (string) –
Integration type display name
icon (string) –
An icon from Alert Logic’s library of icons to use to display an integration
name (string) –
Integration type name.
-
list_payload_types
(**kwargs)¶ Returns a list of supported payload types
Request Syntax
response = client.list_payload_types( )
- Return type
list
- Returns
Response Syntax
[ { 'description': 'string', 'title': 'string', 'value': 'string' } ]
Response Definitions
(dict) –
description (string) –
Payload Type description
title (string) –
Payload Type display name
value (string) –
Payload Type name
-
migrate_to_connection_target
(**kwargs)¶ Migrates accounts connections to connection targets
Request Syntax
response = client.migrate_to_connection_target( account_id='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
- Return type
list
- Returns
Response Syntax
[ { 'account_id': 'string', 'auth_header': 'string', 'base_url': 'string', 'created': { 'at': 'integer', 'by': 'string' }, 'headers': 'string', 'id': 'string', 'modified': { 'at': 'integer', 'by': 'string' }, 'name': 'string', 'routing_key': 'string', 'secret_id': 'string', 'type': 'string' } ]
Response Definitions
(dict) –
Connection Target schema
account_id (string) –
auth_header (string) –
base_url (string) –
created (dict) –
ChangeRecord Object Schema
at (int32) –
Epoch Timestamp
by (uuid) –
User ID
headers (string) –
id (string) –
modified (dict) –
ChangeRecord Object Schema
at (int32) –
Epoch Timestamp
by (uuid) –
User ID
name (string) –
routing_key (string) –
secret_id (string) –
type (string) –
-
reenqueue_notification
(**kwargs)¶ Reenqueue the broken notifications from DLQ
Request Syntax
response = client.reenqueue_notification( )
- Return type
dict
- Returns
Response Syntax
{ 'reenqueued_num': 'integer' }
Response Definitions
reenqueued_num (integer) –
The number of reenqueued messages
-
send_notification
(**kwargs)¶ Send notification for the given connection
Request Syntax
response = client.send_notification( data={} id='string' sync='False|True' )
- Parameters
data (dict) – Payload data
id (uuid) –
[REQUIRED]
Integration Connection ID
sync (boolean) – The request should be syncronized (i. e. do not put the request to the queue and return the results right away)
- Return type
dict
- Returns
Response Syntax
'dict'
Response Definitions
-
update_connection
(**kwargs)¶ Updates existing connection information
Request Syntax
response = client.update_connection( account_id='string' data='dict' dry_run='False|True' id='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
data (dict) –
dry_run (boolean) – When present and set to
true
just tests the connection without updating an existing connection instance.id (uuid) –
[REQUIRED]
Integration Connection ID
- Return type
dict
- Returns
Response Syntax
{ 'id': 'string', 'modified': { 'at': 'integer', 'by': 'string' } }
Response Definitions
id (string) –
modified (dict) –
ChangeRecord Object Schema
at (int32) –
Epoch Timestamp
by (uuid) –
User ID
-
update_connection_target
(**kwargs)¶ Updates existing connection target
Request Syntax
response = client.update_connection_target( account_id='string' data='dict' id='string' )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
data (dict) –
id (uuid) –
[REQUIRED]
Connection Target ID
- Return type
dict
- Returns
Response Syntax
{}
Response Definitions