Group - Create Or Update

그룹을 만들거나 업데이트합니다.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}?api-version=2022-08-01

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
groupId
path True

string

그룹 식별자입니다. 현재 API Management 서비스 instance 고유해야 합니다.

resourceGroupName
path True

string

리소스 그룹의 이름. 이름은 대소문자를 구분하지 않습니다.

serviceName
path True

string

API Management 서비스의 이름입니다.

Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

대상 구독의 ID입니다.

api-version
query True

string

이 작업에 사용할 API 버전입니다.

요청 헤더

Name 필수 형식 Description
If-Match

string

엔터티의 ETag입니다. 엔터티를 만들 때는 필요하지 않지만 엔터티를 업데이트할 때 필요합니다.

요청 본문

Name 필수 형식 Description
properties.displayName True

string

그룹 이름입니다.

properties.description

string

그룹 설명입니다.

properties.externalId

string

외부 그룹의 식별자, 이 속성은 외부 ID 공급자의 그룹 ID를 포함합니다(예: Azure Active Directory의 aad://<tenant>.onmicrosoft.com/groups/<group object id>경우). 그렇지 않으면 값이 null입니다.

properties.type

GroupType

그룹 유형.

응답

Name 형식 Description
200 OK

GroupContract

그룹이 이미 있습니다.

Headers

ETag: string

201 Created

GroupContract

그룹이 성공적으로 만들어졌습니다.

Headers

ETag: string

Other Status Codes

ErrorResponse

작업이 실패한 이유를 설명하는 오류 응답입니다.

보안

azure_auth

Azure Active Directory OAuth2 Flow.

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

Scopes

Name Description
user_impersonation 사용자 계정 가장

예제

ApiManagementCreateGroup
ApiManagementCreateGroupExternal

ApiManagementCreateGroup

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup?api-version=2022-08-01

{
  "properties": {
    "displayName": "temp group"
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup",
  "type": "Microsoft.ApiManagement/service/groups",
  "name": "tempgroup",
  "properties": {
    "displayName": "temp group",
    "type": "custom"
  }
}
{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup",
  "type": "Microsoft.ApiManagement/service/groups",
  "name": "tempgroup",
  "properties": {
    "displayName": "temp group",
    "type": "custom"
  }
}

ApiManagementCreateGroupExternal

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/aadGroup?api-version=2022-08-01

{
  "properties": {
    "displayName": "NewGroup (samiraad.onmicrosoft.com)",
    "description": "new group to test",
    "type": "external",
    "externalId": "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d"
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/aadGroup",
  "type": "Microsoft.ApiManagement/service/groups",
  "name": "aadGroup",
  "properties": {
    "displayName": "NewGroup (samiraad.onmicrosoft.com)",
    "description": "new group to test",
    "type": "external",
    "externalId": "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d"
  }
}
{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/aadGroup",
  "type": "Microsoft.ApiManagement/service/groups",
  "name": "aadGroup",
  "properties": {
    "displayName": "NewGroup (samiraad.onmicrosoft.com)",
    "description": "new group to test",
    "type": "external",
    "externalId": "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d"
  }
}

정의

Name Description
ErrorFieldContract

오류 필드 계약입니다.

ErrorResponse

오류 응답.

GroupContract

계약 세부 정보입니다.

GroupCreateParameters

그룹 만들기 작업에 제공된 매개 변수입니다.

GroupType

그룹 유형.

ErrorFieldContract

오류 필드 계약입니다.

Name 형식 Description
code

string

속성 수준 오류 코드입니다.

message

string

사람이 읽을 수 있는 속성 수준 오류 표현입니다.

target

string

속성 이름입니다.

ErrorResponse

오류 응답.

Name 형식 Description
error.code

string

서비스에서 정의한 오류 코드입니다. 이 코드는 응답에 지정된 HTTP 오류 코드의 하위 상태로 사용됩니다.

error.details

ErrorFieldContract[]

유효성 검사 오류가 발생할 경우 잘못된 필드 목록이 요청에 전송됩니다.

error.message

string

사람이 읽을 수 있는 오류 표현입니다.

GroupContract

계약 세부 정보입니다.

Name 형식 Description
id

string

리소스에 대한 정규화된 리소스 ID입니다. 예 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

리소스의 이름입니다.

properties.builtIn

boolean

그룹이 세 시스템 그룹(관리자, 개발자 또는 게스트) 중 하나이면 true입니다. 그렇지 않으면 false입니다.

properties.description

string

그룹 설명입니다. HTML 서식 지정 태그를 포함할 수 있습니다.

properties.displayName

string

그룹 이름입니다.

properties.externalId

string

외부 그룹의 경우 이 속성은 외부 ID 공급자의 그룹 ID(예: Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>)를 포함하고, 그렇지 않으면 값이 null입니다.

properties.type

GroupType

그룹 유형.

type

string

리소스 형식입니다. 예: "Microsoft.Compute/virtualMachines" 또는 "Microsoft.Storage/storageAccounts"

GroupCreateParameters

그룹 만들기 작업에 제공된 매개 변수입니다.

Name 형식 Description
properties.description

string

그룹 설명입니다.

properties.displayName

string

그룹 이름입니다.

properties.externalId

string

외부 그룹의 식별자, 이 속성은 외부 ID 공급자의 그룹 ID를 포함합니다(예: Azure Active Directory의 aad://<tenant>.onmicrosoft.com/groups/<group object id>경우). 그렇지 않으면 값이 null입니다.

properties.type

GroupType

그룹 유형.

GroupType

그룹 유형.

Name 형식 Description
custom

string

external

string

system

string