release 3.0.41-rc source code for python

This commit is contained in:
Huaweicloud-SDK 2021-04-30 11:29:34 +08:00
parent 39ce15ba9d
commit 5c0e6db5de
140 changed files with 5413 additions and 3358 deletions

View File

@ -1,3 +1,81 @@
# 3.0.41-rc 2021-04-30
### HuaweiCloud SDK BCS
- _Features_
- Support interface `ListOpRecord`
- _Bug Fix_
- None
- _Change_
- None
### HuaweiCloud SDK DDS
- _Features_
- Support interfaces:
- `ShowShardingBalancer`
- `SetBalancerSwitch`
- `SetBalancerWindow`
- _Bug Fix_
- None
- _Change_
- None
### HuaweiCloud SDK HSS
- _Features_
- Support interface `ListHosts`
- _Bug Fix_
- None
- _Change_
- None
### HuaweiCloud SDK IAM
- _Features_
- None
- _Bug Fix_
- None
- _Change_
- Add optional values to request parameter `type` of the interface `ShowDomainQuota`:
- `assigment_group_mp`
- `assigment_agency_mp`
- `assigment_group_ep`
- `assigment_user_ep`
### HuaweiCloud SDK IoTDA
- _Features_
- None
- _Bug Fix_
- None
- _Change_
- Remove interfaces:
- `ListSubscriptions`
- `CreateSubscription`
- `UpdateSubscription`
- `ShowSubscription`
- `DeleteSubscription`
### HuaweiCloud SDK MPC
- _Features_
- None
- _Bug Fix_
- None
- _Change_
- Add request parameters `language`、`sky_switch` to the interface `CreateMpeCallBack`.
- Update optional values of request parameter `subtitle_type` of interface `CreateTranscodingTask`.
### HuaweiCloud SDK ProjectMan
- _Features_
- None
- _Bug Fix_
- None
- _Change_
- Add a field `project_code` to response body of the interface `ShowProjectInfoV4`.
# 3.0.40-rc 2021-04-15
### HuaweiCloud SDK RDS

View File

@ -1,3 +1,81 @@
# 3.0.41-rc 2021-04-30
### HuaweiCloud SDK BCS
- _新增特性_
- 新增支持查询异步操作结果的接口`ListOpRecord`
- _解决问题_
- 无
- _特性变更_
- 无
### HuaweiCloud SDK DDS
- _新增特性_
- 新增支持的接口
- 查询集群均衡设置 `ShowShardingBalancer`
- 设置集群均衡开关 `SetBalancerSwitch`
- 设置集群均衡活动时间窗 `SetBalancerWindow`
- _解决问题_
- 无
- _特性变更_
- 无
### HuaweiCloud SDK HSS
- _新增特性_
- 新增支持查询弹性云服务器状态列表的接口`ListHosts`
- _解决问题_
- 无
- _特性变更_
- 无
### HuaweiCloud SDK IAM
- _新增特性_
- 无
- _解决问题_
- 无
- _特性变更_
- 查询账号配额接口`ShowDomainQuota`的请求参数`type`增加可选值:
- `assigment_group_mp`
- `assigment_agency_mp`
- `assigment_group_ep`
- `assigment_user_ep`
### HuaweiCloud SDK IoTDA
- _新增特性_
- 无
- _解决问题_
- 无
- _特性变更_
- 下线订阅管理相关接口:
- `ListSubscriptions`
- `CreateSubscription`
- `UpdateSubscription`
- `ShowSubscription`
- `DeleteSubscription`
### HuaweiCloud SDK MPC
- _新增特性_
- 无
- _解决问题_
- 无
- _特性变更_
- 接口`CreateMpeCallBack`新增请求参数`language`、`sky_switch`
- 接口`CreateTranscodingTask`的请求参数`subtitle_type`可选值调整为`0`、`1`、`2`
### HuaweiCloud SDK ProjectMan
- _新增特性_
- 无
- _解决问题_
- 无
- _特性变更_
- 获取项目详情接口`ShowProjectInfoV4`的响应体新增字段`project_code`
# 3.0.40-rc 2021-04-15
### HuaweiCloud SDK RDS

View File

@ -21,7 +21,7 @@
from setuptools import setup, find_packages
NAME = "huaweicloudsdkexample"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkaom"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkapig"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkas"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -73,6 +73,8 @@ from huaweicloudsdkbcs.v2.model.list_members_request import ListMembersRequest
from huaweicloudsdkbcs.v2.model.list_members_response import ListMembersResponse
from huaweicloudsdkbcs.v2.model.list_notifications_request import ListNotificationsRequest
from huaweicloudsdkbcs.v2.model.list_notifications_response import ListNotificationsResponse
from huaweicloudsdkbcs.v2.model.list_op_record_request import ListOpRecordRequest
from huaweicloudsdkbcs.v2.model.list_op_record_response import ListOpRecordResponse
from huaweicloudsdkbcs.v2.model.list_quotas_request import ListQuotasRequest
from huaweicloudsdkbcs.v2.model.list_quotas_response import ListQuotasResponse
from huaweicloudsdkbcs.v2.model.member import Member
@ -82,14 +84,18 @@ from huaweicloudsdkbcs.v2.model.metric_data_points import MetricDataPoints
from huaweicloudsdkbcs.v2.model.metric_demision import MetricDemision
from huaweicloudsdkbcs.v2.model.metric_item_result_api import MetricItemResultAPI
from huaweicloudsdkbcs.v2.model.node import Node
from huaweicloudsdkbcs.v2.model.node_orgs import NodeOrgs
from huaweicloudsdkbcs.v2.model.node_info import NodeInfo
from huaweicloudsdkbcs.v2.model.notification_list import NotificationList
from huaweicloudsdkbcs.v2.model.obs_info import OBSInfo
from huaweicloudsdkbcs.v2.model.op_id_res import OpIdRes
from huaweicloudsdkbcs.v2.model.oprecord_cluster import OprecordCluster
from huaweicloudsdkbcs.v2.model.org import Org
from huaweicloudsdkbcs.v2.model.org_peer import OrgPeer
from huaweicloudsdkbcs.v2.model.organization_v2 import OrganizationV2
from huaweicloudsdkbcs.v2.model.peer_address import PeerAddress
from huaweicloudsdkbcs.v2.model.peer_info import PeerInfo
from huaweicloudsdkbcs.v2.model.process_info import ProcessInfo
from huaweicloudsdkbcs.v2.model.record_detail_info import RecordDetailInfo
from huaweicloudsdkbcs.v2.model.resource import Resource
from huaweicloudsdkbcs.v2.model.sfs_info import SfsInfo
from huaweicloudsdkbcs.v2.model.show_blockchain_detail_request import ShowBlockchainDetailRequest
@ -99,7 +105,7 @@ from huaweicloudsdkbcs.v2.model.show_blockchain_nodes_response import ShowBlockc
from huaweicloudsdkbcs.v2.model.show_blockchain_status_request import ShowBlockchainStatusRequest
from huaweicloudsdkbcs.v2.model.show_blockchain_status_response import ShowBlockchainStatusResponse
from huaweicloudsdkbcs.v2.model.statistic_value import StatisticValue
from huaweicloudsdkbcs.v2.model.sub_detail import SubDetail
from huaweicloudsdkbcs.v2.model.update_instance_request import UpdateInstanceRequest
from huaweicloudsdkbcs.v2.model.update_instance_request_body import UpdateInstanceRequestBody
from huaweicloudsdkbcs.v2.model.update_instance_response import UpdateInstanceResponse

View File

@ -1009,6 +1009,77 @@ class BcsAsyncClient(Client):
request_type=request.__class__.__name__)
def list_op_record_async(self, request):
"""查询异步操作结果
查询异步操作结果
:param ListOpRecordRequest request
:return: ListOpRecordResponse
"""
return self.list_op_record_with_http_info(request)
def list_op_record_with_http_info(self, request):
"""查询异步操作结果
查询异步操作结果
:param ListOpRecordRequest request
:return: ListOpRecordResponse
"""
all_params = ['blockchain_id', 'operation_status', 'resource_type', 'operation_type', 'operation_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'blockchain_id' in local_var_params:
query_params.append(('blockchain_id', local_var_params['blockchain_id']))
if 'operation_status' in local_var_params:
query_params.append(('operation_status', local_var_params['operation_status']))
if 'resource_type' in local_var_params:
query_params.append(('resource_type', local_var_params['resource_type']))
if 'operation_type' in local_var_params:
query_params.append(('operation_type', local_var_params['operation_type']))
if 'operation_id' in local_var_params:
query_params.append(('operation_id', local_var_params['operation_id']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v2/{project_id}/operation/record',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListOpRecordResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_quotas_async(self, request):
"""查询配额

View File

@ -1009,6 +1009,77 @@ class BcsClient(Client):
request_type=request.__class__.__name__)
def list_op_record(self, request):
"""查询异步操作结果
查询异步操作结果
:param ListOpRecordRequest request
:return: ListOpRecordResponse
"""
return self.list_op_record_with_http_info(request)
def list_op_record_with_http_info(self, request):
"""查询异步操作结果
查询异步操作结果
:param ListOpRecordRequest request
:return: ListOpRecordResponse
"""
all_params = ['blockchain_id', 'operation_status', 'resource_type', 'operation_type', 'operation_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'blockchain_id' in local_var_params:
query_params.append(('blockchain_id', local_var_params['blockchain_id']))
if 'operation_status' in local_var_params:
query_params.append(('operation_status', local_var_params['operation_status']))
if 'resource_type' in local_var_params:
query_params.append(('resource_type', local_var_params['resource_type']))
if 'operation_type' in local_var_params:
query_params.append(('operation_type', local_var_params['operation_type']))
if 'operation_id' in local_var_params:
query_params.append(('operation_id', local_var_params['operation_id']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v2/{project_id}/operation/record',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListOpRecordResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_quotas(self, request):
"""查询配额

View File

@ -70,6 +70,8 @@ from huaweicloudsdkbcs.v2.model.list_members_request import ListMembersRequest
from huaweicloudsdkbcs.v2.model.list_members_response import ListMembersResponse
from huaweicloudsdkbcs.v2.model.list_notifications_request import ListNotificationsRequest
from huaweicloudsdkbcs.v2.model.list_notifications_response import ListNotificationsResponse
from huaweicloudsdkbcs.v2.model.list_op_record_request import ListOpRecordRequest
from huaweicloudsdkbcs.v2.model.list_op_record_response import ListOpRecordResponse
from huaweicloudsdkbcs.v2.model.list_quotas_request import ListQuotasRequest
from huaweicloudsdkbcs.v2.model.list_quotas_response import ListQuotasResponse
from huaweicloudsdkbcs.v2.model.member import Member
@ -79,14 +81,18 @@ from huaweicloudsdkbcs.v2.model.metric_data_points import MetricDataPoints
from huaweicloudsdkbcs.v2.model.metric_demision import MetricDemision
from huaweicloudsdkbcs.v2.model.metric_item_result_api import MetricItemResultAPI
from huaweicloudsdkbcs.v2.model.node import Node
from huaweicloudsdkbcs.v2.model.node_orgs import NodeOrgs
from huaweicloudsdkbcs.v2.model.node_info import NodeInfo
from huaweicloudsdkbcs.v2.model.notification_list import NotificationList
from huaweicloudsdkbcs.v2.model.obs_info import OBSInfo
from huaweicloudsdkbcs.v2.model.op_id_res import OpIdRes
from huaweicloudsdkbcs.v2.model.oprecord_cluster import OprecordCluster
from huaweicloudsdkbcs.v2.model.org import Org
from huaweicloudsdkbcs.v2.model.org_peer import OrgPeer
from huaweicloudsdkbcs.v2.model.organization_v2 import OrganizationV2
from huaweicloudsdkbcs.v2.model.peer_address import PeerAddress
from huaweicloudsdkbcs.v2.model.peer_info import PeerInfo
from huaweicloudsdkbcs.v2.model.process_info import ProcessInfo
from huaweicloudsdkbcs.v2.model.record_detail_info import RecordDetailInfo
from huaweicloudsdkbcs.v2.model.resource import Resource
from huaweicloudsdkbcs.v2.model.sfs_info import SfsInfo
from huaweicloudsdkbcs.v2.model.show_blockchain_detail_request import ShowBlockchainDetailRequest
@ -96,6 +102,6 @@ from huaweicloudsdkbcs.v2.model.show_blockchain_nodes_response import ShowBlockc
from huaweicloudsdkbcs.v2.model.show_blockchain_status_request import ShowBlockchainStatusRequest
from huaweicloudsdkbcs.v2.model.show_blockchain_status_response import ShowBlockchainStatusResponse
from huaweicloudsdkbcs.v2.model.statistic_value import StatisticValue
from huaweicloudsdkbcs.v2.model.sub_detail import SubDetail
from huaweicloudsdkbcs.v2.model.update_instance_request import UpdateInstanceRequest
from huaweicloudsdkbcs.v2.model.update_instance_request_body import UpdateInstanceRequestBody
from huaweicloudsdkbcs.v2.model.update_instance_response import UpdateInstanceResponse

View File

@ -23,17 +23,46 @@ class BatchAddPeersToChannelResponse(SdkResponse):
sensitive_list = []
openapi_types = {
'operation_id': 'str'
}
attribute_map = {
'operation_id': 'operation_id'
}
def __init__(self):
def __init__(self, operation_id=None):
"""BatchAddPeersToChannelResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._operation_id = None
self.discriminator = None
if operation_id is not None:
self.operation_id = operation_id
@property
def operation_id(self):
"""Gets the operation_id of this BatchAddPeersToChannelResponse.
操作记录id
:return: The operation_id of this BatchAddPeersToChannelResponse.
:rtype: str
"""
return self._operation_id
@operation_id.setter
def operation_id(self, operation_id):
"""Sets the operation_id of this BatchAddPeersToChannelResponse.
操作记录id
:param operation_id: The operation_id of this BatchAddPeersToChannelResponse.
:type: str
"""
self._operation_id = operation_id
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}

View File

@ -24,27 +24,32 @@ class CreateNewBlockchainResponse(SdkResponse):
openapi_types = {
'blockchain_id': 'str',
'blockchain_name': 'str'
'blockchain_name': 'str',
'operation_id': 'str'
}
attribute_map = {
'blockchain_id': 'blockchain_id',
'blockchain_name': 'blockchain_name'
'blockchain_name': 'blockchain_name',
'operation_id': 'operation_id'
}
def __init__(self, blockchain_id=None, blockchain_name=None):
def __init__(self, blockchain_id=None, blockchain_name=None, operation_id=None):
"""CreateNewBlockchainResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._blockchain_id = None
self._blockchain_name = None
self._operation_id = None
self.discriminator = None
if blockchain_id is not None:
self.blockchain_id = blockchain_id
if blockchain_name is not None:
self.blockchain_name = blockchain_name
if operation_id is not None:
self.operation_id = operation_id
@property
def blockchain_id(self):
@ -90,6 +95,28 @@ class CreateNewBlockchainResponse(SdkResponse):
"""
self._blockchain_name = blockchain_name
@property
def operation_id(self):
"""Gets the operation_id of this CreateNewBlockchainResponse.
操作ID
:return: The operation_id of this CreateNewBlockchainResponse.
:rtype: str
"""
return self._operation_id
@operation_id.setter
def operation_id(self, operation_id):
"""Sets the operation_id of this CreateNewBlockchainResponse.
操作ID
:param operation_id: The operation_id of this CreateNewBlockchainResponse.
:type: str
"""
self._operation_id = operation_id
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}

View File

@ -23,17 +23,46 @@ class DeleteBlockchainResponse(SdkResponse):
sensitive_list = []
openapi_types = {
'operation_id': 'str'
}
attribute_map = {
'operation_id': 'operation_id'
}
def __init__(self):
def __init__(self, operation_id=None):
"""DeleteBlockchainResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._operation_id = None
self.discriminator = None
if operation_id is not None:
self.operation_id = operation_id
@property
def operation_id(self):
"""Gets the operation_id of this DeleteBlockchainResponse.
操作记录id
:return: The operation_id of this DeleteBlockchainResponse.
:rtype: str
"""
return self._operation_id
@operation_id.setter
def operation_id(self, operation_id):
"""Sets the operation_id of this DeleteBlockchainResponse.
操作记录id
:param operation_id: The operation_id of this DeleteBlockchainResponse.
:type: str
"""
self._operation_id = operation_id
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}

View File

@ -0,0 +1,208 @@
# coding: utf-8
import pprint
import re
import six
class ListOpRecordRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'blockchain_id': 'str',
'operation_status': 'str',
'resource_type': 'str',
'operation_type': 'str',
'operation_id': 'str'
}
attribute_map = {
'blockchain_id': 'blockchain_id',
'operation_status': 'operation_status',
'resource_type': 'resource_type',
'operation_type': 'operation_type',
'operation_id': 'operation_id'
}
def __init__(self, blockchain_id=None, operation_status=None, resource_type=None, operation_type=None, operation_id=None):
"""ListOpRecordRequest - a model defined in huaweicloud sdk"""
self._blockchain_id = None
self._operation_status = None
self._resource_type = None
self._operation_type = None
self._operation_id = None
self.discriminator = None
if blockchain_id is not None:
self.blockchain_id = blockchain_id
if operation_status is not None:
self.operation_status = operation_status
if resource_type is not None:
self.resource_type = resource_type
if operation_type is not None:
self.operation_type = operation_type
if operation_id is not None:
self.operation_id = operation_id
@property
def blockchain_id(self):
"""Gets the blockchain_id of this ListOpRecordRequest.
:return: The blockchain_id of this ListOpRecordRequest.
:rtype: str
"""
return self._blockchain_id
@blockchain_id.setter
def blockchain_id(self, blockchain_id):
"""Sets the blockchain_id of this ListOpRecordRequest.
:param blockchain_id: The blockchain_id of this ListOpRecordRequest.
:type: str
"""
self._blockchain_id = blockchain_id
@property
def operation_status(self):
"""Gets the operation_status of this ListOpRecordRequest.
:return: The operation_status of this ListOpRecordRequest.
:rtype: str
"""
return self._operation_status
@operation_status.setter
def operation_status(self, operation_status):
"""Sets the operation_status of this ListOpRecordRequest.
:param operation_status: The operation_status of this ListOpRecordRequest.
:type: str
"""
self._operation_status = operation_status
@property
def resource_type(self):
"""Gets the resource_type of this ListOpRecordRequest.
:return: The resource_type of this ListOpRecordRequest.
:rtype: str
"""
return self._resource_type
@resource_type.setter
def resource_type(self, resource_type):
"""Sets the resource_type of this ListOpRecordRequest.
:param resource_type: The resource_type of this ListOpRecordRequest.
:type: str
"""
self._resource_type = resource_type
@property
def operation_type(self):
"""Gets the operation_type of this ListOpRecordRequest.
:return: The operation_type of this ListOpRecordRequest.
:rtype: str
"""
return self._operation_type
@operation_type.setter
def operation_type(self, operation_type):
"""Sets the operation_type of this ListOpRecordRequest.
:param operation_type: The operation_type of this ListOpRecordRequest.
:type: str
"""
self._operation_type = operation_type
@property
def operation_id(self):
"""Gets the operation_id of this ListOpRecordRequest.
:return: The operation_id of this ListOpRecordRequest.
:rtype: str
"""
return self._operation_id
@operation_id.setter
def operation_id(self, operation_id):
"""Sets the operation_id of this ListOpRecordRequest.
:param operation_id: The operation_id of this ListOpRecordRequest.
:type: str
"""
self._operation_id = operation_id
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ListOpRecordRequest):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,137 @@
# coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class ListOpRecordResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'count': 'int',
'operation_records': 'list[RecordDetailInfo]'
}
attribute_map = {
'count': 'count',
'operation_records': 'operation_records'
}
def __init__(self, count=None, operation_records=None):
"""ListOpRecordResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._count = None
self._operation_records = None
self.discriminator = None
if count is not None:
self.count = count
if operation_records is not None:
self.operation_records = operation_records
@property
def count(self):
"""Gets the count of this ListOpRecordResponse.
操作记录总数
:return: The count of this ListOpRecordResponse.
:rtype: int
"""
return self._count
@count.setter
def count(self, count):
"""Sets the count of this ListOpRecordResponse.
操作记录总数
:param count: The count of this ListOpRecordResponse.
:type: int
"""
self._count = count
@property
def operation_records(self):
"""Gets the operation_records of this ListOpRecordResponse.
操作记录列表
:return: The operation_records of this ListOpRecordResponse.
:rtype: list[RecordDetailInfo]
"""
return self._operation_records
@operation_records.setter
def operation_records(self, operation_records):
"""Sets the operation_records of this ListOpRecordResponse.
操作记录列表
:param operation_records: The operation_records of this ListOpRecordResponse.
:type: list[RecordDetailInfo]
"""
self._operation_records = operation_records
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ListOpRecordResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,137 @@
# coding: utf-8
import pprint
import re
import six
class NodeInfo:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'name': 'str',
'id': 'str'
}
attribute_map = {
'name': 'name',
'id': 'id'
}
def __init__(self, name=None, id=None):
"""NodeInfo - a model defined in huaweicloud sdk"""
self._name = None
self._id = None
self.discriminator = None
if name is not None:
self.name = name
if id is not None:
self.id = id
@property
def name(self):
"""Gets the name of this NodeInfo.
节点名
:return: The name of this NodeInfo.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this NodeInfo.
节点名
:param name: The name of this NodeInfo.
:type: str
"""
self._name = name
@property
def id(self):
"""Gets the id of this NodeInfo.
节点ID
:return: The id of this NodeInfo.
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this NodeInfo.
节点ID
:param id: The id of this NodeInfo.
:type: str
"""
self._id = id
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, NodeInfo):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -1,162 +0,0 @@
# coding: utf-8
import pprint
import re
import six
class NodeOrgs:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'name': 'str',
'node_count': 'int',
'pvc_name': 'str'
}
attribute_map = {
'name': 'name',
'node_count': 'node_count',
'pvc_name': 'pvc_name'
}
def __init__(self, name=None, node_count=None, pvc_name=None):
"""NodeOrgs - a model defined in huaweicloud sdk"""
self._name = None
self._node_count = None
self._pvc_name = None
self.discriminator = None
self.name = name
self.node_count = node_count
if pvc_name is not None:
self.pvc_name = pvc_name
@property
def name(self):
"""Gets the name of this NodeOrgs.
组织名称
:return: The name of this NodeOrgs.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this NodeOrgs.
组织名称
:param name: The name of this NodeOrgs.
:type: str
"""
self._name = name
@property
def node_count(self):
"""Gets the node_count of this NodeOrgs.
组织目标节点数
:return: The node_count of this NodeOrgs.
:rtype: int
"""
return self._node_count
@node_count.setter
def node_count(self, node_count):
"""Sets the node_count of this NodeOrgs.
组织目标节点数
:param node_count: The node_count of this NodeOrgs.
:type: int
"""
self._node_count = node_count
@property
def pvc_name(self):
"""Gets the pvc_name of this NodeOrgs.
pvc名称添加组织时需要提供pvc_name
:return: The pvc_name of this NodeOrgs.
:rtype: str
"""
return self._pvc_name
@pvc_name.setter
def pvc_name(self, pvc_name):
"""Sets the pvc_name of this NodeOrgs.
pvc名称添加组织时需要提供pvc_name
:param pvc_name: The pvc_name of this NodeOrgs.
:type: str
"""
self._pvc_name = pvc_name
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, NodeOrgs):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -9,7 +9,7 @@ import six
class UpdateSubReq:
class OpIdRes:
"""
@ -23,45 +23,45 @@ class UpdateSubReq:
sensitive_list = []
openapi_types = {
'callbackurl': 'str'
'operation_id': 'str'
}
attribute_map = {
'callbackurl': 'callbackurl'
'operation_id': 'operation_id'
}
def __init__(self, callbackurl=None):
"""UpdateSubReq - a model defined in huaweicloud sdk"""
def __init__(self, operation_id=None):
"""OpIdRes - a model defined in huaweicloud sdk"""
self._callbackurl = None
self._operation_id = None
self.discriminator = None
if callbackurl is not None:
self.callbackurl = callbackurl
if operation_id is not None:
self.operation_id = operation_id
@property
def callbackurl(self):
"""Gets the callbackurl of this UpdateSubReq.
def operation_id(self):
"""Gets the operation_id of this OpIdRes.
订阅的回调地址用于接收对应资源事件的通知消息例如https://10.10.10.10:443/callbackurltest
操作记录id
:return: The callbackurl of this UpdateSubReq.
:return: The operation_id of this OpIdRes.
:rtype: str
"""
return self._callbackurl
return self._operation_id
@callbackurl.setter
def callbackurl(self, callbackurl):
"""Sets the callbackurl of this UpdateSubReq.
@operation_id.setter
def operation_id(self, operation_id):
"""Sets the operation_id of this OpIdRes.
订阅的回调地址用于接收对应资源事件的通知消息例如https://10.10.10.10:443/callbackurltest
操作记录id
:param callbackurl: The callbackurl of this UpdateSubReq.
:param operation_id: The operation_id of this OpIdRes.
:type: str
"""
self._callbackurl = callbackurl
self._operation_id = operation_id
def to_dict(self):
"""Returns the model properties as a dict"""
@ -100,7 +100,7 @@ class UpdateSubReq:
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, UpdateSubReq):
if not isinstance(other, OpIdRes):
return False
return self.__dict__ == other.__dict__

