[Automation] Collect examples from azure-sdk-for-python#azure-mgmt-appconfiguration_3.1.0

This commit is contained in:
Azure SDK Bot 2024-10-22 04:03:18 -07:00 коммит произвёл GitHub
Родитель 2bdfce5b3f
Коммит 76000f122e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
72 изменённых файлов: 1321 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,36 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python check_name_available.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.operations.check_name_availability(
check_name_availability_parameters={
"name": "contoso",
"type": "Microsoft.AppConfiguration/configurationStores",
},
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/CheckNameAvailable.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,36 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python check_name_not_available.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.operations.check_name_availability(
check_name_availability_parameters={
"name": "contoso",
"type": "Microsoft.AppConfiguration/configurationStores",
},
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/CheckNameNotAvailable.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,39 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_create.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.begin_create(
resource_group_name="myResourceGroup",
config_store_name="contoso",
config_store_creation_parameters={
"location": "westus",
"sku": {"name": "Standard"},
"tags": {"myTag": "myTagValue"},
},
).result()
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreate.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_create_key_value.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.key_values.create_or_update(
resource_group_name="myResourceGroup",
config_store_name="contoso",
key_value_name="myKey$myLabel",
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateKeyValue.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,36 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_create_replica.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.replicas.begin_create(
resource_group_name="myResourceGroup",
config_store_name="contoso",
replica_name="myReplicaEus",
replica_creation_parameters={"location": "eastus"},
).result()
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateReplica.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,36 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_create_snapshot.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.snapshots.begin_create(
resource_group_name="myResourceGroup",
config_store_name="contoso",
snapshot_name="mySnapshot",
body={"properties": {"filters": [{"key": "app1/*", "label": "Production"}], "retentionPeriod": 3600}},
).result()
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateSnapshot.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,41 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_create_with_data_plane_proxy.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.begin_create(
resource_group_name="myResourceGroup",
config_store_name="contoso",
config_store_creation_parameters={
"location": "westus",
"properties": {
"dataPlaneProxy": {"authenticationMode": "Pass-through", "privateLinkDelegation": "Enabled"}
},
"sku": {"name": "Standard"},
},
).result()
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithDataPlaneProxy.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,45 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_create_with_identity.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.begin_create(
resource_group_name="myResourceGroup",
config_store_name="contoso",
config_store_creation_parameters={
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/c80fb759-c965-4c6a-9110-9b2b2d038882/resourcegroups/myResourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": {}
},
},
"location": "westus",
"sku": {"name": "Standard"},
"tags": {"myTag": "myTagValue"},
},
).result()
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithIdentity.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,39 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_create_with_local_auth_disabled.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.begin_create(
resource_group_name="myResourceGroup",
config_store_name="contoso",
config_store_creation_parameters={
"location": "westus",
"properties": {"disableLocalAuth": True},
"sku": {"name": "Standard"},
},
).result()
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithLocalAuthDisabled.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,33 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_delete.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
client.configuration_stores.begin_delete(
resource_group_name="myResourceGroup",
config_store_name="contoso",
).result()
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDelete.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,34 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_delete_key_value.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
client.key_values.begin_delete(
resource_group_name="myResourceGroup",
config_store_name="contoso",
key_value_name="myKey$myLabel",
).result()
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteKeyValue.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,34 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_delete_private_endpoint_connection.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
client.private_endpoint_connections.begin_delete(
resource_group_name="myResourceGroup",
config_store_name="contoso",
private_endpoint_connection_name="myConnection",
).result()
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeletePrivateEndpointConnection.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,34 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_delete_replica.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
client.replicas.begin_delete(
resource_group_name="myResourceGroup",
config_store_name="contoso",
replica_name="myReplicaEus",
).result()
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteReplica.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,34 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.get(
resource_group_name="myResourceGroup",
config_store_name="contoso",
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGet.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_get_key_value.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.key_values.get(
resource_group_name="myResourceGroup",
config_store_name="contoso",
key_value_name="myKey$myLabel",
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetKeyValue.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_get_private_endpoint_connection.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.private_endpoint_connections.get(
resource_group_name="myResourceGroup",
config_store_name="contoso",
private_endpoint_connection_name="myConnection",
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetPrivateEndpointConnection.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_get_replica.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.replicas.get(
resource_group_name="myResourceGroup",
config_store_name="contoso",
replica_name="myReplicaEus",
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetReplica.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_get_snapshot.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.snapshots.get(
resource_group_name="myResourceGroup",
config_store_name="contoso",
snapshot_name="mySnapshot",
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetSnapshot.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,32 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_list.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.list()
for item in response:
print(item)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresList.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,34 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_list_by_resource_group.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.list_by_resource_group(
resource_group_name="myResourceGroup",
)
for item in response:
print(item)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListByResourceGroup.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_list_keys.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.list_keys(
resource_group_name="myResourceGroup",
config_store_name="contoso",
)
for item in response:
print(item)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListKeys.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_list_private_endpoint_connections.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.private_endpoint_connections.list_by_configuration_store(
resource_group_name="myResourceGroup",
config_store_name="contoso",
)
for item in response:
print(item)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListPrivateEndpointConnections.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_list_replicas.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.replicas.list_by_configuration_store(
resource_group_name="myResourceGroup",
config_store_name="contoso",
)
for item in response:
print(item)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListReplicas.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_regenerate_key.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.regenerate_key(
resource_group_name="myResourceGroup",
config_store_name="contoso",
regenerate_key_parameters={"id": "439AD01B4BE67DB1"},
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresRegenerateKey.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_update.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.begin_update(
resource_group_name="myResourceGroup",
config_store_name="contoso",
config_store_update_parameters={"sku": {"name": "Standard"}, "tags": {"Category": "Marketing"}},
).result()
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdate.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_update_disable_local_auth.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.begin_update(
resource_group_name="myResourceGroup",
config_store_name="contoso",
config_store_update_parameters={"properties": {"disableLocalAuth": True}, "sku": {"name": "Standard"}},
).result()
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdateDisableLocalAuth.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,38 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_update_private_endpoint_connection.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.private_endpoint_connections.begin_create_or_update(
resource_group_name="myResourceGroup",
config_store_name="contoso",
private_endpoint_connection_name="myConnection",
private_endpoint_connection={
"properties": {"privateLinkServiceConnectionState": {"description": "Auto-Approved", "status": "Approved"}}
},
).result()
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdatePrivateEndpointConnection.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,44 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python configuration_stores_update_with_identity.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.begin_update(
resource_group_name="myResourceGroup",
config_store_name="contoso",
config_store_update_parameters={
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/c80fb759-c965-4c6a-9110-9b2b2d038882/resourcegroups/myResourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2": {}
},
},
"sku": {"name": "Standard"},
"tags": {"Category": "Marketing"},
},
).result()
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdateWithIdentity.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,34 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python deleted_configuration_stores_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.get_deleted(
location="westus",
config_store_name="contoso",
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresGet.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,32 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python deleted_configuration_stores_list.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.configuration_stores.list_deleted()
for item in response:
print(item)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresList.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,33 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python deleted_configuration_stores_purge.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
client.configuration_stores.begin_purge_deleted(
location="westus",
config_store_name="contoso",
).result()
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresPurge.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,32 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python operations_list.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.operations.list()
for item in response:
print(item)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/OperationsList.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python private_link_resource_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.private_link_resources.get(
resource_group_name="myResourceGroup",
config_store_name="contoso",
group_name="configurationStores",
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourceGet.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python private_link_resources_list_by_configuration_store.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.private_link_resources.list_by_configuration_store(
resource_group_name="myResourceGroup",
config_store_name="contoso",
)
for item in response:
print(item)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourcesListByConfigurationStore.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,37 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python regional_check_name_available.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.operations.regional_check_name_availability(
location="westus",
check_name_availability_parameters={
"name": "contoso",
"type": "Microsoft.AppConfiguration/configurationStores",
},
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/RegionalCheckNameAvailable.json
if __name__ == "__main__":
main()

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-appconfiguration_3.1.0/sdk/appconfiguration/azure-mgmt-appconfiguration/README.md"}

Просмотреть файл

@ -0,0 +1,37 @@
from azure.identity import DefaultAzureCredential
from azure.mgmt.appconfiguration import AppConfigurationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appconfiguration
# USAGE
python regional_check_name_not_available.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppConfigurationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="c80fb759-c965-4c6a-9110-9b2b2d038882",
)
response = client.operations.regional_check_name_availability(
location="westus",
check_name_availability_parameters={
"name": "contoso",
"type": "Microsoft.AppConfiguration/configurationStores",
},
)
print(response)
# x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/RegionalCheckNameNotAvailable.json
if __name__ == "__main__":
main()