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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History

## 3.2.0 (2025-04-25)

### Features Added

- Model FluxConfiguration has a new parameter oci_repository
- Model FluxConfigurationPatch has a new parameter oci_repository

## 3.1.0 (2023-09-21)

### Features Added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure Kubernetes Configuration Management Client Library.
This package has been tested with Python 3.7+.
This package has been tested with Python 3.9+.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

## _Disclaimer_
Expand All @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For

### Prerequisites

- Python 3.7+ is required to use this package.
- Python 3.9+ is required to use this package.
- [Azure subscription](https://azure.microsoft.com/free/)

### Install the package
Expand All @@ -24,7 +24,7 @@ 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.
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
Expand Down Expand Up @@ -59,6 +59,3 @@ Code samples for this package can be found at:
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.



Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"commit": "1e8766756bb5c13fa573b0a33ab7d9438837c380",
"commit": "e517d34004754bf10cc9f7ec8e02ac7bcfbbaf22",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
"@autorest/python@6.34.1",
"@autorest/modelerfour@4.27.0"
],
"autorest_command": "autorest specification/kubernetesconfiguration/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"autorest_command": "autorest specification/kubernetesconfiguration/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.34.1 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/kubernetesconfiguration/resource-manager/readme.md",
"package-2023-05": "2023-05-16 19:49:17 -0700 433f115ecea40137ec80dfc0217582ccc52bbd37 Microsoft.KubernetesConfiguration/stable/2023-05-01/operations.json",
"package-2022-11": "2022-11-11 23:31:05 -0800 d11245bcaa06b6d87db179c903ba4b049adf1bf2 Microsoft.KubernetesConfiguration/stable/2022-11-01/operations.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# --------------------------------------------------------------------------
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

Expand All @@ -20,7 +19,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential

class SourceControlConfigurationClientConfiguration(Configuration):
class SourceControlConfigurationClientConfiguration:
"""Configuration for SourceControlConfigurationClient.

Note that all parameters used to create this instance are saved as instance
Expand All @@ -42,12 +41,12 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(SourceControlConfigurationClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-kubernetesconfiguration/{}'.format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,27 @@
# regenerated.
# --------------------------------------------------------------------------

from typing import Any, Optional, TYPE_CHECKING
from typing import Any, Optional, TYPE_CHECKING, cast
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.settings import settings
from azure.mgmt.core import ARMPipelineClient
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
from azure.mgmt.core.tools import get_arm_endpoints
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin

from ._configuration import SourceControlConfigurationClientConfiguration
from ._serialization import Deserializer, Serializer
from ._utils.serialization import Deserializer, Serializer

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

class _SDKClient(object):
def __init__(self, *args, **kwargs):
"""This is a fake class to support current implemetation of MultiApiClientMixin."
"""This is a fake class to support current implementation of MultiApiClientMixin."
Will be removed in final version of multiapi azure-core based client
"""
pass
Expand Down Expand Up @@ -74,14 +79,37 @@ def __init__(
credential: "TokenCredential",
subscription_id: str,
api_version: Optional[str]=None,
base_url: str = "https://management.azure.com",
base_url: Optional[str] = None,
profile: KnownProfiles=KnownProfiles.default,
**kwargs: Any
):
if api_version:
kwargs.setdefault('api_version', api_version)
self._config = SourceControlConfigurationClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
_endpoints = get_arm_endpoints(_cloud)
if not base_url:
base_url = _endpoints["resource_manager"]
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
self._config = SourceControlConfigurationClientConfiguration(credential, subscription_id, credential_scopes=credential_scopes, **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=cast(str, base_url), policies=_policies, **kwargs)
super(SourceControlConfigurationClient, self).__init__(
api_version=api_version,
profile=profile
Expand All @@ -108,6 +136,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2022-07-01: :mod:`v2022_07_01.models<azure.mgmt.kubernetesconfiguration.v2022_07_01.models>`
* 2022-11-01: :mod:`v2022_11_01.models<azure.mgmt.kubernetesconfiguration.v2022_11_01.models>`
* 2023-05-01: :mod:`v2023_05_01.models<azure.mgmt.kubernetesconfiguration.v2023_05_01.models>`
* 2024-04-01-preview: :mod:`v2024_04_01_preview.models<azure.mgmt.kubernetesconfiguration.v2024_04_01_preview.models>`
"""
if api_version == '2020-07-01-preview':
from .v2020_07_01_preview import models
Expand Down Expand Up @@ -148,6 +177,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2023-05-01':
from .v2023_05_01 import models
return models
elif api_version == '2024-04-01-preview':
from .v2024_04_01_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -270,6 +302,7 @@ def flux_config_operation_status(self):
* 2022-07-01: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.operations.FluxConfigOperationStatusOperations>`
* 2022-11-01: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.operations.FluxConfigOperationStatusOperations>`
* 2023-05-01: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.operations.FluxConfigOperationStatusOperations>`
* 2024-04-01-preview: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2024_04_01_preview.operations.FluxConfigOperationStatusOperations>`
"""
api_version = self._get_api_version('flux_config_operation_status')
if api_version == '2021-11-01-preview':
Expand All @@ -284,6 +317,8 @@ def flux_config_operation_status(self):
from .v2022_11_01.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2023-05-01':
from .v2023_05_01.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2024-04-01-preview':
from .v2024_04_01_preview.operations import FluxConfigOperationStatusOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'flux_config_operation_status'".format(api_version))
self._config.api_version = api_version
Expand All @@ -299,6 +334,7 @@ def flux_configurations(self):
* 2022-07-01: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.operations.FluxConfigurationsOperations>`
* 2022-11-01: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.operations.FluxConfigurationsOperations>`
* 2023-05-01: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.operations.FluxConfigurationsOperations>`
* 2024-04-01-preview: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2024_04_01_preview.operations.FluxConfigurationsOperations>`
"""
api_version = self._get_api_version('flux_configurations')
if api_version == '2021-11-01-preview':
Expand All @@ -313,6 +349,8 @@ def flux_configurations(self):
from .v2022_11_01.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2023-05-01':
from .v2023_05_01.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2024-04-01-preview':
from .v2024_04_01_preview.operations import FluxConfigurationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'flux_configurations'".format(api_version))
self._config.api_version = api_version
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 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) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
Loading