View File

@ -0,0 +1,191 @@
# coding: utf-8
import pprint
import re
import six
class OprecordCluster:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'cluster_type': 'str',
'name': 'str',
'cluster_id': 'str',
'node_infos': 'list[NodeInfo]'
}
attribute_map = {
'cluster_type': 'cluster_type',
'name': 'name',
'cluster_id': 'cluster_id',
'node_infos': 'node_infos'
}
def __init__(self, cluster_type=None, name=None, cluster_id=None, node_infos=None):
"""OprecordCluster - a model defined in huaweicloud sdk"""
self._cluster_type = None
self._name = None
self._cluster_id = None
self._node_infos = None
self.discriminator = None
if cluster_type is not None:
self.cluster_type = cluster_type
if name is not None:
self.name = name
if cluster_id is not None:
self.cluster_id = cluster_id
if node_infos is not None:
self.node_infos = node_infos
@property
def cluster_type(self):
"""Gets the cluster_type of this OprecordCluster.
集群类型
:return: The cluster_type of this OprecordCluster.
:rtype: str
"""
return self._cluster_type
@cluster_type.setter
def cluster_type(self, cluster_type):
"""Sets the cluster_type of this OprecordCluster.
集群类型
:param cluster_type: The cluster_type of this OprecordCluster.
:type: str
"""
self._cluster_type = cluster_type
@property
def name(self):
"""Gets the name of this OprecordCluster.
集群名称
:return: The name of this OprecordCluster.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this OprecordCluster.
集群名称
:param name: The name of this OprecordCluster.
:type: str
"""
self._name = name
@property
def cluster_id(self):
"""Gets the cluster_id of this OprecordCluster.
集群ID
:return: The cluster_id of this OprecordCluster.
:rtype: str
"""
return self._cluster_id
@cluster_id.setter
def cluster_id(self, cluster_id):
"""Sets the cluster_id of this OprecordCluster.
集群ID
:param cluster_id: The cluster_id of this OprecordCluster.
:type: str
"""
self._cluster_id = cluster_id
@property
def node_infos(self):
"""Gets the node_infos of this OprecordCluster.
节点信息
:return: The node_infos of this OprecordCluster.
:rtype: list[NodeInfo]
"""
return self._node_infos
@node_infos.setter
def node_infos(self, node_infos):
"""Sets the node_infos of this OprecordCluster.
节点信息
:param node_infos: The node_infos of this OprecordCluster.
:type: list[NodeInfo]
"""
self._node_infos = node_infos
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, OprecordCluster):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,218 @@
# coding: utf-8
import pprint
import re
import six
class ProcessInfo:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'step_name': 'str',
'status': 'str',
'detail': 'str',
'sub_steps': 'dict(str, SubDetail)',
'serial_num': 'int'
}
attribute_map = {
'step_name': 'step_name',
'status': 'status',
'detail': 'detail',
'sub_steps': 'sub_steps',
'serial_num': 'serial_num'
}
def __init__(self, step_name=None, status=None, detail=None, sub_steps=None, serial_num=None):
"""ProcessInfo - a model defined in huaweicloud sdk"""
self._step_name = None
self._status = None
self._detail = None
self._sub_steps = None
self._serial_num = None
self.discriminator = None
if step_name is not None:
self.step_name = step_name
if status is not None:
self.status = status
if detail is not None:
self.detail = detail
if sub_steps is not None:
self.sub_steps = sub_steps
if serial_num is not None:
self.serial_num = serial_num
@property
def step_name(self):
"""Gets the step_name of this ProcessInfo.
操作名
:return: The step_name of this ProcessInfo.
:rtype: str
"""
return self._step_name
@step_name.setter
def step_name(self, step_name):
"""Sets the step_name of this ProcessInfo.
操作名
:param step_name: The step_name of this ProcessInfo.
:type: str
"""
self._step_name = step_name
@property
def status(self):
"""Gets the status of this ProcessInfo.
操作状态
:return: The status of this ProcessInfo.
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
"""Sets the status of this ProcessInfo.
操作状态
:param status: The status of this ProcessInfo.
:type: str
"""
self._status = status
@property
def detail(self):
"""Gets the detail of this ProcessInfo.
操作详情
:return: The detail of this ProcessInfo.
:rtype: str
"""
return self._detail
@detail.setter
def detail(self, detail):
"""Sets the detail of this ProcessInfo.
操作详情
:param detail: The detail of this ProcessInfo.
:type: str
"""
self._detail = detail
@property
def sub_steps(self):
"""Gets the sub_steps of this ProcessInfo.
子操作, \"map[string][SubDetail] key:子操作名 value:子操作结果\"
:return: The sub_steps of this ProcessInfo.
:rtype: dict(str, SubDetail)
"""
return self._sub_steps
@sub_steps.setter
def sub_steps(self, sub_steps):
"""Sets the sub_steps of this ProcessInfo.
子操作, \"map[string][SubDetail] key:子操作名 value:子操作结果\"
:param sub_steps: The sub_steps of this ProcessInfo.
:type: dict(str, SubDetail)
"""
self._sub_steps = sub_steps
@property
def serial_num(self):
"""Gets the serial_num of this ProcessInfo.
序列号
:return: The serial_num of this ProcessInfo.
:rtype: int
"""
return self._serial_num
@serial_num.setter
def serial_num(self, serial_num):
"""Sets the serial_num of this ProcessInfo.
序列号
:param serial_num: The serial_num of this ProcessInfo.
:type: int
"""
self._serial_num = serial_num
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ProcessInfo):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,432 @@
# coding: utf-8
import pprint
import re
import six
class RecordDetailInfo:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'operation_id': 'str',
'resource_type': 'str',
'operation_type': 'str',
'domain_id': 'str',
'project_id': 'str',
'blockchain_id': 'str',
'blockchain_name': 'str',
'cluster_info': 'OprecordCluster',
'operation_process': 'dict(str, ProcessInfo)',
'record_time': 'int',
'operation_status': 'str',
'message': 'list[str]',
'desc': 'str'
}
attribute_map = {
'operation_id': 'operation_id',
'resource_type': 'resource_type',
'operation_type': 'operation_type',
'domain_id': 'domain_id',
'project_id': 'project_id',
'blockchain_id': 'blockchain_id',
'blockchain_name': 'blockchain_name',
'cluster_info': 'cluster_info',
'operation_process': 'operation_process',
'record_time': 'record_time',
'operation_status': 'operation_status',
'message': 'message',
'desc': 'desc'
}
def __init__(self, operation_id=None, resource_type=None, operation_type=None, domain_id=None, project_id=None, blockchain_id=None, blockchain_name=None, cluster_info=None, operation_process=None, record_time=None, operation_status=None, message=None, desc=None):
"""RecordDetailInfo - a model defined in huaweicloud sdk"""
self._operation_id = None
self._resource_type = None
self._operation_type = None
self._domain_id = None
self._project_id = None
self._blockchain_id = None
self._blockchain_name = None
self._cluster_info = None
self._operation_process = None
self._record_time = None
self._operation_status = None
self._message = None
self._desc = None
self.discriminator = None
if operation_id is not None:
self.operation_id = operation_id
if resource_type is not None:
self.resource_type = resource_type
if operation_type is not None:
self.operation_type = operation_type
if domain_id is not None:
self.domain_id = domain_id
if project_id is not None:
self.project_id = project_id
if blockchain_id is not None:
self.blockchain_id = blockchain_id
if blockchain_name is not None:
self.blockchain_name = blockchain_name
if cluster_info is not None:
self.cluster_info = cluster_info
if operation_process is not None:
self.operation_process = operation_process
if record_time is not None:
self.record_time = record_time
if operation_status is not None:
self.operation_status = operation_status
if message is not None:
self.message = message
if desc is not None:
self.desc = desc
@property
def operation_id(self):
"""Gets the operation_id of this RecordDetailInfo.
操作记录ID
:return: The operation_id of this RecordDetailInfo.
:rtype: str
"""
return self._operation_id
@operation_id.setter
def operation_id(self, operation_id):
"""Sets the operation_id of this RecordDetailInfo.
操作记录ID
:param operation_id: The operation_id of this RecordDetailInfo.
:type: str
"""
self._operation_id = operation_id
@property
def resource_type(self):
"""Gets the resource_type of this RecordDetailInfo.
资源类型
:return: The resource_type of this RecordDetailInfo.
:rtype: str
"""
return self._resource_type
@resource_type.setter
def resource_type(self, resource_type):
"""Sets the resource_type of this RecordDetailInfo.
资源类型
:param resource_type: The resource_type of this RecordDetailInfo.
:type: str
"""
self._resource_type = resource_type
@property
def operation_type(self):
"""Gets the operation_type of this RecordDetailInfo.
操作类型
:return: The operation_type of this RecordDetailInfo.
:rtype: str
"""
return self._operation_type
@operation_type.setter
def operation_type(self, operation_type):
"""Sets the operation_type of this RecordDetailInfo.
操作类型
:param operation_type: The operation_type of this RecordDetailInfo.
:type: str
"""
self._operation_type = operation_type
@property
def domain_id(self):
"""Gets the domain_id of this RecordDetailInfo.
租户ID
:return: The domain_id of this RecordDetailInfo.
:rtype: str
"""
return self._domain_id
@domain_id.setter
def domain_id(self, domain_id):
"""Sets the domain_id of this RecordDetailInfo.
租户ID
:param domain_id: The domain_id of this RecordDetailInfo.
:type: str
"""
self._domain_id = domain_id
@property
def project_id(self):
"""Gets the project_id of this RecordDetailInfo.
项目ID
:return: The project_id of this RecordDetailInfo.
:rtype: str
"""
return self._project_id
@project_id.setter
def project_id(self, project_id):
"""Sets the project_id of this RecordDetailInfo.
项目ID
:param project_id: The project_id of this RecordDetailInfo.
:type: str
"""
self._project_id = project_id
@property
def blockchain_id(self):
"""Gets the blockchain_id of this RecordDetailInfo.
区块链ID
:return: The blockchain_id of this RecordDetailInfo.
:rtype: str
"""
return self._blockchain_id
@blockchain_id.setter
def blockchain_id(self, blockchain_id):
"""Sets the blockchain_id of this RecordDetailInfo.
区块链ID
:param blockchain_id: The blockchain_id of this RecordDetailInfo.
:type: str
"""
self._blockchain_id = blockchain_id
@property
def blockchain_name(self):
"""Gets the blockchain_name of this RecordDetailInfo.
区块链名称
:return: The blockchain_name of this RecordDetailInfo.
:rtype: str
"""
return self._blockchain_name
@blockchain_name.setter
def blockchain_name(self, blockchain_name):
"""Sets the blockchain_name of this RecordDetailInfo.
区块链名称
:param blockchain_name: The blockchain_name of this RecordDetailInfo.
:type: str
"""
self._blockchain_name = blockchain_name
@property
def cluster_info(self):
"""Gets the cluster_info of this RecordDetailInfo.
:return: The cluster_info of this RecordDetailInfo.
:rtype: OprecordCluster
"""
return self._cluster_info
@cluster_info.setter
def cluster_info(self, cluster_info):
"""Sets the cluster_info of this RecordDetailInfo.
:param cluster_info: The cluster_info of this RecordDetailInfo.
:type: OprecordCluster
"""
self._cluster_info = cluster_info
@property
def operation_process(self):
"""Gets the operation_process of this RecordDetailInfo.
操作流程key为流程名value为流程信息
:return: The operation_process of this RecordDetailInfo.
:rtype: dict(str, ProcessInfo)
"""
return self._operation_process
@operation_process.setter
def operation_process(self, operation_process):
"""Sets the operation_process of this RecordDetailInfo.
操作流程key为流程名value为流程信息
:param operation_process: The operation_process of this RecordDetailInfo.
:type: dict(str, ProcessInfo)
"""
self._operation_process = operation_process
@property
def record_time(self):
"""Gets the record_time of this RecordDetailInfo.
记录更新时间
:return: The record_time of this RecordDetailInfo.
:rtype: int
"""
return self._record_time
@record_time.setter
def record_time(self, record_time):
"""Sets the record_time of this RecordDetailInfo.
记录更新时间
:param record_time: The record_time of this RecordDetailInfo.
:type: int
"""
self._record_time = record_time
@property
def operation_status(self):
"""Gets the operation_status of this RecordDetailInfo.
操作状态
:return: The operation_status of this RecordDetailInfo.
:rtype: str
"""
return self._operation_status
@operation_status.setter
def operation_status(self, operation_status):
"""Sets the operation_status of this RecordDetailInfo.
操作状态
:param operation_status: The operation_status of this RecordDetailInfo.
:type: str
"""
self._operation_status = operation_status
@property
def message(self):
"""Gets the message of this RecordDetailInfo.
操作过程信息记录
:return: The message of this RecordDetailInfo.
:rtype: list[str]
"""
return self._message
@message.setter
def message(self, message):
"""Sets the message of this RecordDetailInfo.
操作过程信息记录
:param message: The message of this RecordDetailInfo.
:type: list[str]
"""
self._message = message
@property
def desc(self):
"""Gets the desc of this RecordDetailInfo.
操作描述
:return: The desc of this RecordDetailInfo.
:rtype: str
"""
return self._desc
@desc.setter
def desc(self, desc):
"""Sets the desc of this RecordDetailInfo.
操作描述
:param desc: The desc of this RecordDetailInfo.
:type: str
"""
self._desc = desc
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, RecordDetailInfo):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,272 @@
# coding: utf-8
import pprint
import re
import six
class SubDetail:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'substep_name': 'str',
'detail': 'str',
'status': 'str',
'message': 'list[str]',
'start_time': 'int',
'end_time': 'int',
'serial_num': 'int'
}
attribute_map = {
'substep_name': 'substep_name',
'detail': 'detail',
'status': 'status',
'message': 'message',
'start_time': 'start_time',
'end_time': 'end_time',
'serial_num': 'serial_num'
}
def __init__(self, substep_name=None, detail=None, status=None, message=None, start_time=None, end_time=None, serial_num=None):
"""SubDetail - a model defined in huaweicloud sdk"""
self._substep_name = None
self._detail = None
self._status = None
self._message = None
self._start_time = None
self._end_time = None
self._serial_num = None
self.discriminator = None
if substep_name is not None:
self.substep_name = substep_name
if detail is not None:
self.detail = detail
if status is not None:
self.status = status
if message is not None:
self.message = message
if start_time is not None:
self.start_time = start_time
if end_time is not None:
self.end_time = end_time
if serial_num is not None:
self.serial_num = serial_num
@property
def substep_name(self):
"""Gets the substep_name of this SubDetail.
子操作名
:return: The substep_name of this SubDetail.
:rtype: str
"""
return self._substep_name
@substep_name.setter
def substep_name(self, substep_name):
"""Sets the substep_name of this SubDetail.
子操作名
:param substep_name: The substep_name of this SubDetail.
:type: str
"""
self._substep_name = substep_name
@property
def detail(self):
"""Gets the detail of this SubDetail.
子操作详情
:return: The detail of this SubDetail.
:rtype: str
"""
return self._detail
@detail.setter
def detail(self, detail):
"""Sets the detail of this SubDetail.
子操作详情
:param detail: The detail of this SubDetail.
:type: str
"""
self._detail = detail
@property
def status(self):
"""Gets the status of this SubDetail.
子操作状态
:return: The status of this SubDetail.
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
"""Sets the status of this SubDetail.
子操作状态
:param status: The status of this SubDetail.
:type: str
"""
self._status = status
@property
def message(self):
"""Gets the message of this SubDetail.
子操作过程信息记录
:return: The message of this SubDetail.
:rtype: list[str]
"""
return self._message
@message.setter
def message(self, message):
"""Sets the message of this SubDetail.
子操作过程信息记录
:param message: The message of this SubDetail.
:type: list[str]
"""
self._message = message
@property
def start_time(self):
"""Gets the start_time of this SubDetail.
开始时间
:return: The start_time of this SubDetail.
:rtype: int
"""
return self._start_time
@start_time.setter
def start_time(self, start_time):
"""Sets the start_time of this SubDetail.
开始时间
:param start_time: The start_time of this SubDetail.
:type: int
"""
self._start_time = start_time
@property
def end_time(self):
"""Gets the end_time of this SubDetail.
结束时间
:return: The end_time of this SubDetail.
:rtype: int
"""
return self._end_time
@end_time.setter
def end_time(self, end_time):
"""Sets the end_time of this SubDetail.
结束时间
:param end_time: The end_time of this SubDetail.
:type: int
"""
self._end_time = end_time
@property
def serial_num(self):
"""Gets the serial_num of this SubDetail.
序列号
:return: The serial_num of this SubDetail.
:rtype: int
"""
return self._serial_num
@serial_num.setter
def serial_num(self, serial_num):
"""Sets the serial_num of this SubDetail.
序列号
:param serial_num: The serial_num of this SubDetail.
:type: int
"""
self._serial_num = serial_num
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, SubDetail):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -24,7 +24,7 @@ class UpdateInstanceRequest:
openapi_types = {
'blockchain_id': 'str',
'body': 'UpdateInstanceRequestBody'
'body': 'OpIdRes'
}
attribute_map = {
@ -71,7 +71,7 @@ class UpdateInstanceRequest:
:return: The body of this UpdateInstanceRequest.
:rtype: UpdateInstanceRequestBody
:rtype: OpIdRes
"""
return self._body
@ -81,7 +81,7 @@ class UpdateInstanceRequest:
:param body: The body of this UpdateInstanceRequest.
:type: UpdateInstanceRequestBody
:type: OpIdRes
"""
self._body = body

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkbcs"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkbms"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkbss"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkbssintl"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkcbr"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkcce"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkces"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkclassroom"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkcloudide"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkcloudpipeline"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkcloudtest"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -22,7 +22,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkcore"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkcts"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkdcs"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -22,6 +22,7 @@ from huaweicloudsdkdds.v3.model.backup_policy import BackupPolicy
from huaweicloudsdkdds.v3.model.backup_policy_item import BackupPolicyItem
from huaweicloudsdkdds.v3.model.backup_strategy import BackupStrategy
from huaweicloudsdkdds.v3.model.backup_strategy_for_item_response import BackupStrategyForItemResponse
from huaweicloudsdkdds.v3.model.balancer_active_window import BalancerActiveWindow
from huaweicloudsdkdds.v3.model.batch_operate_instance_tag_request_body import BatchOperateInstanceTagRequestBody
from huaweicloudsdkdds.v3.model.batch_tag_action_request import BatchTagActionRequest
from huaweicloudsdkdds.v3.model.batch_tag_action_response import BatchTagActionResponse
@ -163,6 +164,10 @@ from huaweicloudsdkdds.v3.model.set_auditlog_policy_response import SetAuditlogP
from huaweicloudsdkdds.v3.model.set_backup_policy_request import SetBackupPolicyRequest
from huaweicloudsdkdds.v3.model.set_backup_policy_request_body import SetBackupPolicyRequestBody
from huaweicloudsdkdds.v3.model.set_backup_policy_response import SetBackupPolicyResponse
from huaweicloudsdkdds.v3.model.set_balancer_switch_request import SetBalancerSwitchRequest
from huaweicloudsdkdds.v3.model.set_balancer_switch_response import SetBalancerSwitchResponse
from huaweicloudsdkdds.v3.model.set_balancer_window_request import SetBalancerWindowRequest
from huaweicloudsdkdds.v3.model.set_balancer_window_response import SetBalancerWindowResponse
from huaweicloudsdkdds.v3.model.show_api_version_request import ShowApiVersionRequest
from huaweicloudsdkdds.v3.model.show_api_version_response import ShowApiVersionResponse
from huaweicloudsdkdds.v3.model.show_auditlog_policy_request import ShowAuditlogPolicyRequest
@ -173,6 +178,8 @@ from huaweicloudsdkdds.v3.model.show_backup_policy_request import ShowBackupPoli
from huaweicloudsdkdds.v3.model.show_backup_policy_response import ShowBackupPolicyResponse
from huaweicloudsdkdds.v3.model.show_connection_statistics_request import ShowConnectionStatisticsRequest
from huaweicloudsdkdds.v3.model.show_connection_statistics_response import ShowConnectionStatisticsResponse
from huaweicloudsdkdds.v3.model.show_sharding_balancer_request import ShowShardingBalancerRequest
from huaweicloudsdkdds.v3.model.show_sharding_balancer_response import ShowShardingBalancerResponse
from huaweicloudsdkdds.v3.model.slowlog_result import SlowlogResult
from huaweicloudsdkdds.v3.model.source import Source
from huaweicloudsdkdds.v3.model.storage import Storage

View File

@ -3043,6 +3043,136 @@ class DdsAsyncClient(Client):
request_type=request.__class__.__name__)
def set_balancer_switch_async(self, request):
"""设置集群均衡开关
设置集群均衡开关
:param SetBalancerSwitchRequest request
:return: SetBalancerSwitchResponse
"""
return self.set_balancer_switch_with_http_info(request)
def set_balancer_switch_with_http_info(self, request):
"""设置集群均衡开关
设置集群均衡开关
:param SetBalancerSwitchRequest request
:return: SetBalancerSwitchResponse
"""
all_params = ['instance_id', 'action']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'instance_id' in local_var_params:
path_params['instance_id'] = local_var_params['instance_id']
if 'action' in local_var_params:
path_params['action'] = local_var_params['action']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/instances/{instance_id}/balancer/{action}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='SetBalancerSwitchResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def set_balancer_window_async(self, request):
"""设置集群均衡活动时间窗
设置集群均衡活动时间窗
:param SetBalancerWindowRequest request
:return: SetBalancerWindowResponse
"""
return self.set_balancer_window_with_http_info(request)
def set_balancer_window_with_http_info(self, request):
"""设置集群均衡活动时间窗
设置集群均衡活动时间窗
:param SetBalancerWindowRequest request
:return: SetBalancerWindowResponse
"""
all_params = ['instance_id', 'balancer_active_window']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'instance_id' in local_var_params:
path_params['instance_id'] = local_var_params['instance_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/instances/{instance_id}/balancer/active-window',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='SetBalancerWindowResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_auditlog_policy_async(self, request):
"""查询审计日志策略
@ -3303,6 +3433,69 @@ class DdsAsyncClient(Client):
request_type=request.__class__.__name__)
def show_sharding_balancer_async(self, request):
"""查询集群均衡设置
查询集群均衡设置
:param ShowShardingBalancerRequest request
:return: ShowShardingBalancerResponse
"""
return self.show_sharding_balancer_with_http_info(request)
def show_sharding_balancer_with_http_info(self, request):
"""查询集群均衡设置
查询集群均衡设置
:param ShowShardingBalancerRequest request
:return: ShowShardingBalancerResponse
"""
all_params = ['instance_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'instance_id' in local_var_params:
path_params['instance_id'] = local_var_params['instance_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/instances/{instance_id}/balancer',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowShardingBalancerResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def switch_ssl_async(self, request):
"""切换SSL开关

View File

@ -3043,6 +3043,136 @@ class DdsClient(Client):
request_type=request.__class__.__name__)
def set_balancer_switch(self, request):
"""设置集群均衡开关
设置集群均衡开关
:param SetBalancerSwitchRequest request
:return: SetBalancerSwitchResponse
"""
return self.set_balancer_switch_with_http_info(request)
def set_balancer_switch_with_http_info(self, request):
"""设置集群均衡开关
设置集群均衡开关
:param SetBalancerSwitchRequest request
:return: SetBalancerSwitchResponse
"""
all_params = ['instance_id', 'action']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'instance_id' in local_var_params:
path_params['instance_id'] = local_var_params['instance_id']
if 'action' in local_var_params:
path_params['action'] = local_var_params['action']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/instances/{instance_id}/balancer/{action}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='SetBalancerSwitchResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def set_balancer_window(self, request):
"""设置集群均衡活动时间窗
设置集群均衡活动时间窗
:param SetBalancerWindowRequest request
:return: SetBalancerWindowResponse
"""
return self.set_balancer_window_with_http_info(request)
def set_balancer_window_with_http_info(self, request):
"""设置集群均衡活动时间窗
设置集群均衡活动时间窗
:param SetBalancerWindowRequest request
:return: SetBalancerWindowResponse
"""
all_params = ['instance_id', 'balancer_active_window']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'instance_id' in local_var_params:
path_params['instance_id'] = local_var_params['instance_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/instances/{instance_id}/balancer/active-window',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='SetBalancerWindowResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_auditlog_policy(self, request):
"""查询审计日志策略
@ -3303,6 +3433,69 @@ class DdsClient(Client):
request_type=request.__class__.__name__)
def show_sharding_balancer(self, request):
"""查询集群均衡设置
查询集群均衡设置
:param ShowShardingBalancerRequest request
:return: ShowShardingBalancerResponse
"""
return self.show_sharding_balancer_with_http_info(request)
def show_sharding_balancer_with_http_info(self, request):
"""查询集群均衡设置
查询集群均衡设置
:param ShowShardingBalancerRequest request
:return: ShowShardingBalancerResponse
"""
all_params = ['instance_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'instance_id' in local_var_params:
path_params['instance_id'] = local_var_params['instance_id']
query_params = []
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v3/{project_id}/instances/{instance_id}/balancer',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowShardingBalancerResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def switch_ssl(self, request):
"""切换SSL开关

View File

@ -19,6 +19,7 @@ from huaweicloudsdkdds.v3.model.backup_policy import BackupPolicy
from huaweicloudsdkdds.v3.model.backup_policy_item import BackupPolicyItem
from huaweicloudsdkdds.v3.model.backup_strategy import BackupStrategy
from huaweicloudsdkdds.v3.model.backup_strategy_for_item_response import BackupStrategyForItemResponse
from huaweicloudsdkdds.v3.model.balancer_active_window import BalancerActiveWindow
from huaweicloudsdkdds.v3.model.batch_operate_instance_tag_request_body import BatchOperateInstanceTagRequestBody
from huaweicloudsdkdds.v3.model.batch_tag_action_request import BatchTagActionRequest
from huaweicloudsdkdds.v3.model.batch_tag_action_response import BatchTagActionResponse
@ -160,6 +161,10 @@ from huaweicloudsdkdds.v3.model.set_auditlog_policy_response import SetAuditlogP
from huaweicloudsdkdds.v3.model.set_backup_policy_request import SetBackupPolicyRequest
from huaweicloudsdkdds.v3.model.set_backup_policy_request_body import SetBackupPolicyRequestBody
from huaweicloudsdkdds.v3.model.set_backup_policy_response import SetBackupPolicyResponse
from huaweicloudsdkdds.v3.model.set_balancer_switch_request import SetBalancerSwitchRequest
from huaweicloudsdkdds.v3.model.set_balancer_switch_response import SetBalancerSwitchResponse
from huaweicloudsdkdds.v3.model.set_balancer_window_request import SetBalancerWindowRequest
from huaweicloudsdkdds.v3.model.set_balancer_window_response import SetBalancerWindowResponse
from huaweicloudsdkdds.v3.model.show_api_version_request import ShowApiVersionRequest
from huaweicloudsdkdds.v3.model.show_api_version_response import ShowApiVersionResponse
from huaweicloudsdkdds.v3.model.show_auditlog_policy_request import ShowAuditlogPolicyRequest
@ -170,6 +175,8 @@ from huaweicloudsdkdds.v3.model.show_backup_policy_request import ShowBackupPoli
from huaweicloudsdkdds.v3.model.show_backup_policy_response import ShowBackupPolicyResponse
from huaweicloudsdkdds.v3.model.show_connection_statistics_request import ShowConnectionStatisticsRequest
from huaweicloudsdkdds.v3.model.show_connection_statistics_response import ShowConnectionStatisticsResponse
from huaweicloudsdkdds.v3.model.show_sharding_balancer_request import ShowShardingBalancerRequest
from huaweicloudsdkdds.v3.model.show_sharding_balancer_response import ShowShardingBalancerResponse
from huaweicloudsdkdds.v3.model.slowlog_result import SlowlogResult
from huaweicloudsdkdds.v3.model.source import Source
from huaweicloudsdkdds.v3.model.storage import Storage

View File

@ -9,7 +9,7 @@ import six
class DeleteSubscriptionRequest:
class BalancerActiveWindow:
"""
@ -23,67 +23,70 @@ class DeleteSubscriptionRequest:
sensitive_list = []
openapi_types = {
'instance_id': 'str',
'subscription_id': 'str'
'start_time': 'str',
'stop_time': 'str'
}
attribute_map = {
'instance_id': 'Instance-Id',
'subscription_id': 'subscription_id'
'start_time': 'start_time',
'stop_time': 'stop_time'
}
def __init__(self, instance_id=None, subscription_id=None):
"""DeleteSubscriptionRequest - a model defined in huaweicloud sdk"""
def __init__(self, start_time=None, stop_time=None):
"""BalancerActiveWindow - a model defined in huaweicloud sdk"""
self._instance_id = None
self._subscription_id = None
self._start_time = None
self._stop_time = None
self.discriminator = None
if instance_id is not None:
self.instance_id = instance_id
self.subscription_id = subscription_id
self.start_time = start_time
self.stop_time = stop_time
@property
def instance_id(self):
"""Gets the instance_id of this DeleteSubscriptionRequest.
def start_time(self):
"""Gets the start_time of this BalancerActiveWindow.
活动时间窗开始时间
:return: The instance_id of this DeleteSubscriptionRequest.
:return: The start_time of this BalancerActiveWindow.
:rtype: str
"""
return self._instance_id
return self._start_time
@instance_id.setter
def instance_id(self, instance_id):
"""Sets the instance_id of this DeleteSubscriptionRequest.
@start_time.setter
def start_time(self, start_time):
"""Sets the start_time of this BalancerActiveWindow.
活动时间窗开始时间
:param instance_id: The instance_id of this DeleteSubscriptionRequest.
:param start_time: The start_time of this BalancerActiveWindow.
:type: str
"""
self._instance_id = instance_id
self._start_time = start_time
@property
def subscription_id(self):
"""Gets the subscription_id of this DeleteSubscriptionRequest.
def stop_time(self):
"""Gets the stop_time of this BalancerActiveWindow.
活动时间窗结束时间
:return: The subscription_id of this DeleteSubscriptionRequest.
:return: The stop_time of this BalancerActiveWindow.
:rtype: str
"""
return self._subscription_id
return self._stop_time
@subscription_id.setter
def subscription_id(self, subscription_id):
"""Sets the subscription_id of this DeleteSubscriptionRequest.
@stop_time.setter
def stop_time(self, stop_time):
"""Sets the stop_time of this BalancerActiveWindow.
活动时间窗结束时间
:param subscription_id: The subscription_id of this DeleteSubscriptionRequest.
:param stop_time: The stop_time of this BalancerActiveWindow.
:type: str
"""
self._subscription_id = subscription_id
self._stop_time = stop_time
def to_dict(self):
"""Returns the model properties as a dict"""
@ -122,7 +125,7 @@ class DeleteSubscriptionRequest:
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, DeleteSubscriptionRequest):
if not isinstance(other, BalancerActiveWindow):
return False
return self.__dict__ == other.__dict__

View File

@ -9,7 +9,7 @@ import six
class ShowSubscriptionRequest:
class SetBalancerSwitchRequest:
"""
@ -24,66 +24,65 @@ class ShowSubscriptionRequest:
openapi_types = {
'instance_id': 'str',
'subscription_id': 'str'
'action': 'str'
}
attribute_map = {
'instance_id': 'Instance-Id',
'subscription_id': 'subscription_id'
'instance_id': 'instance_id',
'action': 'action'
}
def __init__(self, instance_id=None, subscription_id=None):
"""ShowSubscriptionRequest - a model defined in huaweicloud sdk"""
def __init__(self, instance_id=None, action=None):
"""SetBalancerSwitchRequest - a model defined in huaweicloud sdk"""
self._instance_id = None
self._subscription_id = None
self._action = None
self.discriminator = None
if instance_id is not None:
self.instance_id = instance_id
self.subscription_id = subscription_id
self.instance_id = instance_id
self.action = action
@property
def instance_id(self):
"""Gets the instance_id of this ShowSubscriptionRequest.
"""Gets the instance_id of this SetBalancerSwitchRequest.
:return: The instance_id of this ShowSubscriptionRequest.
:return: The instance_id of this SetBalancerSwitchRequest.
:rtype: str
"""
return self._instance_id
@instance_id.setter
def instance_id(self, instance_id):
"""Sets the instance_id of this ShowSubscriptionRequest.
"""Sets the instance_id of this SetBalancerSwitchRequest.
:param instance_id: The instance_id of this ShowSubscriptionRequest.
:param instance_id: The instance_id of this SetBalancerSwitchRequest.
:type: str
"""
self._instance_id = instance_id
@property
def subscription_id(self):
"""Gets the subscription_id of this ShowSubscriptionRequest.
def action(self):
"""Gets the action of this SetBalancerSwitchRequest.
:return: The subscription_id of this ShowSubscriptionRequest.
:return: The action of this SetBalancerSwitchRequest.
:rtype: str
"""
return self._subscription_id
return self._action
@subscription_id.setter
def subscription_id(self, subscription_id):
"""Sets the subscription_id of this ShowSubscriptionRequest.
@action.setter
def action(self, action):
"""Sets the action of this SetBalancerSwitchRequest.
:param subscription_id: The subscription_id of this ShowSubscriptionRequest.
:param action: The action of this SetBalancerSwitchRequest.
:type: str
"""
self._subscription_id = subscription_id
self._action = action
def to_dict(self):
"""Returns the model properties as a dict"""
@ -122,7 +121,7 @@ class ShowSubscriptionRequest:
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ShowSubscriptionRequest):
if not isinstance(other, SetBalancerSwitchRequest):
return False
return self.__dict__ == other.__dict__

