Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ class RequestType:
class _RequestTracingContext: # pylint: disable=too-many-instance-attributes
"""
Encapsulates request tracing and telemetry configuration values.

:param load_balancing_enabled: Whether load balancing is enabled for the request.
:type load_balancing_enabled: bool
"""

def __init__(self, load_balancing_enabled: bool = False) -> None:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apiMdSha256: eb4b6ccaf75b4570f0f8afa8bc5d28aa5c1dc3100042053b39f4026b36c34dac
parserVersion: 0.3.28
parserVersion: 0.3.30
pythonVersion: 3.14.3
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class AudienceErrorHandlingPolicy(SansIOHTTPPolicy):
"""
A policy to handle audience-related authentication errors for Azure App Configuration.
Raises a ClientAuthenticationError with a helpful message if the audience is missing or incorrect.

:param has_audience: Indicates if the expected audience is set for the authentication token.
:type has_audience: bool
"""

def __init__(self, has_audience: bool = False):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@


class AppConfigRequestsCredentialsPolicy(HTTPPolicy):
"""Implementation of request-oauthlib except and retry logic."""
"""A policy that signs App Configuration requests using HMAC authentication.

:param credential: The credential used to authenticate requests.
:type credential: ~azure.core.credentials.AzureKeyCredential
:param endpoint: The App Configuration endpoint.
:type endpoint: str
:param id_credential: The credential ID used for HMAC authentication.
:type id_credential: str
"""

def __init__(self, credential: AzureKeyCredential, endpoint: str, id_credential: str):
super(AppConfigRequestsCredentialsPolicy, self).__init__()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,19 @@ def _to_generated(self) -> KeyValue:


class FeatureFlagConfigurationSetting(ConfigurationSetting): # pylint: disable=too-many-instance-attributes
"""A configuration setting that stores a feature flag value."""
"""A configuration setting that stores a feature flag value.

:param feature_id: The identity of the configuration setting.
:type feature_id: str
:keyword enabled: The value indicating whether the feature flag is enabled.
A feature is OFF if enabled is false. If enabled is true, then the feature flag is evaluated
against its conditions to determine its state. Default value of this property is False.
:paramtype enabled: bool
:keyword filters: Filters that run on the client to determine whether the feature is enabled.
By default (requirement type "Any"), the feature is considered enabled if at least one filter
evaluates to true. With requirement type "All", every filter must evaluate to true.
:paramtype filters: list[dict[str, Any]] or None
"""

etag: str
"""A value representing the current state of the resource."""
Expand All @@ -132,10 +144,12 @@ class FeatureFlagConfigurationSetting(ConfigurationSetting): # pylint: disable=
"""The key of the configuration setting."""
enabled: bool
"""The value indicating whether the feature flag is enabled. A feature is OFF if enabled is false.
If enabled is true, then the feature is ON if there are no conditions or if all conditions are satisfied."""
If enabled is true, then the feature flag is evaluated against its conditions/filters to determine
its state."""
filters: Optional[List[Dict[str, Any]]]
"""Filters that must run on the client and be evaluated as true for the feature
to be considered enabled."""
"""Filters that run on the client to determine whether the feature is enabled. By default
(requirement type "Any"), the feature is considered enabled if at least one filter evaluates
to true. With requirement type "All", every filter must evaluate to true."""
label: str
"""The label used to group this configuration setting with others."""
display_name: str
Expand Down Expand Up @@ -177,11 +191,12 @@ def __init__( # pylint: disable=super-init-not-called
:param feature_id: The identity of the configuration setting.
:type feature_id: str
:keyword enabled: The value indicating whether the feature flag is enabled.
A feature is OFF if enabled is false. If enabled is true, then the feature is ON
if there are no conditions or if all conditions are satisfied. Default value of this property is False.
A feature is OFF if enabled is false. If enabled is true, then the feature flag is evaluated
against its conditions/filters to determine its state. Default value of this property is False.
:paramtype enabled: bool
:keyword filters: Filters that must run on the client and be evaluated as true for the feature
to be considered enabled.
:keyword filters: Filters that run on the client to determine whether the feature is enabled.
By default (requirement type "Any"), the feature is considered enabled if at least one filter
evaluates to true. With requirement type "All", every filter must evaluate to true.
:paramtype filters: list[dict[str, Any]] or None
"""
if "value" in kwargs:
Expand Down Expand Up @@ -289,7 +304,13 @@ def _to_generated(self) -> KeyValue:


class SecretReferenceConfigurationSetting(ConfigurationSetting):
"""A configuration value that references a configuration setting secret."""
"""A configuration value that references a configuration setting secret.

:param key: The key of the configuration setting.
:type key: str
:param secret_id: The URI of the secret referenced by this configuration setting.
:type secret_id: str
"""

