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

Inherits:
Object
  • Object
show all
Defined in:
lib/anthropic/resources/organization/federation/issuers.rb,
sig/anthropic/resources/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/organization/federation/issuers.rb', line 220

def initialize(client:)
  @client = client
end

Instance Method Details

#archive(federation_issuer_id, request_options: {}) ⇒ Anthropic::Models::Organization::Federation::FederationIssuer

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:

  • federation_issuer_id (String) —

    ID of the federation issuer to archive.

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

Returns:

Raises:

See Also:



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

def archive(federation_issuer_id, params = {})
  @client.request(
    span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_FEDERATION_ISSUERS_ARCHIVE,
    span_attributes: {"anthropic.organization.federation_issuer.id" => federation_issuer_id},
    span_route: "/v1/organizations/federation_issuers/{federation_issuer_id}/archive",
    method: :post,
    path: ["v1/organizations/federation_issuers/%1$s/archive", federation_issuer_id],
    model: Anthropic::Organization::Federation::FederationIssuer,
    options: params[:request_options]
  )
end

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

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::Organization::Federation::IssuerCreateParams for more details.

Parameters:

Returns:

Raises:

See Also:



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

def create(params)
  parsed, options = Anthropic::Organization::Federation::IssuerCreateParams.dump_request(params)
  @client.request(
    span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_FEDERATION_ISSUERS_CREATE,
    span_created_id: "anthropic.organization.federation_issuer.id",
    span_route: "/v1/organizations/federation_issuers",
    method: :post,
    path: "v1/organizations/federation_issuers",
    body: parsed,
    model: Anthropic::Organization::Federation::FederationIssuer,
    options: options
  )
end

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

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) —

    Include archived resources. Defaults to false.

  • limit (Integer) —

    Number of results per page.

  • page (String, nil) —

    Opaque cursor from a previous response's next_page.

  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}, nil)
  • include_archived: (Boolean)
  • limit: (Integer)
  • page: (String, nil)
  • request_options: (Anthropic::request_opts)

Returns:

See Also:



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

def list(params = {})
  parsed, options = Anthropic::Organization::Federation::IssuerListParams.dump_request(params)
  query = Anthropic::Internal::Util.encode_query_params(parsed)
  @client.request(
    span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_FEDERATION_ISSUERS_LIST,
    span_route: "/v1/organizations/federation_issuers",
    span_query: %w[include_archived limit page],
    method: :get,
    path: "v1/organizations/federation_issuers",
    query: query,
    page: Anthropic::Internal::PageCursor,
    model: Anthropic::Organization::Federation::FederationIssuer,
    options: options
  )
end

#retrieve(federation_issuer_id, request_options: {}) ⇒ Anthropic::Models::Organization::Federation::FederationIssuer

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:

  • federation_issuer_id (String) —

    ID of the federation issuer.

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

Returns:

See Also:



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

def retrieve(federation_issuer_id, params = {})
  @client.request(
    span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_FEDERATION_ISSUERS_RETRIEVE,
    span_attributes: {"anthropic.organization.federation_issuer.id" => federation_issuer_id},
    span_route: "/v1/organizations/federation_issuers/{federation_issuer_id}",
    method: :get,
    path: ["v1/organizations/federation_issuers/%1$s", federation_issuer_id],
    model: Anthropic::Organization::Federation::FederationIssuer,
    options: params[:request_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, request_options: {}) ⇒ Anthropic::Models::Organization::Federation::FederationIssuer

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::Organization::Federation::IssuerUpdateParams for more details.

Parameters:

  • federation_issuer_id (String) —

    ID of the federation issuer to update.

  • check_jti (Boolean, nil) —

    Whether the jwt-bearer exchange enforces JTI single-use (replay protection) for

  • issuer_url (String, nil) —

    Replaces the iss claim value to match against. For discovery-mode issuers with

  • jwks (Anthropic::Models::Organization::Federation::JWKSDiscovery, Anthropic::Models::Organization::Federation::JWKSExplicitURL, Anthropic::Models::Organization::Federation::JWKSInline, nil) —

    Replaces the entire JWKS configuration.

  • jwks_polling_disabled (Boolean, nil) —

    Only false is accepted, to re-enable polling after the system pauses it. Polli

  • max_jwt_lifetime_seconds (Integer, nil) —

    Maximum allowed iat→exp spread for assertions from this issuer (1-176400 seconds

  • name (String, nil) —

    Replaces the slug identifier (lowercase, digits, hyphens). Unique within the org

  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}, nil)
  • check_jti: (Boolean, nil)
  • issuer_url: (String, nil)
  • jwks: (Anthropic::Models::Organization::Federation::IssuerUpdateParams::jwks, nil)
  • jwks_polling_disabled: (Boolean, nil)
  • max_jwt_lifetime_seconds: (Integer, nil)
  • name: (String, nil)
  • request_options: (Anthropic::request_opts)

Returns:

Raises:

See Also:



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

def update(federation_issuer_id, params = {})
  parsed, options = Anthropic::Organization::Federation::IssuerUpdateParams.dump_request(params)
  @client.request(
    span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_FEDERATION_ISSUERS_UPDATE,
    span_attributes: {"anthropic.organization.federation_issuer.id" => federation_issuer_id},
    span_route: "/v1/organizations/federation_issuers/{federation_issuer_id}",
    method: :post,
    path: ["v1/organizations/federation_issuers/%1$s", federation_issuer_id],
    body: parsed,
    model: Anthropic::Organization::Federation::FederationIssuer,
    options: options
  )
end