View File

@ -9,7 +9,7 @@ import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class DeleteSubscriptionResponse(SdkResponse):
class SetBalancerSwitchResponse(SdkResponse):
"""
@ -23,43 +23,45 @@ class DeleteSubscriptionResponse(SdkResponse):
sensitive_list = []
openapi_types = {
'body': 'str'
'job_id': 'str'
}
attribute_map = {
'body': 'body'
'job_id': 'job_id'
}
def __init__(self, body=None):
"""DeleteSubscriptionResponse - a model defined in huaweicloud sdk"""
def __init__(self, job_id=None):
"""SetBalancerSwitchResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._body = None
self._job_id = None
self.discriminator = None
if body is not None:
self.body = body
if job_id is not None:
self.job_id = job_id
@property
def body(self):
"""Gets the body of this DeleteSubscriptionResponse.
def job_id(self):
"""Gets the job_id of this SetBalancerSwitchResponse.
任务ID
:return: The body of this DeleteSubscriptionResponse.
:return: The job_id of this SetBalancerSwitchResponse.
:rtype: str
"""
return self._body
return self._job_id
@body.setter
def body(self, body):
"""Sets the body of this DeleteSubscriptionResponse.
@job_id.setter
def job_id(self, job_id):
"""Sets the job_id of this SetBalancerSwitchResponse.
任务ID
:param body: The body of this DeleteSubscriptionResponse.
:param job_id: The job_id of this SetBalancerSwitchResponse.
:type: str
"""
self._body = body
self._job_id = job_id
def to_dict(self):
"""Returns the model properties as a dict"""
@ -98,7 +100,7 @@ class DeleteSubscriptionResponse(SdkResponse):
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, DeleteSubscriptionResponse):
if not isinstance(other, SetBalancerSwitchResponse):
return False
return self.__dict__ == other.__dict__

