Workspace - Create Or Update

Yeni bir çalışma alanı oluşturur veya var olan bir çalışma alanını güncelleştirir.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}?api-version=2024-05-01

URI Parametreleri

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

string

minLength: 1
maxLength: 90

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

serviceName
path True

string

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

API Management hizmetinin adı.

subscriptionId
path True

string (uuid)

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

workspaceId
path True

string

minLength: 1
maxLength: 80
pattern: ^[^*#&+:<>?]+$

Çalışma alanı tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır.

api-version
query True

string

minLength: 1

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

İstek Başlığı

Name Gerekli Tür Description
If-Match

string

Varlığın ETag'i. Varlık oluştururken gerekli değildir, ancak varlığı güncelleştirirken gereklidir.

İstek Gövdesi

Name Gerekli Tür Description
properties.displayName True

string

Çalışma alanının adı.

properties.description

string

Çalışma alanının açıklaması.

Yanıtlar

Name Tür Description
200 OK

WorkspaceContract

Çalışma alanı başarıyla güncelleştirildi

Üst Bilgiler

ETag: string

201 Created

WorkspaceContract

Çalışma alanı başarıyla oluşturuldu.

Üst Bilgiler

ETag: string

Other Status Codes

ErrorResponse

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

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

ApiManagementCreateWorkspace

Örnek isteği

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1?api-version=2024-05-01

{
  "properties": {
    "displayName": "my workspace",
    "description": "workspace 1"
  }
}

Örnek yanıt

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1",
  "type": "Microsoft.ApiManagement/service/workspaces",
  "name": "wks1",
  "properties": {
    "description": "workspace 1",
    "displayName": "my workspace"
  }
}
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1",
  "type": "Microsoft.ApiManagement/service/workspaces",
  "name": "wks1",
  "properties": {
    "description": "workspace 1",
    "displayName": "my workspace"
  }
}

Tanımlar

Name Description
ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorDetail

Hata ayrıntısı.

ErrorResponse

Hata yanıtı

WorkspaceContract

Çalışma alanı ayrıntıları.

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.

WorkspaceContract

Çalışma alanı ayrıntıları.

Name Tür Description
id

string

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

name

string

Kaynağın adı

properties.description

string

Çalışma alanının açıklaması.

properties.displayName

string

Çalışma alanının adı.

type

string

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