Skip to content

feat(build): 修改阿里云镜像仓库地址。 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 57 commits into
base: riskscanner
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
883ab16
feat(build): 修改阿里云镜像仓库地址。
maguohao2018 Apr 26, 2021
894a232
feat(docker): 注释gcp和kube。
maguohao2018 Apr 26, 2021
ef4b7c6
feat(aazure): azure 新增 F2CId 资源标识报错。
maguohao2018 Apr 27, 2021
eb9bbfc
feat(openstack): 新增 openstack 平台
maguohao2018 May 8, 2021
9190443
feat(aliyun): 修改aliyun格式
maguohao2018 May 8, 2021
16e651d
feat(ignore): 添加.gitignore内容
maguohao2018 May 8, 2021
4a902dd
feat(OpenStack): 新增 OpenStack 私有云平台
maguohao2018 May 17, 2021
0cd4203
feat(OpenStack): 新增路由,修改安全组。
maguohao2018 May 18, 2021
a8012f0
feat(OpenStack): 修改规则。
maguohao2018 May 18, 2021
0b0e4e4
feat(vSphere): 新增VMware vSphere 平台。
maguohao2017 May 26, 2021
5e51479
fix(OpenStack): 修改规则。
maguohao2017 May 26, 2021
a648361
fix(c7n): 修改gitignore
maguohao2017 May 26, 2021
d7959b2
fix(c7n): 修改gitignore
maguohao2017 May 26, 2021
bb579ae
fix(c7n): 修改部署报错问题
maguohao2017 May 26, 2021
73f735f
fix(pyroject): 修改pygroject.toml
maguohao2017 May 26, 2021
a09839e
fix(c7n): 修改部署报错问题,修改dockerfile。
maguohao2017 May 27, 2021
8811671
fix(vsphere): 修改vm和resourcepool规则报错(windows空值)问题。
maguohao2017 Jun 3, 2021
40d5dbe
fix(security-groups): 修复安全组扫描cidr问题
maguohao2017 Jun 8, 2021
d2172ea
feat(gcp): 添加gcp
maguohao2017 Jun 29, 2021
40ea9cf
fix(security-groups): 修复腾讯云安全组扫描问题
maguohao2017 Jun 29, 2021
b58c78b
fix(security-groups): 修复华为云安全组问题
maguohao2017 Jun 29, 2021
43d991f
fix(aliyun): 修复阿里云rds问题
maguohao2017 Jun 29, 2021
daba5f3
feat(aliyun): 添加阿里云vpc规则
maguohao2017 Jun 30, 2021
df7515d
feat(aliyun): 修复阿里云监控bug
maguohao2017 Jul 9, 2021
c6353e6
feat(tencent): 解决None值的问题
maguohao2017 Jul 16, 2021
87d33f8
feat(param): 修改参数名
maguohao2017 Jul 26, 2021
bb51ad5
feat(dockerfile): 修改基础镜像源
maguohao2017 Jul 26, 2021
4db3439
feat(dockerfile): 修改基础镜像源
maguohao2017 Jul 26, 2021
1f0ddee
feat(dockerfile): 修改基础镜像源
maguohao2017 Jul 26, 2021
ffaced7
feat(huawei): 将返回结果带null改为None
maguohao2017 Jul 29, 2021
35ea638
feat(huawei): 将返回结果带true改为True, false 改成False
maguohao2017 Jul 30, 2021
222fd29
feat(huawei): 非空判断
maguohao2017 Jul 30, 2021
99240a7
feat(aliyun): 阿里云sdk查询变更,所有数据都自动分页了。所以新增分页查询所有数据
maguohao2017 Aug 4, 2021
a03f1da
feat(huawei): 添加所有资源的非空判断
maguohao2017 Aug 4, 2021
67d7c5e
feat(aliyun): 阿里云官方sdk变更,新增分页查询,修改很多方法
maguohao2017 Aug 5, 2021
552b436
feat(aliyun): 阿里云官方sdk变更,新增分页查询,修改很多方法
maguohao2017 Aug 5, 2021
cdafa6a
feat(aliyun): 阿里云官方sdk变更,新增分页查询,修改很多方法
maguohao2017 Aug 6, 2021
39b7c93
feat(aliyun): 阿里云官方sdk变更,新增分页查询,修改很多方法
maguohao2017 Aug 6, 2021
96fbe96
feat(dockerfile): 修改dockerfile
maguohao2017 Aug 6, 2021
384ff01
feat(tencent): 修改腾讯云列表分页查询
maguohao2017 Aug 9, 2021
b84df8e
feat(aliyun): 阿里云规则修改
maguohao2017 Aug 10, 2021
bbeacab
feat(huawei): 华为云分页查询
maguohao2017 Aug 11, 2021
5270af0
feat(tencent): 修tencent
maguohao2017 Aug 12, 2021
09d6379
feat(tencent): 修tencent
maguohao2017 Aug 12, 2021
4ef61a0
fix(tencent): 修复分页查询问题
maguohao2017 Aug 19, 2021
cef56d6
fix(cos): 解决cos报错问题
maguohao2017 Aug 19, 2021
e91a77a
fix(aliyun): 解决阿里云监控指标大小写问题
maguohao2017 Aug 25, 2021
ad2bb7b
fix(aliyun): 解决阿里云监控指标大小写问题
maguohao2017 Aug 26, 2021
a985821
fix(aliyun): 解决阿里云监控指标大小写问题
maguohao2017 Aug 26, 2021
072ef78
fix(tencent): 解决腾讯云安全组扫描错误问题
maguohao2017 Sep 10, 2021
f74551c
fix(tencent): 解决腾讯云安全组有拒绝状态的问题
maguohao2017 Sep 14, 2021
0519290
fix(tencent): 解决腾讯云安全组有拒绝状态的问题
maguohao2017 Sep 14, 2021
42b6244
fix(tencent): 解决腾讯云安全组有拒绝状态的问题
maguohao2017 Sep 18, 2021
929a63a
fix(tencent): 解决腾讯云安全组有拒绝状态的问题
maguohao2017 Sep 28, 2021
b1f08c2
fix(tencent): 解决腾讯云安全组有拒绝状态的问题
maguohao2017 Sep 28, 2021
c8b702d
fix(tencent): 解决腾讯云安全组有拒绝状态的问题
maguohao2017 Oct 11, 2021
09b4d34
fix(tencent):添加腾讯云es,postgresdb数据库扫描规则,新增引入包 jsonpath
shaohuzhang1 Nov 30, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SELF_MAKE := $(lastword $(MAKEFILE_LIST))

