Skip to main content

Dome9 SDK for Python

Project description

Dome9 SDK

Documentation Status PyPI

Usage

from dome9 import Dome9

dome9 = Dome9(key='xxxxxx', secret='yyyyyyy')

rulesets = dome9.list_rulesets()

Authentication

There are two ways to authenticate Dome9SDK:

  • SDK Arguments: Passing variables to Dome9SDK Dome9SDK(key='xxxxxx', secret='yyyyyyy')
  • Environment variables: Setting your credentials to DOME9_ACCESS_KEY and DOME9_SECRET_KEY environment variables

Example:

export DOME9_ACCESS_KEY='xxxxxxxxxxxxxxxxxxxx'
export DOME9_SECRET_KEY='yyyyyyyyyyyyyyyyyyyy'
echo -e "import dome9sdk \nprint(dome9sdk.Dome9SDK().list_cloud_accounts())" | python

Agile

import json
from dome9 import Dome9

cloudAccount = '00000-00000-00000-00000'

d9 = Dome9()

rulesetTemplate = {}
with open('ruleset','r') as f:
    rulesetTemplate = json.loads(f.read())

# Step 1. Create ruleset
ruleset = d9.create_ruleset(rulesetTemplate)

# Step 2. Run Assessment
results = d9.run_assessment(rulesetId=ruleset['id'], cloudAccountId=cloudAccount)

# Step 3. Delete ruleset
ruleset = d9.delete_ruleset(ruleset['id'])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dome9, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size dome9-0.3-py2-none-any.whl (8.4 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size dome9-0.3.tar.gz (8.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page