Configures blocked regions for an Anti-DDoS Pro or Anti-DDoS Premium instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ConfigNetworkRegionBlock

The operation that you want to perform. Set the value to ConfigNetworkRegionBlock.

Config String Yes {"RegionBlockSwitch":"off","Countries":[],"Provinces":[11,12,13,14,15,21,22,23,31,32,33,34,35,36,37,41,42,43,44,45,46,50,51,52,53,54,61,62,63,64,65,71,81,82]}

Details about the configurations of blocked regions. This parameter is a JSON string. The fields in the value are described as follows:

  • RegionBlockSwitch: the status of the Blocked Regions policy. This field is required and must be of the STRING type. Valid values:
    • on
    • off
  • Countries: the codes of the regions outside China from which you want to block requests, which must be of the ARRAY type.
  • Provinces: the codes of the regions inside China from which you want to block requests, which must be of the ARRAY type.
    Note For more information about codes of regions inside China, see the Codes of regions inside China table in this topic.
InstanceId String Yes ddoscoo-cn-mp91j1ao****

The ID of the instance.

Note You can call the DescribeInstanceIds operation to query the IDs of all instances.
RegionId String No cn-hangzhou

The region ID of the instance. Valid values:

  • cn-hangzhou: mainland China, which indicates an Anti-DDoS Pro instance
  • ap-southeast-1: outside mainland China, which indicates an Anti-DDoS Premium instance
Codes of regions inside China

Code

Region

11

Beijing

12

Tianjin

13

Hebei

14

Shanxi

15

Nei Mongol

21

Liaoning

22

Jilin

23

Heilongjiang

31

Shanghai

32

Jiangsu

33

Zhejiang

34

Anhui

35

Fujian

36

Jiangxi

37

Shandong

41

Henan

42

Hubei

43

Hunan

44

Guangdong

45

Guangxi

46

Hainan

50

Chongqing

51

Sichuan

52

Guizhou

53

Yunnan

54

Xizang

61

Shaanxi

62

Gansu

63

Qinghai

64

Ningxia

65

Xinjiang

81

Hong Kong S.A.R

71

Taiwan

82

Macao S.A.R

Codes of regions outside China

Code

Region

Abbreviation

1

China

CN

2

Australia

AU

3

Japan

JP

4

Thailand

TH

5

India

IN

7

United States

US

8

Germany

DE

9

Netherlands

NL

10

Malaysia

MY

11

Angola

AO

12

South Korea

KR

13

Singapore

SG

14

Kampuchea

KH

16

Philippines

PH

17

Vietnam

VN

18

France

FR

19

Poland

PL

20

Spain

ES

21

Russia

RU

22

Switzerland

CH

23

United Kingdom

GB

24

Italy

IT

25

Czech Republic

CZ

26

Ireland

IE

27

Denmark

DK

28

Portugal

PT

29

Sweden

SE

30

Ghana

GH

31

Turkey

TR

32

Cameroon

CM

33

South Africa

ZA

34

Finland

FI

35

Hungary

HU

36

United Arab Emirates

AE

37

Greece

GR

38

Brazil

BR

39

Austria

AT

40

Jordan

JO

41

Belgium

BE

42

Romania

RO

43

Luxembourg

LU

44

Argentina

AR

45

Uganda

UG

46

Armenia

AM

47

Tanzania

TZ

48

Burundi

BI

49

Uruguay

UY

50

Bulgaria

BG

51

Ukraine

UA

52

Israel

IL

53

Qatar

QA

54

Iraq

IQ

55

Lithuania

LT

56

Moldova

MD

57

Uzbekistan

UZ

58

Slovakia

SK

59

Kazakhstan

KZ

60

Croatia

HR

61

Georgia

GE

62

Estonia

EE

63

Gibraltar

GI

64

Latvia

LV

65

Norway

NO

66

Palestine

PS

67

Cyprus

CY

68

Saudi Arabia

SA

69

Iran

IR

70

Canada

CA

71

American Samoa

AS

72

Syria

SY

73

Kuwait

KW

74

Bahrain

BH

75

Lebanon

LB

76

Oman

OM

77

Azerbaijan

AZ

78

Zambia

ZM

79

Zimbabwe

ZW

80

Democratic Republic of the Congo

CD

81

Serbia

RS

82

Iceland

IS

83

Slovenia

SI

84

Macedonia

MK

85

Liechtenstein

LI

86

Jersey

JE

87

Bosnia and Herzegovina

BA

88

Chile

CL

89

Peru

PE

90

Kyrgyzstan

KG

91

Reunion

RE

92

Tajikistan

TJ

93

Isle of Man

IM

94

Guernsey

GG

95

Malta

MT

96

Libya

LY

97

Yemen

YE

98

Belarus

BY

99

Mayotte

YT

100

Guadeloupe

GP

101

Saint Martin

