File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ def __init__(self, session: Session) -> None:
2121 def account_id (self ) -> str :
2222 return self .awsIdentity .get ('Account' )
2323
24+ @property
25+ def domain (self ) -> str :
26+ if self .region .startswith ('cn-' ):
27+ return 'amazonaws.cn'
28+ return 'aws.amazon.com'
29+
2430 @property
2531 def awsIdentity (self ) -> dict :
2632 if not self ._awsIdentity :
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def __init__(self, **kwargs) -> None:
4545 self .plugins = self .__loadPlugins ()
4646 self ._clients = dict ()
4747 self ._visited_views = [] # Views updated in the current session
48- self .qs_url = 'https://{region}.quicksight.aws.amazon.com /sn/dashboards/{dashboard_id}'
48+ self .qs_url = 'https://{region}.quicksight.{domain} /sn/dashboards/{dashboard_id}'
4949 self .all_yes = kwargs .get ('yes' )
5050 self .verbose = kwargs .get ('verbose' )
5151 set_parameters (kwargs , self .all_yes )
@@ -75,7 +75,8 @@ def aws_login(self):
7575 logger .info (f'AWS profile name: { self .base .session .profile_name } ' )
7676 self .qs_url_params = {
7777 'account_id' : self .base .account_id ,
78- 'region' : self .base .session .region_name
78+ 'region' : self .base .session .region_name ,
79+ 'domain' : self .base .domain ,
7980 }
8081 except (NoCredentialsError , CredentialRetrievalError ):
8182 raise CidCritical ('Error: Not authenticated, please check AWS credentials' )
You can’t perform that action at this time.
0 commit comments