View File

@ -9,7 +9,7 @@ import six
class CreateSubscriptionRequest:
class SetBalancerWindowRequest:
"""
@ -24,16 +24,16 @@ class CreateSubscriptionRequest:
openapi_types = {
'instance_id': 'str',
'body': 'CreateSubReq'
'body': 'BalancerActiveWindow'
}
attribute_map = {
'instance_id': 'Instance-Id',
'instance_id': 'instance_id',
'body': 'body'
}
def __init__(self, instance_id=None, body=None):
"""CreateSubscriptionRequest - a model defined in huaweicloud sdk"""
"""SetBalancerWindowRequest - a model defined in huaweicloud sdk"""
@ -41,48 +41,47 @@ class CreateSubscriptionRequest:
self._body = None
self.discriminator = None
if instance_id is not None:
self.instance_id = instance_id
self.instance_id = instance_id
if body is not None:
self.body = body
@property
def instance_id(self):
"""Gets the instance_id of this CreateSubscriptionRequest.
"""Gets the instance_id of this SetBalancerWindowRequest.
:return: The instance_id of this CreateSubscriptionRequest.
:return: The instance_id of this SetBalancerWindowRequest.
:rtype: str
"""
return self._instance_id
@instance_id.setter
def instance_id(self, instance_id):
"""Sets the instance_id of this CreateSubscriptionRequest.
"""Sets the instance_id of this SetBalancerWindowRequest.
:param instance_id: The instance_id of this CreateSubscriptionRequest.
:param instance_id: The instance_id of this SetBalancerWindowRequest.
:type: str
"""
self._instance_id = instance_id
@property
def body(self):
"""Gets the body of this CreateSubscriptionRequest.
"""Gets the body of this SetBalancerWindowRequest.
:return: The body of this CreateSubscriptionRequest.
:rtype: CreateSubReq
:return: The body of this SetBalancerWindowRequest.
:rtype: BalancerActiveWindow
"""
return self._body
@body.setter
def body(self, body):
"""Sets the body of this CreateSubscriptionRequest.
"""Sets the body of this SetBalancerWindowRequest.
:param body: The body of this CreateSubscriptionRequest.
:type: CreateSubReq
:param body: The body of this SetBalancerWindowRequest.
:type: BalancerActiveWindow
"""
self._body = body
@ -123,7 +122,7 @@ class CreateSubscriptionRequest:
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, CreateSubscriptionRequest):
if not isinstance(other, SetBalancerWindowRequest):
return False
return self.__dict__ == other.__dict__

View File

@ -6,10 +6,10 @@ import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class UpdateInstanceRequestBody:
class SetBalancerWindowResponse(SdkResponse):
"""
@ -23,44 +23,45 @@ class UpdateInstanceRequestBody:
sensitive_list = []
openapi_types = {
'node_orgs': 'list[NodeOrgs]'
'job_id': 'str'
}
attribute_map = {
'node_orgs': 'node_orgs'
'job_id': 'job_id'
}
def __init__(self, node_orgs=None):
"""UpdateInstanceRequestBody - a model defined in huaweicloud sdk"""
def __init__(self, job_id=None):
"""SetBalancerWindowResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._node_orgs = None
self._job_id = None
self.discriminator = None
self.node_orgs = node_orgs
if job_id is not None:
self.job_id = job_id
@property
def node_orgs(self):
"""Gets the node_orgs of this UpdateInstanceRequestBody.
def job_id(self):
"""Gets the job_id of this SetBalancerWindowResponse.
添加节点的组织列表
任务ID
:return: The node_orgs of this UpdateInstanceRequestBody.
:rtype: list[NodeOrgs]
:return: The job_id of this SetBalancerWindowResponse.
:rtype: str
"""
return self._node_orgs
return self._job_id
@node_orgs.setter
def node_orgs(self, node_orgs):
"""Sets the node_orgs of this UpdateInstanceRequestBody.
@job_id.setter
def job_id(self, job_id):
"""Sets the job_id of this SetBalancerWindowResponse.
添加节点的组织列表
任务ID
:param node_orgs: The node_orgs of this UpdateInstanceRequestBody.
:type: list[NodeOrgs]
:param job_id: The job_id of this SetBalancerWindowResponse.
:type: str
"""
self._node_orgs = node_orgs
self._job_id = job_id
def to_dict(self):
"""Returns the model properties as a dict"""
@ -99,7 +100,7 @@ class UpdateInstanceRequestBody:
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, UpdateInstanceRequestBody):
if not isinstance(other, SetBalancerWindowResponse):
return False
return self.__dict__ == other.__dict__

View File

@ -0,0 +1,107 @@
# coding: utf-8
import pprint
import re
import six
class ShowShardingBalancerRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'instance_id': 'str'
}
attribute_map = {
'instance_id': 'instance_id'
}
def __init__(self, instance_id=None):
"""ShowShardingBalancerRequest - a model defined in huaweicloud sdk"""
self._instance_id = None
self.discriminator = None
self.instance_id = instance_id
@property
def instance_id(self):
"""Gets the instance_id of this ShowShardingBalancerRequest.
:return: The instance_id of this ShowShardingBalancerRequest.
:rtype: str
"""
return self._instance_id
@instance_id.setter
def instance_id(self, instance_id):
"""Sets the instance_id of this ShowShardingBalancerRequest.
:param instance_id: The instance_id of this ShowShardingBalancerRequest.
:type: str
"""
self._instance_id = instance_id
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ShowShardingBalancerRequest):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,135 @@
# coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class ShowShardingBalancerResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'is_open': 'bool',
'active_window': 'BalancerActiveWindow'
}
attribute_map = {
'is_open': 'is_open',
'active_window': 'active_window'
}
def __init__(self, is_open=None, active_window=None):
"""ShowShardingBalancerResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._is_open = None
self._active_window = None
self.discriminator = None
if is_open is not None:
self.is_open = is_open
if active_window is not None:
self.active_window = active_window
@property
def is_open(self):
"""Gets the is_open of this ShowShardingBalancerResponse.
集群均衡是否打开
:return: The is_open of this ShowShardingBalancerResponse.
:rtype: bool
"""
return self._is_open
@is_open.setter
def is_open(self, is_open):
"""Sets the is_open of this ShowShardingBalancerResponse.
集群均衡是否打开
:param is_open: The is_open of this ShowShardingBalancerResponse.
:type: bool
"""
self._is_open = is_open
@property
def active_window(self):
"""Gets the active_window of this ShowShardingBalancerResponse.
:return: The active_window of this ShowShardingBalancerResponse.
:rtype: BalancerActiveWindow
"""
return self._active_window
@active_window.setter
def active_window(self, active_window):
"""Sets the active_window of this ShowShardingBalancerResponse.
:param active_window: The active_window of this ShowShardingBalancerResponse.
:type: BalancerActiveWindow
"""
self._active_window = active_window
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ShowShardingBalancerResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkdds"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkdevstar"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkdgc"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkdms"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkdns"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkecs"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkeip"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkelb"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkeps"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -32,7 +32,6 @@ class CreateVolumeOption:
'metadata': 'dict(str, str)',
'multiattach': 'bool',
'name': 'str',
'shareable': 'str',
'size': 'int',
'snapshot_id': 'str',
'volume_type': 'str',
@ -49,14 +48,13 @@ class CreateVolumeOption:
'metadata': 'metadata',
'multiattach': 'multiattach',
'name': 'name',
'shareable': 'shareable',
'size': 'size',
'snapshot_id': 'snapshot_id',
'volume_type': 'volume_type',
'tags': 'tags'
}
def __init__(self, availability_zone=None, backup_id=None, count=None, description=None, enterprise_project_id=None, image_ref=None, metadata=None, multiattach=None, name=None, shareable=None, size=None, snapshot_id=None, volume_type=None, tags=None):
def __init__(self, availability_zone=None, backup_id=None, count=None, description=None, enterprise_project_id=None, image_ref=None, metadata=None, multiattach=None, name=None, size=None, snapshot_id=None, volume_type=None, tags=None):
"""CreateVolumeOption - a model defined in huaweicloud sdk"""
@ -70,7 +68,6 @@ class CreateVolumeOption:
self._metadata = None
self._multiattach = None
self._name = None
self._shareable = None
self._size = None
self._snapshot_id = None
self._volume_type = None
@ -94,8 +91,6 @@ class CreateVolumeOption:
self.multiattach = multiattach
if name is not None:
self.name = name
if shareable is not None:
self.shareable = shareable
if size is not None:
self.size = size
if snapshot_id is not None:
@ -302,28 +297,6 @@ class CreateVolumeOption:
"""
self._name = name
@property
def shareable(self):
"""Gets the shareable of this CreateVolumeOption.
是否为共享云硬盘true为共享盘false为普通云硬盘 该字段已经废弃请使用multiattach
:return: The shareable of this CreateVolumeOption.
:rtype: str
"""
return self._shareable
@shareable.setter
def shareable(self, shareable):
"""Sets the shareable of this CreateVolumeOption.
是否为共享云硬盘true为共享盘false为普通云硬盘 该字段已经废弃请使用multiattach
:param shareable: The shareable of this CreateVolumeOption.
:type: str
"""
self._shareable = shareable
@property
def size(self):
"""Gets the size of this CreateVolumeOption.

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkevs"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkfunctiongraph"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -0,0 +1,13 @@
Copyright (c) Huawei Technologies Co., Ltd. 2020-present. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1 @@
See detailed information in [huaweicloud-sdk-python-v3](https://github.com/huaweicloud/huaweicloud-sdk-python-v3).

View File

@ -0,0 +1,12 @@
# coding: utf-8
from __future__ import absolute_import
# import HssClient
from huaweicloudsdkhss.v1.hss_client import HssClient
from huaweicloudsdkhss.v1.hss_async_client import HssAsyncClient
# import models into sdk package
from huaweicloudsdkhss.v1.model.host import Host
from huaweicloudsdkhss.v1.model.list_hosts_request import ListHostsRequest
from huaweicloudsdkhss.v1.model.list_hosts_response import ListHostsResponse

View File

@ -0,0 +1,171 @@
# coding: utf-8
from __future__ import absolute_import
import datetime
import re
import importlib
import six
from huaweicloudsdkcore.client import Client, ClientBuilder
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkcore.utils import http_utils
from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
class HssAsyncClient(Client):
"""
:param configuration: .Configuration object for this client
:param pool_threads: The number of threads to use for async requests
to the API. More threads means more concurrent API requests.
"""
PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
NATIVE_TYPES_MAPPING = {
'int': int,
'long': int if six.PY3 else long,
'float': float,
'str': str,
'bool': bool,
'date': datetime.date,
'datetime': datetime.datetime,
'object': object,
}
def __init__(self):
super(HssAsyncClient, self).__init__()
self.model_package = importlib.import_module("huaweicloudsdkhss.v1.model")
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
@classmethod
def new_builder(cls, clazz=None):
if clazz is None:
return ClientBuilder(cls)
if clazz.__name__ != "HssClient":
raise TypeError("client type error, support client type is HssClient")
return ClientBuilder(clazz)
def list_hosts_async(self, request):
"""查询弹性云服务器状态列表
查询弹性云服务器状态列表
:param ListHostsRequest request
:return: ListHostsResponse
"""
return self.list_hosts_with_http_info(request)
def list_hosts_with_http_info(self, request):
"""查询弹性云服务器状态列表
查询弹性云服务器状态列表
:param ListHostsRequest request
:return: ListHostsResponse
"""
all_params = ['version', 'agent_status', 'host_status', 'protect_status', 'detect_result', 'host_name', 'host_ip', 'public_ip', 'os_type', 'charging_mode', 'limit', 'offset']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'version' in local_var_params:
query_params.append(('version', local_var_params['version']))
if 'agent_status' in local_var_params:
query_params.append(('agent_status', local_var_params['agent_status']))
if 'host_status' in local_var_params:
query_params.append(('host_status', local_var_params['host_status']))
if 'protect_status' in local_var_params:
query_params.append(('protect_status', local_var_params['protect_status']))
if 'detect_result' in local_var_params:
query_params.append(('detect_result', local_var_params['detect_result']))
if 'host_name' in local_var_params:
query_params.append(('host_name', local_var_params['host_name']))
if 'host_ip' in local_var_params:
query_params.append(('host_ip', local_var_params['host_ip']))
if 'public_ip' in local_var_params:
query_params.append(('public_ip', local_var_params['public_ip']))
if 'os_type' in local_var_params:
query_params.append(('os_type', local_var_params['os_type']))
if 'charging_mode' in local_var_params:
query_params.append(('charging_mode', local_var_params['charging_mode']))
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'offset' in local_var_params:
query_params.append(('offset', local_var_params['offset']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/hss/v1/{project_id}/api/host-management/hosts',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListHostsResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
post_params=None, response_type=None, response_headers=None, auth_settings=None,
collection_formats=None, request_type=None):
"""Makes the HTTP request and returns deserialized data.
:param resource_path: Path to method endpoint.
:param method: Method to call.
:param path_params: Path parameters in the url.
:param query_params: Query parameters in the url.
:param header_params: Header parameters to be
placed in the request header.
:param body: Request body.
:param post_params dict: Request post form parameters,
for `application/x-www-form-urlencoded`, `multipart/form-data`.
:param auth_settings list: Auth Settings names for the request.
:param response_type: Response data type.
:param response_headers: Header should be added to response data.
:param collection_formats: dict of collection formats for path, query,
header, and post parameters.
:param request_type: Request data type.
:return:
Return the response directly.
"""
return self.do_http_request(
method=method,
resource_path=resource_path,
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body,
post_params=post_params,
response_type=response_type,
response_headers=response_headers,
collection_formats=collection_formats,
request_type=request_type,
async_request=True)

View File

@ -0,0 +1,169 @@
# coding: utf-8
from __future__ import absolute_import
import datetime
import re
import importlib
import six
from huaweicloudsdkcore.client import Client, ClientBuilder
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkcore.utils import http_utils
from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
class HssClient(Client):
"""
:param configuration: .Configuration object for this client
:param pool_threads: The number of threads to use for async requests
to the API. More threads means more concurrent API requests.
"""
PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
NATIVE_TYPES_MAPPING = {
'int': int,
'long': int if six.PY3 else long,
'float': float,
'str': str,
'bool': bool,
'date': datetime.date,
'datetime': datetime.datetime,
'object': object,
}
def __init__(self):
super(HssClient, self).__init__()
self.model_package = importlib.import_module("huaweicloudsdkhss.v1.model")
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
@classmethod
def new_builder(cls, clazz=None):
if clazz is None:
return ClientBuilder(cls)
if clazz.__name__ != "HssClient":
raise TypeError("client type error, support client type is HssClient")
return ClientBuilder(clazz)
def list_hosts(self, request):
"""查询弹性云服务器状态列表
查询弹性云服务器状态列表
:param ListHostsRequest request
:return: ListHostsResponse
"""
return self.list_hosts_with_http_info(request)
def list_hosts_with_http_info(self, request):
"""查询弹性云服务器状态列表
查询弹性云服务器状态列表
:param ListHostsRequest request
:return: ListHostsResponse
"""
all_params = ['version', 'agent_status', 'host_status', 'protect_status', 'detect_result', 'host_name', 'host_ip', 'public_ip', 'os_type', 'charging_mode', 'limit', 'offset']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'version' in local_var_params:
query_params.append(('version', local_var_params['version']))
if 'agent_status' in local_var_params:
query_params.append(('agent_status', local_var_params['agent_status']))
if 'host_status' in local_var_params:
query_params.append(('host_status', local_var_params['host_status']))
if 'protect_status' in local_var_params:
query_params.append(('protect_status', local_var_params['protect_status']))
if 'detect_result' in local_var_params:
query_params.append(('detect_result', local_var_params['detect_result']))
if 'host_name' in local_var_params:
query_params.append(('host_name', local_var_params['host_name']))
if 'host_ip' in local_var_params:
query_params.append(('host_ip', local_var_params['host_ip']))
if 'public_ip' in local_var_params:
query_params.append(('public_ip', local_var_params['public_ip']))
if 'os_type' in local_var_params:
query_params.append(('os_type', local_var_params['os_type']))
if 'charging_mode' in local_var_params:
query_params.append(('charging_mode', local_var_params['charging_mode']))
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'offset' in local_var_params:
query_params.append(('offset', local_var_params['offset']))
header_params = {}
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/hss/v1/{project_id}/api/host-management/hosts',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListHostsResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
post_params=None, response_type=None, response_headers=None, auth_settings=None,
collection_formats=None, request_type=None):
"""Makes the HTTP request and returns deserialized data.
:param resource_path: Path to method endpoint.
:param method: Method to call.
:param path_params: Path parameters in the url.
:param query_params: Query parameters in the url.
:param header_params: Header parameters to be placed in the request header.
:param body: Request body.
:param post_params dict: Request post form parameters,
for `application/x-www-form-urlencoded`, `multipart/form-data`.
:param auth_settings list: Auth Settings names for the request.
:param response_type: Response data type.
:param response_headers: Header should be added to response data.
:param collection_formats: dict of collection formats for path, query,
header, and post parameters.
:param request_type: Request data type.
:return:
Return the response directly.
"""
return self.do_http_request(
method=method,
resource_path=resource_path,
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body,
post_params=post_params,
response_type=response_type,
response_headers=response_headers,
collection_formats=collection_formats,
request_type=request_type)

View File

@ -0,0 +1,8 @@
# coding: utf-8
from __future__ import absolute_import
# import models into model package
from huaweicloudsdkhss.v1.model.host import Host
from huaweicloudsdkhss.v1.model.list_hosts_request import ListHostsRequest
from huaweicloudsdkhss.v1.model.list_hosts_response import ListHostsResponse

View File

@ -0,0 +1,704 @@
# coding: utf-8
import pprint
import re
import six
class Host:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'agent_id': 'str',
'host_id': 'str',
'host_name': 'str',
'host_ip': 'str',
'public_ip': 'str',
'enterprise_project_name': 'str',
'group_name': 'str',
'expire_time': 'int',
'policy_group_name': 'str',
'host_status': 'str',
'agent_status': 'str',
'version': 'str',
'protect_status': 'str',
'os_image': 'str',
'os_type': 'str',
'os_bit': 'str',
'detect_result': 'str',
'risk_port_num': 'int',
'risk_vul_num': 'int',
'risk_intrusion_num': 'int',
'risk_baseline_num': 'int',
'charging_mode': 'str',
'resource_id': 'str'
}
attribute_map = {
'agent_id': 'agent_id',
'host_id': 'host_id',
'host_name': 'host_name',
'host_ip': 'host_ip',
'public_ip': 'public_ip',
'enterprise_project_name': 'enterprise_project_name',
'group_name': 'group_name',
'expire_time': 'expire_time',
'policy_group_name': 'policy_group_name',
'host_status': 'host_status',
'agent_status': 'agent_status',
'version': 'version',
'protect_status': 'protect_status',
'os_image': 'os_image',
'os_type': 'os_type',
'os_bit': 'os_bit',
'detect_result': 'detect_result',
'risk_port_num': 'risk_port_num',
'risk_vul_num': 'risk_vul_num',
'risk_intrusion_num': 'risk_intrusion_num',
'risk_baseline_num': 'risk_baseline_num',
'charging_mode': 'charging_mode',
'resource_id': 'resource_id'
}
def __init__(self, agent_id=None, host_id=None, host_name=None, host_ip=None, public_ip=None, enterprise_project_name=None, group_name=None, expire_time=None, policy_group_name=None, host_status=None, agent_status=None, version=None, protect_status=None, os_image=None, os_type=None, os_bit=None, detect_result=None, risk_port_num=None, risk_vul_num=None, risk_intrusion_num=None, risk_baseline_num=None, charging_mode=None, resource_id=None):
"""Host - a model defined in huaweicloud sdk"""
self._agent_id = None
self._host_id = None
self._host_name = None
self._host_ip = None
self._public_ip = None
self._enterprise_project_name = None
self._group_name = None
self._expire_time = None
self._policy_group_name = None
self._host_status = None
self._agent_status = None
self._version = None
self._protect_status = None
self._os_image = None
self._os_type = None
self._os_bit = None
self._detect_result = None
self._risk_port_num = None
self._risk_vul_num = None
self._risk_intrusion_num = None
self._risk_baseline_num = None
self._charging_mode = None
self._resource_id = None
self.discriminator = None
if agent_id is not None:
self.agent_id = agent_id
if host_id is not None:
self.host_id = host_id
if host_name is not None:
self.host_name = host_name
if host_ip is not None:
self.host_ip = host_ip
if public_ip is not None:
self.public_ip = public_ip
if enterprise_project_name is not None:
self.enterprise_project_name = enterprise_project_name
if group_name is not None:
self.group_name = group_name
if expire_time is not None:
self.expire_time = expire_time
if policy_group_name is not None:
self.policy_group_name = policy_group_name
if host_status is not None:
self.host_status = host_status
if agent_status is not None:
self.agent_status = agent_status
if version is not None:
self.version = version
if protect_status is not None:
self.protect_status = protect_status
if os_image is not None:
self.os_image = os_image
if os_type is not None:
self.os_type = os_type
if os_bit is not None:
self.os_bit = os_bit
if detect_result is not None:
self.detect_result = detect_result
if risk_port_num is not None:
self.risk_port_num = risk_port_num
if risk_vul_num is not None:
self.risk_vul_num = risk_vul_num
if risk_intrusion_num is not None:
self.risk_intrusion_num = risk_intrusion_num
if risk_baseline_num is not None:
self.risk_baseline_num = risk_baseline_num
if charging_mode is not None:
self.charging_mode = charging_mode
if resource_id is not None:
self.resource_id = resource_id
@property
def agent_id(self):
"""Gets the agent_id of this Host.
云主机id
:return: The agent_id of this Host.
:rtype: str
"""
return self._agent_id
@agent_id.setter
def agent_id(self, agent_id):
"""Sets the agent_id of this Host.
云主机id
:param agent_id: The agent_id of this Host.
:type: str
"""
self._agent_id = agent_id
@property
def host_id(self):
"""Gets the host_id of this Host.
云主机id
:return: The host_id of this Host.
:rtype: str
"""
return self._host_id
@host_id.setter
def host_id(self, host_id):
"""Sets the host_id of this Host.
云主机id
:param host_id: The host_id of this Host.
:type: str
"""
self._host_id = host_id
@property
def host_name(self):
"""Gets the host_name of this Host.
云主机名称
:return: The host_name of this Host.
:rtype: str
"""
return self._host_name
@host_name.setter
def host_name(self, host_name):
"""Sets the host_name of this Host.
云主机名称
:param host_name: The host_name of this Host.
:type: str
"""
self._host_name = host_name
@property
def host_ip(self):
"""Gets the host_ip of this Host.
云主机私有IP
:return: The host_ip of this Host.
:rtype: str
"""
return self._host_ip
@host_ip.setter
def host_ip(self, host_ip):
"""Sets the host_ip of this Host.
云主机私有IP
:param host_ip: The host_ip of this Host.
:type: str
"""
self._host_ip = host_ip
@property
def public_ip(self):
"""Gets the public_ip of this Host.
云主机公网IP
:return: The public_ip of this Host.
:rtype: str
"""
return self._public_ip
@public_ip.setter
def public_ip(self, public_ip):
"""Sets the public_ip of this Host.
云主机公网IP
:param public_ip: The public_ip of this Host.
:type: str
"""
self._public_ip = public_ip
@property
def enterprise_project_name(self):
"""Gets the enterprise_project_name of this Host.
所属企业项目名称
:return: The enterprise_project_name of this Host.
:rtype: str
"""
return self._enterprise_project_name
@enterprise_project_name.setter
def enterprise_project_name(self, enterprise_project_name):
"""Sets the enterprise_project_name of this Host.
所属企业项目名称
:param enterprise_project_name: The enterprise_project_name of this Host.
:type: str
"""
self._enterprise_project_name = enterprise_project_name
@property
def group_name(self):
"""Gets the group_name of this Host.
服务器组名称
:return: The group_name of this Host.
:rtype: str
"""
return self._group_name
@group_name.setter
def group_name(self, group_name):
"""Sets the group_name of this Host.
服务器组名称
:param group_name: The group_name of this Host.
:type: str
"""
self._group_name = group_name
@property
def expire_time(self):
"""Gets the expire_time of this Host.
服务到期时间
:return: The expire_time of this Host.
:rtype: int
"""
return self._expire_time
@expire_time.setter
def expire_time(self, expire_time):
"""Sets the expire_time of this Host.
服务到期时间
:param expire_time: The expire_time of this Host.
:type: int
"""
self._expire_time = expire_time
@property
def policy_group_name(self):
"""Gets the policy_group_name of this Host.
策略组名称
:return: The policy_group_name of this Host.
:rtype: str
"""
return self._policy_group_name
@policy_group_name.setter
def policy_group_name(self, policy_group_name):
"""Sets the policy_group_name of this Host.
策略组名称
:param policy_group_name: The policy_group_name of this Host.
:type: str
"""
self._policy_group_name = policy_group_name
@property
def host_status(self):
"""Gets the host_status of this Host.
云主机状态正在运行ACTIVE; 关机SHUTOFF; 创建中BUILDING; 故障ERROR;
:return: The host_status of this Host.
:rtype: str
"""
return self._host_status
@host_status.setter
def host_status(self, host_status):
"""Sets the host_status of this Host.
云主机状态正在运行ACTIVE; 关机SHUTOFF; 创建中BUILDING; 故障ERROR;
:param host_status: The host_status of this Host.
:type: str
"""
self._host_status = host_status
@property
def agent_status(self):
"""Gets the agent_status of this Host.
客户端状态, 未注册not_register; 在线online; 离线offline; 所有状态all;
:return: The agent_status of this Host.
:rtype: str
"""
return self._agent_status
@agent_status.setter
def agent_status(self, agent_status):
"""Sets the agent_status of this Host.
客户端状态, 未注册not_register; 在线online; 离线offline; 所有状态all;
:param agent_status: The agent_status of this Host.
:type: str
"""
self._agent_status = agent_status
@property
def version(self):
"""Gets the version of this Host.
云主机开通的版本,hss.version.null hss.version.basic基础班hss.version.enterprise企业版hss.version.premium旗舰版hss.version.wtp网页防篡改版
:return: The version of this Host.
:rtype: str
"""
return self._version
@version.setter
def version(self, version):
"""Sets the version of this Host.
云主机开通的版本,hss.version.null hss.version.basic基础班hss.version.enterprise企业版hss.version.premium旗舰版hss.version.wtp网页防篡改版
:param version: The version of this Host.
:type: str
"""
self._version = version
@property
def protect_status(self):
"""Gets the protect_status of this Host.
防护状态, opened开启opened关闭
:return: The protect_status of this Host.
:rtype: str
"""
return self._protect_status
@protect_status.setter
def protect_status(self, protect_status):
"""Sets the protect_status of this Host.
防护状态, opened开启opened关闭
:param protect_status: The protect_status of this Host.
:type: str
"""
self._protect_status = protect_status
@property
def os_image(self):
"""Gets the os_image of this Host.
系统镜像
:return: The os_image of this Host.
:rtype: str
"""
return self._os_image
@os_image.setter
def os_image(self, os_image):
"""Sets the os_image of this Host.
系统镜像
:param os_image: The os_image of this Host.
:type: str
"""
self._os_image = os_image
@property
def os_type(self):
"""Gets the os_type of this Host.
系统类型
:return: The os_type of this Host.
:rtype: str
"""
return self._os_type
@os_type.setter
def os_type(self, os_type):
"""Sets the os_type of this Host.
系统类型
:param os_type: The os_type of this Host.
:type: str
"""
self._os_type = os_type
@property
def os_bit(self):
"""Gets the os_bit of this Host.
操作系统位数
:return: The os_bit of this Host.
:rtype: str
"""
return self._os_bit
@os_bit.setter
def os_bit(self, os_bit):
"""Sets the os_bit of this Host.
操作系统位数
:param os_bit: The os_bit of this Host.
:type: str
"""
self._os_bit = os_bit
@property
def detect_result(self):
"""Gets the detect_result of this Host.
云主机安全检测结果undetect未检测clean无风险risk有风险
:return: The detect_result of this Host.
:rtype: str
"""
return self._detect_result
@detect_result.setter
def detect_result(self, detect_result):
"""Sets the detect_result of this Host.
云主机安全检测结果undetect未检测clean无风险risk有风险
:param detect_result: The detect_result of this Host.
:type: str
"""
self._detect_result = detect_result
@property
def risk_port_num(self):
"""Gets the risk_port_num of this Host.
资产风险个数
:return: The risk_port_num of this Host.
:rtype: int
"""
return self._risk_port_num
@risk_port_num.setter
def risk_port_num(self, risk_port_num):
"""Sets the risk_port_num of this Host.
资产风险个数
:param risk_port_num: The risk_port_num of this Host.
:type: int
"""
self._risk_port_num = risk_port_num
@property
def risk_vul_num(self):
"""Gets the risk_vul_num of this Host.
漏洞风险个数
:return: The risk_vul_num of this Host.
:rtype: int
"""
return self._risk_vul_num
@risk_vul_num.setter
def risk_vul_num(self, risk_vul_num):
"""Sets the risk_vul_num of this Host.
漏洞风险个数
:param risk_vul_num: The risk_vul_num of this Host.
:type: int
"""
self._risk_vul_num = risk_vul_num
@property
def risk_intrusion_num(self):
"""Gets the risk_intrusion_num of this Host.
入侵风险个数
:return: The risk_intrusion_num of this Host.
:rtype: int
"""
return self._risk_intrusion_num
@risk_intrusion_num.setter
def risk_intrusion_num(self, risk_intrusion_num):
"""Sets the risk_intrusion_num of this Host.
入侵风险个数
:param risk_intrusion_num: The risk_intrusion_num of this Host.
:type: int
"""
self._risk_intrusion_num = risk_intrusion_num
@property
def risk_baseline_num(self):
"""Gets the risk_baseline_num of this Host.
基线风险个数
:return: The risk_baseline_num of this Host.
:rtype: int
"""
return self._risk_baseline_num
@risk_baseline_num.setter
def risk_baseline_num(self, risk_baseline_num):
"""Sets the risk_baseline_num of this Host.
基线风险个数
:param risk_baseline_num: The risk_baseline_num of this Host.
:type: int
"""
self._risk_baseline_num = risk_baseline_num
@property
def charging_mode(self):
"""Gets the charging_mode of this Host.
计费模式packet_cycle包年包月on_demand按需付费
:return: The charging_mode of this Host.
:rtype: str
"""
return self._charging_mode
@charging_mode.setter
def charging_mode(self, charging_mode):
"""Sets the charging_mode of this Host.
计费模式packet_cycle包年包月on_demand按需付费
:param charging_mode: The charging_mode of this Host.
:type: str
"""
self._charging_mode = charging_mode
@property
def resource_id(self):
"""Gets the resource_id of this Host.
云服务资源实例IDUUID
:return: The resource_id of this Host.
:rtype: str
"""
return self._resource_id
@resource_id.setter
def resource_id(self, resource_id):
"""Sets the resource_id of this Host.
云服务资源实例IDUUID
:param resource_id: The resource_id of this Host.
:type: str
"""
self._resource_id = resource_id
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, Host):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,383 @@
# coding: utf-8
import pprint
import re
import six
class ListHostsRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'version': 'str',
'agent_status': 'str',
'host_status': 'str',
'protect_status': 'str',
'detect_result': 'str',
'host_name': 'str',
'host_ip': 'str',
'public_ip': 'str',
'os_type': 'str',
'charging_mode': 'str',
'limit': 'int',
'offset': 'int'
}
attribute_map = {
'version': 'version',
'agent_status': 'agent_status',
'host_status': 'host_status',
'protect_status': 'protect_status',
'detect_result': 'detect_result',
'host_name': 'host_name',
'host_ip': 'host_ip',
'public_ip': 'public_ip',
'os_type': 'os_type',
'charging_mode': 'charging_mode',
'limit': 'limit',
'offset': 'offset'
}
def __init__(self, version=None, agent_status=None, host_status=None, protect_status=None, detect_result=None, host_name=None, host_ip=None, public_ip=None, os_type=None, charging_mode=None, limit=None, offset=None):
"""ListHostsRequest - a model defined in huaweicloud sdk"""
self._version = None
self._agent_status = None
self._host_status = None
self._protect_status = None
self._detect_result = None
self._host_name = None
self._host_ip = None
self._public_ip = None
self._os_type = None
self._charging_mode = None
self._limit = None
self._offset = None
self.discriminator = None
if version is not None:
self.version = version
if agent_status is not None:
self.agent_status = agent_status
if host_status is not None:
self.host_status = host_status
if protect_status is not None:
self.protect_status = protect_status
if detect_result is not None:
self.detect_result = detect_result
if host_name is not None:
self.host_name = host_name
if host_ip is not None:
self.host_ip = host_ip
if public_ip is not None:
self.public_ip = public_ip
if os_type is not None:
self.os_type = os_type
if charging_mode is not None:
self.charging_mode = charging_mode
if limit is not None:
self.limit = limit
if offset is not None:
self.offset = offset
@property
def version(self):
"""Gets the version of this ListHostsRequest.
:return: The version of this ListHostsRequest.
:rtype: str
"""
return self._version
@version.setter
def version(self, version):
"""Sets the version of this ListHostsRequest.
:param version: The version of this ListHostsRequest.
:type: str
"""
self._version = version
@property
def agent_status(self):
"""Gets the agent_status of this ListHostsRequest.
:return: The agent_status of this ListHostsRequest.
:rtype: str
"""
return self._agent_status
@agent_status.setter
def agent_status(self, agent_status):
"""Sets the agent_status of this ListHostsRequest.
:param agent_status: The agent_status of this ListHostsRequest.
:type: str
"""
self._agent_status = agent_status
@property
def host_status(self):
"""Gets the host_status of this ListHostsRequest.
:return: The host_status of this ListHostsRequest.
:rtype: str
"""
return self._host_status
@host_status.setter
def host_status(self, host_status):
"""Sets the host_status of this ListHostsRequest.
:param host_status: The host_status of this ListHostsRequest.
:type: str
"""
self._host_status = host_status
@property
def protect_status(self):
"""Gets the protect_status of this ListHostsRequest.
:return: The protect_status of this ListHostsRequest.
:rtype: str
"""
return self._protect_status
@protect_status.setter
def protect_status(self, protect_status):
"""Sets the protect_status of this ListHostsRequest.
:param protect_status: The protect_status of this ListHostsRequest.
:type: str
"""
self._protect_status = protect_status
@property
def detect_result(self):
"""Gets the detect_result of this ListHostsRequest.
:return: The detect_result of this ListHostsRequest.
:rtype: str
"""
return self._detect_result
@detect_result.setter
def detect_result(self, detect_result):
"""Sets the detect_result of this ListHostsRequest.
:param detect_result: The detect_result of this ListHostsRequest.
:type: str
"""
self._detect_result = detect_result
@property
def host_name(self):
"""Gets the host_name of this ListHostsRequest.
:return: The host_name of this ListHostsRequest.
:rtype: str
"""
return self._host_name
@host_name.setter
def host_name(self, host_name):
"""Sets the host_name of this ListHostsRequest.
:param host_name: The host_name of this ListHostsRequest.
:type: str
"""
self._host_name = host_name
@property
def host_ip(self):
"""Gets the host_ip of this ListHostsRequest.
:return: The host_ip of this ListHostsRequest.
:rtype: str
"""
return self._host_ip
@host_ip.setter
def host_ip(self, host_ip):
"""Sets the host_ip of this ListHostsRequest.
:param host_ip: The host_ip of this ListHostsRequest.
:type: str
"""
self._host_ip = host_ip
@property
def public_ip(self):
"""Gets the public_ip of this ListHostsRequest.
:return: The public_ip of this ListHostsRequest.
:rtype: str
"""
return self._public_ip
@public_ip.setter
def public_ip(self, public_ip):
"""Sets the public_ip of this ListHostsRequest.
:param public_ip: The public_ip of this ListHostsRequest.
:type: str
"""
self._public_ip = public_ip
@property
def os_type(self):
"""Gets the os_type of this ListHostsRequest.
:return: The os_type of this ListHostsRequest.
:rtype: str
"""
return self._os_type
@os_type.setter
def os_type(self, os_type):
"""Sets the os_type of this ListHostsRequest.
:param os_type: The os_type of this ListHostsRequest.
:type: str
"""
self._os_type = os_type
@property
def charging_mode(self):
"""Gets the charging_mode of this ListHostsRequest.
:return: The charging_mode of this ListHostsRequest.
:rtype: str
"""
return self._charging_mode
@charging_mode.setter
def charging_mode(self, charging_mode):
"""Sets the charging_mode of this ListHostsRequest.
:param charging_mode: The charging_mode of this ListHostsRequest.
:type: str
"""
self._charging_mode = charging_mode
@property
def limit(self):
"""Gets the limit of this ListHostsRequest.
:return: The limit of this ListHostsRequest.
:rtype: int
"""
return self._limit
@limit.setter
def limit(self, limit):
"""Sets the limit of this ListHostsRequest.
:param limit: The limit of this ListHostsRequest.
:type: int
"""
self._limit = limit
@property
def offset(self):
"""Gets the offset of this ListHostsRequest.
:return: The offset of this ListHostsRequest.
:rtype: int
"""
return self._offset
@offset.setter
def offset(self, offset):
"""Sets the offset of this ListHostsRequest.
:param offset: The offset of this ListHostsRequest.
:type: int
"""
self._offset = offset
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ListHostsRequest):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,137 @@
# coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class ListHostsResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'total_num': 'int',
'data_list': 'list[Host]'
}
attribute_map = {
'total_num': 'total_num',
'data_list': 'data_list'
}
def __init__(self, total_num=None, data_list=None):
"""ListHostsResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._total_num = None
self._data_list = None
self.discriminator = None
if total_num is not None:
self.total_num = total_num
if data_list is not None:
self.data_list = data_list
@property
def total_num(self):
"""Gets the total_num of this ListHostsResponse.
总数
:return: The total_num of this ListHostsResponse.
:rtype: int
"""
return self._total_num
@total_num.setter
def total_num(self, total_num):
"""Sets the total_num of this ListHostsResponse.
总数
:param total_num: The total_num of this ListHostsResponse.
:type: int
"""
self._total_num = total_num
@property
def data_list(self):
"""Gets the data_list of this ListHostsResponse.
查询弹性云服务器状态列表
:return: The data_list of this ListHostsResponse.
:rtype: list[Host]
"""
return self._data_list
@data_list.setter
def data_list(self, data_list):
"""Sets the data_list of this ListHostsResponse.
查询弹性云服务器状态列表
:param data_list: The data_list of this ListHostsResponse.
:type: list[Host]
"""
self._data_list = data_list
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ListHostsResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,44 @@
# coding: utf-8
import types
from huaweicloudsdkcore.region.region import Region
class HssRegion:
def __init__(self):
pass
CN_NORTH_1 = Region(id="cn-north-1", endpoint="https://hss.cn-north-1.myhuaweicloud.com")
CN_NORTH_4 = Region(id="cn-north-4", endpoint="https://hss.cn-north-4.myhuaweicloud.com")
CN_SOUTHWEST_2 = Region(id="cn-southwest-2", endpoint="https://hss.cn-southwest-2.myhuaweicloud.com")
CN_EAST_2 = Region(id="cn-east-2", endpoint="https://hss.cn-east-2.myhuaweicloud.com")
CN_EAST_3 = Region(id="cn-east-3", endpoint="https://hss.cn-east-3.myhuaweicloud.com")
CN_SOUTH_1 = Region(id="cn-south-1", endpoint="https://hss.cn-south-1.myhuaweicloud.com")
CN_SOUTH_2 = Region(id="cn-south-2", endpoint="https://hss.cn-south-2.myhuaweicloud.com")
static_fields = types.MappingProxyType({
"cn-north-1": CN_NORTH_1,
"cn-north-4": CN_NORTH_4,
"cn-southwest-2": CN_SOUTHWEST_2,
"cn-east-2": CN_EAST_2,
"cn-east-3": CN_EAST_3,
"cn-south-1": CN_SOUTH_1,
"cn-south-2": CN_SOUTH_2,
})
@staticmethod
def value_of(region_id, static_fields=static_fields):
if region_id is None or len(region_id) == 0:
raise KeyError("Unexpected empty parameter: region_id.")
if not static_fields.get(region_id):
raise KeyError("Unexpected region_id: " + region_id)
return static_fields.get(region_id)

View File

@ -0,0 +1 @@
huaweicloud-sdk-python-core

View File

@ -0,0 +1,45 @@
# coding: utf-8
from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkhss"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
DESCRIPTION = "HSS"
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README_PYPI.md'), encoding='utf-8') as f:
LONG_DESCRIPTION = f.read()
REQUIRES = ["huaweicloudsdkcore"]
setup(
name=NAME,
version=VERSION,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
author=AUTHOR,
author_email=AUTHOR_EMAIL,
license="Apache LICENSE 2.0",
url=URL,
keywords=["huaweicloud", "sdk", "HSS"],
packages=find_packages(exclude=["tests*"]),
install_requires=REQUIRES,
include_package_data=True,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development'
]
)

View File

@ -0,0 +1,5 @@
coverage>=4.0.3
nose>=1.3.7
pluggy>=0.3.1
py>=1.4.31
randomize>=0.13

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkiam"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkimage"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkims"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -72,9 +72,6 @@ from huaweicloudsdkiotda.v5.model.create_rule_action_request import CreateRuleAc
from huaweicloudsdkiotda.v5.model.create_rule_action_response import CreateRuleActionResponse
from huaweicloudsdkiotda.v5.model.create_rule_request import CreateRuleRequest
from huaweicloudsdkiotda.v5.model.create_rule_response import CreateRuleResponse
from huaweicloudsdkiotda.v5.model.create_sub_req import CreateSubReq
from huaweicloudsdkiotda.v5.model.create_subscription_request import CreateSubscriptionRequest
from huaweicloudsdkiotda.v5.model.create_subscription_response import CreateSubscriptionResponse
from huaweicloudsdkiotda.v5.model.daily_timer_type import DailyTimerType
from huaweicloudsdkiotda.v5.model.delete_application_request import DeleteApplicationRequest
from huaweicloudsdkiotda.v5.model.delete_application_response import DeleteApplicationResponse
@ -96,8 +93,6 @@ from huaweicloudsdkiotda.v5.model.delete_rule_action_request import DeleteRuleAc
from huaweicloudsdkiotda.v5.model.delete_rule_action_response import DeleteRuleActionResponse
from huaweicloudsdkiotda.v5.model.delete_rule_request import DeleteRuleRequest
from huaweicloudsdkiotda.v5.model.delete_rule_response import DeleteRuleResponse
from huaweicloudsdkiotda.v5.model.delete_subscription_request import DeleteSubscriptionRequest
from huaweicloudsdkiotda.v5.model.delete_subscription_response import DeleteSubscriptionResponse
from huaweicloudsdkiotda.v5.model.device_command_request import DeviceCommandRequest
from huaweicloudsdkiotda.v5.model.device_data_condition import DeviceDataCondition
from huaweicloudsdkiotda.v5.model.device_group_response_dto import DeviceGroupResponseDTO
@ -146,8 +141,6 @@ from huaweicloudsdkiotda.v5.model.list_rule_actions_request import ListRuleActio
from huaweicloudsdkiotda.v5.model.list_rule_actions_response import ListRuleActionsResponse
from huaweicloudsdkiotda.v5.model.list_rules_request import ListRulesRequest
from huaweicloudsdkiotda.v5.model.list_rules_response import ListRulesResponse
from huaweicloudsdkiotda.v5.model.list_subscriptions_request import ListSubscriptionsRequest
from huaweicloudsdkiotda.v5.model.list_subscriptions_response import ListSubscriptionsResponse
from huaweicloudsdkiotda.v5.model.lts_forwarding import LtsForwarding
from huaweicloudsdkiotda.v5.model.message_result import MessageResult
from huaweicloudsdkiotda.v5.model.mqs_forwarding import MqsForwarding
@ -210,13 +203,9 @@ from huaweicloudsdkiotda.v5.model.show_rule_action_request import ShowRuleAction
from huaweicloudsdkiotda.v5.model.show_rule_action_response import ShowRuleActionResponse
from huaweicloudsdkiotda.v5.model.show_rule_request import ShowRuleRequest
from huaweicloudsdkiotda.v5.model.show_rule_response import ShowRuleResponse
from huaweicloudsdkiotda.v5.model.show_subscription_request import ShowSubscriptionRequest
from huaweicloudsdkiotda.v5.model.show_subscription_response import ShowSubscriptionResponse
from huaweicloudsdkiotda.v5.model.simple_timer_type import SimpleTimerType
from huaweicloudsdkiotda.v5.model.simplify_device import SimplifyDevice
from huaweicloudsdkiotda.v5.model.strategy import Strategy
from huaweicloudsdkiotda.v5.model.subject import Subject
from huaweicloudsdkiotda.v5.model.subscription_item import SubscriptionItem
from huaweicloudsdkiotda.v5.model.tag_device_request import TagDeviceRequest
from huaweicloudsdkiotda.v5.model.tag_device_response import TagDeviceResponse
from huaweicloudsdkiotda.v5.model.tag_v5_dto import TagV5DTO
@ -253,8 +242,5 @@ from huaweicloudsdkiotda.v5.model.update_rule_action_response import UpdateRuleA
from huaweicloudsdkiotda.v5.model.update_rule_req import UpdateRuleReq
from huaweicloudsdkiotda.v5.model.update_rule_request import UpdateRuleRequest
from huaweicloudsdkiotda.v5.model.update_rule_response import UpdateRuleResponse
from huaweicloudsdkiotda.v5.model.update_sub_req import UpdateSubReq
from huaweicloudsdkiotda.v5.model.update_subscription_request import UpdateSubscriptionRequest
from huaweicloudsdkiotda.v5.model.update_subscription_response import UpdateSubscriptionResponse
from huaweicloudsdkiotda.v5.model.verify_certificate_dto import VerifyCertificateDTO

View File

@ -4522,347 +4522,6 @@ class IoTDAAsyncClient(Client):
request_type=request.__class__.__name__)
def create_subscription_async(self, request):
"""创建订阅
应用服务器可调用此接口订阅物联网平台资源的变化事件当资源发生变化时如设备激活设备数据更新等平台会向应用服务器发送通知消息
:param CreateSubscriptionRequest request
:return: CreateSubscriptionResponse
"""
return self.create_subscription_with_http_info(request)
def create_subscription_with_http_info(self, request):
"""创建订阅
应用服务器可调用此接口订阅物联网平台资源的变化事件当资源发生变化时如设备激活设备数据更新等平台会向应用服务器发送通知消息
:param CreateSubscriptionRequest request
:return: CreateSubscriptionResponse
"""
all_params = ['instance_id', 'create_subscription_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
if 'instance_id' in local_var_params:
header_params['Instance-Id'] = local_var_params['instance_id']
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v5/iot/{project_id}/subscriptions',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateSubscriptionResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_subscription_async(self, request):
"""删除订阅
应用服务器可调用此接口删除物联网平台中的指定订阅配置
:param DeleteSubscriptionRequest request
:return: DeleteSubscriptionResponse
"""
return self.delete_subscription_with_http_info(request)
def delete_subscription_with_http_info(self, request):
"""删除订阅
应用服务器可调用此接口删除物联网平台中的指定订阅配置
:param DeleteSubscriptionRequest request
:return: DeleteSubscriptionResponse
"""
all_params = ['subscription_id', 'instance_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'subscription_id' in local_var_params:
path_params['subscription_id'] = local_var_params['subscription_id']
query_params = []
header_params = {}
if 'instance_id' in local_var_params:
header_params['Instance-Id'] = local_var_params['instance_id']
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v5/iot/{project_id}/subscriptions/{subscription_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteSubscriptionResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_subscriptions_async(self, request):
"""查询订阅列表
应用服务器可调用此接口查询物联网平台中的订阅配置信息列表
:param ListSubscriptionsRequest request
:return: ListSubscriptionsResponse
"""
return self.list_subscriptions_with_http_info(request)
def list_subscriptions_with_http_info(self, request):
"""查询订阅列表
应用服务器可调用此接口查询物联网平台中的订阅配置信息列表
:param ListSubscriptionsRequest request
:return: ListSubscriptionsResponse
"""
all_params = ['instance_id', 'resource', 'event', 'callbackurl', 'app_id', 'channel', 'limit', 'marker', 'offset']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'resource' in local_var_params:
query_params.append(('resource', local_var_params['resource']))
if 'event' in local_var_params:
query_params.append(('event', local_var_params['event']))
if 'callbackurl' in local_var_params:
query_params.append(('callbackurl', local_var_params['callbackurl']))
if 'app_id' in local_var_params:
query_params.append(('app_id', local_var_params['app_id']))
if 'channel' in local_var_params:
query_params.append(('channel', local_var_params['channel']))
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'offset' in local_var_params:
query_params.append(('offset', local_var_params['offset']))
header_params = {}
if 'instance_id' in local_var_params:
header_params['Instance-Id'] = local_var_params['instance_id']
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v5/iot/{project_id}/subscriptions',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListSubscriptionsResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_subscription_async(self, request):
"""查询订阅
应用服务器可调用此接口查询物联网平台中指定订阅的配置信息
:param ShowSubscriptionRequest request
:return: ShowSubscriptionResponse
"""
return self.show_subscription_with_http_info(request)
def show_subscription_with_http_info(self, request):
"""查询订阅
应用服务器可调用此接口查询物联网平台中指定订阅的配置信息
:param ShowSubscriptionRequest request
:return: ShowSubscriptionResponse
"""
all_params = ['subscription_id', 'instance_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'subscription_id' in local_var_params:
path_params['subscription_id'] = local_var_params['subscription_id']
query_params = []
header_params = {}
if 'instance_id' in local_var_params:
header_params['Instance-Id'] = local_var_params['instance_id']
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v5/iot/{project_id}/subscriptions/{subscription_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowSubscriptionResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_subscription_async(self, request):
"""修改订阅
应用服务器可调用此接口修改物联网平台中的指定订阅配置当前仅支持修改订阅回调地址callbackurl
:param UpdateSubscriptionRequest request
:return: UpdateSubscriptionResponse
"""
return self.update_subscription_with_http_info(request)
def update_subscription_with_http_info(self, request):
"""修改订阅
应用服务器可调用此接口修改物联网平台中的指定订阅配置当前仅支持修改订阅回调地址callbackurl
:param UpdateSubscriptionRequest request
:return: UpdateSubscriptionResponse
"""
all_params = ['subscription_id', 'instance_id', 'update_subscription_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'subscription_id' in local_var_params:
path_params['subscription_id'] = local_var_params['subscription_id']
query_params = []
header_params = {}
if 'instance_id' in local_var_params:
header_params['Instance-Id'] = local_var_params['instance_id']
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v5/iot/{project_id}/subscriptions/{subscription_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateSubscriptionResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_resources_by_tags_async(self, request):
"""按标签查询资源

