Skip to content

Commit 0d67705

Browse files
franklwyLiu Wenyuashorezfc11Ericzhang3
authored andcommitted
Feature/apig (huaweicloud#158)
* Add files via upload add huaweicloud Kafka custodian * Changes set-config Delete json-diff * delete import * rename set_config * Feature/dns (huaweicloud#9) add dns actions, filters, UTs * Feature/dns (huaweicloud#10) * add readme_dns * add readme_dns * add readme_dns * Update readme_dns.md * Update readme_dns.md * add dns * update readme_dns * update kafka * update client * update dns * update dns * update dns add dns_test * update dns_test update mock * add mock * update dns * Delete tools/c7n_huaweicloud/c7n_huaweicloud/resources/dns_files directory * update dns lint * lint modify * lint modify * modify * modify * update test --------- Co-authored-by: Liu Wenyu <[email protected]> * Create readme_dns.md * feat:apig服务开发 * feat:apig服务开发 * feat:apig服务开发 * feat:apig提交 * feat:APIG服务提交 * feat:注释转化成英文 * feat:修改API操作开发 * feat:apig代码修改 * feat:apig修改 * feat:apig修改 * feat:APIG修改 * feat:apig修改 * feat:删除参数过滤的逻辑 * feat:APIG修改 * feature:中文注释改为英文 * feat:删除无用的引入 * feat:APIG修改 * fix:lint门禁处理 * fix:lint门禁修改 * fix:lint门禁修改 * fix:test门禁修改 * fix:test门禁修改 * fix:删除阿里云镜像依赖 * fix:删除readme文件 * fix:删除poetry.lock文件中阿里云镜像依赖 --------- Co-authored-by: Liu Wenyu <[email protected]> Co-authored-by: zfc1996 <[email protected]> Co-authored-by: Ericzhang3 <[email protected]>
1 parent 964fde6 commit 0d67705

18 files changed

+2975
-180
lines changed

tools/c7n_huaweicloud/c7n_huaweicloud/client.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@
112112
RocketMQClient, ListInstancesRequest as RocketMQListInstancesRequest
113113
)
114114
from huaweicloudsdkrocketmq.v2.region.rocketmq_region import RocketMQRegion
115+
from huaweicloudsdkapig.v2 import (
116+
ApigClient,
117+
ListApisV2Request,
118+
ListEnvironmentsV2Request,
119+
ListApiGroupsV2Request,
120+
ListInstancesV2Request,
121+
)
122+
from huaweicloudsdkapig.v2.region.apig_region import ApigRegion
115123
from huaweicloudsdkswr.v2 import SwrClient, ListReposDetailsRequest, ListRepositoryTagsRequest
116124
from huaweicloudsdkswr.v2.region.swr_region import SwrRegion
117125
from huaweicloudsdkscm.v3 import ScmClient, ListCertificatesRequest
@@ -446,6 +454,14 @@ def client(self, service):
446454
.with_region(RocketMQRegion.value_of(self.region))
447455
.build()
448456
)
457+
elif service == 'apig' or service in ['apig-api', 'apig-stage', 'apig-api-groups',
458+
'apig-instance']:
459+
client = (
460+
ApigClient.new_builder()
461+
.with_credentials(credentials)
462+
.with_region(ApigRegion.value_of(self.region))
463+
.build()
464+
)
449465
elif service in ['swr', 'swr-image']:
450466
client = (
451467
SwrClient.new_builder()
@@ -608,6 +624,14 @@ def request(self, service):
608624
request = ListInstancesRequest()
609625
elif service == 'reliability':
610626
request = RocketMQListInstancesRequest()
627+
elif service == 'apig-api':
628+
request = ListApisV2Request()
629+
elif service == 'apig-stage':
630+
request = ListEnvironmentsV2Request()
631+
elif service == 'apig-api-groups':
632+
request = ListApiGroupsV2Request()
633+
elif service == 'apig-instance':
634+
request = ListInstancesV2Request()
611635
elif service == 'swr':
612636
request = ListReposDetailsRequest()
613637
elif service == 'swr-image':

0 commit comments

Comments
 (0)