Share via


Namespaces - Create Or Update Authorization Rule

Ad alanı için yetkilendirme kuralı oluşturur veya güncelleştirir.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}?api-version=2021-11-01

URI Parametreleri

Name İçinde Gerekli Tür Description
authorizationRuleName
path True

string

Yetkilendirme kuralı adı.

namespaceName
path True

string

Ad alanı adı

resourceGroupName
path True

string

Azure aboneliğindeki Kaynak grubunun adı.

subscriptionId
path True

string

Microsoft Azure aboneliğini benzersiz olarak tanımlayan abonelik kimlik bilgileri. Abonelik kimliği, her hizmet çağrısı için URI'nin bir parçasını oluşturur.

api-version
query True

string

İstemci API sürümü.

İstek Gövdesi

Name Tür Description
parameters

AuthorizationRule

Yetkilendirme kuralı parametreleri.

Yanıtlar

Name Tür Description
200 OK

AuthorizationRule

Ad alanı yetkilendirme kuralı oluşturma isteği başarılı oldu.

Other Status Codes

ErrorResponse

İşlemin neden başarısız olduğunu açıklayan geçiş hatası yanıtı.

Güvenlik

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation kullanıcı hesabınızın kimliğine bürünme

Örnekler

RelayNameSpaceAuthorizationRuleCreate

Sample Request

PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/authorizationRules/example-RelayAuthRules-01?api-version=2021-11-01

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

Sample Response

{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/AuthorizationRules/example-RelayAuthRules-01",
  "name": "example-RelayAuthRules-01",
  "type": "Microsoft.Relay/Namespaces/AuthorizationRules",
  "properties": {
    "rights": [
      "Listen",
      "Send"
    ]
  }
}

Tanımlar

Name Description
AccessRights

Kuralla ilişkili haklar.

AuthorizationRule

List veya Get AuthorizationRule işlemindeki tek öğe

createdByType

Kaynağı oluşturan kimliğin türü.

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorDetail

Hata ayrıntısı.

ErrorResponse

Hata yanıtı

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

AccessRights

Kuralla ilişkili haklar.

Name Tür Description
Listen

string

Manage

string

Send

string

AuthorizationRule

List veya Get AuthorizationRule işlemindeki tek öğe

Name Tür Description
id

string

Kaynağın tam kaynak kimliği. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

Kaynağın bulunduğu coğrafi konum

name

string

Kaynağın adı

properties.rights

AccessRights[]

Kuralla ilişkili haklar.

systemData

systemData

Bu kaynakla ilgili sistem meta verileri.

type

string

Kaynağın türü. Örneğin, "Microsoft.EventHub/Namespaces" veya "Microsoft.EventHub/Namespaces/EventHubs"

createdByType

Kaynağı oluşturan kimliğin türü.

Name Tür Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

Name Tür Description
info

object

Ek bilgiler.

type

string

Ek bilgi türü.

ErrorDetail

Hata ayrıntısı.

Name Tür Description
additionalInfo

ErrorAdditionalInfo[]

Hata ek bilgileri.

code

string

Hata kodu.

details

ErrorDetail[]

Hata ayrıntıları.

message

string

Hata iletisi.

target

string

Hata hedefi.

ErrorResponse

Hata yanıtı

Name Tür Description
error

ErrorDetail

Hata nesnesi.

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

Name Tür Description
createdAt

string

Kaynak oluşturma (UTC) zaman damgası.

createdBy

string

Kaynağı oluşturan kimlik.

createdByType

createdByType

Kaynağı oluşturan kimliğin türü.

lastModifiedAt

string

Kaynağın son değişikliğinin zaman damgası (UTC)

lastModifiedBy

string

Kaynağı en son değiştiren kimlik.

lastModifiedByType

createdByType

Kaynağı en son değiştiren kimliğin türü.