etag: str
"""A value representing the current state of the resource."""
Expand Down Expand Up @@ -405,7 +426,15 @@ def _to_generated(self) -> KeyValue:


class ConfigurationSettingsFilter:
"""Enables filtering of configuration settings."""
"""Enables filtering of configuration settings.

:keyword key: Filters configuration settings by their key field. Required.
:paramtype key: str
:keyword label: Filters configuration settings by their label field.
:paramtype label: str or None
:keyword tags: Filters key-values by their tags field.
:paramtype tags: list[str] or None
"""

key: str
"""Filters configuration settings by their key field. Required."""
Expand All @@ -429,7 +458,25 @@ def __init__(self, *, key: str, label: Optional[str] = None, tags: Optional[List


class ConfigurationSnapshot: # pylint: disable=too-many-instance-attributes
"""A point-in-time snapshot of configuration settings."""
"""A point-in-time snapshot of configuration settings.

:param filters: A list of filters used to filter the key-values included in the configuration snapshot.
Required.
:type filters: list[~azure.appconfiguration.ConfigurationSettingsFilter]
:keyword composition_type: The composition type describes how the key-values within the configuration
snapshot are composed. The 'key' composition type ensures there are no two key-values
containing the same key. The 'key_label' composition type ensures there are no two key-values
containing the same key and label. Known values are: "key" and "key_label".
:paramtype composition_type: str or None
:keyword retention_period: The amount of time, in seconds, that a configuration snapshot will remain in the
archived state before expiring. This property is only writable during the creation of a configuration
snapshot. If not specified, the default lifetime of key-value revisions will be used.
:paramtype retention_period: int or None
:keyword tags: The tags of the configuration snapshot.
:paramtype tags: dict[str, str] or None
:keyword description: The description of the configuration snapshot.
:paramtype description: str or None
"""

name: Optional[str]
"""The name of the configuration snapshot."""
Expand Down Expand Up @@ -584,7 +631,11 @@ def _to_generated(self) -> GeneratedConfigurationSnapshot:


class ConfigurationSettingLabel:
"""The label info of a configuration setting."""
"""The label info of a configuration setting.

:keyword name: The configuration setting label name.
:paramtype name: str or None
"""

name: Optional[str]
"""The name of the ConfigurationSetting label."""
Expand All @@ -602,7 +653,11 @@ def _return_deserialized_and_headers(_, deserialized, response_headers):


class ConfigurationSettingPropertiesPagedBase: # pylint:disable=too-many-instance-attributes
"""Base class for iterable of ConfigurationSetting properties."""
"""Base class for iterable of ConfigurationSetting properties.

:param command: The command to execute for pagination.
:type command: Callable
"""

etag: str
"""The current etag"""
Expand Down Expand Up @@ -672,7 +727,11 @@ def _extract_data_cb_base(self, get_next_return) -> tuple:
class ConfigurationSettingPropertiesPaged(
ConfigurationSettingPropertiesPagedBase, PageIterator
): # pylint:disable=too-many-instance-attributes
"""An iterable of ConfigurationSetting properties."""
"""An iterable of ConfigurationSetting properties.

:param command: The command to execute for pagination.
:type command: Callable
"""

def __init__(self, command: Callable, **kwargs: Any):
super().__init__(command, **kwargs)
Expand Down Expand Up @@ -733,7 +792,11 @@ def __next__(self) -> Iterator[ReturnType]:
class ConfigurationSettingPropertiesPagedAsync(
ConfigurationSettingPropertiesPagedBase, AsyncPageIterator
): # pylint:disable=too-many-instance-attributes
"""An iterable of ConfigurationSetting properties."""
"""An iterable of ConfigurationSetting properties.

:param command: The command to execute for pagination.
:type command: Callable
"""

def __init__(self, command: Callable, **kwargs: Any):
ConfigurationSettingPropertiesPagedBase.__init__(self, command, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ def from_sync_token_string(cls, sync_token):


class SyncTokenPolicy(SansIOHTTPPolicy):
"""A simple policy that enable the given callback with the response.

:keyword callback raw_response_hook: Callback function. Will be invoked on response.
"""
"""A policy that applies and updates App Configuration sync tokens."""

def __init__(self, **kwargs: Any) -> None: # pylint: disable=unused-argument
self._sync_token_header = "Sync-Token"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@


class AsyncSyncTokenPolicy(SansIOHTTPPolicy):
"""A simple policy that enable the given callback with the response.

:keyword callback raw_response_hook: Callback function. Will be invoked on response.
"""
"""A policy that applies and updates App Configuration sync tokens asynchronously."""

def __init__(self, **kwargs: Any) -> None: # pylint: disable=unused-argument
self._sync_token_header = "Sync-Token"
Expand Down
Loading