MF

102

Martinique

MQ

103

Guyana

GY

104

Kosovo

XK

105

Indonesia

ID

106

Northern Mariana Islands

MP

107

Dominican Republic

DO

108

Mexico

MX

109

Guam

GU

110

Nigeria

NG

111

Venezuela

VE

112

Puerto Rico

PR

113

Mongolia

MN

114

New Zealand

NZ

115

Bangladesh

BD

116

Pakistan

PK

117

Papua New Guinea

PG

118

Trinidad and Tobago

TT

119

Lesotho

LS

120

Colombia

CO

121

Costa Rica

CR

123

Ecuador

EC

124

Sri Lanka

LK

125

Egypt

EG

126

British Virgin Islands

VG

127

Jamaica

JM

128

Saint Lucia

LC

129

Cayman Islands

KY

130

Grenada

GD

131

Curacao

CW

132

Panama

PA

133

Barbados

BB

134

The Bahamas

BS

135

Nepal

NP

136

Tokelau

TK

137

Maldives

MV

138

Afghanistan

AF

139

New Caledonia

NC

140

Fiji

FJ

141

Wallis and Futuna Islands

WF

142

Albania

AL

143

San Marino

SM

144

Montenegro

ME

145

East Timor

TL

146

Monaco

MC

147

Guinea

GN

148

Myanmar

MM

149

Greenland

GL

150

Bermuda

BM

151

Saint Vincent and the Grenadines

VC

152

United States Virgin Islands

VI

153

Suriname

SR

154

Saint Barthelemy

BL

155

Haiti

HT

156

Antigua and Barbuda

AG

157

Liberia

LR

158

Kenya

KE

159

Botswana

BW

160

Mozambique

MZ

161

Senegal

SN

162

Madagascar

MG

163

Namibia

NA

164

Côte d'Ivoire

CI

165

Sudan

SD

166

Malawi

MW

167

Gabon

GA

168

Mali

ML

169

Benin

BJ

170

Chad

TD

171

Cabo Verde

CV

172

Rwanda

RW

173

Republic of the Congo

CG

174

The Gambia

GM

175

Mauritius

MU

176

Algeria

DZ

177

Eswatini

SZ

178

Burkina Faso

BF

179

Sierra Leone

SL

180

Somalia

SO

181

Niger

NE

182

Central African Republic

CF

183

Togo

TG

184

South Sudan

SS

185

Equatorial Guinea

GQ

186

Seychelles

SC

187

Djibouti

DJ

188

Morocco

MA

189

Mauritania

MR

190

Comoros

KM

191

British Indian Ocean Territory

IO

192

Tunisia

TN

193

Laos

LA

194

Brunei

BN

195

Bhutan

BT

196

Nauru

NR

197

Vanuatu

VU

198

Federated States of Micronesia

FM

199

French Polynesia

PF

200

Tonga

TO

201

Honduras

HN

202

Bolivia

BO

203

El Salvador

SV

204

Guatemala

GT

205

Nicaragua

NI

206

Belize

BZ

207

Paraguay

PY

208

French Guiana

GF

209

Andorra

AD

210

Faroe Islands

FO

211

Niue

NU

212

Kiribati

KI

213

Marshall Islands

MH

214

Palau

PW

215

Samoa

WS

216

Solomon Islands

SB

217

Tuvalu

TV

218

North Korea

KP

219

Vatican City

VA

220

Eritrea

ER

221

Ethiopia

ET

222

Guinea-Bissau

GW

223

Sao Tome and Principe

ST

224

Turkmenistan

TM

225

Cuba

CU

226

Dominica

DM

227

Saint Kitts and Nevis

KN

228

Aruba

AW

229

Falkland Islands

FK

230

Turks and Caicos Islands

TC

231

Caribbean Netherlands

BQ

232

Sint Maarten

SX

233

Montserrat

MS

234

Anguilla

AI

235

Saint Pierre and Miquelon

PM

236

Åland Islands

AX

237

Norfolk Island

NF

238

Antarctica

AQ

239

Cook Islands

CK

240

Christmas Island

CX

241

Other regions in Europe

EU

Response parameters

Parameter Type Example Description
RequestId String C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ConfigNetworkRegionBlock
&Config={"RegionBlockSwitch":"off","Countries":[],"Provinces":[11,12,13,14,15,21,22,23,31,32,33,34,35,36,37,41,42,43,44,45,46,50,51,52,53,54,61,62,63,64,65,71,81,82]}
&InstanceId=ddoscoo-cn-mp91j1ao****
&<Common request parameter>

Sample success responses

XML format

<ConfigNetworkRegionBlockResponse>
      <RequestId>C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E</RequestId>
</ConfigNetworkRegionBlockResponse>

JSON format

{
    "RequestId": "C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E"
}

Error codes

For a list of error codes, visit the API Error Center.