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 |
|---|---|---|---|---|
|
authorization
|
path | True |
|
Nama aturan otorisasi. |
|
namespace
|
path | True |
|
Nama namespace |
|
resource
|
path | True |
|
Nama grup Sumber Daya dalam langganan Azure. |
|
subscription
|
path | True |
|
Kredensial langganan yang secara unik mengidentifikasi langganan Microsoft Azure. ID langganan membentuk bagian dari URI untuk setiap panggilan layanan. |
|
api-version
|
query | True |
|
Versi API klien. |
Isi Permintaan
| Name | Required | Type | Description |
|---|---|---|---|
| properties.rights | True |
|
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
|
Authorization |
Deskripsi aturan otorisasi namespace. |
|
Error |
Respons kesalahan menunjukkan layanan Relay tidak dapat memproses permintaan masuk. Alasannya disediakan dalam pesan kesalahan. |
AuthorizationRule
Deskripsi aturan otorisasi namespace.
| Name | Type | Description |
|---|---|---|
| id |
|
ID Sumber Daya. |
| name |
|
Nama sumber daya. |
| properties.rights |
|
Hak yang terkait dengan aturan. |
| type |
|
Jenis sumber daya |
ErrorResponse
Respons kesalahan menunjukkan layanan Relay tidak dapat memproses permintaan masuk. Alasannya disediakan dalam pesan kesalahan.
| Name | Type | Description |
|---|---|---|
| code |
|
Kode Kesalahan. |
| message |
|
Pesan kesalahan yang menunjukkan mengapa operasi gagal. |