1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Bluemix Infrastructure API(SoftLayer.image)

1
Last updated at Posted at 2017-10-31

Manager
http://softlayer-api-python-client.readthedocs.io/en/latest/api/client/#getting-started

SoftLayer.image
http://softlayer-api-python-client.readthedocs.io/en/latest/api/managers/image/

(1) パブリックイメージを表示(list_public_imagesメゾッド)

import SoftLayer

from SoftLayer import ImageManager

username = ''
key = ''
    
client = SoftLayer.Client(username=username, api_key=key)

img = ImageManager(client)

img.list_public_images()

コメント版

# 前提 sudo pip install softlayerなどでsoftlayerモジュールをインストール済み

# SoftLayer API Overview 
# https://sldn.softlayer.com/article/SoftLayer-API-Overview

# SoftLayer API Python Client Documentation 
# https://media.readthedocs.org/pdf/softlayer-python/v3.0.1/softlayer-python.pdf

import SoftLayer

from SoftLayer import ImageManager

# ポータルにて「アカウント > ユーザ > ユーザー・プロファイルの編集」でAPIアクセス情報を確認し入力
username = 'xxxxxxxx'
key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    
# 認証情報を渡すことで他のメゾッドで要求されるauthenticate引数を省略可能
client = SoftLayer.Client(username=username, api_key=key)

# テンプレートイメージサービスを扱うためのクラスを作成
img = ImageManager(client)

# パブリックイメージを表示
img.list_public_images()
ポータルサイト
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?