PKG_SET = tools/c7n_tencent tools/c7n_huawei tools/c7n_aliyun tools/c7n_gcp tools/c7n_azure tools/c7n_kube tools/c7n_mailer tools/c7n_logexporter tools/c7n_policystream tools/c7n_trailcreator tools/c7n_org tools/c7n_sphinxext
PKG_SET = tools/c7n_tencent tools/c7n_huawei tools/c7n_aliyun tools/c7n_gcp tools/c7n_azure tools/c7n_kube tools/c7n_openstack tools/c7n_vsphere tools/c7n_mailer tools/c7n_logexporter tools/c7n_policystream tools/c7n_trailcreator tools/c7n_org tools/c7n_sphinxext

install:
python3 -m venv .
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
echo "构建custodian镜像 ..."

docker build -t registry.cn-qingdao.aliyuncs.com/x-lab/riskscanner/custodian:master .
docker push registry.cn-qingdao.aliyuncs.com/x-lab/riskscanner/custodian:master
docker build -t registry.cn-qingdao.aliyuncs.com/x-lab/custodian:1.4 .
docker push registry.cn-qingdao.aliyuncs.com/x-lab/custodian:1.4
10 changes: 10 additions & 0 deletions c7n/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,4 +553,14 @@ def version_cmd(options):
packages.append('c7n_azure')
if 'k8s' in found:
packages.append('c7n_kube')
if 'aliyun' in found:
packages.append('c7n_aliyun')
if 'tencent' in found:
packages.append('c7n_tencent')
if 'huawei' in found:
packages.append('c7n_huawei')
if 'openstack' in found:
packages.append('c7n_openstack')
if 'vsphere' in found:
packages.append('c7n_vsphere')
print(generate_requirements(packages))
10 changes: 8 additions & 2 deletions c7n/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def should_load_provider(name, provider_types):
return False


