Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scpapi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scpapi

API client for Samsung Cloud Platform

  • 0.0.3
  • PyPI
  • Socket score

Maintainers
1

Prerequisite

Python 3.9+

example

import json
from scpapi.virtual_server import VirtualServer


virtual_server = VirtualServer(
    project_id='PROJECT-XXXXXXXXXXXXXXXXXXXXXX',
    access_key='XXXXXXXXXXXXXXXXXXXX',
    secret_key='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
)

### List of Virtual Server ###
vm_list = json.loads(virtual_server.list().text)
print(vm_list['contents'])

### Create a Virtual Server ###
virtual_server_body = {
    'virtualServerName': 'slurm-head',
    'blockStorage': {
        'blockStorageName': 'root',
        'diskSize': 100,
        'encryptEnabled': False,
        'diskType': 'SSD'
    },
    'imageId': 'IMAGE-9DNNuuBDrMcKq8kfr29xjm',
    'nic': {
        'subnetId': 'SUBNET-lr6CTHHQs2mQNdIZ9VK2-m',
        'natEnabled': True,
        'publicIpId' : 'PUBLIC_IP-avsFAjQPrNmJ--JFfLW9ei'
    },
    'deletionProtectionEnabled': False,
    'securityGroupIds': ['FIREWALL_SECURITY_GROUP-rj5TNm2VsXcOYbM04lvWah'],
    'serverType': 's1v2m4',
    'serviceZoneId': 'ZONE-FClPklmysrhRpknZ6DaI2f',
    'serverGroupId': 'SERVICE-Aj3ONjl2qEkTs_7ccYAPjo',
    'tags': [
        {'tagKey': 'cluster-name', 'tagValue': 'slurm-cluster'},
    ],
    'keyPairId': 'KEY_PAIR-t4ZeTus1q2lHpYZ1yICLEa'
}

print(virtual_server.create(body=virtual_server_body).text)

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc