Namespaces - Create Or Update Authorization Rule

Membuat atau memperbarui aturan otorisasi untuk namespace.

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

Parameter URI

Name In Required Type Description
authorizationRuleName
path True
  • string

Nama aturan otorisasi.

namespaceName
path True
  • string

Nama namespace

resourceGroupName
path True
  • string

Nama grup Sumber Daya dalam langganan Azure.

subscriptionId
path True
  • string

Kredensial langganan yang secara unik mengidentifikasi langganan Microsoft Azure. ID langganan membentuk bagian dari URI untuk setiap panggilan layanan.

api-version
query True
  • string

Versi API klien.

Isi Permintaan

Name Required Type Description
properties.rights True
  • string[]

Hak yang terkait dengan aturan.

Respons

Name Type Description
200 OK

Permintaan untuk membuat aturan otorisasi namespace berhasil.

Other Status Codes

Respons kesalahan relai yang menjelaskan mengapa operasi gagal.

Keamanan

azure_auth

Azure Active Directory Flow OAuth2

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

Scopes

Name Description
user_impersonation meniru akun pengguna Anda

Contoh

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=2017-04-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"
    ]
  }
}

Definisi

AuthorizationRule

Deskripsi aturan otorisasi namespace.

ErrorResponse

Respons kesalahan menunjukkan layanan Relay tidak dapat memproses permintaan masuk. Alasannya disediakan dalam pesan kesalahan.

AuthorizationRule

Deskripsi aturan otorisasi namespace.

Name Type Description
id
  • string

ID Sumber Daya.

name
  • string

Nama sumber daya.

properties.rights
  • string[]

Hak yang terkait dengan aturan.

type
  • string

Jenis sumber daya

ErrorResponse

Respons kesalahan menunjukkan layanan Relay tidak dapat memproses permintaan masuk. Alasannya disediakan dalam pesan kesalahan.

Name Type Description
code
  • string

Kode Kesalahan.

message
  • string

Pesan kesalahan yang menunjukkan mengapa operasi gagal.