Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

Commit 4f106f6

Browse files
committed
Update to session token to support expiry
1 parent f7ba512 commit 4f106f6

File tree

2 files changed

+84
-60
lines changed

2 files changed

+84
-60
lines changed

docs/SessionToken.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**access_key_id** | **str** | AWS Access Key |
7-
**secret_access_key** | **str** | AWS Secret Key |
8-
**session_token** | **str** | AWS Session Token |
6+
**aws_key_id** | **str** | AWS Access Key | [optional] [readonly]
7+
**aws_secret_key** | **str** | AWS Secret Key | [optional] [readonly]
8+
**aws_session_token** | **str** | | [optional] [readonly]
9+
**expiration** | **datetime** | Expiration time of token | [optional] [readonly]
910

1011
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1112

epiccore/models/session_token.py

Lines changed: 80 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -34,115 +34,138 @@ class SessionToken(object):
3434
and the value is json key in definition.
3535
"""
3636
openapi_types = {
37-
'access_key_id': 'str',
38-
'secret_access_key': 'str',
39-
'session_token': 'str'
37+
'aws_key_id': 'str',
38+
'aws_secret_key': 'str',
39+
'aws_session_token': 'str',
40+
'expiration': 'datetime'
4041
}
4142

4243
attribute_map = {
43-
'access_key_id': 'AccessKeyId',
44-
'secret_access_key': 'SecretAccessKey',
45-
'session_token': 'SessionToken'
44+
'aws_key_id': 'aws_key_id',
45+
'aws_secret_key': 'aws_secret_key',
46+
'aws_session_token': 'aws_session_token',
47+
'expiration': 'expiration'
4648
}
4749

48-
def __init__(self, access_key_id=None, secret_access_key=None, session_token=None, local_vars_configuration=None): # noqa: E501
50+
def __init__(self, aws_key_id=None, aws_secret_key=None, aws_session_token=None, expiration=None, local_vars_configuration=None): # noqa: E501
4951
"""SessionToken - a model defined in OpenAPI""" # noqa: E501
5052
if local_vars_configuration is None:
5153
local_vars_configuration = Configuration()
5254
self.local_vars_configuration = local_vars_configuration
5355

54-
self._access_key_id = None
55-
self._secret_access_key = None
56-
self._session_token = None
56+
self._aws_key_id = None
57+
self._aws_secret_key = None
58+
self._aws_session_token = None
59+
self._expiration = None
5760
self.discriminator = None
5861

59-
self.access_key_id = access_key_id
60-
self.secret_access_key = secret_access_key
61-
self.session_token = session_token
62+
if aws_key_id is not None:
63+
self.aws_key_id = aws_key_id
64+
if aws_secret_key is not None:
65+
self.aws_secret_key = aws_secret_key
66+
if aws_session_token is not None:
67+
self.aws_session_token = aws_session_token
68+
if expiration is not None:
69+
self.expiration = expiration
6270

6371
@property
64-
def access_key_id(self):
65-
"""Gets the access_key_id of this SessionToken. # noqa: E501
72+
def aws_key_id(self):
73+
"""Gets the aws_key_id of this SessionToken. # noqa: E501
6674
6775
AWS Access Key # noqa: E501
6876
69-
:return: The access_key_id of this SessionToken. # noqa: E501
77+
:return: The aws_key_id of this SessionToken. # noqa: E501
7078
:rtype: str
7179
"""
72-
return self._access_key_id
80+
return self._aws_key_id
7381

74-
@access_key_id.setter
75-
def access_key_id(self, access_key_id):
76-
"""Sets the access_key_id of this SessionToken.
82+
@aws_key_id.setter
83+
def aws_key_id(self, aws_key_id):
84+
"""Sets the aws_key_id of this SessionToken.
7785
7886
AWS Access Key # noqa: E501
7987
80-
:param access_key_id: The access_key_id of this SessionToken. # noqa: E501
81-
:type access_key_id: str
88+
:param aws_key_id: The aws_key_id of this SessionToken. # noqa: E501
89+
:type aws_key_id: str
8290
"""
83-
if self.local_vars_configuration.client_side_validation and access_key_id is None: # noqa: E501
84-
raise ValueError("Invalid value for `access_key_id`, must not be `None`") # noqa: E501
8591
if (self.local_vars_configuration.client_side_validation and
86-
access_key_id is not None and len(access_key_id) < 1):
87-
raise ValueError("Invalid value for `access_key_id`, length must be greater than or equal to `1`") # noqa: E501
92+
aws_key_id is not None and len(aws_key_id) < 1):
93+
raise ValueError("Invalid value for `aws_key_id`, length must be greater than or equal to `1`") # noqa: E501
8894

89-
self._access_key_id = access_key_id
95+
self._aws_key_id = aws_key_id
9096

9197
@property
92-
def secret_access_key(self):
93-
"""Gets the secret_access_key of this SessionToken. # noqa: E501
98+
def aws_secret_key(self):
99+
"""Gets the aws_secret_key of this SessionToken. # noqa: E501
94100
95101
AWS Secret Key # noqa: E501
96102
97-
:return: The secret_access_key of this SessionToken. # noqa: E501
103+
:return: The aws_secret_key of this SessionToken. # noqa: E501
98104
:rtype: str
99105
"""
100-
return self._secret_access_key
106+
return self._aws_secret_key
101107

