Skip to content

Commit c516580

Browse files
author
金山云SDK
authored
Merge pull request KscSDK#74 from KscSDK/trunk
Trunk
2 parents c3f08d2 + 4a714a1 commit c516580

File tree

2 files changed

+176
-0
lines changed

2 files changed

+176
-0
lines changed

examples/epc.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/python
2+
3+
# -*- encoding:utf-8 -*-
4+
5+
import json,pprint
6+
from prettyprinter import prettyPrinter
7+
from kscore.session import get_session
8+
9+
if __name__ == "__main__":
10+
s = get_session()
11+
12+
region='cn-beijing-6'
13+
#region='cn-shanghai-2'
14+
epcClient = s.create_client("epc", region, use_ssl=True)
15+
allEpcs=epcClient.describe_epcs()
16+
17+
prettyPrinter().pprint(allEpcs)
18+
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
---
2+
version: '2.0'
3+
metadata:
4+
apiVersion: '2015-11-01'
5+
endpointPrefix: epc
6+
jsonVersion: '1.1'
7+
serviceFullName: epc Service
8+
signatureVersion: v4
9+
targetPrefix: epc
10+
protocol: query-json
11+
12+
operations:
13+
CreateEpc:
14+
name: CreateEpc
15+
http:
16+
method: GET
17+
DeleteEpc:
18+
name: DeleteEpc
19+
http:
20+
method: GET
21+
ModifyEpc:
22+
name: ModifyEpc
23+
http:
24+
method: GET
25+
DescribeEpcs:
26+
name: DescribeEpcs
27+
http:
28+
method: GET
29+
StartEpc:
30+
name: StartEpc
31+
http:
32+
method: GET
33+
StopEpc:
34+
name: StopEpc
35+
http:
36+
method: GET
37+
RebootEpc:
38+
name: RebootEpc
39+
http:
40+
method: GET
41+
ReinstallEpc:
42+
name: ReinstallEpc
43+
http:
44+
method: GET
45+
ReinstallCustomerEpc:
46+
name: ReinstallCustomerEpc
47+
http:
48+
method: GET
49+
CreateImage:
50+
name: CreateImage
51+
http:
52+
method: GET
53+
ModifyImage:
54+
name: ModifyImage
55+
http:
56+
method: GET
57+
DeleteImage:
58+
name: DeleteImage
59+
http:
60+
method: GET
61+
DescribeImages:
62+
name: DescribeImages
63+
http:
64+
method: GET
65+
ModifyNetworkInterfaceAttribute:
66+
name: ModifyNetworkInterfaceAttribute
67+
http:
68+
method: GET
69+
ModifyDns:
70+
name: ModifyDns
71+
http:
72+
method: GET
73+
ModifySecurityGroup:
74+
name: ModifySecurityGroup
75+
http:
76+
method: GET
77+
ImportKey:
78+
name: ImportKey
79+
http:
80+
method: GET
81+
DeleteKey:
82+
name: DeleteKey
83+
http:
84+
method: GET
85+
CreateKey:
86+
name: CreateKey
87+
http:
88+
method: GET
89+
DescribeKeys:
90+
name: DescribeKeys
91+
http:
92+
method: GET
93+
DescribePhysicalMonitor:
94+
name: DescribePhysicalMonitor
95+
http:
96+
method: GET
97+
CreateRemoteManagement:
98+
name: CreateRemoteManagement
99+
http:
100+
method: GET
101+
ModifyRemoteManagement:
102+
name: ModifyRemoteManagement
103+
http:
104+
method: GET
105+
GetDynamicCode:
106+
name: GetDynamicCode
107+
http:
108+
method: GET
109+
DescribeRemoteManagements:
110+
name: DescribeRemoteManagements
111+
http:
112+
method: GET
113+
DescribeEpcManagements:
114+
name: DescribeEpcManagements
115+
http:
116+
method: GET
117+
DescribeVpns:
118+
name: DescribeVpns
119+
http:
120+
method: GET
121+
DescribeCertificates:
122+
name: DescribeCertificates
123+
http:
124+
method: GET
125+
126+
shapes:
127+
Id:
128+
type: string #list/map/structure
129+
130+
Bool:
131+
type: bool
132+
133+
Int:
134+
type: int
135+
136+
DataTime:
137+
type: timestamp
138+
139+
Empty:
140+
type: structure
141+
members: {}
142+
documentation: ""
143+
144+
NonEmptyString:
145+
type: string
146+
min: 1
147+
148+
Message:
149+
type: string
150+
151+
InstanceId:
152+
type: structure
153+
required:
154+
- id
155+
members:
156+
id:
157+
shape: Id
158+
documentation: ""

0 commit comments

Comments
 (0)