Class: Anthropic::Resources::Beta::Organization::Federation::Issuers

Inherits:
Object
  • Object
show all
Defined in:
lib/anthropic/resources/beta/organization/federation/issuers.rb,
sig/anthropic/resources/beta/organization/federation/issuers.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Issuers

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Issuers.

Parameters:



220
221
222
# File 'lib/anthropic/resources/beta/organization/federation/issuers.rb', line 220

def initialize(client:)
  @client = client
end

Instance Method Details

#archive(federation_issuer_id, betas: nil, request_options: {}) ⇒ Anthropic::Models::Beta::Organization::Federation::BetaFederationIssuer

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Archive a federation issuer.

Idempotent; re-archiving returns the issuer with its original archived_at. Rejected with 400 if any live (non-archived) federation rule still references the issuer; archive those rules first (a rule's issuer cannot be changed), or recreate them against another issuer.

Parameters:

Returns:

See Also:



206
207
208
209
210
211
212
213
214
215
# File 'lib/anthropic/resources/beta/organization/federation/issuers.rb', line 206

def archive(federation_issuer_id, params = {})
  parsed, options = Anthropic::Beta::Organization::Federation::IssuerArchiveParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["v1/organizations/federation_issuers/%1$s/archive?beta=true", federation_issuer_id],
    headers: parsed.transform_keys(betas: "anthropic-beta"),
    model: Anthropic::Beta::Organization::Federation::BetaFederationIssuer,
    options: options
  )
end

#create(issuer_url:, name:, check_jti: nil, jwks: nil, max_jwt_lifetime_seconds: nil, betas: nil, request_options: {}) ⇒ Anthropic::Models::Beta::Organization::Federation::BetaFederationIssuer

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Register an OIDC issuer that Anthropic will trust for workload identity federation in your organization.

The jwks field controls how the issuer's signing keys are obtained and takes one of three shapes selected by type: discovery (resolve keys through OIDC discovery), explicit_url (fetch keys from a fixed JWKS URL), or inline (provide a static key set). When jwks.type is discovery and no discovery_base is set, the issuer URL must be publicly reachable over HTTPS so Anthropic can fetch the discovery document; for explicit_url and inline modes the issuer URL is only matched as the JWT's iss claim and is not fetched.

Some parameter documentations has been truncated, see Models::Beta::Organization::Federation::IssuerCreateParams for more details.

Parameters:

Returns:

See Also:



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/anthropic/resources/beta/organization/federation/issuers.rb', line 49

def create(params)
  parsed, options = Anthropic::Beta::Organization::Federation::IssuerCreateParams.dump_request(params)
  header_params = {betas: "anthropic-beta"}
  @client.request(
    method: :post,
    path: "v1/organizations/federation_issuers?beta=true",
    headers: parsed.slice(*header_params.keys).transform_keys(header_params),
    body: parsed.except(*header_params.keys),
    model: Anthropic::Beta::Organization::Federation::BetaFederationIssuer,
    options: options
  )
end

#list(include_archived: nil, limit: nil, page: nil, betas: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::Organization::Federation::BetaFederationIssuer>

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

List federation issuers in your organization.

Archived issuers are excluded unless include_archived=true.

Parameters:

  • include_archived (Boolean)

    Query param: Include archived resources. Defaults to false.

  • limit (Integer)

    Query param: Number of results per page.

  • page (String, nil)

    Query param: Opaque cursor from a previous response's next_page.

  • betas (Array<String, Symbol, Anthropic::Models::AnthropicBeta>)

    Header param: Optional header to specify the beta version(s) you want to use.

  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/anthropic/resources/beta/organization/federation/issuers.rb', line 168

def list(params = {})
  query_params = [:include_archived, :limit, :page]
  parsed, options = Anthropic::Beta::Organization::Federation::IssuerListParams.dump_request(params)
  query = Anthropic::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :get,
    path: "v1/organizations/federation_issuers?beta=true",
    query: query,
    headers: parsed.except(*query_params).transform_keys(betas: "anthropic-beta"),
    page: Anthropic::Internal::PageCursor,
    model: Anthropic::Beta::Organization::Federation::BetaFederationIssuer,
    options: options
  )
end

#retrieve(federation_issuer_id, betas: nil, request_options: {}) ⇒ Anthropic::Models::Beta::Organization::Federation::BetaFederationIssuer

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Retrieve a federation issuer by its ID (fdis_...).

Parameters:

Returns:

See Also:



80
81
82
83
84
85
86
87
88
89
# File 'lib/anthropic/resources/beta/organization/federation/issuers.rb', line 80

def retrieve(federation_issuer_id, params = {})
  parsed, options = Anthropic::Beta::Organization::Federation::IssuerRetrieveParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["v1/organizations/federation_issuers/%1$s?beta=true", federation_issuer_id],
    headers: parsed.transform_keys(betas: "anthropic-beta"),
    model: Anthropic::Beta::Organization::Federation::BetaFederationIssuer,
    options: options
  )
end

#update(federation_issuer_id, check_jti: nil, issuer_url: nil, jwks: nil, jwks_polling_disabled: nil, max_jwt_lifetime_seconds: nil, name: nil, betas: nil, request_options: {}) ⇒ Anthropic::Models::Beta::Organization::Federation::BetaFederationIssuer

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Partially update a federation issuer.

Setting jwks replaces the full JWKS shape at once. Archived issuers cannot be updated; this returns 400. Create a new issuer instead.

Updating an issuer that backs a rule with a scope outside workspace:developer or workspace:inference requires a Console session.

Some parameter documentations has been truncated, see Models::Beta::Organization::Federation::IssuerUpdateParams for more details.

Parameters:

Returns:

See Also:



131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/anthropic/resources/beta/organization/federation/issuers.rb', line 131

def update(federation_issuer_id, params = {})
  parsed, options = Anthropic::Beta::Organization::Federation::IssuerUpdateParams.dump_request(params)
  header_params = {betas: "anthropic-beta"}
  @client.request(
    method: :post,
    path: ["v1/organizations/federation_issuers/%1$s?beta=true", federation_issuer_id],
    headers: parsed.slice(*header_params.keys).transform_keys(header_params),
    body: parsed.except(*header_params.keys),
    model: Anthropic::Beta::Organization::Federation::BetaFederationIssuer,
    options: options
  )
end