13
13
from azure .ai .ml ._restclient .v2023_04_01_preview .models import DatastoreType
14
14
from azure .ai .ml ._utils .utils import camel_to_snake , dump_yaml_to_file
15
15
from azure .ai .ml .constants ._common import BASE_PATH_CONTEXT_KEY , PARAMS_OVERRIDE_KEY , CommonYamlFields
16
- from azure .ai .ml .entities ._credentials import NoneCredentialConfiguration
16
+ from azure .ai .ml .entities ._credentials import (
17
+ AccountKeyConfiguration ,
18
+ CertificateConfiguration ,
19
+ NoneCredentialConfiguration ,
20
+ SasTokenConfiguration ,
21
+ ServicePrincipalConfiguration ,
22
+ )
17
23
from azure .ai .ml .entities ._mixins import RestTranslatableMixin
18
24
from azure .ai .ml .entities ._resource import Resource
19
25
from azure .ai .ml .entities ._util import find_type_in_override
@@ -28,7 +34,14 @@ class Datastore(Resource, RestTranslatableMixin, ABC):
28
34
:param description: Description of the resource.
29
35
:type description: str
30
36
:param credentials: Credentials to use for Azure ML workspace to connect to the storage.
31
- :type credentials: Union[ServicePrincipalSection, CertificateSection]
37
+ :type credentials: Optional[Union[
38
+ ~azure.ai.ml.entities.ServicePrincipalConfiguration,
39
+ ~azure.ai.ml.entities.CertificateConfiguration,
40
+ ~azure.ai.ml.entities.NoneCredentialConfiguration,
41
+ ~azure.ai.ml.entities.AccountKeyConfiguration,
42
+ ~azure.ai.ml.entities.SasTokenConfiguration
43
+
44
+ ]]
32
45
:param tags: Tag dictionary. Tags can be added, removed, and updated.
33
46
:type tags: dict[str, str]
34
47
:param properties: The asset property dictionary.
@@ -39,7 +52,15 @@ class Datastore(Resource, RestTranslatableMixin, ABC):
39
52
40
53
def __init__ (
41
54
self ,
42
- credentials : Any ,
55
+ credentials : Optional [
56
+ Union [
57
+ ServicePrincipalConfiguration ,
58
+ CertificateConfiguration ,
59
+ NoneCredentialConfiguration ,
60
+ AccountKeyConfiguration ,
61
+ SasTokenConfiguration ,
62
+ ]
63
+ ],
43
64
name : Optional [str ] = None ,
44
65
description : Optional [str ] = None ,
45
66
tags : Optional [Dict ] = None ,
0 commit comments