Bagikan melalui


Gremlin Resources - Create Update Gremlin Role Assignment

Membuat atau memperbarui Penetapan Peran Gremlin Azure Cosmos DB.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinRoleAssignments/{roleAssignmentId}?api-version=2025-11-01-preview

Parameter URI

Nama Dalam Diperlukan Jenis Deskripsi
accountName
path True

string

minLength: 3
maxLength: 50
pattern: ^[a-z0-9]+(-[a-z0-9]+)*

Nama akun database Cosmos DB.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Nama grup sumber daya. Nama tidak sensitif terhadap penggunaan huruf besar atau kecil.

roleAssignmentId
path True

string

GUID untuk penetapan peran.

subscriptionId
path True

string (uuid)

ID langganan target. Nilainya harus sebuah UUID.

api-version
query True

string

minLength: 1

Versi API yang digunakan untuk operasi ini.

Isi Permintaan

Nama Jenis Deskripsi
createUpdateGremlinRoleAssignmentParameters

GremlinRoleAssignmentResource

Properti yang diperlukan untuk membuat atau memperbarui Penetapan Peran.

Respons

Nama Jenis Deskripsi
200 OK

GremlinRoleAssignmentResource

Operasi pembuatan atau pembaruan Penetapan Peran berhasil diselesaikan.

202 Accepted

Permintaan pembuatan atau pembaruan Penetapan Peran diterima dan akan diselesaikan secara asinkron.

Header

  • azure-AsyncOperation: string
  • location: string
Other Status Codes

ErrorResponse

Respons kesalahan yang menjelaskan mengapa operasi gagal.

Keamanan

azure_auth

Alur OAuth2 Azure Active Directory

Jenis: oauth2
Alur: implicit
URL Otorisasi: https://login.microsoftonline.com/common/oauth2/authorize

Cakupan

Nama Deskripsi
user_impersonation Meniru akun pengguna Anda

Contoh

CosmosDBGremlinRoleAssignmentCreateUpdate

Permintaan sampel

PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/gremlinRoleAssignments/myRoleAssignmentId?api-version=2025-11-01-preview

{
  "properties": {
    "roleDefinitionId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/gremlinRoleDefinitions/myRoleDefinitionId",
    "scope": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases/colls/redmond-purchases",
    "principalId": "myPrincipalId"
  }
}

Respon sampel

{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/gremlinRoleAssignments/myRoleAssignmentId",
  "name": "myRoleAssignmentId",
  "type": "Microsoft.DocumentDB/databaseAccounts/gremlinRoleAssignments",
  "properties": {
    "roleDefinitionId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/gremlinRoleDefinitions/myRoleDefinitionId",
    "scope": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/dbs/purchases/colls/redmond-purchases",
    "principalId": "myPrincipalId"
  }
}
azure-AsyncOperation: https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/operationsStatus/{operationId}?api-version=2025-11-01-preview
location: https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/operationsStatus/{operationId}?api-version=2025-11-01-preview

Definisi

Nama Deskripsi
createdByType

Jenis identitas yang membuat sumber daya.

ErrorResponse

Respons Kesalahan.

GremlinRoleAssignmentResource

Parameter untuk membuat dan memperbarui Penetapan Peran Gremlin Azure Cosmos DB.

systemData

Metadata Azure Resource Manager yang berisi informasi createBy dan modifiedBy.

createdByType

Jenis identitas yang membuat sumber daya.

Nilai Deskripsi
User
Application
ManagedIdentity
Key

ErrorResponse

Respons Kesalahan.

Nama Jenis Deskripsi
code

string

Kode kesalahan.

message

string

Pesan kesalahan yang menunjukkan mengapa operasi gagal.

GremlinRoleAssignmentResource

Parameter untuk membuat dan memperbarui Penetapan Peran Gremlin Azure Cosmos DB.

Nama Jenis Deskripsi
id

string (arm-id)

ID sumber daya yang sepenuhnya memenuhi syarat untuk sumber daya. Misalnya "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

Nama sumber daya

properties.principalId

string

Pengidentifikasi unik untuk prinsipal AAD terkait dalam grafik AAD tempat akses diberikan melalui Penetapan Peran Gremlin ini. ID Penyewa untuk prinsipal disimpulkan menggunakan penyewa yang terkait dengan langganan.

properties.provisioningState

string

Status provisi sumber daya.

properties.roleDefinitionId

string

Pengidentifikasi unik untuk Definisi Peran terkait.

properties.scope

string

Jalur sumber daya sarana data yang aksesnya diberikan melalui Penetapan Peran Gremlin ini.

systemData

systemData

Metadata Azure Resource Manager yang berisi informasi createBy dan modifiedBy.

type

string

Jenis sumber daya. Misalnya "Microsoft.Compute/virtualMachines" atau "Microsoft.Storage/storageAccounts"

systemData

Metadata Azure Resource Manager yang berisi informasi createBy dan modifiedBy.

Nama Jenis Deskripsi
createdAt

string (date-time)

Tanda waktu pembuatan sumber daya (UTC).

createdBy

string

Identitas yang membuat sumber daya.

createdByType

createdByType

Jenis identitas yang membuat sumber daya.

lastModifiedAt

string (date-time)

Tanda waktu modifikasi terakhir sumber daya (UTC)

lastModifiedBy

string

Identitas yang terakhir mengubah sumber daya.

lastModifiedByType

createdByType

Jenis identitas yang terakhir memodifikasi sumber daya.