102-
@secret_access_key.setter
103-
def secret_access_key(self, secret_access_key):
104-
"""Sets the secret_access_key of this SessionToken.
108+
@aws_secret_key.setter
109+
def aws_secret_key(self, aws_secret_key):
110+
"""Sets the aws_secret_key of this SessionToken.
105111
106112
AWS Secret Key # noqa: E501
107113
108-
:param secret_access_key: The secret_access_key of this SessionToken. # noqa: E501
109-
:type secret_access_key: str
114+
:param aws_secret_key: The aws_secret_key of this SessionToken. # noqa: E501
115+
:type aws_secret_key: str
110116
"""
111-
if self.local_vars_configuration.client_side_validation and secret_access_key is None: # noqa: E501
112-
raise ValueError("Invalid value for `secret_access_key`, must not be `None`") # noqa: E501
113117
if (self.local_vars_configuration.client_side_validation and
114-
secret_access_key is not None and len(secret_access_key) < 1):
115-
raise ValueError("Invalid value for `secret_access_key`, length must be greater than or equal to `1`") # noqa: E501
118+
aws_secret_key is not None and len(aws_secret_key) < 1):
119+
raise ValueError("Invalid value for `aws_secret_key`, length must be greater than or equal to `1`") # noqa: E501
116120

117-
self._secret_access_key = secret_access_key
121+
self._aws_secret_key = aws_secret_key
118122

119123
@property
120-
def session_token(self):
121-
"""Gets the session_token of this SessionToken. # noqa: E501
124+
def aws_session_token(self):
125+
"""Gets the aws_session_token of this SessionToken. # noqa: E501
122126
123-
AWS Session Token # noqa: E501
124127
125-
:return: The session_token of this SessionToken. # noqa: E501
128+
:return: The aws_session_token of this SessionToken. # noqa: E501
126129
:rtype: str
127130
"""
128-
return self._session_token
131+
return self._aws_session_token
129132

130-
@session_token.setter
131-
def session_token(self, session_token):
132-
"""Sets the session_token of this SessionToken.
133+
@aws_session_token.setter
134+
def aws_session_token(self, aws_session_token):
135+
"""Sets the aws_session_token of this SessionToken.
133136
134-
AWS Session Token # noqa: E501
135137
136-
:param session_token: The session_token of this SessionToken. # noqa: E501
137-
:type session_token: str
138+
:param aws_session_token: The aws_session_token of this SessionToken. # noqa: E501
139+
:type aws_session_token: str
138140
"""
139-
if self.local_vars_configuration.client_side_validation and session_token is None: # noqa: E501
140-
raise ValueError("Invalid value for `session_token`, must not be `None`") # noqa: E501
141141
if (self.local_vars_configuration.client_side_validation and
142-
session_token is not None and len(session_token) < 1):
143-
raise ValueError("Invalid value for `session_token`, length must be greater than or equal to `1`") # noqa: E501
142+
aws_session_token is not None and len(aws_session_token) < 1):
143+
raise ValueError("Invalid value for `aws_session_token`, length must be greater than or equal to `1`") # noqa: E501
144144

145-
self._session_token = session_token
145+
self._aws_session_token = aws_session_token
146+
147+
@property
148+
def expiration(self):
149+
"""Gets the expiration of this SessionToken. # noqa: E501
150+
151+
Expiration time of token # noqa: E501
152+
153+
:return: The expiration of this SessionToken. # noqa: E501
154+
:rtype: datetime
155+
"""
156+
return self._expiration
157+
158+
@expiration.setter
159+
def expiration(self, expiration):
160+
"""Sets the expiration of this SessionToken.
161+
162+
Expiration time of token # noqa: E501
163+
164+
:param expiration: The expiration of this SessionToken. # noqa: E501
165+
:type expiration: datetime
166+
"""
167+
168+
self._expiration = expiration
146169

147170
def to_dict(self):
148171
"""Returns the model properties as a dict"""

0 commit comments

Comments
 (0)