Skip to content

Commit 12441c2

Browse files
committed
[Monitor Ingestion] Add typespec generation files
Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
1 parent 824cc36 commit 12441c2

28 files changed

+1437
-247
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
recursive-include tests *.py
2-
recursive-include samples *.py
31
include *.md
42
include LICENSE
3+
include azure/monitor/ingestion/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
56
include azure/__init__.py
67
include azure/monitor/__init__.py
7-
include azure/monitor/ingestion/py.typed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"apiVersion": "2023-01-01"
3+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"CrossLanguagePackageId": "LogsIngestion",
3+
"CrossLanguageDefinitionId": {}
4+
}

sdk/monitor/azure-monitor-ingestion/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/monitor/azure-monitor-ingestion",
5-
"Tag": "python/monitor/azure-monitor-ingestion_12276a5674"
5+
"Tag": "python/monitor/azure-monitor-ingestion_fd63ae0a28"
66
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore

sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88
# pylint: disable=wrong-import-position
@@ -13,6 +13,9 @@
1313
from ._patch import * # pylint: disable=unused-wildcard-import
1414

1515
from ._client import LogsIngestionClient # type: ignore
16+
from ._version import VERSION
17+
18+
__version__ = VERSION
1619

1720
try:
1821
from ._patch import __all__ as _patch_all

sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/_client.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

@@ -16,28 +16,30 @@
1616

1717
from ._configuration import LogsIngestionClientConfiguration
1818
from ._operations import LogsIngestionClientOperationsMixin
19-
from ._serialization import Deserializer, Serializer
19+
from ._utils.serialization import Deserializer, Serializer
2020

2121
if TYPE_CHECKING:
2222
from azure.core.credentials import TokenCredential
2323

2424

2525
class LogsIngestionClient(LogsIngestionClientOperationsMixin):
26-
"""Azure Monitor Data Collection Python Client.
26+
"""Azure Monitor data collection client.
2727
28-
:param endpoint: The Data Collection Endpoint for the Data Collection Rule, for example
29-
https://dce-name.eastus-2.ingest.monitor.azure.com. Required.
28+
:param endpoint: The Data Collection Endpoint for the Data Collection Rule. For example,
29+
`https://dce-name.eastus-2.ingest.monitor.azure.com
30+
<https://dce-name.eastus-2.ingest.monitor.azure.com>`_. Required.
3031
:type endpoint: str
31-
:param credential: Credential needed for the client to connect to Azure. Required.
32+
:param credential: Credential used to authenticate requests to the service. Required.
3233
:type credential: ~azure.core.credentials.TokenCredential
33-
:keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this
34-
default value may result in unsupported behavior.
34+
:keyword api_version: The API version to use for this operation. Default value is "2023-01-01".
35+
Note that overriding this default value may result in unsupported behavior.
3536
:paramtype api_version: str
3637
"""
3738

3839
def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None:
3940
_endpoint = "{endpoint}"
4041
self._config = LogsIngestionClientConfiguration(endpoint=endpoint, credential=credential, **kwargs)
42+
4143
_policies = kwargs.pop("policies", None)
4244
if _policies is None:
4345
_policies = [

sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/_configuration.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,34 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

99
from typing import Any, TYPE_CHECKING
1010

1111
from azure.core.pipeline import policies
1212

13+
from ._version import VERSION
14+
1315
if TYPE_CHECKING:
1416
from azure.core.credentials import TokenCredential
1517

16-
VERSION = "unknown"
17-
1818

1919
class LogsIngestionClientConfiguration: # pylint: disable=too-many-instance-attributes
2020
"""Configuration for LogsIngestionClient.
2121
2222
Note that all parameters used to create this instance are saved as instance
2323
attributes.
2424
25-
:param endpoint: The Data Collection Endpoint for the Data Collection Rule, for example
26-
https://dce-name.eastus-2.ingest.monitor.azure.com. Required.
25+
:param endpoint: The Data Collection Endpoint for the Data Collection Rule. For example,
26+
`https://dce-name.eastus-2.ingest.monitor.azure.com
27+
<https://dce-name.eastus-2.ingest.monitor.azure.com>`_. Required.
2728
:type endpoint: str
28-
:param credential: Credential needed for the client to connect to Azure. Required.
29+
:param credential: Credential used to authenticate requests to the service. Required.
2930
:type credential: ~azure.core.credentials.TokenCredential
30-
:keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this
31-
default value may result in unsupported behavior.
31+
:keyword api_version: The API version to use for this operation. Default value is "2023-01-01".
32+
Note that overriding this default value may result in unsupported behavior.
3233
:paramtype api_version: str
3334
"""
3435

@@ -43,7 +44,7 @@ def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any)
4344
self.endpoint = endpoint
4445
self.credential = credential
4546
self.api_version = api_version
46-
self.credential_scopes = kwargs.pop("credential_scopes", ["https://monitor.azure.com//.default"])
47+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://monitor.azure.com/.default"])
4748
kwargs.setdefault("sdk_moniker", "monitor-ingestion/{}".format(VERSION))
4849
self.polling_interval = kwargs.get("polling_interval", 30)
4950
self._configure(**kwargs)

sdk/monitor/azure-monitor-ingestion/azure/monitor/ingestion/_operations/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88
# pylint: disable=wrong-import-position

0 commit comments

Comments
 (0)