Utwórz lub zaktualizuj metadane usługi aprowizacji. Typowym wzorcem modyfikowania właściwości jest pobranie metadanych usługi aprowizacji i metadanych zabezpieczeń, a następnie połączenie ich ze zmodyfikowanymi wartościami w nowej treści w celu zaktualizowania usługi aprowizacji.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}?api-version=2026-08-31
Parametry identyfikatora URI
| Nazwa |
W |
Wymagane |
Typ |
Opis |
|
provisioningServiceName
|
path |
True
|
string
|
Nazwa usługi provisioning do pobrania.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Nazwa grupy zasobów. Nazwa jest niewrażliwa na wielkość liter.
|
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
Identyfikator subskrypcji docelowej.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Wersja interfejsu API do użycia dla tej operacji.
|
Treść żądania
| Nazwa |
Wymagane |
Typ |
Opis |
|
location
|
True
|
string
|
Lokalizacja geograficzna, w której znajduje się zasób
|
|
properties
|
True
|
IotDpsPropertiesDescription
|
Właściwości specyficzne dla usługi aprowizacji
|
|
sku
|
True
|
IotDpsSkuInfo
|
Informacje o jednostce SKU dla usługi aprowizacji.
|
|
etag
|
|
string
|
Pole Etag nie jest wymagane. Jeśli jest on podany w treści odpowiedzi, musi być również podany jako nagłówek zgodnie z normalną konwencją ETag.
|
|
identity
|
|
ManagedServiceIdentity
|
Tożsamości usługi zarządzanej przypisane do tego zasobu.
|
|
resourcegroup
|
|
string
|
Grupa zasobów zasobu.
|
|
subscriptionid
|
|
string
|
Identyfikator subskrypcji zasobu.
|
|
tags
|
|
object
|
Tagi zasobów.
|
Odpowiedzi
| Nazwa |
Typ |
Opis |
|
200 OK
|
ProvisioningServiceDescription
|
Operacja aktualizacji zasobu 'ProvisioningServiceDescription' zakończyła się sukcesem
|
|
201 Created
|
ProvisioningServiceDescription
|
Operacja tworzenia zasobu 'ProvisioningServiceDescription' zakończyła się sukcesem
Nagłówki
- Location: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorDetails
|
Nieoczekiwana odpowiedź na błąd.
|
Zabezpieczenia
azure_auth
Przepływ OAuth2 w usłudze Azure Active Directory.
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
| Nazwa |
Opis |
|
user_impersonation
|
podszywaj się pod konto użytkownika
|
Przykłady
DPSCreate
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/provisioningServices/myFirstProvisioningService?api-version=2026-08-31
{
"location": "East US",
"properties": {
"enableDataResidency": false
},
"sku": {
"name": "S1",
"capacity": 1
},
"tags": {}
}
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsPropertiesDescription;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSku;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSkuInfo;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for IotDpsResource CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-08-31/DPSCreate.json
*/
/**
* Sample code: DPSCreate.
*
* @param manager Entry point to IotDpsManager.
*/
public static void dPSCreate(com.azure.resourcemanager.deviceprovisioningservices.IotDpsManager manager) {
manager.iotDpsResources().define("myFirstProvisioningService").withRegion("East US")
.withExistingResourceGroup("myResourceGroup")
.withProperties(new IotDpsPropertiesDescription().withEnableDataResidency(false))
.withSku(new IotDpsSkuInfo().withName(IotDpsSku.S1).withCapacity(1L)).withTags(mapOf()).create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iothubprovisioningservices import IotDpsClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iothubprovisioningservices
# USAGE
python dps_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 = IotDpsClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.iot_dps_resource.begin_create_or_update(
resource_group_name="myResourceGroup",
provisioning_service_name="myFirstProvisioningService",
iot_dps_description={
"location": "East US",
"properties": {"enableDataResidency": False},
"sku": {"capacity": 1, "name": "S1"},
"tags": {},
},
).result()
print(response)
# x-ms-original-file: 2026-08-31/DPSCreate.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdeviceprovisioningservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices"
)
// Generated from example definition: 2026-08-31/DPSCreate.json
func ExampleIotDpsResourceClient_BeginCreateOrUpdate_dpsCreate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdeviceprovisioningservices.NewClientFactory("91d12660-3dec-467a-be2a-213b5544ddc0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewIotDpsResourceClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myFirstProvisioningService", armdeviceprovisioningservices.ProvisioningServiceDescription{
Location: to.Ptr("East US"),
Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
EnableDataResidency: to.Ptr(false),
},
SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
Capacity: to.Ptr[int64](1),
},
Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armdeviceprovisioningservices.IotDpsResourceClientCreateOrUpdateResponse{
// ProvisioningServiceDescription: armdeviceprovisioningservices.ProvisioningServiceDescription{
// Name: to.Ptr("myFirstProvisioningService"),
// Type: to.Ptr("Microsoft.Devices/ProvisioningServices"),
// Etag: to.Ptr("AAAAAAAADGk="),
// ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"),
// Location: to.Ptr("eastus"),
// Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
// AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed),
// AuthorizationPolicies: []*armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleAccessRightsDescription{
// },
// DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"),
// EnableDataResidency: to.Ptr(false),
// IDScope: to.Ptr("0ne00000012"),
// PortalOperationsHostName: to.Ptr("myFirstProvisioningService.services.azure-devices-provisioning.net"),
// ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"),
// State: to.Ptr(armdeviceprovisioningservices.StateActive),
// },
// Resourcegroup: to.Ptr("myResourceGroup"),
// SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
// Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
// Capacity: to.Ptr[int64](1),
// Tier: to.Ptr("Standard"),
// },
// Subscriptionid: to.Ptr("91d12660-3dec-467a-be2a-213b5544ddc0"),
// Tags: map[string]*string{
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IotDpsClient } = require("@azure/arm-deviceprovisioningservices");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
*
* @summary create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
* x-ms-original-file: 2026-08-31/DPSCreate.json
*/
async function dpsCreate() {
const credential = new DefaultAzureCredential();
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const client = new IotDpsClient(credential, subscriptionId);
const result = await client.iotDpsResource.createOrUpdate(
"myResourceGroup",
"myFirstProvisioningService",
{
location: "East US",
properties: { enableDataResidency: false },
sku: { name: "S1", capacity: 1 },
tags: {},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"enableDataResidency": false,
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active"
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {}
}
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"enableDataResidency": false,
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active"
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {}
}
DPSCreate_DisableLocalAuthFalse
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/provisioningServices/myFirstProvisioningService?api-version=2026-08-31
{
"location": "East US",
"properties": {
"publicNetworkAccess": "Enabled",
"disableLocalAuth": false
},
"sku": {
"name": "S1",
"capacity": 1
},
"tags": {
"key1": "value1"
}
}
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsPropertiesDescription;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSku;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSkuInfo;
import com.azure.resourcemanager.deviceprovisioningservices.models.PublicNetworkAccess;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for IotDpsResource CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-08-31/DPSCreate_DisableLocalAuthFalse.json
*/
/**
* Sample code: DPSCreate_DisableLocalAuthFalse.
*
* @param manager Entry point to IotDpsManager.
*/
public static void
dPSCreateDisableLocalAuthFalse(com.azure.resourcemanager.deviceprovisioningservices.IotDpsManager manager) {
manager.iotDpsResources().define("myFirstProvisioningService").withRegion("East US")
.withExistingResourceGroup("myResourceGroup")
.withProperties(new IotDpsPropertiesDescription().withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
.withDisableLocalAuth(false))
.withSku(new IotDpsSkuInfo().withName(IotDpsSku.S1).withCapacity(1L))
.withTags(mapOf("key1", "fakeTokenPlaceholder")).create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iothubprovisioningservices import IotDpsClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iothubprovisioningservices
# USAGE
python dps_create_disable_local_auth_false.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 = IotDpsClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.iot_dps_resource.begin_create_or_update(
resource_group_name="myResourceGroup",
provisioning_service_name="myFirstProvisioningService",
iot_dps_description={
"location": "East US",
"properties": {"disableLocalAuth": False, "publicNetworkAccess": "Enabled"},
"sku": {"capacity": 1, "name": "S1"},
"tags": {"key1": "value1"},
},
).result()
print(response)
# x-ms-original-file: 2026-08-31/DPSCreate_DisableLocalAuthFalse.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdeviceprovisioningservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices"
)
// Generated from example definition: 2026-08-31/DPSCreate_DisableLocalAuthFalse.json
func ExampleIotDpsResourceClient_BeginCreateOrUpdate_dpsCreateDisableLocalAuthFalse() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdeviceprovisioningservices.NewClientFactory("91d12660-3dec-467a-be2a-213b5544ddc0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewIotDpsResourceClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myFirstProvisioningService", armdeviceprovisioningservices.ProvisioningServiceDescription{
Location: to.Ptr("East US"),
Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
PublicNetworkAccess: to.Ptr(armdeviceprovisioningservices.PublicNetworkAccessEnabled),
DisableLocalAuth: to.Ptr(false),
},
SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
Capacity: to.Ptr[int64](1),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armdeviceprovisioningservices.IotDpsResourceClientCreateOrUpdateResponse{
// ProvisioningServiceDescription: armdeviceprovisioningservices.ProvisioningServiceDescription{
// Name: to.Ptr("myFirstProvisioningService"),
// Type: to.Ptr("Microsoft.Devices/ProvisioningServices"),
// Etag: to.Ptr("AAAAAAAADGk="),
// ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"),
// Location: to.Ptr("eastus"),
// Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
// AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed),
// AuthorizationPolicies: []*armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleAccessRightsDescription{
// },
// DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"),
// IDScope: to.Ptr("0ne00000012"),
// PortalOperationsHostName: to.Ptr("myFirstProvisioningService.services.azure-devices-provisioning.net"),
// ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"),
// State: to.Ptr(armdeviceprovisioningservices.StateActive),
// DisableLocalAuth: to.Ptr(false),
// },
// Resourcegroup: to.Ptr("myResourceGroup"),
// SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
// Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
// Capacity: to.Ptr[int64](1),
// Tier: to.Ptr("Standard"),
// },
// Subscriptionid: to.Ptr("91d12660-3dec-467a-be2a-213b5544ddc0"),
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IotDpsClient } = require("@azure/arm-deviceprovisioningservices");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
*
* @summary create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
* x-ms-original-file: 2026-08-31/DPSCreate_DisableLocalAuthFalse.json
*/
async function dpsCreateDisableLocalAuthFalse() {
const credential = new DefaultAzureCredential();
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const client = new IotDpsClient(credential, subscriptionId);
const result = await client.iotDpsResource.createOrUpdate(
"myResourceGroup",
"myFirstProvisioningService",
{
location: "East US",
properties: { publicNetworkAccess: "Enabled", disableLocalAuth: false },
sku: { name: "S1", capacity: 1 },
tags: { key1: "value1" },
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active",
"disableLocalAuth": false
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {
"key1": "value1"
}
}
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active",
"disableLocalAuth": false
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {
"key1": "value1"
}
}
DPSCreate_DisableLocalAuthTrue
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/provisioningServices/myFirstProvisioningService?api-version=2026-08-31
{
"location": "East US",
"properties": {
"publicNetworkAccess": "Enabled",
"disableLocalAuth": true
},
"sku": {
"name": "S1",
"capacity": 1
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsPropertiesDescription;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSku;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSkuInfo;
import com.azure.resourcemanager.deviceprovisioningservices.models.PublicNetworkAccess;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for IotDpsResource CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-08-31/DPSCreate_DisableLocalAuthTrue.json
*/
/**
* Sample code: DPSCreate_DisableLocalAuthTrue.
*
* @param manager Entry point to IotDpsManager.
*/
public static void
dPSCreateDisableLocalAuthTrue(com.azure.resourcemanager.deviceprovisioningservices.IotDpsManager manager) {
manager.iotDpsResources().define("myFirstProvisioningService").withRegion("East US")
.withExistingResourceGroup("myResourceGroup")
.withProperties(new IotDpsPropertiesDescription().withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
.withDisableLocalAuth(true))
.withSku(new IotDpsSkuInfo().withName(IotDpsSku.S1).withCapacity(1L))
.withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")).create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iothubprovisioningservices import IotDpsClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iothubprovisioningservices
# USAGE
python dps_create_disable_local_auth_true.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 = IotDpsClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.iot_dps_resource.begin_create_or_update(
resource_group_name="myResourceGroup",
provisioning_service_name="myFirstProvisioningService",
iot_dps_description={
"location": "East US",
"properties": {"disableLocalAuth": True, "publicNetworkAccess": "Enabled"},
"sku": {"capacity": 1, "name": "S1"},
"tags": {"key1": "value1", "key2": "value2"},
},
).result()
print(response)
# x-ms-original-file: 2026-08-31/DPSCreate_DisableLocalAuthTrue.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdeviceprovisioningservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices"
)
// Generated from example definition: 2026-08-31/DPSCreate_DisableLocalAuthTrue.json
func ExampleIotDpsResourceClient_BeginCreateOrUpdate_dpsCreateDisableLocalAuthTrue() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdeviceprovisioningservices.NewClientFactory("91d12660-3dec-467a-be2a-213b5544ddc0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewIotDpsResourceClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myFirstProvisioningService", armdeviceprovisioningservices.ProvisioningServiceDescription{
Location: to.Ptr("East US"),
Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
PublicNetworkAccess: to.Ptr(armdeviceprovisioningservices.PublicNetworkAccessEnabled),
DisableLocalAuth: to.Ptr(true),
},
SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
Capacity: to.Ptr[int64](1),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armdeviceprovisioningservices.IotDpsResourceClientCreateOrUpdateResponse{
// ProvisioningServiceDescription: armdeviceprovisioningservices.ProvisioningServiceDescription{
// Name: to.Ptr("myFirstProvisioningService"),
// Type: to.Ptr("Microsoft.Devices/ProvisioningServices"),
// Etag: to.Ptr("AAAAAAAADGk="),
// ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"),
// Location: to.Ptr("eastus"),
// Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
// AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed),
// AuthorizationPolicies: []*armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleAccessRightsDescription{
// },
// DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"),
// IDScope: to.Ptr("0ne00000012"),
// PortalOperationsHostName: to.Ptr("myFirstProvisioningService.services.azure-devices-provisioning.net"),
// ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"),
// State: to.Ptr(armdeviceprovisioningservices.StateActive),
// DisableLocalAuth: to.Ptr(true),
// },
// Resourcegroup: to.Ptr("myResourceGroup"),
// SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
// Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
// Capacity: to.Ptr[int64](1),
// Tier: to.Ptr("Standard"),
// },
// Subscriptionid: to.Ptr("91d12660-3dec-467a-be2a-213b5544ddc0"),
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IotDpsClient } = require("@azure/arm-deviceprovisioningservices");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
*
* @summary create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
* x-ms-original-file: 2026-08-31/DPSCreate_DisableLocalAuthTrue.json
*/
async function dpsCreateDisableLocalAuthTrue() {
const credential = new DefaultAzureCredential();
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const client = new IotDpsClient(credential, subscriptionId);
const result = await client.iotDpsResource.createOrUpdate(
"myResourceGroup",
"myFirstProvisioningService",
{
location: "East US",
properties: { publicNetworkAccess: "Enabled", disableLocalAuth: true },
sku: { name: "S1", capacity: 1 },
tags: { key1: "value1", key2: "value2" },
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active",
"disableLocalAuth": true
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {
"key1": "value1",
"key2": "value2"
}
}
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active",
"disableLocalAuth": true
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {
"key1": "value1",
"key2": "value2"
}
}
DPSCreateWithIotHub
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/provisioningServices/myFirstProvisioningService?api-version=2026-08-31
{
"location": "East US",
"properties": {
"enableDataResidency": false,
"iotHubs": [
{
"applyAllocationPolicy": true,
"allocationWeight": 1,
"hostName": "myFirstIoTHub.azure-devices.net",
"authenticationType": "UserAssigned",
"selectedUserAssignedIdentityResourceId": "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1",
"location": "eastus"
}
]
},
"sku": {
"name": "S1",
"capacity": 1
},
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": {}
}
},
"tags": {}
}
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsPropertiesDescription;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSku;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSkuInfo;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotHubAuthenticationType;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotHubDefinitionDescription;
import com.azure.resourcemanager.deviceprovisioningservices.models.ManagedServiceIdentity;
import com.azure.resourcemanager.deviceprovisioningservices.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.deviceprovisioningservices.models.UserAssignedIdentity;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for IotDpsResource CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-08-31/DPSCreateWithIotHub.json
*/
/**
* Sample code: DPSCreateWithIotHub.
*
* @param manager Entry point to IotDpsManager.
*/
public static void dPSCreateWithIotHub(com.azure.resourcemanager.deviceprovisioningservices.IotDpsManager manager) {
manager.iotDpsResources().define("myFirstProvisioningService").withRegion("East US")
.withExistingResourceGroup("myResourceGroup")
.withProperties(new IotDpsPropertiesDescription()
.withIotHubs(Arrays.asList(new IotHubDefinitionDescription().withApplyAllocationPolicy(true)
.withAllocationWeight(1).withHostName("myFirstIoTHub.azure-devices.net")
.withAuthenticationType(IotHubAuthenticationType.USER_ASSIGNED)
.withSelectedUserAssignedIdentityResourceId(
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1")
.withLocation("eastus")))
.withEnableDataResidency(false))
.withSku(new IotDpsSkuInfo().withName(IotDpsSku.S1).withCapacity(1L)).withTags(mapOf())
.withIdentity(new ManagedServiceIdentity()
.withType(ManagedServiceIdentityType.fromString("SystemAssigned, UserAssigned"))
.withUserAssignedIdentities(mapOf(
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1",
new UserAssignedIdentity())))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iothubprovisioningservices import IotDpsClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iothubprovisioningservices
# USAGE
python dps_create_with_iot_hub.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 = IotDpsClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.iot_dps_resource.begin_create_or_update(
resource_group_name="myResourceGroup",
provisioning_service_name="myFirstProvisioningService",
iot_dps_description={
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": {}
},
},
"location": "East US",
"properties": {
"enableDataResidency": False,
"iotHubs": [
{
"allocationWeight": 1,
"applyAllocationPolicy": True,
"authenticationType": "UserAssigned",
"hostName": "myFirstIoTHub.azure-devices.net",
"location": "eastus",
"selectedUserAssignedIdentityResourceId": "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1",
}
],
},
"sku": {"capacity": 1, "name": "S1"},
"tags": {},
},
).result()
print(response)
# x-ms-original-file: 2026-08-31/DPSCreateWithIotHub.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdeviceprovisioningservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices"
)
// Generated from example definition: 2026-08-31/DPSCreateWithIotHub.json
func ExampleIotDpsResourceClient_BeginCreateOrUpdate_dpsCreateWithIotHub() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdeviceprovisioningservices.NewClientFactory("91d12660-3dec-467a-be2a-213b5544ddc0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewIotDpsResourceClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myFirstProvisioningService", armdeviceprovisioningservices.ProvisioningServiceDescription{
Location: to.Ptr("East US"),
Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
EnableDataResidency: to.Ptr(false),
IotHubs: []*armdeviceprovisioningservices.IotHubDefinitionDescription{
{
ApplyAllocationPolicy: to.Ptr(true),
AllocationWeight: to.Ptr[int32](1),
HostName: to.Ptr("myFirstIoTHub.azure-devices.net"),
AuthenticationType: to.Ptr(armdeviceprovisioningservices.IotHubAuthenticationTypeUserAssigned),
SelectedUserAssignedIdentityResourceID: to.Ptr("/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1"),
Location: to.Ptr("eastus"),
},
},
},
SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
Capacity: to.Ptr[int64](1),
},
Identity: &armdeviceprovisioningservices.ManagedServiceIdentity{
Type: to.Ptr(armdeviceprovisioningservices.ManagedServiceIdentityType("SystemAssigned, UserAssigned")),
UserAssignedIdentities: map[string]*armdeviceprovisioningservices.UserAssignedIdentity{
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": {},
},
},
Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armdeviceprovisioningservices.IotDpsResourceClientCreateOrUpdateResponse{
// ProvisioningServiceDescription: armdeviceprovisioningservices.ProvisioningServiceDescription{
// Name: to.Ptr("myFirstProvisioningService"),
// Type: to.Ptr("Microsoft.Devices/ProvisioningServices"),
// Etag: to.Ptr("AAAAAAAADGk="),
// ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"),
// Location: to.Ptr("eastus"),
// Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
// AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed),
// AuthorizationPolicies: []*armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleAccessRightsDescription{
// },
// DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"),
// EnableDataResidency: to.Ptr(false),
// IDScope: to.Ptr("0ne00000012"),
// IotHubs: []*armdeviceprovisioningservices.IotHubDefinitionDescription{
// {
// ApplyAllocationPolicy: to.Ptr(true),
// AllocationWeight: to.Ptr[int32](1),
// Name: to.Ptr("myFirstIoTHub.azure-devices.net"),
// HostName: to.Ptr("myFirstIoTHub.azure-devices.net"),
// AuthenticationType: to.Ptr(armdeviceprovisioningservices.IotHubAuthenticationTypeUserAssigned),
// SelectedUserAssignedIdentityResourceID: to.Ptr("/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1"),
// Location: to.Ptr("eastus"),
// },
// },
// PortalOperationsHostName: to.Ptr("myFirstProvisioningService.services.azure-devices-provisioning.net"),
// ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"),
// State: to.Ptr(armdeviceprovisioningservices.StateActive),
// },
// Resourcegroup: to.Ptr("myResourceGroup"),
// SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
// Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
// Capacity: to.Ptr[int64](1),
// Tier: to.Ptr("Standard"),
// },
// Identity: &armdeviceprovisioningservices.ManagedServiceIdentity{
// Type: to.Ptr(armdeviceprovisioningservices.ManagedServiceIdentityType("SystemAssigned, UserAssigned")),
// UserAssignedIdentities: map[string]*armdeviceprovisioningservices.UserAssignedIdentity{
// "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": &armdeviceprovisioningservices.UserAssignedIdentity{
// },
// },
// },
// Subscriptionid: to.Ptr("91d12660-3dec-467a-be2a-213b5544ddc0"),
// Tags: map[string]*string{
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IotDpsClient } = require("@azure/arm-deviceprovisioningservices");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
*
* @summary create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
* x-ms-original-file: 2026-08-31/DPSCreateWithIotHub.json
*/
async function dpsCreateWithIotHub() {
const credential = new DefaultAzureCredential();
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const client = new IotDpsClient(credential, subscriptionId);
const result = await client.iotDpsResource.createOrUpdate(
"myResourceGroup",
"myFirstProvisioningService",
{
location: "East US",
properties: {
enableDataResidency: false,
iotHubs: [
{
applyAllocationPolicy: true,
allocationWeight: 1,
hostName: "myFirstIoTHub.azure-devices.net",
authenticationType: "UserAssigned",
selectedUserAssignedIdentityResourceId:
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1",
location: "eastus",
},
],
},
sku: { name: "S1", capacity: 1 },
identity: {
type: "SystemAssigned, UserAssigned",
userAssignedIdentities: {
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1":
{},
},
},
tags: {},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"enableDataResidency": false,
"idScope": "0ne00000012",
"iotHubs": [
{
"applyAllocationPolicy": true,
"allocationWeight": 1,
"name": "myFirstIoTHub.azure-devices.net",
"hostName": "myFirstIoTHub.azure-devices.net",
"authenticationType": "UserAssigned",
"selectedUserAssignedIdentityResourceId": "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1",
"location": "eastus"
}
],
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active"
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": {}
}
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {}
}
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"enableDataResidency": false,
"idScope": "0ne00000012",
"iotHubs": [
{
"applyAllocationPolicy": true,
"allocationWeight": 1,
"name": "myFirstIoTHub.azure-devices.net",
"hostName": "myFirstIoTHub.azure-devices.net",
"authenticationType": "UserAssigned",
"selectedUserAssignedIdentityResourceId": "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1",
"location": "eastus"
}
],
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active"
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": {}
}
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {}
}
DPSCreateWithNamespace
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/provisioningServices/myFirstProvisioningService?api-version=2026-08-31
{
"location": "East US",
"properties": {
"enableDataResidency": false
},
"sku": {
"name": "S1",
"capacity": 1
},
"tags": {}
}
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsPropertiesDescription;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSku;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSkuInfo;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for IotDpsResource CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-08-31/DPSCreateWithNamespace.json
*/
/**
* Sample code: DPSCreateWithNamespace.
*
* @param manager Entry point to IotDpsManager.
*/
public static void
dPSCreateWithNamespace(com.azure.resourcemanager.deviceprovisioningservices.IotDpsManager manager) {
manager.iotDpsResources().define("myFirstProvisioningService").withRegion("East US")
.withExistingResourceGroup("myResourceGroup")
.withProperties(new IotDpsPropertiesDescription().withEnableDataResidency(false))
.withSku(new IotDpsSkuInfo().withName(IotDpsSku.S1).withCapacity(1L)).withTags(mapOf()).create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iothubprovisioningservices import IotDpsClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iothubprovisioningservices
# USAGE
python dps_create_with_namespace.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 = IotDpsClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.iot_dps_resource.begin_create_or_update(
resource_group_name="myResourceGroup",
provisioning_service_name="myFirstProvisioningService",
iot_dps_description={
"location": "East US",
"properties": {"enableDataResidency": False},
"sku": {"capacity": 1, "name": "S1"},
"tags": {},
},
).result()
print(response)
# x-ms-original-file: 2026-08-31/DPSCreateWithNamespace.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdeviceprovisioningservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices"
)
// Generated from example definition: 2026-08-31/DPSCreateWithNamespace.json
func ExampleIotDpsResourceClient_BeginCreateOrUpdate_dpsCreateWithNamespace() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdeviceprovisioningservices.NewClientFactory("91d12660-3dec-467a-be2a-213b5544ddc0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewIotDpsResourceClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myFirstProvisioningService", armdeviceprovisioningservices.ProvisioningServiceDescription{
Location: to.Ptr("East US"),
Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
EnableDataResidency: to.Ptr(false),
},
SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
Capacity: to.Ptr[int64](1),
},
Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armdeviceprovisioningservices.IotDpsResourceClientCreateOrUpdateResponse{
// ProvisioningServiceDescription: armdeviceprovisioningservices.ProvisioningServiceDescription{
// Name: to.Ptr("myFirstProvisioningService"),
// Type: to.Ptr("Microsoft.Devices/ProvisioningServices"),
// Etag: to.Ptr("AAAAAAAADGk="),
// ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"),
// Location: to.Ptr("eastus"),
// Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
// AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed),
// AuthorizationPolicies: []*armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleAccessRightsDescription{
// },
// DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"),
// EnableDataResidency: to.Ptr(false),
// IDScope: to.Ptr("0ne00000012"),
// PortalOperationsHostName: to.Ptr("myFirstProvisioningService.services.azure-devices-provisioning.net"),
// ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"),
// State: to.Ptr(armdeviceprovisioningservices.StateActive),
// },
// Resourcegroup: to.Ptr("myResourceGroup"),
// SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
// Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
// Capacity: to.Ptr[int64](1),
// Tier: to.Ptr("Standard"),
// },
// Identity: &armdeviceprovisioningservices.ManagedServiceIdentity{
// Type: to.Ptr(armdeviceprovisioningservices.ManagedServiceIdentityType("SystemAssigned, UserAssigned")),
// UserAssignedIdentities: map[string]*armdeviceprovisioningservices.UserAssignedIdentity{
// "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": &armdeviceprovisioningservices.UserAssignedIdentity{
// },
// "/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-2": &armdeviceprovisioningservices.UserAssignedIdentity{
// },
// },
// },
// Subscriptionid: to.Ptr("91d12660-3dec-467a-be2a-213b5544ddc0"),
// Tags: map[string]*string{
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IotDpsClient } = require("@azure/arm-deviceprovisioningservices");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
*
* @summary create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
* x-ms-original-file: 2026-08-31/DPSCreateWithNamespace.json
*/
async function dpsCreateWithNamespace() {
const credential = new DefaultAzureCredential();
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const client = new IotDpsClient(credential, subscriptionId);
const result = await client.iotDpsResource.createOrUpdate(
"myResourceGroup",
"myFirstProvisioningService",
{
location: "East US",
properties: { enableDataResidency: false },
sku: { name: "S1", capacity: 1 },
tags: {},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"enableDataResidency": false,
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active"
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": {},
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-2": {}
}
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {}
}
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"enableDataResidency": false,
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active"
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-1": {},
"/subscriptions/abcf2d55-764f-419f-974d-f77a55c2ce55/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-mi-2": {}
}
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {}
}
DPSUpdate
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/provisioningServices/myFirstProvisioningService?api-version=2026-08-31
{
"identity": {
"type": "SystemAssigned,UserAssigned",
"userAssignedIdentities": {
"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity": {}
}
},
"location": "East US",
"properties": {
"enableDataResidency": false
},
"sku": {
"name": "S1",
"capacity": 1
},
"tags": {}
}
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsPropertiesDescription;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSku;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSkuInfo;
import com.azure.resourcemanager.deviceprovisioningservices.models.ManagedServiceIdentity;
import com.azure.resourcemanager.deviceprovisioningservices.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.deviceprovisioningservices.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for IotDpsResource CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-08-31/DPSUpdate.json
*/
/**
* Sample code: DPSUpdate.
*
* @param manager Entry point to IotDpsManager.
*/
public static void dPSUpdate(com.azure.resourcemanager.deviceprovisioningservices.IotDpsManager manager) {
manager.iotDpsResources().define("myFirstProvisioningService").withRegion("East US")
.withExistingResourceGroup("myResourceGroup")
.withProperties(new IotDpsPropertiesDescription().withEnableDataResidency(false))
.withSku(new IotDpsSkuInfo().withName(IotDpsSku.S1).withCapacity(1L)).withTags(mapOf())
.withIdentity(new ManagedServiceIdentity()
.withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
.withUserAssignedIdentities(mapOf(
"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity",
new UserAssignedIdentity())))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iothubprovisioningservices import IotDpsClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iothubprovisioningservices
# USAGE
python dps_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 = IotDpsClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.iot_dps_resource.begin_create_or_update(
resource_group_name="myResourceGroup",
provisioning_service_name="myFirstProvisioningService",
iot_dps_description={
"identity": {
"type": "SystemAssigned,UserAssigned",
"userAssignedIdentities": {
"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity": {}
},
},
"location": "East US",
"properties": {"enableDataResidency": False},
"sku": {"capacity": 1, "name": "S1"},
"tags": {},
},
).result()
print(response)
# x-ms-original-file: 2026-08-31/DPSUpdate.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdeviceprovisioningservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices"
)
// Generated from example definition: 2026-08-31/DPSUpdate.json
func ExampleIotDpsResourceClient_BeginCreateOrUpdate_dpsUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdeviceprovisioningservices.NewClientFactory("91d12660-3dec-467a-be2a-213b5544ddc0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewIotDpsResourceClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myFirstProvisioningService", armdeviceprovisioningservices.ProvisioningServiceDescription{
Identity: &armdeviceprovisioningservices.ManagedServiceIdentity{
Type: to.Ptr(armdeviceprovisioningservices.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
UserAssignedIdentities: map[string]*armdeviceprovisioningservices.UserAssignedIdentity{
"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity": {},
},
},
Location: to.Ptr("East US"),
Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
EnableDataResidency: to.Ptr(false),
},
SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
Capacity: to.Ptr[int64](1),
},
Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armdeviceprovisioningservices.IotDpsResourceClientCreateOrUpdateResponse{
// ProvisioningServiceDescription: armdeviceprovisioningservices.ProvisioningServiceDescription{
// Name: to.Ptr("myFirstProvisioningService"),
// Type: to.Ptr("Microsoft.Devices/ProvisioningServices"),
// Etag: to.Ptr("AAAAAAAADGk="),
// ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"),
// Identity: &armdeviceprovisioningservices.ManagedServiceIdentity{
// Type: to.Ptr(armdeviceprovisioningservices.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
// PrincipalID: to.Ptr("aa80bd74-a3f0-4f14-b9da-99c5351cf9d5"),
// TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
// UserAssignedIdentities: map[string]*armdeviceprovisioningservices.UserAssignedIdentity{
// "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity": &armdeviceprovisioningservices.UserAssignedIdentity{
// ClientID: to.Ptr("c38f618d-47f6-4260-8b3d-1dd8c130f323"),
// PrincipalID: to.Ptr("f1b0b133-10dc-4985-966f-a98a04675fe9"),
// },
// },
// },
// Location: to.Ptr("eastus"),
// Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
// AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed),
// AuthorizationPolicies: []*armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleAccessRightsDescription{
// },
// DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"),
// EnableDataResidency: to.Ptr(false),
// IDScope: to.Ptr("0ne00000012"),
// PortalOperationsHostName: to.Ptr("myFirstProvisioningService.services.azure-devices-provisioning.net"),
// ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"),
// State: to.Ptr(armdeviceprovisioningservices.StateActive),
// },
// Resourcegroup: to.Ptr("myResourceGroup"),
// SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
// Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
// Capacity: to.Ptr[int64](1),
// Tier: to.Ptr("Standard"),
// },
// Subscriptionid: to.Ptr("91d12660-3dec-467a-be2a-213b5544ddc0"),
// Tags: map[string]*string{
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IotDpsClient } = require("@azure/arm-deviceprovisioningservices");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
*
* @summary create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
* x-ms-original-file: 2026-08-31/DPSUpdate.json
*/
async function dpsUpdate() {
const credential = new DefaultAzureCredential();
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const client = new IotDpsClient(credential, subscriptionId);
const result = await client.iotDpsResource.createOrUpdate(
"myResourceGroup",
"myFirstProvisioningService",
{
identity: {
type: "SystemAssigned,UserAssigned",
userAssignedIdentities: {
"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity":
{},
},
},
location: "East US",
properties: { enableDataResidency: false },
sku: { name: "S1", capacity: 1 },
tags: {},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"identity": {
"type": "SystemAssigned,UserAssigned",
"principalId": "aa80bd74-a3f0-4f14-b9da-99c5351cf9d5",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"userAssignedIdentities": {
"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity": {
"clientId": "c38f618d-47f6-4260-8b3d-1dd8c130f323",
"principalId": "f1b0b133-10dc-4985-966f-a98a04675fe9"
}
}
},
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"enableDataResidency": false,
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active"
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {}
}
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups//providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"identity": {
"type": "SystemAssigned,UserAssigned",
"principalId": "aa80bd74-a3f0-4f14-b9da-99c5351cf9d5",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"userAssignedIdentities": {
"/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity": {
"clientId": "c38f618d-47f6-4260-8b3d-1dd8c130f323",
"principalId": "f1b0b133-10dc-4985-966f-a98a04675fe9"
}
}
},
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"enableDataResidency": false,
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active"
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {}
}
DPSUpdate_DisableLocalAuth
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/provisioningServices/myFirstProvisioningService?api-version=2026-08-31
{
"location": "East US",
"properties": {
"disableLocalAuth": true
},
"sku": {
"name": "S1",
"capacity": 1
},
"tags": {}
}
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsPropertiesDescription;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSku;
import com.azure.resourcemanager.deviceprovisioningservices.models.IotDpsSkuInfo;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for IotDpsResource CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2026-08-31/DPSUpdate_DisableLocalAuth.json
*/
/**
* Sample code: DPSUpdate_DisableLocalAuth.
*
* @param manager Entry point to IotDpsManager.
*/
public static void
dPSUpdateDisableLocalAuth(com.azure.resourcemanager.deviceprovisioningservices.IotDpsManager manager) {
manager.iotDpsResources().define("myFirstProvisioningService").withRegion("East US")
.withExistingResourceGroup("myResourceGroup")
.withProperties(new IotDpsPropertiesDescription().withDisableLocalAuth(true))
.withSku(new IotDpsSkuInfo().withName(IotDpsSku.S1).withCapacity(1L)).withTags(mapOf()).create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iothubprovisioningservices import IotDpsClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iothubprovisioningservices
# USAGE
python dps_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 = IotDpsClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.iot_dps_resource.begin_create_or_update(
resource_group_name="myResourceGroup",
provisioning_service_name="myFirstProvisioningService",
iot_dps_description={
"location": "East US",
"properties": {"disableLocalAuth": True},
"sku": {"capacity": 1, "name": "S1"},
"tags": {},
},
).result()
print(response)
# x-ms-original-file: 2026-08-31/DPSUpdate_DisableLocalAuth.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdeviceprovisioningservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/deviceprovisioningservices/armdeviceprovisioningservices"
)
// Generated from example definition: 2026-08-31/DPSUpdate_DisableLocalAuth.json
func ExampleIotDpsResourceClient_BeginCreateOrUpdate_dpsUpdateDisableLocalAuth() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdeviceprovisioningservices.NewClientFactory("91d12660-3dec-467a-be2a-213b5544ddc0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewIotDpsResourceClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myFirstProvisioningService", armdeviceprovisioningservices.ProvisioningServiceDescription{
Location: to.Ptr("East US"),
Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
DisableLocalAuth: to.Ptr(true),
},
SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
Capacity: to.Ptr[int64](1),
},
Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armdeviceprovisioningservices.IotDpsResourceClientCreateOrUpdateResponse{
// ProvisioningServiceDescription: armdeviceprovisioningservices.ProvisioningServiceDescription{
// Name: to.Ptr("myFirstProvisioningService"),
// Type: to.Ptr("Microsoft.Devices/ProvisioningServices"),
// Etag: to.Ptr("AAAAAAAADGk="),
// ID: to.Ptr("/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService"),
// Location: to.Ptr("eastus"),
// Properties: &armdeviceprovisioningservices.IotDpsPropertiesDescription{
// AllocationPolicy: to.Ptr(armdeviceprovisioningservices.AllocationPolicyHashed),
// AuthorizationPolicies: []*armdeviceprovisioningservices.SharedAccessSignatureAuthorizationRuleAccessRightsDescription{
// },
// DeviceProvisioningHostName: to.Ptr("global.azure-devices-provisioning.net"),
// IDScope: to.Ptr("0ne00000012"),
// PortalOperationsHostName: to.Ptr("myFirstProvisioningService.services.azure-devices-provisioning.net"),
// ServiceOperationsHostName: to.Ptr("myFirstProvisioningService.azure-devices-provisioning.net"),
// State: to.Ptr(armdeviceprovisioningservices.StateActive),
// DisableLocalAuth: to.Ptr(true),
// },
// Resourcegroup: to.Ptr("myResourceGroup"),
// SKU: &armdeviceprovisioningservices.IotDpsSKUInfo{
// Name: to.Ptr(armdeviceprovisioningservices.IotDpsSKUS1),
// Capacity: to.Ptr[int64](1),
// Tier: to.Ptr("Standard"),
// },
// Subscriptionid: to.Ptr("91d12660-3dec-467a-be2a-213b5544ddc0"),
// Tags: map[string]*string{
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { IotDpsClient } = require("@azure/arm-deviceprovisioningservices");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
*
* @summary create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
* x-ms-original-file: 2026-08-31/DPSUpdate_DisableLocalAuth.json
*/
async function dpsUpdateDisableLocalAuth() {
const credential = new DefaultAzureCredential();
const subscriptionId = "91d12660-3dec-467a-be2a-213b5544ddc0";
const client = new IotDpsClient(credential, subscriptionId);
const result = await client.iotDpsResource.createOrUpdate(
"myResourceGroup",
"myFirstProvisioningService",
{
location: "East US",
properties: { disableLocalAuth: true },
sku: { name: "S1", capacity: 1 },
tags: {},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active",
"disableLocalAuth": true
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {}
}
{
"name": "myFirstProvisioningService",
"type": "Microsoft.Devices/ProvisioningServices",
"etag": "AAAAAAAADGk=",
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/ProvisioningServices/myFirstProvisioningService",
"location": "eastus",
"properties": {
"allocationPolicy": "Hashed",
"authorizationPolicies": [],
"deviceProvisioningHostName": "global.azure-devices-provisioning.net",
"idScope": "0ne00000012",
"portalOperationsHostName": "myFirstProvisioningService.services.azure-devices-provisioning.net",
"serviceOperationsHostName": "myFirstProvisioningService.azure-devices-provisioning.net",
"state": "Active",
"disableLocalAuth": true
},
"resourcegroup": "myResourceGroup",
"sku": {
"name": "S1",
"capacity": 1,
"tier": "Standard"
},
"subscriptionid": "91d12660-3dec-467a-be2a-213b5544ddc0",
"tags": {}
}
Definicje
AccessRightsDescription
Wyliczenie
Prawa, które ma ten klucz.
| Wartość |
Opis |
|
ServiceConfig
|
|
|
EnrollmentRead
|
|
|
EnrollmentWrite
|
|
|
DeviceConnect
|
|
|
RegistrationStatusRead
|
|
|
RegistrationStatusWrite
|
|
AllocationPolicy
Wyliczenie
Zasady alokacji, które mają być używane przez tę usługę aprowizacji.
| Wartość |
Opis |
|
Hashed
|
|
|
GeoLatency
|
|
|
Static
|
|
createdByType
Wyliczenie
Typ tożsamości, która utworzyła zasób.
| Wartość |
Opis |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
ErrorDetails
Objekt
Szczegóły błędu.
| Nazwa |
Typ |
Opis |
|
code
|
integer
(int32)
|
Kod błędu.
|
|
details
|
string
|
Szczegóły błędu.
|
|
httpStatusCode
|
string
|
Kod statusu HTTP.
|
|
message
|
string
|
Komunikat o błędzie.
|
IotDpsPropertiesDescription
Objekt
właściwości specyficzne dla usługi aprowizacji, w tym klucze, połączone centra iot, bieżący stan i system wygenerowane właściwości, takie jak nazwa hosta i idScope
| Nazwa |
Typ |
Domyślna wartość |
Opis |
|
allocationPolicy
|
AllocationPolicy
|
|
Zasady alokacji, które mają być używane przez tę usługę aprowizacji.
|
|
authorizationPolicies
|
SharedAccessSignatureAuthorizationRuleAccessRightsDescription[]
|
|
Lista kluczy autoryzacji dla usługi aprowizacji.
|
|
deviceProvisioningHostName
|
string
|
|
Punkt końcowy urządzenia dla tej usługi aprowizacji.
|
|
disableLocalAuth
|
boolean
|
False
|
Wyłącza wszystkie metody uwierzytelniania poza Azure RBAC.
|
|
enableDataResidency
|
boolean
|
|
Optional.
Wskazuje, czy wystąpienie usługi DPS ma włączoną rezydencję danych, usuwając odzyskiwanie po awarii między parami geograficznymi.
|
|
idScope
|
string
|
|
Unikatowy identyfikator tej usługi aprowizacji.
|
|
iotHubs
|
IotHubDefinitionDescription[]
|
|
Lista centrów IoT skojarzonych z tą usługą aprowizacji.
|
|
ipFilterRules
|
IpFilterRule[]
|
|
Reguły filtrowania adresów IP.
|
|
portalOperationsHostName
|
string
|
|
Punkt końcowy portalu umożliwiający włączenie mechanizmu CORS dla tej usługi aprowizacji.
|
|
privateEndpointConnections
|
PrivateEndpointConnection[]
|
|
Połączenia prywatnego punktu końcowego utworzone w tej usłudze IotHub
|
|
provisioningState
|
string
|
|
Stan aprowizacji usługi ARM dla usługi aprowizacji.
|
|
publicNetworkAccess
|
PublicNetworkAccess
|
|
Czy żądania z sieci publicznej są dozwolone
|
|
serviceOperationsHostName
|
string
|
|
Punkt końcowy usługi na potrzeby aprowizacji usługi.
|
|
state
|
State
|
|
Bieżący stan usługi aprowizacji.
|
IotDpsSku
Wyliczenie
Nazwa jednostki SKU.
IotDpsSkuInfo
Objekt
Lista możliwych jednostek SKU usługi aprowizacji.
| Nazwa |
Typ |
Opis |
|
capacity
|
integer
(int64)
|
Liczba jednostek do aprowizacji
|
|
name
|
IotDpsSku
|
Nazwa jednostki SKU.
|
|
tier
|
string
|
Nazwa warstwy cenowej usługi aprowizacji.
|
IotHubAuthenticationType
Wyliczenie
Typ uwierzytelniania IotHub MI: KeyBased, UserAssigned, SystemAssigned.
| Wartość |
Opis |
|
KeyBased
|
Typ uwierzytelniania opartego na kluczu.
|
|
UserAssigned
|
Typ uwierzytelniania przypisany przez użytkownika.
|
|
SystemAssigned
|
Typ uwierzytelniania przypisany przez system.
|
IotHubDefinitionDescription
Objekt
Opis centrum IoT.
| Nazwa |
Typ |
Opis |
|
allocationWeight
|
integer
(int32)
|
waga do ubiegania się o daną iot h.
|
|
applyAllocationPolicy
|
boolean
|
flaga stosowania elementu allocationPolicy lub nie dla danego centrum iot.
|
|
authenticationType
|
IotHubAuthenticationType
|
Typ uwierzytelniania IotHub MI: KeyBased, UserAssigned, SystemAssigned.
|
|
connectionString
|
string
|
Parametry połączenia centrum IoT Hub. Jest to wymagane, gdy AuthenticationType jest KeyBased.
|
|
hostName
|
string
|
Nazwa hosta centrum IoT. Jest to wymagane, gdy connectionString nie jest dostępny.
|
|
location
|
string
|
Region usługi ARM centrum IoT.
|
|
name
|
string
|
Nazwa hosta centrum IoT.
|
|
selectedUserAssignedIdentityResourceId
|
string
(arm-id)
|
Wybrany identyfikator zasobu tożsamości przypisany przez użytkownika powiązany z hubem IoT. Jest to wymagane, gdy typ authenticationType ma wartość UserAssigned.
|
IpFilterActionType
Wyliczenie
Żądana akcja żądań przechwyconych przez tę regułę.
| Wartość |
Opis |
|
Accept
|
|
|
Reject
|
|
IpFilterRule
Objekt
Reguły filtrowania adresów IP dla usługi aprowizacji.
| Nazwa |
Typ |
Opis |
|
action
|
IpFilterActionType
|
Żądana akcja żądań przechwyconych przez tę regułę.
|
|
filterName
|
string
|
Nazwa reguły filtru adresów IP.
|
|
ipMask
|
string
|
Ciąg zawierający zakres adresów IP w notacji CIDR dla reguły.
|
|
target
|
IpFilterTargetType
|
Element docelowy dla żądań przechwyconych przez tę regułę.
|
IpFilterTargetType
Wyliczenie
Element docelowy dla żądań przechwyconych przez tę regułę.
| Wartość |
Opis |
|
all
|
|
|
serviceApi
|
|
|
deviceApi
|
|
ManagedServiceIdentity
Objekt
Tożsamość usługi zarządzanej (tożsamości przypisane przez system i/lub tożsamości przypisane przez użytkownika)
| Nazwa |
Typ |
Opis |
|
principalId
|
string
(uuid)
|
Identyfikator jednostki usługi tożsamości przypisanej przez system. Ta właściwość zostanie udostępniona tylko dla tożsamości przypisanej przez system.
|
|
tenantId
|
string
(uuid)
|
Identyfikator dzierżawy tożsamości przypisanej przez system. Ta właściwość zostanie udostępniona tylko dla tożsamości przypisanej przez system.
|
|
type
|
ManagedServiceIdentityType
|
Typ tożsamości usługi zarządzanej (gdzie dozwolone są typy SystemAssigned i UserAssigned).
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
tożsamości User-Assigned
Zestaw tożsamości przypisanych przez użytkownika skojarzonych z zasobem. Klucze słownika userAssignedIdentities będą identyfikatorami zasobów usługi ARM w postaci: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. Wartości słownika mogą być pustymi obiektami ({}) w żądaniach.
|
ManagedServiceIdentityType
Wyliczenie
Typ tożsamości usługi zarządzanej (gdzie dozwolone są typy SystemAssigned i UserAssigned).
| Wartość |
Opis |
|
None
|
|
|
SystemAssigned
|
|
|
UserAssigned
|
|
|
SystemAssigned,UserAssigned
|
|
PrivateEndpoint
Objekt
Właściwość prywatnego punktu końcowego połączenia prywatnego punktu końcowego
| Nazwa |
Typ |
Opis |
|
id
|
string
|
Identyfikator zasobu.
|
PrivateEndpointConnection
Objekt
Połączenie prywatnego punktu końcowego usługi aprowizacji
| Nazwa |
Typ |
Opis |
|
id
|
string
|
W pełni określony identyfikator zasobu dla tego zasobu. Przykład - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
|
name
|
string
|
Nazwa zasobu
|
|
properties
|
PrivateEndpointConnectionProperties
|
Właściwości połączenia prywatnego punktu końcowego
|
|
systemData
|
systemData
|
Metadane usługi Azure Resource Manager zawierające informacje „createdBy” i „modifiedBy”.
|
|
type
|
string
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
PrivateEndpointConnectionProperties
Objekt
Właściwości połączenia prywatnego punktu końcowego
| Nazwa |
Typ |
Opis |
|
privateEndpoint
|
PrivateEndpoint
|
Właściwość prywatnego punktu końcowego połączenia prywatnego punktu końcowego
|
|
privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
Bieżący stan połączenia prywatnego punktu końcowego
|
PrivateLinkServiceConnectionState
Objekt
Bieżący stan połączenia prywatnego punktu końcowego
| Nazwa |
Typ |
Opis |
|
actionsRequired
|
string
|
Akcje wymagane dla połączenia prywatnego punktu końcowego
|
|
description
|
string
|
Opis bieżącego stanu połączenia prywatnego punktu końcowego
|
|
status
|
PrivateLinkServiceConnectionStatus
|
Stan połączenia prywatnego punktu końcowego
|
PrivateLinkServiceConnectionStatus
Wyliczenie
Stan połączenia prywatnego punktu końcowego
| Wartość |
Opis |
|
Pending
|
|
|
Approved
|
|
|
Rejected
|
|
|
Disconnected
|
|
ProvisioningServiceDescription
Objekt
Opis usługi aprowizacji.
| Nazwa |
Typ |
Opis |
|
etag
|
string
|
Pole Etag nie jest wymagane. Jeśli jest on podany w treści odpowiedzi, musi być również podany jako nagłówek zgodnie z normalną konwencją ETag.
|
|
id
|
string
|
W pełni określony identyfikator zasobu dla tego zasobu. Przykład - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
|
identity
|
ManagedServiceIdentity
|
Tożsamości usługi zarządzanej przypisane do tego zasobu.
|
|
location
|
string
|
Lokalizacja geograficzna, w której znajduje się zasób
|
|
name
|
string
|
Nazwa zasobu
|
|
properties
|
IotDpsPropertiesDescription
|
Właściwości specyficzne dla usługi aprowizacji
|
|
resourcegroup
|
string
|
Grupa zasobów zasobu.
|
|
sku
|
IotDpsSkuInfo
|
Informacje o jednostce SKU dla usługi aprowizacji.
|
|
subscriptionid
|
string
|
Identyfikator subskrypcji zasobu.
|
|
systemData
|
systemData
|
Metadane usługi Azure Resource Manager zawierające informacje „createdBy” i „modifiedBy”.
|
|
tags
|
object
|
Tagi zasobów.
|
|
type
|
string
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
PublicNetworkAccess
Wyliczenie
Czy żądania z sieci publicznej są dozwolone
| Wartość |
Opis |
|
Enabled
|
|
|
Disabled
|
|
SharedAccessSignatureAuthorizationRuleAccessRightsDescription
Objekt
Opis klucza dostępu współdzielonego.
| Nazwa |
Typ |
Opis |
|
keyName
|
string
|
Nazwa klucza.
|
|
primaryKey
|
string
|
Podstawowa wartość klucza sygnatury dostępu współdzielonego.
|
|
rights
|
AccessRightsDescription
|
Prawa, które ma ten klucz.
|
|
secondaryKey
|
string
|
Pomocnicza wartość klucza sygnatury dostępu współdzielonego.
|
State
Wyliczenie
Bieżący stan usługi aprowizacji.
| Wartość |
Opis |
|
Activating
|
|
|
Active
|
|
|
Deleting
|
|
|
Deleted
|
|
|
ActivationFailed
|
|
|
DeletionFailed
|
|
|
Transitioning
|
|
|
Suspending
|
|
|
Suspended
|
|
|
Resuming
|
|
|
FailingOver
|
|
|
FailoverFailed
|
|
systemData
Objekt
Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.
| Nazwa |
Typ |
Opis |
|
createdAt
|
string
(date-time)
|
Sygnatura czasowa tworzenia zasobu (UTC).
|
|
createdBy
|
string
|
Tożsamość, która utworzyła zasób.
|
|
createdByType
|
createdByType
|
Typ tożsamości, która utworzyła zasób.
|
|
lastModifiedAt
|
string
(date-time)
|
Znacznik czasu ostatniej modyfikacji zasobu (UTC)
|
|
lastModifiedBy
|
string
|
Tożsamość, która ostatnio zmodyfikowała zasób.
|
|
lastModifiedByType
|
createdByType
|
Typ tożsamości, która ostatnio zmodyfikowała zasób.
|
UserAssignedIdentity
Objekt
Właściwości tożsamości przypisanej przez użytkownika
| Nazwa |
Typ |
Opis |
|
clientId
|
string
(uuid)
|
Identyfikator klienta przypisanej tożsamości.
|
|
principalId
|
string
(uuid)
|
Identyfikator podmiotu zabezpieczeń przypisanej tożsamości.
|