본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

클러스터 관리자 (maintainers)

원문 보기 위키 갱신

클러스터 관리자 권한은 사용자나 팀 목록에, 또는 둘 다에 부여할 수 있어요. 권한을 받은 사용자는 자신이 관리하는 Buildkite 클러스터를 관리할 수 있게 돼요.

출처: 문서

본문

클러스터 관리자 데이터 모델

id 클러스터 관리자 지정(assignment)의 ID
actor 지정된 사용자 또는 팀에 대한 메타데이터

클러스터 관리자 목록 조회

클러스터에 있는 관리자 목록을 반환해요.

curl -H "Authorization: Bearer ***" \
  -X GET "https://api.buildkite.com/v2/organizations/{org.slug}/clusters/{cluster.id}/maintainers"
[
	{
		"id": "f6cf1097-c9c5-4492-885f-a2d3281a07dd",
		"actor": {
			"id": "01973824-0c57-45ae-a440-638fceb3ec06",
			"graphql_id": "VXNlci0tLTAxOTczODI0LTBjNTctNDVhZS1hNDQwLTYzOGZjZWIzZWMwNg==",
			"name": "Staff",
			"email": "staff@example.com",
			"type": "user"
		}
	},
	{
		"id": "282a043f-4d4f-4db5-ac9a-58673ae02caf",
		"actor": {
			"id": "0da645b7-9840-428f-bd80-0b92ee274480",
			"graphql_id": "VGVhbS0tLTBkYTY0NWI3LTk4NDAtNDI4Zi1iZDgwLTBiOTJlZTI3NDQ4MA==",
			"slug": "Developers",
			"type": "team"
		}
	}
]

필수 범위: read_clusters

성공 응답: 200 OK

클러스터 관리자 조회

curl -H "Authorization: Bearer ***" \
  -X GET "https://api.buildkite.com/v2/organizations/{org.slug}/clusters/{cluster.id}/maintainers/{id}"
{
	"id": "282a043f-4d4f-4db5-ac9a-58673ae02caf",
	"actor": {
		"id": "0da645b7-9840-428f-bd80-0b92ee274480",
		"graphql_id": "VGVhbS0tLTBkYTY0NWI3LTk4NDAtNDI4Zi1iZDgwLTBiOTJlZTI3NDQ4MA==",
		"slug": "Developers",
		"type": "team"
	}
}

필수 범위: read_clusters

성공 응답: 200 OK

클러스터 관리자 생성

사용자나 팀에게 클러스터 관리자 권한을 부여해요.

curl -H "Authorization: Bearer ***" \
  -X POST "https://api.buildkite.com/v2/organizations/{org.slug}/clusters/{cluster.id}/maintainers" \
  -H "Content-Type: application/json" \
  -d '{ "team": "0da645b7-9840-428f-bd80-0b92ee274480" }'
{
	"id": "282a043f-4d4f-4db5-ac9a-58673ae02caf",
	"actor": {
		"id": "0da645b7-9840-428f-bd80-0b92ee274480",
		"graphql_id": "VGVhbS0tLTBkYTY0NWI3LTk4NDAtNDI4Zi1iZDgwLTBiOTJlZTI3NDQ4MA==",
		"slug": "Developers",
		"type": "team"
	}
}

클러스터 관리자 권한 대상

클러스터 관리자 권한은 요청 본문에 user 또는 team 필드를 대상으로 지정하고, 그 값으로 대상의 UUID를 넣어 사용자나 팀 중 하나에 부여할 수 있어요.

user 사용자의 UUID { "user": "282a043f-4d4f-4db5-ac9a-58673ae02caf" }
team 팀의 UUID { "team": "0da645b7-9840-428f-bd80-0b92ee274480" }

필수 범위: write_clusters

성공 응답: 201 Created

오류 응답:

422 Unprocessable Entity { "message": "Validation failed: Reason for failure" }

클러스터 관리자 제거

사용자나 팀의 클러스터 관리자 권한을 제거해요.

curl -H "Authorization: Bearer ***" \
  -X DELETE "https://api.buildkite.com/v2/organizations/{org.slug}/clusters/{id}"

필수 범위: write_clusters

성공 응답: 204 No Content

오류 응답:

422 Unprocessable Entity { "message": "Validation failed: Reason cluster maintainer permission could not be deleted" }

더 알아보기 (Learn more)