Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sdk/monitor/azure-monitor-ingestion/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
recursive-include tests *.py
recursive-include samples *.py
include *.md
include LICENSE
include azure/__init__.py
include azure/monitor/__init__.py
include azure/monitor/ingestion/py.typed
recursive-include tests *.py
recursive-include samples *.py *.md
include azure/__init__.py
include azure/monitor/__init__.py
6 changes: 6 additions & 0 deletions sdk/monitor/azure-monitor-ingestion/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"commit": "20b8ba31ffb3814d9001ad9618dc48bf3def925d",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/monitor/Ingestion",
"@azure-tools/typespec-python": "0.36.1"
}
2 changes: 1 addition & 1 deletion sdk/monitor/azure-monitor-ingestion/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,31 @@
# --------------------------------------------------------------------------
# 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) AutoRest Code Generator.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._patch import LogsIngestionClient
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._patch import LogsUploadError
from ._client import LogsIngestionClient # type: ignore
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"LogsUploadError",
"LogsIngestionClient",
]

__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
# --------------------------------------------------------------------------
# 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) AutoRest Code Generator.
# 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 import PipelineClient
from azure.core.pipeline import policies
Expand All @@ -18,20 +19,18 @@
from ._serialization import Deserializer, Serializer

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class LogsIngestionClient(LogsIngestionClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword
"""Azure Monitor Data Collection Python Client.
class LogsIngestionClient(LogsIngestionClientOperationsMixin):
"""Azure Monitor data collection client.

:param endpoint: The Data Collection Endpoint for the Data Collection Rule, for example
https://dce-name.eastus-2.ingest.monitor.azure.com. Required.
:param endpoint: Required.
:type endpoint: str
:param credential: Credential needed for the client to connect to Azure. Required.
:param credential: Credential used to authenticate requests to the service. Required.
:type credential: ~azure.core.credentials.TokenCredential
:keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: The API version to use for this operation. Default value is "2023-01-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

Expand Down Expand Up @@ -90,7 +89,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "LogsIngestionClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,32 @@
# --------------------------------------------------------------------------
# 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) AutoRest Code Generator.
# 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 ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential

VERSION = "unknown"


class LogsIngestionClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class LogsIngestionClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for LogsIngestionClient.

Note that all parameters used to create this instance are saved as instance
attributes.

:param endpoint: The Data Collection Endpoint for the Data Collection Rule, for example
https://dce-name.eastus-2.ingest.monitor.azure.com. Required.
:param endpoint: Required.
:type endpoint: str
:param credential: Credential needed for the client to connect to Azure. Required.
:param credential: Credential used to authenticate requests to the service. Required.
:type credential: ~azure.core.credentials.TokenCredential
:keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: The API version to use for this operation. Default value is "2023-01-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

Expand All @@ -44,7 +42,7 @@ def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any)
self.endpoint = endpoint
self.credential = credential
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://monitor.azure.com//.default"])
self.credential_scopes = kwargs.pop("credential_scopes", ["https://monitor.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "monitor-ingestion/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)
Expand Down

This file was deleted.

Loading