[Automation] Collect examples from azure-sdk-for-python#azure-mgmt-mixedreality_1.1.0b1
Co-authored-by: azure-sdk <azuresdk@microsoft.com>
This commit is contained in:
Родитель
d3f87c03d2
Коммит
7ce5786b3b
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python delete_object_anchors_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.object_anchors_accounts.delete(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Delete.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python get_object_anchors_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.object_anchors_accounts.get(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Get.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python list_object_anchors_accounts_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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.object_anchors_accounts.list_by_resource_group(
|
||||
resource_group_name="MyResourceGroup",
|
||||
)
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/GetByResourceGroup.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,31 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python list_object_anchors_accounts_by_subscription.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.object_anchors_accounts.list_by_subscription()
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/GetBySubscription.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python list_object_anchors_account_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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.object_anchors_accounts.list_keys(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/ListKeys.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,38 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python update_object_anchors_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.object_anchors_accounts.update(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
object_anchors_account={
|
||||
"identity": {"type": "SystemAssigned"},
|
||||
"location": "eastus2euap",
|
||||
"tags": {"hero": "romeo", "heroine": "juliet"},
|
||||
},
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Patch.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,34 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python create_object_anchors_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.object_anchors_accounts.create(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
object_anchors_account={"identity": {"type": "SystemAssigned"}, "location": "eastus2euap"},
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/Put.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,34 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python regenerate_object_anchors_account_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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.object_anchors_accounts.regenerate_keys(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
regenerate={"serial": 1},
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/object-anchors/RegenerateKey.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python check_local_name_availability.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.check_name_availability_local(
|
||||
location="eastus2euap",
|
||||
check_name_availability={"name": "MyAccount", "type": "Microsoft.MixedReality/spatialAnchorsAccounts"},
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/CheckNameAvailabilityForLocalUniqueness.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,31 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python list_available_operations.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="SUBSCRIPTION_ID",
|
||||
)
|
||||
|
||||
response = client.operations.list()
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/proxy/ExposingAvailableOperations.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python delete_remote_rendering_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.remote_rendering_accounts.delete(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Delete.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python get_remote_rendering_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.remote_rendering_accounts.get(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Get.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python list_remote_rendering_accounts_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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.remote_rendering_accounts.list_by_resource_group(
|
||||
resource_group_name="MyResourceGroup",
|
||||
)
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/GetByResourceGroup.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,31 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python list_remote_rendering_accounts_by_subscription.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.remote_rendering_accounts.list_by_subscription()
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/GetBySubscription.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python list_remote_rendering_account_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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.remote_rendering_accounts.list_keys(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/ListKeys.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,38 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python update_remote_rendering_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.remote_rendering_accounts.update(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
remote_rendering_account={
|
||||
"identity": {"type": "SystemAssigned"},
|
||||
"location": "eastus2euap",
|
||||
"tags": {"hero": "romeo", "heroine": "juliet"},
|
||||
},
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Patch.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,34 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python create_remote_rendering_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.remote_rendering_accounts.create(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
remote_rendering_account={"identity": {"type": "SystemAssigned"}, "location": "eastus2euap"},
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/Put.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,34 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python regenerate_remote_rendering_account_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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.remote_rendering_accounts.regenerate_keys(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
regenerate={"serial": 1},
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/remote-rendering/RegenerateKey.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python delete_spatial_anchors_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.spatial_anchors_accounts.delete(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Delete.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python get_spatial_anchors_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.spatial_anchors_accounts.get(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Get.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python list_spatial_anchor_accounts_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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.spatial_anchors_accounts.list_by_resource_group(
|
||||
resource_group_name="MyResourceGroup",
|
||||
)
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/GetByResourceGroup.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,31 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python list_spatial_anchors_accounts_by_subscription.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.spatial_anchors_accounts.list_by_subscription()
|
||||
for item in response:
|
||||
print(item)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/GetBySubscription.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,33 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python list_spatial_anchor_account_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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.spatial_anchors_accounts.list_keys(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/ListKeys.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,34 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python update_spatial_anchors_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.spatial_anchors_accounts.update(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
spatial_anchors_account={"location": "eastus2euap", "tags": {"hero": "romeo", "heroine": "juliet"}},
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Patch.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,34 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python create_spatial_anchor_account.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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.spatial_anchors_accounts.create(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
spatial_anchors_account={"location": "eastus2euap"},
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/Put.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-mixedreality_1.1.0b1/sdk/mixedreality/azure-mgmt-mixedreality/README.md"}
|
|
@ -0,0 +1,34 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
from azure.mgmt.mixedreality import MixedRealityClient
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-mixedreality
|
||||
# USAGE
|
||||
python regenerate_spatial_anchors_account_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 = MixedRealityClient(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||
)
|
||||
|
||||
response = client.spatial_anchors_accounts.regenerate_keys(
|
||||
resource_group_name="MyResourceGroup",
|
||||
account_name="MyAccount",
|
||||
regenerate={"serial": 1},
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2021-03-01-preview/examples/spatial-anchors/RegenerateKey.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
Загрузка…
Ссылка в новой задаче