Skip to content
Open
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 @@ -656,6 +656,13 @@ def list_labels(
:return: An iterator of labels.
:rtype: ~azure.core.paging.ItemPaged[~azure.appconfiguration.ConfigurationSettingLabel]
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

for label in client.list_labels():
print(label)
"""
if isinstance(accept_datetime, datetime):
accept_datetime = str(accept_datetime)
Expand Down Expand Up @@ -705,6 +712,17 @@ def begin_create_snapshot(
operation to complete and get the created snapshot.
:rtype: ~azure.core.polling.LROPoller[~azure.appconfiguration.ConfigurationSnapshot]
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

from azure.appconfiguration import ConfigurationSettingsFilter

filters = [ConfigurationSettingsFilter(key="my_key", label="my_label")]
response = client.begin_create_snapshot(name="my_snapshot", filters=filters)
created_snapshot = response.result()
print(created_snapshot)
"""
snapshot = ConfigurationSnapshot(
filters=filters,
Expand Down Expand Up @@ -741,6 +759,13 @@ def archive_snapshot(
:return: The ConfigurationSnapshot returned from the service.
:rtype: ~azure.appconfiguration.ConfigurationSnapshot
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

archived_snapshot = client.archive_snapshot(name="my_snapshot")
print(archived_snapshot.status)
"""
generated_snapshot = self._impl._update_snapshot(
name=name,
Expand Down Expand Up @@ -771,6 +796,13 @@ def recover_snapshot(
:return: The ConfigurationSnapshot returned from the service.
:rtype: ~azure.appconfiguration.ConfigurationSnapshot
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

recovered_snapshot = client.recover_snapshot(name="my_snapshot")
print(recovered_snapshot.status)
"""
generated_snapshot = self._impl._update_snapshot(
name=name,
Expand All @@ -795,6 +827,13 @@ def get_snapshot(
:return: The ConfigurationSnapshot returned from the service.
:rtype: ~azure.appconfiguration.ConfigurationSnapshot
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

received_snapshot = client.get_snapshot(name="my_snapshot")
print(received_snapshot)
"""
generated_snapshot = self._impl.get_snapshot(name=name, select=fields, **kwargs)
return ConfigurationSnapshot._from_generated(generated_snapshot)
Expand Down Expand Up @@ -822,6 +861,13 @@ def list_snapshots(
:return: An iterator of :class:`~azure.appconfiguration.ConfigurationSnapshot`
:rtype: ~azure.core.paging.ItemPaged[~azure.appconfiguration.ConfigurationSnapshot]
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

for snapshot in client.list_snapshots():
print(snapshot)
"""
return self._impl.get_snapshots( # type: ignore[return-value]
name=name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,13 @@ def list_labels(
:return: An async iterator of labels.
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.appconfiguration.ConfigurationSettingLabel]
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

async for label in client.list_labels():
print(label)
"""
if isinstance(accept_datetime, datetime):
accept_datetime = str(accept_datetime)
Expand Down Expand Up @@ -718,6 +725,17 @@ async def begin_create_snapshot(
operation to complete and get the created snapshot.
:rtype: ~azure.core.polling.LROPoller[~azure.appconfiguration.ConfigurationSnapshot]
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

from azure.appconfiguration import ConfigurationSettingsFilter

filters = [ConfigurationSettingsFilter(key="my_key", label="my_label")]
response = await client.begin_create_snapshot(name="my_snapshot", filters=filters)
created_snapshot = await response.result()
print(created_snapshot)
"""
snapshot = ConfigurationSnapshot(
filters=filters,
Expand Down Expand Up @@ -754,6 +772,13 @@ async def archive_snapshot(
:return: The ConfigurationSnapshot returned from the service.
:rtype: ~azure.appconfiguration.ConfigurationSnapshot
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

archived_snapshot = await client.archive_snapshot(name="my_snapshot")
print(archived_snapshot.status)
"""
generated_snapshot = await self._impl._update_snapshot(
name=name,
Expand Down Expand Up @@ -784,6 +809,13 @@ async def recover_snapshot(
:return: The ConfigurationSnapshot returned from the service.
:rtype: ~azure.appconfiguration.ConfigurationSnapshot
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

recovered_snapshot = await client.recover_snapshot(name="my_snapshot")
print(recovered_snapshot.status)
"""
generated_snapshot = await self._impl._update_snapshot(
name=name,
Expand All @@ -808,6 +840,13 @@ async def get_snapshot(
:return: The ConfigurationSnapshot returned from the service.
:rtype: ~azure.appconfiguration.ConfigurationSnapshot
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

received_snapshot = await client.get_snapshot(name="my_snapshot")
print(received_snapshot)
"""
generated_snapshot = await self._impl.get_snapshot(name=name, select=fields, **kwargs)
return ConfigurationSnapshot._from_generated(generated_snapshot)
Expand Down Expand Up @@ -835,6 +874,13 @@ def list_snapshots(
:return: An iterator of :class:`~azure.appconfiguration.ConfigurationSnapshot`
:rtype: ~azure.core.paging.ItemPaged[~azure.appconfiguration.ConfigurationSnapshot]
:raises: :class:`~azure.core.exceptions.HttpResponseError`

Example

.. code-block:: python

async for snapshot in client.list_snapshots():
print(snapshot)
"""
return self._impl.get_snapshots( # type: ignore[return-value]
name=name,
Expand Down
Loading