diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/_meta.json b/sdk/servicelinker/azure-mgmt-servicelinker/_meta.json index 63a7d0f57edd..6a0914f84266 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/_meta.json +++ b/sdk/servicelinker/azure-mgmt-servicelinker/_meta.json @@ -4,8 +4,8 @@ "@autorest/python@5.12.0", "@autorest/modelerfour@4.19.3" ], - "commit": "429a7ea873cc1bbd4df133f71427162e15e258b1", + "commit": "62c00de41dc4a404245c1cfb5ff49c79e48e2153", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/servicelinker/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", + "autorest_command": "autorest specification/servicelinker/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", "readme": "specification/servicelinker/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_configuration.py b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_configuration.py index 2e8d17ebe877..b0ec749329cc 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_configuration.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_configuration.py @@ -39,7 +39,7 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") self.credential = credential - self.api_version = "2021-11-01-preview" + self.api_version = "2022-01-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-servicelinker/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_metadata.json b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_metadata.json index 8924f4b63eb2..fa8ef19ea9b3 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_metadata.json +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-11-01-preview", - "total_api_version_list": ["2021-11-01-preview"], + "chosen_version": "2022-01-01-preview", + "total_api_version_list": ["2022-01-01-preview"], "client": { "name": "MicrosoftServiceLinker", "filename": "_microsoft_service_linker", diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_version.py b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_version.py index dfa6ee022f15..e5754a47ce68 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_version.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0b1" diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/_configuration.py b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/_configuration.py index ac4924edb15a..ca32bc6b124d 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/_configuration.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/aio/_configuration.py @@ -39,7 +39,7 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") self.credential = credential - self.api_version = "2021-11-01-preview" + self.api_version = "2022-01-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-servicelinker/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/__init__.py b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/__init__.py index 6ddcccaa9932..53444073210e 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/__init__.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/__init__.py @@ -7,9 +7,16 @@ # -------------------------------------------------------------------------- from ._models_py3 import AuthInfoBase +from ._models_py3 import AzureKeyVaultProperties +from ._models_py3 import AzureResource +from ._models_py3 import AzureResourcePropertiesBase +from ._models_py3 import ConfluentBootstrapServer +from ._models_py3 import ConfluentSchemaRegistry from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse +from ._models_py3 import KeyVaultSecretReferenceSecretInfo +from ._models_py3 import KeyVaultSecretUriSecretInfo from ._models_py3 import LinkerList from ._models_py3 import LinkerPatch from ._models_py3 import LinkerResource @@ -19,6 +26,7 @@ from ._models_py3 import ProxyResource from ._models_py3 import Resource from ._models_py3 import SecretAuthInfo +from ._models_py3 import SecretInfoBase from ._models_py3 import SecretStore from ._models_py3 import ServicePrincipalCertificateAuthInfo from ._models_py3 import ServicePrincipalSecretAuthInfo @@ -26,9 +34,12 @@ from ._models_py3 import SourceConfigurationResult from ._models_py3 import SystemAssignedIdentityAuthInfo from ._models_py3 import SystemData +from ._models_py3 import TargetServiceBase from ._models_py3 import UserAssignedIdentityAuthInfo from ._models_py3 import VNetSolution from ._models_py3 import ValidateResult +from ._models_py3 import ValidationResultItem +from ._models_py3 import ValueSecretInfo from ._microsoft_service_linker_enums import ( @@ -36,16 +47,25 @@ AuthType, ClientType, CreatedByType, - LinkerStatus, Origin, + SecretType, + Type, VNetSolutionType, + ValidationItemResult, ) __all__ = [ 'AuthInfoBase', + 'AzureKeyVaultProperties', + 'AzureResource', + 'AzureResourcePropertiesBase', + 'ConfluentBootstrapServer', + 'ConfluentSchemaRegistry', 'ErrorAdditionalInfo', 'ErrorDetail', 'ErrorResponse', + 'KeyVaultSecretReferenceSecretInfo', + 'KeyVaultSecretUriSecretInfo', 'LinkerList', 'LinkerPatch', 'LinkerResource', @@ -55,6 +75,7 @@ 'ProxyResource', 'Resource', 'SecretAuthInfo', + 'SecretInfoBase', 'SecretStore', 'ServicePrincipalCertificateAuthInfo', 'ServicePrincipalSecretAuthInfo', @@ -62,14 +83,19 @@ 'SourceConfigurationResult', 'SystemAssignedIdentityAuthInfo', 'SystemData', + 'TargetServiceBase', 'UserAssignedIdentityAuthInfo', 'VNetSolution', 'ValidateResult', + 'ValidationResultItem', + 'ValueSecretInfo', 'ActionType', 'AuthType', 'ClientType', 'CreatedByType', - 'LinkerStatus', 'Origin', + 'SecretType', + 'Type', 'VNetSolutionType', + 'ValidationItemResult', ] diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_microsoft_service_linker_enums.py b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_microsoft_service_linker_enums.py index b424fb9377bf..e9d837bfd45e 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_microsoft_service_linker_enums.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_microsoft_service_linker_enums.py @@ -51,13 +51,6 @@ class CreatedByType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): MANAGED_IDENTITY = "ManagedIdentity" KEY = "Key" -class LinkerStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Specifies if the linker is healthy. - """ - - HEALTHY = "Healthy" - NOT_HEALTHY = "Not healthy" - class Origin(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" @@ -67,6 +60,31 @@ class Origin(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): SYSTEM = "system" USER_SYSTEM = "user,system" +class SecretType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The secret type. + """ + + RAW_VALUE = "rawValue" + KEY_VAULT_SECRET_URI = "keyVaultSecretUri" + KEY_VAULT_SECRET_REFERENCE = "keyVaultSecretReference" + +class Type(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The target service type. + """ + + AZURE_RESOURCE = "AzureResource" + CONFLUENT_BOOTSTRAP_SERVER = "ConfluentBootstrapServer" + CONFLUENT_SCHEMA_REGISTRY = "ConfluentSchemaRegistry" + KEY_VAULT = "KeyVault" + +class ValidationItemResult(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The result of validation + """ + + SUCCESS = "success" + FAILED = "failed" + WARNING = "warning" + class VNetSolutionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of VNet solution. """ diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_models_py3.py b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_models_py3.py index 4e9dfc4dd864..697969f652f9 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_models_py3.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/models/_models_py3.py @@ -51,6 +51,227 @@ def __init__( self.auth_type = None # type: Optional[str] +class AzureResourcePropertiesBase(msrest.serialization.Model): + """The azure resource properties. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureKeyVaultProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The azure resource type.Constant filled by server. Possible values + include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault". + :vartype type: str or ~microsoft_service_linker.models.Type + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'KeyVault': 'AzureKeyVaultProperties'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AzureResourcePropertiesBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class AzureKeyVaultProperties(AzureResourcePropertiesBase): + """The resource properties when type is Azure Key Vault. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The azure resource type.Constant filled by server. Possible values + include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault". + :vartype type: str or ~microsoft_service_linker.models.Type + :ivar connect_as_kubernetes_csi_driver: True if connect via Kubernetes CSI Driver. + :vartype connect_as_kubernetes_csi_driver: bool + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'connect_as_kubernetes_csi_driver': {'key': 'connectAsKubernetesCsiDriver', 'type': 'bool'}, + } + + def __init__( + self, + *, + connect_as_kubernetes_csi_driver: Optional[bool] = None, + **kwargs + ): + """ + :keyword connect_as_kubernetes_csi_driver: True if connect via Kubernetes CSI Driver. + :paramtype connect_as_kubernetes_csi_driver: bool + """ + super(AzureKeyVaultProperties, self).__init__(**kwargs) + self.type = 'KeyVault' # type: str + self.connect_as_kubernetes_csi_driver = connect_as_kubernetes_csi_driver + + +class TargetServiceBase(msrest.serialization.Model): + """The target service properties. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureResource, ConfluentBootstrapServer, ConfluentSchemaRegistry. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The target service type.Constant filled by server. Possible values + include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault". + :vartype type: str or ~microsoft_service_linker.models.Type + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'AzureResource': 'AzureResource', 'ConfluentBootstrapServer': 'ConfluentBootstrapServer', 'ConfluentSchemaRegistry': 'ConfluentSchemaRegistry'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(TargetServiceBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class AzureResource(TargetServiceBase): + """The azure resource info when target service type is AzureResource. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The target service type.Constant filled by server. Possible values + include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault". + :vartype type: str or ~microsoft_service_linker.models.Type + :ivar id: The Id of azure resource. + :vartype id: str + :ivar resource_properties: The azure resource connection related properties. + :vartype resource_properties: ~microsoft_service_linker.models.AzureResourcePropertiesBase + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'resource_properties': {'key': 'resourceProperties', 'type': 'AzureResourcePropertiesBase'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + resource_properties: Optional["AzureResourcePropertiesBase"] = None, + **kwargs + ): + """ + :keyword id: The Id of azure resource. + :paramtype id: str + :keyword resource_properties: The azure resource connection related properties. + :paramtype resource_properties: ~microsoft_service_linker.models.AzureResourcePropertiesBase + """ + super(AzureResource, self).__init__(**kwargs) + self.type = 'AzureResource' # type: str + self.id = id + self.resource_properties = resource_properties + + +class ConfluentBootstrapServer(TargetServiceBase): + """The service properties when target service type is ConfluentBootstrapServer. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The target service type.Constant filled by server. Possible values + include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault". + :vartype type: str or ~microsoft_service_linker.models.Type + :ivar endpoint: The endpoint of service. + :vartype endpoint: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + *, + endpoint: Optional[str] = None, + **kwargs + ): + """ + :keyword endpoint: The endpoint of service. + :paramtype endpoint: str + """ + super(ConfluentBootstrapServer, self).__init__(**kwargs) + self.type = 'ConfluentBootstrapServer' # type: str + self.endpoint = endpoint + + +class ConfluentSchemaRegistry(TargetServiceBase): + """The service properties when target service type is ConfluentSchemaRegistry. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. The target service type.Constant filled by server. Possible values + include: "AzureResource", "ConfluentBootstrapServer", "ConfluentSchemaRegistry", "KeyVault". + :vartype type: str or ~microsoft_service_linker.models.Type + :ivar endpoint: The endpoint of service. + :vartype endpoint: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + *, + endpoint: Optional[str] = None, + **kwargs + ): + """ + :keyword endpoint: The endpoint of service. + :paramtype endpoint: str + """ + super(ConfluentSchemaRegistry, self).__init__(**kwargs) + self.type = 'ConfluentSchemaRegistry' # type: str + self.endpoint = endpoint + + class ErrorAdditionalInfo(msrest.serialization.Model): """The resource management error additional info. @@ -155,6 +376,120 @@ def __init__( self.error = error +class SecretInfoBase(msrest.serialization.Model): + """The secret info. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: KeyVaultSecretReferenceSecretInfo, KeyVaultSecretUriSecretInfo, ValueSecretInfo. + + All required parameters must be populated in order to send to Azure. + + :ivar secret_type: Required. The secret type.Constant filled by server. Possible values + include: "rawValue", "keyVaultSecretUri", "keyVaultSecretReference". + :vartype secret_type: str or ~microsoft_service_linker.models.SecretType + """ + + _validation = { + 'secret_type': {'required': True}, + } + + _attribute_map = { + 'secret_type': {'key': 'secretType', 'type': 'str'}, + } + + _subtype_map = { + 'secret_type': {'keyVaultSecretReference': 'KeyVaultSecretReferenceSecretInfo', 'keyVaultSecretUri': 'KeyVaultSecretUriSecretInfo', 'rawValue': 'ValueSecretInfo'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SecretInfoBase, self).__init__(**kwargs) + self.secret_type = None # type: Optional[str] + + +class KeyVaultSecretReferenceSecretInfo(SecretInfoBase): + """The secret info when type is keyVaultSecretReference. It's for scenario that user provides a secret stored in user's keyvault and source is Azure Kubernetes. The key Vault's resource id is linked to secretStore.keyVaultId. + + All required parameters must be populated in order to send to Azure. + + :ivar secret_type: Required. The secret type.Constant filled by server. Possible values + include: "rawValue", "keyVaultSecretUri", "keyVaultSecretReference". + :vartype secret_type: str or ~microsoft_service_linker.models.SecretType + :ivar name: Name of the Key Vault secret. + :vartype name: str + :ivar version: Version of the Key Vault secret. + :vartype version: str + """ + + _validation = { + 'secret_type': {'required': True}, + } + + _attribute_map = { + 'secret_type': {'key': 'secretType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + version: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the Key Vault secret. + :paramtype name: str + :keyword version: Version of the Key Vault secret. + :paramtype version: str + """ + super(KeyVaultSecretReferenceSecretInfo, self).__init__(**kwargs) + self.secret_type = 'keyVaultSecretReference' # type: str + self.name = name + self.version = version + + +class KeyVaultSecretUriSecretInfo(SecretInfoBase): + """The secret info when type is keyVaultSecretUri. It's for scenario that user provides a secret stored in user's keyvault and source is Web App, Spring Cloud or Container App. + + All required parameters must be populated in order to send to Azure. + + :ivar secret_type: Required. The secret type.Constant filled by server. Possible values + include: "rawValue", "keyVaultSecretUri", "keyVaultSecretReference". + :vartype secret_type: str or ~microsoft_service_linker.models.SecretType + :ivar value: URI to the keyvault secret. + :vartype value: str + """ + + _validation = { + 'secret_type': {'required': True}, + } + + _attribute_map = { + 'secret_type': {'key': 'secretType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + **kwargs + ): + """ + :keyword value: URI to the keyvault secret. + :paramtype value: str + """ + super(KeyVaultSecretUriSecretInfo, self).__init__(**kwargs) + self.secret_type = 'keyVaultSecretUri' # type: str + self.value = value + + class LinkerList(msrest.serialization.Model): """The list of Linker. @@ -192,8 +527,8 @@ class LinkerPatch(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar target_id: The resource Id of target service. - :vartype target_id: str + :ivar target_service: The target service properties. + :vartype target_service: ~microsoft_service_linker.models.TargetServiceBase :ivar auth_info: The authentication type. :vartype auth_info: ~microsoft_service_linker.models.AuthInfoBase :ivar client_type: The application client type. Possible values include: "none", "dotnet", @@ -205,6 +540,8 @@ class LinkerPatch(msrest.serialization.Model): :vartype v_net_solution: ~microsoft_service_linker.models.VNetSolution :ivar secret_store: An option to store secret value in secure place. :vartype secret_store: ~microsoft_service_linker.models.SecretStore + :ivar scope: connection scope in source service. + :vartype scope: str """ _validation = { @@ -212,27 +549,29 @@ class LinkerPatch(msrest.serialization.Model): } _attribute_map = { - 'target_id': {'key': 'properties.targetId', 'type': 'str'}, + 'target_service': {'key': 'properties.targetService', 'type': 'TargetServiceBase'}, 'auth_info': {'key': 'properties.authInfo', 'type': 'AuthInfoBase'}, 'client_type': {'key': 'properties.clientType', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'v_net_solution': {'key': 'properties.vNetSolution', 'type': 'VNetSolution'}, 'secret_store': {'key': 'properties.secretStore', 'type': 'SecretStore'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, } def __init__( self, *, - target_id: Optional[str] = None, + target_service: Optional["TargetServiceBase"] = None, auth_info: Optional["AuthInfoBase"] = None, client_type: Optional[Union[str, "ClientType"]] = None, v_net_solution: Optional["VNetSolution"] = None, secret_store: Optional["SecretStore"] = None, + scope: Optional[str] = None, **kwargs ): """ - :keyword target_id: The resource Id of target service. - :paramtype target_id: str + :keyword target_service: The target service properties. + :paramtype target_service: ~microsoft_service_linker.models.TargetServiceBase :keyword auth_info: The authentication type. :paramtype auth_info: ~microsoft_service_linker.models.AuthInfoBase :keyword client_type: The application client type. Possible values include: "none", "dotnet", @@ -242,14 +581,17 @@ def __init__( :paramtype v_net_solution: ~microsoft_service_linker.models.VNetSolution :keyword secret_store: An option to store secret value in secure place. :paramtype secret_store: ~microsoft_service_linker.models.SecretStore + :keyword scope: connection scope in source service. + :paramtype scope: str """ super(LinkerPatch, self).__init__(**kwargs) - self.target_id = target_id + self.target_service = target_service self.auth_info = auth_info self.client_type = client_type self.provisioning_state = None self.v_net_solution = v_net_solution self.secret_store = secret_store + self.scope = scope class Resource(msrest.serialization.Model): @@ -342,8 +684,8 @@ class LinkerResource(ProxyResource): :vartype type: str :ivar system_data: The system data. :vartype system_data: ~microsoft_service_linker.models.SystemData - :ivar target_id: The resource Id of target service. - :vartype target_id: str + :ivar target_service: The target service properties. + :vartype target_service: ~microsoft_service_linker.models.TargetServiceBase :ivar auth_info: The authentication type. :vartype auth_info: ~microsoft_service_linker.models.AuthInfoBase :ivar client_type: The application client type. Possible values include: "none", "dotnet", @@ -355,6 +697,8 @@ class LinkerResource(ProxyResource): :vartype v_net_solution: ~microsoft_service_linker.models.VNetSolution :ivar secret_store: An option to store secret value in secure place. :vartype secret_store: ~microsoft_service_linker.models.SecretStore + :ivar scope: connection scope in source service. + :vartype scope: str """ _validation = { @@ -370,27 +714,29 @@ class LinkerResource(ProxyResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'target_id': {'key': 'properties.targetId', 'type': 'str'}, + 'target_service': {'key': 'properties.targetService', 'type': 'TargetServiceBase'}, 'auth_info': {'key': 'properties.authInfo', 'type': 'AuthInfoBase'}, 'client_type': {'key': 'properties.clientType', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'v_net_solution': {'key': 'properties.vNetSolution', 'type': 'VNetSolution'}, 'secret_store': {'key': 'properties.secretStore', 'type': 'SecretStore'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, } def __init__( self, *, - target_id: Optional[str] = None, + target_service: Optional["TargetServiceBase"] = None, auth_info: Optional["AuthInfoBase"] = None, client_type: Optional[Union[str, "ClientType"]] = None, v_net_solution: Optional["VNetSolution"] = None, secret_store: Optional["SecretStore"] = None, + scope: Optional[str] = None, **kwargs ): """ - :keyword target_id: The resource Id of target service. - :paramtype target_id: str + :keyword target_service: The target service properties. + :paramtype target_service: ~microsoft_service_linker.models.TargetServiceBase :keyword auth_info: The authentication type. :paramtype auth_info: ~microsoft_service_linker.models.AuthInfoBase :keyword client_type: The application client type. Possible values include: "none", "dotnet", @@ -400,15 +746,18 @@ def __init__( :paramtype v_net_solution: ~microsoft_service_linker.models.VNetSolution :keyword secret_store: An option to store secret value in secure place. :paramtype secret_store: ~microsoft_service_linker.models.SecretStore + :keyword scope: connection scope in source service. + :paramtype scope: str """ super(LinkerResource, self).__init__(**kwargs) self.system_data = None - self.target_id = target_id + self.target_service = target_service self.auth_info = auth_info self.client_type = client_type self.provisioning_state = None self.v_net_solution = v_net_solution self.secret_store = secret_store + self.scope = scope class Operation(msrest.serialization.Model): @@ -556,7 +905,7 @@ class SecretAuthInfo(AuthInfoBase): :ivar name: Username or account name for secret auth. :vartype name: str :ivar secret: Password or account key for secret auth. - :vartype secret: str + :vartype secret: ~microsoft_service_linker.models.SecretInfoBase """ _validation = { @@ -566,21 +915,21 @@ class SecretAuthInfo(AuthInfoBase): _attribute_map = { 'auth_type': {'key': 'authType', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'secret': {'key': 'secret', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'SecretInfoBase'}, } def __init__( self, *, name: Optional[str] = None, - secret: Optional[str] = None, + secret: Optional["SecretInfoBase"] = None, **kwargs ): """ :keyword name: Username or account name for secret auth. :paramtype name: str :keyword secret: Password or account key for secret auth. - :paramtype secret: str + :paramtype secret: ~microsoft_service_linker.models.SecretInfoBase """ super(SecretAuthInfo, self).__init__(**kwargs) self.auth_type = 'secret' # type: str @@ -880,16 +1229,14 @@ class UserAssignedIdentityAuthInfo(AuthInfoBase): include: "systemAssignedIdentity", "userAssignedIdentity", "servicePrincipalSecret", "servicePrincipalCertificate", "secret". :vartype auth_type: str or ~microsoft_service_linker.models.AuthType - :ivar client_id: Required. Client Id for userAssignedIdentity. + :ivar client_id: Client Id for userAssignedIdentity. :vartype client_id: str - :ivar subscription_id: Required. Subscription id for userAssignedIdentity. + :ivar subscription_id: Subscription id for userAssignedIdentity. :vartype subscription_id: str """ _validation = { 'auth_type': {'required': True}, - 'client_id': {'required': True}, - 'subscription_id': {'required': True}, } _attribute_map = { @@ -901,14 +1248,14 @@ class UserAssignedIdentityAuthInfo(AuthInfoBase): def __init__( self, *, - client_id: str, - subscription_id: str, + client_id: Optional[str] = None, + subscription_id: Optional[str] = None, **kwargs ): """ - :keyword client_id: Required. Client Id for userAssignedIdentity. + :keyword client_id: Client Id for userAssignedIdentity. :paramtype client_id: str - :keyword subscription_id: Required. Subscription id for userAssignedIdentity. + :keyword subscription_id: Subscription id for userAssignedIdentity. :paramtype subscription_id: str """ super(UserAssignedIdentityAuthInfo, self).__init__(**kwargs) @@ -920,72 +1267,170 @@ def __init__( class ValidateResult(msrest.serialization.Model): """The validation result for a linker. - :ivar name: The linker name. - :vartype name: str - :ivar linker_status: Specifies if the linker is healthy. Possible values include: "Healthy", - "Not healthy". - :vartype linker_status: str or ~microsoft_service_linker.models.LinkerStatus - :ivar reason: The reason of the error. - :vartype reason: str + :ivar linker_name: The linker name. + :vartype linker_name: str + :ivar is_connection_available: A boolean value indicating whether the connection is available + or not. + :vartype is_connection_available: bool :ivar report_start_time_utc: The start time of the validation report. :vartype report_start_time_utc: ~datetime.datetime :ivar report_end_time_utc: The end time of the validation report. :vartype report_end_time_utc: ~datetime.datetime + :ivar source_id: The resource id of the linker source application. + :vartype source_id: str :ivar target_id: The resource Id of target service. :vartype target_id: str :ivar auth_type: The authentication type. Possible values include: "systemAssignedIdentity", "userAssignedIdentity", "servicePrincipalSecret", "servicePrincipalCertificate", "secret". :vartype auth_type: str or ~microsoft_service_linker.models.AuthType + :ivar validation_detail: The detail of validation result. + :vartype validation_detail: list[~microsoft_service_linker.models.ValidationResultItem] """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'linker_status': {'key': 'linkerStatus', 'type': 'str'}, - 'reason': {'key': 'reason', 'type': 'str'}, + 'linker_name': {'key': 'linkerName', 'type': 'str'}, + 'is_connection_available': {'key': 'isConnectionAvailable', 'type': 'bool'}, 'report_start_time_utc': {'key': 'reportStartTimeUtc', 'type': 'iso-8601'}, 'report_end_time_utc': {'key': 'reportEndTimeUtc', 'type': 'iso-8601'}, + 'source_id': {'key': 'sourceId', 'type': 'str'}, 'target_id': {'key': 'targetId', 'type': 'str'}, 'auth_type': {'key': 'authType', 'type': 'str'}, + 'validation_detail': {'key': 'validationDetail', 'type': '[ValidationResultItem]'}, } def __init__( self, *, - name: Optional[str] = None, - linker_status: Optional[Union[str, "LinkerStatus"]] = None, - reason: Optional[str] = None, + linker_name: Optional[str] = None, + is_connection_available: Optional[bool] = None, report_start_time_utc: Optional[datetime.datetime] = None, report_end_time_utc: Optional[datetime.datetime] = None, + source_id: Optional[str] = None, target_id: Optional[str] = None, auth_type: Optional[Union[str, "AuthType"]] = None, + validation_detail: Optional[List["ValidationResultItem"]] = None, **kwargs ): """ - :keyword name: The linker name. - :paramtype name: str - :keyword linker_status: Specifies if the linker is healthy. Possible values include: "Healthy", - "Not healthy". - :paramtype linker_status: str or ~microsoft_service_linker.models.LinkerStatus - :keyword reason: The reason of the error. - :paramtype reason: str + :keyword linker_name: The linker name. + :paramtype linker_name: str + :keyword is_connection_available: A boolean value indicating whether the connection is + available or not. + :paramtype is_connection_available: bool :keyword report_start_time_utc: The start time of the validation report. :paramtype report_start_time_utc: ~datetime.datetime :keyword report_end_time_utc: The end time of the validation report. :paramtype report_end_time_utc: ~datetime.datetime + :keyword source_id: The resource id of the linker source application. + :paramtype source_id: str :keyword target_id: The resource Id of target service. :paramtype target_id: str :keyword auth_type: The authentication type. Possible values include: "systemAssignedIdentity", "userAssignedIdentity", "servicePrincipalSecret", "servicePrincipalCertificate", "secret". :paramtype auth_type: str or ~microsoft_service_linker.models.AuthType + :keyword validation_detail: The detail of validation result. + :paramtype validation_detail: list[~microsoft_service_linker.models.ValidationResultItem] """ super(ValidateResult, self).__init__(**kwargs) - self.name = name - self.linker_status = linker_status - self.reason = reason + self.linker_name = linker_name + self.is_connection_available = is_connection_available self.report_start_time_utc = report_start_time_utc self.report_end_time_utc = report_end_time_utc + self.source_id = source_id self.target_id = target_id self.auth_type = auth_type + self.validation_detail = validation_detail + + +class ValidationResultItem(msrest.serialization.Model): + """The validation item for a linker. + + :ivar name: The validation item name. + :vartype name: str + :ivar description: The display name of validation item. + :vartype description: str + :ivar result: The result of validation. Possible values include: "success", "failed", + "warning". + :vartype result: str or ~microsoft_service_linker.models.ValidationItemResult + :ivar error_message: The error message of validation result. + :vartype error_message: str + :ivar error_code: The error code of validation result. + :vartype error_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + result: Optional[Union[str, "ValidationItemResult"]] = None, + error_message: Optional[str] = None, + error_code: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The validation item name. + :paramtype name: str + :keyword description: The display name of validation item. + :paramtype description: str + :keyword result: The result of validation. Possible values include: "success", "failed", + "warning". + :paramtype result: str or ~microsoft_service_linker.models.ValidationItemResult + :keyword error_message: The error message of validation result. + :paramtype error_message: str + :keyword error_code: The error code of validation result. + :paramtype error_code: str + """ + super(ValidationResultItem, self).__init__(**kwargs) + self.name = name + self.description = description + self.result = result + self.error_message = error_message + self.error_code = error_code + + +class ValueSecretInfo(SecretInfoBase): + """The secret info when type is rawValue. It's for scenarios that user input the secret. + + All required parameters must be populated in order to send to Azure. + + :ivar secret_type: Required. The secret type.Constant filled by server. Possible values + include: "rawValue", "keyVaultSecretUri", "keyVaultSecretReference". + :vartype secret_type: str or ~microsoft_service_linker.models.SecretType + :ivar value: The actual value of the secret. + :vartype value: str + """ + + _validation = { + 'secret_type': {'required': True}, + } + + _attribute_map = { + 'secret_type': {'key': 'secretType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The actual value of the secret. + :paramtype value: str + """ + super(ValueSecretInfo, self).__init__(**kwargs) + self.secret_type = 'rawValue' # type: str + self.value = value class VNetSolution(msrest.serialization.Model): diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_linker_operations.py b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_linker_operations.py index 1157a6655c15..05382a547608 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_linker_operations.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_linker_operations.py @@ -33,7 +33,7 @@ def build_list_request( resource_uri: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-01-preview" + api_version = "2022-01-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ServiceLinker/linkers') @@ -65,7 +65,7 @@ def build_get_request( linker_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-01-preview" + api_version = "2022-01-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}') @@ -103,7 +103,7 @@ def build_create_or_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-01-preview" + api_version = "2022-01-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}') @@ -140,7 +140,7 @@ def build_delete_request_initial( linker_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-01-preview" + api_version = "2022-01-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}') @@ -178,7 +178,7 @@ def build_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-01-preview" + api_version = "2022-01-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}') @@ -215,7 +215,7 @@ def build_validate_request_initial( linker_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-01-preview" + api_version = "2022-01-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/validateLinker') @@ -248,7 +248,7 @@ def build_list_configurations_request( linker_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-01-preview" + api_version = "2022-01-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/listConfigurations') diff --git a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_operations.py b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_operations.py index de165643cc81..38d56adabce2 100644 --- a/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_operations.py +++ b/sdk/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker/operations/_operations.py @@ -29,7 +29,7 @@ def build_list_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-01-preview" + api_version = "2022-01-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/providers/Microsoft.ServiceLinker/operations')