PROVIDER_NAMES = ('aws', 'azure', 'gcp', 'k8s', 'aliyun', 'huawei', 'tencent')
PROVIDER_NAMES = ('aws', 'azure', 'gcp', 'k8s', 'aliyun', 'huawei', 'tencent', 'openstack', 'vsphere')


def load_available(resources=True):
Expand All @@ -73,7 +73,6 @@ def load_available(resources=True):

def load_providers(provider_types):
global LOADED

# Even though we're lazy loading resources we still need to import
# those that are making available generic filters/actions
if should_load_provider('aws', provider_types):
Expand Down Expand Up @@ -108,4 +107,11 @@ def load_providers(provider_types):
from c7n_tencent.entry import initialize_tencent
initialize_tencent()

if should_load_provider('openstack', provider_types):
from c7n_openstack.entry import initialize_openstack
initialize_openstack()

if should_load_provider('vsphere', provider_types):
from c7n_vsphere.entry import initialize_vsphere
initialize_vsphere()
LOADED.update(provider_types)
20 changes: 13 additions & 7 deletions docker/cli
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.fit2cloud.com/fit2cloud2/fabric8-java-alpine-openjdk8-jre:py37 as build-env
FROM registry.cn-qingdao.aliyuncs.com/x-lab/fabric8-java-alpine-openjdk8-jre:py37 as build-env

USER root

Expand All @@ -8,7 +8,7 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# pre-requisite distro deps, and build env setup
RUN apk add --update \
curl \
&& apk add gcc g++ make libffi-dev openssl-dev libtool --no-cache \
&& apk add gcc g++ make git libffi-dev openssl-dev libxml2-dev libxslt-dev musl-dev cargo libtool --no-cache \
&& python3 -m venv /usr/local \
&& curl -sSL https://nginx-qa.fit2cloud.com/tools/get-poetry.py | python3

Expand All @@ -26,31 +26,37 @@ ADD tools/c7n_gcp /src/tools/c7n_gcp
RUN rm -R tools/c7n_gcp/tests
ADD tools/c7n_azure /src/tools/c7n_azure
RUN rm -R tools/c7n_azure/tests_azure
ADD tools/c7n_kube /src/tools/c7n_kube
RUN rm -R tools/c7n_kube/tests
#ADD tools/c7n_kube /src/tools/c7n_kube
#RUN rm -R tools/c7n_kube/tests
ADD tools/c7n_aliyun /src/tools/c7n_aliyun
RUN rm -R tools/c7n_aliyun/test
ADD tools/c7n_huawei /src/tools/c7n_huawei
RUN rm -R tools/c7n_huawei/test
ADD tools/c7n_tencent /src/tools/c7n_tencent
RUN rm -R tools/c7n_tencent/test
ADD tools/c7n_openstack /src/tools/c7n_openstack
RUN rm -R tools/c7n_openstack/test
ADD tools/c7n_vsphere /src/tools/c7n_vsphere
RUN rm -R tools/c7n_vsphere/test

