@@ -1086,6 +1086,12 @@ class ViewUpdate(BaseModel):
10861086 ]
10871087
10881088
1089+ class Credentials (BaseModel ):
1090+ __root__ : Union [ADLSCredentials , GCSCredentials , S3Credentials ] = Field (
1091+ ..., discriminator = 'type'
1092+ )
1093+
1094+
10891095class LoadTableResult (BaseModel ):
10901096 """
10911097 Result used when a table is successfully loaded.
@@ -1113,6 +1119,11 @@ class LoadTableResult(BaseModel):
11131119 - `s3.session-token`: if present, this value should be used for as the session token
11141120 - `s3.remote-signing-enabled`: if `true` remote signing should be performed as described in the `s3-signer-open-api.yaml` specification
11151121
1122+ ## Credentials
1123+
1124+ Credentials for ADLS / GCS / S3 are provided through the `credentials` field. Clients should first check whether the
1125+ respective credentials exist in the `credentials` field before checking the `config` for credentials.
1126+
11161127 """
11171128
11181129 metadata_location : Optional [str ] = Field (
@@ -1121,6 +1132,7 @@ class LoadTableResult(BaseModel):
11211132 description = 'May be null if the table is staged as part of a transaction' ,
11221133 )
11231134 metadata : TableMetadata
1135+ credentials : Optional [Credentials ] = None
11241136 config : Optional [Dict [str , str ]] = None
11251137
11261138
@@ -1183,10 +1195,16 @@ class LoadViewResult(BaseModel):
11831195
11841196 - `token`: Authorization bearer token to use for view requests if OAuth2 security is enabled
11851197
1198+ ## Credentials
1199+
1200+ Credentials for Azure / GCS / S3 are provided through the `credentials` field. Clients should first check whether the
1201+ respective credentials exist in the `credentials` field before checking the `config` for credentials.
1202+
11861203 """
11871204
11881205 metadata_location : str = Field (..., alias = 'metadata-location' )
11891206 metadata : ViewMetadata
1207+ credentials : Optional [Credentials ] = None
11901208 config : Optional [Dict [str , str ]] = None
11911209
11921210
@@ -1217,6 +1235,28 @@ class Schema(StructType):
12171235 )
12181236
12191237
1238+ class ADLSCredentials (BaseModel ):
1239+ type : Literal ['adls' ]
1240+ account_name : Optional [str ] = Field (None , alias = 'account-name' )
1241+ account_key : Optional [str ] = Field (None , alias = 'account-key' )
1242+ sas_token : Optional [str ] = Field (None , alias = 'sas-token' )
1243+ expires_at_ms : Optional [int ] = Field (None , alias = 'expires-at-ms' )
1244+
1245+
1246+ class GCSCredentials (BaseModel ):
1247+ type : Literal ['gcs' ]
1248+ token : str
1249+ expires_at_ms : int = Field (..., alias = 'expires-at-ms' )
1250+
1251+
1252+ class S3Credentials (BaseModel ):
1253+ type : Literal ['s3' ]
1254+ access_key_id : str = Field (..., alias = 'access-key-id' )
1255+ secret_access_key : str = Field (..., alias = 'secret-access-key' )
1256+ session_token : str = Field (..., alias = 'session-token' )
1257+ expires_at_ms : int = Field (..., alias = 'expires-at-ms' )
1258+
1259+
12201260class ReportMetricsRequest1 (ScanReport ):
12211261 report_type : str = Field (..., alias = 'report-type' )
12221262
@@ -1228,6 +1268,10 @@ class ReportMetricsRequest1(ScanReport):
12281268TableMetadata .update_forward_refs ()
12291269ViewMetadata .update_forward_refs ()
12301270AddSchemaUpdate .update_forward_refs ()
1271+ Credentials .update_forward_refs ()
12311272CreateTableRequest .update_forward_refs ()
12321273CreateViewRequest .update_forward_refs ()
12331274ReportMetricsRequest .update_forward_refs ()
1275+ ADLSCredentials .update_forward_refs ()
1276+ GCSCredentials .update_forward_refs ()
1277+ S3Credentials .update_forward_refs ()
0 commit comments