Megosztás a következőn keresztül:


Topics - Authorization Rules - Create Or Update Authorization Rule

Létrehoz egy engedélyezési szabályt a megadott témakörhöz.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/authorizationRules/{authorizationRuleName}?api-version=2024-01-01

URI-paraméterek

Name In Kötelező Típus Description
authorizationRuleName
path True

string

minLength: 1
maxLength: 50

Az engedélyezési szabály neve.

namespaceName
path True

string

minLength: 6
maxLength: 50

A névtér neve

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Az erőforráscsoport neve. A név nem megkülönbözteti a kis- és nagybetűket.

subscriptionId
path True

string

Az előfizetés hitelesítő adatai, amelyek egyedileg azonosítják a Microsoft Azure-előfizetést. Az előfizetés azonosítója minden szolgáltatáshíváshoz az URI részét képezi.

topicName
path True

string

minLength: 1

A témakör neve.

api-version
query True

string

minLength: 1

A művelethez használni kívánt API-verzió.

Kérelem törzse

Name Kötelező Típus Description
properties.rights True

AccessRights[]

A szabályhoz társított jogok.

Válaszok

Name Típus Description
200 OK

SBAuthorizationRule

A témakör engedélyezési szabálya sikeresen létrejött.

Other Status Codes

ErrorResponse

ServiceBus-hibaválasz, amely leírja, hogy miért nem sikerült a művelet.

Biztonság

azure_auth

Azure Active Directory OAuth2 Flow

Típus: oauth2
Folyamat: implicit
Engedélyezési URL: https://login.microsoftonline.com/common/oauth2/authorize

Hatókörök

Name Description
user_impersonation a felhasználói fiók megszemélyesítése

Példák

TopicAuthorizationRuleCreate

Mintakérelem

PUT https://management.azure.com/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6261/topics/sdk-Topics-1984/authorizationRules/sdk-AuthRules-4310?api-version=2024-01-01

{
  "properties": {
    "rights": [
      "Listen",
      "Send"
    ]
  }
}

Mintaválasz

{
  "id": "/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-6261/topics/sdk-Topics-1984/authorizationRules/sdk-AuthRules-4310",
  "name": "sdk-AuthRules-4310",
  "type": "Microsoft.ServiceBus/Namespaces/Topics/AuthorizationRules",
  "properties": {
    "rights": [
      "Listen",
      "Send"
    ]
  }
}

Definíciók

Name Description
AccessRights

A szabályhoz társított jogok.

createdByType

Az erőforrást létrehozó identitás típusa.

Error

A hibaobjektum.

ErrorAdditionalInfo

Az erőforrás-kezelési hiba további információi.

ErrorResponse

Az erőforrás-kezelési hibaválasz.

SBAuthorizationRule

A névtér engedélyezési szabályának leírása.

systemData

Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok.

AccessRights

A szabályhoz társított jogok.

Érték Description
Listen
Manage
Send

createdByType

Az erőforrást létrehozó identitás típusa.

Érték Description
Application
Key
ManagedIdentity
User

Error

A hibaobjektum.

Name Típus Description
additionalInfo

ErrorAdditionalInfo[]

A hiba további információi.

code

string

A hibakód.

details

ErrorResponse[]

A hiba részletei.

message

string

A hibaüzenet.

target

string

A hibacél.

ErrorAdditionalInfo

Az erőforrás-kezelési hiba további információi.

Name Típus Description
info

object

A további információk.

type

string

A további információtípus.

ErrorResponse

Az erőforrás-kezelési hibaválasz.

Name Típus Description
error

Error

A hibaobjektum.

SBAuthorizationRule

A névtér engedélyezési szabályának leírása.

Name Típus Description
id

string

Az erőforrás teljes erőforrás-azonosítója. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

Az a földrajzi hely, ahol az erőforrás él

name

string

Az erőforrás neve

properties.rights

AccessRights[]

A szabályhoz társított jogok.

systemData

systemData

Az erőforráshoz kapcsolódó rendszer metaadatai.

type

string

Az erőforrás típusa. Pl. "Microsoft.EventHub/Namespaces" vagy "Microsoft.EventHub/Namespaces/EventHubs"

systemData

Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok.

Name Típus Description
createdAt

string (date-time)

Az erőforrás-létrehozás időbélyege (UTC).

createdBy

string

Az erőforrást létrehozó identitás.

createdByType

createdByType

Az erőforrást létrehozó identitás típusa.

lastModifiedAt

string (date-time)

Az erőforrást legutóbb módosító identitás típusa.

lastModifiedBy

string

Az erőforrást legutóbb módosító identitás.

lastModifiedByType

createdByType

Az erőforrást legutóbb módosító identitás típusa.