Skip to content

Commit

Permalink
Supported APIs DescribeSDG,PreloadRegionSDG,UnloadRegionSDG,DeployIns…
Browse files Browse the repository at this point in the history
…tanceSDG,RemoveInstanceSDG.
  • Loading branch information
sdk-team committed Jul 3, 2024
1 parent 3cf7bc2 commit c3ef606
Show file tree
Hide file tree
Showing 19 changed files with 401 additions and 3 deletions.
3 changes: 3 additions & 0 deletions aliyun-python-sdk-ens/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-07-03 Version: 3.0.16
- Supported APIs DescribeSDG,PreloadRegionSDG,UnloadRegionSDG,DeployInstanceSDG,RemoveInstanceSDG.

2024-05-22 Version: 3.0.15
- Support Spot Instance.

Expand Down
2 changes: 1 addition & 1 deletion aliyun-python-sdk-ens/aliyunsdkens/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.0.15'
__version__ = '3.0.16'
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ def get_SaleControls(self): # Array

def set_SaleControls(self, SaleControls): # Array
self.add_query_param("SaleControls", json.dumps(SaleControls))
def get_CustomAccount(self): # String
return self.get_query_params().get('CustomAccount')

def set_CustomAccount(self, CustomAccount): # String
self.add_query_param('CustomAccount', CustomAccount)
def get_CommodityCode(self): # String
return self.get_query_params().get('CommodityCode')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ def get_SaleControls(self): # Array

def set_SaleControls(self, SaleControls): # Array
self.add_query_param("SaleControls", json.dumps(SaleControls))
def get_CustomAccount(self): # String
return self.get_query_params().get('CustomAccount')

def set_CustomAccount(self, CustomAccount): # String
self.add_query_param('CustomAccount', CustomAccount)
def get_CommodityCode(self): # String
return self.get_query_params().get('CommodityCode')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ def get_SaleControls(self): # Array

def set_SaleControls(self, SaleControls): # Array
self.add_query_param("SaleControls", json.dumps(SaleControls))
def get_CustomAccount(self): # String
return self.get_query_params().get('CustomAccount')

def set_CustomAccount(self, CustomAccount): # String
self.add_query_param('CustomAccount', CustomAccount)
def get_CommodityCode(self): # String
return self.get_query_params().get('CommodityCode')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DeleteSDGRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'DeleteSDG','ens')
self.set_method('GET')
self.set_method('POST')

def get_SDGId(self): # Array
return self.get_query_params().get('SDGId')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

from aliyunsdkcore.request import RpcRequest
import json

class DeployInstanceSDGRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'DeployInstanceSDG','ens')
self.set_method('POST')

def get_DeploymentType(self): # String
return self.get_query_params().get('DeploymentType')

def set_DeploymentType(self, DeploymentType): # String
self.add_query_param('DeploymentType', DeploymentType)
def get_SDGId(self): # String
return self.get_query_params().get('SDGId')

def set_SDGId(self, SDGId): # String
self.add_query_param('SDGId', SDGId)
def get_InstanceIds(self): # Array
return self.get_query_params().get('InstanceIds')

def set_InstanceIds(self, InstanceIds): # Array
self.add_query_param("InstanceIds", json.dumps(InstanceIds))
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ def get_PageSize(self): # String

def set_PageSize(self, PageSize): # String
self.add_query_param('PageSize', PageSize)
def get_InstanceType(self): # String
return self.get_query_params().get('InstanceType')

def set_InstanceType(self, InstanceType): # String
self.add_query_param('InstanceType', InstanceType)
def get_EnsRegionIds(self): # String
return self.get_query_params().get('EnsRegionIds')

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

from aliyunsdkcore.request import RpcRequest
import json

class DescribeSDGRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'DescribeSDG','ens')
self.set_method('POST')

def get_PageNumber(self): # Integer
return self.get_query_params().get('PageNumber')

def set_PageNumber(self, PageNumber): # Integer
self.add_query_param('PageNumber', PageNumber)
def get_PageSize(self): # Integer
return self.get_query_params().get('PageSize')

def set_PageSize(self, PageSize): # Integer
self.add_query_param('PageSize', PageSize)
def get_SDGIds(self): # Array
return self.get_query_params().get('SDGIds')

def set_SDGIds(self, SDGIds): # Array
self.add_query_param("SDGIds", json.dumps(SDGIds))
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DescribeSDGsRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'DescribeSDGs','ens')
self.set_method('GET')
self.set_method('POST')

def get_SDGIds(self): # Array
return self.get_query_params().get('SDGIds')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

from aliyunsdkcore.request import RpcRequest

class ListTagResourcesRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'ListTagResources','ens')
self.set_method('POST')

