ibm_cloud_iam 1.0.1 → 2.0.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.
Files changed (493) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +202 -0
  3. data/README.md +548 -36
  4. data/docs/APIKeysApi.md +714 -0
  5. data/docs/AccessGroupCount.md +20 -0
  6. data/docs/AccountBasedMfaEnrollment.md +24 -0
  7. data/docs/AccountIdpSettings.md +32 -0
  8. data/docs/AccountLimitsApi.md +173 -0
  9. data/docs/AccountLoginSettings.md +18 -0
  10. data/docs/AccountSettingsApi.md +224 -0
  11. data/docs/AccountSettingsAssignedTemplatesSection.md +46 -0
  12. data/docs/AccountSettingsEffectiveSection.md +38 -0
  13. data/docs/AccountSettingsForIdPApi.md +489 -0
  14. data/docs/AccountSettingsMeta.md +24 -0
  15. data/docs/AccountSettingsRequest.md +40 -0
  16. data/docs/AccountSettingsResponse.md +48 -0
  17. data/docs/AccountSettingsTemplateApi.md +720 -0
  18. data/docs/AccountSettingsTemplateAssignmentsApi.md +376 -0
  19. data/docs/AccountSettingsTemplateList.md +30 -0
  20. data/docs/AccountSettingsTemplateRequest.md +24 -0
  21. data/docs/AccountSettingsTemplateResponse.md +44 -0
  22. data/docs/AccountSettingsUserDomainRestriction.md +22 -0
  23. data/docs/AccountSettingsUserMFAResponse.md +28 -0
  24. data/docs/ActionControls.md +22 -0
  25. data/docs/ActionControlsIdentities.md +20 -0
  26. data/docs/ActivitiesApi.md +149 -0
  27. data/docs/Activity.md +20 -0
  28. data/docs/AddAccountIdpSettingRequest.md +22 -0
  29. data/docs/ApiKey.md +44 -33
  30. data/docs/ApiKeyInsideCreateServiceIdRequest.md +18 -13
  31. data/docs/ApiKeyList.md +20 -19
  32. data/docs/ApikeyActivity.md +28 -0
  33. data/docs/ApikeyActivityServiceid.md +20 -0
  34. data/docs/ApikeyActivityUser.md +24 -0
  35. data/docs/AssignedTemplatesAccountSettings.md +40 -0
  36. data/docs/CommonAccountSettingsRequest.md +36 -0
  37. data/docs/CommonAccountSettingsResponse.md +34 -0
  38. data/docs/ConsumersResponse.md +20 -0
  39. data/docs/ConsumersResponseConsumersInner.md +20 -0
  40. data/docs/CreateApiKeyRequest.md +24 -17
  41. data/docs/CreateIdpRequest.md +30 -0
  42. data/docs/CreateIdpRequestProperties.md +20 -0
  43. data/docs/CreateIdpRequestPropertiesIdp.md +26 -0
  44. data/docs/CreateIdpRequestPropertiesSp.md +32 -0
  45. data/docs/CreateIdpRequestPropertiesSpAuthnContext.md +20 -0
  46. data/docs/CreateIdpRequestSecrets.md +20 -0
  47. data/docs/CreateIdpRequestSecretsIdp.md +22 -0
  48. data/docs/CreateIdpRequestSecretsIdpSigningInner.md +20 -0
  49. data/docs/CreateIdpRequestSecretsSp.md +18 -0
  50. data/docs/CreateIdpRequestSecretsSpSigningInner.md +24 -0
  51. data/docs/CreateProfileLinkRequest.md +24 -0
  52. data/docs/CreateProfileLinkRequestLink.md +26 -0
  53. data/docs/CreateServiceIdGroupRequest.md +22 -0
  54. data/docs/CreateServiceIdRequest.md +18 -15
  55. data/docs/CreateTemplateAssignmentRequest.md +24 -0
  56. data/docs/CreateTrustedProfileRequest.md +24 -0
  57. data/docs/EffectiveAccountSettingsResponse.md +26 -0
  58. data/docs/EnityHistoryRecord.md +18 -17
  59. data/docs/EntityActivity.md +22 -0
  60. data/docs/Error.md +14 -13
  61. data/docs/ExceptionResponse.md +14 -13
  62. data/docs/ExceptionResponseContext.md +30 -29
  63. data/docs/IDPManagementApi.md +692 -0
  64. data/docs/IdBasedMfaEnrollment.md +26 -0
  65. data/docs/IdentityCount.md +20 -0
  66. data/docs/IdentityLimitsUsageRequest.md +42 -0
  67. data/docs/IdentityLimitsUsageResponse.md +44 -0
  68. data/docs/IdentityLimitsUsageResponseApikeysPerIdentity.md +20 -0
  69. data/docs/IdentityLimitsUsageResponseClaimRulesPerGroup.md +20 -0
  70. data/docs/IdentityLimitsUsageResponseClaimRulesPerProfile.md +20 -0
  71. data/docs/IdentityLimitsUsageResponseServiceidsPerGroup.md +20 -0
  72. data/docs/IdentityLimitsUsageResponseTemplateVersionsPerTemplate.md +20 -0
  73. data/docs/IdentityPreferenceResponse.md +28 -0
  74. data/docs/IdentityPreferencesApi.md +304 -0
  75. data/docs/IdentityPreferencesResponse.md +18 -0
  76. data/docs/Idp.md +38 -0
  77. data/docs/LimitCount.md +20 -0
  78. data/docs/ListIdPSettings200Response.md +18 -0
  79. data/docs/ListIdps200Response.md +18 -0
  80. data/docs/MFAEnrollmentStatusApi.md +216 -0
  81. data/docs/MFARequirementsResponse.md +12 -11
  82. data/docs/MfaEnrollmentTypeStatus.md +20 -0
  83. data/docs/MfaOptions.md +15 -0
  84. data/docs/OidcExceptionResponse.md +16 -15
  85. data/docs/PolicyTemplateReference.md +20 -0
  86. data/docs/ProfileClaimRule.md +36 -0
  87. data/docs/ProfileClaimRuleConditions.md +22 -0
  88. data/docs/ProfileClaimRuleList.md +20 -0
  89. data/docs/ProfileClaimRuleRequest.md +30 -0
  90. data/docs/ProfileCount.md +20 -0
  91. data/docs/ProfileIdentitiesResponse.md +20 -0
  92. data/docs/ProfileIdentitiesUpdateRequest.md +18 -0
  93. data/docs/ProfileIdentityRequest.md +24 -0
  94. data/docs/ProfileIdentityResponse.md +26 -0
  95. data/docs/ProfileLink.md +32 -0
  96. data/docs/ProfileLinkLink.md +26 -0
  97. data/docs/ProfileLinkList.md +18 -0
  98. data/docs/Report.md +34 -0
  99. data/docs/ReportMfaEnrollmentStatus.md +28 -0
  100. data/docs/ReportReference.md +18 -0
  101. data/docs/ResponseContext.md +28 -27
  102. data/docs/RetrictActions.md +15 -0
  103. data/docs/SamlMetadataImportResponse.md +42 -0
  104. data/docs/ServiceIDGroupsApi.md +347 -0
  105. data/docs/ServiceIDsApi.md +515 -0
  106. data/docs/ServiceId.md +38 -33
  107. data/docs/ServiceIdGroup.md +34 -0
  108. data/docs/ServiceIdGroupCount.md +20 -0
  109. data/docs/ServiceIdGroupList.md +18 -0
  110. data/docs/ServiceIdList.md +20 -19
  111. data/docs/ShareScope.md +20 -0
  112. data/docs/TemplateAccountSettings.md +40 -0
  113. data/docs/TemplateAccountSettingsAllOfRestrictUserDomains.md +20 -0
  114. data/docs/TemplateAssignmentListResponse.md +30 -0
  115. data/docs/TemplateAssignmentResource.md +18 -0
  116. data/docs/TemplateAssignmentResourceError.md +24 -0
  117. data/docs/TemplateAssignmentResponse.md +48 -0
  118. data/docs/TemplateAssignmentResponseResource.md +24 -0
  119. data/docs/TemplateAssignmentResponseResourceDetail.md +26 -0
  120. data/docs/TemplateCount.md +20 -0
  121. data/docs/TemplateProfileComponentRequest.md +26 -0
  122. data/docs/TemplateProfileComponentResponse.md +26 -0
  123. data/docs/TestResult.md +28 -0
  124. data/docs/TestResultStepsInner.md +24 -0
  125. data/docs/TestTriggerResponse.md +20 -0
  126. data/docs/TokenResponse.md +18 -17
  127. data/docs/TokenRetrievalApi.md +461 -0
  128. data/docs/TrustedProfile.md +50 -0
  129. data/docs/TrustedProfileTemplateApi.md +720 -0
  130. data/docs/TrustedProfileTemplateAssignmentsApi.md +376 -0
  131. data/docs/TrustedProfileTemplateClaimRule.md +26 -0
  132. data/docs/TrustedProfileTemplateList.md +30 -0
  133. data/docs/TrustedProfileTemplateRequest.md +28 -0
  134. data/docs/TrustedProfileTemplateResponse.md +48 -0
  135. data/docs/TrustedProfilesApi.md +1414 -0
  136. data/docs/TrustedProfilesList.md +30 -0
  137. data/docs/UpdateAccountIdpSettingRequest.md +22 -0
  138. data/docs/UpdateAccountLoginSettings.md +18 -0
  139. data/docs/UpdateApiKeyRequest.md +16 -9
  140. data/docs/UpdateIdPRequest.md +28 -0
  141. data/docs/UpdateIdPRequestProperties.md +20 -0
  142. data/docs/UpdateIdPRequestPropertiesIdp.md +24 -0
  143. data/docs/UpdateIdPRequestSecrets.md +20 -0
  144. data/docs/UpdateIdPRequestSecretsIdp.md +20 -0
  145. data/docs/UpdatePreferenceRequest.md +20 -0
  146. data/docs/UpdateServiceIdGroupRequest.md +20 -0
  147. data/docs/UpdateServiceIdRequest.md +12 -11
  148. data/docs/UpdateTemplateAssignmentRequest.md +18 -0
  149. data/docs/UpdateTrustedProfileRequest.md +22 -0
  150. data/docs/UserActivity.md +26 -0
  151. data/docs/UserMFAResolved.md +24 -0
  152. data/docs/UserMfa.md +20 -0
  153. data/docs/UserMfaEnrollments.md +24 -0
  154. data/docs/UserReportMfaEnrollmentStatus.md +30 -0
  155. data/docs/UserVisbilityRetrictActions.md +15 -0
  156. data/docs/UserVisbilityRetrictActionsForTemplate.md +15 -0
  157. data/git_push.sh +3 -4
  158. data/ibm_cloud_iam.gemspec +6 -5
  159. data/lib/ibm_cloud_iam/api/account_limits_api.rb +208 -0
  160. data/lib/ibm_cloud_iam/api/account_settings_api.rb +262 -0
  161. data/lib/ibm_cloud_iam/api/account_settings_for_id_p_api.rb +571 -0
  162. data/lib/ibm_cloud_iam/api/account_settings_template_api.rb +823 -0
  163. data/lib/ibm_cloud_iam/api/account_settings_template_assignments_api.rb +422 -0
  164. data/lib/ibm_cloud_iam/api/activities_api.rb +174 -0
  165. data/lib/ibm_cloud_iam/api/api_keys_api.rb +786 -0
  166. data/lib/ibm_cloud_iam/api/identity_preferences_api.rb +357 -0
  167. data/lib/ibm_cloud_iam/api/idp_management_api.rb +744 -0
  168. data/lib/ibm_cloud_iam/api/mfa_enrollment_status_api.rb +248 -0
  169. data/lib/ibm_cloud_iam/api/service_id_groups_api.rb +392 -0
  170. data/lib/ibm_cloud_iam/api/service_ids_api.rb +575 -0
  171. data/lib/ibm_cloud_iam/api/token_retrieval_api.rb +557 -0
  172. data/lib/ibm_cloud_iam/api/trusted_profile_template_api.rb +823 -0
  173. data/lib/ibm_cloud_iam/api/trusted_profile_template_assignments_api.rb +422 -0
  174. data/lib/ibm_cloud_iam/api/trusted_profiles_api.rb +1630 -0
  175. data/lib/ibm_cloud_iam/api_client.rb +74 -65
  176. data/lib/ibm_cloud_iam/api_error.rb +4 -3
  177. data/lib/ibm_cloud_iam/api_model_base.rb +88 -0
  178. data/lib/ibm_cloud_iam/configuration.rb +75 -15
  179. data/lib/ibm_cloud_iam/models/access_group_count.rb +159 -0
  180. data/lib/ibm_cloud_iam/models/account_based_mfa_enrollment.rb +243 -0
  181. data/lib/ibm_cloud_iam/models/account_idp_settings.rb +244 -0
  182. data/lib/ibm_cloud_iam/models/account_login_settings.rb +147 -0
  183. data/lib/ibm_cloud_iam/models/account_settings_assigned_templates_section.rb +377 -0
  184. data/lib/ibm_cloud_iam/models/account_settings_effective_section.rb +282 -0
  185. data/lib/ibm_cloud_iam/models/account_settings_meta.rb +179 -0
  186. data/lib/ibm_cloud_iam/models/account_settings_request.rb +301 -0
  187. data/lib/ibm_cloud_iam/models/account_settings_response.rb +567 -0
  188. data/lib/ibm_cloud_iam/models/account_settings_template_list.rb +256 -0
  189. data/lib/ibm_cloud_iam/models/account_settings_template_request.rb +178 -0
  190. data/lib/ibm_cloud_iam/models/account_settings_template_response.rb +416 -0
  191. data/lib/ibm_cloud_iam/models/account_settings_user_domain_restriction.rb +188 -0
  192. data/lib/ibm_cloud_iam/models/account_settings_user_mfa_response.rb +261 -0
  193. data/lib/ibm_cloud_iam/models/action_controls.rb +199 -0
  194. data/lib/ibm_cloud_iam/models/action_controls_identities.rb +190 -0
  195. data/lib/ibm_cloud_iam/models/activity.rb +175 -0
  196. data/lib/ibm_cloud_iam/models/add_account_idp_setting_request.rb +243 -0
  197. data/lib/ibm_cloud_iam/models/api_key.rb +188 -104
  198. data/lib/ibm_cloud_iam/models/api_key_inside_create_service_id_request.rb +70 -99
  199. data/lib/ibm_cloud_iam/models/api_key_list.rb +46 -95
  200. data/lib/ibm_cloud_iam/models/apikey_activity.rb +231 -0
  201. data/lib/ibm_cloud_iam/models/apikey_activity_serviceid.rb +159 -0
  202. data/lib/ibm_cloud_iam/models/apikey_activity_user.rb +179 -0
  203. data/lib/ibm_cloud_iam/models/assigned_templates_account_settings.rb +296 -0
  204. data/lib/ibm_cloud_iam/models/common_account_settings_request.rb +272 -0
  205. data/lib/ibm_cloud_iam/models/common_account_settings_response.rb +260 -0
  206. data/lib/ibm_cloud_iam/models/consumers_response.rb +158 -0
  207. data/lib/ibm_cloud_iam/models/consumers_response_consumers_inner.rb +158 -0
  208. data/lib/ibm_cloud_iam/models/create_api_key_request.rb +92 -99
  209. data/lib/ibm_cloud_iam/models/create_idp_request.rb +283 -0
  210. data/lib/ibm_cloud_iam/models/create_idp_request_properties.rb +157 -0
  211. data/lib/ibm_cloud_iam/models/create_idp_request_properties_idp.rb +189 -0
  212. data/lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb +222 -0
  213. data/lib/ibm_cloud_iam/models/create_idp_request_properties_sp_authn_context.rb +163 -0
  214. data/lib/ibm_cloud_iam/models/create_idp_request_secrets.rb +157 -0
  215. data/lib/ibm_cloud_iam/models/create_idp_request_secrets_idp.rb +173 -0
  216. data/lib/ibm_cloud_iam/models/create_idp_request_secrets_idp_signing_inner.rb +192 -0
  217. data/lib/ibm_cloud_iam/models/create_idp_request_secrets_sp.rb +151 -0
  218. data/lib/ibm_cloud_iam/models/create_idp_request_secrets_sp_signing_inner.rb +212 -0
  219. data/lib/ibm_cloud_iam/models/create_profile_link_request.rb +211 -0
  220. data/lib/ibm_cloud_iam/models/create_profile_link_request_link.rb +206 -0
  221. data/lib/ibm_cloud_iam/models/create_service_id_group_request.rb +203 -0
  222. data/lib/ibm_cloud_iam/models/create_service_id_request.rb +68 -95
  223. data/lib/ibm_cloud_iam/models/create_template_assignment_request.rb +280 -0
  224. data/lib/ibm_cloud_iam/models/create_trusted_profile_request.rb +213 -0
  225. data/lib/ibm_cloud_iam/models/effective_account_settings_response.rb +239 -0
  226. data/lib/ibm_cloud_iam/models/enity_history_record.rb +112 -101
  227. data/lib/ibm_cloud_iam/models/entity_activity.rb +185 -0
  228. data/lib/ibm_cloud_iam/models/error.rb +69 -94
  229. data/lib/ibm_cloud_iam/models/exception_response.rb +57 -94
  230. data/lib/ibm_cloud_iam/models/exception_response_context.rb +33 -94
  231. data/lib/ibm_cloud_iam/models/id_based_mfa_enrollment.rb +270 -0
  232. data/lib/ibm_cloud_iam/models/identity_count.rb +159 -0
  233. data/lib/ibm_cloud_iam/models/identity_limits_usage_request.rb +283 -0
  234. data/lib/ibm_cloud_iam/models/identity_limits_usage_response.rb +265 -0
  235. data/lib/ibm_cloud_iam/models/identity_limits_usage_response_apikeys_per_identity.rb +178 -0
  236. data/lib/ibm_cloud_iam/models/identity_limits_usage_response_claim_rules_per_group.rb +178 -0
  237. data/lib/ibm_cloud_iam/models/identity_limits_usage_response_claim_rules_per_profile.rb +178 -0
  238. data/lib/ibm_cloud_iam/models/identity_limits_usage_response_serviceids_per_group.rb +178 -0
  239. data/lib/ibm_cloud_iam/models/identity_limits_usage_response_template_versions_per_template.rb +178 -0
  240. data/lib/ibm_cloud_iam/models/identity_preference_response.rb +200 -0
  241. data/lib/ibm_cloud_iam/models/identity_preferences_response.rb +167 -0
  242. data/lib/ibm_cloud_iam/models/idp.rb +239 -0
  243. data/lib/ibm_cloud_iam/models/limit_count.rb +176 -0
  244. data/lib/ibm_cloud_iam/models/list_id_p_settings200_response.rb +149 -0
  245. data/lib/ibm_cloud_iam/models/list_idps200_response.rb +149 -0
  246. data/lib/ibm_cloud_iam/models/mfa_enrollment_type_status.rb +192 -0
  247. data/lib/ibm_cloud_iam/models/mfa_options.rb +45 -0
  248. data/lib/ibm_cloud_iam/models/mfa_requirements_response.rb +69 -94
  249. data/lib/ibm_cloud_iam/models/oidc_exception_response.rb +57 -94
  250. data/lib/ibm_cloud_iam/models/policy_template_reference.rb +193 -0
  251. data/lib/ibm_cloud_iam/models/profile_claim_rule.rb +342 -0
  252. data/lib/ibm_cloud_iam/models/profile_claim_rule_conditions.rb +219 -0
  253. data/lib/ibm_cloud_iam/models/profile_claim_rule_list.rb +176 -0
  254. data/lib/ibm_cloud_iam/models/profile_claim_rule_request.rb +243 -0
  255. data/lib/ibm_cloud_iam/models/profile_count.rb +159 -0
  256. data/lib/ibm_cloud_iam/models/profile_identities_response.rb +160 -0
  257. data/lib/ibm_cloud_iam/models/profile_identities_update_request.rb +150 -0
  258. data/lib/ibm_cloud_iam/models/profile_identity_request.rb +238 -0
  259. data/lib/ibm_cloud_iam/models/profile_identity_response.rb +265 -0
  260. data/lib/ibm_cloud_iam/models/profile_link.rb +320 -0
  261. data/lib/ibm_cloud_iam/models/profile_link_link.rb +188 -0
  262. data/lib/ibm_cloud_iam/models/profile_link_list.rb +167 -0
  263. data/lib/ibm_cloud_iam/models/report.rb +321 -0
  264. data/lib/ibm_cloud_iam/models/report_mfa_enrollment_status.rb +268 -0
  265. data/lib/ibm_cloud_iam/models/report_reference.rb +165 -0
  266. data/lib/ibm_cloud_iam/models/response_context.rb +33 -94
  267. data/lib/ibm_cloud_iam/models/retrict_actions.rb +41 -0
  268. data/lib/ibm_cloud_iam/models/saml_metadata_import_response.rb +494 -0
  269. data/lib/ibm_cloud_iam/models/service_id.rb +184 -108
  270. data/lib/ibm_cloud_iam/models/service_id_group.rb +313 -0
  271. data/lib/ibm_cloud_iam/models/service_id_group_count.rb +159 -0
  272. data/lib/ibm_cloud_iam/models/service_id_group_list.rb +167 -0
  273. data/lib/ibm_cloud_iam/models/service_id_list.rb +47 -96
  274. data/lib/ibm_cloud_iam/models/share_scope.rb +190 -0
  275. data/lib/ibm_cloud_iam/models/template_account_settings.rb +296 -0
  276. data/lib/ibm_cloud_iam/models/template_account_settings_all_of_restrict_user_domains.rb +159 -0
  277. data/lib/ibm_cloud_iam/models/template_assignment_list_response.rb +227 -0
  278. data/lib/ibm_cloud_iam/models/template_assignment_resource.rb +149 -0
  279. data/lib/ibm_cloud_iam/models/template_assignment_resource_error.rb +179 -0
  280. data/lib/ibm_cloud_iam/models/template_assignment_response.rb +506 -0
  281. data/lib/ibm_cloud_iam/models/template_assignment_response_resource.rb +196 -0
  282. data/lib/ibm_cloud_iam/models/template_assignment_response_resource_detail.rb +203 -0
  283. data/lib/ibm_cloud_iam/models/template_count.rb +159 -0
  284. data/lib/ibm_cloud_iam/models/template_profile_component_request.rb +210 -0
  285. data/lib/ibm_cloud_iam/models/template_profile_component_response.rb +210 -0
  286. data/lib/ibm_cloud_iam/models/test_result.rb +194 -0
  287. data/lib/ibm_cloud_iam/models/test_result_steps_inner.rb +174 -0
  288. data/lib/ibm_cloud_iam/models/test_trigger_response.rb +156 -0
  289. data/lib/ibm_cloud_iam/models/token_response.rb +33 -94
  290. data/lib/ibm_cloud_iam/models/trusted_profile.rb +411 -0
  291. data/lib/ibm_cloud_iam/models/trusted_profile_template_claim_rule.rb +248 -0
  292. data/lib/ibm_cloud_iam/models/trusted_profile_template_list.rb +256 -0
  293. data/lib/ibm_cloud_iam/models/trusted_profile_template_request.rb +199 -0
  294. data/lib/ibm_cloud_iam/models/trusted_profile_template_response.rb +369 -0
  295. data/lib/ibm_cloud_iam/models/trusted_profiles_list.rb +227 -0
  296. data/lib/ibm_cloud_iam/models/update_account_idp_setting_request.rb +202 -0
  297. data/lib/ibm_cloud_iam/models/update_account_login_settings.rb +148 -0
  298. data/lib/ibm_cloud_iam/models/update_api_key_request.rb +68 -99
  299. data/lib/ibm_cloud_iam/models/update_id_p_request.rb +198 -0
  300. data/lib/ibm_cloud_iam/models/update_id_p_request_properties.rb +157 -0
  301. data/lib/ibm_cloud_iam/models/update_id_p_request_properties_idp.rb +179 -0
  302. data/lib/ibm_cloud_iam/models/update_id_p_request_secrets.rb +157 -0
  303. data/lib/ibm_cloud_iam/models/update_id_p_request_secrets_idp.rb +163 -0
  304. data/lib/ibm_cloud_iam/models/update_preference_request.rb +161 -0
  305. data/lib/ibm_cloud_iam/models/update_service_id_group_request.rb +176 -0
  306. data/lib/ibm_cloud_iam/models/update_service_id_request.rb +34 -95
  307. data/lib/ibm_cloud_iam/models/update_template_assignment_request.rb +175 -0
  308. data/lib/ibm_cloud_iam/models/update_trusted_profile_request.rb +169 -0
  309. data/lib/ibm_cloud_iam/models/user_activity.rb +222 -0
  310. data/lib/ibm_cloud_iam/models/user_mfa.rb +179 -0
  311. data/lib/ibm_cloud_iam/models/user_mfa_enrollments.rb +193 -0
  312. data/lib/ibm_cloud_iam/models/user_mfa_resolved.rb +178 -0
  313. data/lib/ibm_cloud_iam/models/user_report_mfa_enrollment_status.rb +291 -0
  314. data/lib/ibm_cloud_iam/models/user_visbility_retrict_actions.rb +40 -0
  315. data/lib/ibm_cloud_iam/models/user_visbility_retrict_actions_for_template.rb +41 -0
  316. data/lib/ibm_cloud_iam/version.rb +4 -4
  317. data/lib/ibm_cloud_iam.rb +140 -9
  318. data/spec/api/account_limits_api_spec.rb +75 -0
  319. data/spec/api/account_settings_api_spec.rb +80 -0
  320. data/spec/api/account_settings_for_id_p_api_spec.rb +132 -0
  321. data/spec/api/account_settings_template_api_spec.rb +184 -0
  322. data/spec/api/account_settings_template_assignments_api_spec.rb +112 -0
  323. data/spec/api/activities_api_spec.rb +64 -0
  324. data/spec/api/api_keys_api_spec.rb +182 -0
  325. data/spec/api/identity_preferences_api_spec.rb +98 -0
  326. data/spec/api/idp_management_api_spec.rb +166 -0
  327. data/spec/api/mfa_enrollment_status_api_spec.rb +77 -0
  328. data/spec/api/service_id_groups_api_spec.rb +102 -0
  329. data/spec/api/service_ids_api_spec.rb +143 -0
  330. data/spec/api/token_retrieval_api_spec.rb +134 -0
  331. data/spec/api/trusted_profile_template_api_spec.rb +184 -0
  332. data/spec/api/trusted_profile_template_assignments_api_spec.rb +112 -0
  333. data/spec/api/trusted_profiles_api_spec.rb +328 -0
  334. data/spec/models/access_group_count_spec.rb +42 -0
  335. data/spec/models/account_based_mfa_enrollment_spec.rb +54 -0
  336. data/spec/models/account_idp_settings_spec.rb +82 -0
  337. data/spec/models/account_login_settings_spec.rb +36 -0
  338. data/spec/models/account_settings_assigned_templates_section_spec.rb +120 -0
  339. data/spec/models/account_settings_effective_section_spec.rb +96 -0
  340. data/spec/models/account_settings_meta_spec.rb +54 -0
  341. data/spec/models/account_settings_request_spec.rb +102 -0
  342. data/spec/models/account_settings_response_spec.rb +126 -0
  343. data/spec/models/account_settings_template_list_spec.rb +72 -0
  344. data/spec/models/account_settings_template_request_spec.rb +54 -0
  345. data/spec/models/account_settings_template_response_spec.rb +114 -0
  346. data/spec/models/account_settings_user_domain_restriction_spec.rb +48 -0
  347. data/spec/models/account_settings_user_mfa_response_spec.rb +66 -0
  348. data/spec/models/action_controls_identities_spec.rb +42 -0
  349. data/spec/models/action_controls_spec.rb +48 -0
  350. data/spec/models/activity_spec.rb +42 -0
  351. data/spec/models/add_account_idp_setting_request_spec.rb +52 -0
  352. data/spec/models/api_key_inside_create_service_id_request_spec.rb +24 -17
  353. data/spec/models/api_key_list_spec.rb +15 -20
  354. data/spec/models/api_key_spec.rb +52 -27
  355. data/spec/models/apikey_activity_serviceid_spec.rb +42 -0
  356. data/spec/models/apikey_activity_spec.rb +66 -0
  357. data/spec/models/apikey_activity_user_spec.rb +54 -0
  358. data/spec/models/assigned_templates_account_settings_spec.rb +102 -0
  359. data/spec/models/common_account_settings_request_spec.rb +90 -0
  360. data/spec/models/common_account_settings_response_spec.rb +84 -0
  361. data/spec/models/consumers_response_consumers_inner_spec.rb +42 -0
  362. data/spec/models/consumers_response_spec.rb +42 -0
  363. data/spec/models/create_api_key_request_spec.rb +32 -19
  364. data/spec/models/create_idp_request_properties_idp_spec.rb +60 -0
  365. data/spec/models/create_idp_request_properties_sp_authn_context_spec.rb +42 -0
  366. data/spec/models/create_idp_request_properties_sp_spec.rb +78 -0
  367. data/spec/models/create_idp_request_properties_spec.rb +42 -0
  368. data/spec/models/create_idp_request_secrets_idp_signing_inner_spec.rb +46 -0
  369. data/spec/models/create_idp_request_secrets_idp_spec.rb +48 -0
  370. data/spec/models/create_idp_request_secrets_sp_signing_inner_spec.rb +58 -0
  371. data/spec/models/create_idp_request_secrets_sp_spec.rb +36 -0
  372. data/spec/models/create_idp_request_secrets_spec.rb +42 -0
  373. data/spec/models/create_idp_request_spec.rb +76 -0
  374. data/spec/models/create_profile_link_request_link_spec.rb +60 -0
  375. data/spec/models/create_profile_link_request_spec.rb +54 -0
  376. data/spec/models/create_service_id_group_request_spec.rb +48 -0
  377. data/spec/models/create_service_id_request_spec.rb +19 -18
  378. data/spec/models/create_template_assignment_request_spec.rb +58 -0
  379. data/spec/models/create_trusted_profile_request_spec.rb +54 -0
  380. data/spec/models/effective_account_settings_response_spec.rb +60 -0
  381. data/spec/models/enity_history_record_spec.rb +14 -19
  382. data/spec/models/entity_activity_spec.rb +48 -0
  383. data/spec/models/error_spec.rb +12 -17
  384. data/spec/models/exception_response_context_spec.rb +20 -25
  385. data/spec/models/exception_response_spec.rb +12 -17
  386. data/spec/models/id_based_mfa_enrollment_spec.rb +64 -0
  387. data/spec/models/identity_count_spec.rb +42 -0
  388. data/spec/models/identity_limits_usage_request_spec.rb +108 -0
  389. data/spec/models/identity_limits_usage_response_apikeys_per_identity_spec.rb +42 -0
  390. data/spec/models/identity_limits_usage_response_claim_rules_per_group_spec.rb +42 -0
  391. data/spec/models/identity_limits_usage_response_claim_rules_per_profile_spec.rb +42 -0
  392. data/spec/models/identity_limits_usage_response_serviceids_per_group_spec.rb +42 -0
  393. data/spec/models/identity_limits_usage_response_spec.rb +114 -0
  394. data/spec/models/identity_limits_usage_response_template_versions_per_template_spec.rb +42 -0
  395. data/spec/models/identity_preference_response_spec.rb +66 -0
  396. data/spec/models/identity_preferences_response_spec.rb +36 -0
  397. data/spec/models/idp_spec.rb +96 -0
  398. data/spec/models/limit_count_spec.rb +42 -0
  399. data/spec/models/list_id_p_settings200_response_spec.rb +36 -0
  400. data/spec/models/list_idps200_response_spec.rb +36 -0
  401. data/spec/models/mfa_enrollment_type_status_spec.rb +42 -0
  402. data/spec/models/mfa_options_spec.rb +30 -0
  403. data/spec/models/mfa_requirements_response_spec.rb +11 -16
  404. data/spec/models/oidc_exception_response_spec.rb +13 -18
  405. data/spec/models/policy_template_reference_spec.rb +42 -0
  406. data/spec/models/profile_claim_rule_conditions_spec.rb +48 -0
  407. data/spec/models/profile_claim_rule_list_spec.rb +42 -0
  408. data/spec/models/profile_claim_rule_request_spec.rb +72 -0
  409. data/spec/models/profile_claim_rule_spec.rb +90 -0
  410. data/spec/models/profile_count_spec.rb +42 -0
  411. data/spec/models/profile_identities_response_spec.rb +42 -0
  412. data/spec/models/profile_identities_update_request_spec.rb +36 -0
  413. data/spec/models/profile_identity_request_spec.rb +58 -0
  414. data/spec/models/profile_identity_response_spec.rb +64 -0
  415. data/spec/models/profile_link_link_spec.rb +60 -0
  416. data/spec/models/profile_link_list_spec.rb +36 -0
  417. data/spec/models/profile_link_spec.rb +78 -0
  418. data/spec/models/report_mfa_enrollment_status_spec.rb +66 -0
  419. data/spec/models/report_reference_spec.rb +36 -0
  420. data/spec/models/report_spec.rb +84 -0
  421. data/spec/models/response_context_spec.rb +19 -24
  422. data/spec/models/retrict_actions_spec.rb +30 -0
  423. data/spec/models/saml_metadata_import_response_spec.rb +112 -0
  424. data/spec/models/service_id_group_count_spec.rb +42 -0
  425. data/spec/models/service_id_group_list_spec.rb +36 -0
  426. data/spec/models/service_id_group_spec.rb +84 -0
  427. data/spec/models/service_id_list_spec.rb +15 -20
  428. data/spec/models/service_id_spec.rb +34 -27
  429. data/spec/models/share_scope_spec.rb +46 -0
  430. data/spec/models/template_account_settings_all_of_restrict_user_domains_spec.rb +42 -0
  431. data/spec/models/template_account_settings_spec.rb +102 -0
  432. data/spec/models/template_assignment_list_response_spec.rb +72 -0
  433. data/spec/models/template_assignment_resource_error_spec.rb +54 -0
  434. data/spec/models/template_assignment_resource_spec.rb +36 -0
  435. data/spec/models/template_assignment_response_resource_detail_spec.rb +60 -0
  436. data/spec/models/template_assignment_response_resource_spec.rb +54 -0
  437. data/spec/models/template_assignment_response_spec.rb +126 -0
  438. data/spec/models/template_count_spec.rb +42 -0
  439. data/spec/models/template_profile_component_request_spec.rb +60 -0
  440. data/spec/models/template_profile_component_response_spec.rb +60 -0
  441. data/spec/models/test_result_spec.rb +66 -0
  442. data/spec/models/test_result_steps_inner_spec.rb +54 -0
  443. data/spec/models/test_trigger_response_spec.rb +42 -0
  444. data/spec/models/token_response_spec.rb +14 -19
  445. data/spec/models/trusted_profile_spec.rb +132 -0
  446. data/spec/models/trusted_profile_template_claim_rule_spec.rb +64 -0
  447. data/spec/models/trusted_profile_template_list_spec.rb +72 -0
  448. data/spec/models/trusted_profile_template_request_spec.rb +66 -0
  449. data/spec/models/trusted_profile_template_response_spec.rb +126 -0
  450. data/spec/models/trusted_profiles_list_spec.rb +72 -0
  451. data/spec/models/update_account_idp_setting_request_spec.rb +52 -0
  452. data/spec/models/update_account_login_settings_spec.rb +36 -0
  453. data/spec/models/update_api_key_request_spec.rb +28 -15
  454. data/spec/models/update_id_p_request_properties_idp_spec.rb +54 -0
  455. data/spec/models/update_id_p_request_properties_spec.rb +42 -0
  456. data/spec/models/update_id_p_request_secrets_idp_spec.rb +42 -0
  457. data/spec/models/update_id_p_request_secrets_spec.rb +42 -0
  458. data/spec/models/update_id_p_request_spec.rb +66 -0
  459. data/spec/models/update_preference_request_spec.rb +42 -0
  460. data/spec/models/update_service_id_group_request_spec.rb +42 -0
  461. data/spec/models/update_service_id_request_spec.rb +11 -16
  462. data/spec/models/update_template_assignment_request_spec.rb +36 -0
  463. data/spec/models/update_trusted_profile_request_spec.rb +48 -0
  464. data/spec/models/user_activity_spec.rb +60 -0
  465. data/spec/models/user_mfa_enrollments_spec.rb +54 -0
  466. data/spec/models/user_mfa_resolved_spec.rb +54 -0
  467. data/spec/models/user_mfa_spec.rb +42 -0
  468. data/spec/models/user_report_mfa_enrollment_status_spec.rb +72 -0
  469. data/spec/models/user_visbility_retrict_actions_for_template_spec.rb +30 -0
  470. data/spec/models/user_visbility_retrict_actions_spec.rb +30 -0
  471. data/spec/spec_helper.rb +3 -3
  472. metadata +550 -36
  473. data/docs/IdentityOperationsApi.md +0 -828
  474. data/docs/InlineObject.md +0 -19
  475. data/docs/InlineObject1.md +0 -23
  476. data/docs/InlineObject2.md +0 -21
  477. data/docs/InlineObject3.md +0 -25
  478. data/docs/TokenOperationsApi.md +0 -226
  479. data/ibm_cloud_iam-1.0.0.gem +0 -0
  480. data/lib/ibm_cloud_iam/api/identity_operations_api.rb +0 -1083
  481. data/lib/ibm_cloud_iam/api/token_operations_api.rb +0 -351
  482. data/lib/ibm_cloud_iam/models/inline_object.rb +0 -229
  483. data/lib/ibm_cloud_iam/models/inline_object1.rb +0 -254
  484. data/lib/ibm_cloud_iam/models/inline_object2.rb +0 -244
  485. data/lib/ibm_cloud_iam/models/inline_object3.rb +0 -269
  486. data/spec/api/identity_operations_api_spec.rb +0 -253
  487. data/spec/api/token_operations_api_spec.rb +0 -94
  488. data/spec/api_client_spec.rb +0 -226
  489. data/spec/configuration_spec.rb +0 -42
  490. data/spec/models/inline_object1_spec.rb +0 -59
  491. data/spec/models/inline_object2_spec.rb +0 -53
  492. data/spec/models/inline_object3_spec.rb +0 -65
  493. data/spec/models/inline_object_spec.rb +0 -47
