Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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'])

CDO Telefonica Copyright (c) Telefonica Digital España, 2019

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.2.1
Filename, size File type Python version Upload date Hashes
Filename, size dome9-0.2.1-py2-none-any.whl (8.3 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size dome9-0.2.1.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page