Aracılığıyla paylaş


Namespaces - Create Or Update Authorization Rule

Ad alanı için yetkilendirme kuralı oluşturur

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

URI Parametreleri

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

string

minLength: 1
maxLength: 256
pattern: ^[a-zA-Z0-9!()*-._]+$

Yetkilendirme Kuralı Adı

namespaceName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-zA-Z][a-zA-Z0-9-]*$

Namespace ismi

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Kaynak grubunun adı. Ad büyük/küçük harfe duyarsız.

subscriptionId
path True

string (uuid)

Hedef aboneliğin kimliği. Değer bir UUID olmalıdır.

api-version
query True

string

minLength: 1

Bu işlem için kullanılacak API sürümü.

İstek Gövdesi

Name Tür Description
location

string

Kullanım dışı - yalnızca uyumluluk için.

properties

SharedAccessAuthorizationRuleProperties

SharedAccessAuthorizationRule özellikleri.

tags

object

Kullanım dışı - yalnızca uyumluluk için.

Yanıtlar

Name Tür Description
200 OK

SharedAccessAuthorizationRuleResource

Güncel -leştirilmiş

201 Created

SharedAccessAuthorizationRuleResource

Oluşturuldu

Other Status Codes

ErrorResponse

Nedeni olan hata kodu.

Güvenlik

azure_auth

Azure Active Directory OAuth2 Akışı

Tür: oauth2
Akış: implicit
Yetkilendirme URL’si: https://login.microsoftonline.com/common/oauth2/authorize

Kapsamlar

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

Örnekler

Namespaces_CreateOrUpdateAuthorizationRule

Örnek isteği

PUT https://management.azure.com/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/authorizationRules/sdk-AuthRules-1788?api-version=2023-09-01

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

Örnek yanıt

{
  "properties": {
    "rights": [
      "Listen",
      "Send"
    ],
    "modifiedTime": "2023-04-26T10:09:19.9675121+00:00",
    "createdTime": "2023-04-26T10:09:19.9675121+00:00"
  },
  "id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/authorizationRules/NewAuthorizationRule",
  "name": "NewAuthorizationRule",
  "type": "Microsoft.NotificationHubs/namespaces/authorizationRules"
}
{
  "properties": {
    "rights": [
      "Listen",
      "Send"
    ],
    "modifiedTime": "2023-04-26T10:09:19.9675121+00:00",
    "createdTime": "2023-04-26T10:09:19.9675121+00:00"
  },
  "id": "/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/authorizationRules/NewAuthorizationRule",
  "name": "NewAuthorizationRule",
  "type": "Microsoft.NotificationHubs/namespaces/authorizationRules"
}

Tanımlar

Name Description
AccessRights

AccessRights değerlerini tanımlar.

createdByType

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

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorDetail

Hata ayrıntısı.

ErrorResponse

Hata yanıtı

SharedAccessAuthorizationRuleProperties

SharedAccessAuthorizationRule özellikleri.

SharedAccessAuthorizationRuleResource

Tek bir SharedAccessAuthorizationRule döndüren POST istekleri için yanıt.

systemData

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

AccessRights

AccessRights değerlerini tanımlar.

Değer Description
Manage
Send
Listen

createdByType

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

Değer Description
User
Application
ManagedIdentity
Key

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.

SharedAccessAuthorizationRuleProperties

SharedAccessAuthorizationRule özellikleri.

Name Tür Description
claimType

string

Talep türünü açıklayan bir dize alır

claimValue

string

Talep değerini açıklayan bir dize alır

createdTime

string (date-time)

Bu kural için oluşturulan zamanı alır

keyName

string

Yetkilendirme kuralını açıklayan bir dize alır.

modifiedTime

string (date-time)

Bu kural için son değiştirme zamanını alır

primaryKey

string

SAS belirtecini imzalamak ve doğrulamak için base64 kodlu 256 bit birincil anahtarı alır.

revision

integer (int32)

Kuralın düzeltme numarasını alır

rights

AccessRights[]

Kuralla ilişkili hakları alır veya ayarlar.

secondaryKey

string

SAS belirtecini imzalamak ve doğrulamak için base64 kodlu 256 bit birincil anahtarı alır.

SharedAccessAuthorizationRuleResource

Tek bir SharedAccessAuthorizationRule döndüren POST istekleri için yanıt.

Name Tür Description
id

string (arm-id)

Kaynağın tam kaynak kimliği. Örneğin, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

location

string

Kullanım dışı - yalnızca uyumluluk için.

name

string

Kaynağın adı

properties

SharedAccessAuthorizationRuleProperties

SharedAccessAuthorizationRule özellikleri.

systemData

systemData

createdBy ve modifiedBy bilgilerini içeren Azure Resource Manager meta verileri.

tags

object

Kullanım dışı - yalnızca uyumluluk için.

type

string

Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"

systemData

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

Name Tür Description
createdAt

string (date-time)

Kaynak oluşturma (UTC) zaman damgası.

createdBy

string

Kaynağı oluşturan kimlik.

createdByType

createdByType

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

lastModifiedAt

string (date-time)

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 kimlik türü.