stackone_client 0.5.9 → 0.7.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/lib/stack_one/accounts.rb +361 -36
- data/lib/stack_one/ats.rb +5301 -652
- data/lib/stack_one/connect_sessions.rb +157 -22
- data/lib/stack_one/connectors.rb +145 -14
- data/lib/stack_one/crm.rb +725 -78
- data/lib/stack_one/hris.rb +4335 -462
- data/lib/stack_one/iam.rb +805 -56
- data/lib/stack_one/lms.rb +1967 -220
- data/lib/stack_one/marketing.rb +1921 -230
- data/lib/stack_one/models/operations/ats_get_application_custom_field_definition_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_get_application_document_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_application_note_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_application_offer_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_application_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_application_scheduled_interview_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_application_scorecard_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_assessments_package_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_assessments_request_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_assessments_result_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_background_check_package_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_background_check_request_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_background_check_result_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_candidate_custom_field_definition_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_get_candidate_note_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_candidate_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_department_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_interview_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_interview_stage_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_job_custom_field_definition_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_get_job_posting_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_job_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_list_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_location_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_offer_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_rejected_reason_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_get_user_request.rb +1 -1
- data/lib/stack_one/models/operations/ats_list_application_custom_field_definitions_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_application_documents_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_application_notes_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_application_scorecards_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_applications_offers_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_applications_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_applications_scheduled_interviews_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_assessments_packages_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_background_check_packages_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_background_check_request_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_candidate_custom_field_definitions_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_candidate_notes_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_candidates_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_departments_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_interview_stages_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_interviews_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_job_custom_field_definitions_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_job_postings_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_jobs_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_lists_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_locations_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_offers_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_rejected_reasons_request.rb +2 -2
- data/lib/stack_one/models/operations/ats_list_users_request.rb +2 -2
- data/lib/stack_one/models/operations/crm_get_account_request.rb +1 -1
- data/lib/stack_one/models/operations/crm_get_contact_custom_field_definition_request.rb +2 -2
- data/lib/stack_one/models/operations/crm_get_contact_request.rb +1 -1
- data/lib/stack_one/models/operations/crm_get_list_request.rb +1 -1
- data/lib/stack_one/models/operations/crm_list_accounts_request.rb +2 -2
- data/lib/stack_one/models/operations/crm_list_contact_custom_field_definitions_request.rb +2 -2
- data/lib/stack_one/models/operations/crm_list_contacts_request.rb +2 -2
- data/lib/stack_one/models/operations/crm_list_lists_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_get_benefit_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_company_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_cost_center_group_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_department_group_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_custom_field_definition_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_get_employee_document_category_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_document_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_employment_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_skill_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employee_time_off_balance_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employees_time_off_request_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employees_work_eligibility_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_employment_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_group_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_job_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_location_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_location_response.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_team_group_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_time_entries_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_time_off_policy_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_time_off_request_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_get_time_off_type_request.rb +1 -1
- data/lib/stack_one/models/operations/hris_list_benefits_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_companies_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_cost_center_groups_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_department_groups_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_categories_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_custom_field_definitions_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_documents_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_employments_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_skills_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_time_off_balances_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_time_off_requests_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employee_work_eligibility_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employees_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_employments_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_groups_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_jobs_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_locations_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_locations_response.rb +1 -1
- data/lib/stack_one/models/operations/hris_list_team_groups_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_time_entries_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_time_off_policies_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_time_off_requests_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_list_time_off_types_request.rb +2 -2
- data/lib/stack_one/models/operations/hris_update_employee_time_off_request_request.rb +33 -0
- data/lib/stack_one/models/operations/hris_update_employee_time_off_request_response.rb +36 -0
- data/lib/stack_one/models/operations/iam_delete_user_request.rb +27 -0
- data/lib/stack_one/models/operations/iam_delete_user_response.rb +36 -0
- data/lib/stack_one/models/operations/iam_get_group_request.rb +1 -1
- data/lib/stack_one/models/operations/iam_get_policy_request.rb +1 -1
- data/lib/stack_one/models/operations/iam_get_role_request.rb +1 -1
- data/lib/stack_one/models/operations/iam_get_user_request.rb +1 -1
- data/lib/stack_one/models/operations/iam_list_groups_request.rb +2 -2
- data/lib/stack_one/models/operations/iam_list_policies_request.rb +2 -2
- data/lib/stack_one/models/operations/iam_list_roles_request.rb +2 -2
- data/lib/stack_one/models/operations/iam_list_users_request.rb +2 -2
- data/lib/stack_one/models/operations/iam_update_user_request.rb +30 -0
- data/lib/stack_one/models/operations/iam_update_user_response.rb +36 -0
- data/lib/stack_one/models/operations/lms_get_assignment_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_category_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_completion_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_content_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_course_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_skill_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_user_assignment_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_user_completion_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_get_user_request.rb +1 -1
- data/lib/stack_one/models/operations/lms_list_assignments_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_categories_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_completions_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_content_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_courses_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_skills_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_user_assignments_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_user_completions_request.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_users_queryparam_filter.rb +5 -2
- data/lib/stack_one/models/operations/lms_list_users_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_get_campaign_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_content_block_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_email_template_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_in_app_template_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_omni_channel_template_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_push_template_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_get_sms_template_request.rb +1 -1
- data/lib/stack_one/models/operations/marketing_list_campaigns_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_content_blocks_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_email_templates_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_in_app_templates_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_omni_channel_templates_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_push_templates_request.rb +2 -2
- data/lib/stack_one/models/operations/marketing_list_sms_templates_request.rb +2 -2
- data/lib/stack_one/models/operations.rb +6 -0
- data/lib/stack_one/models/shared/atscreatejobrequestdto.rb +5 -2
- data/lib/stack_one/models/shared/atsupdatejobrequestdto.rb +5 -2
- data/lib/stack_one/models/shared/categories.rb +2 -0
- data/lib/stack_one/models/shared/company.rb +5 -2
- data/lib/stack_one/models/shared/connectorsmeta_category.rb +2 -0
- data/lib/stack_one/models/shared/connectsessioncreate_categories.rb +2 -0
- data/lib/stack_one/models/shared/connectsessiontokenauthlink_categories.rb +2 -0
- data/lib/stack_one/models/shared/createemploymentapimodel.rb +4 -5
- data/lib/stack_one/models/shared/employee_company.rb +5 -2
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto.rb +10 -8
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_employment.rb +56 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_pay_frequency.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_pay_period.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_contract_type.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_employment_contract_type_value.rb +20 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_employment_type_value.rb +33 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_pay_period_value.rb +29 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_type.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_employment_value.rb +31 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_state.rb +3 -3
- data/lib/stack_one/models/shared/hriscreateemploymentrequestdto.rb +4 -5
- data/lib/stack_one/models/shared/hriscreatetimeoffrequestdto.rb +2 -0
- data/lib/stack_one/models/shared/hriscreatetimeoffrequestdto_type.rb +2 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto.rb +8 -8
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_employment.rb +56 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_pay_frequency.rb +27 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_pay_period.rb +27 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_contract_type.rb +27 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_employment_contract_type_value.rb +20 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_employment_type_value.rb +33 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_pay_period_value.rb +29 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_type.rb +27 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_employment_value.rb +31 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_state.rb +3 -3
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_state.rb +3 -3
- data/lib/stack_one/models/shared/iamupdateuserrequestdto.rb +45 -0
- data/lib/stack_one/models/shared/iamupdateuserrequestdto_status.rb +27 -0
- data/lib/stack_one/models/shared/iamupdateuserrequestdto_value.rb +20 -0
- data/lib/stack_one/models/shared/job.rb +5 -2
- data/lib/stack_one/models/shared/linkedaccountmeta_category.rb +2 -0
- data/lib/stack_one/models/shared/rawresponse.rb +2 -2
- data/lib/stack_one/models/shared/state.rb +3 -3
- data/lib/stack_one/models/shared/timeoff.rb +2 -0
- data/lib/stack_one/models/shared/timeoff_type.rb +2 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel.rb +8 -8
- data/lib/stack_one/models/shared/updateemployeeapimodel_employment.rb +56 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_pay_frequency.rb +27 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_pay_period.rb +27 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_contract_type.rb +27 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_employment_contract_type_value.rb +20 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_employment_type_value.rb +33 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_pay_period_value.rb +29 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_type.rb +27 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_employment_value.rb +31 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_state.rb +3 -3
- data/lib/stack_one/models/shared/updateemployeeapimodel_state.rb +3 -3
- data/lib/stack_one/models/shared/updatepackage.rb +5 -2
- data/lib/stack_one/models/shared/updateuserapimodel.rb +45 -0
- data/lib/stack_one/models/shared/updateuserapimodel_status.rb +27 -0
- data/lib/stack_one/models/shared/updateuserapimodel_value.rb +20 -0
- data/lib/stack_one/models/shared.rb +33 -6
- data/lib/stack_one/proxy.rb +80 -11
- data/lib/stack_one/sdk_hooks/hooks.rb +101 -0
- data/lib/stack_one/sdk_hooks/types.rb +152 -0
- data/lib/stack_one/sdkconfiguration.rb +25 -7
- data/lib/stack_one/stackone.rb +29 -10
- data/lib/stack_one/utils/retries.rb +95 -0
- data/lib/stack_one/utils/utils.rb +10 -0
- metadata +74 -10
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_home_location_state_value.rb +0 -3840
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_work_location_state_value.rb +0 -3840
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_home_location_state_value.rb +0 -3840
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto_schemas_work_location_state_value.rb +0 -3840
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_home_location_state_value.rb +0 -3840
- data/lib/stack_one/models/shared/updateemployeeapimodel_schemas_work_location_state_value.rb +0 -3840
data/lib/stack_one/iam.rb
CHANGED
@@ -5,7 +5,10 @@
|
|
5
5
|
|
6
6
|
require 'faraday'
|
7
7
|
require 'faraday/multipart'
|
8
|
+
require 'faraday/retry'
|
8
9
|
require 'sorbet-runtime'
|
10
|
+
require_relative 'sdk_hooks/hooks'
|
11
|
+
require_relative 'utils/retries'
|
9
12
|
|
10
13
|
module StackOne
|
11
14
|
extend T::Sig
|
@@ -19,8 +22,119 @@ module StackOne
|
|
19
22
|
end
|
20
23
|
|
21
24
|
|
22
|
-
sig { params(
|
23
|
-
def
|
25
|
+
sig { params(id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::IamDeleteUserResponse) }
|
26
|
+
def delete_user(id, x_account_id, retries = nil, timeout_ms = nil)
|
27
|
+
# delete_user - Delete User
|
28
|
+
request = ::StackOne::Operations::IamDeleteUserRequest.new(
|
29
|
+
|
30
|
+
id: id,
|
31
|
+
x_account_id: x_account_id
|
32
|
+
)
|
33
|
+
url, params = @sdk_configuration.get_server_details
|
34
|
+
base_url = Utils.template_url(url, params)
|
35
|
+
url = Utils.generate_url(
|
36
|
+
::StackOne::Operations::IamDeleteUserRequest,
|
37
|
+
base_url,
|
38
|
+
'/unified/iam/users/{id}',
|
39
|
+
request
|
40
|
+
)
|
41
|
+
headers = Utils.get_headers(request)
|
42
|
+
headers['Accept'] = 'application/json'
|
43
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
44
|
+
retries ||= @sdk_configuration.retry_config
|
45
|
+
retries ||= Utils::RetryConfig.new(
|
46
|
+
backoff: Utils::BackoffStrategy.new(
|
47
|
+
exponent: 1.5,
|
48
|
+
initial_interval: 500,
|
49
|
+
max_elapsed_time: 3_600_000,
|
50
|
+
max_interval: 60_000
|
51
|
+
),
|
52
|
+
retry_connection_errors: true,
|
53
|
+
strategy: 'backoff'
|
54
|
+
)
|
55
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
56
|
+
retry_options[:retry_statuses] = [429, 408]
|
57
|
+
|
58
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
59
|
+
|
60
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
61
|
+
timeout ||= @sdk_configuration.timeout
|
62
|
+
|
63
|
+
connection = @sdk_configuration.client.dup
|
64
|
+
connection.request :retry, retry_options
|
65
|
+
|
66
|
+
hook_ctx = SDKHooks::HookContext.new(
|
67
|
+
base_url: base_url,
|
68
|
+
oauth2_scopes: [],
|
69
|
+
operation_id: 'iam_delete_user',
|
70
|
+
security_source: @sdk_configuration.security_source
|
71
|
+
)
|
72
|
+
|
73
|
+
error = T.let(nil, T.nilable(StandardError))
|
74
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
75
|
+
|
76
|
+
begin
|
77
|
+
r = connection.delete(url) do |req|
|
78
|
+
req.headers.merge!(headers)
|
79
|
+
req.options.timeout = timeout unless timeout.nil?
|
80
|
+
Utils.configure_request_security(req, security)
|
81
|
+
|
82
|
+
@sdk_configuration.hooks.before_request(
|
83
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
84
|
+
hook_ctx: hook_ctx
|
85
|
+
),
|
86
|
+
request: req
|
87
|
+
)
|
88
|
+
end
|
89
|
+
rescue StandardError => e
|
90
|
+
error = e
|
91
|
+
ensure
|
92
|
+
if r.nil? || Utils.error_status?(r.status)
|
93
|
+
r = @sdk_configuration.hooks.after_error(
|
94
|
+
error: error,
|
95
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
96
|
+
hook_ctx: hook_ctx
|
97
|
+
),
|
98
|
+
response: r
|
99
|
+
)
|
100
|
+
else
|
101
|
+
r = @sdk_configuration.hooks.after_success(
|
102
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
103
|
+
hook_ctx: hook_ctx
|
104
|
+
),
|
105
|
+
response: r
|
106
|
+
)
|
107
|
+
end
|
108
|
+
|
109
|
+
if r.nil?
|
110
|
+
raise error if !error.nil?
|
111
|
+
raise 'no response'
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
116
|
+
|
117
|
+
res = ::StackOne::Operations::IamDeleteUserResponse.new(
|
118
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
119
|
+
)
|
120
|
+
if r.status == 200
|
121
|
+
if Utils.match_content_type(content_type, 'application/json')
|
122
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::StackOne::Shared::DeleteResult)
|
123
|
+
res.delete_result = out
|
124
|
+
end
|
125
|
+
elsif r.status == 204
|
126
|
+
elsif r.status == 408
|
127
|
+
res.headers = r.headers
|
128
|
+
elsif [400, 403, 412, 429].include?(r.status)
|
129
|
+
elsif [500, 501].include?(r.status)
|
130
|
+
end
|
131
|
+
|
132
|
+
res
|
133
|
+
end
|
134
|
+
|
135
|
+
|
136
|
+
sig { params(request: T.nilable(::StackOne::Operations::IamGetGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::IamGetGroupResponse) }
|
137
|
+
def get_group(request, retries = nil, timeout_ms = nil)
|
24
138
|
# get_group - Get Group
|
25
139
|
url, params = @sdk_configuration.get_server_details
|
26
140
|
base_url = Utils.template_url(url, params)
|
@@ -34,12 +148,76 @@ module StackOne
|
|
34
148
|
query_params = Utils.get_query_params(::StackOne::Operations::IamGetGroupRequest, request)
|
35
149
|
headers['Accept'] = 'application/json'
|
36
150
|
headers['user-agent'] = @sdk_configuration.user_agent
|
151
|
+
retries ||= @sdk_configuration.retry_config
|
152
|
+
retries ||= Utils::RetryConfig.new(
|
153
|
+
backoff: Utils::BackoffStrategy.new(
|
154
|
+
exponent: 1.5,
|
155
|
+
initial_interval: 500,
|
156
|
+
max_elapsed_time: 3_600_000,
|
157
|
+
max_interval: 60_000
|
158
|
+
),
|
159
|
+
retry_connection_errors: true,
|
160
|
+
strategy: 'backoff'
|
161
|
+
)
|
162
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
163
|
+
retry_options[:retry_statuses] = [429, 408]
|
164
|
+
|
165
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
166
|
+
|
167
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
168
|
+
timeout ||= @sdk_configuration.timeout
|
169
|
+
|
170
|
+
connection = @sdk_configuration.client.dup
|
171
|
+
connection.request :retry, retry_options
|
172
|
+
|
173
|
+
hook_ctx = SDKHooks::HookContext.new(
|
174
|
+
base_url: base_url,
|
175
|
+
oauth2_scopes: [],
|
176
|
+
operation_id: 'iam_get_group',
|
177
|
+
security_source: @sdk_configuration.security_source
|
178
|
+
)
|
37
179
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
180
|
+
error = T.let(nil, T.nilable(StandardError))
|
181
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
182
|
+
|
183
|
+
begin
|
184
|
+
r = connection.get(url) do |req|
|
185
|
+
req.headers.merge!(headers)
|
186
|
+
req.options.timeout = timeout unless timeout.nil?
|
187
|
+
req.params = query_params
|
188
|
+
Utils.configure_request_security(req, security)
|
189
|
+
|
190
|
+
@sdk_configuration.hooks.before_request(
|
191
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
192
|
+
hook_ctx: hook_ctx
|
193
|
+
),
|
194
|
+
request: req
|
195
|
+
)
|
196
|
+
end
|
197
|
+
rescue StandardError => e
|
198
|
+
error = e
|
199
|
+
ensure
|
200
|
+
if r.nil? || Utils.error_status?(r.status)
|
201
|
+
r = @sdk_configuration.hooks.after_error(
|
202
|
+
error: error,
|
203
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
204
|
+
hook_ctx: hook_ctx
|
205
|
+
),
|
206
|
+
response: r
|
207
|
+
)
|
208
|
+
else
|
209
|
+
r = @sdk_configuration.hooks.after_success(
|
210
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
211
|
+
hook_ctx: hook_ctx
|
212
|
+
),
|
213
|
+
response: r
|
214
|
+
)
|
215
|
+
end
|
216
|
+
|
217
|
+
if r.nil?
|
218
|
+
raise error if !error.nil?
|
219
|
+
raise 'no response'
|
220
|
+
end
|
43
221
|
end
|
44
222
|
|
45
223
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -62,8 +240,8 @@ module StackOne
|
|
62
240
|
end
|
63
241
|
|
64
242
|
|
65
|
-
sig { params(request: T.nilable(::StackOne::Operations::IamGetPolicyRequest)).returns(::StackOne::Operations::IamGetPolicyResponse) }
|
66
|
-
def get_policy(request)
|
243
|
+
sig { params(request: T.nilable(::StackOne::Operations::IamGetPolicyRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::IamGetPolicyResponse) }
|
244
|
+
def get_policy(request, retries = nil, timeout_ms = nil)
|
67
245
|
# get_policy - Get Policy
|
68
246
|
url, params = @sdk_configuration.get_server_details
|
69
247
|
base_url = Utils.template_url(url, params)
|
@@ -77,12 +255,76 @@ module StackOne
|
|
77
255
|
query_params = Utils.get_query_params(::StackOne::Operations::IamGetPolicyRequest, request)
|
78
256
|
headers['Accept'] = 'application/json'
|
79
257
|
headers['user-agent'] = @sdk_configuration.user_agent
|
258
|
+
retries ||= @sdk_configuration.retry_config
|
259
|
+
retries ||= Utils::RetryConfig.new(
|
260
|
+
backoff: Utils::BackoffStrategy.new(
|
261
|
+
exponent: 1.5,
|
262
|
+
initial_interval: 500,
|
263
|
+
max_elapsed_time: 3_600_000,
|
264
|
+
max_interval: 60_000
|
265
|
+
),
|
266
|
+
retry_connection_errors: true,
|
267
|
+
strategy: 'backoff'
|
268
|
+
)
|
269
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
270
|
+
retry_options[:retry_statuses] = [429, 408]
|
80
271
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
272
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
273
|
+
|
274
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
275
|
+
timeout ||= @sdk_configuration.timeout
|
276
|
+
|
277
|
+
connection = @sdk_configuration.client.dup
|
278
|
+
connection.request :retry, retry_options
|
279
|
+
|
280
|
+
hook_ctx = SDKHooks::HookContext.new(
|
281
|
+
base_url: base_url,
|
282
|
+
oauth2_scopes: [],
|
283
|
+
operation_id: 'iam_get_policy',
|
284
|
+
security_source: @sdk_configuration.security_source
|
285
|
+
)
|
286
|
+
|
287
|
+
error = T.let(nil, T.nilable(StandardError))
|
288
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
289
|
+
|
290
|
+
begin
|
291
|
+
r = connection.get(url) do |req|
|
292
|
+
req.headers.merge!(headers)
|
293
|
+
req.options.timeout = timeout unless timeout.nil?
|
294
|
+
req.params = query_params
|
295
|
+
Utils.configure_request_security(req, security)
|
296
|
+
|
297
|
+
@sdk_configuration.hooks.before_request(
|
298
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
299
|
+
hook_ctx: hook_ctx
|
300
|
+
),
|
301
|
+
request: req
|
302
|
+
)
|
303
|
+
end
|
304
|
+
rescue StandardError => e
|
305
|
+
error = e
|
306
|
+
ensure
|
307
|
+
if r.nil? || Utils.error_status?(r.status)
|
308
|
+
r = @sdk_configuration.hooks.after_error(
|
309
|
+
error: error,
|
310
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
311
|
+
hook_ctx: hook_ctx
|
312
|
+
),
|
313
|
+
response: r
|
314
|
+
)
|
315
|
+
else
|
316
|
+
r = @sdk_configuration.hooks.after_success(
|
317
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
318
|
+
hook_ctx: hook_ctx
|
319
|
+
),
|
320
|
+
response: r
|
321
|
+
)
|
322
|
+
end
|
323
|
+
|
324
|
+
if r.nil?
|
325
|
+
raise error if !error.nil?
|
326
|
+
raise 'no response'
|
327
|
+
end
|
86
328
|
end
|
87
329
|
|
88
330
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -105,8 +347,8 @@ module StackOne
|
|
105
347
|
end
|
106
348
|
|
107
349
|
|
108
|
-
sig { params(request: T.nilable(::StackOne::Operations::IamGetRoleRequest)).returns(::StackOne::Operations::IamGetRoleResponse) }
|
109
|
-
def get_role(request)
|
350
|
+
sig { params(request: T.nilable(::StackOne::Operations::IamGetRoleRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::IamGetRoleResponse) }
|
351
|
+
def get_role(request, retries = nil, timeout_ms = nil)
|
110
352
|
# get_role - Get Role
|
111
353
|
url, params = @sdk_configuration.get_server_details
|
112
354
|
base_url = Utils.template_url(url, params)
|
@@ -120,12 +362,76 @@ module StackOne
|
|
120
362
|
query_params = Utils.get_query_params(::StackOne::Operations::IamGetRoleRequest, request)
|
121
363
|
headers['Accept'] = 'application/json'
|
122
364
|
headers['user-agent'] = @sdk_configuration.user_agent
|
365
|
+
retries ||= @sdk_configuration.retry_config
|
366
|
+
retries ||= Utils::RetryConfig.new(
|
367
|
+
backoff: Utils::BackoffStrategy.new(
|
368
|
+
exponent: 1.5,
|
369
|
+
initial_interval: 500,
|
370
|
+
max_elapsed_time: 3_600_000,
|
371
|
+
max_interval: 60_000
|
372
|
+
),
|
373
|
+
retry_connection_errors: true,
|
374
|
+
strategy: 'backoff'
|
375
|
+
)
|
376
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
377
|
+
retry_options[:retry_statuses] = [429, 408]
|
123
378
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
379
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
380
|
+
|
381
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
382
|
+
timeout ||= @sdk_configuration.timeout
|
383
|
+
|
384
|
+
connection = @sdk_configuration.client.dup
|
385
|
+
connection.request :retry, retry_options
|
386
|
+
|
387
|
+
hook_ctx = SDKHooks::HookContext.new(
|
388
|
+
base_url: base_url,
|
389
|
+
oauth2_scopes: [],
|
390
|
+
operation_id: 'iam_get_role',
|
391
|
+
security_source: @sdk_configuration.security_source
|
392
|
+
)
|
393
|
+
|
394
|
+
error = T.let(nil, T.nilable(StandardError))
|
395
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
396
|
+
|
397
|
+
begin
|
398
|
+
r = connection.get(url) do |req|
|
399
|
+
req.headers.merge!(headers)
|
400
|
+
req.options.timeout = timeout unless timeout.nil?
|
401
|
+
req.params = query_params
|
402
|
+
Utils.configure_request_security(req, security)
|
403
|
+
|
404
|
+
@sdk_configuration.hooks.before_request(
|
405
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
406
|
+
hook_ctx: hook_ctx
|
407
|
+
),
|
408
|
+
request: req
|
409
|
+
)
|
410
|
+
end
|
411
|
+
rescue StandardError => e
|
412
|
+
error = e
|
413
|
+
ensure
|
414
|
+
if r.nil? || Utils.error_status?(r.status)
|
415
|
+
r = @sdk_configuration.hooks.after_error(
|
416
|
+
error: error,
|
417
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
418
|
+
hook_ctx: hook_ctx
|
419
|
+
),
|
420
|
+
response: r
|
421
|
+
)
|
422
|
+
else
|
423
|
+
r = @sdk_configuration.hooks.after_success(
|
424
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
425
|
+
hook_ctx: hook_ctx
|
426
|
+
),
|
427
|
+
response: r
|
428
|
+
)
|
429
|
+
end
|
430
|
+
|
431
|
+
if r.nil?
|
432
|
+
raise error if !error.nil?
|
433
|
+
raise 'no response'
|
434
|
+
end
|
129
435
|
end
|
130
436
|
|
131
437
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -148,8 +454,8 @@ module StackOne
|
|
148
454
|
end
|
149
455
|
|
150
456
|
|
151
|
-
sig { params(request: T.nilable(::StackOne::Operations::IamGetUserRequest)).returns(::StackOne::Operations::IamGetUserResponse) }
|
152
|
-
def get_user(request)
|
457
|
+
sig { params(request: T.nilable(::StackOne::Operations::IamGetUserRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::IamGetUserResponse) }
|
458
|
+
def get_user(request, retries = nil, timeout_ms = nil)
|
153
459
|
# get_user - Get User
|
154
460
|
url, params = @sdk_configuration.get_server_details
|
155
461
|
base_url = Utils.template_url(url, params)
|
@@ -163,12 +469,76 @@ module StackOne
|
|
163
469
|
query_params = Utils.get_query_params(::StackOne::Operations::IamGetUserRequest, request)
|
164
470
|
headers['Accept'] = 'application/json'
|
165
471
|
headers['user-agent'] = @sdk_configuration.user_agent
|
472
|
+
retries ||= @sdk_configuration.retry_config
|
473
|
+
retries ||= Utils::RetryConfig.new(
|
474
|
+
backoff: Utils::BackoffStrategy.new(
|
475
|
+
exponent: 1.5,
|
476
|
+
initial_interval: 500,
|
477
|
+
max_elapsed_time: 3_600_000,
|
478
|
+
max_interval: 60_000
|
479
|
+
),
|
480
|
+
retry_connection_errors: true,
|
481
|
+
strategy: 'backoff'
|
482
|
+
)
|
483
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
484
|
+
retry_options[:retry_statuses] = [429, 408]
|
166
485
|
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
486
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
487
|
+
|
488
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
489
|
+
timeout ||= @sdk_configuration.timeout
|
490
|
+
|
491
|
+
connection = @sdk_configuration.client.dup
|
492
|
+
connection.request :retry, retry_options
|
493
|
+
|
494
|
+
hook_ctx = SDKHooks::HookContext.new(
|
495
|
+
base_url: base_url,
|
496
|
+
oauth2_scopes: [],
|
497
|
+
operation_id: 'iam_get_user',
|
498
|
+
security_source: @sdk_configuration.security_source
|
499
|
+
)
|
500
|
+
|
501
|
+
error = T.let(nil, T.nilable(StandardError))
|
502
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
503
|
+
|
504
|
+
begin
|
505
|
+
r = connection.get(url) do |req|
|
506
|
+
req.headers.merge!(headers)
|
507
|
+
req.options.timeout = timeout unless timeout.nil?
|
508
|
+
req.params = query_params
|
509
|
+
Utils.configure_request_security(req, security)
|
510
|
+
|
511
|
+
@sdk_configuration.hooks.before_request(
|
512
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
513
|
+
hook_ctx: hook_ctx
|
514
|
+
),
|
515
|
+
request: req
|
516
|
+
)
|
517
|
+
end
|
518
|
+
rescue StandardError => e
|
519
|
+
error = e
|
520
|
+
ensure
|
521
|
+
if r.nil? || Utils.error_status?(r.status)
|
522
|
+
r = @sdk_configuration.hooks.after_error(
|
523
|
+
error: error,
|
524
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
525
|
+
hook_ctx: hook_ctx
|
526
|
+
),
|
527
|
+
response: r
|
528
|
+
)
|
529
|
+
else
|
530
|
+
r = @sdk_configuration.hooks.after_success(
|
531
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
532
|
+
hook_ctx: hook_ctx
|
533
|
+
),
|
534
|
+
response: r
|
535
|
+
)
|
536
|
+
end
|
537
|
+
|
538
|
+
if r.nil?
|
539
|
+
raise error if !error.nil?
|
540
|
+
raise 'no response'
|
541
|
+
end
|
172
542
|
end
|
173
543
|
|
174
544
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -191,8 +561,8 @@ module StackOne
|
|
191
561
|
end
|
192
562
|
|
193
563
|
|
194
|
-
sig { params(request: T.nilable(::StackOne::Operations::IamListGroupsRequest)).returns(::StackOne::Operations::IamListGroupsResponse) }
|
195
|
-
def list_groups(request)
|
564
|
+
sig { params(request: T.nilable(::StackOne::Operations::IamListGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::IamListGroupsResponse) }
|
565
|
+
def list_groups(request, retries = nil, timeout_ms = nil)
|
196
566
|
# list_groups - List Groups
|
197
567
|
url, params = @sdk_configuration.get_server_details
|
198
568
|
base_url = Utils.template_url(url, params)
|
@@ -201,12 +571,76 @@ module StackOne
|
|
201
571
|
query_params = Utils.get_query_params(::StackOne::Operations::IamListGroupsRequest, request)
|
202
572
|
headers['Accept'] = 'application/json'
|
203
573
|
headers['user-agent'] = @sdk_configuration.user_agent
|
574
|
+
retries ||= @sdk_configuration.retry_config
|
575
|
+
retries ||= Utils::RetryConfig.new(
|
576
|
+
backoff: Utils::BackoffStrategy.new(
|
577
|
+
exponent: 1.5,
|
578
|
+
initial_interval: 500,
|
579
|
+
max_elapsed_time: 3_600_000,
|
580
|
+
max_interval: 60_000
|
581
|
+
),
|
582
|
+
retry_connection_errors: true,
|
583
|
+
strategy: 'backoff'
|
584
|
+
)
|
585
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
586
|
+
retry_options[:retry_statuses] = [429, 408]
|
204
587
|
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
588
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
589
|
+
|
590
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
591
|
+
timeout ||= @sdk_configuration.timeout
|
592
|
+
|
593
|
+
connection = @sdk_configuration.client.dup
|
594
|
+
connection.request :retry, retry_options
|
595
|
+
|
596
|
+
hook_ctx = SDKHooks::HookContext.new(
|
597
|
+
base_url: base_url,
|
598
|
+
oauth2_scopes: [],
|
599
|
+
operation_id: 'iam_list_groups',
|
600
|
+
security_source: @sdk_configuration.security_source
|
601
|
+
)
|
602
|
+
|
603
|
+
error = T.let(nil, T.nilable(StandardError))
|
604
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
605
|
+
|
606
|
+
begin
|
607
|
+
r = connection.get(url) do |req|
|
608
|
+
req.headers.merge!(headers)
|
609
|
+
req.options.timeout = timeout unless timeout.nil?
|
610
|
+
req.params = query_params
|
611
|
+
Utils.configure_request_security(req, security)
|
612
|
+
|
613
|
+
@sdk_configuration.hooks.before_request(
|
614
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
615
|
+
hook_ctx: hook_ctx
|
616
|
+
),
|
617
|
+
request: req
|
618
|
+
)
|
619
|
+
end
|
620
|
+
rescue StandardError => e
|
621
|
+
error = e
|
622
|
+
ensure
|
623
|
+
if r.nil? || Utils.error_status?(r.status)
|
624
|
+
r = @sdk_configuration.hooks.after_error(
|
625
|
+
error: error,
|
626
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
627
|
+
hook_ctx: hook_ctx
|
628
|
+
),
|
629
|
+
response: r
|
630
|
+
)
|
631
|
+
else
|
632
|
+
r = @sdk_configuration.hooks.after_success(
|
633
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
634
|
+
hook_ctx: hook_ctx
|
635
|
+
),
|
636
|
+
response: r
|
637
|
+
)
|
638
|
+
end
|
639
|
+
|
640
|
+
if r.nil?
|
641
|
+
raise error if !error.nil?
|
642
|
+
raise 'no response'
|
643
|
+
end
|
210
644
|
end
|
211
645
|
|
212
646
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -229,8 +663,8 @@ module StackOne
|
|
229
663
|
end
|
230
664
|
|
231
665
|
|
232
|
-
sig { params(request: T.nilable(::StackOne::Operations::IamListPoliciesRequest)).returns(::StackOne::Operations::IamListPoliciesResponse) }
|
233
|
-
def list_policies(request)
|
666
|
+
sig { params(request: T.nilable(::StackOne::Operations::IamListPoliciesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::IamListPoliciesResponse) }
|
667
|
+
def list_policies(request, retries = nil, timeout_ms = nil)
|
234
668
|
# list_policies - List Policies
|
235
669
|
url, params = @sdk_configuration.get_server_details
|
236
670
|
base_url = Utils.template_url(url, params)
|
@@ -239,12 +673,76 @@ module StackOne
|
|
239
673
|
query_params = Utils.get_query_params(::StackOne::Operations::IamListPoliciesRequest, request)
|
240
674
|
headers['Accept'] = 'application/json'
|
241
675
|
headers['user-agent'] = @sdk_configuration.user_agent
|
676
|
+
retries ||= @sdk_configuration.retry_config
|
677
|
+
retries ||= Utils::RetryConfig.new(
|
678
|
+
backoff: Utils::BackoffStrategy.new(
|
679
|
+
exponent: 1.5,
|
680
|
+
initial_interval: 500,
|
681
|
+
max_elapsed_time: 3_600_000,
|
682
|
+
max_interval: 60_000
|
683
|
+
),
|
684
|
+
retry_connection_errors: true,
|
685
|
+
strategy: 'backoff'
|
686
|
+
)
|
687
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
688
|
+
retry_options[:retry_statuses] = [429, 408]
|
689
|
+
|
690
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
242
691
|
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
692
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
693
|
+
timeout ||= @sdk_configuration.timeout
|
694
|
+
|
695
|
+
connection = @sdk_configuration.client.dup
|
696
|
+
connection.request :retry, retry_options
|
697
|
+
|
698
|
+
hook_ctx = SDKHooks::HookContext.new(
|
699
|
+
base_url: base_url,
|
700
|
+
oauth2_scopes: [],
|
701
|
+
operation_id: 'iam_list_policies',
|
702
|
+
security_source: @sdk_configuration.security_source
|
703
|
+
)
|
704
|
+
|
705
|
+
error = T.let(nil, T.nilable(StandardError))
|
706
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
707
|
+
|
708
|
+
begin
|
709
|
+
r = connection.get(url) do |req|
|
710
|
+
req.headers.merge!(headers)
|
711
|
+
req.options.timeout = timeout unless timeout.nil?
|
712
|
+
req.params = query_params
|
713
|
+
Utils.configure_request_security(req, security)
|
714
|
+
|
715
|
+
@sdk_configuration.hooks.before_request(
|
716
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
717
|
+
hook_ctx: hook_ctx
|
718
|
+
),
|
719
|
+
request: req
|
720
|
+
)
|
721
|
+
end
|
722
|
+
rescue StandardError => e
|
723
|
+
error = e
|
724
|
+
ensure
|
725
|
+
if r.nil? || Utils.error_status?(r.status)
|
726
|
+
r = @sdk_configuration.hooks.after_error(
|
727
|
+
error: error,
|
728
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
729
|
+
hook_ctx: hook_ctx
|
730
|
+
),
|
731
|
+
response: r
|
732
|
+
)
|
733
|
+
else
|
734
|
+
r = @sdk_configuration.hooks.after_success(
|
735
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
736
|
+
hook_ctx: hook_ctx
|
737
|
+
),
|
738
|
+
response: r
|
739
|
+
)
|
740
|
+
end
|
741
|
+
|
742
|
+
if r.nil?
|
743
|
+
raise error if !error.nil?
|
744
|
+
raise 'no response'
|
745
|
+
end
|
248
746
|
end
|
249
747
|
|
250
748
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -267,8 +765,8 @@ module StackOne
|
|
267
765
|
end
|
268
766
|
|
269
767
|
|
270
|
-
sig { params(request: T.nilable(::StackOne::Operations::IamListRolesRequest)).returns(::StackOne::Operations::IamListRolesResponse) }
|
271
|
-
def list_roles(request)
|
768
|
+
sig { params(request: T.nilable(::StackOne::Operations::IamListRolesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::IamListRolesResponse) }
|
769
|
+
def list_roles(request, retries = nil, timeout_ms = nil)
|
272
770
|
# list_roles - List Roles
|
273
771
|
url, params = @sdk_configuration.get_server_details
|
274
772
|
base_url = Utils.template_url(url, params)
|
@@ -277,12 +775,76 @@ module StackOne
|
|
277
775
|
query_params = Utils.get_query_params(::StackOne::Operations::IamListRolesRequest, request)
|
278
776
|
headers['Accept'] = 'application/json'
|
279
777
|
headers['user-agent'] = @sdk_configuration.user_agent
|
778
|
+
retries ||= @sdk_configuration.retry_config
|
779
|
+
retries ||= Utils::RetryConfig.new(
|
780
|
+
backoff: Utils::BackoffStrategy.new(
|
781
|
+
exponent: 1.5,
|
782
|
+
initial_interval: 500,
|
783
|
+
max_elapsed_time: 3_600_000,
|
784
|
+
max_interval: 60_000
|
785
|
+
),
|
786
|
+
retry_connection_errors: true,
|
787
|
+
strategy: 'backoff'
|
788
|
+
)
|
789
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
790
|
+
retry_options[:retry_statuses] = [429, 408]
|
791
|
+
|
792
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
280
793
|
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
794
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
795
|
+
timeout ||= @sdk_configuration.timeout
|
796
|
+
|
797
|
+
connection = @sdk_configuration.client.dup
|
798
|
+
connection.request :retry, retry_options
|
799
|
+
|
800
|
+
hook_ctx = SDKHooks::HookContext.new(
|
801
|
+
base_url: base_url,
|
802
|
+
oauth2_scopes: [],
|
803
|
+
operation_id: 'iam_list_roles',
|
804
|
+
security_source: @sdk_configuration.security_source
|
805
|
+
)
|
806
|
+
|
807
|
+
error = T.let(nil, T.nilable(StandardError))
|
808
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
809
|
+
|
810
|
+
begin
|
811
|
+
r = connection.get(url) do |req|
|
812
|
+
req.headers.merge!(headers)
|
813
|
+
req.options.timeout = timeout unless timeout.nil?
|
814
|
+
req.params = query_params
|
815
|
+
Utils.configure_request_security(req, security)
|
816
|
+
|
817
|
+
@sdk_configuration.hooks.before_request(
|
818
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
819
|
+
hook_ctx: hook_ctx
|
820
|
+
),
|
821
|
+
request: req
|
822
|
+
)
|
823
|
+
end
|
824
|
+
rescue StandardError => e
|
825
|
+
error = e
|
826
|
+
ensure
|
827
|
+
if r.nil? || Utils.error_status?(r.status)
|
828
|
+
r = @sdk_configuration.hooks.after_error(
|
829
|
+
error: error,
|
830
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
831
|
+
hook_ctx: hook_ctx
|
832
|
+
),
|
833
|
+
response: r
|
834
|
+
)
|
835
|
+
else
|
836
|
+
r = @sdk_configuration.hooks.after_success(
|
837
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
838
|
+
hook_ctx: hook_ctx
|
839
|
+
),
|
840
|
+
response: r
|
841
|
+
)
|
842
|
+
end
|
843
|
+
|
844
|
+
if r.nil?
|
845
|
+
raise error if !error.nil?
|
846
|
+
raise 'no response'
|
847
|
+
end
|
286
848
|
end
|
287
849
|
|
288
850
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -305,8 +867,8 @@ module StackOne
|
|
305
867
|
end
|
306
868
|
|
307
869
|
|
308
|
-
sig { params(request: T.nilable(::StackOne::Operations::IamListUsersRequest)).returns(::StackOne::Operations::IamListUsersResponse) }
|
309
|
-
def list_users(request)
|
870
|
+
sig { params(request: T.nilable(::StackOne::Operations::IamListUsersRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::IamListUsersResponse) }
|
871
|
+
def list_users(request, retries = nil, timeout_ms = nil)
|
310
872
|
# list_users - List Users
|
311
873
|
url, params = @sdk_configuration.get_server_details
|
312
874
|
base_url = Utils.template_url(url, params)
|
@@ -315,12 +877,76 @@ module StackOne
|
|
315
877
|
query_params = Utils.get_query_params(::StackOne::Operations::IamListUsersRequest, request)
|
316
878
|
headers['Accept'] = 'application/json'
|
317
879
|
headers['user-agent'] = @sdk_configuration.user_agent
|
880
|
+
retries ||= @sdk_configuration.retry_config
|
881
|
+
retries ||= Utils::RetryConfig.new(
|
882
|
+
backoff: Utils::BackoffStrategy.new(
|
883
|
+
exponent: 1.5,
|
884
|
+
initial_interval: 500,
|
885
|
+
max_elapsed_time: 3_600_000,
|
886
|
+
max_interval: 60_000
|
887
|
+
),
|
888
|
+
retry_connection_errors: true,
|
889
|
+
strategy: 'backoff'
|
890
|
+
)
|
891
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
892
|
+
retry_options[:retry_statuses] = [429, 408]
|
893
|
+
|
894
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
318
895
|
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
896
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
897
|
+
timeout ||= @sdk_configuration.timeout
|
898
|
+
|
899
|
+
connection = @sdk_configuration.client.dup
|
900
|
+
connection.request :retry, retry_options
|
901
|
+
|
902
|
+
hook_ctx = SDKHooks::HookContext.new(
|
903
|
+
base_url: base_url,
|
904
|
+
oauth2_scopes: [],
|
905
|
+
operation_id: 'iam_list_users',
|
906
|
+
security_source: @sdk_configuration.security_source
|
907
|
+
)
|
908
|
+
|
909
|
+
error = T.let(nil, T.nilable(StandardError))
|
910
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
911
|
+
|
912
|
+
begin
|
913
|
+
r = connection.get(url) do |req|
|
914
|
+
req.headers.merge!(headers)
|
915
|
+
req.options.timeout = timeout unless timeout.nil?
|
916
|
+
req.params = query_params
|
917
|
+
Utils.configure_request_security(req, security)
|
918
|
+
|
919
|
+
@sdk_configuration.hooks.before_request(
|
920
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
921
|
+
hook_ctx: hook_ctx
|
922
|
+
),
|
923
|
+
request: req
|
924
|
+
)
|
925
|
+
end
|
926
|
+
rescue StandardError => e
|
927
|
+
error = e
|
928
|
+
ensure
|
929
|
+
if r.nil? || Utils.error_status?(r.status)
|
930
|
+
r = @sdk_configuration.hooks.after_error(
|
931
|
+
error: error,
|
932
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
933
|
+
hook_ctx: hook_ctx
|
934
|
+
),
|
935
|
+
response: r
|
936
|
+
)
|
937
|
+
else
|
938
|
+
r = @sdk_configuration.hooks.after_success(
|
939
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
940
|
+
hook_ctx: hook_ctx
|
941
|
+
),
|
942
|
+
response: r
|
943
|
+
)
|
944
|
+
end
|
945
|
+
|
946
|
+
if r.nil?
|
947
|
+
raise error if !error.nil?
|
948
|
+
raise 'no response'
|
949
|
+
end
|
324
950
|
end
|
325
951
|
|
326
952
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -341,5 +967,128 @@ module StackOne
|
|
341
967
|
|
342
968
|
res
|
343
969
|
end
|
970
|
+
|
971
|
+
|
972
|
+
sig { params(iam_update_user_request_dto: ::StackOne::Shared::IamUpdateUserRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::IamUpdateUserResponse) }
|
973
|
+
def update_user(iam_update_user_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
|
974
|
+
# update_user - Update User
|
975
|
+
request = ::StackOne::Operations::IamUpdateUserRequest.new(
|
976
|
+
|
977
|
+
iam_update_user_request_dto: iam_update_user_request_dto,
|
978
|
+
id: id,
|
979
|
+
x_account_id: x_account_id
|
980
|
+
)
|
981
|
+
url, params = @sdk_configuration.get_server_details
|
982
|
+
base_url = Utils.template_url(url, params)
|
983
|
+
url = Utils.generate_url(
|
984
|
+
::StackOne::Operations::IamUpdateUserRequest,
|
985
|
+
base_url,
|
986
|
+
'/unified/iam/users/{id}',
|
987
|
+
request
|
988
|
+
)
|
989
|
+
headers = Utils.get_headers(request)
|
990
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :iam_update_user_request_dto, :json)
|
991
|
+
headers['content-type'] = req_content_type
|
992
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
993
|
+
|
994
|
+
if form
|
995
|
+
body = Utils.encode_form(form)
|
996
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
997
|
+
body = URI.encode_www_form(data)
|
998
|
+
else
|
999
|
+
body = data
|
1000
|
+
end
|
1001
|
+
headers['Accept'] = 'application/json'
|
1002
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
1003
|
+
retries ||= @sdk_configuration.retry_config
|
1004
|
+
retries ||= Utils::RetryConfig.new(
|
1005
|
+
backoff: Utils::BackoffStrategy.new(
|
1006
|
+
exponent: 1.5,
|
1007
|
+
initial_interval: 500,
|
1008
|
+
max_elapsed_time: 3_600_000,
|
1009
|
+
max_interval: 60_000
|
1010
|
+
),
|
1011
|
+
retry_connection_errors: true,
|
1012
|
+
strategy: 'backoff'
|
1013
|
+
)
|
1014
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1015
|
+
retry_options[:retry_statuses] = [429, 408]
|
1016
|
+
|
1017
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1018
|
+
|
1019
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1020
|
+
timeout ||= @sdk_configuration.timeout
|
1021
|
+
|
1022
|
+
connection = @sdk_configuration.client.dup
|
1023
|
+
connection.request :retry, retry_options
|
1024
|
+
|
1025
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1026
|
+
base_url: base_url,
|
1027
|
+
oauth2_scopes: [],
|
1028
|
+
operation_id: 'iam_update_user',
|
1029
|
+
security_source: @sdk_configuration.security_source
|
1030
|
+
)
|
1031
|
+
|
1032
|
+
error = T.let(nil, T.nilable(StandardError))
|
1033
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1034
|
+
|
1035
|
+
begin
|
1036
|
+
r = connection.patch(url) do |req|
|
1037
|
+
req.body = body
|
1038
|
+
req.headers.merge!(headers)
|
1039
|
+
req.options.timeout = timeout unless timeout.nil?
|
1040
|
+
Utils.configure_request_security(req, security)
|
1041
|
+
|
1042
|
+
@sdk_configuration.hooks.before_request(
|
1043
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1044
|
+
hook_ctx: hook_ctx
|
1045
|
+
),
|
1046
|
+
request: req
|
1047
|
+
)
|
1048
|
+
end
|
1049
|
+
rescue StandardError => e
|
1050
|
+
error = e
|
1051
|
+
ensure
|
1052
|
+
if r.nil? || Utils.error_status?(r.status)
|
1053
|
+
r = @sdk_configuration.hooks.after_error(
|
1054
|
+
error: error,
|
1055
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1056
|
+
hook_ctx: hook_ctx
|
1057
|
+
),
|
1058
|
+
response: r
|
1059
|
+
)
|
1060
|
+
else
|
1061
|
+
r = @sdk_configuration.hooks.after_success(
|
1062
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1063
|
+
hook_ctx: hook_ctx
|
1064
|
+
),
|
1065
|
+
response: r
|
1066
|
+
)
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
if r.nil?
|
1070
|
+
raise error if !error.nil?
|
1071
|
+
raise 'no response'
|
1072
|
+
end
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
1076
|
+
|
1077
|
+
res = ::StackOne::Operations::IamUpdateUserResponse.new(
|
1078
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
1079
|
+
)
|
1080
|
+
if r.status == 200
|
1081
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1082
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::StackOne::Shared::UpdateUserApiModel)
|
1083
|
+
res.update_user_api_model = out
|
1084
|
+
end
|
1085
|
+
elsif r.status == 408
|
1086
|
+
res.headers = r.headers
|
1087
|
+
elsif [400, 403, 412, 429].include?(r.status)
|
1088
|
+
elsif [500, 501].include?(r.status)
|
1089
|
+
end
|
1090
|
+
|
1091
|
+
res
|
1092
|
+
end
|
344
1093
|
end
|
345
1094
|
end
|