LoginSignup
1
1

More than 5 years have passed since last update.

Bluemix Infrastructure API(Accountサービス)

Last updated at Posted at 2017-09-05

Accountデータ型
https://softlayer.github.io/reference/datatypes/SoftLayer_Account/

Accountサービス・メゾッド
https://softlayer.github.io/reference/services/SoftLayer_Account/

(1) チケット情報の取得
getTickets http://sldn.softlayer.com/reference/services/softlayer_account/getTickets

コード

# SoftLayerモジュールを読み込む
import SoftLayer

# ppritモジュールからpprint関数を読み込む
from pprint import pprint

# ポータルのアカウント > ユーザ > ユーザー・プロファイルの編集でAPIアクセス情報を確認し入力
username = 'xxxxxxxx'
key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

# 認証情報を渡すことで他のメゾッドで要求されるauthenticate引数は不要に
client = SoftLayer.Client(username=username, api_key=key)

tickets = client['Account'].getTickets(mask = 'assignedAgentCount, \
assignedAgents,\
attachedAdditionalEmailCount,\
attachedAdditionalEmails,\
attachedDedicatedHostCount,\
attachedDedicatedHosts,\
attachedFileCount,\
attachedFiles,\
attachedHardware,\
attachedResourceCount,\
attachedVirtualGuestCount,\
attachedVirtualGuests,\
awaitingUserResponseFlag,\
cancellationRequest,\
employeeAttachments,\
employeeAttachmentCount,\
group,\
invoiceItems,\
lastActivity,\
serverAdministrationRefundInvoice,\
stateCount')

# 1つのチケット情報を表示
pprint(tickets[0])

アカウント登録(1ヶ月間無料トライアル付き: 要クレジット登録)
https://ibm.biz/Bdji5q

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