[AutoRelease] t2-iotoperations-2024-10-16-63858(can only be merged by SDK owner) (#37918)
* code and test * update-testcase --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <v-chenjiang@microsoft.com>
This commit is contained in:
Родитель
06d76a856d
Коммит
71681bdcd7
|
@ -0,0 +1,7 @@
|
|||
# Release History
|
||||
|
||||
## 1.0.0b1 (2024-10-21)
|
||||
|
||||
### Other Changes
|
||||
|
||||
- Initial version
|
|
@ -0,0 +1,21 @@
|
|||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,8 @@
|
|||
include _meta.json
|
||||
recursive-include tests *.py *.json
|
||||
recursive-include samples *.py *.md
|
||||
include *.md
|
||||
include azure/__init__.py
|
||||
include azure/mgmt/__init__.py
|
||||
include LICENSE
|
||||
include azure/mgmt/iotoperations/py.typed
|
|
@ -0,0 +1,61 @@
|
|||
# Microsoft Azure SDK for Python
|
||||
|
||||
This is the Microsoft Azure Iotoperations Management Client Library.
|
||||
This package has been tested with Python 3.8+.
|
||||
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
|
||||
|
||||
## _Disclaimer_
|
||||
|
||||
_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
|
||||
|
||||
## Getting started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Python 3.8+ is required to use this package.
|
||||
- [Azure subscription](https://azure.microsoft.com/free/)
|
||||
|
||||
### Install the package
|
||||
|
||||
```bash
|
||||
pip install azure-mgmt-iotoperations
|
||||
pip install azure-identity
|
||||
```
|
||||
|
||||
### Authentication
|
||||
|
||||
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
|
||||
|
||||
- `AZURE_CLIENT_ID` for Azure client ID.
|
||||
- `AZURE_TENANT_ID` for Azure tenant ID.
|
||||
- `AZURE_CLIENT_SECRET` for Azure client secret.
|
||||
|
||||
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
|
||||
|
||||
With above configuration, client can be authenticated by following code:
|
||||
|
||||
```python
|
||||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
import os
|
||||
|
||||
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
|
||||
client = IoTOperationsMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
Code samples for this package can be found at:
|
||||
- [Search Iotoperations Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
|
||||
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
|
||||
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
## Next steps
|
||||
|
||||
## Provide Feedback
|
||||
|
||||
If you encounter any bugs or have suggestions, please file an issue in the
|
||||
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
|
||||
section of the project.
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"commit": "7d0134ad6d42786b1ff2d49a3cfb331b336c3099",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
|
||||
"typespec_src": "specification/iotoperations/IoTOperations.Management",
|
||||
"@azure-tools/typespec-python": "0.36.0"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
|
@ -0,0 +1 @@
|
|||
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
|
@ -0,0 +1,26 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from ._client import IoTOperationsMgmtClient
|
||||
from ._version import VERSION
|
||||
|
||||
__version__ = VERSION
|
||||
|
||||
try:
|
||||
from ._patch import __all__ as _patch_all
|
||||
from ._patch import * # pylint: disable=unused-wildcard-import
|
||||
except ImportError:
|
||||
_patch_all = []
|
||||
from ._patch import patch_sdk as _patch_sdk
|
||||
|
||||
__all__ = [
|
||||
"IoTOperationsMgmtClient",
|
||||
]
|
||||
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
||||
|
||||
_patch_sdk()
|
|
@ -0,0 +1,159 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from copy import deepcopy
|
||||
from typing import Any, TYPE_CHECKING
|
||||
from typing_extensions import Self
|
||||
|
||||
from azure.core.pipeline import policies
|
||||
from azure.core.rest import HttpRequest, HttpResponse
|
||||
from azure.mgmt.core import ARMPipelineClient
|
||||
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
|
||||
|
||||
from ._configuration import IoTOperationsMgmtClientConfiguration
|
||||
from ._serialization import Deserializer, Serializer
|
||||
from .operations import (
|
||||
BrokerAuthenticationOperations,
|
||||
BrokerAuthorizationOperations,
|
||||
BrokerListenerOperations,
|
||||
BrokerOperations,
|
||||
DataflowEndpointOperations,
|
||||
DataflowOperations,
|
||||
DataflowProfileOperations,
|
||||
InstanceOperations,
|
||||
Operations,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from azure.core.credentials import TokenCredential
|
||||
|
||||
|
||||
class IoTOperationsMgmtClient: # pylint: disable=too-many-instance-attributes
|
||||
"""Microsoft.IoTOperations Resource Provider management API.
|
||||
|
||||
:ivar operations: Operations operations
|
||||
:vartype operations: azure.mgmt.iotoperations.operations.Operations
|
||||
:ivar instance: InstanceOperations operations
|
||||
:vartype instance: azure.mgmt.iotoperations.operations.InstanceOperations
|
||||
:ivar broker: BrokerOperations operations
|
||||
:vartype broker: azure.mgmt.iotoperations.operations.BrokerOperations
|
||||
:ivar broker_listener: BrokerListenerOperations operations
|
||||
:vartype broker_listener: azure.mgmt.iotoperations.operations.BrokerListenerOperations
|
||||
:ivar broker_authentication: BrokerAuthenticationOperations operations
|
||||
:vartype broker_authentication:
|
||||
azure.mgmt.iotoperations.operations.BrokerAuthenticationOperations
|
||||
:ivar broker_authorization: BrokerAuthorizationOperations operations
|
||||
:vartype broker_authorization:
|
||||
azure.mgmt.iotoperations.operations.BrokerAuthorizationOperations
|
||||
:ivar dataflow_profile: DataflowProfileOperations operations
|
||||
:vartype dataflow_profile: azure.mgmt.iotoperations.operations.DataflowProfileOperations
|
||||
:ivar dataflow: DataflowOperations operations
|
||||
:vartype dataflow: azure.mgmt.iotoperations.operations.DataflowOperations
|
||||
:ivar dataflow_endpoint: DataflowEndpointOperations operations
|
||||
:vartype dataflow_endpoint: azure.mgmt.iotoperations.operations.DataflowEndpointOperations
|
||||
:param credential: Credential used to authenticate requests to the service. Required.
|
||||
:type credential: ~azure.core.credentials.TokenCredential
|
||||
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
|
||||
:type subscription_id: str
|
||||
:param base_url: Service host. Default value is "https://management.azure.com".
|
||||
:type base_url: str
|
||||
:keyword api_version: The API version to use for this operation. Default value is
|
||||
"2024-09-15-preview". Note that overriding this default value may result in unsupported
|
||||
behavior.
|
||||
:paramtype api_version: str
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
|
||||
Retry-After header is present.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
credential: "TokenCredential",
|
||||
subscription_id: str,
|
||||
base_url: str = "https://management.azure.com",
|
||||
**kwargs: Any
|
||||
) -> None:
|
||||
_endpoint = "{endpoint}"
|
||||
self._config = IoTOperationsMgmtClientConfiguration(
|
||||
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
|
||||
)
|
||||
_policies = kwargs.pop("policies", None)
|
||||
if _policies is None:
|
||||
_policies = [
|
||||
policies.RequestIdPolicy(**kwargs),
|
||||
self._config.headers_policy,
|
||||
self._config.user_agent_policy,
|
||||
self._config.proxy_policy,
|
||||
policies.ContentDecodePolicy(**kwargs),
|
||||
ARMAutoResourceProviderRegistrationPolicy(),
|
||||
self._config.redirect_policy,
|
||||
self._config.retry_policy,
|
||||
self._config.authentication_policy,
|
||||
self._config.custom_hook_policy,
|
||||
self._config.logging_policy,
|
||||
policies.DistributedTracingPolicy(**kwargs),
|
||||
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
|
||||
self._config.http_logging_policy,
|
||||
]
|
||||
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
|
||||
|
||||
self._serialize = Serializer()
|
||||
self._deserialize = Deserializer()
|
||||
self._serialize.client_side_validation = False
|
||||
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
|
||||
self.instance = InstanceOperations(self._client, self._config, self._serialize, self._deserialize)
|
||||
self.broker = BrokerOperations(self._client, self._config, self._serialize, self._deserialize)
|
||||
self.broker_listener = BrokerListenerOperations(self._client, self._config, self._serialize, self._deserialize)
|
||||
self.broker_authentication = BrokerAuthenticationOperations(
|
||||
self._client, self._config, self._serialize, self._deserialize
|
||||
)
|
||||
self.broker_authorization = BrokerAuthorizationOperations(
|
||||
self._client, self._config, self._serialize, self._deserialize
|
||||
)
|
||||
self.dataflow_profile = DataflowProfileOperations(
|
||||
self._client, self._config, self._serialize, self._deserialize
|
||||
)
|
||||
self.dataflow = DataflowOperations(self._client, self._config, self._serialize, self._deserialize)
|
||||
self.dataflow_endpoint = DataflowEndpointOperations(
|
||||
self._client, self._config, self._serialize, self._deserialize
|
||||
)
|
||||
|
||||
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
|
||||
"""Runs the network request through the client's chained policies.
|
||||
|
||||
>>> from azure.core.rest import HttpRequest
|
||||
>>> request = HttpRequest("GET", "https://www.example.org/")
|
||||
<HttpRequest [GET], url: 'https://www.example.org/'>
|
||||
>>> response = client.send_request(request)
|
||||
<HttpResponse: 200 OK>
|
||||
|
||||
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
|
||||
|
||||
:param request: The network request you want to make. Required.
|
||||
:type request: ~azure.core.rest.HttpRequest
|
||||
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
|
||||
:return: The response of your network call. Does not do error handling on your response.
|
||||
:rtype: ~azure.core.rest.HttpResponse
|
||||
"""
|
||||
|
||||
request_copy = deepcopy(request)
|
||||
path_format_arguments = {
|
||||
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
|
||||
}
|
||||
|
||||
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
|
||||
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
|
||||
|
||||
def close(self) -> None:
|
||||
self._client.close()
|
||||
|
||||
def __enter__(self) -> Self:
|
||||
self._client.__enter__()
|
||||
return self
|
||||
|
||||
def __exit__(self, *exc_details: Any) -> None:
|
||||
self._client.__exit__(*exc_details)
|
|
@ -0,0 +1,74 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from typing import Any, TYPE_CHECKING
|
||||
|
||||
from azure.core.pipeline import policies
|
||||
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
|
||||
|
||||
from ._version import VERSION
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from azure.core.credentials import TokenCredential
|
||||
|
||||
|
||||
class IoTOperationsMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
|
||||
"""Configuration for IoTOperationsMgmtClient.
|
||||
|
||||
Note that all parameters used to create this instance are saved as instance
|
||||
attributes.
|
||||
|
||||
:param credential: Credential used to authenticate requests to the service. Required.
|
||||
:type credential: ~azure.core.credentials.TokenCredential
|
||||
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
|
||||
:type subscription_id: str
|
||||
:param base_url: Service host. Default value is "https://management.azure.com".
|
||||
:type base_url: str
|
||||
:keyword api_version: The API version to use for this operation. Default value is
|
||||
"2024-09-15-preview". Note that overriding this default value may result in unsupported
|
||||
behavior.
|
||||
:paramtype api_version: str
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
credential: "TokenCredential",
|
||||
subscription_id: str,
|
||||
base_url: str = "https://management.azure.com",
|
||||
**kwargs: Any
|
||||
) -> None:
|
||||
api_version: str = kwargs.pop("api_version", "2024-09-15-preview")
|
||||
|
||||
if credential is None:
|
||||
raise ValueError("Parameter 'credential' must not be None.")
|
||||
if subscription_id is None:
|
||||
raise ValueError("Parameter 'subscription_id' must not be None.")
|
||||
|
||||
self.credential = credential
|
||||
self.subscription_id = subscription_id
|
||||
self.base_url = base_url
|
||||
self.api_version = api_version
|
||||
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
|
||||
kwargs.setdefault("sdk_moniker", "mgmt-iotoperations/{}".format(VERSION))
|
||||
self.polling_interval = kwargs.get("polling_interval", 30)
|
||||
self._configure(**kwargs)
|
||||
|
||||
def _configure(self, **kwargs: Any) -> None:
|
||||
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
|
||||
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
|
||||
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
|
||||
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
|
||||
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
|
||||
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
|
||||
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
|
||||
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
|
||||
self.authentication_policy = kwargs.get("authentication_policy")
|
||||
if self.credential and not self.authentication_policy:
|
||||
self.authentication_policy = ARMChallengeAuthenticationPolicy(
|
||||
self.credential, *self.credential_scopes, **kwargs
|
||||
)
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,20 @@
|
|||
# ------------------------------------
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
# ------------------------------------
|
||||
"""Customize generated code here.
|
||||
|
||||
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|
||||
"""
|
||||
from typing import List
|
||||
|
||||
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
|
||||
|
||||
|
||||
def patch_sdk():
|
||||
"""Do not remove from this file.
|
||||
|
||||
`patch_sdk` is a last resort escape hatch that allows you to do customizations
|
||||
you can't accomplish using the techniques described in
|
||||
https://aka.ms/azsdk/python/dpcodegen/python/customize
|
||||
"""
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,9 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
VERSION = "1.0.0b1"
|
|
@ -0,0 +1,23 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from ._client import IoTOperationsMgmtClient
|
||||
|
||||
try:
|
||||
from ._patch import __all__ as _patch_all
|
||||
from ._patch import * # pylint: disable=unused-wildcard-import
|
||||
except ImportError:
|
||||
_patch_all = []
|
||||
from ._patch import patch_sdk as _patch_sdk
|
||||
|
||||
__all__ = [
|
||||
"IoTOperationsMgmtClient",
|
||||
]
|
||||
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
||||
|
||||
_patch_sdk()
|
|
@ -0,0 +1,161 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from copy import deepcopy
|
||||
from typing import Any, Awaitable, TYPE_CHECKING
|
||||
from typing_extensions import Self
|
||||
|
||||
from azure.core.pipeline import policies
|
||||
from azure.core.rest import AsyncHttpResponse, HttpRequest
|
||||
from azure.mgmt.core import AsyncARMPipelineClient
|
||||
from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy
|
||||
|
||||
from .._serialization import Deserializer, Serializer
|
||||
from ._configuration import IoTOperationsMgmtClientConfiguration
|
||||
from .operations import (
|
||||
BrokerAuthenticationOperations,
|
||||
BrokerAuthorizationOperations,
|
||||
BrokerListenerOperations,
|
||||
BrokerOperations,
|
||||
DataflowEndpointOperations,
|
||||
DataflowOperations,
|
||||
DataflowProfileOperations,
|
||||
InstanceOperations,
|
||||
Operations,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from azure.core.credentials_async import AsyncTokenCredential
|
||||
|
||||
|
||||
class IoTOperationsMgmtClient: # pylint: disable=too-many-instance-attributes
|
||||
"""Microsoft.IoTOperations Resource Provider management API.
|
||||
|
||||
:ivar operations: Operations operations
|
||||
:vartype operations: azure.mgmt.iotoperations.aio.operations.Operations
|
||||
:ivar instance: InstanceOperations operations
|
||||
:vartype instance: azure.mgmt.iotoperations.aio.operations.InstanceOperations
|
||||
:ivar broker: BrokerOperations operations
|
||||
:vartype broker: azure.mgmt.iotoperations.aio.operations.BrokerOperations
|
||||
:ivar broker_listener: BrokerListenerOperations operations
|
||||
:vartype broker_listener: azure.mgmt.iotoperations.aio.operations.BrokerListenerOperations
|
||||
:ivar broker_authentication: BrokerAuthenticationOperations operations
|
||||
:vartype broker_authentication:
|
||||
azure.mgmt.iotoperations.aio.operations.BrokerAuthenticationOperations
|
||||
:ivar broker_authorization: BrokerAuthorizationOperations operations
|
||||
:vartype broker_authorization:
|
||||
azure.mgmt.iotoperations.aio.operations.BrokerAuthorizationOperations
|
||||
:ivar dataflow_profile: DataflowProfileOperations operations
|
||||
:vartype dataflow_profile: azure.mgmt.iotoperations.aio.operations.DataflowProfileOperations
|
||||
:ivar dataflow: DataflowOperations operations
|
||||
:vartype dataflow: azure.mgmt.iotoperations.aio.operations.DataflowOperations
|
||||
:ivar dataflow_endpoint: DataflowEndpointOperations operations
|
||||
:vartype dataflow_endpoint: azure.mgmt.iotoperations.aio.operations.DataflowEndpointOperations
|
||||
:param credential: Credential used to authenticate requests to the service. Required.
|
||||
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
|
||||
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
|
||||
:type subscription_id: str
|
||||
:param base_url: Service host. Default value is "https://management.azure.com".
|
||||
:type base_url: str
|
||||
:keyword api_version: The API version to use for this operation. Default value is
|
||||
"2024-09-15-preview". Note that overriding this default value may result in unsupported
|
||||
behavior.
|
||||
:paramtype api_version: str
|
||||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
|
||||
Retry-After header is present.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
credential: "AsyncTokenCredential",
|
||||
subscription_id: str,
|
||||
base_url: str = "https://management.azure.com",
|
||||
**kwargs: Any
|
||||
) -> None:
|
||||
_endpoint = "{endpoint}"
|
||||
self._config = IoTOperationsMgmtClientConfiguration(
|
||||
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
|
||||
)
|
||||
_policies = kwargs.pop("policies", None)
|
||||
if _policies is None:
|
||||
_policies = [
|
||||
policies.RequestIdPolicy(**kwargs),
|
||||
self._config.headers_policy,
|
||||
self._config.user_agent_policy,
|
||||
self._config.proxy_policy,
|
||||
policies.ContentDecodePolicy(**kwargs),
|
||||
AsyncARMAutoResourceProviderRegistrationPolicy(),
|
||||
self._config.redirect_policy,
|
||||
self._config.retry_policy,
|
||||
self._config.authentication_policy,
|
||||
self._config.custom_hook_policy,
|
||||
self._config.logging_policy,
|
||||
policies.DistributedTracingPolicy(**kwargs),
|
||||
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
|
||||
self._config.http_logging_policy,
|
||||
]
|
||||
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
|
||||
|
||||
self._serialize = Serializer()
|
||||
self._deserialize = Deserializer()
|
||||
self._serialize.client_side_validation = False
|
||||
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
|
||||
self.instance = InstanceOperations(self._client, self._config, self._serialize, self._deserialize)
|
||||
self.broker = BrokerOperations(self._client, self._config, self._serialize, self._deserialize)
|
||||
self.broker_listener = BrokerListenerOperations(self._client, self._config, self._serialize, self._deserialize)
|
||||
self.broker_authentication = BrokerAuthenticationOperations(
|
||||
self._client, self._config, self._serialize, self._deserialize
|
||||
)
|
||||
self.broker_authorization = BrokerAuthorizationOperations(
|
||||
self._client, self._config, self._serialize, self._deserialize
|
||||
)
|
||||
self.dataflow_profile = DataflowProfileOperations(
|
||||
self._client, self._config, self._serialize, self._deserialize
|
||||
)
|
||||
self.dataflow = DataflowOperations(self._client, self._config, self._serialize, self._deserialize)
|
||||
self.dataflow_endpoint = DataflowEndpointOperations(
|
||||
self._client, self._config, self._serialize, self._deserialize
|
||||
)
|
||||
|
||||
def send_request(
|
||||
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
|
||||
) -> Awaitable[AsyncHttpResponse]:
|
||||
"""Runs the network request through the client's chained policies.
|
||||
|
||||
>>> from azure.core.rest import HttpRequest
|
||||
>>> request = HttpRequest("GET", "https://www.example.org/")
|
||||
<HttpRequest [GET], url: 'https://www.example.org/'>
|
||||
>>> response = await client.send_request(request)
|
||||
<AsyncHttpResponse: 200 OK>
|
||||
|
||||
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
|
||||
|
||||
:param request: The network request you want to make. Required.
|
||||
:type request: ~azure.core.rest.HttpRequest
|
||||
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
|
||||
:return: The response of your network call. Does not do error handling on your response.
|
||||
:rtype: ~azure.core.rest.AsyncHttpResponse
|
||||
"""
|
||||
|
||||
request_copy = deepcopy(request)
|
||||
path_format_arguments = {
|
||||
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
|
||||
}
|
||||
|
||||
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
|
||||
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
|
||||
|
||||
async def close(self) -> None:
|
||||
await self._client.close()
|
||||
|
||||
async def __aenter__(self) -> Self:
|
||||
await self._client.__aenter__()
|
||||
return self
|
||||
|
||||
async def __aexit__(self, *exc_details: Any) -> None:
|
||||
await self._client.__aexit__(*exc_details)
|
|
@ -0,0 +1,74 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from typing import Any, TYPE_CHECKING
|
||||
|
||||
from azure.core.pipeline import policies
|
||||
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy
|
||||
|
||||
from .._version import VERSION
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from azure.core.credentials_async import AsyncTokenCredential
|
||||
|
||||
|
||||
class IoTOperationsMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
|
||||
"""Configuration for IoTOperationsMgmtClient.
|
||||
|
||||
Note that all parameters used to create this instance are saved as instance
|
||||
attributes.
|
||||
|
||||
:param credential: Credential used to authenticate requests to the service. Required.
|
||||
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
|
||||
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
|
||||
:type subscription_id: str
|
||||
:param base_url: Service host. Default value is "https://management.azure.com".
|
||||
:type base_url: str
|
||||
:keyword api_version: The API version to use for this operation. Default value is
|
||||
"2024-09-15-preview". Note that overriding this default value may result in unsupported
|
||||
behavior.
|
||||
:paramtype api_version: str
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
credential: "AsyncTokenCredential",
|
||||
subscription_id: str,
|
||||
base_url: str = "https://management.azure.com",
|
||||
**kwargs: Any
|
||||
) -> None:
|
||||
api_version: str = kwargs.pop("api_version", "2024-09-15-preview")
|
||||
|
||||
if credential is None:
|
||||
raise ValueError("Parameter 'credential' must not be None.")
|
||||
if subscription_id is None:
|
||||
raise ValueError("Parameter 'subscription_id' must not be None.")
|
||||
|
||||
self.credential = credential
|
||||
self.subscription_id = subscription_id
|
||||
self.base_url = base_url
|
||||
self.api_version = api_version
|
||||
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
|
||||
kwargs.setdefault("sdk_moniker", "mgmt-iotoperations/{}".format(VERSION))
|
||||
self.polling_interval = kwargs.get("polling_interval", 30)
|
||||
self._configure(**kwargs)
|
||||
|
||||
def _configure(self, **kwargs: Any) -> None:
|
||||
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
|
||||
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
|
||||
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
|
||||
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
|
||||
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
|
||||
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
|
||||
self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs)
|
||||
self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs)
|
||||
self.authentication_policy = kwargs.get("authentication_policy")
|
||||
if self.credential and not self.authentication_policy:
|
||||
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(
|
||||
self.credential, *self.credential_scopes, **kwargs
|
||||
)
|
|
@ -0,0 +1,20 @@
|
|||
# ------------------------------------
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
# ------------------------------------
|
||||
"""Customize generated code here.
|
||||
|
||||
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|
||||
"""
|
||||
from typing import List
|
||||
|
||||
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
|
||||
|
||||
|
||||
def patch_sdk():
|
||||
"""Do not remove from this file.
|
||||
|
||||
`patch_sdk` is a last resort escape hatch that allows you to do customizations
|
||||
you can't accomplish using the techniques described in
|
||||
https://aka.ms/azsdk/python/dpcodegen/python/customize
|
||||
"""
|
|
@ -0,0 +1,35 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from ._operations import Operations
|
||||
from ._operations import InstanceOperations
|
||||
from ._operations import BrokerOperations
|
||||
from ._operations import BrokerListenerOperations
|
||||
from ._operations import BrokerAuthenticationOperations
|
||||
from ._operations import BrokerAuthorizationOperations
|
||||
from ._operations import DataflowProfileOperations
|
||||
from ._operations import DataflowOperations
|
||||
from ._operations import DataflowEndpointOperations
|
||||
|
||||
from ._patch import __all__ as _patch_all
|
||||
from ._patch import * # pylint: disable=unused-wildcard-import
|
||||
from ._patch import patch_sdk as _patch_sdk
|
||||
|
||||
__all__ = [
|
||||
"Operations",
|
||||
"InstanceOperations",
|
||||
"BrokerOperations",
|
||||
"BrokerListenerOperations",
|
||||
"BrokerAuthenticationOperations",
|
||||
"BrokerAuthorizationOperations",
|
||||
"DataflowProfileOperations",
|
||||
"DataflowOperations",
|
||||
"DataflowEndpointOperations",
|
||||
]
|
||||
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
||||
_patch_sdk()
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,20 @@
|
|||
# ------------------------------------
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
# ------------------------------------
|
||||
"""Customize generated code here.
|
||||
|
||||
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|
||||
"""
|
||||
from typing import List
|
||||
|
||||
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
|
||||
|
||||
|
||||
def patch_sdk():
|
||||
"""Do not remove from this file.
|
||||
|
||||
`patch_sdk` is a last resort escape hatch that allows you to do customizations
|
||||
you can't accomplish using the techniques described in
|
||||
https://aka.ms/azsdk/python/dpcodegen/python/customize
|
||||
"""
|
|
@ -0,0 +1,289 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from ._models import AdvancedSettings
|
||||
from ._models import AuthorizationConfig
|
||||
from ._models import AuthorizationRule
|
||||
from ._models import BackendChain
|
||||
from ._models import BatchingConfiguration
|
||||
from ._models import BrokerAuthenticationProperties
|
||||
from ._models import BrokerAuthenticationResource
|
||||
from ._models import BrokerAuthenticatorCustomAuth
|
||||
from ._models import BrokerAuthenticatorMethodCustom
|
||||
from ._models import BrokerAuthenticatorMethodSat
|
||||
from ._models import BrokerAuthenticatorMethodX509
|
||||
from ._models import BrokerAuthenticatorMethodX509Attributes
|
||||
from ._models import BrokerAuthenticatorMethods
|
||||
from ._models import BrokerAuthorizationProperties
|
||||
from ._models import BrokerAuthorizationResource
|
||||
from ._models import BrokerDiagnostics
|
||||
from ._models import BrokerListenerProperties
|
||||
from ._models import BrokerListenerResource
|
||||
from ._models import BrokerProperties
|
||||
from ._models import BrokerResource
|
||||
from ._models import BrokerResourceRule
|
||||
from ._models import Cardinality
|
||||
from ._models import CertManagerCertOptions
|
||||
from ._models import CertManagerCertificateSpec
|
||||
from ._models import CertManagerIssuerRef
|
||||
from ._models import CertManagerPrivateKey
|
||||
from ._models import ClientConfig
|
||||
from ._models import DataflowBuiltInTransformationDataset
|
||||
from ._models import DataflowBuiltInTransformationFilter
|
||||
from ._models import DataflowBuiltInTransformationMap
|
||||
from ._models import DataflowBuiltInTransformationSettings
|
||||
from ._models import DataflowDestinationOperationSettings
|
||||
from ._models import DataflowEndpointAuthenticationAccessToken
|
||||
from ._models import DataflowEndpointAuthenticationSasl
|
||||
from ._models import DataflowEndpointAuthenticationServiceAccountToken
|
||||
from ._models import DataflowEndpointAuthenticationSystemAssignedManagedIdentity
|
||||
from ._models import DataflowEndpointAuthenticationUserAssignedManagedIdentity
|
||||
from ._models import DataflowEndpointAuthenticationX509
|
||||
from ._models import DataflowEndpointDataExplorer
|
||||
from ._models import DataflowEndpointDataExplorerAuthentication
|
||||
from ._models import DataflowEndpointDataLakeStorage
|
||||
from ._models import DataflowEndpointDataLakeStorageAuthentication
|
||||
from ._models import DataflowEndpointFabricOneLake
|
||||
from ._models import DataflowEndpointFabricOneLakeAuthentication
|
||||
from ._models import DataflowEndpointFabricOneLakeNames
|
||||
from ._models import DataflowEndpointKafka
|
||||
from ._models import DataflowEndpointKafkaAuthentication
|
||||
from ._models import DataflowEndpointKafkaBatching
|
||||
from ._models import DataflowEndpointLocalStorage
|
||||
from ._models import DataflowEndpointMqtt
|
||||
from ._models import DataflowEndpointMqttAuthentication
|
||||
from ._models import DataflowEndpointProperties
|
||||
from ._models import DataflowEndpointResource
|
||||
from ._models import DataflowOperation
|
||||
from ._models import DataflowProfileProperties
|
||||
from ._models import DataflowProfileResource
|
||||
from ._models import DataflowProperties
|
||||
from ._models import DataflowResource
|
||||
from ._models import DataflowSourceOperationSettings
|
||||
from ._models import DiagnosticsLogs
|
||||
from ._models import DiskBackedMessageBuffer
|
||||
from ._models import ErrorAdditionalInfo
|
||||
from ._models import ErrorDetail
|
||||
from ._models import ErrorResponse
|
||||
from ._models import ExtendedLocation
|
||||
from ._models import Frontend
|
||||
from ._models import GenerateResourceLimits
|
||||
from ._models import InstancePatchModel
|
||||
from ._models import InstanceProperties
|
||||
from ._models import InstanceResource
|
||||
from ._models import KubernetesReference
|
||||
from ._models import ListenerPort
|
||||
from ._models import LocalKubernetesReference
|
||||
from ._models import ManagedServiceIdentity
|
||||
from ._models import Metrics
|
||||
from ._models import Operation
|
||||
from ._models import OperationDisplay
|
||||
from ._models import PrincipalDefinition
|
||||
from ._models import ProfileDiagnostics
|
||||
from ._models import ProxyResource
|
||||
from ._models import Resource
|
||||
from ._models import SanForCert
|
||||
from ._models import SchemaRegistryRef
|
||||
from ._models import SelfCheck
|
||||
from ._models import SelfTracing
|
||||
from ._models import StateStoreResourceRule
|
||||
from ._models import SubscriberQueueLimit
|
||||
from ._models import SystemData
|
||||
from ._models import TlsCertMethod
|
||||
from ._models import TlsProperties
|
||||
from ._models import Traces
|
||||
from ._models import TrackedResource
|
||||
from ._models import UserAssignedIdentity
|
||||
from ._models import VolumeClaimResourceRequirements
|
||||
from ._models import VolumeClaimSpec
|
||||
from ._models import VolumeClaimSpecSelector
|
||||
from ._models import VolumeClaimSpecSelectorMatchExpressions
|
||||
from ._models import X509ManualCertificate
|
||||
|
||||
from ._enums import ActionType
|
||||
from ._enums import BrokerAuthenticationMethod
|
||||
from ._enums import BrokerMemoryProfile
|
||||
from ._enums import BrokerProtocolType
|
||||
from ._enums import BrokerResourceDefinitionMethods
|
||||
from ._enums import CertManagerIssuerKind
|
||||
from ._enums import CloudEventAttributeType
|
||||
from ._enums import CreatedByType
|
||||
from ._enums import DataExplorerAuthMethod
|
||||
from ._enums import DataLakeStorageAuthMethod
|
||||
from ._enums import DataflowEndpointAuthenticationSaslType
|
||||
from ._enums import DataflowEndpointFabricPathType
|
||||
from ._enums import DataflowEndpointKafkaAcks
|
||||
from ._enums import DataflowEndpointKafkaCompression
|
||||
from ._enums import DataflowEndpointKafkaPartitionStrategy
|
||||
from ._enums import DataflowMappingType
|
||||
from ._enums import EndpointType
|
||||
from ._enums import ExtendedLocationType
|
||||
from ._enums import FabricOneLakeAuthMethod
|
||||
from ._enums import FilterType
|
||||
from ._enums import KafkaAuthMethod
|
||||
from ._enums import ManagedServiceIdentityType
|
||||
from ._enums import MqttAuthMethod
|
||||
from ._enums import MqttRetainType
|
||||
from ._enums import OperationType
|
||||
from ._enums import OperationalMode
|
||||
from ._enums import OperatorValues
|
||||
from ._enums import Origin
|
||||
from ._enums import PrivateKeyAlgorithm
|
||||
from ._enums import PrivateKeyRotationPolicy
|
||||
from ._enums import ProvisioningState
|
||||
from ._enums import ServiceType
|
||||
from ._enums import SourceSerializationFormat
|
||||
from ._enums import StateStoreResourceDefinitionMethods
|
||||
from ._enums import StateStoreResourceKeyTypes
|
||||
from ._enums import SubscriberMessageDropStrategy
|
||||
from ._enums import TlsCertMethodMode
|
||||
from ._enums import TransformationSerializationFormat
|
||||
from ._patch import __all__ as _patch_all
|
||||
from ._patch import * # pylint: disable=unused-wildcard-import
|
||||
from ._patch import patch_sdk as _patch_sdk
|
||||
|
||||
__all__ = [
|
||||
"AdvancedSettings",
|
||||
"AuthorizationConfig",
|
||||
"AuthorizationRule",
|
||||
"BackendChain",
|
||||
"BatchingConfiguration",
|
||||
"BrokerAuthenticationProperties",
|
||||
"BrokerAuthenticationResource",
|
||||
"BrokerAuthenticatorCustomAuth",
|
||||
"BrokerAuthenticatorMethodCustom",
|
||||
"BrokerAuthenticatorMethodSat",
|
||||
"BrokerAuthenticatorMethodX509",
|
||||
"BrokerAuthenticatorMethodX509Attributes",
|
||||
"BrokerAuthenticatorMethods",
|
||||
"BrokerAuthorizationProperties",
|
||||
"BrokerAuthorizationResource",
|
||||
"BrokerDiagnostics",
|
||||
"BrokerListenerProperties",
|
||||
"BrokerListenerResource",
|
||||
"BrokerProperties",
|
||||
"BrokerResource",
|
||||
"BrokerResourceRule",
|
||||
"Cardinality",
|
||||
"CertManagerCertOptions",
|
||||
"CertManagerCertificateSpec",
|
||||
"CertManagerIssuerRef",
|
||||
"CertManagerPrivateKey",
|
||||
"ClientConfig",
|
||||
"DataflowBuiltInTransformationDataset",
|
||||
"DataflowBuiltInTransformationFilter",
|
||||
"DataflowBuiltInTransformationMap",
|
||||
"DataflowBuiltInTransformationSettings",
|
||||
"DataflowDestinationOperationSettings",
|
||||
"DataflowEndpointAuthenticationAccessToken",
|
||||
"DataflowEndpointAuthenticationSasl",
|
||||
"DataflowEndpointAuthenticationServiceAccountToken",
|
||||
"DataflowEndpointAuthenticationSystemAssignedManagedIdentity",
|
||||
"DataflowEndpointAuthenticationUserAssignedManagedIdentity",
|
||||
"DataflowEndpointAuthenticationX509",
|
||||
"DataflowEndpointDataExplorer",
|
||||
"DataflowEndpointDataExplorerAuthentication",
|
||||
"DataflowEndpointDataLakeStorage",
|
||||
"DataflowEndpointDataLakeStorageAuthentication",
|
||||
"DataflowEndpointFabricOneLake",
|
||||
"DataflowEndpointFabricOneLakeAuthentication",
|
||||
"DataflowEndpointFabricOneLakeNames",
|
||||
"DataflowEndpointKafka",
|
||||
"DataflowEndpointKafkaAuthentication",
|
||||
"DataflowEndpointKafkaBatching",
|
||||
"DataflowEndpointLocalStorage",
|
||||
"DataflowEndpointMqtt",
|
||||
"DataflowEndpointMqttAuthentication",
|
||||
"DataflowEndpointProperties",
|
||||
"DataflowEndpointResource",
|
||||
"DataflowOperation",
|
||||
"DataflowProfileProperties",
|
||||
"DataflowProfileResource",
|
||||
"DataflowProperties",
|
||||
"DataflowResource",
|
||||
"DataflowSourceOperationSettings",
|
||||
"DiagnosticsLogs",
|
||||
"DiskBackedMessageBuffer",
|
||||
"ErrorAdditionalInfo",
|
||||
"ErrorDetail",
|
||||
"ErrorResponse",
|
||||
"ExtendedLocation",
|
||||
"Frontend",
|
||||
"GenerateResourceLimits",
|
||||
"InstancePatchModel",
|
||||
"InstanceProperties",
|
||||
"InstanceResource",
|
||||
"KubernetesReference",
|
||||
"ListenerPort",
|
||||
"LocalKubernetesReference",
|
||||
"ManagedServiceIdentity",
|
||||
"Metrics",
|
||||
"Operation",
|
||||
"OperationDisplay",
|
||||
"PrincipalDefinition",
|
||||
"ProfileDiagnostics",
|
||||
"ProxyResource",
|
||||
"Resource",
|
||||
"SanForCert",
|
||||
"SchemaRegistryRef",
|
||||
"SelfCheck",
|
||||
"SelfTracing",
|
||||
"StateStoreResourceRule",
|
||||
"SubscriberQueueLimit",
|
||||
"SystemData",
|
||||
"TlsCertMethod",
|
||||
"TlsProperties",
|
||||
"Traces",
|
||||
"TrackedResource",
|
||||
"UserAssignedIdentity",
|
||||
"VolumeClaimResourceRequirements",
|
||||
"VolumeClaimSpec",
|
||||
"VolumeClaimSpecSelector",
|
||||
"VolumeClaimSpecSelectorMatchExpressions",
|
||||
"X509ManualCertificate",
|
||||
"ActionType",
|
||||
"BrokerAuthenticationMethod",
|
||||
"BrokerMemoryProfile",
|
||||
"BrokerProtocolType",
|
||||
"BrokerResourceDefinitionMethods",
|
||||
"CertManagerIssuerKind",
|
||||
"CloudEventAttributeType",
|
||||
"CreatedByType",
|
||||
"DataExplorerAuthMethod",
|
||||
"DataLakeStorageAuthMethod",
|
||||
"DataflowEndpointAuthenticationSaslType",
|
||||
"DataflowEndpointFabricPathType",
|
||||
"DataflowEndpointKafkaAcks",
|
||||
"DataflowEndpointKafkaCompression",
|
||||
"DataflowEndpointKafkaPartitionStrategy",
|
||||
"DataflowMappingType",
|
||||
"EndpointType",
|
||||
"ExtendedLocationType",
|
||||
"FabricOneLakeAuthMethod",
|
||||
"FilterType",
|
||||
"KafkaAuthMethod",
|
||||
"ManagedServiceIdentityType",
|
||||
"MqttAuthMethod",
|
||||
"MqttRetainType",
|
||||
"OperationType",
|
||||
"OperationalMode",
|
||||
"OperatorValues",
|
||||
"Origin",
|
||||
"PrivateKeyAlgorithm",
|
||||
"PrivateKeyRotationPolicy",
|
||||
"ProvisioningState",
|
||||
"ServiceType",
|
||||
"SourceSerializationFormat",
|
||||
"StateStoreResourceDefinitionMethods",
|
||||
"StateStoreResourceKeyTypes",
|
||||
"SubscriberMessageDropStrategy",
|
||||
"TlsCertMethodMode",
|
||||
"TransformationSerializationFormat",
|
||||
]
|
||||
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
||||
_patch_sdk()
|
|
@ -0,0 +1,443 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from enum import Enum
|
||||
from azure.core import CaseInsensitiveEnumMeta
|
||||
|
||||
|
||||
class ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal
|
||||
only APIs.
|
||||
"""
|
||||
|
||||
INTERNAL = "Internal"
|
||||
"""Actions are for internal-only APIs."""
|
||||
|
||||
|
||||
class BrokerAuthenticationMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Broker Authentication Mode."""
|
||||
|
||||
CUSTOM = "Custom"
|
||||
"""Custom authentication configuration."""
|
||||
SERVICE_ACCOUNT_TOKEN = "ServiceAccountToken"
|
||||
"""ServiceAccountToken authentication configuration."""
|
||||
X509 = "X509"
|
||||
"""X.509 authentication configuration."""
|
||||
|
||||
|
||||
class BrokerMemoryProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""The memory profile settings of the Broker."""
|
||||
|
||||
TINY = "Tiny"
|
||||
"""Tiny memory profile."""
|
||||
LOW = "Low"
|
||||
"""Low memory profile."""
|
||||
MEDIUM = "Medium"
|
||||
"""Medium memory profile."""
|
||||
HIGH = "High"
|
||||
"""High memory profile."""
|
||||
|
||||
|
||||
class BrokerProtocolType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Broker Protocol types."""
|
||||
|
||||
MQTT = "Mqtt"
|
||||
"""protocol broker"""
|
||||
WEB_SOCKETS = "WebSockets"
|
||||
"""protocol websocket"""
|
||||
|
||||
|
||||
class BrokerResourceDefinitionMethods(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""BrokerResourceDefinitionMethods methods allowed."""
|
||||
|
||||
CONNECT = "Connect"
|
||||
"""Allowed Connecting to Broker"""
|
||||
PUBLISH = "Publish"
|
||||
"""Allowed Publishing to Broker"""
|
||||
SUBSCRIBE = "Subscribe"
|
||||
"""Allowed Subscribing to Broker"""
|
||||
|
||||
|
||||
class CertManagerIssuerKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""CertManagerIssuerKind properties."""
|
||||
|
||||
ISSUER = "Issuer"
|
||||
"""Issuer kind."""
|
||||
CLUSTER_ISSUER = "ClusterIssuer"
|
||||
"""ClusterIssuer kind."""
|
||||
|
||||
|
||||
class CloudEventAttributeType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""How to map events to the cloud."""
|
||||
|
||||
PROPAGATE = "Propagate"
|
||||
"""Propagate type"""
|
||||
CREATE_OR_REMAP = "CreateOrRemap"
|
||||
"""CreateOrRemap type"""
|
||||
|
||||
|
||||
class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""The kind of entity that created the resource."""
|
||||
|
||||
USER = "User"
|
||||
"""The entity was created by a user."""
|
||||
APPLICATION = "Application"
|
||||
"""The entity was created by an application."""
|
||||
MANAGED_IDENTITY = "ManagedIdentity"
|
||||
"""The entity was created by a managed identity."""
|
||||
KEY = "Key"
|
||||
"""The entity was created by a key."""
|
||||
|
||||
|
||||
class DataExplorerAuthMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""DataflowEndpoint Data Explorer Authentication Method properties."""
|
||||
|
||||
SYSTEM_ASSIGNED_MANAGED_IDENTITY = "SystemAssignedManagedIdentity"
|
||||
"""SystemAssignedManagedIdentity type"""
|
||||
USER_ASSIGNED_MANAGED_IDENTITY = "UserAssignedManagedIdentity"
|
||||
"""UserAssignedManagedIdentity type"""
|
||||
|
||||
|
||||
class DataflowEndpointAuthenticationSaslType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""DataflowEndpoint Authentication Sasl Type properties."""
|
||||
|
||||
PLAIN = "Plain"
|
||||
"""PLAIN Type"""
|
||||
SCRAM_SHA256 = "ScramSha256"
|
||||
"""SCRAM_SHA_256 Type"""
|
||||
SCRAM_SHA512 = "ScramSha512"
|
||||
"""SCRAM_SHA_512 Type"""
|
||||
|
||||
|
||||
class DataflowEndpointFabricPathType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""DataflowEndpoint Fabric Path Type properties."""
|
||||
|
||||
FILES = "Files"
|
||||
"""FILES Type"""
|
||||
TABLES = "Tables"
|
||||
"""TABLES Type"""
|
||||
|
||||
|
||||
class DataflowEndpointKafkaAcks(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""DataflowEndpoint Kafka Acks properties."""
|
||||
|
||||
ZERO = "Zero"
|
||||
"""ZERO Option"""
|
||||
ONE = "One"
|
||||
"""ONE Option"""
|
||||
ALL = "All"
|
||||
"""ALL Option"""
|
||||
|
||||
|
||||
class DataflowEndpointKafkaCompression(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Kafka endpoint Compression properties."""
|
||||
|
||||
NONE = "None"
|
||||
"""NONE Option"""
|
||||
GZIP = "Gzip"
|
||||
"""Gzip Option"""
|
||||
SNAPPY = "Snappy"
|
||||
"""SNAPPY Option"""
|
||||
LZ4 = "Lz4"
|
||||
"""LZ4 Option"""
|
||||
|
||||
|
||||
class DataflowEndpointKafkaPartitionStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""DataflowEndpoint Kafka Partition Strategy properties."""
|
||||
|
||||
DEFAULT = "Default"
|
||||
"""Default: Assigns messages to random partitions, using a round-robin algorithm."""
|
||||
STATIC = "Static"
|
||||
"""Static: Assigns messages to a fixed partition number that's derived from the instance ID of the
|
||||
dataflow."""
|
||||
TOPIC = "Topic"
|
||||
"""TOPIC Option"""
|
||||
PROPERTY = "Property"
|
||||
"""PROPERTY Option"""
|
||||
|
||||
|
||||
class DataflowMappingType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Dataflow type mapping properties."""
|
||||
|
||||
NEW_PROPERTIES = "NewProperties"
|
||||
"""New Properties type"""
|
||||
RENAME = "Rename"
|
||||
"""Rename type"""
|
||||
COMPUTE = "Compute"
|
||||
"""Compute type"""
|
||||
PASS_THROUGH = "PassThrough"
|
||||
"""Pass-through type"""
|
||||
BUILT_IN_FUNCTION = "BuiltInFunction"
|
||||
"""Built in function type"""
|
||||
|
||||
|
||||
class DataLakeStorageAuthMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""DataflowEndpoint Data Lake Storage Authentication Method properties."""
|
||||
|
||||
SYSTEM_ASSIGNED_MANAGED_IDENTITY = "SystemAssignedManagedIdentity"
|
||||
"""SystemAssignedManagedIdentity type"""
|
||||
USER_ASSIGNED_MANAGED_IDENTITY = "UserAssignedManagedIdentity"
|
||||
"""UserAssignedManagedIdentity type"""
|
||||
ACCESS_TOKEN = "AccessToken"
|
||||
"""AccessToken Option"""
|
||||
|
||||
|
||||
class EndpointType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""DataflowEndpoint Type properties."""
|
||||
|
||||
DATA_EXPLORER = "DataExplorer"
|
||||
"""Azure Data Explorer Type"""
|
||||
DATA_LAKE_STORAGE = "DataLakeStorage"
|
||||
"""Azure Data Lake Type"""
|
||||
FABRIC_ONE_LAKE = "FabricOneLake"
|
||||
"""Microsoft Fabric Type"""
|
||||
KAFKA = "Kafka"
|
||||
"""Kafka Type"""
|
||||
LOCAL_STORAGE = "LocalStorage"
|
||||
"""Local Storage Type"""
|
||||
MQTT = "Mqtt"
|
||||
"""Broker Type"""
|
||||
|
||||
|
||||
class ExtendedLocationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""The enum defining type of ExtendedLocation accepted."""
|
||||
|
||||
CUSTOM_LOCATION = "CustomLocation"
|
||||
"""CustomLocation type"""
|
||||
|
||||
|
||||
class FabricOneLakeAuthMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""DataflowEndpoint Fabric One Lake Authentication Method properties."""
|
||||
|
||||
SYSTEM_ASSIGNED_MANAGED_IDENTITY = "SystemAssignedManagedIdentity"
|
||||
"""SystemAssignedManagedIdentity type"""
|
||||
USER_ASSIGNED_MANAGED_IDENTITY = "UserAssignedManagedIdentity"
|
||||
"""UserAssignedManagedIdentity type"""
|
||||
|
||||
|
||||
class FilterType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Filter Type properties."""
|
||||
|
||||
FILTER = "Filter"
|
||||
"""Filter type"""
|
||||
|
||||
|
||||
class KafkaAuthMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""DataflowEndpoint Kafka Authentication Method properties."""
|
||||
|
||||
SYSTEM_ASSIGNED_MANAGED_IDENTITY = "SystemAssignedManagedIdentity"
|
||||
"""SystemAssignedManagedIdentity type"""
|
||||
USER_ASSIGNED_MANAGED_IDENTITY = "UserAssignedManagedIdentity"
|
||||
"""UserAssignedManagedIdentity type"""
|
||||
SASL = "Sasl"
|
||||
"""Sasl Option"""
|
||||
X509_CERTIFICATE = "X509Certificate"
|
||||
"""x509Certificate Option"""
|
||||
ANONYMOUS = "Anonymous"
|
||||
"""Anonymous Option"""
|
||||
|
||||
|
||||
class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Type of managed service identity (where both SystemAssigned and UserAssigned types are
|
||||
allowed).
|
||||
"""
|
||||
|
||||
NONE = "None"
|
||||
"""No managed identity."""
|
||||
SYSTEM_ASSIGNED = "SystemAssigned"
|
||||
"""System assigned managed identity."""
|
||||
USER_ASSIGNED = "UserAssigned"
|
||||
"""User assigned managed identity."""
|
||||
SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned"
|
||||
"""System and user assigned managed identity."""
|
||||
|
||||
|
||||
class MqttAuthMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""DataflowEndpoint Mqtt Authentication Method properties."""
|
||||
|
||||
SYSTEM_ASSIGNED_MANAGED_IDENTITY = "SystemAssignedManagedIdentity"
|
||||
"""SystemAssignedManagedIdentity type"""
|
||||
USER_ASSIGNED_MANAGED_IDENTITY = "UserAssignedManagedIdentity"
|
||||
"""UserAssignedManagedIdentity type"""
|
||||
SERVICE_ACCOUNT_TOKEN = "ServiceAccountToken"
|
||||
"""ServiceAccountToken Option"""
|
||||
X509_CERTIFICATE = "X509Certificate"
|
||||
"""x509Certificate Option"""
|
||||
ANONYMOUS = "Anonymous"
|
||||
"""Anonymous Option"""
|
||||
|
||||
|
||||
class MqttRetainType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Broker Retain types."""
|
||||
|
||||
KEEP = "Keep"
|
||||
"""Retain the messages."""
|
||||
NEVER = "Never"
|
||||
"""Never retain messages."""
|
||||
|
||||
|
||||
class OperationalMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Mode properties."""
|
||||
|
||||
ENABLED = "Enabled"
|
||||
"""Enabled is equivalent to True"""
|
||||
DISABLED = "Disabled"
|
||||
"""Disabled is equivalent to False."""
|
||||
|
||||
|
||||
class OperationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Dataflow Operation Type properties."""
|
||||
|
||||
SOURCE = "Source"
|
||||
"""Dataflow Source Operation"""
|
||||
DESTINATION = "Destination"
|
||||
"""Dataflow Destination Operation"""
|
||||
BUILT_IN_TRANSFORMATION = "BuiltInTransformation"
|
||||
"""Dataflow BuiltIn Transformation Operation"""
|
||||
|
||||
|
||||
class OperatorValues(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Valid operators are In, NotIn, Exists and DoesNotExist."""
|
||||
|
||||
IN = "In"
|
||||
"""In operator."""
|
||||
NOT_IN = "NotIn"
|
||||
"""NotIn operator."""
|
||||
EXISTS = "Exists"
|
||||
"""Exists operator."""
|
||||
DOES_NOT_EXIST = "DoesNotExist"
|
||||
"""DoesNotExist operator."""
|
||||
|
||||
|
||||
class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit
|
||||
logs UX. Default value is "user,system".
|
||||
"""
|
||||
|
||||
USER = "user"
|
||||
"""Indicates the operation is initiated by a user."""
|
||||
SYSTEM = "system"
|
||||
"""Indicates the operation is initiated by a system."""
|
||||
USER_SYSTEM = "user,system"
|
||||
"""Indicates the operation is initiated by a user or system."""
|
||||
|
||||
|
||||
class PrivateKeyAlgorithm(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Private key algorithm types."""
|
||||
|
||||
EC256 = "Ec256"
|
||||
"""Algorithm - ec256."""
|
||||
EC384 = "Ec384"
|
||||
"""Algorithm - ec384."""
|
||||
EC521 = "Ec521"
|
||||
"""Algorithm - ec521."""
|
||||
ED25519 = "Ed25519"
|
||||
"""Algorithm - ed25519."""
|
||||
RSA2048 = "Rsa2048"
|
||||
"""Algorithm - rsa2048."""
|
||||
RSA4096 = "Rsa4096"
|
||||
"""Algorithm - rsa4096."""
|
||||
RSA8192 = "Rsa8192"
|
||||
"""Algorithm - rsa8192."""
|
||||
|
||||
|
||||
class PrivateKeyRotationPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Private key rotation policy."""
|
||||
|
||||
ALWAYS = "Always"
|
||||
"""Rotation Policy - Always."""
|
||||
NEVER = "Never"
|
||||
"""Rotation Policy - Never."""
|
||||
|
||||
|
||||
class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""The enum defining status of resource."""
|
||||
|
||||
SUCCEEDED = "Succeeded"
|
||||
"""Resource has been created."""
|
||||
FAILED = "Failed"
|
||||
"""Resource creation failed."""
|
||||
CANCELED = "Canceled"
|
||||
"""Resource creation was canceled."""
|
||||
PROVISIONING = "Provisioning"
|
||||
"""Resource is getting provisioned."""
|
||||
UPDATING = "Updating"
|
||||
"""Resource is Updating."""
|
||||
DELETING = "Deleting"
|
||||
"""Resource is Deleting."""
|
||||
ACCEPTED = "Accepted"
|
||||
"""Resource has been Accepted."""
|
||||
|
||||
|
||||
class ServiceType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Kubernetes Service Types supported by Listener."""
|
||||
|
||||
CLUSTER_IP = "ClusterIp"
|
||||
"""Cluster IP Service."""
|
||||
LOAD_BALANCER = "LoadBalancer"
|
||||
"""Load Balancer Service."""
|
||||
NODE_PORT = "NodePort"
|
||||
"""Node Port Service."""
|
||||
|
||||
|
||||
class SourceSerializationFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Serialization Format properties."""
|
||||
|
||||
JSON = "Json"
|
||||
"""JSON Format"""
|
||||
|
||||
|
||||
class StateStoreResourceDefinitionMethods(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""StateStoreResourceDefinitionMethods methods allowed."""
|
||||
|
||||
READ = "Read"
|
||||
"""Get/KeyNotify from Store"""
|
||||
WRITE = "Write"
|
||||
"""Set/Delete in Store"""
|
||||
READ_WRITE = "ReadWrite"
|
||||
"""Allowed all operations on Store - Get/KeyNotify/Set/Delete"""
|
||||
|
||||
|
||||
class StateStoreResourceKeyTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""StateStoreResourceKeyTypes properties."""
|
||||
|
||||
PATTERN = "Pattern"
|
||||
"""Key type - pattern"""
|
||||
STRING = "String"
|
||||
"""Key type - string"""
|
||||
BINARY = "Binary"
|
||||
"""Key type - binary"""
|
||||
|
||||
|
||||
class SubscriberMessageDropStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""The enum defining strategies for dropping messages from the subscriber queue."""
|
||||
|
||||
NONE = "None"
|
||||
"""Messages are never dropped."""
|
||||
DROP_OLDEST = "DropOldest"
|
||||
"""The oldest message is dropped."""
|
||||
|
||||
|
||||
class TlsCertMethodMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Broker Authentication Mode."""
|
||||
|
||||
AUTOMATIC = "Automatic"
|
||||
"""Automatic TLS server certificate configuration."""
|
||||
MANUAL = "Manual"
|
||||
"""Manual TLS server certificate configuration."""
|
||||
|
||||
|
||||
class TransformationSerializationFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
||||
"""Transformation Format properties."""
|
||||
|
||||
DELTA = "Delta"
|
||||
"""Delta Format"""
|
||||
JSON = "Json"
|
||||
"""JSON Format"""
|
||||
PARQUET = "Parquet"
|
||||
"""Parquet Format"""
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,20 @@
|
|||
# ------------------------------------
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
# ------------------------------------
|
||||
"""Customize generated code here.
|
||||
|
||||
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|
||||
"""
|
||||
from typing import List
|
||||
|
||||
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
|
||||
|
||||
|
||||
def patch_sdk():
|
||||
"""Do not remove from this file.
|
||||
|
||||
`patch_sdk` is a last resort escape hatch that allows you to do customizations
|
||||
you can't accomplish using the techniques described in
|
||||
https://aka.ms/azsdk/python/dpcodegen/python/customize
|
||||
"""
|
|
@ -0,0 +1,35 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from ._operations import Operations
|
||||
from ._operations import InstanceOperations
|
||||
from ._operations import BrokerOperations
|
||||
from ._operations import BrokerListenerOperations
|
||||
from ._operations import BrokerAuthenticationOperations
|
||||
from ._operations import BrokerAuthorizationOperations
|
||||
from ._operations import DataflowProfileOperations
|
||||
from ._operations import DataflowOperations
|
||||
from ._operations import DataflowEndpointOperations
|
||||
|
||||
from ._patch import __all__ as _patch_all
|
||||
from ._patch import * # pylint: disable=unused-wildcard-import
|
||||
from ._patch import patch_sdk as _patch_sdk
|
||||
|
||||
__all__ = [
|
||||
"Operations",
|
||||
"InstanceOperations",
|
||||
"BrokerOperations",
|
||||
"BrokerListenerOperations",
|
||||
"BrokerAuthenticationOperations",
|
||||
"BrokerAuthorizationOperations",
|
||||
"DataflowProfileOperations",
|
||||
"DataflowOperations",
|
||||
"DataflowEndpointOperations",
|
||||
]
|
||||
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
||||
_patch_sdk()
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,20 @@
|
|||
# ------------------------------------
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
# ------------------------------------
|
||||
"""Customize generated code here.
|
||||
|
||||
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|
||||
"""
|
||||
from typing import List
|
||||
|
||||
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
|
||||
|
||||
|
||||
def patch_sdk():
|
||||
"""Do not remove from this file.
|
||||
|
||||
`patch_sdk` is a last resort escape hatch that allows you to do customizations
|
||||
you can't accomplish using the techniques described in
|
||||
https://aka.ms/azsdk/python/dpcodegen/python/customize
|
||||
"""
|
|
@ -0,0 +1 @@
|
|||
# Marker file for PEP 561.
|
|
@ -0,0 +1,5 @@
|
|||
-e ../../../tools/azure-sdk-tools
|
||||
../../core/azure-core
|
||||
../../identity/azure-identity
|
||||
../../core/azure-mgmt-core
|
||||
aiohttp
|
|
@ -0,0 +1,69 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_authentication_create_or_update_complex.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_authentication.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
authentication_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"authenticationMethods": [
|
||||
{"method": "ServiceAccountToken", "serviceAccountTokenSettings": {"audiences": ["aio-internal"]}},
|
||||
{
|
||||
"method": "X509",
|
||||
"x509Settings": {
|
||||
"authorizationAttributes": {
|
||||
"intermediate": {
|
||||
"attributes": {"city": "seattle", "foo": "bar"},
|
||||
"subject": "CN = Contoso Intermediate CA",
|
||||
},
|
||||
"root": {
|
||||
"attributes": {"organization": "contoso"},
|
||||
"subject": "CN = Contoso Root CA Cert, OU = Engineering, C = US",
|
||||
},
|
||||
"smart-fan": {"attributes": {"building": "17"}, "subject": "CN = smart-fan"},
|
||||
},
|
||||
"trustedClientCaCert": "my-ca",
|
||||
},
|
||||
},
|
||||
]
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_Complex.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,67 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_authentication_create_or_update_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_authentication.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
authentication_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"authenticationMethods": [
|
||||
{
|
||||
"customSettings": {
|
||||
"auth": {"x509": {"secretRef": "secret-name"}},
|
||||
"caCertConfigMap": "pdecudefqyolvncbus",
|
||||
"endpoint": "https://www.example.com",
|
||||
"headers": {"key8518": "bwityjy"},
|
||||
},
|
||||
"method": "Custom",
|
||||
"serviceAccountTokenSettings": {"audiences": ["jqyhyqatuydg"]},
|
||||
"x509Settings": {
|
||||
"authorizationAttributes": {
|
||||
"key3384": {"attributes": {"key186": "ucpajramsz"}, "subject": "jpgwctfeixitptfgfnqhua"}
|
||||
},
|
||||
"trustedClientCaCert": "vlctsqddl",
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,43 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_authentication_delete_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
client.broker_authentication.begin_delete(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
authentication_name="resource-name123",
|
||||
).result()
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,44 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_authentication_get_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_authentication.get(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
authentication_name="resource-name123",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_Get_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,44 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_authentication_list_by_resource_group_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_authentication.list_by_resource_group(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
)
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,83 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_authorization_create_or_update_complex.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_authorization.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
authorization_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"authorizationPolicies": {
|
||||
"cache": "Enabled",
|
||||
"rules": [
|
||||
{
|
||||
"brokerResources": [
|
||||
{"clientIds": ["{principal.attributes.building}*"], "method": "Connect"},
|
||||
{
|
||||
"method": "Publish",
|
||||
"topics": [
|
||||
"sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*"
|
||||
],
|
||||
},
|
||||
{"method": "Subscribe", "topics": ["commands/{principal.attributes.organization}"]},
|
||||
],
|
||||
"principals": {
|
||||
"attributes": [{"building": "17", "organization": "contoso"}],
|
||||
"usernames": ["temperature-sensor", "humidity-sensor"],
|
||||
},
|
||||
"stateStoreResources": [
|
||||
{
|
||||
"keyType": "Pattern",
|
||||
"keys": [
|
||||
"myreadkey",
|
||||
"myotherkey?",
|
||||
"mynumerickeysuffix[0-9]",
|
||||
"clients:{principal.clientId}:*",
|
||||
],
|
||||
"method": "Read",
|
||||
},
|
||||
{"keyType": "Binary", "keys": ["MTE2IDEwMSAxMTUgMTE2"], "method": "ReadWrite"},
|
||||
],
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Complex.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,65 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_authorization_create_or_update_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_authorization.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
authorization_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"authorizationPolicies": {
|
||||
"cache": "Enabled",
|
||||
"rules": [
|
||||
{
|
||||
"brokerResources": [{"clientIds": ["nlc"], "method": "Connect", "topics": ["wvuca"]}],
|
||||
"principals": {
|
||||
"attributes": [{"key5526": "nydhzdhbldygqcn"}],
|
||||
"clientIds": ["smopeaeddsygz"],
|
||||
"usernames": ["iozngyqndrteikszkbasinzdjtm"],
|
||||
},
|
||||
"stateStoreResources": [
|
||||
{"keyType": "Pattern", "keys": ["tkounsqtwvzyaklxjqoerpu"], "method": "Read"}
|
||||
],
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,65 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_authorization_create_or_update_simple.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_authorization.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
authorization_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"authorizationPolicies": {
|
||||
"cache": "Enabled",
|
||||
"rules": [
|
||||
{
|
||||
"brokerResources": [
|
||||
{"method": "Connect"},
|
||||
{"method": "Subscribe", "topics": ["topic", "topic/with/wildcard/#"]},
|
||||
],
|
||||
"principals": {
|
||||
"attributes": [{"floor": "floor1", "site": "site1"}],
|
||||
"clientIds": ["my-client-id"],
|
||||
},
|
||||
"stateStoreResources": [{"keyType": "Pattern", "keys": ["*"], "method": "ReadWrite"}],
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_CreateOrUpdate_Simple.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,43 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_authorization_delete_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
client.broker_authorization.begin_delete(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
authorization_name="resource-name123",
|
||||
).result()
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,44 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_authorization_get_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_authorization.get(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
authorization_name="resource-name123",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_Get_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,44 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_authorization_list_by_resource_group_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_authorization.list_by_resource_group(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
)
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,55 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_create_or_update_complex.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"cardinality": {
|
||||
"backendChain": {"partitions": 2, "redundancyFactor": 2, "workers": 2},
|
||||
"frontend": {"replicas": 2, "workers": 2},
|
||||
},
|
||||
"diskBackedMessageBuffer": {"maxSize": "50M"},
|
||||
"generateResourceLimits": {"cpu": "Enabled"},
|
||||
"memoryProfile": "Medium",
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Complex.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,124 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_create_or_update_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"advanced": {
|
||||
"clients": {
|
||||
"maxKeepAliveSeconds": 3744,
|
||||
"maxMessageExpirySeconds": 3263,
|
||||
"maxPacketSizeBytes": 3029,
|
||||
"maxReceiveMaximum": 2365,
|
||||
"maxSessionExpirySeconds": 3859,
|
||||
"subscriberQueueLimit": {"length": 6, "strategy": "None"},
|
||||
},
|
||||
"encryptInternalTraffic": "Enabled",
|
||||
"internalCerts": {
|
||||
"duration": "bchrc",
|
||||
"privateKey": {"algorithm": "Ec256", "rotationPolicy": "Always"},
|
||||
"renewBefore": "xkafmpgjfifkwwrhkswtopdnne",
|
||||
},
|
||||
},
|
||||
"cardinality": {
|
||||
"backendChain": {"partitions": 11, "redundancyFactor": 5, "workers": 15},
|
||||
"frontend": {"replicas": 2, "workers": 6},
|
||||
},
|
||||
"diagnostics": {
|
||||
"logs": {"level": "rnmwokumdmebpmfxxxzvvjfdywotav"},
|
||||
"metrics": {"prometheusPort": 7581},
|
||||
"selfCheck": {"intervalSeconds": 158, "mode": "Enabled", "timeoutSeconds": 14},
|
||||
"traces": {
|
||||
"cacheSizeMegabytes": 28,
|
||||
"mode": "Enabled",
|
||||
"selfTracing": {"intervalSeconds": 22, "mode": "Enabled"},
|
||||
"spanChannelCapacity": 1000,
|
||||
},
|
||||
},
|
||||
"diskBackedMessageBuffer": {
|
||||
"ephemeralVolumeClaimSpec": {
|
||||
"accessModes": ["nuluhigrbb"],
|
||||
"dataSource": {"apiGroup": "npqapyksvvpkohujx", "kind": "wazgyb", "name": "cwhsgxxcxsyppoefm"},
|
||||
"dataSourceRef": {
|
||||
"apiGroup": "mnfnykznjjsoqpfsgdqioupt",
|
||||
"kind": "odynqzekfzsnawrctaxg",
|
||||
"name": "envszivbbmixbyddzg",
|
||||
"namespace": "etcfzvxqd",
|
||||
},
|
||||
"resources": {"limits": {"key2719": "hmphcrgctu"}, "requests": {"key2909": "txocprnyrsgvhfrg"}},
|
||||
"selector": {
|
||||
"matchExpressions": [
|
||||
{"key": "e", "operator": "In", "values": ["slmpajlywqvuyknipgztsonqyybt"]}
|
||||
],
|
||||
"matchLabels": {"key6673": "wlngfalznwxnurzpgxomcxhbqefpr"},
|
||||
},
|
||||
"storageClassName": "sseyhrjptkhrqvpdpjmornkqvon",
|
||||
"volumeMode": "rxvpksjuuugqnqzeiprocknbn",
|
||||
"volumeName": "c",
|
||||
},
|
||||
"maxSize": "500M",
|
||||
"persistentVolumeClaimSpec": {
|
||||
"accessModes": ["nuluhigrbb"],
|
||||
"dataSource": {"apiGroup": "npqapyksvvpkohujx", "kind": "wazgyb", "name": "cwhsgxxcxsyppoefm"},
|
||||
"dataSourceRef": {
|
||||
"apiGroup": "mnfnykznjjsoqpfsgdqioupt",
|
||||
"kind": "odynqzekfzsnawrctaxg",
|
||||
"name": "envszivbbmixbyddzg",
|
||||
"namespace": "etcfzvxqd",
|
||||
},
|
||||
"resources": {"limits": {"key2719": "hmphcrgctu"}, "requests": {"key2909": "txocprnyrsgvhfrg"}},
|
||||
"selector": {
|
||||
"matchExpressions": [
|
||||
{"key": "e", "operator": "In", "values": ["slmpajlywqvuyknipgztsonqyybt"]}
|
||||
],
|
||||
"matchLabels": {"key6673": "wlngfalznwxnurzpgxomcxhbqefpr"},
|
||||
},
|
||||
"storageClassName": "sseyhrjptkhrqvpdpjmornkqvon",
|
||||
"volumeMode": "rxvpksjuuugqnqzeiprocknbn",
|
||||
"volumeName": "c",
|
||||
},
|
||||
},
|
||||
"generateResourceLimits": {"cpu": "Enabled"},
|
||||
"memoryProfile": "Tiny",
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,47 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_create_or_update_minimal.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {"memoryProfile": "Tiny"},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Minimal.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,54 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_create_or_update_simple.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"cardinality": {
|
||||
"backendChain": {"partitions": 2, "redundancyFactor": 2, "workers": 2},
|
||||
"frontend": {"replicas": 2, "workers": 2},
|
||||
},
|
||||
"generateResourceLimits": {"cpu": "Enabled"},
|
||||
"memoryProfile": "Low",
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Broker_CreateOrUpdate_Simple.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,42 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_delete_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
client.broker.begin_delete(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
).result()
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Broker_Delete_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,43 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_get_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker.get(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Broker_Get_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,43 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_list_by_resource_group_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker.list_by_resource_group(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
)
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,74 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_listener_create_or_update_complex.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_listener.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
listener_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"ports": [
|
||||
{"authenticationRef": "example-authentication", "port": 8080, "protocol": "WebSockets"},
|
||||
{
|
||||
"authenticationRef": "example-authentication",
|
||||
"port": 8443,
|
||||
"protocol": "WebSockets",
|
||||
"tls": {
|
||||
"certManagerCertificateSpec": {
|
||||
"issuerRef": {
|
||||
"group": "jtmuladdkpasfpoyvewekmiy",
|
||||
"kind": "Issuer",
|
||||
"name": "example-issuer",
|
||||
}
|
||||
},
|
||||
"mode": "Automatic",
|
||||
},
|
||||
},
|
||||
{"authenticationRef": "example-authentication", "port": 1883},
|
||||
{
|
||||
"authenticationRef": "example-authentication",
|
||||
"port": 8883,
|
||||
"tls": {"manual": {"secretRef": "example-secret"}, "mode": "Manual"},
|
||||
},
|
||||
],
|
||||
"serviceType": "LoadBalancer",
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Complex.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,76 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_listener_create_or_update_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_listener.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
listener_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"ports": [
|
||||
{
|
||||
"authenticationRef": "tjvdroaqqy",
|
||||
"authorizationRef": "inxhvxnwswyrvt",
|
||||
"nodePort": 7281,
|
||||
"port": 1268,
|
||||
"protocol": "Mqtt",
|
||||
"tls": {
|
||||
"certManagerCertificateSpec": {
|
||||
"duration": "qmpeffoksron",
|
||||
"issuerRef": {
|
||||
"group": "jtmuladdkpasfpoyvewekmiy",
|
||||
"kind": "Issuer",
|
||||
"name": "ocwoqpgucvjrsuudtjhb",
|
||||
},
|
||||
"privateKey": {"algorithm": "Ec256", "rotationPolicy": "Always"},
|
||||
"renewBefore": "hutno",
|
||||
"san": {"dns": ["xhvmhrrhgfsapocjeebqtnzarlj"], "ip": ["zbgugfzcgsmegevzktsnibyuyp"]},
|
||||
"secretName": "oagi",
|
||||
},
|
||||
"manual": {"secretRef": "secret-name"},
|
||||
"mode": "Automatic",
|
||||
},
|
||||
}
|
||||
],
|
||||
"serviceName": "tpfiszlapdpxktx",
|
||||
"serviceType": "ClusterIp",
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,48 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_listener_create_or_update_simple.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_listener.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
listener_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {"ports": [{"port": 1883}]},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerListener_CreateOrUpdate_Simple.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,43 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_listener_delete_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
client.broker_listener.begin_delete(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
listener_name="resource-name123",
|
||||
).result()
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerListener_Delete_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,44 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_listener_get_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_listener.get(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
listener_name="resource-name123",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerListener_Get_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,44 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python broker_listener_list_by_resource_group_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.broker_listener.list_by_resource_group(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
broker_name="resource-name123",
|
||||
)
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,82 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_create_or_update_complex_contextualization.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
dataflow_name="aio-to-adx-contexualized",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"mode": "Enabled",
|
||||
"operations": [
|
||||
{
|
||||
"name": "source1",
|
||||
"operationType": "Source",
|
||||
"sourceSettings": {
|
||||
"dataSources": ["azure-iot-operations/data/thermostat"],
|
||||
"endpointRef": "aio-builtin-broker-endpoint",
|
||||
},
|
||||
},
|
||||
{
|
||||
"builtInTransformationSettings": {
|
||||
"datasets": [
|
||||
{
|
||||
"expression": "$1 == $2",
|
||||
"inputs": ["$source.country", "$context.country"],
|
||||
"key": "quality",
|
||||
}
|
||||
],
|
||||
"map": [
|
||||
{"inputs": ["*"], "output": "*"},
|
||||
{"inputs": ["$context(quality).*"], "output": "enriched.*"},
|
||||
],
|
||||
},
|
||||
"name": "transformation1",
|
||||
"operationType": "BuiltInTransformation",
|
||||
},
|
||||
{
|
||||
"destinationSettings": {"dataDestination": "mytable", "endpointRef": "adx-endpoint"},
|
||||
"name": "destination1",
|
||||
"operationType": "Destination",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,100 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_create_or_update_complex_event_hub.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
dataflow_name="aio-to-event-hub-transformed",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"mode": "Enabled",
|
||||
"operations": [
|
||||
{
|
||||
"name": "source1",
|
||||
"operationType": "Source",
|
||||
"sourceSettings": {
|
||||
"dataSources": ["azure-iot-operations/data/thermostat"],
|
||||
"endpointRef": "aio-builtin-broker-endpoint",
|
||||
},
|
||||
},
|
||||
{
|
||||
"builtInTransformationSettings": {
|
||||
"filter": [
|
||||
{
|
||||
"expression": "$1 > 9000 && $2 >= 8000",
|
||||
"inputs": ["temperature.Value", '"Tag 10".Value'],
|
||||
}
|
||||
],
|
||||
"map": [
|
||||
{"inputs": ["*"], "output": "*"},
|
||||
{
|
||||
"expression": "($1+$2)/2",
|
||||
"inputs": ["temperature.Value", '"Tag 10".Value'],
|
||||
"output": "AvgTemp.Value",
|
||||
},
|
||||
{"expression": "true", "inputs": [], "output": "dataflow-processed"},
|
||||
{"expression": "", "inputs": ["temperature.SourceTimestamp"], "output": ""},
|
||||
{"expression": "", "inputs": ['"Tag 10"'], "output": "pressure"},
|
||||
{
|
||||
"expression": "cToF($1)",
|
||||
"inputs": ["temperature.Value"],
|
||||
"output": "temperatureF.Value",
|
||||
},
|
||||
{
|
||||
"expression": "scale ($1,0,10,0,100)",
|
||||
"inputs": ['"Tag 10".Value'],
|
||||
"output": '"Scale Tag 10".Value',
|
||||
},
|
||||
],
|
||||
},
|
||||
"operationType": "BuiltInTransformation",
|
||||
},
|
||||
{
|
||||
"destinationSettings": {
|
||||
"dataDestination": "myuniqueeventhub",
|
||||
"endpointRef": "event-hub-endpoint",
|
||||
},
|
||||
"name": "destination1",
|
||||
"operationType": "Destination",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_ComplexEventHub.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,83 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_create_or_update_filter_to_topic.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
dataflow_name="mqtt-filter-to-topic",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"mode": "Enabled",
|
||||
"operations": [
|
||||
{
|
||||
"name": "source1",
|
||||
"operationType": "Source",
|
||||
"sourceSettings": {
|
||||
"dataSources": ["azure-iot-operations/data/thermostat"],
|
||||
"endpointRef": "aio-builtin-broker-endpoint",
|
||||
},
|
||||
},
|
||||
{
|
||||
"builtInTransformationSettings": {
|
||||
"filter": [
|
||||
{
|
||||
"description": "filter-datapoint",
|
||||
"expression": "$1 > 9000 && $2 >= 8000",
|
||||
"inputs": ["temperature.Value", '"Tag 10".Value'],
|
||||
"type": "Filter",
|
||||
}
|
||||
],
|
||||
"map": [{"inputs": ["*"], "output": "*", "type": "PassThrough"}],
|
||||
},
|
||||
"name": "transformation1",
|
||||
"operationType": "BuiltInTransformation",
|
||||
},
|
||||
{
|
||||
"destinationSettings": {
|
||||
"dataDestination": "data/filtered/thermostat",
|
||||
"endpointRef": "aio-builtin-broker-endpoint",
|
||||
},
|
||||
"name": "destination1",
|
||||
"operationType": "Destination",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_FilterToTopic.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,97 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_create_or_update_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
dataflow_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"mode": "Enabled",
|
||||
"operations": [
|
||||
{
|
||||
"builtInTransformationSettings": {
|
||||
"datasets": [
|
||||
{
|
||||
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
|
||||
"expression": "aatbwomvflemsxialv",
|
||||
"inputs": ["mosffpsslifkq"],
|
||||
"key": "qsfqcgxaxnhfumrsdsokwyv",
|
||||
"schemaRef": "n",
|
||||
}
|
||||
],
|
||||
"filter": [
|
||||
{
|
||||
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
|
||||
"expression": "n",
|
||||
"inputs": ["sxmjkbntgb"],
|
||||
"type": "Filter",
|
||||
}
|
||||
],
|
||||
"map": [
|
||||
{
|
||||
"description": "Lorem ipsum odor amet, consectetuer adipiscing elit.",
|
||||
"expression": "txoiltogsarwkzalsphvlmt",
|
||||
"inputs": ["xsbxuk"],
|
||||
"output": "nvgtmkfl",
|
||||
"type": "NewProperties",
|
||||
}
|
||||
],
|
||||
"schemaRef": "mcdc",
|
||||
"serializationFormat": "Delta",
|
||||
},
|
||||
"destinationSettings": {
|
||||
"dataDestination": "cbrh",
|
||||
"endpointRef": "kybkchnzimerguekuvqlqiqdvvrt",
|
||||
},
|
||||
"name": "knnafvkwoeakm",
|
||||
"operationType": "Source",
|
||||
"sourceSettings": {
|
||||
"assetRef": "zayyykwmckaocywdkohmu",
|
||||
"dataSources": ["chkkpymxhp"],
|
||||
"endpointRef": "iixotodhvhkkfcfyrkoveslqig",
|
||||
"schemaRef": "pknmdzqll",
|
||||
"serializationFormat": "Json",
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,68 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_create_or_update_simple_event_grid.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
dataflow_name="aio-to-event-grid",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"mode": "Enabled",
|
||||
"operations": [
|
||||
{
|
||||
"name": "source1",
|
||||
"operationType": "Source",
|
||||
"sourceSettings": {
|
||||
"dataSources": ["thermostats/+/telemetry/temperature/#"],
|
||||
"endpointRef": "aio-builtin-broker-endpoint",
|
||||
},
|
||||
},
|
||||
{
|
||||
"destinationSettings": {
|
||||
"dataDestination": "factory/telemetry",
|
||||
"endpointRef": "event-grid-endpoint",
|
||||
},
|
||||
"name": "destination1",
|
||||
"operationType": "Destination",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleEventGrid.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,72 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_create_or_update_simple_fabric.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
dataflow_name="aio-to-fabric",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"mode": "Enabled",
|
||||
"operations": [
|
||||
{
|
||||
"name": "source1",
|
||||
"operationType": "Source",
|
||||
"sourceSettings": {
|
||||
"dataSources": ["azure-iot-operations/data/thermostat"],
|
||||
"endpointRef": "aio-builtin-broker-endpoint",
|
||||
},
|
||||
},
|
||||
{
|
||||
"builtInTransformationSettings": {
|
||||
"schemaRef": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0",
|
||||
"serializationFormat": "Parquet",
|
||||
},
|
||||
"operationType": "BuiltInTransformation",
|
||||
},
|
||||
{
|
||||
"destinationSettings": {"dataDestination": "telemetryTable", "endpointRef": "fabric-endpoint"},
|
||||
"name": "destination1",
|
||||
"operationType": "Destination",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Dataflow_CreateOrUpdate_SimpleFabric.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,43 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_delete_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
client.dataflow.begin_delete(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
dataflow_name="resource-name123",
|
||||
).result()
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Dataflow_Delete_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,53 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_create_or_update_adlsv2.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="adlsv2-endpoint",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"dataLakeStorageSettings": {
|
||||
"authentication": {"accessTokenSettings": {"secretRef": "my-secret"}, "method": "AccessToken"},
|
||||
"host": "example.blob.core.windows.net",
|
||||
},
|
||||
"endpointType": "DataLakeStorage",
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,58 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_create_or_update_adx.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="adx-endpoint",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"dataExplorerSettings": {
|
||||
"authentication": {
|
||||
"method": "SystemAssignedManagedIdentity",
|
||||
"systemAssignedManagedIdentitySettings": {},
|
||||
},
|
||||
"batching": {"latencySeconds": 9312, "maxMessages": 9028},
|
||||
"database": "example-database",
|
||||
"host": "example.westeurope.kusto.windows.net",
|
||||
},
|
||||
"endpointType": "DataExplorer",
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_ADX.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,57 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_create_or_update_aio.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="aio-builtin-broker-endpoint",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"endpointType": "Mqtt",
|
||||
"mqttSettings": {
|
||||
"authentication": {
|
||||
"method": "Kubernetes",
|
||||
"serviceAccountTokenSettings": {"audience": "aio-internal"},
|
||||
},
|
||||
"host": "aio-broker:18883",
|
||||
"tls": {"mode": "Enabled", "trustedCaCertificateConfigMapRef": "aio-ca-trust-bundle-test-only"},
|
||||
},
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_AIO.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,57 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_create_or_update_event_grid.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="event-grid-endpoint",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"endpointType": "Mqtt",
|
||||
"mqttSettings": {
|
||||
"authentication": {
|
||||
"method": "SystemAssignedManagedIdentity",
|
||||
"systemAssignedManagedIdentitySettings": {},
|
||||
},
|
||||
"host": "example.westeurope-1.ts.eventgrid.azure.net:8883",
|
||||
"tls": {"mode": "Enabled"},
|
||||
},
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventGrid.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,58 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_create_or_update_event_hub.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="event-hub-endpoint",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"endpointType": "Kafka",
|
||||
"kafkaSettings": {
|
||||
"authentication": {
|
||||
"method": "SystemAssignedManagedIdentity",
|
||||
"systemAssignedManagedIdentitySettings": {},
|
||||
},
|
||||
"consumerGroupId": "aiodataflows",
|
||||
"host": "example.servicebus.windows.net:9093",
|
||||
"tls": {"mode": "Enabled"},
|
||||
},
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_EventHub.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,58 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_create_or_update_fabric.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="fabric-endpoint",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"endpointType": "FabricOneLake",
|
||||
"fabricOneLakeSettings": {
|
||||
"authentication": {
|
||||
"method": "SystemAssignedManagedIdentity",
|
||||
"systemAssignedManagedIdentitySettings": {},
|
||||
},
|
||||
"host": "onelake.dfs.fabric.microsoft.com",
|
||||
"names": {"lakehouseName": "example-lakehouse", "workspaceName": "example-workspace"},
|
||||
"oneLakePathType": "Tables",
|
||||
},
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Fabric.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,64 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_create_or_update_kafka.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="generic-kafka-endpoint",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"endpointType": "Kafka",
|
||||
"kafkaSettings": {
|
||||
"authentication": {
|
||||
"method": "Sasl",
|
||||
"saslSettings": {"saslType": "Plain", "secretRef": "my-secret"},
|
||||
},
|
||||
"batching": {"latencyMs": 5, "maxBytes": 1000000, "maxMessages": 100000, "mode": "Enabled"},
|
||||
"cloudEventAttributes": "Propagate",
|
||||
"compression": "Gzip",
|
||||
"consumerGroupId": "dataflows",
|
||||
"copyMqttProperties": "Enabled",
|
||||
"host": "example.kafka.local:9093",
|
||||
"kafkaAcks": "All",
|
||||
"partitionStrategy": "Default",
|
||||
"tls": {"mode": "Enabled", "trustedCaCertificateConfigMapRef": "ca-certificates"},
|
||||
},
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_Kafka.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,50 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_create_or_update_local_storage.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="local-storage-endpoint",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"endpointType": "LocalStorage",
|
||||
"localStorageSettings": {"persistentVolumeClaimRef": "example-pvc"},
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_LocalStorage.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,138 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_create_or_update_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"dataExplorerSettings": {
|
||||
"authentication": {
|
||||
"method": "SystemAssignedManagedIdentity",
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "psxomrfbhoflycm"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "fb90f267-8872-431a-a76a-a1cec5d3c4d2",
|
||||
"scope": "zop",
|
||||
"tenantId": "ed060aa2-71ff-4d3f-99c4-a9138356fdec",
|
||||
},
|
||||
},
|
||||
"batching": {"latencySeconds": 9312, "maxMessages": 9028},
|
||||
"database": "yqcdpjsifm",
|
||||
"host": "<cluster>.<region>.kusto.windows.net",
|
||||
},
|
||||
"dataLakeStorageSettings": {
|
||||
"authentication": {
|
||||
"accessTokenSettings": {"secretRef": "sevriyphcvnlrnfudqzejecwa"},
|
||||
"method": "SystemAssignedManagedIdentity",
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "psxomrfbhoflycm"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "fb90f267-8872-431a-a76a-a1cec5d3c4d2",
|
||||
"scope": "zop",
|
||||
"tenantId": "ed060aa2-71ff-4d3f-99c4-a9138356fdec",
|
||||
},
|
||||
},
|
||||
"batching": {"latencySeconds": 9312, "maxMessages": 9028},
|
||||
"host": "<account>.blob.core.windows.net",
|
||||
},
|
||||
"endpointType": "DataExplorer",
|
||||
"fabricOneLakeSettings": {
|
||||
"authentication": {
|
||||
"method": "SystemAssignedManagedIdentity",
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "psxomrfbhoflycm"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "fb90f267-8872-431a-a76a-a1cec5d3c4d2",
|
||||
"scope": "zop",
|
||||
"tenantId": "ed060aa2-71ff-4d3f-99c4-a9138356fdec",
|
||||
},
|
||||
},
|
||||
"batching": {"latencySeconds": 9312, "maxMessages": 9028},
|
||||
"host": "https://<host>.fabric.microsoft.com",
|
||||
"names": {"lakehouseName": "wpeathi", "workspaceName": "nwgmitkbljztgms"},
|
||||
"oneLakePathType": "Files",
|
||||
},
|
||||
"kafkaSettings": {
|
||||
"authentication": {
|
||||
"method": "SystemAssignedManagedIdentity",
|
||||
"saslSettings": {"saslType": "Plain", "secretRef": "visyxoztqnylvbyokhtmpdkwes"},
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "psxomrfbhoflycm"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "fb90f267-8872-431a-a76a-a1cec5d3c4d2",
|
||||
"scope": "zop",
|
||||
"tenantId": "ed060aa2-71ff-4d3f-99c4-a9138356fdec",
|
||||
},
|
||||
"x509CertificateSettings": {"secretRef": "afwizrystfslkfqd"},
|
||||
},
|
||||
"batching": {"latencyMs": 3679, "maxBytes": 8887, "maxMessages": 2174, "mode": "Enabled"},
|
||||
"cloudEventAttributes": "PassThrough",
|
||||
"compression": "None",
|
||||
"consumerGroupId": "ukkzcjiyenhxokat",
|
||||
"copyMqttProperties": "Enabled",
|
||||
"host": "pwcqfiqclcgneolpewnyavoulbip",
|
||||
"kafkaAcks": "Zero",
|
||||
"partitionStrategy": "Default",
|
||||
"tls": {"mode": "Enabled", "trustedCaCertificateConfigMapRef": "tectjjvukvelsreihwadh"},
|
||||
},
|
||||
"localStorageSettings": {"persistentVolumeClaimRef": "jjwqwvd"},
|
||||
"mqttSettings": {
|
||||
"authentication": {
|
||||
"method": "SystemAssignedManagedIdentity",
|
||||
"serviceAccountTokenSettings": {"audience": "ejbklrbxgjaqleoycgpje"},
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "psxomrfbhoflycm"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "fb90f267-8872-431a-a76a-a1cec5d3c4d2",
|
||||
"scope": "zop",
|
||||
"tenantId": "ed060aa2-71ff-4d3f-99c4-a9138356fdec",
|
||||
},
|
||||
"x509CertificateSettings": {"secretRef": "afwizrystfslkfqd"},
|
||||
},
|
||||
"clientIdPrefix": "kkljsdxdirfhwxtkavldekeqhv",
|
||||
"cloudEventAttributes": "PassThrough",
|
||||
"host": "nyhnxqnbspstctl",
|
||||
"keepAliveSeconds": 0,
|
||||
"maxInflightMessages": 0,
|
||||
"protocol": "Mqtt",
|
||||
"qos": 1,
|
||||
"retain": "Keep",
|
||||
"sessionExpirySeconds": 0,
|
||||
"tls": {"mode": "Enabled", "trustedCaCertificateConfigMapRef": "tectjjvukvelsreihwadh"},
|
||||
},
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,64 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_create_or_update_mqtt.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="generic-mqtt-broker-endpoint",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"endpointType": "Mqtt",
|
||||
"mqttSettings": {
|
||||
"authentication": {
|
||||
"method": "X509Certificate",
|
||||
"x509CertificateSettings": {"secretRef": "example-secret"},
|
||||
},
|
||||
"clientIdPrefix": "factory-gateway",
|
||||
"host": "example.broker.local:1883",
|
||||
"keepAliveSeconds": 60,
|
||||
"maxInflightMessages": 100,
|
||||
"protocol": "WebSockets",
|
||||
"qos": 1,
|
||||
"retain": "Keep",
|
||||
"sessionExpirySeconds": 3600,
|
||||
"tls": {"mode": "Disabled"},
|
||||
},
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_CreateOrUpdate_MQTT.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,42 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_delete_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
client.dataflow_endpoint.begin_delete(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="resource-name123",
|
||||
).result()
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,43 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_get_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.get(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_endpoint_name="resource-name123",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_Get_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,43 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_endpoint_list_by_resource_group_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_endpoint.list_by_resource_group(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
)
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,44 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_get_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow.get(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
dataflow_name="resource-name123",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Dataflow_Get_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,44 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_list_by_profile_resource_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow.list_by_resource_group(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
)
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,53 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_profile_create_or_update_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_profile.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {
|
||||
"diagnostics": {
|
||||
"logs": {"level": "rnmwokumdmebpmfxxxzvvjfdywotav"},
|
||||
"metrics": {"prometheusPort": 7581},
|
||||
},
|
||||
"instanceCount": 14,
|
||||
},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,47 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_profile_create_or_update_minimal.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_profile.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="aio-dataflowprofile",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {"instanceCount": 1},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Minimal.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,47 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_profile_create_or_update_multi.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_profile.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="aio-dataflowprofile",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"properties": {"instanceCount": 3},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowProfile_CreateOrUpdate_Multi.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,42 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_profile_delete_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
client.dataflow_profile.begin_delete(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
).result()
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowProfile_Delete_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,43 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_profile_get_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_profile.get(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
dataflow_profile_name="resource-name123",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowProfile_Get_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,43 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python dataflow_profile_list_by_resource_group_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.dataflow_profile.list_by_resource_group(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="resource-name123",
|
||||
)
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,54 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python instance_create_or_update_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.instance.begin_create_or_update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="aio-instance",
|
||||
resource={
|
||||
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
|
||||
"identity": {"type": "None", "userAssignedIdentities": {}},
|
||||
"location": "xvewadyhycrjpu",
|
||||
"properties": {
|
||||
"description": "kpqtgocs",
|
||||
"schemaRegistryRef": {
|
||||
"resourceId": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123"
|
||||
},
|
||||
},
|
||||
"tags": {},
|
||||
},
|
||||
).result()
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,41 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python instance_delete_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
client.instance.begin_delete(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="aio-instance",
|
||||
).result()
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Instance_Delete_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,42 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python instance_get_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.instance.get(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="aio-instance",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Instance_Get_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,42 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python instance_list_by_resource_group_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.instance.list_by_resource_group(
|
||||
resource_group_name="rgiotoperations",
|
||||
)
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,40 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python instance_list_by_subscription_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.instance.list_by_subscription()
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Instance_ListBySubscription_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,43 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python instance_update_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.instance.update(
|
||||
resource_group_name="rgiotoperations",
|
||||
instance_name="aio-instance",
|
||||
properties={"identity": {"type": "None", "userAssignedIdentities": {}}, "tags": {}},
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Instance_Update_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,40 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-iotoperations
|
||||
# USAGE
|
||||
python operations_list_maximum_set_gen.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = IoTOperationsMgmtClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.operations.list()
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: 2024-09-15-preview/Operations_List_MaximumSet_Gen.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1,35 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
import os
|
||||
import pytest
|
||||
from dotenv import load_dotenv
|
||||
from devtools_testutils import (
|
||||
test_proxy,
|
||||
add_general_regex_sanitizer,
|
||||
add_body_key_sanitizer,
|
||||
add_header_regex_sanitizer,
|
||||
)
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
# For security, please avoid record sensitive identity information in recordings
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def add_sanitizers(test_proxy):
|
||||
iotoperationsmgmt_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")
|
||||
iotoperationsmgmt_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000")
|
||||
iotoperationsmgmt_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000")
|
||||
iotoperationsmgmt_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000")
|
||||
add_general_regex_sanitizer(regex=iotoperationsmgmt_subscription_id, value="00000000-0000-0000-0000-000000000000")
|
||||
add_general_regex_sanitizer(regex=iotoperationsmgmt_tenant_id, value="00000000-0000-0000-0000-000000000000")
|
||||
add_general_regex_sanitizer(regex=iotoperationsmgmt_client_id, value="00000000-0000-0000-0000-000000000000")
|
||||
add_general_regex_sanitizer(regex=iotoperationsmgmt_client_secret, value="00000000-0000-0000-0000-000000000000")
|
||||
|
||||
add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]")
|
||||
add_header_regex_sanitizer(key="Cookie", value="cookie;")
|
||||
add_body_key_sanitizer(json_path="$..access_token", value="access_token")
|
|
@ -0,0 +1,103 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
import pytest
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
|
||||
|
||||
AZURE_LOCATION = "eastus"
|
||||
|
||||
|
||||
@pytest.mark.skip("you may need to update the auto-generated test case before run it")
|
||||
class TestIoTOperationsMgmtBrokerAuthenticationOperations(AzureMgmtRecordedTestCase):
|
||||
def setup_method(self, method):
|
||||
self.client = self.create_mgmt_client(IoTOperationsMgmtClient)
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_authentication_get(self, resource_group):
|
||||
response = self.client.broker_authentication.get(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authentication_name="str",
|
||||
)
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_authentication_begin_create_or_update(self, resource_group):
|
||||
response = self.client.broker_authentication.begin_create_or_update(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authentication_name="str",
|
||||
resource={
|
||||
"extendedLocation": {"name": "str", "type": "str"},
|
||||
"id": "str",
|
||||
"name": "str",
|
||||
"properties": {
|
||||
"authenticationMethods": [
|
||||
{
|
||||
"method": "str",
|
||||
"customSettings": {
|
||||
"endpoint": "str",
|
||||
"auth": {"x509": {"secretRef": "str"}},
|
||||
"caCertConfigMap": "str",
|
||||
"headers": {"str": "str"},
|
||||
},
|
||||
"serviceAccountTokenSettings": {"audiences": ["str"]},
|
||||
"x509Settings": {
|
||||
"authorizationAttributes": {"str": {"attributes": {"str": "str"}, "subject": "str"}},
|
||||
"trustedClientCaCert": "str",
|
||||
},
|
||||
}
|
||||
],
|
||||
"provisioningState": "str",
|
||||
},
|
||||
"systemData": {
|
||||
"createdAt": "2020-02-20 00:00:00",
|
||||
"createdBy": "str",
|
||||
"createdByType": "str",
|
||||
"lastModifiedAt": "2020-02-20 00:00:00",
|
||||
"lastModifiedBy": "str",
|
||||
"lastModifiedByType": "str",
|
||||
},
|
||||
"type": "str",
|
||||
},
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_authentication_begin_delete(self, resource_group):
|
||||
response = self.client.broker_authentication.begin_delete(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authentication_name="str",
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_authentication_list_by_resource_group(self, resource_group):
|
||||
response = self.client.broker_authentication.list_by_resource_group(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
)
|
||||
result = [r for r in response]
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
|
@ -0,0 +1,110 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
import pytest
|
||||
from azure.mgmt.iotoperations.aio import IoTOperationsMgmtClient
|
||||
|
||||
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
|
||||
from devtools_testutils.aio import recorded_by_proxy_async
|
||||
|
||||
AZURE_LOCATION = "eastus"
|
||||
|
||||
|
||||
@pytest.mark.skip("you may need to update the auto-generated test case before run it")
|
||||
class TestIoTOperationsMgmtBrokerAuthenticationOperationsAsync(AzureMgmtRecordedTestCase):
|
||||
def setup_method(self, method):
|
||||
self.client = self.create_mgmt_client(IoTOperationsMgmtClient, is_async=True)
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_authentication_get(self, resource_group):
|
||||
response = await self.client.broker_authentication.get(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authentication_name="str",
|
||||
)
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_authentication_begin_create_or_update(self, resource_group):
|
||||
response = await (
|
||||
await self.client.broker_authentication.begin_create_or_update(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authentication_name="str",
|
||||
resource={
|
||||
"extendedLocation": {"name": "str", "type": "str"},
|
||||
"id": "str",
|
||||
"name": "str",
|
||||
"properties": {
|
||||
"authenticationMethods": [
|
||||
{
|
||||
"method": "str",
|
||||
"customSettings": {
|
||||
"endpoint": "str",
|
||||
"auth": {"x509": {"secretRef": "str"}},
|
||||
"caCertConfigMap": "str",
|
||||
"headers": {"str": "str"},
|
||||
},
|
||||
"serviceAccountTokenSettings": {"audiences": ["str"]},
|
||||
"x509Settings": {
|
||||
"authorizationAttributes": {
|
||||
"str": {"attributes": {"str": "str"}, "subject": "str"}
|
||||
},
|
||||
"trustedClientCaCert": "str",
|
||||
},
|
||||
}
|
||||
],
|
||||
"provisioningState": "str",
|
||||
},
|
||||
"systemData": {
|
||||
"createdAt": "2020-02-20 00:00:00",
|
||||
"createdBy": "str",
|
||||
"createdByType": "str",
|
||||
"lastModifiedAt": "2020-02-20 00:00:00",
|
||||
"lastModifiedBy": "str",
|
||||
"lastModifiedByType": "str",
|
||||
},
|
||||
"type": "str",
|
||||
},
|
||||
)
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_authentication_begin_delete(self, resource_group):
|
||||
response = await (
|
||||
await self.client.broker_authentication.begin_delete(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authentication_name="str",
|
||||
)
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_authentication_list_by_resource_group(self, resource_group):
|
||||
response = self.client.broker_authentication.list_by_resource_group(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
)
|
||||
result = [r async for r in response]
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
|
@ -0,0 +1,101 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
import pytest
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
|
||||
|
||||
AZURE_LOCATION = "eastus"
|
||||
|
||||
|
||||
@pytest.mark.skip("you may need to update the auto-generated test case before run it")
|
||||
class TestIoTOperationsMgmtBrokerAuthorizationOperations(AzureMgmtRecordedTestCase):
|
||||
def setup_method(self, method):
|
||||
self.client = self.create_mgmt_client(IoTOperationsMgmtClient)
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_authorization_get(self, resource_group):
|
||||
response = self.client.broker_authorization.get(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authorization_name="str",
|
||||
)
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_authorization_begin_create_or_update(self, resource_group):
|
||||
response = self.client.broker_authorization.begin_create_or_update(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authorization_name="str",
|
||||
resource={
|
||||
"extendedLocation": {"name": "str", "type": "str"},
|
||||
"id": "str",
|
||||
"name": "str",
|
||||
"properties": {
|
||||
"authorizationPolicies": {
|
||||
"cache": "str",
|
||||
"rules": [
|
||||
{
|
||||
"brokerResources": [{"method": "str", "clientIds": ["str"], "topics": ["str"]}],
|
||||
"principals": {
|
||||
"attributes": [{"str": "str"}],
|
||||
"clientIds": ["str"],
|
||||
"usernames": ["str"],
|
||||
},
|
||||
"stateStoreResources": [{"keyType": "str", "keys": ["str"], "method": "str"}],
|
||||
}
|
||||
],
|
||||
},
|
||||
"provisioningState": "str",
|
||||
},
|
||||
"systemData": {
|
||||
"createdAt": "2020-02-20 00:00:00",
|
||||
"createdBy": "str",
|
||||
"createdByType": "str",
|
||||
"lastModifiedAt": "2020-02-20 00:00:00",
|
||||
"lastModifiedBy": "str",
|
||||
"lastModifiedByType": "str",
|
||||
},
|
||||
"type": "str",
|
||||
},
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_authorization_begin_delete(self, resource_group):
|
||||
response = self.client.broker_authorization.begin_delete(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authorization_name="str",
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_authorization_list_by_resource_group(self, resource_group):
|
||||
response = self.client.broker_authorization.list_by_resource_group(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
)
|
||||
result = [r for r in response]
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
|
@ -0,0 +1,106 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
import pytest
|
||||
from azure.mgmt.iotoperations.aio import IoTOperationsMgmtClient
|
||||
|
||||
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
|
||||
from devtools_testutils.aio import recorded_by_proxy_async
|
||||
|
||||
AZURE_LOCATION = "eastus"
|
||||
|
||||
|
||||
@pytest.mark.skip("you may need to update the auto-generated test case before run it")
|
||||
class TestIoTOperationsMgmtBrokerAuthorizationOperationsAsync(AzureMgmtRecordedTestCase):
|
||||
def setup_method(self, method):
|
||||
self.client = self.create_mgmt_client(IoTOperationsMgmtClient, is_async=True)
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_authorization_get(self, resource_group):
|
||||
response = await self.client.broker_authorization.get(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authorization_name="str",
|
||||
)
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_authorization_begin_create_or_update(self, resource_group):
|
||||
response = await (
|
||||
await self.client.broker_authorization.begin_create_or_update(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authorization_name="str",
|
||||
resource={
|
||||
"extendedLocation": {"name": "str", "type": "str"},
|
||||
"id": "str",
|
||||
"name": "str",
|
||||
"properties": {
|
||||
"authorizationPolicies": {
|
||||
"cache": "str",
|
||||
"rules": [
|
||||
{
|
||||
"brokerResources": [{"method": "str", "clientIds": ["str"], "topics": ["str"]}],
|
||||
"principals": {
|
||||
"attributes": [{"str": "str"}],
|
||||
"clientIds": ["str"],
|
||||
"usernames": ["str"],
|
||||
},
|
||||
"stateStoreResources": [{"keyType": "str", "keys": ["str"], "method": "str"}],
|
||||
}
|
||||
],
|
||||
},
|
||||
"provisioningState": "str",
|
||||
},
|
||||
"systemData": {
|
||||
"createdAt": "2020-02-20 00:00:00",
|
||||
"createdBy": "str",
|
||||
"createdByType": "str",
|
||||
"lastModifiedAt": "2020-02-20 00:00:00",
|
||||
"lastModifiedBy": "str",
|
||||
"lastModifiedByType": "str",
|
||||
},
|
||||
"type": "str",
|
||||
},
|
||||
)
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_authorization_begin_delete(self, resource_group):
|
||||
response = await (
|
||||
await self.client.broker_authorization.begin_delete(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
authorization_name="str",
|
||||
)
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_authorization_list_by_resource_group(self, resource_group):
|
||||
response = self.client.broker_authorization.list_by_resource_group(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
)
|
||||
result = [r async for r in response]
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
|
@ -0,0 +1,110 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
import pytest
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
|
||||
|
||||
AZURE_LOCATION = "eastus"
|
||||
|
||||
|
||||
@pytest.mark.skip("you may need to update the auto-generated test case before run it")
|
||||
class TestIoTOperationsMgmtBrokerListenerOperations(AzureMgmtRecordedTestCase):
|
||||
def setup_method(self, method):
|
||||
self.client = self.create_mgmt_client(IoTOperationsMgmtClient)
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_listener_get(self, resource_group):
|
||||
response = self.client.broker_listener.get(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
listener_name="str",
|
||||
)
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_listener_begin_create_or_update(self, resource_group):
|
||||
response = self.client.broker_listener.begin_create_or_update(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
listener_name="str",
|
||||
resource={
|
||||
"extendedLocation": {"name": "str", "type": "str"},
|
||||
"id": "str",
|
||||
"name": "str",
|
||||
"properties": {
|
||||
"ports": [
|
||||
{
|
||||
"port": 0,
|
||||
"authenticationRef": "str",
|
||||
"authorizationRef": "str",
|
||||
"nodePort": 0,
|
||||
"protocol": "str",
|
||||
"tls": {
|
||||
"mode": "str",
|
||||
"certManagerCertificateSpec": {
|
||||
"issuerRef": {"group": "str", "kind": "str", "name": "str"},
|
||||
"duration": "str",
|
||||
"privateKey": {"algorithm": "str", "rotationPolicy": "str"},
|
||||
"renewBefore": "str",
|
||||
"san": {"dns": ["str"], "ip": ["str"]},
|
||||
"secretName": "str",
|
||||
},
|
||||
"manual": {"secretRef": "str"},
|
||||
},
|
||||
}
|
||||
],
|
||||
"provisioningState": "str",
|
||||
"serviceName": "str",
|
||||
"serviceType": "str",
|
||||
},
|
||||
"systemData": {
|
||||
"createdAt": "2020-02-20 00:00:00",
|
||||
"createdBy": "str",
|
||||
"createdByType": "str",
|
||||
"lastModifiedAt": "2020-02-20 00:00:00",
|
||||
"lastModifiedBy": "str",
|
||||
"lastModifiedByType": "str",
|
||||
},
|
||||
"type": "str",
|
||||
},
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_listener_begin_delete(self, resource_group):
|
||||
response = self.client.broker_listener.begin_delete(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
listener_name="str",
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_listener_list_by_resource_group(self, resource_group):
|
||||
response = self.client.broker_listener.list_by_resource_group(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
)
|
||||
result = [r for r in response]
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
|
@ -0,0 +1,115 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
import pytest
|
||||
from azure.mgmt.iotoperations.aio import IoTOperationsMgmtClient
|
||||
|
||||
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
|
||||
from devtools_testutils.aio import recorded_by_proxy_async
|
||||
|
||||
AZURE_LOCATION = "eastus"
|
||||
|
||||
|
||||
@pytest.mark.skip("you may need to update the auto-generated test case before run it")
|
||||
class TestIoTOperationsMgmtBrokerListenerOperationsAsync(AzureMgmtRecordedTestCase):
|
||||
def setup_method(self, method):
|
||||
self.client = self.create_mgmt_client(IoTOperationsMgmtClient, is_async=True)
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_listener_get(self, resource_group):
|
||||
response = await self.client.broker_listener.get(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
listener_name="str",
|
||||
)
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_listener_begin_create_or_update(self, resource_group):
|
||||
response = await (
|
||||
await self.client.broker_listener.begin_create_or_update(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
listener_name="str",
|
||||
resource={
|
||||
"extendedLocation": {"name": "str", "type": "str"},
|
||||
"id": "str",
|
||||
"name": "str",
|
||||
"properties": {
|
||||
"ports": [
|
||||
{
|
||||
"port": 0,
|
||||
"authenticationRef": "str",
|
||||
"authorizationRef": "str",
|
||||
"nodePort": 0,
|
||||
"protocol": "str",
|
||||
"tls": {
|
||||
"mode": "str",
|
||||
"certManagerCertificateSpec": {
|
||||
"issuerRef": {"group": "str", "kind": "str", "name": "str"},
|
||||
"duration": "str",
|
||||
"privateKey": {"algorithm": "str", "rotationPolicy": "str"},
|
||||
"renewBefore": "str",
|
||||
"san": {"dns": ["str"], "ip": ["str"]},
|
||||
"secretName": "str",
|
||||
},
|
||||
"manual": {"secretRef": "str"},
|
||||
},
|
||||
}
|
||||
],
|
||||
"provisioningState": "str",
|
||||
"serviceName": "str",
|
||||
"serviceType": "str",
|
||||
},
|
||||
"systemData": {
|
||||
"createdAt": "2020-02-20 00:00:00",
|
||||
"createdBy": "str",
|
||||
"createdByType": "str",
|
||||
"lastModifiedAt": "2020-02-20 00:00:00",
|
||||
"lastModifiedBy": "str",
|
||||
"lastModifiedByType": "str",
|
||||
},
|
||||
"type": "str",
|
||||
},
|
||||
)
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_listener_begin_delete(self, resource_group):
|
||||
response = await (
|
||||
await self.client.broker_listener.begin_delete(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
listener_name="str",
|
||||
)
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_listener_list_by_resource_group(self, resource_group):
|
||||
response = self.client.broker_listener.list_by_resource_group(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
)
|
||||
result = [r async for r in response]
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
|
@ -0,0 +1,145 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
import pytest
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
|
||||
|
||||
AZURE_LOCATION = "eastus"
|
||||
|
||||
|
||||
@pytest.mark.skip("you may need to update the auto-generated test case before run it")
|
||||
class TestIoTOperationsMgmtBrokerOperations(AzureMgmtRecordedTestCase):
|
||||
def setup_method(self, method):
|
||||
self.client = self.create_mgmt_client(IoTOperationsMgmtClient)
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_get(self, resource_group):
|
||||
response = self.client.broker.get(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
)
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_begin_create_or_update(self, resource_group):
|
||||
response = self.client.broker.begin_create_or_update(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
resource={
|
||||
"extendedLocation": {"name": "str", "type": "str"},
|
||||
"id": "str",
|
||||
"name": "str",
|
||||
"properties": {
|
||||
"advanced": {
|
||||
"clients": {
|
||||
"maxKeepAliveSeconds": 0,
|
||||
"maxMessageExpirySeconds": 0,
|
||||
"maxPacketSizeBytes": 0,
|
||||
"maxReceiveMaximum": 0,
|
||||
"maxSessionExpirySeconds": 0,
|
||||
"subscriberQueueLimit": {"length": 0, "strategy": "str"},
|
||||
},
|
||||
"encryptInternalTraffic": "str",
|
||||
"internalCerts": {
|
||||
"duration": "str",
|
||||
"privateKey": {"algorithm": "str", "rotationPolicy": "str"},
|
||||
"renewBefore": "str",
|
||||
},
|
||||
},
|
||||
"cardinality": {
|
||||
"backendChain": {"partitions": 0, "redundancyFactor": 0, "workers": 0},
|
||||
"frontend": {"replicas": 0, "workers": 0},
|
||||
},
|
||||
"diagnostics": {
|
||||
"logs": {"level": "str"},
|
||||
"metrics": {"prometheusPort": 0},
|
||||
"selfCheck": {"intervalSeconds": 0, "mode": "str", "timeoutSeconds": 0},
|
||||
"traces": {
|
||||
"cacheSizeMegabytes": 0,
|
||||
"mode": "str",
|
||||
"selfTracing": {"intervalSeconds": 0, "mode": "str"},
|
||||
"spanChannelCapacity": 0,
|
||||
},
|
||||
},
|
||||
"diskBackedMessageBuffer": {
|
||||
"maxSize": "str",
|
||||
"ephemeralVolumeClaimSpec": {
|
||||
"accessModes": ["str"],
|
||||
"dataSource": {"kind": "str", "name": "str", "apiGroup": "str"},
|
||||
"dataSourceRef": {"kind": "str", "name": "str", "apiGroup": "str", "namespace": "str"},
|
||||
"resources": {"limits": {"str": "str"}, "requests": {"str": "str"}},
|
||||
"selector": {
|
||||
"matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}],
|
||||
"matchLabels": {"str": "str"},
|
||||
},
|
||||
"storageClassName": "str",
|
||||
"volumeMode": "str",
|
||||
"volumeName": "str",
|
||||
},
|
||||
"persistentVolumeClaimSpec": {
|
||||
"accessModes": ["str"],
|
||||
"dataSource": {"kind": "str", "name": "str", "apiGroup": "str"},
|
||||
"dataSourceRef": {"kind": "str", "name": "str", "apiGroup": "str", "namespace": "str"},
|
||||
"resources": {"limits": {"str": "str"}, "requests": {"str": "str"}},
|
||||
"selector": {
|
||||
"matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}],
|
||||
"matchLabels": {"str": "str"},
|
||||
},
|
||||
"storageClassName": "str",
|
||||
"volumeMode": "str",
|
||||
"volumeName": "str",
|
||||
},
|
||||
},
|
||||
"generateResourceLimits": {"cpu": "str"},
|
||||
"memoryProfile": "str",
|
||||
"provisioningState": "str",
|
||||
},
|
||||
"systemData": {
|
||||
"createdAt": "2020-02-20 00:00:00",
|
||||
"createdBy": "str",
|
||||
"createdByType": "str",
|
||||
"lastModifiedAt": "2020-02-20 00:00:00",
|
||||
"lastModifiedBy": "str",
|
||||
"lastModifiedByType": "str",
|
||||
},
|
||||
"type": "str",
|
||||
},
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_begin_delete(self, resource_group):
|
||||
response = self.client.broker.begin_delete(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_broker_list_by_resource_group(self, resource_group):
|
||||
response = self.client.broker.list_by_resource_group(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
)
|
||||
result = [r for r in response]
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
|
@ -0,0 +1,150 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
import pytest
|
||||
from azure.mgmt.iotoperations.aio import IoTOperationsMgmtClient
|
||||
|
||||
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
|
||||
from devtools_testutils.aio import recorded_by_proxy_async
|
||||
|
||||
AZURE_LOCATION = "eastus"
|
||||
|
||||
|
||||
@pytest.mark.skip("you may need to update the auto-generated test case before run it")
|
||||
class TestIoTOperationsMgmtBrokerOperationsAsync(AzureMgmtRecordedTestCase):
|
||||
def setup_method(self, method):
|
||||
self.client = self.create_mgmt_client(IoTOperationsMgmtClient, is_async=True)
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_get(self, resource_group):
|
||||
response = await self.client.broker.get(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
)
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_begin_create_or_update(self, resource_group):
|
||||
response = await (
|
||||
await self.client.broker.begin_create_or_update(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
resource={
|
||||
"extendedLocation": {"name": "str", "type": "str"},
|
||||
"id": "str",
|
||||
"name": "str",
|
||||
"properties": {
|
||||
"advanced": {
|
||||
"clients": {
|
||||
"maxKeepAliveSeconds": 0,
|
||||
"maxMessageExpirySeconds": 0,
|
||||
"maxPacketSizeBytes": 0,
|
||||
"maxReceiveMaximum": 0,
|
||||
"maxSessionExpirySeconds": 0,
|
||||
"subscriberQueueLimit": {"length": 0, "strategy": "str"},
|
||||
},
|
||||
"encryptInternalTraffic": "str",
|
||||
"internalCerts": {
|
||||
"duration": "str",
|
||||
"privateKey": {"algorithm": "str", "rotationPolicy": "str"},
|
||||
"renewBefore": "str",
|
||||
},
|
||||
},
|
||||
"cardinality": {
|
||||
"backendChain": {"partitions": 0, "redundancyFactor": 0, "workers": 0},
|
||||
"frontend": {"replicas": 0, "workers": 0},
|
||||
},
|
||||
"diagnostics": {
|
||||
"logs": {"level": "str"},
|
||||
"metrics": {"prometheusPort": 0},
|
||||
"selfCheck": {"intervalSeconds": 0, "mode": "str", "timeoutSeconds": 0},
|
||||
"traces": {
|
||||
"cacheSizeMegabytes": 0,
|
||||
"mode": "str",
|
||||
"selfTracing": {"intervalSeconds": 0, "mode": "str"},
|
||||
"spanChannelCapacity": 0,
|
||||
},
|
||||
},
|
||||
"diskBackedMessageBuffer": {
|
||||
"maxSize": "str",
|
||||
"ephemeralVolumeClaimSpec": {
|
||||
"accessModes": ["str"],
|
||||
"dataSource": {"kind": "str", "name": "str", "apiGroup": "str"},
|
||||
"dataSourceRef": {"kind": "str", "name": "str", "apiGroup": "str", "namespace": "str"},
|
||||
"resources": {"limits": {"str": "str"}, "requests": {"str": "str"}},
|
||||
"selector": {
|
||||
"matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}],
|
||||
"matchLabels": {"str": "str"},
|
||||
},
|
||||
"storageClassName": "str",
|
||||
"volumeMode": "str",
|
||||
"volumeName": "str",
|
||||
},
|
||||
"persistentVolumeClaimSpec": {
|
||||
"accessModes": ["str"],
|
||||
"dataSource": {"kind": "str", "name": "str", "apiGroup": "str"},
|
||||
"dataSourceRef": {"kind": "str", "name": "str", "apiGroup": "str", "namespace": "str"},
|
||||
"resources": {"limits": {"str": "str"}, "requests": {"str": "str"}},
|
||||
"selector": {
|
||||
"matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}],
|
||||
"matchLabels": {"str": "str"},
|
||||
},
|
||||
"storageClassName": "str",
|
||||
"volumeMode": "str",
|
||||
"volumeName": "str",
|
||||
},
|
||||
},
|
||||
"generateResourceLimits": {"cpu": "str"},
|
||||
"memoryProfile": "str",
|
||||
"provisioningState": "str",
|
||||
},
|
||||
"systemData": {
|
||||
"createdAt": "2020-02-20 00:00:00",
|
||||
"createdBy": "str",
|
||||
"createdByType": "str",
|
||||
"lastModifiedAt": "2020-02-20 00:00:00",
|
||||
"lastModifiedBy": "str",
|
||||
"lastModifiedByType": "str",
|
||||
},
|
||||
"type": "str",
|
||||
},
|
||||
)
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_begin_delete(self, resource_group):
|
||||
response = await (
|
||||
await self.client.broker.begin_delete(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
broker_name="str",
|
||||
)
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_broker_list_by_resource_group(self, resource_group):
|
||||
response = self.client.broker.list_by_resource_group(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
)
|
||||
result = [r async for r in response]
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
|
@ -0,0 +1,173 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
import pytest
|
||||
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
|
||||
|
||||
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
|
||||
|
||||
AZURE_LOCATION = "eastus"
|
||||
|
||||
|
||||
@pytest.mark.skip("you may need to update the auto-generated test case before run it")
|
||||
class TestIoTOperationsMgmtDataflowEndpointOperations(AzureMgmtRecordedTestCase):
|
||||
def setup_method(self, method):
|
||||
self.client = self.create_mgmt_client(IoTOperationsMgmtClient)
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_dataflow_endpoint_get(self, resource_group):
|
||||
response = self.client.dataflow_endpoint.get(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
dataflow_endpoint_name="str",
|
||||
)
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_dataflow_endpoint_begin_create_or_update(self, resource_group):
|
||||
response = self.client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
dataflow_endpoint_name="str",
|
||||
resource={
|
||||
"extendedLocation": {"name": "str", "type": "str"},
|
||||
"id": "str",
|
||||
"name": "str",
|
||||
"properties": {
|
||||
"endpointType": "str",
|
||||
"dataExplorerSettings": {
|
||||
"authentication": {
|
||||
"method": "str",
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "str"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "str",
|
||||
"tenantId": "str",
|
||||
"scope": "str",
|
||||
},
|
||||
},
|
||||
"database": "str",
|
||||
"host": "str",
|
||||
"batching": {"latencySeconds": 0, "maxMessages": 0},
|
||||
},
|
||||
"dataLakeStorageSettings": {
|
||||
"authentication": {
|
||||
"method": "str",
|
||||
"accessTokenSettings": {"secretRef": "str"},
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "str"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "str",
|
||||
"tenantId": "str",
|
||||
"scope": "str",
|
||||
},
|
||||
},
|
||||
"host": "str",
|
||||
"batching": {"latencySeconds": 0, "maxMessages": 0},
|
||||
},
|
||||
"fabricOneLakeSettings": {
|
||||
"authentication": {
|
||||
"method": "str",
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "str"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "str",
|
||||
"tenantId": "str",
|
||||
"scope": "str",
|
||||
},
|
||||
},
|
||||
"host": "str",
|
||||
"names": {"lakehouseName": "str", "workspaceName": "str"},
|
||||
"oneLakePathType": "str",
|
||||
"batching": {"latencySeconds": 0, "maxMessages": 0},
|
||||
},
|
||||
"kafkaSettings": {
|
||||
"authentication": {
|
||||
"method": "str",
|
||||
"saslSettings": {"saslType": "str", "secretRef": "str"},
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "str"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "str",
|
||||
"tenantId": "str",
|
||||
"scope": "str",
|
||||
},
|
||||
"x509CertificateSettings": {"secretRef": "str"},
|
||||
},
|
||||
"host": "str",
|
||||
"batching": {"latencyMs": 0, "maxBytes": 0, "maxMessages": 0, "mode": "str"},
|
||||
"cloudEventAttributes": "str",
|
||||
"compression": "str",
|
||||
"consumerGroupId": "str",
|
||||
"copyMqttProperties": "str",
|
||||
"kafkaAcks": "str",
|
||||
"partitionStrategy": "str",
|
||||
"tls": {"mode": "str", "trustedCaCertificateConfigMapRef": "str"},
|
||||
},
|
||||
"localStorageSettings": {"persistentVolumeClaimRef": "str"},
|
||||
"mqttSettings": {
|
||||
"authentication": {
|
||||
"method": "str",
|
||||
"serviceAccountTokenSettings": {"audience": "str"},
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "str"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "str",
|
||||
"tenantId": "str",
|
||||
"scope": "str",
|
||||
},
|
||||
"x509CertificateSettings": {"secretRef": "str"},
|
||||
},
|
||||
"clientIdPrefix": "str",
|
||||
"cloudEventAttributes": "str",
|
||||
"host": "str",
|
||||
"keepAliveSeconds": 0,
|
||||
"maxInflightMessages": 0,
|
||||
"protocol": "str",
|
||||
"qos": 0,
|
||||
"retain": "str",
|
||||
"sessionExpirySeconds": 0,
|
||||
"tls": {"mode": "str", "trustedCaCertificateConfigMapRef": "str"},
|
||||
},
|
||||
"provisioningState": "str",
|
||||
},
|
||||
"systemData": {
|
||||
"createdAt": "2020-02-20 00:00:00",
|
||||
"createdBy": "str",
|
||||
"createdByType": "str",
|
||||
"lastModifiedAt": "2020-02-20 00:00:00",
|
||||
"lastModifiedBy": "str",
|
||||
"lastModifiedByType": "str",
|
||||
},
|
||||
"type": "str",
|
||||
},
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_dataflow_endpoint_begin_delete(self, resource_group):
|
||||
response = self.client.dataflow_endpoint.begin_delete(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
dataflow_endpoint_name="str",
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy
|
||||
def test_dataflow_endpoint_list_by_resource_group(self, resource_group):
|
||||
response = self.client.dataflow_endpoint.list_by_resource_group(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
)
|
||||
result = [r for r in response]
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
|
@ -0,0 +1,178 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
# Code generated by Microsoft (R) Python Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
import pytest
|
||||
from azure.mgmt.iotoperations.aio import IoTOperationsMgmtClient
|
||||
|
||||
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
|
||||
from devtools_testutils.aio import recorded_by_proxy_async
|
||||
|
||||
AZURE_LOCATION = "eastus"
|
||||
|
||||
|
||||
@pytest.mark.skip("you may need to update the auto-generated test case before run it")
|
||||
class TestIoTOperationsMgmtDataflowEndpointOperationsAsync(AzureMgmtRecordedTestCase):
|
||||
def setup_method(self, method):
|
||||
self.client = self.create_mgmt_client(IoTOperationsMgmtClient, is_async=True)
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_dataflow_endpoint_get(self, resource_group):
|
||||
response = await self.client.dataflow_endpoint.get(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
dataflow_endpoint_name="str",
|
||||
)
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_dataflow_endpoint_begin_create_or_update(self, resource_group):
|
||||
response = await (
|
||||
await self.client.dataflow_endpoint.begin_create_or_update(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
dataflow_endpoint_name="str",
|
||||
resource={
|
||||
"extendedLocation": {"name": "str", "type": "str"},
|
||||
"id": "str",
|
||||
"name": "str",
|
||||
"properties": {
|
||||
"endpointType": "str",
|
||||
"dataExplorerSettings": {
|
||||
"authentication": {
|
||||
"method": "str",
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "str"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "str",
|
||||
"tenantId": "str",
|
||||
"scope": "str",
|
||||
},
|
||||
},
|
||||
"database": "str",
|
||||
"host": "str",
|
||||
"batching": {"latencySeconds": 0, "maxMessages": 0},
|
||||
},
|
||||
"dataLakeStorageSettings": {
|
||||
"authentication": {
|
||||
"method": "str",
|
||||
"accessTokenSettings": {"secretRef": "str"},
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "str"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "str",
|
||||
"tenantId": "str",
|
||||
"scope": "str",
|
||||
},
|
||||
},
|
||||
"host": "str",
|
||||
"batching": {"latencySeconds": 0, "maxMessages": 0},
|
||||
},
|
||||
"fabricOneLakeSettings": {
|
||||
"authentication": {
|
||||
"method": "str",
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "str"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "str",
|
||||
"tenantId": "str",
|
||||
"scope": "str",
|
||||
},
|
||||
},
|
||||
"host": "str",
|
||||
"names": {"lakehouseName": "str", "workspaceName": "str"},
|
||||
"oneLakePathType": "str",
|
||||
"batching": {"latencySeconds": 0, "maxMessages": 0},
|
||||
},
|
||||
"kafkaSettings": {
|
||||
"authentication": {
|
||||
"method": "str",
|
||||
"saslSettings": {"saslType": "str", "secretRef": "str"},
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "str"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "str",
|
||||
"tenantId": "str",
|
||||
"scope": "str",
|
||||
},
|
||||
"x509CertificateSettings": {"secretRef": "str"},
|
||||
},
|
||||
"host": "str",
|
||||
"batching": {"latencyMs": 0, "maxBytes": 0, "maxMessages": 0, "mode": "str"},
|
||||
"cloudEventAttributes": "str",
|
||||
"compression": "str",
|
||||
"consumerGroupId": "str",
|
||||
"copyMqttProperties": "str",
|
||||
"kafkaAcks": "str",
|
||||
"partitionStrategy": "str",
|
||||
"tls": {"mode": "str", "trustedCaCertificateConfigMapRef": "str"},
|
||||
},
|
||||
"localStorageSettings": {"persistentVolumeClaimRef": "str"},
|
||||
"mqttSettings": {
|
||||
"authentication": {
|
||||
"method": "str",
|
||||
"serviceAccountTokenSettings": {"audience": "str"},
|
||||
"systemAssignedManagedIdentitySettings": {"audience": "str"},
|
||||
"userAssignedManagedIdentitySettings": {
|
||||
"clientId": "str",
|
||||
"tenantId": "str",
|
||||
"scope": "str",
|
||||
},
|
||||
"x509CertificateSettings": {"secretRef": "str"},
|
||||
},
|
||||
"clientIdPrefix": "str",
|
||||
"cloudEventAttributes": "str",
|
||||
"host": "str",
|
||||
"keepAliveSeconds": 0,
|
||||
"maxInflightMessages": 0,
|
||||
"protocol": "str",
|
||||
"qos": 0,
|
||||
"retain": "str",
|
||||
"sessionExpirySeconds": 0,
|
||||
"tls": {"mode": "str", "trustedCaCertificateConfigMapRef": "str"},
|
||||
},
|
||||
"provisioningState": "str",
|
||||
},
|
||||
"systemData": {
|
||||
"createdAt": "2020-02-20 00:00:00",
|
||||
"createdBy": "str",
|
||||
"createdByType": "str",
|
||||
"lastModifiedAt": "2020-02-20 00:00:00",
|
||||
"lastModifiedBy": "str",
|
||||
"lastModifiedByType": "str",
|
||||
},
|
||||
"type": "str",
|
||||
},
|
||||
)
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_dataflow_endpoint_begin_delete(self, resource_group):
|
||||
response = await (
|
||||
await self.client.dataflow_endpoint.begin_delete(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
dataflow_endpoint_name="str",
|
||||
)
|
||||
).result() # call '.result()' to poll until service return final result
|
||||
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
||||
|
||||
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
|
||||
@recorded_by_proxy_async
|
||||
async def test_dataflow_endpoint_list_by_resource_group(self, resource_group):
|
||||
response = self.client.dataflow_endpoint.list_by_resource_group(
|
||||
resource_group_name=resource_group.name,
|
||||
instance_name="str",
|
||||
)
|
||||
result = [r async for r in response]
|
||||
# please add some check logic here by yourself
|
||||
# ...
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче