Broker Authentication - Create Or Update
Skapa en BrokerAuthenticationResource
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}?api-version=2025-10-01
URI-parametrar
| Name | I | Obligatorisk | Typ | Description |
|---|---|---|---|---|
|
authentication
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$ |
Namnet på autentiseringsresursen för instanskoordinator |
|
broker
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$ |
Namnet på asynkron meddelandekö. |
|
instance
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$ |
Namnet på instansen. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
Namnet på resursgruppen. Namnet är skiftlägesokänsligt. |
|
subscription
|
path | True |
string (uuid) |
ID för målprenumerationen. Värdet måste vara ett UUID. |
|
api-version
|
query | True |
string minLength: 1 |
Den API-version som ska användas för den här åtgärden. |
Begärandetext
| Name | Typ | Description |
|---|---|---|
| extendedLocation |
Resursens gränsplats. |
|
| properties |
Resursspecifika egenskaper för den här resursen. |
Svar
| Name | Typ | Description |
|---|---|---|
| 200 OK |
Uppdateringsåtgärden "BrokerAuthenticationResource" för resursen har slutförts |
|
| 201 Created |
Resursen "BrokerAuthenticationResource" för att skapa åtgärden lyckades Sidhuvuden
|
|
| Other Status Codes |
Ett oväntat felsvar. |
Säkerhet
azure_auth
Azure Active Directory OAuth2-flöde.
Typ:
oauth2
Flow:
implicit
Auktoriseringswebbadress:
https://login.microsoftonline.com/common/oauth2/authorize
Omfattningar
| Name | Description |
|---|---|
| user_impersonation | personifiera ditt användarkonto |
Exempel
|
Broker |
|
Broker |
BrokerAuthentication_CreateOrUpdate
Exempelbegäran
PUT https://management.azure.com/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123?api-version=2025-10-01
{
"properties": {
"authenticationMethods": [
{
"method": "Custom",
"customSettings": {
"auth": {
"x509": {
"secretRef": "secret-name"
}
},
"caCertConfigMap": "pdecudefqyolvncbus",
"endpoint": "https://www.example.com",
"headers": {
"key8518": "bwityjy"
}
},
"serviceAccountTokenSettings": {
"audiences": [
"jqyhyqatuydg"
]
},
"x509Settings": {
"authorizationAttributes": {
"key3384": {
"attributes": {
"key186": "ucpajramsz"
},
"subject": "jpgwctfeixitptfgfnqhua"
}
},
"trustedClientCaCert": "vlctsqddl"
}
}
]
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
}
}
Exempelsvar
{
"properties": {
"authenticationMethods": [
{
"method": "Custom",
"customSettings": {
"auth": {
"x509": {
"secretRef": "secret-name"
}
},
"caCertConfigMap": "pdecudefqyolvncbus",
"endpoint": "https://www.example.com",
"headers": {
"key8518": "bwityjy"
}
},
"serviceAccountTokenSettings": {
"audiences": [
"jqyhyqatuydg"
]
},
"x509Settings": {
"authorizationAttributes": {
"key3384": {
"attributes": {
"key186": "ucpajramsz"
},
"subject": "jpgwctfeixitptfgfnqhua"
}
},
"trustedClientCaCert": "vlctsqddl"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123",
"name": "lwucizfvtsdpx",
"type": "Microsoft.IoTOperations/instances/brokers/authentications",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"authenticationMethods": [
{
"method": "Custom",
"customSettings": {
"auth": {
"x509": {
"secretRef": "secret-name"
}
},
"caCertConfigMap": "pdecudefqyolvncbus",
"endpoint": "https://www.example.com",
"headers": {
"key8518": "bwityjy"
}
},
"serviceAccountTokenSettings": {
"audiences": [
"jqyhyqatuydg"
]
},
"x509Settings": {
"authorizationAttributes": {
"key3384": {
"attributes": {
"key186": "ucpajramsz"
},
"subject": "jpgwctfeixitptfgfnqhua"
}
},
"trustedClientCaCert": "vlctsqddl"
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123",
"name": "lwucizfvtsdpx",
"type": "Microsoft.IoTOperations/instances/brokers/authentications",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
BrokerAuthentication_CreateOrUpdate_Complex
Exempelbegäran
PUT https://management.azure.com/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123?api-version=2025-10-01
{
"properties": {
"authenticationMethods": [
{
"method": "ServiceAccountToken",
"serviceAccountTokenSettings": {
"audiences": [
"aio-internal"
]
}
},
{
"method": "X509",
"x509Settings": {
"trustedClientCaCert": "my-ca",
"authorizationAttributes": {
"root": {
"subject": "CN = Contoso Root CA Cert, OU = Engineering, C = US",
"attributes": {
"organization": "contoso"
}
},
"intermediate": {
"subject": "CN = Contoso Intermediate CA",
"attributes": {
"city": "seattle",
"foo": "bar"
}
},
"smart-fan": {
"subject": "CN = smart-fan",
"attributes": {
"building": "17"
}
}
}
}
}
]
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
}
}
Exempelsvar
{
"properties": {
"authenticationMethods": [
{
"method": "ServiceAccountToken",
"serviceAccountTokenSettings": {
"audiences": [
"aio-internal"
]
}
},
{
"method": "X509",
"x509Settings": {
"trustedClientCaCert": "my-ca",
"authorizationAttributes": {
"root": {
"subject": "CN = Contoso Root CA Cert, OU = Engineering, C = US",
"attributes": {
"organization": "contoso"
}
},
"intermediate": {
"subject": "CN = Contoso Intermediate CA",
"attributes": {
"city": "seattle",
"foo": "bar"
}
},
"smart-fan": {
"subject": "CN = smart-fan",
"attributes": {
"building": "17"
}
}
}
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123",
"name": "lwucizfvtsdpx",
"type": "Microsoft.IoTOperations/instances/brokers/authentications",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"authenticationMethods": [
{
"method": "ServiceAccountToken",
"serviceAccountTokenSettings": {
"audiences": [
"aio-internal"
]
}
},
{
"method": "X509",
"x509Settings": {
"trustedClientCaCert": "my-ca",
"authorizationAttributes": {
"root": {
"subject": "CN = Contoso Root CA Cert, OU = Engineering, C = US",
"attributes": {
"organization": "contoso"
}
},
"intermediate": {
"subject": "CN = Contoso Intermediate CA",
"attributes": {
"city": "seattle",
"foo": "bar"
}
},
"smart-fan": {
"subject": "CN = smart-fan",
"attributes": {
"building": "17"
}
}
}
}
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.ExtendedLocation/customLocations/resource-123",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123",
"name": "lwucizfvtsdpx",
"type": "Microsoft.IoTOperations/instances/brokers/authentications",
"systemData": {
"createdBy": "contosouser",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "contosouser",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Definitioner
| Name | Description |
|---|---|
|
Broker |
Autentiseringsläge för mäklare |
|
Broker |
Egenskaper för BrokerAuthentication-resurs |
|
Broker |
Autentiseringsresurs för asynkron instanskoordinator |
|
Broker |
Egenskaper för anpassad autentisering |
|
Broker |
Anpassad metod för BrokerAuthentication |
|
Broker |
Uppsättning autentiseringsprinciper för asynkron meddelandekö. Endast en metod stöds för varje post. |
|
Broker |
Tjänstkontotoken för BrokerAuthentication |
|
Broker |
X509 för BrokerAuthentication. |
|
Broker |
BrokerAuthenticatorMethodX509Attributes egenskaper. |
|
Broker |
Valideringsmetoder för X509-autentisering. |
|
created |
Den typ av identitet som skapade resursen. |
|
Error |
Ytterligare information om resurshanteringsfelet. |
|
Error |
Felinformationen. |
|
Error |
Felsvar |
|
Extended |
Utökad plats är en utökning av Azure-platser. De är ett sätt att använda sina Azure ARC-aktiverade Kubernetes-kluster som målplatser för att distribuera instanser av Azure-tjänster. |
|
Extended |
Uppräkningen som definierar typen av ExtendedLocation accepterad. |
|
Provisioning |
Uppräkningen som definierar status för resursen. |
|
Resource |
Resursens hälsotillstånd. |
|
system |
Metadata som rör skapande och senaste ändring av resursen. |
|
X509Manual |
Egenskaper för X509-certifikatautentisering. |
BrokerAuthenticationMethod
Autentiseringsläge för mäklare
| Värde | Description |
|---|---|
| Custom |
Anpassad autentiseringskonfiguration. |
| ServiceAccountToken |
ServiceAccountToken-autentiseringskonfiguration. |
| X509 |
X.509-autentiseringskonfiguration. |
BrokerAuthenticationProperties
Egenskaper för BrokerAuthentication-resurs
| Name | Typ | Standardvärde | Description |
|---|---|---|---|
| authenticationMethods |
Definierar en uppsättning broker-autentiseringsmetoder som ska användas på |
||
| healthState | Unknown |
Resursens hälsotillstånd. |
|
| provisioningState |
Status för den senaste åtgärden. |
BrokerAuthenticationResource
Autentiseringsresurs för asynkron instanskoordinator
| Name | Typ | Description |
|---|---|---|
| extendedLocation |
Resursens gränsplats. |
|
| id |
string (arm-id) |
Fullständigt kvalificerat resurs-ID för resursen. Till exempel "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| name |
string |
Namnet på resursen |
| properties |
Resursspecifika egenskaper för den här resursen. |
|
| systemData |
Azure Resource Manager-metadata som innehåller createdBy och modifiedBy information. |
|
| type |
string |
Resurstypen. T.ex. "Microsoft.Compute/virtualMachines" eller "Microsoft.Storage/storageAccounts" |
BrokerAuthenticatorCustomAuth
Egenskaper för anpassad autentisering
| Name | Typ | Description |
|---|---|---|
| x509 |
Information om anpassad X509-autentiseringstyp. |
BrokerAuthenticatorMethodCustom
Anpassad metod för BrokerAuthentication
| Name | Typ | Description |
|---|---|---|
| auth |
Valfri autentisering som krävs för autentisering med den anpassade autentiseringsservern. |
|
| caCertConfigMap |
string |
Valfritt CA-certifikat för validering av certifikatet för den anpassade autentiseringsservern. |
| endpoint |
string (uri) pattern: ^https://.*$ |
Slutpunkten för den anpassade autentiseringsservern. Måste vara en HTTPS-slutpunkt. |
| headers |
object |
Ytterligare HTTP-huvuden som ska skickas till den anpassade autentiseringsservern. |
BrokerAuthenticatorMethods
Uppsättning autentiseringsprinciper för asynkron meddelandekö. Endast en metod stöds för varje post.
| Name | Typ | Description |
|---|---|---|
| customSettings |
Anpassad autentiseringskonfiguration. |
|
| method |
Anpassad autentiseringskonfiguration. |
|
| serviceAccountTokenSettings |
ServiceAccountToken-autentiseringskonfiguration. |
|
| x509Settings |
X.509-autentiseringskonfiguration. |
BrokerAuthenticatorMethodSat
Tjänstkontotoken för BrokerAuthentication
| Name | Typ | Description |
|---|---|---|
| audiences |
string[] |
Lista över tillåtna målgrupper. |
BrokerAuthenticatorMethodX509
X509 för BrokerAuthentication.
| Name | Typ | Standardvärde | Description |
|---|---|---|---|
| additionalValidation |
Egenskaper för X509-autentiseringsattribut. |
||
| authorizationAttributes |
<string,
Broker |
Egenskaper för X509-auktoriseringsattribut. |
|
| trustedClientCaCert |
string |
client-ca |
Namnet på den betrodda certifikatresursen för klientcertifikat. |
BrokerAuthenticatorMethodX509Attributes
BrokerAuthenticatorMethodX509Attributes egenskaper.
| Name | Typ | Description |
|---|---|---|
| attributes |
object |
Attribut -objektet. |
| subject |
string |
Ämne för X509-attributet. |
BrokerAuthenticatorValidationMethods
Valideringsmetoder för X509-autentisering.
| Värde | Description |
|---|---|
| None |
Ingen ytterligare validering utförs |
| AzureDeviceRegistry |
Ytterligare verifiering utförs med hjälp av Azure Device Registry. |
createdByType
Den typ av identitet som skapade resursen.
| Värde | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
Ytterligare information om resurshanteringsfelet.
| Name | Typ | Description |
|---|---|---|
| info |
object |
Ytterligare information. |
| type |
string |
Ytterligare informationstyp. |
ErrorDetail
Felinformationen.
| Name | Typ | Description |
|---|---|---|
| additionalInfo |
Ytterligare information om felet. |
|
| code |
string |
Felkoden. |
| details |
Felinformationen. |
|
| message |
string |
Felmeddelandet. |
| target |
string |
Felmålet. |
ErrorResponse
Felsvar
| Name | Typ | Description |
|---|---|---|
| error |
Felobjektet. |
ExtendedLocation
Utökad plats är en utökning av Azure-platser. De är ett sätt att använda sina Azure ARC-aktiverade Kubernetes-kluster som målplatser för att distribuera instanser av Azure-tjänster.
| Name | Typ | Description |
|---|---|---|
| name |
string |
Namnet på den utökade platsen. |
| type |
Typ av ExtendedLocation. |
ExtendedLocationType
Uppräkningen som definierar typen av ExtendedLocation accepterad.
| Värde | Description |
|---|---|
| CustomLocation |
CustomLocation-typ |
ProvisioningState
Uppräkningen som definierar status för resursen.
| Värde | Description |
|---|---|
| Succeeded |
Resursen har skapats. |
| Failed |
Det gick inte att skapa resurser. |
| Canceled |
Resursskapandet avbröts. |
| Provisioning |
Resursen etableras. |
| Updating |
Resursen uppdateras. |
| Deleting |
Resursen tas bort. |
| Accepted |
Resursen har godkänts. |
ResourceHealthState
Resursens hälsotillstånd.
| Värde | Description |
|---|---|
| Available |
Resursen är tillgänglig och fungerar som förväntat. |
| Degraded |
Resurshälsan försämras. |
| Unavailable |
Resursen fungerar inte som förväntat. |
| Unknown |
Resurstillståndet är okänt. |
systemData
Metadata som rör skapande och senaste ändring av resursen.
| Name | Typ | Description |
|---|---|---|
| createdAt |
string (date-time) |
Tidsstämpeln för resursskapande (UTC). |
| createdBy |
string |
Identiteten som skapade resursen. |
| createdByType |
Den typ av identitet som skapade resursen. |
|
| lastModifiedAt |
string (date-time) |
Tidsstämpeln för resursens senaste ändring (UTC) |
| lastModifiedBy |
string |
Identiteten som senast ändrade resursen. |
| lastModifiedByType |
Den typ av identitet som senast ändrade resursen. |
X509ManualCertificate
Egenskaper för X509-certifikatautentisering.
| Name | Typ | Description |
|---|---|---|
| secretRef |
string |
Kubernetes-hemlighet som innehåller ett X.509-klientcertifikat. Det här är en referens till hemligheten via ett identifierande namn, inte själva hemligheten. |