anthropic 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +1 -1
- data/lib/anthropic/error_classes.rb +7 -0
- data/lib/anthropic/internal/tracing.rb +16 -0
- data/lib/anthropic/internal/transport/base_client.rb +5 -1
- data/lib/anthropic/internal/util.rb +5 -4
- data/lib/anthropic/models/anthropic_beta.rb +3 -0
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_cost_group.rb +2 -1
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb +2 -1
- data/lib/anthropic/models/beta/organization/beta_analytics_cost_bucketed_result.rb +2 -1
- data/lib/anthropic/models/beta/organization/beta_analytics_cost_users_item.rb +2 -1
- data/lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb +2 -1
- data/lib/anthropic/models/beta/organization/beta_analytics_usage_users_item.rb +2 -1
- data/lib/anthropic/models/beta/organization/beta_organization_rate_limit_value.rb +1 -1
- data/lib/anthropic/models/beta/organization/beta_rbac_group_not_found_error.rb +23 -0
- data/lib/anthropic/models/beta/organization/beta_rbac_group_not_found_error_details.rb +21 -0
- data/lib/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error.rb +27 -0
- data/lib/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error_details.rb +25 -0
- data/lib/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error.rb +25 -0
- data/lib/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error_details.rb +23 -0
- data/lib/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error.rb +26 -0
- data/lib/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error_details.rb +24 -0
- data/lib/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error.rb +29 -0
- data/lib/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error_details.rb +27 -0
- data/lib/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error.rb +29 -0
- data/lib/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error_details.rb +27 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_configuration.rb +68 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode.rb +62 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode_param.rb +62 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode.rb +24 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode_param.rb +23 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode.rb +24 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode_param.rb +23 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_default_managed_settings.rb +50 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings.rb +80 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings_summary.rb +69 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status.rb +70 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_active.rb +24 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_deleted.rb +24 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_unknown.rb +24 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_deleted_claude_code_rbac_group_managed_settings.rb +33 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/configuration_retrieve_params.rb +35 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/configuration_update_params.rb +62 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_retrieve_params.rb +35 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_update_params.rb +47 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_delete_params.rb +43 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_list_params.rb +53 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_retrieve_params.rb +43 -0
- data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_set_params.rb +53 -0
- data/lib/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_type.rb +7 -1
- data/lib/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_update_value.rb +8 -2
- data/lib/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_value.rb +1 -1
- data/lib/anthropic/models/beta_request_body_timeout_error.rb +20 -0
- data/lib/anthropic/models/beta_request_body_timeout_error_details.rb +18 -0
- data/lib/anthropic/models/error_details.rb +50 -3
- data/lib/anthropic/models/organization/organization_rate_limit_value.rb +1 -1
- data/lib/anthropic/models/organization/workspaces/workspace_rate_limit_type.rb +7 -1
- data/lib/anthropic/models/organization/workspaces/workspace_rate_limit_update_value.rb +8 -2
- data/lib/anthropic/models/organization/workspaces/workspace_rate_limit_value.rb +1 -1
- data/lib/anthropic/models/sandbox_egress_restricted_error.rb +1 -1
- data/lib/anthropic/models/sandbox_egress_restricted_error_details.rb +1 -1
- data/lib/anthropic/models.rb +4 -0
- data/lib/anthropic/resources/beta/organization/analytics/user_cost_report.rb +4 -3
- data/lib/anthropic/resources/beta/organization/analytics/user_usage_report.rb +3 -2
- data/lib/anthropic/resources/beta/organization/claude_code/managed_settings/configuration.rb +141 -0
- data/lib/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_group_default.rb +126 -0
- data/lib/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_groups.rb +252 -0
- data/lib/anthropic/resources/beta/organization/claude_code/managed_settings.rb +35 -0
- data/lib/anthropic/resources/beta/organization/claude_code.rb +23 -0
- data/lib/anthropic/resources/beta/organization/external_keys.rb +2 -2
- data/lib/anthropic/resources/beta/organization/plugin_marketplaces.rb +5 -0
- data/lib/anthropic/resources/beta/organization/plugins/installation_settings.rb +4 -0
- data/lib/anthropic/resources/beta/organization/plugins/versions.rb +2 -0
- data/lib/anthropic/resources/beta/organization/plugins.rb +3 -0
- data/lib/anthropic/resources/beta/organization.rb +4 -0
- data/lib/anthropic/resources/organization/external_keys.rb +2 -2
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +42 -0
- data/rbi/anthropic/internal/tracing.rbi +16 -0
- data/rbi/anthropic/internal/util.rbi +8 -2
- data/rbi/anthropic/models/anthropic_beta.rbi +5 -0
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_cost_group.rbi +4 -2
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rbi +4 -2
- data/rbi/anthropic/models/beta/organization/beta_analytics_cost_bucketed_result.rbi +4 -2
- data/rbi/anthropic/models/beta/organization/beta_analytics_cost_users_item.rbi +4 -2
- data/rbi/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rbi +4 -2
- data/rbi/anthropic/models/beta/organization/beta_analytics_usage_users_item.rbi +4 -2
- data/rbi/anthropic/models/beta/organization/beta_organization_rate_limit_value.rbi +2 -2
- data/rbi/anthropic/models/beta/organization/beta_rbac_group_not_found_error.rbi +24 -0
- data/rbi/anthropic/models/beta/organization/beta_rbac_group_not_found_error_details.rbi +31 -0
- data/rbi/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error.rbi +28 -0
- data/rbi/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error_details.rbi +35 -0
- data/rbi/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error.rbi +26 -0
- data/rbi/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error_details.rbi +33 -0
- data/rbi/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error.rbi +27 -0
- data/rbi/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error_details.rbi +34 -0
- data/rbi/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error.rbi +30 -0
- data/rbi/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error_details.rbi +37 -0
- data/rbi/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error.rbi +30 -0
- data/rbi/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error_details.rbi +37 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_configuration.rbi +101 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode.rbi +82 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode_param.rbi +82 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode.rbi +38 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode_param.rbi +34 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode.rbi +38 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode_param.rbi +34 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_default_managed_settings.rbi +70 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings.rbi +114 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings_summary.rbi +104 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status.rbi +88 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_active.rbi +38 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_deleted.rbi +38 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_unknown.rbi +38 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_deleted_claude_code_rbac_group_managed_settings.rbi +48 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/configuration_retrieve_params.rbi +74 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/configuration_update_params.rbi +136 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_retrieve_params.rbi +74 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_update_params.rbi +86 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_delete_params.rbi +82 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_list_params.rbi +97 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_retrieve_params.rbi +82 -0
- data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_set_params.rbi +94 -0
- data/rbi/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_type.rbi +7 -1
- data/rbi/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_update_value.rbi +14 -2
- data/rbi/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_value.rbi +2 -2
- data/rbi/anthropic/models/beta_request_body_timeout_error.rbi +17 -0
- data/rbi/anthropic/models/beta_request_body_timeout_error_details.rbi +28 -0
- data/rbi/anthropic/models/error_details.rbi +42 -0
- data/rbi/anthropic/models/organization/organization_rate_limit_value.rbi +2 -2
- data/rbi/anthropic/models/organization/workspaces/workspace_rate_limit_type.rbi +7 -1
- data/rbi/anthropic/models/organization/workspaces/workspace_rate_limit_update_value.rbi +14 -2
- data/rbi/anthropic/models/organization/workspaces/workspace_rate_limit_value.rbi +2 -2
- data/rbi/anthropic/models/sandbox_egress_restricted_error.rbi +1 -1
- data/rbi/anthropic/models/sandbox_egress_restricted_error_details.rbi +1 -1
- data/rbi/anthropic/models.rbi +5 -0
- data/rbi/anthropic/resources/beta/organization/analytics/user_cost_report.rbi +4 -3
- data/rbi/anthropic/resources/beta/organization/analytics/user_usage_report.rbi +3 -2
- data/rbi/anthropic/resources/beta/organization/claude_code/managed_settings/configuration.rbi +112 -0
- data/rbi/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_group_default.rbi +86 -0
- data/rbi/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_groups.rbi +180 -0
- data/rbi/anthropic/resources/beta/organization/claude_code/managed_settings.rbi +39 -0
- data/rbi/anthropic/resources/beta/organization/claude_code.rbi +23 -0
- data/rbi/anthropic/resources/beta/organization/external_keys.rbi +2 -2
- data/rbi/anthropic/resources/beta/organization.rbi +3 -0
- data/rbi/anthropic/resources/organization/external_keys.rbi +2 -2
- data/sig/anthropic/internal/tracing.rbs +8 -0
- data/sig/anthropic/internal/util.rbs +2 -1
- data/sig/anthropic/models/anthropic_beta.rbs +2 -0
- data/sig/anthropic/models/beta/organization/beta_rbac_group_not_found_error.rbs +13 -0
- data/sig/anthropic/models/beta/organization/beta_rbac_group_not_found_error_details.rbs +18 -0
- data/sig/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error.rbs +15 -0
- data/sig/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error_details.rbs +20 -0
- data/sig/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error.rbs +15 -0
- data/sig/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error_details.rbs +24 -0
- data/sig/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error.rbs +15 -0
- data/sig/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error_details.rbs +22 -0
- data/sig/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error.rbs +15 -0
- data/sig/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error_details.rbs +22 -0
- data/sig/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error.rbs +15 -0
- data/sig/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error_details.rbs +22 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_configuration.rbs +48 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode.rbs +44 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode_param.rbs +44 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode.rbs +22 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode_param.rbs +22 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode.rbs +22 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode_param.rbs +22 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_default_managed_settings.rbs +38 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings.rbs +53 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings_summary.rbs +48 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status.rbs +49 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_active.rbs +21 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_deleted.rbs +21 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_unknown.rbs +21 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_deleted_claude_code_rbac_group_managed_settings.rbs +33 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/configuration_retrieve_params.rbs +36 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/configuration_update_params.rbs +61 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_retrieve_params.rbs +36 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_update_params.rbs +43 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_delete_params.rbs +43 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_list_params.rbs +50 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_retrieve_params.rbs +43 -0
- data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_set_params.rbs +48 -0
- data/sig/anthropic/models/beta_request_body_timeout_error.rbs +9 -0
- data/sig/anthropic/models/beta_request_body_timeout_error_details.rbs +14 -0
- data/sig/anthropic/models/error_details.rbs +46 -0
- data/sig/anthropic/models.rbs +4 -0
- data/sig/anthropic/resources/beta/organization/claude_code/managed_settings/configuration.rbs +28 -0
- data/sig/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_group_default.rbs +26 -0
- data/sig/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_groups.rbs +41 -0
- data/sig/anthropic/resources/beta/organization/claude_code/managed_settings.rbs +19 -0
- data/sig/anthropic/resources/beta/organization/claude_code.rbs +13 -0
- data/sig/anthropic/resources/beta/organization.rbs +2 -0
- metadata +128 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Anthropic
|
|
4
4
|
module Models
|
|
5
5
|
# The request came from a Claude sandbox with restricted network access, which is
|
|
6
|
-
# not allowed to make this
|
|
6
|
+
# not allowed to make this request. Send it from outside the sandbox, or from a
|
|
7
7
|
# sandbox with unrestricted network access.
|
|
8
8
|
class SandboxEgressRestrictedError < Anthropic::Errors::PermissionDeniedError
|
|
9
9
|
# @!method error_code
|
|
@@ -10,7 +10,7 @@ module Anthropic
|
|
|
10
10
|
|
|
11
11
|
# @!method initialize(error_code: :sandbox_egress_restricted)
|
|
12
12
|
# The request came from a Claude sandbox with restricted network access, which is
|
|
13
|
-
# not allowed to make this
|
|
13
|
+
# not allowed to make this request. Send it from outside the sandbox, or from a
|
|
14
14
|
# sandbox with unrestricted network access.
|
|
15
15
|
#
|
|
16
16
|
# @param error_code [Symbol, :sandbox_egress_restricted]
|
data/lib/anthropic/models.rb
CHANGED
|
@@ -130,6 +130,10 @@ module Anthropic
|
|
|
130
130
|
|
|
131
131
|
BetaRateLimitErrorObject = Anthropic::Models::BetaRateLimitErrorObject
|
|
132
132
|
|
|
133
|
+
BetaRequestBodyTimeoutError = Anthropic::Models::BetaRequestBodyTimeoutError
|
|
134
|
+
|
|
135
|
+
BetaRequestBodyTimeoutErrorDetails = Anthropic::Models::BetaRequestBodyTimeoutErrorDetails
|
|
136
|
+
|
|
133
137
|
BetaUnsupportedCharsetError = Anthropic::Models::BetaUnsupportedCharsetError
|
|
134
138
|
|
|
135
139
|
BetaUnsupportedCharsetErrorDetails = Anthropic::Models::BetaUnsupportedCharsetErrorDetails
|
|
@@ -13,9 +13,10 @@ module Anthropic
|
|
|
13
13
|
# Only cost attributed to a user account is included, so cost with no user
|
|
14
14
|
# account, such as Code Review usage and Claude Tag usage in Slack channels, is
|
|
15
15
|
# left out. Claude Tag one-to-one direct messages are included, with product
|
|
16
|
-
# `claude-tag`, only for members who have connected a Claude account.
|
|
17
|
-
#
|
|
18
|
-
# `
|
|
16
|
+
# `claude-tag`, only for members who have connected a Claude account. To see all
|
|
17
|
+
# cost by product, call `GET /v1/organizations/analytics/cost_report` with
|
|
18
|
+
# `group_by[]=product`. Available to organizations on a Claude Enterprise plan.
|
|
19
|
+
# Requires an API key with the `read:analytics` scope.
|
|
19
20
|
#
|
|
20
21
|
# This endpoint is one of the legacy Claude Enterprise usage and cost reports. For
|
|
21
22
|
# new integrations, use
|
|
@@ -14,8 +14,9 @@ module Anthropic
|
|
|
14
14
|
# usage with no user account, such as Code Review usage and Claude Tag usage in
|
|
15
15
|
# Slack channels, is left out. Claude Tag one-to-one direct messages are included,
|
|
16
16
|
# with product `claude-tag`, only for members who have connected a Claude account.
|
|
17
|
-
#
|
|
18
|
-
#
|
|
17
|
+
# To see all usage by product, call `GET /v1/organizations/analytics/usage_report`
|
|
18
|
+
# with `group_by[]=product`. Available to organizations on a Claude Enterprise
|
|
19
|
+
# plan. Requires an API key with the `read:analytics` scope.
|
|
19
20
|
#
|
|
20
21
|
# This endpoint is one of the legacy Claude Enterprise usage and cost reports. For
|
|
21
22
|
# new integrations, use
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Resources
|
|
5
|
+
class Beta
|
|
6
|
+
class Organization
|
|
7
|
+
class ClaudeCode
|
|
8
|
+
class ManagedSettings
|
|
9
|
+
class Configuration
|
|
10
|
+
# Retrieve the organization's Claude Code managed settings mode and RBAC Group
|
|
11
|
+
# order.
|
|
12
|
+
#
|
|
13
|
+
# **Accepted credentials:** an organization-level Admin API key with the
|
|
14
|
+
# `read:claude_code_managed_settings` scope.
|
|
15
|
+
#
|
|
16
|
+
# Every request must include the beta header
|
|
17
|
+
# `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
|
|
18
|
+
# it, or from an organization not enabled for this beta, returns `404`. The Claude
|
|
19
|
+
# Code Managed Settings API is in beta and is available to Claude Enterprise
|
|
20
|
+
# organizations only.
|
|
21
|
+
#
|
|
22
|
+
# Some parameter documentations has been truncated, see
|
|
23
|
+
# {Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationRetrieveParams}
|
|
24
|
+
# for more details.
|
|
25
|
+
#
|
|
26
|
+
# @overload retrieve(betas: nil, request_options: {})
|
|
27
|
+
#
|
|
28
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] This endpoint is in beta: requests must send
|
|
29
|
+
#
|
|
30
|
+
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
31
|
+
#
|
|
32
|
+
# @return [Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsConfiguration]
|
|
33
|
+
#
|
|
34
|
+
# @see Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationRetrieveParams
|
|
35
|
+
def retrieve(params = {})
|
|
36
|
+
parsed, options =
|
|
37
|
+
Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationRetrieveParams.dump_request(
|
|
38
|
+
params
|
|
39
|
+
)
|
|
40
|
+
@client.request(
|
|
41
|
+
qualifiers: {beta: "true"},
|
|
42
|
+
span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_CLAUDE_CODE_MANAGED_SETTINGS_CONFIGURATION_RETRIEVE,
|
|
43
|
+
span_route: "/v1/organizations/claude_code/managed_settings/configuration",
|
|
44
|
+
method: :get,
|
|
45
|
+
path: "v1/organizations/claude_code/managed_settings/configuration",
|
|
46
|
+
headers: parsed.transform_keys(betas: "anthropic-beta"),
|
|
47
|
+
model: Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsConfiguration,
|
|
48
|
+
options: {
|
|
49
|
+
extra_headers: {"anthropic-beta" => "ce-claude-code-managed-settings-2026-10-06"}, **options
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Change the organization's Claude Code managed settings mode, the RBAC Group
|
|
55
|
+
# order, or both, in one atomic write.
|
|
56
|
+
#
|
|
57
|
+
# To change the order, send `rbac_group_order` with the `rbac_group_order_version`
|
|
58
|
+
# from the read the change is based on. If the order has changed since that read,
|
|
59
|
+
# the request returns `409`: read it again and retry. To switch modes only if the
|
|
60
|
+
# order has not changed, send the current `rbac_group_order` and
|
|
61
|
+
# `rbac_group_order_version` with the new `mode`.
|
|
62
|
+
#
|
|
63
|
+
# A switch to `rbac_groups` mode with no RBAC Group settings and no default
|
|
64
|
+
# settings copies the organization settings into a new default, in the same write,
|
|
65
|
+
# so members keep the settings they had. The copy does not follow later changes to
|
|
66
|
+
# the organization settings. If the organization settings cannot be copied, the
|
|
67
|
+
# request returns `400` and changes nothing. If they cannot be read, are over 1
|
|
68
|
+
# MiB or are not valid, setting the default settings first avoids the copy.
|
|
69
|
+
#
|
|
70
|
+
# After a switch to `rbac_groups` mode, a member in no listed RBAC Group receives
|
|
71
|
+
# the default settings, or no settings if no default is set, not the organization
|
|
72
|
+
# settings.
|
|
73
|
+
#
|
|
74
|
+
# **Accepted credentials:** an organization-level Admin API key with the
|
|
75
|
+
# `write:claude_code_managed_settings` scope.
|
|
76
|
+
#
|
|
77
|
+
# Every request must include the beta header
|
|
78
|
+
# `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
|
|
79
|
+
# it, or from an organization not enabled for this beta, returns `404`. The Claude
|
|
80
|
+
# Code Managed Settings API is in beta and is available to Claude Enterprise
|
|
81
|
+
# organizations only.
|
|
82
|
+
#
|
|
83
|
+
# A write that returns `503` may have applied. Retrying it is safe.
|
|
84
|
+
#
|
|
85
|
+
# Some parameter documentations has been truncated, see
|
|
86
|
+
# {Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationUpdateParams}
|
|
87
|
+
# for more details.
|
|
88
|
+
#
|
|
89
|
+
# @overload update(mode: nil, rbac_group_order: nil, rbac_group_order_version: nil, betas: nil, request_options: {})
|
|
90
|
+
#
|
|
91
|
+
# @param mode [Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsOrganizationModeParam, Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsRBACGroupsModeParam] Body param: The new mode, as an object such as `{"type": "rbac_groups"}`.
|
|
92
|
+
#
|
|
93
|
+
# @param rbac_group_order [Array<String>] Body param: Every RBAC Group that has settings, each listed once, in the new ord
|
|
94
|
+
#
|
|
95
|
+
# @param rbac_group_order_version [String] Body param: The `rbac_group_order_version` from the read this change is based on
|
|
96
|
+
#
|
|
97
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] Header param: This endpoint is in beta: requests must send
|
|
98
|
+
#
|
|
99
|
+
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
100
|
+
#
|
|
101
|
+
# @raise [Anthropic::Models::CMEKKeyDisabledError]
|
|
102
|
+
# @raise [Anthropic::Models::BetaRequestBodyTimeoutError]
|
|
103
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededError]
|
|
104
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededError]
|
|
105
|
+
# @raise [Anthropic::Models::SandboxEgressRestrictedError]
|
|
106
|
+
#
|
|
107
|
+
# @return [Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsConfiguration]
|
|
108
|
+
#
|
|
109
|
+
# @see Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationUpdateParams
|
|
110
|
+
def update(params = {})
|
|
111
|
+
parsed, options =
|
|
112
|
+
Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationUpdateParams.dump_request(params)
|
|
113
|
+
header_params = {betas: "anthropic-beta"}
|
|
114
|
+
@client.request(
|
|
115
|
+
qualifiers: {beta: "true"},
|
|
116
|
+
span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_CLAUDE_CODE_MANAGED_SETTINGS_CONFIGURATION_UPDATE,
|
|
117
|
+
span_route: "/v1/organizations/claude_code/managed_settings/configuration",
|
|
118
|
+
method: :post,
|
|
119
|
+
path: "v1/organizations/claude_code/managed_settings/configuration",
|
|
120
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
121
|
+
body: parsed.except(*header_params.keys),
|
|
122
|
+
model: Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsConfiguration,
|
|
123
|
+
options: {
|
|
124
|
+
extra_headers: {"anthropic-beta" => "ce-claude-code-managed-settings-2026-10-06"}, **options
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# @api private
|
|
130
|
+
#
|
|
131
|
+
# @param client [Anthropic::Client]
|
|
132
|
+
def initialize(client:)
|
|
133
|
+
@client = client
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
data/lib/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_group_default.rb
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Resources
|
|
5
|
+
class Beta
|
|
6
|
+
class Organization
|
|
7
|
+
class ClaudeCode
|
|
8
|
+
class ManagedSettings
|
|
9
|
+
class RBACGroupDefault
|
|
10
|
+
# Retrieve the default Claude Code managed settings, which members who belong to
|
|
11
|
+
# no RBAC Group in `rbac_group_order` receive in `rbac_groups` mode.
|
|
12
|
+
#
|
|
13
|
+
# **Accepted credentials:** an organization-level Admin API key with the
|
|
14
|
+
# `read:claude_code_managed_settings` scope.
|
|
15
|
+
#
|
|
16
|
+
# Every request must include the beta header
|
|
17
|
+
# `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
|
|
18
|
+
# it, or from an organization not enabled for this beta, returns `404`. The Claude
|
|
19
|
+
# Code Managed Settings API is in beta and is available to Claude Enterprise
|
|
20
|
+
# organizations only.
|
|
21
|
+
#
|
|
22
|
+
# Some parameter documentations has been truncated, see
|
|
23
|
+
# {Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupDefaultRetrieveParams}
|
|
24
|
+
# for more details.
|
|
25
|
+
#
|
|
26
|
+
# @overload retrieve(betas: nil, request_options: {})
|
|
27
|
+
#
|
|
28
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] This endpoint is in beta: requests must send
|
|
29
|
+
#
|
|
30
|
+
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
31
|
+
#
|
|
32
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedError]
|
|
33
|
+
# @raise [Anthropic::Models::CMEKKeyDisabledError]
|
|
34
|
+
#
|
|
35
|
+
# @return [Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeRBACGroupDefaultManagedSettings]
|
|
36
|
+
#
|
|
37
|
+
# @see Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupDefaultRetrieveParams
|
|
38
|
+
def retrieve(params = {})
|
|
39
|
+
parsed, options =
|
|
40
|
+
Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupDefaultRetrieveParams.dump_request(
|
|
41
|
+
params
|
|
42
|
+
)
|
|
43
|
+
@client.request(
|
|
44
|
+
qualifiers: {beta: "true"},
|
|
45
|
+
span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_CLAUDE_CODE_MANAGED_SETTINGS_RBAC_GROUP_DEFAULT_RETRIEVE,
|
|
46
|
+
span_route: "/v1/organizations/claude_code/managed_settings/rbac_group_default",
|
|
47
|
+
method: :get,
|
|
48
|
+
path: "v1/organizations/claude_code/managed_settings/rbac_group_default",
|
|
49
|
+
headers: parsed.transform_keys(betas: "anthropic-beta"),
|
|
50
|
+
model: Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeRBACGroupDefaultManagedSettings,
|
|
51
|
+
options: {
|
|
52
|
+
extra_headers: {"anthropic-beta" => "ce-claude-code-managed-settings-2026-10-06"}, **options
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Set or replace the default Claude Code managed settings, or clear them with
|
|
58
|
+
# `null`.
|
|
59
|
+
#
|
|
60
|
+
# **Accepted credentials:** an organization-level Admin API key with the
|
|
61
|
+
# `write:claude_code_managed_settings` scope.
|
|
62
|
+
#
|
|
63
|
+
# Every request must include the beta header
|
|
64
|
+
# `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
|
|
65
|
+
# it, or from an organization not enabled for this beta, returns `404`. The Claude
|
|
66
|
+
# Code Managed Settings API is in beta and is available to Claude Enterprise
|
|
67
|
+
# organizations only.
|
|
68
|
+
#
|
|
69
|
+
# A write that returns `503` may have applied. Retrying it is safe.
|
|
70
|
+
#
|
|
71
|
+
# Some parameter documentations has been truncated, see
|
|
72
|
+
# {Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupDefaultUpdateParams}
|
|
73
|
+
# for more details.
|
|
74
|
+
#
|
|
75
|
+
# @overload update(settings:, betas: nil, request_options: {})
|
|
76
|
+
#
|
|
77
|
+
# @param settings [Hash{Symbol=>Object}, nil] Body param: The whole settings document, a JSON object of Claude Code managed se
|
|
78
|
+
#
|
|
79
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] Header param: This endpoint is in beta: requests must send
|
|
80
|
+
#
|
|
81
|
+
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
82
|
+
#
|
|
83
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedError]
|
|
84
|
+
# @raise [Anthropic::Models::CMEKKeyDisabledError]
|
|
85
|
+
# @raise [Anthropic::Models::BetaRequestBodyTimeoutError]
|
|
86
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededError]
|
|
87
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededError]
|
|
88
|
+
# @raise [Anthropic::Models::SandboxEgressRestrictedError]
|
|
89
|
+
#
|
|
90
|
+
# @return [Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeRBACGroupDefaultManagedSettings]
|
|
91
|
+
#
|
|
92
|
+
# @see Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupDefaultUpdateParams
|
|
93
|
+
def update(params)
|
|
94
|
+
parsed, options =
|
|
95
|
+
Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupDefaultUpdateParams.dump_request(
|
|
96
|
+
params
|
|
97
|
+
)
|
|
98
|
+
header_params = {betas: "anthropic-beta"}
|
|
99
|
+
@client.request(
|
|
100
|
+
qualifiers: {beta: "true"},
|
|
101
|
+
span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_CLAUDE_CODE_MANAGED_SETTINGS_RBAC_GROUP_DEFAULT_UPDATE,
|
|
102
|
+
span_route: "/v1/organizations/claude_code/managed_settings/rbac_group_default",
|
|
103
|
+
method: :post,
|
|
104
|
+
path: "v1/organizations/claude_code/managed_settings/rbac_group_default",
|
|
105
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
106
|
+
body: parsed.except(*header_params.keys),
|
|
107
|
+
model: Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeRBACGroupDefaultManagedSettings,
|
|
108
|
+
options: {
|
|
109
|
+
extra_headers: {"anthropic-beta" => "ce-claude-code-managed-settings-2026-10-06"}, **options
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# @api private
|
|
115
|
+
#
|
|
116
|
+
# @param client [Anthropic::Client]
|
|
117
|
+
def initialize(client:)
|
|
118
|
+
@client = client
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Resources
|
|
5
|
+
class Beta
|
|
6
|
+
class Organization
|
|
7
|
+
class ClaudeCode
|
|
8
|
+
class ManagedSettings
|
|
9
|
+
class RBACGroups
|
|
10
|
+
# Retrieve an RBAC Group's Claude Code managed settings.
|
|
11
|
+
#
|
|
12
|
+
# **Accepted credentials:** an organization-level Admin API key with the
|
|
13
|
+
# `read:claude_code_managed_settings` scope.
|
|
14
|
+
#
|
|
15
|
+
# Every request must include the beta header
|
|
16
|
+
# `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
|
|
17
|
+
# it, or from an organization not enabled for this beta, returns `404`. The Claude
|
|
18
|
+
# Code Managed Settings API is in beta and is available to Claude Enterprise
|
|
19
|
+
# organizations only.
|
|
20
|
+
#
|
|
21
|
+
# Some parameter documentations has been truncated, see
|
|
22
|
+
# {Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupRetrieveParams}
|
|
23
|
+
# for more details.
|
|
24
|
+
#
|
|
25
|
+
# @overload retrieve(rbac_group_id, betas: nil, request_options: {})
|
|
26
|
+
#
|
|
27
|
+
# @param rbac_group_id [String] The RBAC Group's ID, prefixed `rbac_group_`.
|
|
28
|
+
#
|
|
29
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] This endpoint is in beta: requests must send
|
|
30
|
+
#
|
|
31
|
+
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
32
|
+
#
|
|
33
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedError]
|
|
34
|
+
# @raise [Anthropic::Models::CMEKKeyDisabledError]
|
|
35
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupManagedSettingsNotFoundError]
|
|
36
|
+
#
|
|
37
|
+
# @return [Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeRBACGroupManagedSettings]
|
|
38
|
+
#
|
|
39
|
+
# @see Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupRetrieveParams
|
|
40
|
+
def retrieve(rbac_group_id, params = {})
|
|
41
|
+
parsed, options =
|
|
42
|
+
Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupRetrieveParams.dump_request(params)
|
|
43
|
+
@client.request(
|
|
44
|
+
qualifiers: {beta: "true"},
|
|
45
|
+
span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_CLAUDE_CODE_MANAGED_SETTINGS_RBAC_GROUPS_RETRIEVE,
|
|
46
|
+
span_attributes: {"anthropic.organization.claude_code.managed_setting.rbac_group.id" => rbac_group_id},
|
|
47
|
+
span_route: "/v1/organizations/claude_code/managed_settings/rbac_groups/{rbac_group_id}",
|
|
48
|
+
method: :get,
|
|
49
|
+
path: ["v1/organizations/claude_code/managed_settings/rbac_groups/%1$s", rbac_group_id],
|
|
50
|
+
headers: parsed.transform_keys(betas: "anthropic-beta"),
|
|
51
|
+
model: Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeRBACGroupManagedSettings,
|
|
52
|
+
options: {
|
|
53
|
+
extra_headers: {"anthropic-beta" => "ce-claude-code-managed-settings-2026-10-06"}, **options
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# List the RBAC Groups that have Claude Code managed settings, highest precedence
|
|
59
|
+
# first.
|
|
60
|
+
#
|
|
61
|
+
# Each entry gives the group's status and timestamps, not its settings. The list
|
|
62
|
+
# includes deleted groups that still have settings, and leaves out the default
|
|
63
|
+
# settings. If the order changes between pages, the request returns `409`: list
|
|
64
|
+
# again from the first page.
|
|
65
|
+
#
|
|
66
|
+
# **Accepted credentials:** an organization-level Admin API key with the
|
|
67
|
+
# `read:claude_code_managed_settings` scope.
|
|
68
|
+
#
|
|
69
|
+
# Every request must include the beta header
|
|
70
|
+
# `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
|
|
71
|
+
# it, or from an organization not enabled for this beta, returns `404`. The Claude
|
|
72
|
+
# Code Managed Settings API is in beta and is available to Claude Enterprise
|
|
73
|
+
# organizations only.
|
|
74
|
+
#
|
|
75
|
+
# Some parameter documentations has been truncated, see
|
|
76
|
+
# {Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupListParams}
|
|
77
|
+
# for more details.
|
|
78
|
+
#
|
|
79
|
+
# @overload list(limit: nil, page: nil, betas: nil, request_options: {})
|
|
80
|
+
#
|
|
81
|
+
# @param limit [Integer] Query param: Number of items to return per page.
|
|
82
|
+
#
|
|
83
|
+
# @param page [String, nil] Query param: Optionally set to the `next_page` token from the previous response.
|
|
84
|
+
#
|
|
85
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] Header param: This endpoint is in beta: requests must send
|
|
86
|
+
#
|
|
87
|
+
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
88
|
+
#
|
|
89
|
+
# @return [Anthropic::Internal::PageCursor<Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeRBACGroupManagedSettingsSummary>]
|
|
90
|
+
#
|
|
91
|
+
# @see Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupListParams
|
|
92
|
+
def list(params = {})
|
|
93
|
+
query_params = [:limit, :page]
|
|
94
|
+
parsed, options =
|
|
95
|
+
Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupListParams.dump_request(params)
|
|
96
|
+
query = Anthropic::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
97
|
+
@client.request(
|
|
98
|
+
qualifiers: {beta: "true"},
|
|
99
|
+
span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_CLAUDE_CODE_MANAGED_SETTINGS_RBAC_GROUPS_LIST,
|
|
100
|
+
span_route: "/v1/organizations/claude_code/managed_settings/rbac_groups",
|
|
101
|
+
span_query: %w[limit page],
|
|
102
|
+
method: :get,
|
|
103
|
+
path: "v1/organizations/claude_code/managed_settings/rbac_groups",
|
|
104
|
+
query: query,
|
|
105
|
+
headers: parsed.except(*query_params).transform_keys(betas: "anthropic-beta"),
|
|
106
|
+
page: Anthropic::Internal::PageCursor,
|
|
107
|
+
model: Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeRBACGroupManagedSettingsSummary,
|
|
108
|
+
options: {
|
|
109
|
+
extra_headers: {"anthropic-beta" => "ce-claude-code-managed-settings-2026-10-06"}, **options
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Delete an RBAC Group's Claude Code managed settings and remove the group from
|
|
115
|
+
# `rbac_group_order`.
|
|
116
|
+
#
|
|
117
|
+
# A group with no settings returns `404` with the error code
|
|
118
|
+
# `rbac_group_managed_settings_not_found`. That code on a retry of a delete that
|
|
119
|
+
# returned `503` means the settings are gone.
|
|
120
|
+
#
|
|
121
|
+
# **Accepted credentials:** an organization-level Admin API key with the
|
|
122
|
+
# `write:claude_code_managed_settings` scope.
|
|
123
|
+
#
|
|
124
|
+
# Every request must include the beta header
|
|
125
|
+
# `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
|
|
126
|
+
# it, or from an organization not enabled for this beta, returns `404`. The Claude
|
|
127
|
+
# Code Managed Settings API is in beta and is available to Claude Enterprise
|
|
128
|
+
# organizations only.
|
|
129
|
+
#
|
|
130
|
+
# A write that returns `503` may have applied. Retrying it is safe.
|
|
131
|
+
#
|
|
132
|
+
# Some parameter documentations has been truncated, see
|
|
133
|
+
# {Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupDeleteParams}
|
|
134
|
+
# for more details.
|
|
135
|
+
#
|
|
136
|
+
# @overload delete(rbac_group_id, betas: nil, request_options: {})
|
|
137
|
+
#
|
|
138
|
+
# @param rbac_group_id [String] The RBAC Group's ID, prefixed `rbac_group_`.
|
|
139
|
+
#
|
|
140
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] This endpoint is in beta: requests must send
|
|
141
|
+
#
|
|
142
|
+
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
143
|
+
#
|
|
144
|
+
# @raise [Anthropic::Models::CMEKKeyDisabledError]
|
|
145
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededError]
|
|
146
|
+
# @raise [Anthropic::Models::SandboxEgressRestrictedError]
|
|
147
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupManagedSettingsNotFoundError]
|
|
148
|
+
#
|
|
149
|
+
# @return [Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaDeletedClaudeCodeRBACGroupManagedSettings]
|
|
150
|
+
#
|
|
151
|
+
# @see Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupDeleteParams
|
|
152
|
+
def delete(rbac_group_id, params = {})
|
|
153
|
+
parsed, options =
|
|
154
|
+
Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupDeleteParams.dump_request(params)
|
|
155
|
+
@client.request(
|
|
156
|
+
qualifiers: {beta: "true"},
|
|
157
|
+
span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_CLAUDE_CODE_MANAGED_SETTINGS_RBAC_GROUPS_DELETE,
|
|
158
|
+
span_attributes: {"anthropic.organization.claude_code.managed_setting.rbac_group.id" => rbac_group_id},
|
|
159
|
+
span_route: "/v1/organizations/claude_code/managed_settings/rbac_groups/{rbac_group_id}",
|
|
160
|
+
method: :delete,
|
|
161
|
+
path: ["v1/organizations/claude_code/managed_settings/rbac_groups/%1$s", rbac_group_id],
|
|
162
|
+
headers: parsed.transform_keys(betas: "anthropic-beta"),
|
|
163
|
+
model: Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaDeletedClaudeCodeRBACGroupManagedSettings,
|
|
164
|
+
options: {
|
|
165
|
+
extra_headers: {"anthropic-beta" => "ce-claude-code-managed-settings-2026-10-06"}, **options
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Create or replace an RBAC Group's Claude Code managed settings.
|
|
171
|
+
#
|
|
172
|
+
# New settings join the end of `rbac_group_order`, and existing settings keep
|
|
173
|
+
# their place. Until the group is moved up, its members who also belong to an
|
|
174
|
+
# earlier group keep that group's settings. In `organization` mode a write changes
|
|
175
|
+
# no member's settings until the organization switches to `rbac_groups` mode. Once
|
|
176
|
+
# a group has settings, that switch no longer copies the organization settings
|
|
177
|
+
# into default settings, so members in no RBAC Group in `rbac_group_order` receive
|
|
178
|
+
# no settings unless you set the default settings before the switch.
|
|
179
|
+
#
|
|
180
|
+
# Get the group's ID from the RBAC Groups API. One key can hold `read:rbac_groups`
|
|
181
|
+
# and `write:claude_code_managed_settings`.
|
|
182
|
+
#
|
|
183
|
+
# **Accepted credentials:** an organization-level Admin API key with the
|
|
184
|
+
# `write:claude_code_managed_settings` scope.
|
|
185
|
+
#
|
|
186
|
+
# Every request must include the beta header
|
|
187
|
+
# `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
|
|
188
|
+
# it, or from an organization not enabled for this beta, returns `404`. The Claude
|
|
189
|
+
# Code Managed Settings API is in beta and is available to Claude Enterprise
|
|
190
|
+
# organizations only.
|
|
191
|
+
#
|
|
192
|
+
# A write that returns `503` may have applied. Retrying it is safe.
|
|
193
|
+
#
|
|
194
|
+
# Some parameter documentations has been truncated, see
|
|
195
|
+
# {Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupSetParams}
|
|
196
|
+
# for more details.
|
|
197
|
+
#
|
|
198
|
+
# @overload set(rbac_group_id, settings:, betas: nil, request_options: {})
|
|
199
|
+
#
|
|
200
|
+
# @param rbac_group_id [String] Path param: The RBAC Group's ID, prefixed `rbac_group_`.
|
|
201
|
+
#
|
|
202
|
+
# @param settings [Hash{Symbol=>Object}] Body param: The whole settings document, a JSON object of Claude Code managed se
|
|
203
|
+
#
|
|
204
|
+
# @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] Header param: This endpoint is in beta: requests must send
|
|
205
|
+
#
|
|
206
|
+
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
207
|
+
#
|
|
208
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedError]
|
|
209
|
+
# @raise [Anthropic::Models::CMEKKeyDisabledError]
|
|
210
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupOrderLimitExceededError]
|
|
211
|
+
# @raise [Anthropic::Models::BetaRequestBodyTimeoutError]
|
|
212
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededError]
|
|
213
|
+
# @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededError]
|
|
214
|
+
# @raise [Anthropic::Models::SandboxEgressRestrictedError]
|
|
215
|
+
# @raise [Anthropic::Models::Beta::Organization::BetaRBACGroupNotFoundError]
|
|
216
|
+
#
|
|
217
|
+
# @return [Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeRBACGroupManagedSettings]
|
|
218
|
+
#
|
|
219
|
+
# @see Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupSetParams
|
|
220
|
+
def set(rbac_group_id, params)
|
|
221
|
+
parsed, options =
|
|
222
|
+
Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupSetParams.dump_request(params)
|
|
223
|
+
header_params = {betas: "anthropic-beta"}
|
|
224
|
+
@client.request(
|
|
225
|
+
qualifiers: {beta: "true"},
|
|
226
|
+
span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_CLAUDE_CODE_MANAGED_SETTINGS_RBAC_GROUPS_SET,
|
|
227
|
+
span_attributes: {"anthropic.organization.claude_code.managed_setting.rbac_group.id" => rbac_group_id},
|
|
228
|
+
span_route: "/v1/organizations/claude_code/managed_settings/rbac_groups/{rbac_group_id}",
|
|
229
|
+
method: :post,
|
|
230
|
+
path: ["v1/organizations/claude_code/managed_settings/rbac_groups/%1$s", rbac_group_id],
|
|
231
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
232
|
+
body: parsed.except(*header_params.keys),
|
|
233
|
+
model: Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeRBACGroupManagedSettings,
|
|
234
|
+
options: {
|
|
235
|
+
extra_headers: {"anthropic-beta" => "ce-claude-code-managed-settings-2026-10-06"}, **options
|
|
236
|
+
}
|
|
237
|
+
)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# @api private
|
|
241
|
+
#
|
|
242
|
+
# @param client [Anthropic::Client]
|
|
243
|
+
def initialize(client:)
|
|
244
|
+
@client = client
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Resources
|
|
5
|
+
class Beta
|
|
6
|
+
class Organization
|
|
7
|
+
class ClaudeCode
|
|
8
|
+
class ManagedSettings
|
|
9
|
+
# @return [Anthropic::Resources::Beta::Organization::ClaudeCode::ManagedSettings::Configuration]
|
|
10
|
+
attr_reader :configuration
|
|
11
|
+
|
|
12
|
+
# @return [Anthropic::Resources::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroups]
|
|
13
|
+
attr_reader :rbac_groups
|
|
14
|
+
|
|
15
|
+
# @return [Anthropic::Resources::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupDefault]
|
|
16
|
+
attr_reader :rbac_group_default
|
|
17
|
+
|
|
18
|
+
# @api private
|
|
19
|
+
#
|
|
20
|
+
# @param client [Anthropic::Client]
|
|
21
|
+
def initialize(client:)
|
|
22
|
+
@client = client
|
|
23
|
+
@configuration =
|
|
24
|
+
Anthropic::Resources::Beta::Organization::ClaudeCode::ManagedSettings::Configuration.new(client: client)
|
|
25
|
+
@rbac_groups =
|
|
26
|
+
Anthropic::Resources::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroups.new(client: client)
|
|
27
|
+
@rbac_group_default =
|
|
28
|
+
Anthropic::Resources::Beta::Organization::ClaudeCode::ManagedSettings::RBACGroupDefault.new(client: client)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Resources
|
|
5
|
+
class Beta
|
|
6
|
+
class Organization
|
|
7
|
+
class ClaudeCode
|
|
8
|
+
# @return [Anthropic::Resources::Beta::Organization::ClaudeCode::ManagedSettings]
|
|
9
|
+
attr_reader :managed_settings
|
|
10
|
+
|
|
11
|
+
# @api private
|
|
12
|
+
#
|
|
13
|
+
# @param client [Anthropic::Client]
|
|
14
|
+
def initialize(client:)
|
|
15
|
+
@client = client
|
|
16
|
+
@managed_settings =
|
|
17
|
+
Anthropic::Resources::Beta::Organization::ClaudeCode::ManagedSettings.new(client: client)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -71,8 +71,8 @@ module Anthropic
|
|
|
71
71
|
# Partially update an external key config. Omitted fields are left unchanged.
|
|
72
72
|
#
|
|
73
73
|
# `display_name` is always editable. `geo` and `provider_config` cannot be changed
|
|
74
|
-
# once any workspace references this config,
|
|
75
|
-
#
|
|
74
|
+
# once any workspace references this config, and a Google Cloud key's provider and
|
|
75
|
+
# `key_name` cannot be changed at all.
|
|
76
76
|
#
|
|
77
77
|
# @overload update(external_key_id, display_name: nil, geo: nil, provider_config: nil, request_options: {})
|
|
78
78
|
#
|