@@ -0,0 +1,1630 @@
1
+ =begin
2
+ #IAM Identity Services
3
+
4
+ #  ## Introduction The IAM Identity Service API is used to manage service IDs, API key identities, trusted profiles, account security settings and to create IAM access tokens for a user or service ID. With trusted profile templates and assignments you can centrally manage access for child accounts in your organization from the root enterprise account. Similarly with settings templates and assignments, you can centrally administer account security settings. For more information, see [Working with template versions](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-working-with-versions&interface=ui) and [Best practices for assigning access in an enterprise](https://cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-access-enterprises). SDKs for Java, Node, Python, and Go are available to make it easier to programmatically access the API from your code. The client libraries that are provided by the SDKs implement best practices for using the API and reduce the amount of code that you need to write. The tab for each language includes code examples that demonstrate how to use the client libraries. For more information about using the SDKs, see the [IBM Cloud SDK Common project](https://github.com/IBM/ibm-cloud-sdk-common) on GitHub. Installing the Java SDK Maven ```xml <dependency> <groupId>com.ibm.cloud</groupId> <artifactId>iam-identity</artifactId> <version>{version}</version> </dependency> ``` Gradle ```bash compile 'com.ibm.cloud:iam-identity:{version}' ``` Replace `{version}` in these examples with the release version. View on GitHub [https://github.com/IBM/platform-services-java-sdk](https://github.com/IBM/platform-services-java-sdk) Installing the Go SDK Go modules (recommended): Add the following import in your code, and then run `go build` or `go mod tidy` ```go import ( \"github.com/IBM/platform-services-go-sdk/iamidentityv1\" ) ``` ```bash go get -u github.com/IBM/platform-services-go-sdk/iamidentityv1 ``` View on GitHub [https://github.com/IBM/platform-services-go-sdk](https://github.com/IBM/platform-services-go-sdk) Installing the Node SDK ```bash npm install @ibm-cloud/platform-services ``` View on GitHub [https://github.com/IBM/platform-services-node-sdk](https://github.com/IBM/platform-services-node-sdk) Installing the Python SDK ```bash pip install --upgrade \"ibm-platform-services\" ``` View on GitHub [https://github.com/IBM/platform-services-python-sdk](https://github.com/IBM/platform-services-python-sdk) The examples that are provided on this page demonstrate how to use IAM Identity Service For more information and detailed examples, check out the [IBM Cloud SDK Common project on GitHub](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md). The examples that are provided on this page demonstrate how to use IAM Identity Service For more information and detailed examples, check out the [IBM Cloud SDK Common project on GitHub](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md). The examples that are provided on this page demonstrate how to use IAM Identity Service For more information and detailed examples, check out the [IBM Cloud SDK Common project on GitHub](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md). The examples that are provided on this page demonstrate how to use IAM Identity Service For more information and detailed examples, check out the [IBM Cloud SDK Common project on GitHub](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md). ## Endpoint URLs The IAM Identity Services API uses the following public global endpoint URL. When you call the API, add the path for each method to form the complete API endpoint for your requests. ```bash https://iam.cloud.ibm.com ``` Virtual private cloud (VPC) based access requires a virtual private endpoint gateway (VPE gateway). For more information , see [Creating an endpoint gateway](https://cloud.ibm.com/docs/vpc?topic=vpc-ordering-endpoint-gateway). * Private endpoint URL for VPC infrastructure: `https://private.iam.cloud.ibm.com`. VPE gateway creation is supported in all datacenters (see https://cloud.ibm.com/docs/overview?topic=overview-locations#regions). If you enabled service endpoints in your account, you can send API requests over the IBM Cloud® private network at the following base endpoint URLs. For more information, see [Enabling VRF and service endpoints](https://cloud.ibm.com/docs/account?topic=account-vrf-service-endpoint). * Private endpoint URLs for classic infrastructure. Supported URLs: * Sydney: `https://private.au-syd.iam.cloud.ibm.com` * Sao Paulo: `https://private.br-sao.iam.cloud.ibm.com` * Montreal: `https://private.ca-mon.iam.cloud.ibm.com` * Toronto: `https://private.ca-tor.iam.cloud.ibm.com` * Frankfurt DC: `https://private.eu-de.iam.cloud.ibm.com` * London: `https://private.eu-gb.iam.cloud.ibm.com` * Madrid: `https://private.eu-es.iam.cloud.ibm.com` * Tokyo: `https://private.jp-tok.iam.cloud.ibm.com` * Osaka: `https://private.jp-osa.iam.cloud.ibm.com` * Washington DC: `https://private.us-east.iam.cloud.ibm.com` * Dallas: `https://private.us-south.iam.cloud.ibm.com` IAM is a global service and deployed to multiple MZRs world wide. IAM can be reached from all locations using the public global endpoint or using one of the private endpoints. Each request is sent to the closest region related to the client that invokes the call to IAM. Example API request ```bash curl -u \"apikey:{apikey}\" -X {request_method} \"https://iam.cloud.ibm.com/{method_endpoint}\" ``` Replace `{apikey}`, `{request_method}`, and `{method_endpoint}` in this example with the values for your particular API call. ## Authentication Authorization to the Identity Services REST API is enforced by using an IBM Cloud Identity and Access Management (IAM) access token. The token is used to determine the actions that a user or service ID has access to when they use the API. You can generate an access token by first [creating an API key](https://cloud.ibm.com/docs/account?topic=account-iamtoken_from_apikey) and then exchanging your API key for an IBM Cloud IAM token. Don't have an API key? Try running `ibmcloud iam oauth-tokens` in the [IBM Cloud Shell](https://cloud.ibm.com/shell) to quickly generate a personal access token. When you use the SDK, configure an IAM authenticator with the IAM API key. The authenticator automatically obtains the IAM access token for the API key and includes it with each request. You can construct an authenticator in either of two ways: - Programmatically by constructing an IAM authenticator instance and supplying your IAM API key - By defining the API key in external configuration properties and then using the SDK authenticator factory to construct an IAM authenticator that uses the configured IAM API key In this example of using external configuration properties, an IAM authenticator instance is created with the configured API key, and then the service client is constructed with this authenticator instance and the configured service URL. For more information, see the Authentication section of the [IBM Cloud SDK Common](https://github.com/IBM/ibm-cloud-sdk-common/blob/main/README.md) documentation. To call each method, you'll need to be assigned a role that includes the required IAM actions. Each method lists the associated action. For more information about IAM actions and how they map to roles, see [IAM Identity service](https://cloud.ibm.com/docs/account?topic=account-account-services#identity-service-account-management). To retrieve your access token: ```bash curl -X POST \\ \"https://iam.cloud.ibm.com/identity/token\" \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --header 'Accept: application/json' \\ --data-urlencode 'grant_type=urn:ibm:params:oauth:grant-type:apikey' \\ --data-urlencode 'apikey=<API_KEY>' ``` Replace `<API_KEY>` with your IAM API key. Setting client options through external configuration Example environment variables, where `<SERVICE_URL>` is the endpoint URL and `<API_KEY>` is your IAM API key ```sh export IAM_IDENTITY_URL=<SERVICE_URL> export IAM_IDENTITY_AUTHTYPE=iam export IAM_IDENTITY_APIKEY=<API_KEY> ``` Example of constructing the service client ```go import { \"github.com/IBM/platform-services-go-sdk/iamidentityv1\" } ... serviceClientOptions := &iamidentityv1.IamIdentityV1Options{} serviceClient, err := iamidentityv1.NewIamIdentityV1UsingExternalConfig(serviceClientOptions) ``` Setting client options through external configuration Example environment variables, where `<SERVICE_URL>` is the endpoint URL and `<API_KEY>` is your IAM API key ```sh export IAM_IDENTITY_URL=<SERVICE_URL> export IAM_IDENTITY_AUTHTYPE=iam export IAM_IDENTITY_APIKEY=<API_KEY> ``` Example of constructing the service client ```java import com.ibm.cloud.platform_services.iam_identity.v1.IamIdentity; ... IamIdentity serviceClient = IamIdentity.newInstance(); ``` Setting client options through external configuration Example environment variables, where `<SERVICE_URL>` is the endpoint URL and `<API_KEY>` is your IAM API key ```sh export IAM_IDENTITY_URL=<SERVICE_URL> export IAM_IDENTITY_AUTHTYPE=iam export IAM_IDENTITY_APIKEY=<API_KEY> ``` Example of constructing the service client ```javascript const IamIdentityV1 = require('@ibm-cloud/platform-services/iam-identity/v1'); ... const serviceClient = IamIdentityV1.newInstance({}); ``` Setting client options through external configuration Example environment variables, where `<SERVICE_URL>` is the endpoint URL and `<API_KEY>` is your IAM API key ```sh export IAM_IDENTITY_URL=<SERVICE_URL> export IAM_IDENTITY_AUTHTYPE=iam export IAM_IDENTITY_APIKEY=<API_KEY> ``` Example of constructing the service client ```python from ibm_platform_services import IamIdentityV1 ... service_client = IamIdentityV1.new_instance() ``` You authenticate to the API by using Cloud Identity and Access Management (IAM). You can pass either a bearer token in an authorization header or an [API key](https://cloud.ibm.com/docs/account?topic=account-manapikey). The SDK provides initialization methods for each form of authentication. - Use the API key to have the SDK manage the lifecycle of the access token. The SDK requests an access token, ensures that the access token is valid, includes the access token in each outgoing request, and refreshes it when it expires. - Use the access token to manage the lifecycle yourself. Keep in mind that access tokens are valid for 1 hour, so you must refresh them regularly to maintain access. For more information, see [IAM authentication with the SDK](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md#authentication). For more information, see [IAM authentication with the SDK](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md#authentication). For more information, see [IAM authentication with the SDK](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md#authentication). For more information, see [IAM authentication with the SDK](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md#authentication). ## Auditing You can monitor API activity within your account by using the IBM Cloud Logs service. Whenever an API method is called, an event is generated that you can then track and audit from within IBM Cloud Logs. The specific event type is listed for each individual method. If an event is tracked for a method, you can find it listed with the method. For more information about how to track IAM activity, see [Activity tracking events for IAM](https://cloud.ibm.com/docs/account?topic=account-at_events_iam). ## Error handling The IAM Token Service uses standard HTTP response codes to indicate whether a method completed successfully. A `200` response always indicates success. A `400` type response indicates that a parameter validation failed and can occur if required parameters are missing or if any parameter values are invalid. A `401` or `403` response indicates that the incoming request did not contain valid authentication information. A `500` type response indicates an internal server error that is seen in an unexpected error situation. The Identity Services REST APIs return standard HTTP status codes to indicate the success or failure of a request. The format of the response is represented in JSON as follows: ```json { \"trace\": \"9daee671-916a-4678-850b-10b911f0236d\", \"errors\": [ { \"code\": \"invalid_access_token\", \"message\": \"The provided access token provided is invalid.\" } ] \"status_code\": 401 } ``` If an operation cannot be fulfilled, an appropriate 400 or 500 series HTTP response is returned from the server. The operations that are defined in the `Reference` section describe example errors that might be returned from a failed request. All responses from the Identity Services REST API are in JSON format. The following table show the potential error codes the API might return. | HTTP Error Code | Description | Recovery | |-----------------|-------------|----------| | `200` | Success | The request was successful. | | `201` | Created | The resource was successfully created. | | `204` | No Content | The request was successful. No response body is provided. | | `400` | Bad Request | The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all required parameters in your request. | | `401` | Unauthorized | You are not authorized to make this request. The token is either missing or expired. Get a new valid token and try again. | | `403` | Forbidden | The supplied authentication is not authorized to perform the operation. If this error persists, contact the account owner to check your permissions. | | `404` | Not Found | The requested resource can't be found. | | `409` | Conflict | The entity is already in the requested state. | | `429` | Too Many Requests | Too many requests have been made within a time window. Wait before calling the API again. | | `500` | Internal error | Error that is seen in an unexpected error situation. | ## Additional headers Some additional headers might be required to make successful requests to the API. Those additional headers are: An optional transaction ID can be passed to your request, which can be useful for tracking calls through multiple services using one identifier. The header key must be set to `Transaction-Id` and the value is anything that you choose. If there is not a transaction ID that is passed in, then one is generated randomly. ## API Parameters Some API parameter have additional details that need to be considered while using it in a request. Those API parameters are as follow: ### Filtering list results When listing service IDs, trusted profiles or API keys you can filter the result set by providing an optional `filter` parameter. The exact syntax of this parameter is described below. Query syntax will follow the SCIM query syntax with reduced operator support. The value must be URL encoded. Only the following operators are supported. * Supported attribute operators- - `sw` - starts with - `sw_ci` - starts with ingnore case - non SCIM standard - `ew` - ends with - `ew_ci` - ends with ingnore case - non SCIM standard - `co` - contains - `co_ci` - contains ingnore case - non SCIM standard * Supported operators- - `and` - `or` * Grouping operators- - `()` * Data Values -`Text` * Sample - `name co \"Foo\" and description sw \"Bar\"`
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module IbmCloudIam
16
+ class TrustedProfilesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create claim rule for a trusted profile
23
+ # Create a claim rule for a trusted profile. There is a limit of 20 rules per trusted profile.
24
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
25
+ # @param profile_id [String] ID of the trusted profile to create a claim rule.
26
+ # @param profile_claim_rule_request [ProfileClaimRuleRequest] Request to create a claim rule for trusted profile.
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [ProfileClaimRule]
29
+ def create_claim_rule(authorization, profile_id, profile_claim_rule_request, opts = {})
30
+ data, _status_code, _headers = create_claim_rule_with_http_info(authorization, profile_id, profile_claim_rule_request, opts)
31
+ data
32
+ end
33
+
34
+ # Create claim rule for a trusted profile
35
+ # Create a claim rule for a trusted profile. There is a limit of 20 rules per trusted profile.
36
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
37
+ # @param profile_id [String] ID of the trusted profile to create a claim rule.
38
+ # @param profile_claim_rule_request [ProfileClaimRuleRequest] Request to create a claim rule for trusted profile.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(ProfileClaimRule, Integer, Hash)>] ProfileClaimRule data, response status code and response headers
41
+ def create_claim_rule_with_http_info(authorization, profile_id, profile_claim_rule_request, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.create_claim_rule ...'
44
+ end
45
+ # verify the required parameter 'authorization' is set
46
+ if @api_client.config.client_side_validation && authorization.nil?
47
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.create_claim_rule"
48
+ end
49
+ # verify the required parameter 'profile_id' is set
50
+ if @api_client.config.client_side_validation && profile_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.create_claim_rule"
52
+ end
53
+ # verify the required parameter 'profile_claim_rule_request' is set
54
+ if @api_client.config.client_side_validation && profile_claim_rule_request.nil?
55
+ fail ArgumentError, "Missing the required parameter 'profile_claim_rule_request' when calling TrustedProfilesApi.create_claim_rule"
56
+ end
57
+ # resource path
58
+ local_var_path = '/v1/profiles/{profile-id}/rules'.sub('{profile-id}', CGI.escape(profile_id.to_s))
59
+
60
+ # query parameters
61
+ query_params = opts[:query_params] || {}
62
+
63
+ # header parameters
64
+ header_params = opts[:header_params] || {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
67
+ # HTTP header 'Content-Type'
68
+ content_type = @api_client.select_header_content_type(['application/json'])
69
+ if !content_type.nil?
70
+ header_params['Content-Type'] = content_type
71
+ end
72
+ header_params[:'Authorization'] = authorization
73
+
74
+ # form parameters
75
+ form_params = opts[:form_params] || {}
76
+
77
+ # http body (model)
78
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_claim_rule_request)
79
+
80
+ # return_type
81
+ return_type = opts[:debug_return_type] || 'ProfileClaimRule'
82
+
83
+ # auth_names
84
+ auth_names = opts[:debug_auth_names] || []
85
+
86
+ new_options = opts.merge(
87
+ :operation => :"TrustedProfilesApi.create_claim_rule",
88
+ :header_params => header_params,
89
+ :query_params => query_params,
90
+ :form_params => form_params,
91
+ :body => post_body,
92
+ :auth_names => auth_names,
93
+ :return_type => return_type
94
+ )
95
+
96
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
97
+ if @api_client.config.debugging
98
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#create_claim_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
99
+ end
100
+ return data, status_code, headers
101
+ end
102
+
103
+ # Create link to a trusted profile
104
+ # Create a direct link between a specific compute resource and a trusted profile, rather than creating conditions that a compute resource must fulfill to apply a trusted profile.
105
+ # @param profile_id [String] ID of the trusted profile.
106
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
107
+ # @param create_profile_link_request [CreateProfileLinkRequest] Request to create a Link to Trusted profile.
108
+ # @param [Hash] opts the optional parameters
109
+ # @return [ProfileLink]
110
+ def create_link(profile_id, authorization, create_profile_link_request, opts = {})
111
+ data, _status_code, _headers = create_link_with_http_info(profile_id, authorization, create_profile_link_request, opts)
112
+ data
113
+ end
114
+
115
+ # Create link to a trusted profile
116
+ # Create a direct link between a specific compute resource and a trusted profile, rather than creating conditions that a compute resource must fulfill to apply a trusted profile.
117
+ # @param profile_id [String] ID of the trusted profile.
118
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
119
+ # @param create_profile_link_request [CreateProfileLinkRequest] Request to create a Link to Trusted profile.
120
+ # @param [Hash] opts the optional parameters
121
+ # @return [Array<(ProfileLink, Integer, Hash)>] ProfileLink data, response status code and response headers
122
+ def create_link_with_http_info(profile_id, authorization, create_profile_link_request, opts = {})
123
+ if @api_client.config.debugging
124
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.create_link ...'
125
+ end
126
+ # verify the required parameter 'profile_id' is set
127
+ if @api_client.config.client_side_validation && profile_id.nil?
128
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.create_link"
129
+ end
130
+ # verify the required parameter 'authorization' is set
131
+ if @api_client.config.client_side_validation && authorization.nil?
132
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.create_link"
133
+ end
134
+ # verify the required parameter 'create_profile_link_request' is set
135
+ if @api_client.config.client_side_validation && create_profile_link_request.nil?
136
+ fail ArgumentError, "Missing the required parameter 'create_profile_link_request' when calling TrustedProfilesApi.create_link"
137
+ end
138
+ # resource path
139
+ local_var_path = '/v1/profiles/{profile-id}/links'.sub('{profile-id}', CGI.escape(profile_id.to_s))
140
+
141
+ # query parameters
142
+ query_params = opts[:query_params] || {}
143
+
144
+ # header parameters
145
+ header_params = opts[:header_params] || {}
146
+ # HTTP header 'Accept' (if needed)
147
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
148
+ # HTTP header 'Content-Type'
149
+ content_type = @api_client.select_header_content_type(['application/json'])
150
+ if !content_type.nil?
151
+ header_params['Content-Type'] = content_type
152
+ end
153
+ header_params[:'Authorization'] = authorization
154
+
155
+ # form parameters
156
+ form_params = opts[:form_params] || {}
157
+
158
+ # http body (model)
159
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_profile_link_request)
160
+
161
+ # return_type
162
+ return_type = opts[:debug_return_type] || 'ProfileLink'
163
+
164
+ # auth_names
165
+ auth_names = opts[:debug_auth_names] || []
166
+
167
+ new_options = opts.merge(
168
+ :operation => :"TrustedProfilesApi.create_link",
169
+ :header_params => header_params,
170
+ :query_params => query_params,
171
+ :form_params => form_params,
172
+ :body => post_body,
173
+ :auth_names => auth_names,
174
+ :return_type => return_type
175
+ )
176
+
177
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
178
+ if @api_client.config.debugging
179
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#create_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
180
+ end
181
+ return data, status_code, headers
182
+ end
183
+
184
+ # Create a trusted profile
185
+ # Create a trusted profile for a given account ID.
186
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
187
+ # @param create_trusted_profile_request [CreateTrustedProfileRequest] Request to create a trusted profile.
188
+ # @param [Hash] opts the optional parameters
189
+ # @return [TrustedProfile]
190
+ def create_profile(authorization, create_trusted_profile_request, opts = {})
191
+ data, _status_code, _headers = create_profile_with_http_info(authorization, create_trusted_profile_request, opts)
192
+ data
193
+ end
194
+
195
+ # Create a trusted profile
196
+ # Create a trusted profile for a given account ID.
197
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
198
+ # @param create_trusted_profile_request [CreateTrustedProfileRequest] Request to create a trusted profile.
199
+ # @param [Hash] opts the optional parameters
200
+ # @return [Array<(TrustedProfile, Integer, Hash)>] TrustedProfile data, response status code and response headers
201
+ def create_profile_with_http_info(authorization, create_trusted_profile_request, opts = {})
202
+ if @api_client.config.debugging
203
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.create_profile ...'
204
+ end
205
+ # verify the required parameter 'authorization' is set
206
+ if @api_client.config.client_side_validation && authorization.nil?
207
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.create_profile"
208
+ end
209
+ # verify the required parameter 'create_trusted_profile_request' is set
210
+ if @api_client.config.client_side_validation && create_trusted_profile_request.nil?
211
+ fail ArgumentError, "Missing the required parameter 'create_trusted_profile_request' when calling TrustedProfilesApi.create_profile"
212
+ end
213
+ # resource path
214
+ local_var_path = '/v1/profiles'
215
+
216
+ # query parameters
217
+ query_params = opts[:query_params] || {}
218
+
219
+ # header parameters
220
+ header_params = opts[:header_params] || {}
221
+ # HTTP header 'Accept' (if needed)
222
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
223
+ # HTTP header 'Content-Type'
224
+ content_type = @api_client.select_header_content_type(['application/json'])
225
+ if !content_type.nil?
226
+ header_params['Content-Type'] = content_type
227
+ end
228
+ header_params[:'Authorization'] = authorization
229
+
230
+ # form parameters
231
+ form_params = opts[:form_params] || {}
232
+
233
+ # http body (model)
234
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_trusted_profile_request)
235
+
236
+ # return_type
237
+ return_type = opts[:debug_return_type] || 'TrustedProfile'
238
+
239
+ # auth_names
240
+ auth_names = opts[:debug_auth_names] || []
241
+
242
+ new_options = opts.merge(
243
+ :operation => :"TrustedProfilesApi.create_profile",
244
+ :header_params => header_params,
245
+ :query_params => query_params,
246
+ :form_params => form_params,
247
+ :body => post_body,
248
+ :auth_names => auth_names,
249
+ :return_type => return_type
250
+ )
251
+
252
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
253
+ if @api_client.config.debugging
254
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#create_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
255
+ end
256
+ return data, status_code, headers
257
+ end
258
+
259
+ # Delete a claim rule
260
+ # Delete a claim rule. When you delete a claim rule, federated user or compute resources are no longer required to meet the conditions of the claim rule in order to apply the trusted profile.
261
+ # @param profile_id [String] ID of the trusted profile.
262
+ # @param rule_id [String] ID of the claim rule to delete.
263
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
264
+ # @param [Hash] opts the optional parameters
265
+ # @return [nil]
266
+ def delete_claim_rule(profile_id, rule_id, authorization, opts = {})
267
+ delete_claim_rule_with_http_info(profile_id, rule_id, authorization, opts)
268
+ nil
269
+ end
270
+
271
+ # Delete a claim rule
272
+ # Delete a claim rule. When you delete a claim rule, federated user or compute resources are no longer required to meet the conditions of the claim rule in order to apply the trusted profile.
273
+ # @param profile_id [String] ID of the trusted profile.
274
+ # @param rule_id [String] ID of the claim rule to delete.
275
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
276
+ # @param [Hash] opts the optional parameters
277
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
278
+ def delete_claim_rule_with_http_info(profile_id, rule_id, authorization, opts = {})
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.delete_claim_rule ...'
281
+ end
282
+ # verify the required parameter 'profile_id' is set
283
+ if @api_client.config.client_side_validation && profile_id.nil?
284
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.delete_claim_rule"
285
+ end
286
+ # verify the required parameter 'rule_id' is set
287
+ if @api_client.config.client_side_validation && rule_id.nil?
288
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling TrustedProfilesApi.delete_claim_rule"
289
+ end
290
+ # verify the required parameter 'authorization' is set
291
+ if @api_client.config.client_side_validation && authorization.nil?
292
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.delete_claim_rule"
293
+ end
294
+ # resource path
295
+ local_var_path = '/v1/profiles/{profile-id}/rules/{rule-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{rule-id}', CGI.escape(rule_id.to_s))
296
+
297
+ # query parameters
298
+ query_params = opts[:query_params] || {}
299
+
300
+ # header parameters
301
+ header_params = opts[:header_params] || {}
302
+ header_params[:'Authorization'] = authorization
303
+
304
+ # form parameters
305
+ form_params = opts[:form_params] || {}
306
+
307
+ # http body (model)
308
+ post_body = opts[:debug_body]
309
+
310
+ # return_type
311
+ return_type = opts[:debug_return_type]
312
+
313
+ # auth_names
314
+ auth_names = opts[:debug_auth_names] || []
315
+
316
+ new_options = opts.merge(
317
+ :operation => :"TrustedProfilesApi.delete_claim_rule",
318
+ :header_params => header_params,
319
+ :query_params => query_params,
320
+ :form_params => form_params,
321
+ :body => post_body,
322
+ :auth_names => auth_names,
323
+ :return_type => return_type
324
+ )
325
+
326
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#delete_claim_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
329
+ end
330
+ return data, status_code, headers
331
+ end
332
+
333
+ # Delete link to a trusted profile
334
+ # Delete a link between a compute resource and a trusted profile.
335
+ # @param profile_id [String] ID of the trusted profile
336
+ # @param link_id [String] ID of the link
337
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
338
+ # @param [Hash] opts the optional parameters
339
+ # @return [nil]
340
+ def delete_link(profile_id, link_id, authorization, opts = {})
341
+ delete_link_with_http_info(profile_id, link_id, authorization, opts)
342
+ nil
343
+ end
344
+
345
+ # Delete link to a trusted profile
346
+ # Delete a link between a compute resource and a trusted profile.
347
+ # @param profile_id [String] ID of the trusted profile
348
+ # @param link_id [String] ID of the link
349
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
350
+ # @param [Hash] opts the optional parameters
351
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
352
+ def delete_link_with_http_info(profile_id, link_id, authorization, opts = {})
353
+ if @api_client.config.debugging
354
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.delete_link ...'
355
+ end
356
+ # verify the required parameter 'profile_id' is set
357
+ if @api_client.config.client_side_validation && profile_id.nil?
358
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.delete_link"
359
+ end
360
+ # verify the required parameter 'link_id' is set
361
+ if @api_client.config.client_side_validation && link_id.nil?
362
+ fail ArgumentError, "Missing the required parameter 'link_id' when calling TrustedProfilesApi.delete_link"
363
+ end
364
+ # verify the required parameter 'authorization' is set
365
+ if @api_client.config.client_side_validation && authorization.nil?
366
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.delete_link"
367
+ end
368
+ # resource path
369
+ local_var_path = '/v1/profiles/{profile-id}/links/{link-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{link-id}', CGI.escape(link_id.to_s))
370
+
371
+ # query parameters
372
+ query_params = opts[:query_params] || {}
373
+
374
+ # header parameters
375
+ header_params = opts[:header_params] || {}
376
+ header_params[:'Authorization'] = authorization
377
+
378
+ # form parameters
379
+ form_params = opts[:form_params] || {}
380
+
381
+ # http body (model)
382
+ post_body = opts[:debug_body]
383
+
384
+ # return_type
385
+ return_type = opts[:debug_return_type]
386
+
387
+ # auth_names
388
+ auth_names = opts[:debug_auth_names] || []
389
+
390
+ new_options = opts.merge(
391
+ :operation => :"TrustedProfilesApi.delete_link",
392
+ :header_params => header_params,
393
+ :query_params => query_params,
394
+ :form_params => form_params,
395
+ :body => post_body,
396
+ :auth_names => auth_names,
397
+ :return_type => return_type
398
+ )
399
+
400
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
401
+ if @api_client.config.debugging
402
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#delete_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
403
+ end
404
+ return data, status_code, headers
405
+ end
406
+
407
+ # Delete compute resource link to profile by given parameters.
408
+ # Deletes compute resource link of a Trusted Profile matching the given parameters.
409
+ # @param profile_id [String] The unique ID of the Trusted Profile
410
+ # @param type [String] The compute resource type. Valid values are VSI, PVS, BMS, IKS_SA, ROKS_SA, CE
411
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
412
+ # @param [Hash] opts the optional parameters
413
+ # @option opts [String] :crn CRN of the compute resource (VSI/PVS/BMS/IKS/ROKS/CE)
414
+ # @option opts [String] :namespace Namespace of the compute resource (IKS/ROKS).
415
+ # @option opts [String] :name Name of the compute resource (IKS/ROKS).
416
+ # @option opts [String] :component_type Component type of the compute resource, only required if type is CE
417
+ # @option opts [String] :component_name Component name of the compute resource, only required if type is CE
418
+ # @return [nil]
419
+ def delete_link_by_parameters(profile_id, type, authorization, opts = {})
420
+ delete_link_by_parameters_with_http_info(profile_id, type, authorization, opts)
421
+ nil
422
+ end
423
+
424
+ # Delete compute resource link to profile by given parameters.
425
+ # Deletes compute resource link of a Trusted Profile matching the given parameters.
426
+ # @param profile_id [String] The unique ID of the Trusted Profile
427
+ # @param type [String] The compute resource type. Valid values are VSI, PVS, BMS, IKS_SA, ROKS_SA, CE
428
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
429
+ # @param [Hash] opts the optional parameters
430
+ # @option opts [String] :crn CRN of the compute resource (VSI/PVS/BMS/IKS/ROKS/CE)
431
+ # @option opts [String] :namespace Namespace of the compute resource (IKS/ROKS).
432
+ # @option opts [String] :name Name of the compute resource (IKS/ROKS).
433
+ # @option opts [String] :component_type Component type of the compute resource, only required if type is CE
434
+ # @option opts [String] :component_name Component name of the compute resource, only required if type is CE
435
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
436
+ def delete_link_by_parameters_with_http_info(profile_id, type, authorization, opts = {})
437
+ if @api_client.config.debugging
438
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.delete_link_by_parameters ...'
439
+ end
440
+ # verify the required parameter 'profile_id' is set
441
+ if @api_client.config.client_side_validation && profile_id.nil?
442
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.delete_link_by_parameters"
443
+ end
444
+ # verify the required parameter 'type' is set
445
+ if @api_client.config.client_side_validation && type.nil?
446
+ fail ArgumentError, "Missing the required parameter 'type' when calling TrustedProfilesApi.delete_link_by_parameters"
447
+ end
448
+ # verify the required parameter 'authorization' is set
449
+ if @api_client.config.client_side_validation && authorization.nil?
450
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.delete_link_by_parameters"
451
+ end
452
+ # resource path
453
+ local_var_path = '/v1/profiles/{profile-id}/links'.sub('{profile-id}', CGI.escape(profile_id.to_s))
454
+
455
+ # query parameters
456
+ query_params = opts[:query_params] || {}
457
+ query_params[:'type'] = type
458
+ query_params[:'crn'] = opts[:'crn'] if !opts[:'crn'].nil?
459
+ query_params[:'namespace'] = opts[:'namespace'] if !opts[:'namespace'].nil?
460
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
461
+ query_params[:'component_type'] = opts[:'component_type'] if !opts[:'component_type'].nil?
462
+ query_params[:'component_name'] = opts[:'component_name'] if !opts[:'component_name'].nil?
463
+
464
+ # header parameters
465
+ header_params = opts[:header_params] || {}
466
+ header_params[:'Authorization'] = authorization
467
+
468
+ # form parameters
469
+ form_params = opts[:form_params] || {}
470
+
471
+ # http body (model)
472
+ post_body = opts[:debug_body]
473
+
474
+ # return_type
475
+ return_type = opts[:debug_return_type]
476
+
477
+ # auth_names
478
+ auth_names = opts[:debug_auth_names] || []
479
+
480
+ new_options = opts.merge(
481
+ :operation => :"TrustedProfilesApi.delete_link_by_parameters",
482
+ :header_params => header_params,
483
+ :query_params => query_params,
484
+ :form_params => form_params,
485
+ :body => post_body,
486
+ :auth_names => auth_names,
487
+ :return_type => return_type
488
+ )
489
+
490
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
491
+ if @api_client.config.debugging
492
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#delete_link_by_parameters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
493
+ end
494
+ return data, status_code, headers
495
+ end
496
+
497
+ # Delete a trusted profile
498
+ # Delete a trusted profile. When you delete trusted profile, compute resources and federated users are unlinked from the profile and can no longer apply the trusted profile identity.
499
+ # @param profile_id [String] ID of the trusted profile.
500
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
501
+ # @param [Hash] opts the optional parameters
502
+ # @return [nil]
503
+ def delete_profile(profile_id, authorization, opts = {})
504
+ delete_profile_with_http_info(profile_id, authorization, opts)
505
+ nil
506
+ end
507
+
508
+ # Delete a trusted profile
509
+ # Delete a trusted profile. When you delete trusted profile, compute resources and federated users are unlinked from the profile and can no longer apply the trusted profile identity.
510
+ # @param profile_id [String] ID of the trusted profile.
511
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
512
+ # @param [Hash] opts the optional parameters
513
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
514
+ def delete_profile_with_http_info(profile_id, authorization, opts = {})
515
+ if @api_client.config.debugging
516
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.delete_profile ...'
517
+ end
518
+ # verify the required parameter 'profile_id' is set
519
+ if @api_client.config.client_side_validation && profile_id.nil?
520
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.delete_profile"
521
+ end
522
+ # verify the required parameter 'authorization' is set
523
+ if @api_client.config.client_side_validation && authorization.nil?
524
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.delete_profile"
525
+ end
526
+ # resource path
527
+ local_var_path = '/v1/profiles/{profile-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s))
528
+
529
+ # query parameters
530
+ query_params = opts[:query_params] || {}
531
+
532
+ # header parameters
533
+ header_params = opts[:header_params] || {}
534
+ header_params[:'Authorization'] = authorization
535
+
536
+ # form parameters
537
+ form_params = opts[:form_params] || {}
538
+
539
+ # http body (model)
540
+ post_body = opts[:debug_body]
541
+
542
+ # return_type
543
+ return_type = opts[:debug_return_type]
544
+
545
+ # auth_names
546
+ auth_names = opts[:debug_auth_names] || []
547
+
548
+ new_options = opts.merge(
549
+ :operation => :"TrustedProfilesApi.delete_profile",
550
+ :header_params => header_params,
551
+ :query_params => query_params,
552
+ :form_params => form_params,
553
+ :body => post_body,
554
+ :auth_names => auth_names,
555
+ :return_type => return_type
556
+ )
557
+
558
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
559
+ if @api_client.config.debugging
560
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#delete_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
561
+ end
562
+ return data, status_code, headers
563
+ end
564
+
565
+ # Delete the identity that can assume the trusted profile
566
+ # Delete the identity that can assume the trusted profile. **Note:** This API will update the trusted profile itself, thus calling it repeatedly for the same profile can lead to conflicts responded with HTTP code 409. Make sure to call this API only once in a few seconds for the same trusted profile.
567
+ # @param profile_id [String] ID of the trusted profile
568
+ # @param identity_type [String] Type of the identity
569
+ # @param identifier_id [String] Identifier of the identity that can assume the trusted profiles.
570
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
571
+ # @param [Hash] opts the optional parameters
572
+ # @return [nil]
573
+ def delete_profile_identity(profile_id, identity_type, identifier_id, authorization, opts = {})
574
+ delete_profile_identity_with_http_info(profile_id, identity_type, identifier_id, authorization, opts)
575
+ nil
576
+ end
577
+
578
+ # Delete the identity that can assume the trusted profile
579
+ # Delete the identity that can assume the trusted profile. **Note:** This API will update the trusted profile itself, thus calling it repeatedly for the same profile can lead to conflicts responded with HTTP code 409. Make sure to call this API only once in a few seconds for the same trusted profile.
580
+ # @param profile_id [String] ID of the trusted profile
581
+ # @param identity_type [String] Type of the identity
582
+ # @param identifier_id [String] Identifier of the identity that can assume the trusted profiles.
583
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
584
+ # @param [Hash] opts the optional parameters
585
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
586
+ def delete_profile_identity_with_http_info(profile_id, identity_type, identifier_id, authorization, opts = {})
587
+ if @api_client.config.debugging
588
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.delete_profile_identity ...'
589
+ end
590
+ # verify the required parameter 'profile_id' is set
591
+ if @api_client.config.client_side_validation && profile_id.nil?
592
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.delete_profile_identity"
593
+ end
594
+ # verify the required parameter 'identity_type' is set
595
+ if @api_client.config.client_side_validation && identity_type.nil?
596
+ fail ArgumentError, "Missing the required parameter 'identity_type' when calling TrustedProfilesApi.delete_profile_identity"
597
+ end
598
+ # verify enum value
599
+ allowable_values = ["user", "serviceid", "crn"]
600
+ if @api_client.config.client_side_validation && !allowable_values.include?(identity_type)
601
+ fail ArgumentError, "invalid value for \"identity_type\", must be one of #{allowable_values}"
602
+ end
603
+ # verify the required parameter 'identifier_id' is set
604
+ if @api_client.config.client_side_validation && identifier_id.nil?
605
+ fail ArgumentError, "Missing the required parameter 'identifier_id' when calling TrustedProfilesApi.delete_profile_identity"
606
+ end
607
+ # verify the required parameter 'authorization' is set
608
+ if @api_client.config.client_side_validation && authorization.nil?
609
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.delete_profile_identity"
610
+ end
611
+ # resource path
612
+ local_var_path = '/v1/profiles/{profile-id}/identities/{identity-type}/{identifier-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{identity-type}', CGI.escape(identity_type.to_s)).sub('{identifier-id}', CGI.escape(identifier_id.to_s))
613
+
614
+ # query parameters
615
+ query_params = opts[:query_params] || {}
616
+
617
+ # header parameters
618
+ header_params = opts[:header_params] || {}
619
+ header_params[:'Authorization'] = authorization
620
+
621
+ # form parameters
622
+ form_params = opts[:form_params] || {}
623
+
624
+ # http body (model)
625
+ post_body = opts[:debug_body]
626
+
627
+ # return_type
628
+ return_type = opts[:debug_return_type]
629
+
630
+ # auth_names
631
+ auth_names = opts[:debug_auth_names] || []
632
+
633
+ new_options = opts.merge(
634
+ :operation => :"TrustedProfilesApi.delete_profile_identity",
635
+ :header_params => header_params,
636
+ :query_params => query_params,
637
+ :form_params => form_params,
638
+ :body => post_body,
639
+ :auth_names => auth_names,
640
+ :return_type => return_type
641
+ )
642
+
643
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
644
+ if @api_client.config.debugging
645
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#delete_profile_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
646
+ end
647
+ return data, status_code, headers
648
+ end
649
+
650
+ # Get a claim rule for a trusted profile
651
+ # A specific claim rule can be fetched for a given trusted profile ID and rule ID.
652
+ # @param profile_id [String] ID of the trusted profile.
653
+ # @param rule_id [String] ID of the claim rule to get.
654
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
655
+ # @param [Hash] opts the optional parameters
656
+ # @return [ProfileClaimRule]
657
+ def get_claim_rule(profile_id, rule_id, authorization, opts = {})
658
+ data, _status_code, _headers = get_claim_rule_with_http_info(profile_id, rule_id, authorization, opts)
659
+ data
660
+ end
661
+
662
+ # Get a claim rule for a trusted profile
663
+ # A specific claim rule can be fetched for a given trusted profile ID and rule ID.
664
+ # @param profile_id [String] ID of the trusted profile.
665
+ # @param rule_id [String] ID of the claim rule to get.
666
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
667
+ # @param [Hash] opts the optional parameters
668
+ # @return [Array<(ProfileClaimRule, Integer, Hash)>] ProfileClaimRule data, response status code and response headers
669
+ def get_claim_rule_with_http_info(profile_id, rule_id, authorization, opts = {})
670
+ if @api_client.config.debugging
671
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.get_claim_rule ...'
672
+ end
673
+ # verify the required parameter 'profile_id' is set
674
+ if @api_client.config.client_side_validation && profile_id.nil?
675
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.get_claim_rule"
676
+ end
677
+ # verify the required parameter 'rule_id' is set
678
+ if @api_client.config.client_side_validation && rule_id.nil?
679
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling TrustedProfilesApi.get_claim_rule"
680
+ end
681
+ # verify the required parameter 'authorization' is set
682
+ if @api_client.config.client_side_validation && authorization.nil?
683
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.get_claim_rule"
684
+ end
685
+ # resource path
686
+ local_var_path = '/v1/profiles/{profile-id}/rules/{rule-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{rule-id}', CGI.escape(rule_id.to_s))
687
+
688
+ # query parameters
689
+ query_params = opts[:query_params] || {}
690
+
691
+ # header parameters
692
+ header_params = opts[:header_params] || {}
693
+ # HTTP header 'Accept' (if needed)
694
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
695
+ header_params[:'Authorization'] = authorization
696
+
697
+ # form parameters
698
+ form_params = opts[:form_params] || {}
699
+
700
+ # http body (model)
701
+ post_body = opts[:debug_body]
702
+
703
+ # return_type
704
+ return_type = opts[:debug_return_type] || 'ProfileClaimRule'
705
+
706
+ # auth_names
707
+ auth_names = opts[:debug_auth_names] || []
708
+
709
+ new_options = opts.merge(
710
+ :operation => :"TrustedProfilesApi.get_claim_rule",
711
+ :header_params => header_params,
712
+ :query_params => query_params,
713
+ :form_params => form_params,
714
+ :body => post_body,
715
+ :auth_names => auth_names,
716
+ :return_type => return_type
717
+ )
718
+
719
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
720
+ if @api_client.config.debugging
721
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#get_claim_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
722
+ end
723
+ return data, status_code, headers
724
+ end
725
+
726
+ # Get link to a trusted profile
727
+ # Get a specific link to a trusted profile by `link_id`.
728
+ # @param profile_id [String] ID of the trusted profile
729
+ # @param link_id [String] ID of the link
730
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
731
+ # @param [Hash] opts the optional parameters
732
+ # @return [ProfileLink]
733
+ def get_link(profile_id, link_id, authorization, opts = {})
734
+ data, _status_code, _headers = get_link_with_http_info(profile_id, link_id, authorization, opts)
735
+ data
736
+ end
737
+
738
+ # Get link to a trusted profile
739
+ # Get a specific link to a trusted profile by &#x60;link_id&#x60;.
740
+ # @param profile_id [String] ID of the trusted profile
741
+ # @param link_id [String] ID of the link
742
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
743
+ # @param [Hash] opts the optional parameters
744
+ # @return [Array<(ProfileLink, Integer, Hash)>] ProfileLink data, response status code and response headers
745
+ def get_link_with_http_info(profile_id, link_id, authorization, opts = {})
746
+ if @api_client.config.debugging
747
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.get_link ...'
748
+ end
749
+ # verify the required parameter 'profile_id' is set
750
+ if @api_client.config.client_side_validation && profile_id.nil?
751
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.get_link"
752
+ end
753
+ # verify the required parameter 'link_id' is set
754
+ if @api_client.config.client_side_validation && link_id.nil?
755
+ fail ArgumentError, "Missing the required parameter 'link_id' when calling TrustedProfilesApi.get_link"
756
+ end
757
+ # verify the required parameter 'authorization' is set
758
+ if @api_client.config.client_side_validation && authorization.nil?
759
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.get_link"
760
+ end
761
+ # resource path
762
+ local_var_path = '/v1/profiles/{profile-id}/links/{link-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{link-id}', CGI.escape(link_id.to_s))
763
+
764
+ # query parameters
765
+ query_params = opts[:query_params] || {}
766
+
767
+ # header parameters
768
+ header_params = opts[:header_params] || {}
769
+ # HTTP header 'Accept' (if needed)
770
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
771
+ header_params[:'Authorization'] = authorization
772
+
773
+ # form parameters
774
+ form_params = opts[:form_params] || {}
775
+
776
+ # http body (model)
777
+ post_body = opts[:debug_body]
778
+
779
+ # return_type
780
+ return_type = opts[:debug_return_type] || 'ProfileLink'
781
+
782
+ # auth_names
783
+ auth_names = opts[:debug_auth_names] || []
784
+
785
+ new_options = opts.merge(
786
+ :operation => :"TrustedProfilesApi.get_link",
787
+ :header_params => header_params,
788
+ :query_params => query_params,
789
+ :form_params => form_params,
790
+ :body => post_body,
791
+ :auth_names => auth_names,
792
+ :return_type => return_type
793
+ )
794
+
795
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
796
+ if @api_client.config.debugging
797
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#get_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
798
+ end
799
+ return data, status_code, headers
800
+ end
801
+
802
+ # Get a trusted profile
803
+ # Retrieve a trusted profile by its `profile-id`. Only the trusted profile's data is returned (`name`, `description`, `iam_id`, etc.), not the federated users or compute resources that qualify to apply the trusted profile.
804
+ # @param profile_id [String] ID of the trusted profile to get.
805
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
806
+ # @param [Hash] opts the optional parameters
807
+ # @option opts [Boolean] :include_activity Defines if the entity&#39;s activity is included in the response. Retrieving activity data is an expensive operation, so only request this when needed. (default to false)
808
+ # @return [TrustedProfile]
809
+ def get_profile(profile_id, authorization, opts = {})
810
+ data, _status_code, _headers = get_profile_with_http_info(profile_id, authorization, opts)
811
+ data
812
+ end
813
+
814
+ # Get a trusted profile
815
+ # Retrieve a trusted profile by its &#x60;profile-id&#x60;. Only the trusted profile&#39;s data is returned (&#x60;name&#x60;, &#x60;description&#x60;, &#x60;iam_id&#x60;, etc.), not the federated users or compute resources that qualify to apply the trusted profile.
816
+ # @param profile_id [String] ID of the trusted profile to get.
817
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
818
+ # @param [Hash] opts the optional parameters
819
+ # @option opts [Boolean] :include_activity Defines if the entity&#39;s activity is included in the response. Retrieving activity data is an expensive operation, so only request this when needed. (default to false)
820
+ # @return [Array<(TrustedProfile, Integer, Hash)>] TrustedProfile data, response status code and response headers
821
+ def get_profile_with_http_info(profile_id, authorization, opts = {})
822
+ if @api_client.config.debugging
823
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.get_profile ...'
824
+ end
825
+ # verify the required parameter 'profile_id' is set
826
+ if @api_client.config.client_side_validation && profile_id.nil?
827
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.get_profile"
828
+ end
829
+ # verify the required parameter 'authorization' is set
830
+ if @api_client.config.client_side_validation && authorization.nil?
831
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.get_profile"
832
+ end
833
+ # resource path
834
+ local_var_path = '/v1/profiles/{profile-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s))
835
+
836
+ # query parameters
837
+ query_params = opts[:query_params] || {}
838
+ query_params[:'include_activity'] = opts[:'include_activity'] if !opts[:'include_activity'].nil?
839
+
840
+ # header parameters
841
+ header_params = opts[:header_params] || {}
842
+ # HTTP header 'Accept' (if needed)
843
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
844
+ header_params[:'Authorization'] = authorization
845
+
846
+ # form parameters
847
+ form_params = opts[:form_params] || {}
848
+
849
+ # http body (model)
850
+ post_body = opts[:debug_body]
851
+
852
+ # return_type
853
+ return_type = opts[:debug_return_type] || 'TrustedProfile'
854
+
855
+ # auth_names
856
+ auth_names = opts[:debug_auth_names] || []
857
+
858
+ new_options = opts.merge(
859
+ :operation => :"TrustedProfilesApi.get_profile",
860
+ :header_params => header_params,
861
+ :query_params => query_params,
862
+ :form_params => form_params,
863
+ :body => post_body,
864
+ :auth_names => auth_names,
865
+ :return_type => return_type
866
+ )
867
+
868
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
869
+ if @api_client.config.debugging
870
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#get_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
871
+ end
872
+ return data, status_code, headers
873
+ end
874
+
875
+ # Get a list of identities that can assume the trusted profile
876
+ # Get a list of identities that can assume the trusted profile
877
+ # @param profile_id [String] ID of the trusted profile.
878
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
879
+ # @param [Hash] opts the optional parameters
880
+ # @return [ProfileIdentitiesResponse]
881
+ def get_profile_identities(profile_id, authorization, opts = {})
882
+ data, _status_code, _headers = get_profile_identities_with_http_info(profile_id, authorization, opts)
883
+ data
884
+ end
885
+
886
+ # Get a list of identities that can assume the trusted profile
887
+ # Get a list of identities that can assume the trusted profile
888
+ # @param profile_id [String] ID of the trusted profile.
889
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
890
+ # @param [Hash] opts the optional parameters
891
+ # @return [Array<(ProfileIdentitiesResponse, Integer, Hash)>] ProfileIdentitiesResponse data, response status code and response headers
892
+ def get_profile_identities_with_http_info(profile_id, authorization, opts = {})
893
+ if @api_client.config.debugging
894
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.get_profile_identities ...'
895
+ end
896
+ # verify the required parameter 'profile_id' is set
897
+ if @api_client.config.client_side_validation && profile_id.nil?
898
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.get_profile_identities"
899
+ end
900
+ # verify the required parameter 'authorization' is set
901
+ if @api_client.config.client_side_validation && authorization.nil?
902
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.get_profile_identities"
903
+ end
904
+ # resource path
905
+ local_var_path = '/v1/profiles/{profile-id}/identities'.sub('{profile-id}', CGI.escape(profile_id.to_s))
906
+
907
+ # query parameters
908
+ query_params = opts[:query_params] || {}
909
+
910
+ # header parameters
911
+ header_params = opts[:header_params] || {}
912
+ # HTTP header 'Accept' (if needed)
913
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
914
+ header_params[:'Authorization'] = authorization
915
+
916
+ # form parameters
917
+ form_params = opts[:form_params] || {}
918
+
919
+ # http body (model)
920
+ post_body = opts[:debug_body]
921
+
922
+ # return_type
923
+ return_type = opts[:debug_return_type] || 'ProfileIdentitiesResponse'
924
+
925
+ # auth_names
926
+ auth_names = opts[:debug_auth_names] || []
927
+
928
+ new_options = opts.merge(
929
+ :operation => :"TrustedProfilesApi.get_profile_identities",
930
+ :header_params => header_params,
931
+ :query_params => query_params,
932
+ :form_params => form_params,
933
+ :body => post_body,
934
+ :auth_names => auth_names,
935
+ :return_type => return_type
936
+ )
937
+
938
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
939
+ if @api_client.config.debugging
940
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#get_profile_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
941
+ end
942
+ return data, status_code, headers
943
+ end
944
+
945
+ # Get the identity that can assume the trusted profile
946
+ # Get the identity that can assume the trusted profile
947
+ # @param profile_id [String] ID of the trusted profile
948
+ # @param identity_type [String] Type of the identity
949
+ # @param identifier_id [String] Identifier of the identity that can assume the trusted profiles.
950
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
951
+ # @param [Hash] opts the optional parameters
952
+ # @return [ProfileIdentityResponse]
953
+ def get_profile_identity(profile_id, identity_type, identifier_id, authorization, opts = {})
954
+ data, _status_code, _headers = get_profile_identity_with_http_info(profile_id, identity_type, identifier_id, authorization, opts)
955
+ data
956
+ end
957
+
958
+ # Get the identity that can assume the trusted profile
959
+ # Get the identity that can assume the trusted profile
960
+ # @param profile_id [String] ID of the trusted profile
961
+ # @param identity_type [String] Type of the identity
962
+ # @param identifier_id [String] Identifier of the identity that can assume the trusted profiles.
963
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
964
+ # @param [Hash] opts the optional parameters
965
+ # @return [Array<(ProfileIdentityResponse, Integer, Hash)>] ProfileIdentityResponse data, response status code and response headers
966
+ def get_profile_identity_with_http_info(profile_id, identity_type, identifier_id, authorization, opts = {})
967
+ if @api_client.config.debugging
968
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.get_profile_identity ...'
969
+ end
970
+ # verify the required parameter 'profile_id' is set
971
+ if @api_client.config.client_side_validation && profile_id.nil?
972
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.get_profile_identity"
973
+ end
974
+ # verify the required parameter 'identity_type' is set
975
+ if @api_client.config.client_side_validation && identity_type.nil?
976
+ fail ArgumentError, "Missing the required parameter 'identity_type' when calling TrustedProfilesApi.get_profile_identity"
977
+ end
978
+ # verify enum value
979
+ allowable_values = ["user", "serviceid", "crn"]
980
+ if @api_client.config.client_side_validation && !allowable_values.include?(identity_type)
981
+ fail ArgumentError, "invalid value for \"identity_type\", must be one of #{allowable_values}"
982
+ end
983
+ # verify the required parameter 'identifier_id' is set
984
+ if @api_client.config.client_side_validation && identifier_id.nil?
985
+ fail ArgumentError, "Missing the required parameter 'identifier_id' when calling TrustedProfilesApi.get_profile_identity"
986
+ end
987
+ # verify the required parameter 'authorization' is set
988
+ if @api_client.config.client_side_validation && authorization.nil?
989
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.get_profile_identity"
990
+ end
991
+ # resource path
992
+ local_var_path = '/v1/profiles/{profile-id}/identities/{identity-type}/{identifier-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{identity-type}', CGI.escape(identity_type.to_s)).sub('{identifier-id}', CGI.escape(identifier_id.to_s))
993
+
994
+ # query parameters
995
+ query_params = opts[:query_params] || {}
996
+
997
+ # header parameters
998
+ header_params = opts[:header_params] || {}
999
+ # HTTP header 'Accept' (if needed)
1000
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1001
+ header_params[:'Authorization'] = authorization
1002
+
1003
+ # form parameters
1004
+ form_params = opts[:form_params] || {}
1005
+
1006
+ # http body (model)
1007
+ post_body = opts[:debug_body]
1008
+
1009
+ # return_type
1010
+ return_type = opts[:debug_return_type] || 'ProfileIdentityResponse'
1011
+
1012
+ # auth_names
1013
+ auth_names = opts[:debug_auth_names] || []
1014
+
1015
+ new_options = opts.merge(
1016
+ :operation => :"TrustedProfilesApi.get_profile_identity",
1017
+ :header_params => header_params,
1018
+ :query_params => query_params,
1019
+ :form_params => form_params,
1020
+ :body => post_body,
1021
+ :auth_names => auth_names,
1022
+ :return_type => return_type
1023
+ )
1024
+
1025
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1026
+ if @api_client.config.debugging
1027
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#get_profile_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1028
+ end
1029
+ return data, status_code, headers
1030
+ end
1031
+
1032
+ # List claim rules for a trusted profile
1033
+ # Get a list of all claim rules for a trusted profile. The `profile-id` query parameter determines the profile from which to retrieve the list of claim rules.
1034
+ # @param profile_id [String] ID of the trusted profile.
1035
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1036
+ # @param [Hash] opts the optional parameters
1037
+ # @return [ProfileClaimRuleList]
1038
+ def list_claim_rules(profile_id, authorization, opts = {})
1039
+ data, _status_code, _headers = list_claim_rules_with_http_info(profile_id, authorization, opts)
1040
+ data
1041
+ end
1042
+
1043
+ # List claim rules for a trusted profile
1044
+ # Get a list of all claim rules for a trusted profile. The &#x60;profile-id&#x60; query parameter determines the profile from which to retrieve the list of claim rules.
1045
+ # @param profile_id [String] ID of the trusted profile.
1046
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1047
+ # @param [Hash] opts the optional parameters
1048
+ # @return [Array<(ProfileClaimRuleList, Integer, Hash)>] ProfileClaimRuleList data, response status code and response headers
1049
+ def list_claim_rules_with_http_info(profile_id, authorization, opts = {})
1050
+ if @api_client.config.debugging
1051
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.list_claim_rules ...'
1052
+ end
1053
+ # verify the required parameter 'profile_id' is set
1054
+ if @api_client.config.client_side_validation && profile_id.nil?
1055
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.list_claim_rules"
1056
+ end
1057
+ # verify the required parameter 'authorization' is set
1058
+ if @api_client.config.client_side_validation && authorization.nil?
1059
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.list_claim_rules"
1060
+ end
1061
+ # resource path
1062
+ local_var_path = '/v1/profiles/{profile-id}/rules'.sub('{profile-id}', CGI.escape(profile_id.to_s))
1063
+
1064
+ # query parameters
1065
+ query_params = opts[:query_params] || {}
1066
+
1067
+ # header parameters
1068
+ header_params = opts[:header_params] || {}
1069
+ # HTTP header 'Accept' (if needed)
1070
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1071
+ header_params[:'Authorization'] = authorization
1072
+
1073
+ # form parameters
1074
+ form_params = opts[:form_params] || {}
1075
+
1076
+ # http body (model)
1077
+ post_body = opts[:debug_body]
1078
+
1079
+ # return_type
1080
+ return_type = opts[:debug_return_type] || 'ProfileClaimRuleList'
1081
+
1082
+ # auth_names
1083
+ auth_names = opts[:debug_auth_names] || []
1084
+
1085
+ new_options = opts.merge(
1086
+ :operation => :"TrustedProfilesApi.list_claim_rules",
1087
+ :header_params => header_params,
1088
+ :query_params => query_params,
1089
+ :form_params => form_params,
1090
+ :body => post_body,
1091
+ :auth_names => auth_names,
1092
+ :return_type => return_type
1093
+ )
1094
+
1095
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1096
+ if @api_client.config.debugging
1097
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#list_claim_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1098
+ end
1099
+ return data, status_code, headers
1100
+ end
1101
+
1102
+ # List links to a trusted profile
1103
+ # Get a list of links to a trusted profile.
1104
+ # @param profile_id [String] ID of the trusted profile
1105
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1106
+ # @param [Hash] opts the optional parameters
1107
+ # @return [ProfileLinkList]
1108
+ def list_links(profile_id, authorization, opts = {})
1109
+ data, _status_code, _headers = list_links_with_http_info(profile_id, authorization, opts)
1110
+ data
1111
+ end
1112
+
1113
+ # List links to a trusted profile
1114
+ # Get a list of links to a trusted profile.
1115
+ # @param profile_id [String] ID of the trusted profile
1116
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1117
+ # @param [Hash] opts the optional parameters
1118
+ # @return [Array<(ProfileLinkList, Integer, Hash)>] ProfileLinkList data, response status code and response headers
1119
+ def list_links_with_http_info(profile_id, authorization, opts = {})
1120
+ if @api_client.config.debugging
1121
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.list_links ...'
1122
+ end
1123
+ # verify the required parameter 'profile_id' is set
1124
+ if @api_client.config.client_side_validation && profile_id.nil?
1125
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.list_links"
1126
+ end
1127
+ # verify the required parameter 'authorization' is set
1128
+ if @api_client.config.client_side_validation && authorization.nil?
1129
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.list_links"
1130
+ end
1131
+ # resource path
1132
+ local_var_path = '/v1/profiles/{profile-id}/links'.sub('{profile-id}', CGI.escape(profile_id.to_s))
1133
+
1134
+ # query parameters
1135
+ query_params = opts[:query_params] || {}
1136
+
1137
+ # header parameters
1138
+ header_params = opts[:header_params] || {}
1139
+ # HTTP header 'Accept' (if needed)
1140
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1141
+ header_params[:'Authorization'] = authorization
1142
+
1143
+ # form parameters
1144
+ form_params = opts[:form_params] || {}
1145
+
1146
+ # http body (model)
1147
+ post_body = opts[:debug_body]
1148
+
1149
+ # return_type
1150
+ return_type = opts[:debug_return_type] || 'ProfileLinkList'
1151
+
1152
+ # auth_names
1153
+ auth_names = opts[:debug_auth_names] || []
1154
+
1155
+ new_options = opts.merge(
1156
+ :operation => :"TrustedProfilesApi.list_links",
1157
+ :header_params => header_params,
1158
+ :query_params => query_params,
1159
+ :form_params => form_params,
1160
+ :body => post_body,
1161
+ :auth_names => auth_names,
1162
+ :return_type => return_type
1163
+ )
1164
+
1165
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1166
+ if @api_client.config.debugging
1167
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#list_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1168
+ end
1169
+ return data, status_code, headers
1170
+ end
1171
+
1172
+ # List trusted profiles
1173
+ # List the trusted profiles in an account. The `account_id` query parameter determines the account from which to retrieve the list of trusted profiles.
1174
+ # @param account_id [String] Account ID to query for trusted profiles.
1175
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1176
+ # @param [Hash] opts the optional parameters
1177
+ # @option opts [String] :name Name of the trusted profile to query.
1178
+ # @option opts [Integer] :pagesize Optional size of a single page. Default is 20 items per page. Valid range is 1 to 100.
1179
+ # @option opts [String] :sort Optional sort property, valid values are name, description, created_at and modified_at. If specified, the items are sorted by the value of this property.
1180
+ # @option opts [String] :order Optional sort order, valid values are asc and desc. Default: asc. (default to 'asc')
1181
+ # @option opts [Boolean] :include_history Defines if the entity history is included in the response. (default to false)
1182
+ # @option opts [String] :pagetoken Optional Prev or Next page token returned from a previous query execution. Default is start with first page.
1183
+ # @option opts [String] :filter An optional filter query parameter used to refine the results of the search operation. For more information see [Filtering list results](#filter-list-results) section.
1184
+ # @return [TrustedProfilesList]
1185
+ def list_profiles(account_id, authorization, opts = {})
1186
+ data, _status_code, _headers = list_profiles_with_http_info(account_id, authorization, opts)
1187
+ data
1188
+ end
1189
+
1190
+ # List trusted profiles
1191
+ # List the trusted profiles in an account. The &#x60;account_id&#x60; query parameter determines the account from which to retrieve the list of trusted profiles.
1192
+ # @param account_id [String] Account ID to query for trusted profiles.
1193
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1194
+ # @param [Hash] opts the optional parameters
1195
+ # @option opts [String] :name Name of the trusted profile to query.
1196
+ # @option opts [Integer] :pagesize Optional size of a single page. Default is 20 items per page. Valid range is 1 to 100.
1197
+ # @option opts [String] :sort Optional sort property, valid values are name, description, created_at and modified_at. If specified, the items are sorted by the value of this property.
1198
+ # @option opts [String] :order Optional sort order, valid values are asc and desc. Default: asc. (default to 'asc')
1199
+ # @option opts [Boolean] :include_history Defines if the entity history is included in the response. (default to false)
1200
+ # @option opts [String] :pagetoken Optional Prev or Next page token returned from a previous query execution. Default is start with first page.
1201
+ # @option opts [String] :filter An optional filter query parameter used to refine the results of the search operation. For more information see [Filtering list results](#filter-list-results) section.
1202
+ # @return [Array<(TrustedProfilesList, Integer, Hash)>] TrustedProfilesList data, response status code and response headers
1203
+ def list_profiles_with_http_info(account_id, authorization, opts = {})
1204
+ if @api_client.config.debugging
1205
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.list_profiles ...'
1206
+ end
1207
+ # verify the required parameter 'account_id' is set
1208
+ if @api_client.config.client_side_validation && account_id.nil?
1209
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling TrustedProfilesApi.list_profiles"
1210
+ end
1211
+ # verify the required parameter 'authorization' is set
1212
+ if @api_client.config.client_side_validation && authorization.nil?
1213
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.list_profiles"
1214
+ end
1215
+ allowable_values = ["asc", "desc"]
1216
+ if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
1217
+ fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
1218
+ end
1219
+ # resource path
1220
+ local_var_path = '/v1/profiles'
1221
+
1222
+ # query parameters
1223
+ query_params = opts[:query_params] || {}
1224
+ query_params[:'account_id'] = account_id
1225
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
1226
+ query_params[:'pagesize'] = opts[:'pagesize'] if !opts[:'pagesize'].nil?
1227
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1228
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
1229
+ query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil?
1230
+ query_params[:'pagetoken'] = opts[:'pagetoken'] if !opts[:'pagetoken'].nil?
1231
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1232
+
1233
+ # header parameters
1234
+ header_params = opts[:header_params] || {}
1235
+ # HTTP header 'Accept' (if needed)
1236
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1237
+ header_params[:'Authorization'] = authorization
1238
+
1239
+ # form parameters
1240
+ form_params = opts[:form_params] || {}
1241
+
1242
+ # http body (model)
1243
+ post_body = opts[:debug_body]
1244
+
1245
+ # return_type
1246
+ return_type = opts[:debug_return_type] || 'TrustedProfilesList'
1247
+
1248
+ # auth_names
1249
+ auth_names = opts[:debug_auth_names] || []
1250
+
1251
+ new_options = opts.merge(
1252
+ :operation => :"TrustedProfilesApi.list_profiles",
1253
+ :header_params => header_params,
1254
+ :query_params => query_params,
1255
+ :form_params => form_params,
1256
+ :body => post_body,
1257
+ :auth_names => auth_names,
1258
+ :return_type => return_type
1259
+ )
1260
+
1261
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1262
+ if @api_client.config.debugging
1263
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#list_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1264
+ end
1265
+ return data, status_code, headers
1266
+ end
1267
+
1268
+ # Update the list of identities that can assume the trusted profile
1269
+ # Update the list of identities that can assume the trusted profile
1270
+ # @param profile_id [String] ID of the trusted profile.
1271
+ # @param if_match [String] Entity tag of the Identities to be updated. Specify the tag that you retrieved when reading the Profile Identities. This value helps identify parallel usage of this API. Pass * to indicate updating any available version, which may result in stale updates.
1272
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1273
+ # @param profile_identities_update_request [ProfileIdentitiesUpdateRequest] Request to update identities.
1274
+ # @param [Hash] opts the optional parameters
1275
+ # @return [ProfileIdentitiesResponse]
1276
+ def set_profile_identities(profile_id, if_match, authorization, profile_identities_update_request, opts = {})
1277
+ data, _status_code, _headers = set_profile_identities_with_http_info(profile_id, if_match, authorization, profile_identities_update_request, opts)
1278
+ data
1279
+ end
1280
+
1281
+ # Update the list of identities that can assume the trusted profile
1282
+ # Update the list of identities that can assume the trusted profile
1283
+ # @param profile_id [String] ID of the trusted profile.
1284
+ # @param if_match [String] Entity tag of the Identities to be updated. Specify the tag that you retrieved when reading the Profile Identities. This value helps identify parallel usage of this API. Pass * to indicate updating any available version, which may result in stale updates.
1285
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1286
+ # @param profile_identities_update_request [ProfileIdentitiesUpdateRequest] Request to update identities.
1287
+ # @param [Hash] opts the optional parameters
1288
+ # @return [Array<(ProfileIdentitiesResponse, Integer, Hash)>] ProfileIdentitiesResponse data, response status code and response headers
1289
+ def set_profile_identities_with_http_info(profile_id, if_match, authorization, profile_identities_update_request, opts = {})
1290
+ if @api_client.config.debugging
1291
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.set_profile_identities ...'
1292
+ end
1293
+ # verify the required parameter 'profile_id' is set
1294
+ if @api_client.config.client_side_validation && profile_id.nil?
1295
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.set_profile_identities"
1296
+ end
1297
+ # verify the required parameter 'if_match' is set
1298
+ if @api_client.config.client_side_validation && if_match.nil?
1299
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling TrustedProfilesApi.set_profile_identities"
1300
+ end
1301
+ # verify the required parameter 'authorization' is set
1302
+ if @api_client.config.client_side_validation && authorization.nil?
1303
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.set_profile_identities"
1304
+ end
1305
+ # verify the required parameter 'profile_identities_update_request' is set
1306
+ if @api_client.config.client_side_validation && profile_identities_update_request.nil?
1307
+ fail ArgumentError, "Missing the required parameter 'profile_identities_update_request' when calling TrustedProfilesApi.set_profile_identities"
1308
+ end
1309
+ # resource path
1310
+ local_var_path = '/v1/profiles/{profile-id}/identities'.sub('{profile-id}', CGI.escape(profile_id.to_s))
1311
+
1312
+ # query parameters
1313
+ query_params = opts[:query_params] || {}
1314
+
1315
+ # header parameters
1316
+ header_params = opts[:header_params] || {}
1317
+ # HTTP header 'Accept' (if needed)
1318
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1319
+ # HTTP header 'Content-Type'
1320
+ content_type = @api_client.select_header_content_type(['application/json'])
1321
+ if !content_type.nil?
1322
+ header_params['Content-Type'] = content_type
1323
+ end
1324
+ header_params[:'If-Match'] = if_match
1325
+ header_params[:'Authorization'] = authorization
1326
+
1327
+ # form parameters
1328
+ form_params = opts[:form_params] || {}
1329
+
1330
+ # http body (model)
1331
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_identities_update_request)
1332
+
1333
+ # return_type
1334
+ return_type = opts[:debug_return_type] || 'ProfileIdentitiesResponse'
1335
+
1336
+ # auth_names
1337
+ auth_names = opts[:debug_auth_names] || []
1338
+
1339
+ new_options = opts.merge(
1340
+ :operation => :"TrustedProfilesApi.set_profile_identities",
1341
+ :header_params => header_params,
1342
+ :query_params => query_params,
1343
+ :form_params => form_params,
1344
+ :body => post_body,
1345
+ :auth_names => auth_names,
1346
+ :return_type => return_type
1347
+ )
1348
+
1349
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1350
+ if @api_client.config.debugging
1351
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#set_profile_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1352
+ end
1353
+ return data, status_code, headers
1354
+ end
1355
+
1356
+ # Add a specific identity that can assume the trusted profile
1357
+ # Add a specific identity that can assume the trusted profile. **Note:** This API will update the trusted profile itself, thus calling it repeatedly for the same profile can lead to conflicts responded with HTTP code 409. Make sure to call this API only once in a few seconds for the same trusted profile.
1358
+ # @param profile_id [String] ID of the trusted profile
1359
+ # @param identity_type [String] Type of the identity
1360
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1361
+ # @param profile_identity_request [ProfileIdentityRequest] Request to update identities.
1362
+ # @param [Hash] opts the optional parameters
1363
+ # @return [ProfileIdentityResponse]
1364
+ def set_profile_identity(profile_id, identity_type, authorization, profile_identity_request, opts = {})
1365
+ data, _status_code, _headers = set_profile_identity_with_http_info(profile_id, identity_type, authorization, profile_identity_request, opts)
1366
+ data
1367
+ end
1368
+
1369
+ # Add a specific identity that can assume the trusted profile
1370
+ # Add a specific identity that can assume the trusted profile. **Note:** This API will update the trusted profile itself, thus calling it repeatedly for the same profile can lead to conflicts responded with HTTP code 409. Make sure to call this API only once in a few seconds for the same trusted profile.
1371
+ # @param profile_id [String] ID of the trusted profile
1372
+ # @param identity_type [String] Type of the identity
1373
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1374
+ # @param profile_identity_request [ProfileIdentityRequest] Request to update identities.
1375
+ # @param [Hash] opts the optional parameters
1376
+ # @return [Array<(ProfileIdentityResponse, Integer, Hash)>] ProfileIdentityResponse data, response status code and response headers
1377
+ def set_profile_identity_with_http_info(profile_id, identity_type, authorization, profile_identity_request, opts = {})
1378
+ if @api_client.config.debugging
1379
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.set_profile_identity ...'
1380
+ end
1381
+ # verify the required parameter 'profile_id' is set
1382
+ if @api_client.config.client_side_validation && profile_id.nil?
1383
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.set_profile_identity"
1384
+ end
1385
+ # verify the required parameter 'identity_type' is set
1386
+ if @api_client.config.client_side_validation && identity_type.nil?
1387
+ fail ArgumentError, "Missing the required parameter 'identity_type' when calling TrustedProfilesApi.set_profile_identity"
1388
+ end
1389
+ # verify enum value
1390
+ allowable_values = ["user", "serviceid", "crn"]
1391
+ if @api_client.config.client_side_validation && !allowable_values.include?(identity_type)
1392
+ fail ArgumentError, "invalid value for \"identity_type\", must be one of #{allowable_values}"
1393
+ end
1394
+ # verify the required parameter 'authorization' is set
1395
+ if @api_client.config.client_side_validation && authorization.nil?
1396
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.set_profile_identity"
1397
+ end
1398
+ # verify the required parameter 'profile_identity_request' is set
1399
+ if @api_client.config.client_side_validation && profile_identity_request.nil?
1400
+ fail ArgumentError, "Missing the required parameter 'profile_identity_request' when calling TrustedProfilesApi.set_profile_identity"
1401
+ end
1402
+ # resource path
1403
+ local_var_path = '/v1/profiles/{profile-id}/identities/{identity-type}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{identity-type}', CGI.escape(identity_type.to_s))
1404
+
1405
+ # query parameters
1406
+ query_params = opts[:query_params] || {}
1407
+
1408
+ # header parameters
1409
+ header_params = opts[:header_params] || {}
1410
+ # HTTP header 'Accept' (if needed)
1411
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1412
+ # HTTP header 'Content-Type'
1413
+ content_type = @api_client.select_header_content_type(['application/json'])
1414
+ if !content_type.nil?
1415
+ header_params['Content-Type'] = content_type
1416
+ end
1417
+ header_params[:'Authorization'] = authorization
1418
+
1419
+ # form parameters
1420
+ form_params = opts[:form_params] || {}
1421
+
1422
+ # http body (model)
1423
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_identity_request)
1424
+
1425
+ # return_type
1426
+ return_type = opts[:debug_return_type] || 'ProfileIdentityResponse'
1427
+
1428
+ # auth_names
1429
+ auth_names = opts[:debug_auth_names] || []
1430
+
1431
+ new_options = opts.merge(
1432
+ :operation => :"TrustedProfilesApi.set_profile_identity",
1433
+ :header_params => header_params,
1434
+ :query_params => query_params,
1435
+ :form_params => form_params,
1436
+ :body => post_body,
1437
+ :auth_names => auth_names,
1438
+ :return_type => return_type
1439
+ )
1440
+
1441
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1442
+ if @api_client.config.debugging
1443
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#set_profile_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1444
+ end
1445
+ return data, status_code, headers
1446
+ end
1447
+
1448
+ # Update claim rule for a trusted profile
1449
+ # Update a specific claim rule for a given trusted profile ID and rule ID.
1450
+ # @param profile_id [String] ID of the trusted profile.
1451
+ # @param rule_id [String] ID of the claim rule to update.
1452
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1453
+ # @param if_match [String] Version of the claim rule to be updated. Specify the version that you retrived when reading list of claim rules. This value helps to identify any parallel usage of claim rule. Pass * to indicate to update any version available. This might result in stale updates.
1454
+ # @param profile_claim_rule_request [ProfileClaimRuleRequest] Request to update a claim rule.
1455
+ # @param [Hash] opts the optional parameters
1456
+ # @return [ProfileClaimRule]
1457
+ def update_claim_rule(profile_id, rule_id, authorization, if_match, profile_claim_rule_request, opts = {})
1458
+ data, _status_code, _headers = update_claim_rule_with_http_info(profile_id, rule_id, authorization, if_match, profile_claim_rule_request, opts)
1459
+ data
1460
+ end
1461
+
1462
+ # Update claim rule for a trusted profile
1463
+ # Update a specific claim rule for a given trusted profile ID and rule ID.
1464
+ # @param profile_id [String] ID of the trusted profile.
1465
+ # @param rule_id [String] ID of the claim rule to update.
1466
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1467
+ # @param if_match [String] Version of the claim rule to be updated. Specify the version that you retrived when reading list of claim rules. This value helps to identify any parallel usage of claim rule. Pass * to indicate to update any version available. This might result in stale updates.
1468
+ # @param profile_claim_rule_request [ProfileClaimRuleRequest] Request to update a claim rule.
1469
+ # @param [Hash] opts the optional parameters
1470
+ # @return [Array<(ProfileClaimRule, Integer, Hash)>] ProfileClaimRule data, response status code and response headers
1471
+ def update_claim_rule_with_http_info(profile_id, rule_id, authorization, if_match, profile_claim_rule_request, opts = {})
1472
+ if @api_client.config.debugging
1473
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.update_claim_rule ...'
1474
+ end
1475
+ # verify the required parameter 'profile_id' is set
1476
+ if @api_client.config.client_side_validation && profile_id.nil?
1477
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.update_claim_rule"
1478
+ end
1479
+ # verify the required parameter 'rule_id' is set
1480
+ if @api_client.config.client_side_validation && rule_id.nil?
1481
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling TrustedProfilesApi.update_claim_rule"
1482
+ end
1483
+ # verify the required parameter 'authorization' is set
1484
+ if @api_client.config.client_side_validation && authorization.nil?
1485
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.update_claim_rule"
1486
+ end
1487
+ # verify the required parameter 'if_match' is set
1488
+ if @api_client.config.client_side_validation && if_match.nil?
1489
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling TrustedProfilesApi.update_claim_rule"
1490
+ end
1491
+ # verify the required parameter 'profile_claim_rule_request' is set
1492
+ if @api_client.config.client_side_validation && profile_claim_rule_request.nil?
1493
+ fail ArgumentError, "Missing the required parameter 'profile_claim_rule_request' when calling TrustedProfilesApi.update_claim_rule"
1494
+ end
1495
+ # resource path
1496
+ local_var_path = '/v1/profiles/{profile-id}/rules/{rule-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{rule-id}', CGI.escape(rule_id.to_s))
1497
+
1498
+ # query parameters
1499
+ query_params = opts[:query_params] || {}
1500
+
1501
+ # header parameters
1502
+ header_params = opts[:header_params] || {}
1503
+ # HTTP header 'Accept' (if needed)
1504
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1505
+ # HTTP header 'Content-Type'
1506
+ content_type = @api_client.select_header_content_type(['application/json'])
1507
+ if !content_type.nil?
1508
+ header_params['Content-Type'] = content_type
1509
+ end
1510
+ header_params[:'Authorization'] = authorization
1511
+ header_params[:'If-Match'] = if_match
1512
+
1513
+ # form parameters
1514
+ form_params = opts[:form_params] || {}
1515
+
1516
+ # http body (model)
1517
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_claim_rule_request)
1518
+
1519
+ # return_type
1520
+ return_type = opts[:debug_return_type] || 'ProfileClaimRule'
1521
+
1522
+ # auth_names
1523
+ auth_names = opts[:debug_auth_names] || []
1524
+
1525
+ new_options = opts.merge(
1526
+ :operation => :"TrustedProfilesApi.update_claim_rule",
1527
+ :header_params => header_params,
1528
+ :query_params => query_params,
1529
+ :form_params => form_params,
1530
+ :body => post_body,
1531
+ :auth_names => auth_names,
1532
+ :return_type => return_type
1533
+ )
1534
+
1535
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1536
+ if @api_client.config.debugging
1537
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#update_claim_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1538
+ end
1539
+ return data, status_code, headers
1540
+ end
1541
+
1542
+ # Update a trusted profile
1543
+ # Update the name or description of an existing trusted profile.
1544
+ # @param profile_id [String] ID of the trusted profile to be updated.
1545
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1546
+ # @param if_match [String] Version of the trusted profile to be updated. Specify the version that you retrived when reading list of trusted profiles. This value helps to identify any parallel usage of trusted profile. Pass * to indicate to update any version available. This might result in stale updates.
1547
+ # @param update_trusted_profile_request [UpdateTrustedProfileRequest] Request to update a trusted profile.
1548
+ # @param [Hash] opts the optional parameters
1549
+ # @return [TrustedProfile]
1550
+ def update_profile(profile_id, authorization, if_match, update_trusted_profile_request, opts = {})
1551
+ data, _status_code, _headers = update_profile_with_http_info(profile_id, authorization, if_match, update_trusted_profile_request, opts)
1552
+ data
1553
+ end
1554
+
1555
+ # Update a trusted profile
1556
+ # Update the name or description of an existing trusted profile.
1557
+ # @param profile_id [String] ID of the trusted profile to be updated.
1558
+ # @param authorization [String] Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: &#39;No authorization header found&#39;. Make sure that the provided token has the required authority for the request.
1559
+ # @param if_match [String] Version of the trusted profile to be updated. Specify the version that you retrived when reading list of trusted profiles. This value helps to identify any parallel usage of trusted profile. Pass * to indicate to update any version available. This might result in stale updates.
1560
+ # @param update_trusted_profile_request [UpdateTrustedProfileRequest] Request to update a trusted profile.
1561
+ # @param [Hash] opts the optional parameters
1562
+ # @return [Array<(TrustedProfile, Integer, Hash)>] TrustedProfile data, response status code and response headers
1563
+ def update_profile_with_http_info(profile_id, authorization, if_match, update_trusted_profile_request, opts = {})
1564
+ if @api_client.config.debugging
1565
+ @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.update_profile ...'
1566
+ end
1567
+ # verify the required parameter 'profile_id' is set
1568
+ if @api_client.config.client_side_validation && profile_id.nil?
1569
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.update_profile"
1570
+ end
1571
+ # verify the required parameter 'authorization' is set
1572
+ if @api_client.config.client_side_validation && authorization.nil?
1573
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfilesApi.update_profile"
1574
+ end
1575
+ # verify the required parameter 'if_match' is set
1576
+ if @api_client.config.client_side_validation && if_match.nil?
1577
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling TrustedProfilesApi.update_profile"
1578
+ end
1579
+ # verify the required parameter 'update_trusted_profile_request' is set
1580
+ if @api_client.config.client_side_validation && update_trusted_profile_request.nil?
1581
+ fail ArgumentError, "Missing the required parameter 'update_trusted_profile_request' when calling TrustedProfilesApi.update_profile"
1582
+ end
1583
+ # resource path
1584
+ local_var_path = '/v1/profiles/{profile-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s))
1585
+
1586
+ # query parameters
1587
+ query_params = opts[:query_params] || {}
1588
+
1589
+ # header parameters
1590
+ header_params = opts[:header_params] || {}
1591
+ # HTTP header 'Accept' (if needed)
1592
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1593
+ # HTTP header 'Content-Type'
1594
+ content_type = @api_client.select_header_content_type(['application/json'])
1595
+ if !content_type.nil?
1596
+ header_params['Content-Type'] = content_type
1597
+ end
1598
+ header_params[:'Authorization'] = authorization
1599
+ header_params[:'If-Match'] = if_match
1600
+
1601
+ # form parameters
1602
+ form_params = opts[:form_params] || {}
1603
+
1604
+ # http body (model)
1605
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_trusted_profile_request)
1606
+
1607
+ # return_type
1608
+ return_type = opts[:debug_return_type] || 'TrustedProfile'
1609
+
1610
+ # auth_names
1611
+ auth_names = opts[:debug_auth_names] || []
1612
+
1613
+ new_options = opts.merge(
1614
+ :operation => :"TrustedProfilesApi.update_profile",
1615
+ :header_params => header_params,
1616
+ :query_params => query_params,
1617
+ :form_params => form_params,
1618
+ :body => post_body,
1619
+ :auth_names => auth_names,
1620
+ :return_type => return_type
1621
+ )
1622
+
1623
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1624
+ if @api_client.config.debugging
1625
+ @api_client.config.logger.debug "API called: TrustedProfilesApi#update_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1626
+ end
1627
+ return data, status_code, headers
1628
+ end
1629
+ end
1630
+ end