# Install requested providers
ARG providers="azure gcp kube aliyun huawei tencent"
ARG providers="azure gcp aliyun huawei tencent openstack vsphere"
RUN . /usr/local/bin/activate && \
pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git
RUN . /usr/local/bin/activate && \
for pkg in $providers; do cd tools/c7n_$pkg && \
$HOME/.poetry/bin/poetry lock && \
$HOME/.poetry/bin/poetry install && cd ../../; done

RUN mkdir /output

FROM registry.fit2cloud.com/fit2cloud2/fabric8-java-alpine-openjdk8-jre:py37
FROM registry.cn-qingdao.aliyuncs.com/x-lab/fabric8-java-alpine-openjdk8-jre:py37

COPY --from=build-env /src /src
COPY --from=build-env /usr/local /usr/local
COPY --from=build-env /output /output

RUN rm -Rf /var/cache/apk
RUN rm -Rf /var/cache/apk/*

USER root
WORKDIR /home/custodian
Expand Down
12 changes: 11 additions & 1 deletion docker/cli-distroless
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,19 @@ ADD tools/c7n_azure /src/tools/c7n_azure
RUN rm -R tools/c7n_azure/tests_azure
ADD tools/c7n_kube /src/tools/c7n_kube
RUN rm -R tools/c7n_kube/tests
ADD tools/c7n_aliyun /src/tools/c7n_aliyun
RUN rm -R tools/c7n_aliyun/test
ADD tools/c7n_huawei /src/tools/c7n_huawei
RUN rm -R tools/c7n_huawei/test
ADD tools/c7n_tencent /src/tools/c7n_tencent
RUN rm -R tools/c7n_tencent/test
ADD tools/c7n_openstack /src/tools/c7n_openstack
RUN rm -R tools/c7n_openstack/test
ADD tools/c7n_vsphere /src/tools/c7n_vsphere
RUN rm -R tools/c7n_vsphere/test

# Install requested providers
ARG providers="azure gcp kube"
ARG providers="azure gcp kube aliyun huawei tencent openstack vsphere"
RUN . /usr/local/bin/activate && \
for pkg in $providers; do cd tools/c7n_$pkg && \
$HOME/.poetry/bin/poetry install && cd ../../; done
Expand Down
12 changes: 11 additions & 1 deletion docker/mailer
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,19 @@ ADD tools/c7n_azure /src/tools/c7n_azure
RUN rm -R tools/c7n_azure/tests_azure
ADD tools/c7n_kube /src/tools/c7n_kube
RUN rm -R tools/c7n_kube/tests
ADD tools/c7n_aliyun /src/tools/c7n_aliyun
RUN rm -R tools/c7n_aliyun/test
ADD tools/c7n_huawei /src/tools/c7n_huawei
RUN rm -R tools/c7n_huawei/test
ADD tools/c7n_tencent /src/tools/c7n_tencent
RUN rm -R tools/c7n_tencent/test
ADD tools/c7n_openstack /src/tools/c7n_openstack
RUN rm -R tools/c7n_openstack/test
ADD tools/c7n_vsphere /src/tools/c7n_vsphere
RUN rm -R tools/c7n_vsphere/test

# Install requested providers
ARG providers="azure gcp kube"
ARG providers="azure gcp kube aliyun huawei tencent openstack vsphere"
RUN . /usr/local/bin/activate && \
for pkg in $providers; do cd tools/c7n_$pkg && \
$HOME/.poetry/bin/poetry install && cd ../../; done
Expand Down
12 changes: 11 additions & 1 deletion docker/mailer-distroless
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,19 @@ ADD tools/c7n_azure /src/tools/c7n_azure
RUN rm -R tools/c7n_azure/tests_azure
ADD tools/c7n_kube /src/tools/c7n_kube
RUN rm -R tools/c7n_kube/tests
ADD tools/c7n_aliyun /src/tools/c7n_aliyun
RUN rm -R tools/c7n_aliyun/test
ADD tools/c7n_huawei /src/tools/c7n_huawei
RUN rm -R tools/c7n_huawei/test
ADD tools/c7n_tencent /src/tools/c7n_tencent
RUN rm -R tools/c7n_tencent/test
ADD tools/c7n_openstack /src/tools/c7n_openstack
RUN rm -R tools/c7n_openstack/test
ADD tools/c7n_vsphere /src/tools/c7n_vsphere
RUN rm -R tools/c7n_vsphere/test

# Install requested providers
ARG providers="azure gcp kube"
ARG providers="azure gcp kube aliyun huawei tencent openstack vsphere"
RUN . /usr/local/bin/activate && \
for pkg in $providers; do cd tools/c7n_$pkg && \
$HOME/.poetry/bin/poetry install && cd ../../; done
Expand Down
12 changes: 11 additions & 1 deletion docker/org
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,19 @@ ADD tools/c7n_azure /src/tools/c7n_azure
RUN rm -R tools/c7n_azure/tests_azure
ADD tools/c7n_kube /src/tools/c7n_kube
RUN rm -R tools/c7n_kube/tests
ADD tools/c7n_aliyun /src/tools/c7n_aliyun
RUN rm -R tools/c7n_aliyun/test
ADD tools/c7n_huawei /src/tools/c7n_huawei
RUN rm -R tools/c7n_huawei/test
ADD tools/c7n_tencent /src/tools/c7n_tencent
RUN rm -R tools/c7n_tencent/test
ADD tools/c7n_openstack /src/tools/c7n_openstack
RUN rm -R tools/c7n_openstack/test
ADD tools/c7n_vsphere /src/tools/c7n_vsphere
RUN rm -R tools/c7n_vsphere/test

# Install requested providers
ARG providers="azure gcp kube"
ARG providers="azure gcp kube aliyun huawei tencent openstack vsphere"
RUN . /usr/local/bin/activate && \
for pkg in $providers; do cd tools/c7n_$pkg && \
$HOME/.poetry/bin/poetry install && cd ../../; done
Expand Down
12 changes: 11 additions & 1 deletion docker/org-distroless
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,19 @@ ADD tools/c7n_azure /src/tools/c7n_azure
RUN rm -R tools/c7n_azure/tests_azure
ADD tools/c7n_kube /src/tools/c7n_kube
RUN rm -R tools/c7n_kube/tests
ADD tools/c7n_aliyun /src/tools/c7n_aliyun
RUN rm -R tools/c7n_aliyun/test
ADD tools/c7n_huawei /src/tools/c7n_huawei
RUN rm -R tools/c7n_huawei/test
ADD tools/c7n_tencent /src/tools/c7n_tencent
RUN rm -R tools/c7n_tencent/test
ADD tools/c7n_openstack /src/tools/c7n_openstack
RUN rm -R tools/c7n_openstack/test
ADD tools/c7n_vsphere /src/tools/c7n_vsphere
RUN rm -R tools/c7n_vsphere/test

# Install requested providers
ARG providers="azure gcp kube"
ARG providers="azure gcp kube aliyun huawei tencent openstack vsphere"
RUN . /usr/local/bin/activate && \
for pkg in $providers; do cd tools/c7n_$pkg && \
$HOME/.poetry/bin/poetry install && cd ../../; done
Expand Down
12 changes: 11 additions & 1 deletion docker/policystream
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,19 @@ ADD tools/c7n_azure /src/tools/c7n_azure
RUN rm -R tools/c7n_azure/tests_azure
ADD tools/c7n_kube /src/tools/c7n_kube
RUN rm -R tools/c7n_kube/tests
ADD tools/c7n_aliyun /src/tools/c7n_aliyun
RUN rm -R tools/c7n_aliyun/test
ADD tools/c7n_huawei /src/tools/c7n_huawei
RUN rm -R tools/c7n_huawei/test
ADD tools/c7n_tencent /src/tools/c7n_tencent
RUN rm -R tools/c7n_tencent/test
ADD tools/c7n_openstack /src/tools/c7n_openstack
RUN rm -R tools/c7n_openstack/test
ADD tools/c7n_vsphere /src/tools/c7n_vsphere
RUN rm -R tools/c7n_vsphere/test

# Install requested providers
ARG providers="azure gcp kube"
ARG providers="azure gcp kube aliyun huawei tencent openstack vsphere"
RUN . /usr/local/bin/activate && \
for pkg in $providers; do cd tools/c7n_$pkg && \
$HOME/.poetry/bin/poetry install && cd ../../; done
Expand Down
12 changes: 11 additions & 1 deletion docker/policystream-distroless
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,19 @@ ADD tools/c7n_azure /src/tools/c7n_azure
RUN rm -R tools/c7n_azure/tests_azure
ADD tools/c7n_kube /src/tools/c7n_kube
RUN rm -R tools/c7n_kube/tests
ADD tools/c7n_aliyun /src/tools/c7n_aliyun
RUN rm -R tools/c7n_aliyun/test
ADD tools/c7n_huawei /src/tools/c7n_huawei
RUN rm -R tools/c7n_huawei/test
ADD tools/c7n_tencent /src/tools/c7n_tencent
RUN rm -R tools/c7n_tencent/test
ADD tools/c7n_openstack /src/tools/c7n_openstack
RUN rm -R tools/c7n_openstack/test
ADD tools/c7n_vsphere /src/tools/c7n_vsphere
RUN rm -R tools/c7n_vsphere/test

# Install requested providers
ARG providers="azure gcp kube"
ARG providers="azure gcp kube aliyun huawei tencent openstack vsphere"
RUN . /usr/local/bin/activate && \
for pkg in $providers; do cd tools/c7n_$pkg && \
$HOME/.poetry/bin/poetry install && cd ../../; done
Expand Down
12 changes: 12 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
-r tools/c7n_mailer/requirements.txt
-r tools/c7n_org/requirements.txt
-r tools/c7n_aliyun/requirements.txt
-r tools/c7n_huawei/requirements.txt
-r tools/c7n_tencent/requirements.txt
-r tools/c7n_openstack/requirements.txt
-r tools/c7n_vsphere/requirements.txt

# Setup source directories as editable/development distributions
-e .
Expand All @@ -23,6 +27,14 @@
-e tools/c7n_org
# Local package required for c7n_aliyun tests
-e tools/c7n_aliyun
# Local package required for c7n_huawei tests
-e tools/c7n_huawei
# Local package required for c7n_tencent tests
-e tools/c7n_tencent
# Local package required for c7n_vsphere tests
-e tools/c7n_openstack
# Local package required for c7n_vsphere tests
-e tools/c7n_vsphere

# we don't export dev requirements of subpackages (due to editable/distribution above)
# so explicitly list them here..
Expand Down
2 changes: 1 addition & 1 deletion tests/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_image_metadata(image_name):
def test_cli_providers_available():
providers = os.environ.get("CUSTODIAN_PROVIDERS", None)
if providers is None:
providers = {"aws", "azure", "gcp", "k8s"}
providers = {"aws", "azure", "gcp", "k8s", "aliyun", "huawei", "tencent", "openstack", "vsphere"}
elif providers == "":
providers = {"aws"}
else:
Expand Down
3 changes: 2 additions & 1 deletion tests/test_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
@pytest.mark.parametrize("package", [
"c7n", "c7n_azure", "c7n_gcp", "c7n_kube", "c7n_org",
"c7n_mailer", "policystream", "c7n_trailcreator",
"c7n_logexporter", "c7n_sphinxext"])
"c7n_logexporter", "c7n_sphinxext", "c7n_aliyun",
"c7n_huawei", "c7n_tencent", "c7n_vsphere", "c7n_vsphere"])
def test_package_metadata(package):
try:
m = __import__(package)
Expand Down
1 change: 1 addition & 0 deletions tools/c7n_aliyun/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*py~
__pycache__
*.egg-info
aliyun.py
46 changes: 23 additions & 23 deletions tools/c7n_aliyun/c7n_aliyun/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,26 @@ def get_oss_region(self, regionId):
return region

REGION_ENDPOINT = {
'cn-hangzhou': 'oss-cn-hangzhou.aliyuncs.com',
'cn-shanghai': 'oss-cn-shanghai.aliyuncs.com',
'cn-qingdao': 'oss-cn-qingdao.aliyuncs.com',
'cn-beijing': 'oss-cn-beijing.aliyuncs.com',
'cn-zhangjiakou': 'oss-cn-zhangjiakou.aliyuncs.com',
'cn-huhehaote': 'oss-cn-huhehaote.aliyuncs.com',
'cn-shenzhen': 'oss-cn-shenzhen.aliyuncs.com',
'cn-hongkong': 'oss-cn-hongkong.aliyuncs.com',
'us-west-1': 'oss-us-west-1.aliyuncs.com',
'us-east-1': 'oss-us-east-1.aliyuncs.com',
'ap-southeast-1': 'oss-ap-southeast-1.aliyuncs.com',
'ap-southeast-2': 'oss-ap-southeast-2.aliyuncs.com',
'ap-southeast-3': 'oss-ap-southeast-3.aliyuncs.com',
'ap-southeast-5': 'oss-ap-southeast-5.aliyuncs.com',
'ap-northeast-1': 'oss-ap-northeast-1.aliyuncs.com',
'ap-south-1': 'oss-ap-south-1.aliyuncs.com',
'eu-central-1': 'oss-eu-central-1.aliyuncs.com',
'eu-west-1': 'oss-eu-west-1.aliyuncs.com',
'me-east-1': 'oss-me-east-1.aliyuncs.com',
'cn-wulanchabu': 'oss-cn-wulanchabu.aliyuncs.com',
'cn-heyuan': 'oss-cn-heyuan.aliyuncs.com',
'cn-chengdu': 'oss-cn-chengdu.aliyuncs.com'
}
'cn-hangzhou': 'oss-cn-hangzhou.aliyuncs.com',
'cn-shanghai': 'oss-cn-shanghai.aliyuncs.com',
'cn-qingdao': 'oss-cn-qingdao.aliyuncs.com',
'cn-beijing': 'oss-cn-beijing.aliyuncs.com',
'cn-zhangjiakou': 'oss-cn-zhangjiakou.aliyuncs.com',
'cn-huhehaote': 'oss-cn-huhehaote.aliyuncs.com',
'cn-shenzhen': 'oss-cn-shenzhen.aliyuncs.com',
'cn-hongkong': 'oss-cn-hongkong.aliyuncs.com',
'us-west-1': 'oss-us-west-1.aliyuncs.com',
'us-east-1': 'oss-us-east-1.aliyuncs.com',
'ap-southeast-1': 'oss-ap-southeast-1.aliyuncs.com',
'ap-southeast-2': 'oss-ap-southeast-2.aliyuncs.com',
'ap-southeast-3': 'oss-ap-southeast-3.aliyuncs.com',
'ap-southeast-5': 'oss-ap-southeast-5.aliyuncs.com',
'ap-northeast-1': 'oss-ap-northeast-1.aliyuncs.com',
'ap-south-1': 'oss-ap-south-1.aliyuncs.com',
'eu-central-1': 'oss-eu-central-1.aliyuncs.com',
'eu-west-1': 'oss-eu-west-1.aliyuncs.com',
'me-east-1': 'oss-me-east-1.aliyuncs.com',
'cn-wulanchabu': 'oss-cn-wulanchabu.aliyuncs.com',
'cn-heyuan': 'oss-cn-heyuan.aliyuncs.com',
'cn-chengdu': 'oss-cn-chengdu.aliyuncs.com'
}
Loading