def get_NextToken(self): # String
return self.get_query_params().get('NextToken')

def set_NextToken(self, NextToken): # String
self.add_query_param('NextToken', NextToken)
def get_Tags(self): # RepeatList
return self.get_query_params().get('Tag')

def set_Tags(self, Tag): # RepeatList
for depth1 in range(len(Tag)):
if Tag[depth1].get('Value') is not None:
self.add_query_param('Tag.' + str(depth1 + 1) + '.Value', Tag[depth1].get('Value'))
if Tag[depth1].get('Key') is not None:
self.add_query_param('Tag.' + str(depth1 + 1) + '.Key', Tag[depth1].get('Key'))
def get_ResourceIds(self): # RepeatList
return self.get_query_params().get('ResourceId')

def set_ResourceIds(self, ResourceId): # RepeatList
for depth1 in range(len(ResourceId)):
self.add_query_param('ResourceId.' + str(depth1 + 1), ResourceId[depth1])
def get_ResourceType(self): # String
return self.get_query_params().get('ResourceType')

def set_ResourceType(self, ResourceType): # String
self.add_query_param('ResourceType', ResourceType)
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

from aliyunsdkcore.request import RpcRequest
import json

class PreloadRegionSDGRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'PreloadRegionSDG','ens')
self.set_protocol_type('https')
self.set_method('POST')

def get_DestinationRegionIds(self): # Array
return self.get_query_params().get('DestinationRegionIds')

def set_DestinationRegionIds(self, DestinationRegionIds): # Array
self.add_query_param("DestinationRegionIds", json.dumps(DestinationRegionIds))
def get_SDGId(self): # String
return self.get_query_params().get('SDGId')

def set_SDGId(self, SDGId): # String
self.add_query_param('SDGId', SDGId)
def get_RedundantNum(self): # Integer
return self.get_query_params().get('RedundantNum')

def set_RedundantNum(self, RedundantNum): # Integer
self.add_query_param('RedundantNum', RedundantNum)
def get_Namespaces(self): # Array
return self.get_query_params().get('Namespaces')

def set_Namespaces(self, Namespaces): # Array
self.add_query_param("Namespaces", json.dumps(Namespaces))
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def get_BucketAcl(self): # String

def set_BucketAcl(self, BucketAcl): # String
self.add_body_params('BucketAcl', BucketAcl)
def get_DispatchScope(self): # String
return self.get_body_params().get('DispatchScope')

def set_DispatchScope(self, DispatchScope): # String
self.add_body_params('DispatchScope', DispatchScope)
def get_Comment(self): # String
return self.get_body_params().get('Comment')

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

from aliyunsdkcore.request import RpcRequest
import json

class RemoveInstanceSDGRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'RemoveInstanceSDG','ens')
self.set_method('POST')

def get_InstanceIds(self): # Array
return self.get_query_params().get('InstanceIds')

def set_InstanceIds(self, InstanceIds): # Array
self.add_query_param("InstanceIds", json.dumps(InstanceIds))
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ def get_HealthCheckURI(self): # String

def set_HealthCheckURI(self, HealthCheckURI): # String
self.add_query_param('HealthCheckURI', HealthCheckURI)
def get_XForwardedFor(self): # String
return self.get_query_params().get('XForwardedFor')

def set_XForwardedFor(self, XForwardedFor): # String
self.add_query_param('XForwardedFor', XForwardedFor)
def get_HealthCheck(self): # String
return self.get_query_params().get('HealthCheck')

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.

from aliyunsdkcore.request import RpcRequest

class TagResourcesRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'TagResources','ens')
self.set_method('POST')

def get_Tags(self): # RepeatList
return self.get_query_params().get('Tag')

def set_Tags(self, Tag): # RepeatList
for depth1 in range(len(Tag)):
if Tag[depth1].get('Value') is not None:
self.add_query_param('Tag.' + str(depth1 + 1) + '.Value', Tag[depth1].get('Value'))
if Tag[depth1].get('Key') is not None:
self.add_query_param('Tag.' + str(depth1 + 1) + '.Key', Tag[depth1].get('Key'))
def get_ResourceIds(self): # RepeatList
return self.get_query_params().get('ResourceId')

def set_ResourceIds(self, ResourceId): # RepeatList
for depth1 in range(len(ResourceId)):
self.add_query_param('ResourceId.' + str(depth1 + 1), ResourceId[depth1])
def get_ResourceType(self): # String
return self.get_query_params().get('ResourceType')

def set_ResourceType(self, ResourceType): # String
self.add_query_param('ResourceType', ResourceType)
Loading

0 comments on commit c3ef606

Please sign in to comment.