Subscriptions

Table of Contents

Client

class Subscriptions.Client

A client object representing ‘Subscriptions’ Service:

import almdrlib

client = almdrlib.client('subscriptions')

Available methods:

get_entitlements(**kwargs)

Return entitlements for the customer

Request Syntax

response = client.get_entitlements(
    account_id='string'
    filter_bundles='true'|'false'
    product_family='assess'|'detect'|'respond'|'cloud_insight'|'threat_manager'|'log_manager'|'active_watch_premier'|'web_security_managed'|'cloud_defender'|'ids_data_retention'|'log_data_retention'|'log_review'
    status='string'
)
Parameters
  • account_id (string) –

    [REQUIRED]

    AIMS Account ID

  • filter_bundles (string) –

    Filter the entitlements base on the status

    Valid values: true, false

    Default: false

  • product_family (string) –

    Filter the entitlements base on the product_family

    Valid values: assess, detect, respond, cloud_insight, threat_manager, log_manager, active_watch_premier, web_security_managed, cloud_defender, ids_data_retention, log_data_retention, log_review

  • status (string) – Filter the entitlements base on the status

Return type

dict

Returns

Response Syntax

{
    'account_id': 'string',
    'entitlements': [
        {
            'created': {
                'at': 'number',
                'by': 'string'
            },
            'end_date': 'number',
            'product_family': 'string',
            'status': 'active'|'canceled',
            'subscription_id': 'string',
            'updated': {
                'at': 'number',
                'by': 'string'
            },
            'usage_based': 'False|True',
            'value': 'number',
            'value_type': 'string'
        }
    ],
    'legacy_features': [
        'string'
    ]
}

Response Definitions

  • account_id (string) –

    AIMS Account

  • entitlements (list) –

    • (dict) –

      • created (dict) –

        Creation stamp

        • at (number) –

          When this object was created

        • by (string) –

          ID of the user who created this object

      • end_date (number) –

      • product_family (string) –

        The product family of the entitlement

      • status (string) –

        The status of the entitlement

        Valid values: active, canceled

      • subscription_id (string) –

        Subscription identifier of the entitlement

      • updated (dict) –

        Modification stamp

        • at (number) –

          When the object was updated last

        • by (string) –

          ID of the user who updated this object

      • usage_based (boolean) –

        An entitlement is usage-based

      • value (number) –

        Entitlement limit value

      • value_type (string) –

        Entitlement limit value type

  • legacy_features (list) –

    List of Defender’s legacy features for the account

    • (string) –

get_list_of_accounts_ids(**kwargs)

Returns a list of account ids entitled to a provided product family

Request Syntax

response = client.get_list_of_accounts_ids(
    active='False|True'
    product_family='assess'|'detect'|'respond'|'cloud_insight'|'threat_manager'|'log_manager'|'active_watch_premier'|'web_security_managed'|'cloud_defender'|'ids_data_retention'|'log_data_retention'|'log_review'
    subscription_type='string'
)
Parameters
  • active (boolean) –

    Filter out inactive account ids based on the status

    Default: False

  • product_family (string) –

    [REQUIRED]

    Valid values: assess, detect, respond, cloud_insight, threat_manager, log_manager, active_watch_premier, web_security_managed, cloud_defender, ids_data_retention, log_data_retention, log_review

  • subscription_type (string) – Only check entitlements derived from a subscription with the provided type

Return type

dict

Returns

Response Syntax

{
    'account_ids': [
        'string'
    ]
}

Response Definitions

  • account_ids (list) –

    • (string) –

get_subscription(**kwargs)

Return a subscription for the provided customer

Request Syntax

response = client.get_subscription(
    account_id='string'
    subscription_id='string'
)
Parameters
  • account_id (string) –

    [REQUIRED]

    AIMS Account ID

  • subscription_id (string) –

    [REQUIRED]

    ID of subscription

Return type

dict

Returns

Response Syntax

