Skip to content

Commit a82bd31

Browse files
committed
治理检测新增第一版OpenAPI
1 parent 1038fcb commit a82bd31

25 files changed

+882
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2024-08-23 Version: 1.0.0
2+
治理检测新增第一版OpenAPI
3+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 1999-present Alibaba Group Holding Ltd.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include LICENSE README.rst ChangeLog.txt
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
=============================================================
2+
aliyun-python-sdk-governance
3+
=============================================================
4+
5+
.. This is the governance module of Aliyun Python SDK.
6+
7+
Aliyun Python SDK is the official software development kit. It makes things easy to integrate your Python application, library, or script with Aliyun services.
8+
9+
This module works on Python versions:
10+
11+
2.6.5 and greater
12+
13+
**Documentation:**
14+
15+
Please visit `http://develop.aliyun.com/sdk/python <http://develop.aliyun.com/sdk/python>`_
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '1.0.0'
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# # Licensed to the Apache Software Foundation (ASF) under one
2+
# # or more contributor license agreements. See the NOTICE file
3+
# # distributed with this work for additional information
4+
# # regarding copyright ownership. The ASF licenses this file
5+
# # to you under the Apache License, Version 2.0 (the
6+
# # "License"); you may not use this file except in compliance
7+
# # with the License. You may obtain a copy of the License at
8+
# #
9+
# #
10+
# # http://www.apache.org/licenses/LICENSE-2.0
11+
# #
12+
# #
13+
# # Unless required by applicable law or agreed to in writing,
14+
# # software distributed under the License is distributed on an
15+
# # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# # KIND, either express or implied. See the License for the
17+
# # specific language governing permissions and limitations
18+
# # under the License.
19+
20+
21+
class EndpointData():
22+
def __init__(self):
23+
self.endpoint_map = {}
24+
self.endpoint_regional = "regional"
25+
26+
def getEndpointMap(self):
27+
return self.endpoint_map
28+
29+
def getEndpointRegional(self):
30+
return self.endpoint_regional
31+
32+
33+
endpoint_data = EndpointData()

aliyun-python-sdk-governance/aliyunsdkgovernance/request/__init__.py

Whitespace-only changes.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
from aliyunsdkgovernance.endpoint import endpoint_data
22+
23+
class BatchEnrollAccountsRequest(RpcRequest):
24+
25+
def __init__(self):
26+
RpcRequest.__init__(self, 'governance', '2021-01-20', 'BatchEnrollAccounts','governance')
27+
self.set_method('POST')
28+
29+
if hasattr(self, "endpoint_map"):
30+
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
31+
if hasattr(self, "endpoint_regional"):
32+
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
33+
34+
def get_BaselineId(self): # String
35+
return self.get_query_params().get('BaselineId')
36+
37+
def set_BaselineId(self, BaselineId): # String
38+
self.add_query_param('BaselineId', BaselineId)
39+
def get_BaselineItems(self): # Array
40+
return self.get_query_params().get('BaselineItems')
41+
42+
def set_BaselineItems(self, BaselineItems): # Array
43+
for index1, value1 in enumerate(BaselineItems):
44+
if value1.get('Name') is not None:
45+
self.add_query_param('BaselineItems.' + str(index1 + 1) + '.Name', value1.get('Name'))
46+
if value1.get('Skip') is not None:
47+
self.add_query_param('BaselineItems.' + str(index1 + 1) + '.Skip', value1.get('Skip'))
48+
if value1.get('Config') is not None:
49+
self.add_query_param('BaselineItems.' + str(index1 + 1) + '.Config', value1.get('Config'))
50+
if value1.get('Version') is not None:
51+
self.add_query_param('BaselineItems.' + str(index1 + 1) + '.Version', value1.get('Version'))
52+
def get_Accounts(self): # Array
53+
return self.get_query_params().get('Accounts')
54+
55+
def set_Accounts(self, Accounts): # Array
56+
for index1, value1 in enumerate(Accounts):
57+
if value1.get('AccountUid') is not None:
58+
self.add_query_param('Accounts.' + str(index1 + 1) + '.AccountUid', value1.get('AccountUid'))
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
from aliyunsdkgovernance.endpoint import endpoint_data
22+
23+
class CreateAccountFactoryBaselineRequest(RpcRequest):
24+
25+
def __init__(self):
26+
RpcRequest.__init__(self, 'governance', '2021-01-20', 'CreateAccountFactoryBaseline','governance')
27+
self.set_method('POST')
28+
29+
if hasattr(self, "endpoint_map"):
30+
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
31+
if hasattr(self, "endpoint_regional"):
32+
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
33+
34+
def get_Description(self): # String
35+
return self.get_query_params().get('Description')
36+
37+
def set_Description(self, Description): # String
38+
self.add_query_param('Description', Description)
39+
def get_BaselineName(self): # String
40+
return self.get_query_params().get('BaselineName')
41+
42+
def set_BaselineName(self, BaselineName): # String
43+
self.add_query_param('BaselineName', BaselineName)
44+
def get_BaselineItems(self): # Array
45+
return self.get_query_params().get('BaselineItems')
46+
47+
def set_BaselineItems(self, BaselineItems): # Array
48+
for index1, value1 in enumerate(BaselineItems):
49+
if value1.get('Name') is not None:
50+
self.add_query_param('BaselineItems.' + str(index1 + 1) + '.Name', value1.get('Name'))
51+
if value1.get('Config') is not None:
52+
self.add_query_param('BaselineItems.' + str(index1 + 1) + '.Config', value1.get('Config'))
53+
if value1.get('Version') is not None:
54+
self.add_query_param('BaselineItems.' + str(index1 + 1) + '.Version', value1.get('Version'))
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
from aliyunsdkgovernance.endpoint import endpoint_data
22+
23+
class DeleteAccountFactoryBaselineRequest(RpcRequest):
24+
25+
def __init__(self):
26+
RpcRequest.__init__(self, 'governance', '2021-01-20', 'DeleteAccountFactoryBaseline','governance')
27+
self.set_method('POST')
28+
29+
if hasattr(self, "endpoint_map"):
30+
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
31+
if hasattr(self, "endpoint_regional"):
32+
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
33+
34+
def get_BaselineId(self): # String
35+
return self.get_query_params().get('BaselineId')
36+
37+
def set_BaselineId(self, BaselineId): # String
38+
self.add_query_param('BaselineId', BaselineId)

0 commit comments

Comments
 (0)