spotinst-sdk-python | Spotinst SDK for the Python programming language
kandi X-RAY | spotinst-sdk-python Summary
kandi X-RAY | spotinst-sdk-python Summary
The official Spotinst SDK for the Python programming language.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Roll a group
- Remove missing keys from a dictionary
- Recursively recursively convert all the values in the dict
- Returns True if arg is a sequence
- Update an Elastigroup
- Send a PUT request to the spotinst API
- Detaches Elastigroup instances from a group
- Build a query params dictionary
- Detach instances from a group
- Updates an elastigroup
- Create a function
- Send POST request to spotinst API
- Create an application
- Create an Elastigroup
- Create an Environment
- Creates an Elastigroup
- Get aggregated cluster cost
- Set credentials
- Validates credentials
- Set AWS credentials
- Validate credentials
- Returns the cost per group
- Get the activity of the group
- Get the deployment status
- Stop a deployment
- Returns the activity for the given group
spotinst-sdk-python Key Features
spotinst-sdk-python Examples and Code Snippets
session = SpotinstSession(auth_token='foo', account_id='bar')
export SPOTINST_TOKEN=foo
export SPOTINST_ACCOUNT=bar
[default]
token = foo
account = bar
[default]
token = foo
account = bar
[dev]
token = foo2
account = bar2
[prod]
token =
from spotinst_sdk2 import SpotinstSession
from spotinst_sdk2.models.ocean.aws import *
session = SpotinstSession()
client = session.client("ocean_aws")
################ Compute ################
launch_specification = LaunchSpecifications(security_g
session = SpotinstSession()
eg_client = session.client("elastigroup_aws")
ocean_client = session.client("ocean")
Community Discussions
Trending Discussions on spotinst-sdk-python
QUESTION
I need to change AMI image in Spotinst Elasticgroup and to respinup active instances. How to implement it with the spotinst-sdk-python
having SPOTINST_TOKEN
and SPOTINST_ACCOUNT
env variables?
ANSWER
Answered 2021-Mar-26 at 07:26Here is an example CLI tool leveraging the spotinst_sdk2 for python. This tool can do the following:
- get/list all EG IDs
- update an AMI for an EG
- roll an EG.
python3 roll_eg.py --help
python3 roll_eg.py get
python3 roll_eg.py roll -a ami-e3fdd999 sig-1234567
Script Location: https://github.com/spotinst/spotinst-examples/tree/master/Utilities/AWS/Update%20AMI%20and%20roll%20Elastigroup
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install spotinst-sdk-python
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page