{
    'account_id': 'string',
    'billing_id': 'string',
    'created': {
        'at': 'number',
        'by': 'string'
    },
    'entitlements': [
        {
            'created': {
                'at': 'number',
                'by': 'string'
            },
            'end_date': 'number',
            'product_family': 'string',
            'status': 'active'|'canceled',
            'subscription_id': 'string',
            'updated': {
                'at': 'number',
                'by': 'string'
            },
            'usage_based': 'False|True',
            'value': 'number',
            'value_type': 'string'
        }
    ],
    'id': 'string',
    'status': 'string',
    'type': 'string',
    'updated': {
        'at': 'number',
        'by': 'string'
    }
}

Response Definitions

  • account_id (string) –

    Account ID of the subscription

  • billing_id (string) –

    Billing ID of the subscription

  • created (dict) –

    • at (number) –

      When this object was created

    • by (string) –

      ID of the user who created this object

  • entitlements (list) –

    • (dict) –

      • created (dict) –

        Creation stamp

        • at (number) –

          When this object was created

        • by (string) –

          ID of the user who created this object

      • end_date (number) –

      • product_family (string) –

        The product family of the entitlement

      • status (string) –

        The status of the entitlement

        Valid values: active, canceled

      • subscription_id (string) –

        Subscription identifier of the entitlement

      • updated (dict) –

        Modification stamp

        • at (number) –

          When the object was updated last

        • by (string) –

          ID of the user who updated this object

      • usage_based (boolean) –

        An entitlement is usage-based

      • value (number) –

        Entitlement limit value

      • value_type (string) –

        Entitlement limit value type

  • id (string) –

    Id of the subscription

  • status (string) –

    status of the subscription

  • type (string) –

    type of subscription

  • updated (dict) –

    • at (number) –

      When the object was updated last

    • by (string) –

      ID of the user who updated this object

get_subscriptions(**kwargs)

Return Subscriptions for the provided customer

Request Syntax

response = client.get_subscriptions(
    account_id='string'
)
Parameters

account_id (string) –

[REQUIRED]

AIMS Account ID

Return type

dict

Returns

Response Syntax

{
    'subscriptions': [
        {
            'account_id': 'string',
            'billing_id': 'string',
            'created': {
                'at': 'number',
                'by': 'string'
            },
            'entitlements': [
                {
                    'created': {
                        'at': 'number',
                        'by': 'string'
                    },
                    'end_date': 'number',
                    'product_family': 'string',
                    'status': 'active'|'canceled',
                    'subscription_id': 'string',
                    'updated': {
                        'at': 'number',
                        'by': 'string'
                    },
                    'usage_based': 'False|True',
                    'value': 'number',
                    'value_type': 'string'
                }
            ],
            'id': 'string',
            'status': 'string',
            'type': 'string',
            'updated': {
                'at': 'number',
                'by': 'string'
            }
        }
    ]
}

Response Definitions

  • subscriptions (list) –

    • (dict) –

      • account_id (string) –

        Account ID of the subscription

      • billing_id (string) –

        Billing ID of the subscription

      • created (dict) –

        • at (number) –

          When this object was created

        • by (string) –

          ID of the user who created this object

      • entitlements (list) –

        • (dict) –

          • created (dict) –

            Creation stamp

            • at (number) –

              When this object was created

            • by (string) –

              ID of the user who created this object

          • end_date (number) –

          • product_family (string) –

            The product family of the entitlement

          • status (string) –

            The status of the entitlement

            Valid values: active, canceled

          • subscription_id (string) –

            Subscription identifier of the entitlement

          • updated (dict) –

            Modification stamp

            • at (number) –

              When the object was updated last

            • by (string) –

              ID of the user who updated this object

          • usage_based (boolean) –

            An entitlement is usage-based

          • value (number) –

            Entitlement limit value

          • value_type (string) –

            Entitlement limit value type

      • id (string) –

        Id of the subscription

      • status (string) –

        status of the subscription

      • type (string) –

        type of subscription

      • updated (dict) –

        • at (number) –

          When the object was updated last

        • by (string) –

          ID of the user who updated this object