View File

@ -4522,347 +4522,6 @@ class IoTDAClient(Client):
request_type=request.__class__.__name__)
def create_subscription(self, request):
"""创建订阅
应用服务器可调用此接口订阅物联网平台资源的变化事件当资源发生变化时如设备激活设备数据更新等平台会向应用服务器发送通知消息
:param CreateSubscriptionRequest request
:return: CreateSubscriptionResponse
"""
return self.create_subscription_with_http_info(request)
def create_subscription_with_http_info(self, request):
"""创建订阅
应用服务器可调用此接口订阅物联网平台资源的变化事件当资源发生变化时如设备激活设备数据更新等平台会向应用服务器发送通知消息
:param CreateSubscriptionRequest request
:return: CreateSubscriptionResponse
"""
all_params = ['instance_id', 'create_subscription_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
if 'instance_id' in local_var_params:
header_params['Instance-Id'] = local_var_params['instance_id']
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v5/iot/{project_id}/subscriptions',
method='POST',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='CreateSubscriptionResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def delete_subscription(self, request):
"""删除订阅
应用服务器可调用此接口删除物联网平台中的指定订阅配置
:param DeleteSubscriptionRequest request
:return: DeleteSubscriptionResponse
"""
return self.delete_subscription_with_http_info(request)
def delete_subscription_with_http_info(self, request):
"""删除订阅
应用服务器可调用此接口删除物联网平台中的指定订阅配置
:param DeleteSubscriptionRequest request
:return: DeleteSubscriptionResponse
"""
all_params = ['subscription_id', 'instance_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'subscription_id' in local_var_params:
path_params['subscription_id'] = local_var_params['subscription_id']
query_params = []
header_params = {}
if 'instance_id' in local_var_params:
header_params['Instance-Id'] = local_var_params['instance_id']
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v5/iot/{project_id}/subscriptions/{subscription_id}',
method='DELETE',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='DeleteSubscriptionResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_subscriptions(self, request):
"""查询订阅列表
应用服务器可调用此接口查询物联网平台中的订阅配置信息列表
:param ListSubscriptionsRequest request
:return: ListSubscriptionsResponse
"""
return self.list_subscriptions_with_http_info(request)
def list_subscriptions_with_http_info(self, request):
"""查询订阅列表
应用服务器可调用此接口查询物联网平台中的订阅配置信息列表
:param ListSubscriptionsRequest request
:return: ListSubscriptionsResponse
"""
all_params = ['instance_id', 'resource', 'event', 'callbackurl', 'app_id', 'channel', 'limit', 'marker', 'offset']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
query_params = []
if 'resource' in local_var_params:
query_params.append(('resource', local_var_params['resource']))
if 'event' in local_var_params:
query_params.append(('event', local_var_params['event']))
if 'callbackurl' in local_var_params:
query_params.append(('callbackurl', local_var_params['callbackurl']))
if 'app_id' in local_var_params:
query_params.append(('app_id', local_var_params['app_id']))
if 'channel' in local_var_params:
query_params.append(('channel', local_var_params['channel']))
if 'limit' in local_var_params:
query_params.append(('limit', local_var_params['limit']))
if 'marker' in local_var_params:
query_params.append(('marker', local_var_params['marker']))
if 'offset' in local_var_params:
query_params.append(('offset', local_var_params['offset']))
header_params = {}
if 'instance_id' in local_var_params:
header_params['Instance-Id'] = local_var_params['instance_id']
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v5/iot/{project_id}/subscriptions',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ListSubscriptionsResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def show_subscription(self, request):
"""查询订阅
应用服务器可调用此接口查询物联网平台中指定订阅的配置信息
:param ShowSubscriptionRequest request
:return: ShowSubscriptionResponse
"""
return self.show_subscription_with_http_info(request)
def show_subscription_with_http_info(self, request):
"""查询订阅
应用服务器可调用此接口查询物联网平台中指定订阅的配置信息
:param ShowSubscriptionRequest request
:return: ShowSubscriptionResponse
"""
all_params = ['subscription_id', 'instance_id']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'subscription_id' in local_var_params:
path_params['subscription_id'] = local_var_params['subscription_id']
query_params = []
header_params = {}
if 'instance_id' in local_var_params:
header_params['Instance-Id'] = local_var_params['instance_id']
form_params = {}
body_params = None
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v5/iot/{project_id}/subscriptions/{subscription_id}',
method='GET',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='ShowSubscriptionResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def update_subscription(self, request):
"""修改订阅
应用服务器可调用此接口修改物联网平台中的指定订阅配置当前仅支持修改订阅回调地址callbackurl
:param UpdateSubscriptionRequest request
:return: UpdateSubscriptionResponse
"""
return self.update_subscription_with_http_info(request)
def update_subscription_with_http_info(self, request):
"""修改订阅
应用服务器可调用此接口修改物联网平台中的指定订阅配置当前仅支持修改订阅回调地址callbackurl
:param UpdateSubscriptionRequest request
:return: UpdateSubscriptionResponse
"""
all_params = ['subscription_id', 'instance_id', 'update_subscription_request_body']
local_var_params = {}
for attr in request.attribute_map:
if hasattr(request, attr):
local_var_params[attr] = getattr(request, attr)
collection_formats = {}
path_params = {}
if 'subscription_id' in local_var_params:
path_params['subscription_id'] = local_var_params['subscription_id']
query_params = []
header_params = {}
if 'instance_id' in local_var_params:
header_params['Instance-Id'] = local_var_params['instance_id']
form_params = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
if isinstance(request, SdkStreamRequest):
body_params = request.get_file_stream()
response_headers = []
header_params['Content-Type'] = http_utils.select_header_content_type(
['application/json'])
auth_settings = []
return self.call_api(
resource_path='/v5/iot/{project_id}/subscriptions/{subscription_id}',
method='PUT',
path_params=path_params,
query_params=query_params,
header_params=header_params,
body=body_params,
post_params=form_params,
response_type='UpdateSubscriptionResponse',
response_headers=response_headers,
auth_settings=auth_settings,
collection_formats=collection_formats,
request_type=request.__class__.__name__)
def list_resources_by_tags(self, request):
"""按标签查询资源

View File

@ -69,9 +69,6 @@ from huaweicloudsdkiotda.v5.model.create_rule_action_request import CreateRuleAc
from huaweicloudsdkiotda.v5.model.create_rule_action_response import CreateRuleActionResponse
from huaweicloudsdkiotda.v5.model.create_rule_request import CreateRuleRequest
from huaweicloudsdkiotda.v5.model.create_rule_response import CreateRuleResponse
from huaweicloudsdkiotda.v5.model.create_sub_req import CreateSubReq
from huaweicloudsdkiotda.v5.model.create_subscription_request import CreateSubscriptionRequest
from huaweicloudsdkiotda.v5.model.create_subscription_response import CreateSubscriptionResponse
from huaweicloudsdkiotda.v5.model.daily_timer_type import DailyTimerType
from huaweicloudsdkiotda.v5.model.delete_application_request import DeleteApplicationRequest
from huaweicloudsdkiotda.v5.model.delete_application_response import DeleteApplicationResponse
@ -93,8 +90,6 @@ from huaweicloudsdkiotda.v5.model.delete_rule_action_request import DeleteRuleAc
from huaweicloudsdkiotda.v5.model.delete_rule_action_response import DeleteRuleActionResponse
from huaweicloudsdkiotda.v5.model.delete_rule_request import DeleteRuleRequest
from huaweicloudsdkiotda.v5.model.delete_rule_response import DeleteRuleResponse
from huaweicloudsdkiotda.v5.model.delete_subscription_request import DeleteSubscriptionRequest
from huaweicloudsdkiotda.v5.model.delete_subscription_response import DeleteSubscriptionResponse
from huaweicloudsdkiotda.v5.model.device_command_request import DeviceCommandRequest
from huaweicloudsdkiotda.v5.model.device_data_condition import DeviceDataCondition
from huaweicloudsdkiotda.v5.model.device_group_response_dto import DeviceGroupResponseDTO
@ -143,8 +138,6 @@ from huaweicloudsdkiotda.v5.model.list_rule_actions_request import ListRuleActio
from huaweicloudsdkiotda.v5.model.list_rule_actions_response import ListRuleActionsResponse
from huaweicloudsdkiotda.v5.model.list_rules_request import ListRulesRequest
from huaweicloudsdkiotda.v5.model.list_rules_response import ListRulesResponse
from huaweicloudsdkiotda.v5.model.list_subscriptions_request import ListSubscriptionsRequest
from huaweicloudsdkiotda.v5.model.list_subscriptions_response import ListSubscriptionsResponse
from huaweicloudsdkiotda.v5.model.lts_forwarding import LtsForwarding
from huaweicloudsdkiotda.v5.model.message_result import MessageResult
from huaweicloudsdkiotda.v5.model.mqs_forwarding import MqsForwarding
@ -207,13 +200,9 @@ from huaweicloudsdkiotda.v5.model.show_rule_action_request import ShowRuleAction
from huaweicloudsdkiotda.v5.model.show_rule_action_response import ShowRuleActionResponse
from huaweicloudsdkiotda.v5.model.show_rule_request import ShowRuleRequest
from huaweicloudsdkiotda.v5.model.show_rule_response import ShowRuleResponse
from huaweicloudsdkiotda.v5.model.show_subscription_request import ShowSubscriptionRequest
from huaweicloudsdkiotda.v5.model.show_subscription_response import ShowSubscriptionResponse
from huaweicloudsdkiotda.v5.model.simple_timer_type import SimpleTimerType
from huaweicloudsdkiotda.v5.model.simplify_device import SimplifyDevice
from huaweicloudsdkiotda.v5.model.strategy import Strategy
from huaweicloudsdkiotda.v5.model.subject import Subject
from huaweicloudsdkiotda.v5.model.subscription_item import SubscriptionItem
from huaweicloudsdkiotda.v5.model.tag_device_request import TagDeviceRequest
from huaweicloudsdkiotda.v5.model.tag_device_response import TagDeviceResponse
from huaweicloudsdkiotda.v5.model.tag_v5_dto import TagV5DTO
@ -250,7 +239,4 @@ from huaweicloudsdkiotda.v5.model.update_rule_action_response import UpdateRuleA
from huaweicloudsdkiotda.v5.model.update_rule_req import UpdateRuleReq
from huaweicloudsdkiotda.v5.model.update_rule_request import UpdateRuleRequest
from huaweicloudsdkiotda.v5.model.update_rule_response import UpdateRuleResponse
from huaweicloudsdkiotda.v5.model.update_sub_req import UpdateSubReq
from huaweicloudsdkiotda.v5.model.update_subscription_request import UpdateSubscriptionRequest
from huaweicloudsdkiotda.v5.model.update_subscription_response import UpdateSubscriptionResponse
from huaweicloudsdkiotda.v5.model.verify_certificate_dto import VerifyCertificateDTO

View File

@ -1,186 +0,0 @@
# coding: utf-8
import pprint
import re
import six
class CreateSubReq:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'subject': 'Subject',
'callbackurl': 'str',
'app_id': 'str',
'channel': 'str'
}
attribute_map = {
'subject': 'subject',
'callbackurl': 'callbackurl',
'app_id': 'app_id',
'channel': 'channel'
}
def __init__(self, subject=None, callbackurl=None, app_id=None, channel=None):
"""CreateSubReq - a model defined in huaweicloud sdk"""
self._subject = None
self._callbackurl = None
self._app_id = None
self._channel = None
self.discriminator = None
self.subject = subject
self.callbackurl = callbackurl
if app_id is not None:
self.app_id = app_id
self.channel = channel
@property
def subject(self):
"""Gets the subject of this CreateSubReq.
:return: The subject of this CreateSubReq.
:rtype: Subject
"""
return self._subject
@subject.setter
def subject(self, subject):
"""Sets the subject of this CreateSubReq.
:param subject: The subject of this CreateSubReq.
:type: Subject
"""
self._subject = subject
@property
def callbackurl(self):
"""Gets the callbackurl of this CreateSubReq.
订阅的回调地址用于接收对应资源事件的通知消息例如https://10.10.10.10:443/callbackurltest
:return: The callbackurl of this CreateSubReq.
:rtype: str
"""
return self._callbackurl
@callbackurl.setter
def callbackurl(self, callbackurl):
"""Sets the callbackurl of this CreateSubReq.
订阅的回调地址用于接收对应资源事件的通知消息例如https://10.10.10.10:443/callbackurltest
:param callbackurl: The callbackurl of this CreateSubReq.
:type: str
"""
self._callbackurl = callbackurl
@property
def app_id(self):
"""Gets the app_id of this CreateSubReq.
资源空间ID此参数为非必选参数存在多资源空间的用户需要使用该接口时建议携带该参数指定订阅哪个资源空间下的消息通知否则订阅的消息通知将会归属到[默认资源空间](https://support.huaweicloud.com/usermanual-iothub/iot_01_0006.html#section0)下。
:return: The app_id of this CreateSubReq.
:rtype: str
"""
return self._app_id
@app_id.setter
def app_id(self, app_id):
"""Sets the app_id of this CreateSubReq.
资源空间ID此参数为非必选参数存在多资源空间的用户需要使用该接口时建议携带该参数指定订阅哪个资源空间下的消息通知否则订阅的消息通知将会归属到[默认资源空间](https://support.huaweicloud.com/usermanual-iothub/iot_01_0006.html#section0)下。
:param app_id: The app_id of this CreateSubReq.
:type: str
"""
self._app_id = app_id
@property
def channel(self):
"""Gets the channel of this CreateSubReq.
物联网平台推送通知消息时使用的协议通道使用http填充表示该订阅推送协议通道为http(s)协议
:return: The channel of this CreateSubReq.
:rtype: str
"""
return self._channel
@channel.setter
def channel(self, channel):
"""Sets the channel of this CreateSubReq.
物联网平台推送通知消息时使用的协议通道使用http填充表示该订阅推送协议通道为http(s)协议
:param channel: The channel of this CreateSubReq.
:type: str
"""
self._channel = channel
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, CreateSubReq):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -1,189 +0,0 @@
# coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class CreateSubscriptionResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'subscription_id': 'str',
'subject': 'Subject',
'callbackurl': 'str',
'channel': 'str'
}
attribute_map = {
'subscription_id': 'subscription_id',
'subject': 'subject',
'callbackurl': 'callbackurl',
'channel': 'channel'
}
def __init__(self, subscription_id=None, subject=None, callbackurl=None, channel=None):
"""CreateSubscriptionResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._subscription_id = None
self._subject = None
self._callbackurl = None
self._channel = None
self.discriminator = None
if subscription_id is not None:
self.subscription_id = subscription_id
if subject is not None:
self.subject = subject
if callbackurl is not None:
self.callbackurl = callbackurl
if channel is not None:
self.channel = channel
@property
def subscription_id(self):
"""Gets the subscription_id of this CreateSubscriptionResponse.
订阅ID用于唯一标识一个订阅在创建订阅时由物联网平台分配获得
:return: The subscription_id of this CreateSubscriptionResponse.
:rtype: str
"""
return self._subscription_id
@subscription_id.setter
def subscription_id(self, subscription_id):
"""Sets the subscription_id of this CreateSubscriptionResponse.
订阅ID用于唯一标识一个订阅在创建订阅时由物联网平台分配获得
:param subscription_id: The subscription_id of this CreateSubscriptionResponse.
:type: str
"""
self._subscription_id = subscription_id
@property
def subject(self):
"""Gets the subject of this CreateSubscriptionResponse.
:return: The subject of this CreateSubscriptionResponse.
:rtype: Subject
"""
return self._subject
@subject.setter
def subject(self, subject):
"""Sets the subject of this CreateSubscriptionResponse.
:param subject: The subject of this CreateSubscriptionResponse.
:type: Subject
"""
self._subject = subject
@property
def callbackurl(self):
"""Gets the callbackurl of this CreateSubscriptionResponse.
订阅的回调地址用于接收对应资源事件的通知消息
:return: The callbackurl of this CreateSubscriptionResponse.
:rtype: str
"""
return self._callbackurl
@callbackurl.setter
def callbackurl(self, callbackurl):
"""Sets the callbackurl of this CreateSubscriptionResponse.
订阅的回调地址用于接收对应资源事件的通知消息
:param callbackurl: The callbackurl of this CreateSubscriptionResponse.
:type: str
"""
self._callbackurl = callbackurl
@property
def channel(self):
"""Gets the channel of this CreateSubscriptionResponse.
物联网平台推送通知消息时使用的协议通道使用http填充表示该订阅推送协议通道为http(s)协议
:return: The channel of this CreateSubscriptionResponse.
:rtype: str
"""
return self._channel
@channel.setter
def channel(self, channel):
"""Sets the channel of this CreateSubscriptionResponse.
物联网平台推送通知消息时使用的协议通道使用http填充表示该订阅推送协议通道为http(s)协议
:param channel: The channel of this CreateSubscriptionResponse.
:type: str
"""
self._channel = channel
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, CreateSubscriptionResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -1,308 +0,0 @@
# coding: utf-8
import pprint
import re
import six
class ListSubscriptionsRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'instance_id': 'str',
'resource': 'str',
'event': 'str',
'callbackurl': 'str',
'app_id': 'str',
'channel': 'str',
'limit': 'int',
'marker': 'str',
'offset': 'int'
}
attribute_map = {
'instance_id': 'Instance-Id',
'resource': 'resource',
'event': 'event',
'callbackurl': 'callbackurl',
'app_id': 'app_id',
'channel': 'channel',
'limit': 'limit',
'marker': 'marker',
'offset': 'offset'
}
def __init__(self, instance_id=None, resource=None, event=None, callbackurl=None, app_id=None, channel=None, limit=None, marker=None, offset=None):
"""ListSubscriptionsRequest - a model defined in huaweicloud sdk"""
self._instance_id = None
self._resource = None
self._event = None
self._callbackurl = None
self._app_id = None
self._channel = None
self._limit = None
self._marker = None
self._offset = None
self.discriminator = None
if instance_id is not None:
self.instance_id = instance_id
if resource is not None:
self.resource = resource
if event is not None:
self.event = event
if callbackurl is not None:
self.callbackurl = callbackurl
if app_id is not None:
self.app_id = app_id
if channel is not None:
self.channel = channel
if limit is not None:
self.limit = limit
if marker is not None:
self.marker = marker
if offset is not None:
self.offset = offset
@property
def instance_id(self):
"""Gets the instance_id of this ListSubscriptionsRequest.
:return: The instance_id of this ListSubscriptionsRequest.
:rtype: str
"""
return self._instance_id
@instance_id.setter
def instance_id(self, instance_id):
"""Sets the instance_id of this ListSubscriptionsRequest.
:param instance_id: The instance_id of this ListSubscriptionsRequest.
:type: str
"""
self._instance_id = instance_id
@property
def resource(self):
"""Gets the resource of this ListSubscriptionsRequest.
:return: The resource of this ListSubscriptionsRequest.
:rtype: str
"""
return self._resource
@resource.setter
def resource(self, resource):
"""Sets the resource of this ListSubscriptionsRequest.
:param resource: The resource of this ListSubscriptionsRequest.
:type: str
"""
self._resource = resource
@property
def event(self):
"""Gets the event of this ListSubscriptionsRequest.
:return: The event of this ListSubscriptionsRequest.
:rtype: str
"""
return self._event
@event.setter
def event(self, event):
"""Sets the event of this ListSubscriptionsRequest.
:param event: The event of this ListSubscriptionsRequest.
:type: str
"""
self._event = event
@property
def callbackurl(self):
"""Gets the callbackurl of this ListSubscriptionsRequest.
:return: The callbackurl of this ListSubscriptionsRequest.
:rtype: str
"""
return self._callbackurl
@callbackurl.setter
def callbackurl(self, callbackurl):
"""Sets the callbackurl of this ListSubscriptionsRequest.
:param callbackurl: The callbackurl of this ListSubscriptionsRequest.
:type: str
"""
self._callbackurl = callbackurl
@property
def app_id(self):
"""Gets the app_id of this ListSubscriptionsRequest.
:return: The app_id of this ListSubscriptionsRequest.
:rtype: str
"""
return self._app_id
@app_id.setter
def app_id(self, app_id):
"""Sets the app_id of this ListSubscriptionsRequest.
:param app_id: The app_id of this ListSubscriptionsRequest.
:type: str
"""
self._app_id = app_id
@property
def channel(self):
"""Gets the channel of this ListSubscriptionsRequest.
:return: The channel of this ListSubscriptionsRequest.
:rtype: str
"""
return self._channel
@channel.setter
def channel(self, channel):
"""Sets the channel of this ListSubscriptionsRequest.
:param channel: The channel of this ListSubscriptionsRequest.
:type: str
"""
self._channel = channel
@property
def limit(self):
"""Gets the limit of this ListSubscriptionsRequest.
:return: The limit of this ListSubscriptionsRequest.
:rtype: int
"""
return self._limit
@limit.setter
def limit(self, limit):
"""Sets the limit of this ListSubscriptionsRequest.
:param limit: The limit of this ListSubscriptionsRequest.
:type: int
"""
self._limit = limit
@property
def marker(self):
"""Gets the marker of this ListSubscriptionsRequest.
:return: The marker of this ListSubscriptionsRequest.
:rtype: str
"""
return self._marker
@marker.setter
def marker(self, marker):
"""Sets the marker of this ListSubscriptionsRequest.
:param marker: The marker of this ListSubscriptionsRequest.
:type: str
"""
self._marker = marker
@property
def offset(self):
"""Gets the offset of this ListSubscriptionsRequest.
:return: The offset of this ListSubscriptionsRequest.
:rtype: int
"""
return self._offset
@offset.setter
def offset(self, offset):
"""Sets the offset of this ListSubscriptionsRequest.
:param offset: The offset of this ListSubscriptionsRequest.
:type: int
"""
self._offset = offset
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ListSubscriptionsRequest):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -1,164 +0,0 @@
# coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class ListSubscriptionsResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'subscriptions': 'list[SubscriptionItem]',
'count': 'int',
'marker': 'str'
}
attribute_map = {
'subscriptions': 'subscriptions',
'count': 'count',
'marker': 'marker'
}
def __init__(self, subscriptions=None, count=None, marker=None):
"""ListSubscriptionsResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._subscriptions = None
self._count = None
self._marker = None
self.discriminator = None
if subscriptions is not None:
self.subscriptions = subscriptions
if count is not None:
self.count = count
if marker is not None:
self.marker = marker
@property
def subscriptions(self):
"""Gets the subscriptions of this ListSubscriptionsResponse.
订阅配置信息列表
:return: The subscriptions of this ListSubscriptionsResponse.
:rtype: list[SubscriptionItem]
"""
return self._subscriptions
@subscriptions.setter
def subscriptions(self, subscriptions):
"""Sets the subscriptions of this ListSubscriptionsResponse.
订阅配置信息列表
:param subscriptions: The subscriptions of this ListSubscriptionsResponse.
:type: list[SubscriptionItem]
"""
self._subscriptions = subscriptions
@property
def count(self):
"""Gets the count of this ListSubscriptionsResponse.
满足查询条件的记录总数
:return: The count of this ListSubscriptionsResponse.
:rtype: int
"""
return self._count
@count.setter
def count(self, count):
"""Sets the count of this ListSubscriptionsResponse.
满足查询条件的记录总数
:param count: The count of this ListSubscriptionsResponse.
:type: int
"""
self._count = count
@property
def marker(self):
"""Gets the marker of this ListSubscriptionsResponse.
本次分页查询结果中最后一条记录的ID可在下一次分页查询时使用
:return: The marker of this ListSubscriptionsResponse.
:rtype: str
"""
return self._marker
@marker.setter
def marker(self, marker):
"""Sets the marker of this ListSubscriptionsResponse.
本次分页查询结果中最后一条记录的ID可在下一次分页查询时使用
:param marker: The marker of this ListSubscriptionsResponse.
:type: str
"""
self._marker = marker
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ListSubscriptionsResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -1,189 +0,0 @@
# coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class ShowSubscriptionResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'subscription_id': 'str',
'subject': 'Subject',
'callbackurl': 'str',
'channel': 'str'
}
attribute_map = {
'subscription_id': 'subscription_id',
'subject': 'subject',
'callbackurl': 'callbackurl',
'channel': 'channel'
}
def __init__(self, subscription_id=None, subject=None, callbackurl=None, channel=None):
"""ShowSubscriptionResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._subscription_id = None
self._subject = None
self._callbackurl = None
self._channel = None
self.discriminator = None
if subscription_id is not None:
self.subscription_id = subscription_id
if subject is not None:
self.subject = subject
if callbackurl is not None:
self.callbackurl = callbackurl
if channel is not None:
self.channel = channel
@property
def subscription_id(self):
"""Gets the subscription_id of this ShowSubscriptionResponse.
订阅ID用于唯一标识一个订阅在创建订阅时由物联网平台分配获得
:return: The subscription_id of this ShowSubscriptionResponse.
:rtype: str
"""
return self._subscription_id
@subscription_id.setter
def subscription_id(self, subscription_id):
"""Sets the subscription_id of this ShowSubscriptionResponse.
订阅ID用于唯一标识一个订阅在创建订阅时由物联网平台分配获得
:param subscription_id: The subscription_id of this ShowSubscriptionResponse.
:type: str
"""
self._subscription_id = subscription_id
@property
def subject(self):
"""Gets the subject of this ShowSubscriptionResponse.
:return: The subject of this ShowSubscriptionResponse.
:rtype: Subject
"""
return self._subject
@subject.setter
def subject(self, subject):
"""Sets the subject of this ShowSubscriptionResponse.
:param subject: The subject of this ShowSubscriptionResponse.
:type: Subject
"""
self._subject = subject
@property
def callbackurl(self):
"""Gets the callbackurl of this ShowSubscriptionResponse.
订阅的回调地址用于接收对应资源事件的通知消息
:return: The callbackurl of this ShowSubscriptionResponse.
:rtype: str
"""
return self._callbackurl
@callbackurl.setter
def callbackurl(self, callbackurl):
"""Sets the callbackurl of this ShowSubscriptionResponse.
订阅的回调地址用于接收对应资源事件的通知消息
:param callbackurl: The callbackurl of this ShowSubscriptionResponse.
:type: str
"""
self._callbackurl = callbackurl
@property
def channel(self):
"""Gets the channel of this ShowSubscriptionResponse.
物联网平台推送通知消息时使用的协议通道使用http填充表示该订阅推送协议通道为http(s)协议
:return: The channel of this ShowSubscriptionResponse.
:rtype: str
"""
return self._channel
@channel.setter
def channel(self, channel):
"""Sets the channel of this ShowSubscriptionResponse.
物联网平台推送通知消息时使用的协议通道使用http填充表示该订阅推送协议通道为http(s)协议
:param channel: The channel of this ShowSubscriptionResponse.
:type: str
"""
self._channel = channel
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ShowSubscriptionResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -1,135 +0,0 @@
# coding: utf-8
import pprint
import re
import six
class Subject:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'resource': 'str',
'event': 'str'
}
attribute_map = {
'resource': 'resource',
'event': 'event'
}
def __init__(self, resource=None, event=None):
"""Subject - a model defined in huaweicloud sdk"""
self._resource = None
self._event = None
self.discriminator = None
self.resource = resource
self.event = event
@property
def resource(self):
"""Gets the resource of this Subject.
订阅的资源名称 - device设备 - device.data设备数据 - device.message.status设备消息状态 - device.message设备消息 - device.status设备状态 - batchtask.status批量任务状态
:return: The resource of this Subject.
:rtype: str
"""
return self._resource
@resource.setter
def resource(self, resource):
"""Sets the resource of this Subject.
订阅的资源名称 - device设备 - device.data设备数据 - device.message.status设备消息状态 - device.message设备消息 - device.status设备状态 - batchtask.status批量任务状态
:param resource: The resource of this Subject.
:type: str
"""
self._resource = resource
@property
def event(self):
"""Gets the event of this Subject.
订阅的资源事件取值范围activateupdateup event需要与resource关联使用具体的resourceevent映射关系如下 - deviceactivate设备激活 - device.dataupdate设备数据变化 - device.message.statusupdate设备消息状态 - device.messagereport设备消息上报 - device.statusupdate 设备状态变化 - batchtask.statusupdate 批量任务状态变化
:return: The event of this Subject.
:rtype: str
"""
return self._event
@event.setter
def event(self, event):
"""Sets the event of this Subject.
订阅的资源事件取值范围activateupdateup event需要与resource关联使用具体的resourceevent映射关系如下 - deviceactivate设备激活 - device.dataupdate设备数据变化 - device.message.statusupdate设备消息状态 - device.messagereport设备消息上报 - device.statusupdate 设备状态变化 - batchtask.statusupdate 批量任务状态变化
:param event: The event of this Subject.
:type: str
"""
self._event = event
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, Subject):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -1,189 +0,0 @@
# coding: utf-8
import pprint
import re
import six
class SubscriptionItem:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'subscription_id': 'str',
'subject': 'Subject',
'callbackurl': 'str',
'channel': 'str'
}
attribute_map = {
'subscription_id': 'subscription_id',
'subject': 'subject',
'callbackurl': 'callbackurl',
'channel': 'channel'
}
def __init__(self, subscription_id=None, subject=None, callbackurl=None, channel=None):
"""SubscriptionItem - a model defined in huaweicloud sdk"""
self._subscription_id = None
self._subject = None
self._callbackurl = None
self._channel = None
self.discriminator = None
if subscription_id is not None:
self.subscription_id = subscription_id
if subject is not None:
self.subject = subject
if callbackurl is not None:
self.callbackurl = callbackurl
if channel is not None:
self.channel = channel
@property
def subscription_id(self):
"""Gets the subscription_id of this SubscriptionItem.
订阅ID用于唯一标识一个订阅在创建订阅时由物联网平台分配获得
:return: The subscription_id of this SubscriptionItem.
:rtype: str
"""
return self._subscription_id
@subscription_id.setter
def subscription_id(self, subscription_id):
"""Sets the subscription_id of this SubscriptionItem.
订阅ID用于唯一标识一个订阅在创建订阅时由物联网平台分配获得
:param subscription_id: The subscription_id of this SubscriptionItem.
:type: str
"""
self._subscription_id = subscription_id
@property
def subject(self):
"""Gets the subject of this SubscriptionItem.
:return: The subject of this SubscriptionItem.
:rtype: Subject
"""
return self._subject
@subject.setter
def subject(self, subject):
"""Sets the subject of this SubscriptionItem.
:param subject: The subject of this SubscriptionItem.
:type: Subject
"""
self._subject = subject
@property
def callbackurl(self):
"""Gets the callbackurl of this SubscriptionItem.
订阅的回调地址用于接收对应资源事件的通知消息
:return: The callbackurl of this SubscriptionItem.
:rtype: str
"""
return self._callbackurl
@callbackurl.setter
def callbackurl(self, callbackurl):
"""Sets the callbackurl of this SubscriptionItem.
订阅的回调地址用于接收对应资源事件的通知消息
:param callbackurl: The callbackurl of this SubscriptionItem.
:type: str
"""
self._callbackurl = callbackurl
@property
def channel(self):
"""Gets the channel of this SubscriptionItem.
物联网平台推送通知消息时使用的协议通道使用http填充表示该订阅推送协议通道为http(s)协议
:return: The channel of this SubscriptionItem.
:rtype: str
"""
return self._channel
@channel.setter
def channel(self, channel):
"""Sets the channel of this SubscriptionItem.
物联网平台推送通知消息时使用的协议通道使用http填充表示该订阅推送协议通道为http(s)协议
:param channel: The channel of this SubscriptionItem.
:type: str
"""
self._channel = channel
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, SubscriptionItem):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -1,157 +0,0 @@
# coding: utf-8
import pprint
import re
import six
class UpdateSubscriptionRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'instance_id': 'str',
'subscription_id': 'str',
'body': 'UpdateSubReq'
}
attribute_map = {
'instance_id': 'Instance-Id',
'subscription_id': 'subscription_id',
'body': 'body'
}
def __init__(self, instance_id=None, subscription_id=None, body=None):
"""UpdateSubscriptionRequest - a model defined in huaweicloud sdk"""
self._instance_id = None
self._subscription_id = None
self._body = None
self.discriminator = None
if instance_id is not None:
self.instance_id = instance_id
self.subscription_id = subscription_id
if body is not None:
self.body = body
@property
def instance_id(self):
"""Gets the instance_id of this UpdateSubscriptionRequest.
:return: The instance_id of this UpdateSubscriptionRequest.
:rtype: str
"""
return self._instance_id
@instance_id.setter
def instance_id(self, instance_id):
"""Sets the instance_id of this UpdateSubscriptionRequest.
:param instance_id: The instance_id of this UpdateSubscriptionRequest.
:type: str
"""
self._instance_id = instance_id
@property
def subscription_id(self):
"""Gets the subscription_id of this UpdateSubscriptionRequest.
:return: The subscription_id of this UpdateSubscriptionRequest.
:rtype: str
"""
return self._subscription_id
@subscription_id.setter
def subscription_id(self, subscription_id):
"""Sets the subscription_id of this UpdateSubscriptionRequest.
:param subscription_id: The subscription_id of this UpdateSubscriptionRequest.
:type: str
"""
self._subscription_id = subscription_id
@property
def body(self):
"""Gets the body of this UpdateSubscriptionRequest.
:return: The body of this UpdateSubscriptionRequest.
:rtype: UpdateSubReq
"""
return self._body
@body.setter
def body(self, body):
"""Sets the body of this UpdateSubscriptionRequest.
:param body: The body of this UpdateSubscriptionRequest.
:type: UpdateSubReq
"""
self._body = body
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, UpdateSubscriptionRequest):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -1,189 +0,0 @@
# coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class UpdateSubscriptionResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'subscription_id': 'str',
'subject': 'Subject',
'callbackurl': 'str',
'channel': 'str'
}
attribute_map = {
'subscription_id': 'subscription_id',
'subject': 'subject',
'callbackurl': 'callbackurl',
'channel': 'channel'
}
def __init__(self, subscription_id=None, subject=None, callbackurl=None, channel=None):
"""UpdateSubscriptionResponse - a model defined in huaweicloud sdk"""
super().__init__()
self._subscription_id = None
self._subject = None
self._callbackurl = None
self._channel = None
self.discriminator = None
if subscription_id is not None:
self.subscription_id = subscription_id
if subject is not None:
self.subject = subject
if callbackurl is not None:
self.callbackurl = callbackurl
if channel is not None:
self.channel = channel
@property
def subscription_id(self):
"""Gets the subscription_id of this UpdateSubscriptionResponse.
订阅ID用于唯一标识一个订阅在创建订阅时由物联网平台分配获得
:return: The subscription_id of this UpdateSubscriptionResponse.
:rtype: str
"""
return self._subscription_id
@subscription_id.setter
def subscription_id(self, subscription_id):
"""Sets the subscription_id of this UpdateSubscriptionResponse.
订阅ID用于唯一标识一个订阅在创建订阅时由物联网平台分配获得
:param subscription_id: The subscription_id of this UpdateSubscriptionResponse.
:type: str
"""
self._subscription_id = subscription_id
@property
def subject(self):
"""Gets the subject of this UpdateSubscriptionResponse.
:return: The subject of this UpdateSubscriptionResponse.
:rtype: Subject
"""
return self._subject
@subject.setter
def subject(self, subject):
"""Sets the subject of this UpdateSubscriptionResponse.
:param subject: The subject of this UpdateSubscriptionResponse.
:type: Subject
"""
self._subject = subject
@property
def callbackurl(self):
"""Gets the callbackurl of this UpdateSubscriptionResponse.
订阅的回调地址用于接收对应资源事件的通知消息
:return: The callbackurl of this UpdateSubscriptionResponse.
:rtype: str
"""
return self._callbackurl
@callbackurl.setter
def callbackurl(self, callbackurl):
"""Sets the callbackurl of this UpdateSubscriptionResponse.
订阅的回调地址用于接收对应资源事件的通知消息
:param callbackurl: The callbackurl of this UpdateSubscriptionResponse.
:type: str
"""
self._callbackurl = callbackurl
@property
def channel(self):
"""Gets the channel of this UpdateSubscriptionResponse.
物联网平台推送通知消息时使用的协议通道使用http填充表示该订阅推送协议通道为http(s)协议
:return: The channel of this UpdateSubscriptionResponse.
:rtype: str
"""
return self._channel
@channel.setter
def channel(self, channel):
"""Sets the channel of this UpdateSubscriptionResponse.
物联网平台推送通知消息时使用的协议通道使用http填充表示该订阅推送协议通道为http(s)协议
:param channel: The channel of this UpdateSubscriptionResponse.
:type: str
"""
self._channel = channel
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, UpdateSubscriptionResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,26 @@
# coding: utf-8
import types
from huaweicloudsdkcore.region.region import Region
class IoTDARegion:
def __init__(self):
pass
CN_NORTH_4 = Region(id="cn-north-4", endpoint="https://iotda.cn-north-4.myhuaweicloud.com")
static_fields = types.MappingProxyType({
"cn-north-4": CN_NORTH_4,
})
@staticmethod
def value_of(region_id, static_fields=static_fields):
if region_id is None or len(region_id) == 0:
raise KeyError("Unexpected empty parameter: region_id.")
if not static_fields.get(region_id):
raise KeyError("Unexpected region_id: " + region_id)
return static_fields.get(region_id)

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkiotda"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkkafka"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkkms"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdklive"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -6,23 +6,24 @@ from concurrent.futures.thread import ThreadPoolExecutor
from pprint import pprint
from huaweicloudsdkcore.auth.credentials import Credentials
from huaweicloudsdkcore.exceptions.exceptions import SdkException
from huaweicloudsdkcore.exceptions.exceptions import SdkException, ApiValueError
from huaweicloudsdkcore.sdk_request import SdkRequest
from huaweicloudsdkcore.signer.signer import process_canonical_query_string
class MeetingCredentials(Credentials):
def __init__(self, username, password):
def __init__(self, user_name, user_password):
self._token = None
self._last_token_date = None
if username is None or username == "":
raise ApiValueError("username can not be null.")
if user_name is None or user_name == "":
raise ApiValueError("user_name can not be null.")
if password is None or password == "":
raise ApiValueError("password can not be null.")
if user_password is None or user_password == "":
raise ApiValueError("user_password can not be null.")
self._username = username
self._password = password
self._user_name = user_name
self._user_password = user_password
def get_update_path_params(self):
pass
@ -39,10 +40,10 @@ class MeetingCredentials(Credentials):
if self._token is None or self._last_token_date is None or (
now_time - self._last_token_date).days * 24 * 3600 + (
now_time - self._last_token_date).seconds > 12 * 60 * 60:
authorization = "Basic " + str(base64.b64encode((self._username + ':' + self._password).encode('utf-8')),
authorization = "Basic " + str(base64.b64encode((self._user_name + ':' + self._user_password).encode('utf-8')),
'utf-8')
body = {'account': self._username, 'clientType': 0}
body = {'account': self._user_name, 'clientType': 0}
sdk_request = SdkRequest('POST', 'https', request.host, [], '/v1/usg/acs/auth/account', [],
{'Authorization': authorization, 'Content-Type': 'application/json'},
json.dumps(body), [])
@ -52,11 +53,13 @@ class MeetingCredentials(Credentials):
self._token = content['accessToken']
self._last_token_date = datetime.datetime.now()
request.header_params["X-Auth-Token"] = self._token
request.uri = request.resource_path
canonical_query_string = process_canonical_query_string(request)
request.uri = request.resource_path + "?" + canonical_query_string if canonical_query_string != "" else request.resource_path
return request
else:
request.header_params["X-Auth-Token"] = self._token
request.uri = request.resource_path
canonical_query_string = process_canonical_query_string(request)
request.uri = request.resource_path + "?" + canonical_query_string if canonical_query_string != "" else request.resource_path
return request

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkmeeting"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

View File

@ -4,7 +4,7 @@ from os import path
from setuptools import setup, find_packages
NAME = "huaweicloudsdkmoderation"
VERSION = "3.0.40-rc"
VERSION = "3.0.41-rc"
AUTHOR = "HuaweiCloud SDK"
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"

Some files were not shown because too many files have changed in this diff Show More