Workspace - Create Or Update

Skapar en ny arbetsyta eller uppdaterar en befintlig.

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

URI-parametrar

Name I Obligatorisk Typ Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

Namnet på resursgruppen. Namnet är skiftlägesokänsligt.

serviceName
path True

string

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

Namnet på API Management-tjänsten.

subscriptionId
path True

string (uuid)

ID för målprenumerationen. Värdet måste vara ett UUID.

workspaceId
path True

string

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

Arbetsyteidentifierare. Måste vara unikt i den aktuella API Management-tjänstinstansen.

api-version
query True

string

minLength: 1

DEN API-version som ska användas för den här åtgärden.

Begärandehuvud

Name Obligatorisk Typ Description
If-Match

string

ETag för entiteten. Krävs inte när du skapar en entitet, men krävs vid uppdatering av en entitet.

Begärandetext

Name Obligatorisk Typ Description
properties.displayName True

string

Namnet på arbetsytan.

properties.description

string

Beskrivning av arbetsytan.

Svar

Name Typ Description
200 OK

WorkspaceContract

Arbetsytan har uppdaterats

Sidhuvuden

ETag: string

201 Created

WorkspaceContract

Arbetsytan har skapats.

Sidhuvuden

ETag: string

Other Status Codes

ErrorResponse

Felsvar som beskriver varför åtgärden misslyckades.

Säkerhet

azure_auth

Azure Active Directory OAuth2-flöde.

Typ: oauth2
Flow: implicit
Auktoriseringswebbadress: https://login.microsoftonline.com/common/oauth2/authorize

Omfattningar

Name Description
user_impersonation personifiera ditt användarkonto

Exempel

ApiManagementCreateWorkspace

Exempelbegäran

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"
  }
}

Exempelsvar

{
  "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"
  }
}

Definitioner

Name Description
ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

ErrorDetail

Felinformationen.

ErrorResponse

Felsvar

WorkspaceContract

Information om arbetsyta.

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

Name Typ Description
info

object

Ytterligare information.

type

string

Ytterligare informationstyp.

ErrorDetail

Felinformationen.

Name Typ Description
additionalInfo

ErrorAdditionalInfo[]

Ytterligare information om felet.

code

string

Felkoden.

details

ErrorDetail[]

Felinformationen.

message

string

Felmeddelandet.

target

string

Felmålet.

ErrorResponse

Felsvar

Name Typ Description
error

ErrorDetail

Felobjektet.

WorkspaceContract

Information om arbetsyta.

Name Typ Description
id

string

Fullständigt kvalificerat resurs-ID för resursen. Ex – /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

Namnet på resursen

properties.description

string

Beskrivning av arbetsytan.

properties.displayName

string

Namnet på arbetsytan.

type

string

Resurstypen. Till exempel "Microsoft.Compute/virtualMachines" eller "Microsoft.Storage/storageAccounts"