Claude Platform Docs

서비스 계정 보관

ServiceAccount organization().serviceAccounts().archive(params = ServiceAccountArchiveParams.none(), requestOptions = RequestOptions.none())
POST/v1/organizations/service_accounts/{service_account_id}/archive

org:admin 범위가 있는 OAuth 액세스 토큰이 필요합니다. 이 토큰은 ant auth login --scope org:admin 또는 워크로드 ID 페더레이션 규칙에서 얻을 수 있으며, Admin API 키는 허용되지 않습니다. Admin API로 WIF 관리를 참조하세요.

서비스 계정을 보관합니다.

멱등성을 가지며, 다시 보관하면 원래 archived_at과 함께 서비스 계정이 반환됩니다. 발급자 보관과 마찬가지로, 활성(보관되지 않은) 페더레이션 규칙이 아직 이 서비스 계정을 대상으로 하는 경우 400으로 거부됩니다. 먼저 해당 규칙을 보관하거나 대상을 다른 서비스 계정으로 변경하세요.

Parameters
ServiceAccountArchiveParams params
Optional<String> serviceAccountId⁠Path parameter

ID of the service account to archive.

Returns
class ServiceAccount { type = "service_account"; id; archivedAt; /* 8 more */ }

Named non-human identity within the caller's organization.

A service account is a pure identity: name + org. Authorization lives on whatever references it (federation rules).

서비스 계정 보관
package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.organization.serviceaccounts.ServiceAccount;
import com.anthropic.models.organization.serviceaccounts.ServiceAccountArchiveParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

        ServiceAccount serviceAccount = client.organization().serviceAccounts().archive("service_account_id");
    }
}
Returns Examples
Response 200
{
  "id": "svac_01SDCCSbTxrXDpWc1phhtcfK",
  "archived_at": "2019-12-27T18:11:19.117Z",
  "archived_by_actor_id": "archived_by_actor_id",
  "created_at": "2024-10-30T23:58:27.427722Z",
  "created_by_actor_id": "created_by_actor_id",
  "description": "description",
  "name": "ci-deploy-bot",
  "organization_role": "admin",
  "type": "service_account",
  "updated_at": "2024-10-30T23:58:27.427722Z",
  "updated_by_actor_id": "updated_by_actor_id"
}