Dela via


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
authenticationName
path True

string

minLength: 3
maxLength: 63
pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$

Namnet på autentiseringsresursen för instanskoordinator

brokerName
path True

string

minLength: 3
maxLength: 63
pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$

Namnet på asynkron meddelandekö.

instanceName
path True

string

minLength: 3
maxLength: 63
pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$

Namnet på instansen.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Namnet på resursgruppen. Namnet är skiftlägesokänsligt.

subscriptionId
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

ExtendedLocation

Resursens gränsplats.

properties

BrokerAuthenticationProperties

Resursspecifika egenskaper för den här resursen.

Svar

Name Typ Description
200 OK

BrokerAuthenticationResource

Uppdateringsåtgärden "BrokerAuthenticationResource" för resursen har slutförts

201 Created

BrokerAuthenticationResource

Resursen "BrokerAuthenticationResource" för att skapa åtgärden lyckades

Sidhuvuden

  • Azure-AsyncOperation: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

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

BrokerAuthentication_CreateOrUpdate
BrokerAuthentication_CreateOrUpdate_Complex

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
BrokerAuthenticationMethod

Autentiseringsläge för mäklare

BrokerAuthenticationProperties

Egenskaper för BrokerAuthentication-resurs

BrokerAuthenticationResource

Autentiseringsresurs för asynkron instanskoordinator

BrokerAuthenticatorCustomAuth

Egenskaper för anpassad autentisering

BrokerAuthenticatorMethodCustom

Anpassad metod för BrokerAuthentication

BrokerAuthenticatorMethods

Uppsättning autentiseringsprinciper för asynkron meddelandekö. Endast en metod stöds för varje post.

BrokerAuthenticatorMethodSat

Tjänstkontotoken för BrokerAuthentication

BrokerAuthenticatorMethodX509

X509 för BrokerAuthentication.

BrokerAuthenticatorMethodX509Attributes

BrokerAuthenticatorMethodX509Attributes egenskaper.

BrokerAuthenticatorValidationMethods

Valideringsmetoder för X509-autentisering.

createdByType

Den typ av identitet som skapade resursen.

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

ErrorDetail

Felinformationen.

ErrorResponse

Felsvar

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.

ExtendedLocationType

Uppräkningen som definierar typen av ExtendedLocation accepterad.

ProvisioningState

Uppräkningen som definierar status för resursen.

ResourceHealthState

Resursens hälsotillstånd.

systemData

Metadata som rör skapande och senaste ändring av resursen.

X509ManualCertificate

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

BrokerAuthenticatorMethods[]

Definierar en uppsättning broker-autentiseringsmetoder som ska användas på BrokerListeners. För varje matriselement stöds en autentiseringstyp.

healthState

ResourceHealthState

Unknown

Resursens hälsotillstånd.

provisioningState

ProvisioningState

Status för den senaste åtgärden.

BrokerAuthenticationResource

Autentiseringsresurs för asynkron instanskoordinator

Name Typ Description
extendedLocation

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

BrokerAuthenticationProperties

Resursspecifika egenskaper för den här resursen.

systemData

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

X509ManualCertificate

Information om anpassad X509-autentiseringstyp.

BrokerAuthenticatorMethodCustom

Anpassad metod för BrokerAuthentication

Name Typ Description
auth

BrokerAuthenticatorCustomAuth

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

BrokerAuthenticatorMethodCustom

Anpassad autentiseringskonfiguration.

method

BrokerAuthenticationMethod

Anpassad autentiseringskonfiguration.

serviceAccountTokenSettings

BrokerAuthenticatorMethodSat

ServiceAccountToken-autentiseringskonfiguration.

x509Settings

BrokerAuthenticatorMethodX509

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

BrokerAuthenticatorValidationMethods

Egenskaper för X509-autentiseringsattribut.

authorizationAttributes

<string,  BrokerAuthenticatorMethodX509Attributes>

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

ErrorAdditionalInfo[]

Ytterligare information om felet.

code

string

Felkoden.

details

ErrorDetail[]

Felinformationen.

message

string

Felmeddelandet.

target

string

Felmålet.

ErrorResponse

Felsvar

Name Typ Description
error

ErrorDetail

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

ExtendedLocationType

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

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

createdByType

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.