1919 type = click .INT ,
2020 help = "HTTP port."
2121 )
22+ @click .option ('--https-port' , '-s' ,
23+ type = click .INT ,
24+ help = "HTTPS port."
25+ )
2226@click .option ('--origin' , '-o' ,
2327 type = click .STRING ,
2428 help = "Origin server address."
3943 "the Dynamic content acceleration option is not added because this has a special configuration."
4044 )
4145@environment .pass_env
42- def cli (env , identifier , header , http_port , origin , respect_headers , cache , performance_configuration ):
46+ def cli (env , identifier , header , http_port , https_port , origin , respect_headers , cache , performance_configuration ):
4347 """Edit a CDN Account.
4448
4549 Note: You can use the hostname or uniqueId as IDENTIFIER.
@@ -56,7 +60,7 @@ def cli(env, identifier, header, http_port, origin, respect_headers, cache, perf
5660 else :
5761 cache_result ['cacheKeyQueryRule' ] = cache [0 ]
5862
59- cdn_result = manager .edit (cdn_id , header = header , http_port = http_port , origin = origin ,
63+ cdn_result = manager .edit (cdn_id , header = header , http_port = http_port , https_port = https_port , origin = origin ,
6064 respect_headers = respect_headers , cache = cache_result ,
6165 performance_configuration = performance_configuration )
6266
@@ -67,7 +71,10 @@ def cli(env, identifier, header, http_port, origin, respect_headers, cache, perf
6771 for cdn in cdn_result :
6872 table .add_row (['Create Date' , cdn .get ('createDate' )])
6973 table .add_row (['Header' , cdn .get ('header' )])
70- table .add_row (['Http Port' , cdn .get ('httpPort' )])
74+ if cdn .get ('httpPort' ):
75+ table .add_row (['Http Port' , cdn .get ('httpPort' )])
76+ if cdn .get ('httpsPort' ):
77+ table .add_row (['Https Port' , cdn .get ('httpsPort' )])
7178 table .add_row (['Origin Type' , cdn .get ('originType' )])
7279 table .add_row (['Performance Configuration' , cdn .get ('performanceConfiguration' )])
7380 table .add_row (['Protocol' , cdn .get ('protocol' )])
0 commit comments