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,823 @@
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 TrustedProfileTemplateApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Commit a template version
23
+ # Commit a specific version of a trusted profile template in an enterprise account. You must commit a template before you can assign it to child accounts. Once a template is committed, you can no longer modify the template.
24
+ # @param template_id [String] ID of the trusted profile template
25
+ # @param version [String] Version of the Profile Template
26
+ # @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.
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [nil]
29
+ def commit_profile_template(template_id, version, authorization, opts = {})
30
+ commit_profile_template_with_http_info(template_id, version, authorization, opts)
31
+ nil
32
+ end
33
+
34
+ # Commit a template version
35
+ # Commit a specific version of a trusted profile template in an enterprise account. You must commit a template before you can assign it to child accounts. Once a template is committed, you can no longer modify the template.
36
+ # @param template_id [String] ID of the trusted profile template
37
+ # @param version [String] Version of the Profile Template
38
+ # @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.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
+ def commit_profile_template_with_http_info(template_id, version, authorization, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: TrustedProfileTemplateApi.commit_profile_template ...'
44
+ end
45
+ # verify the required parameter 'template_id' is set
46
+ if @api_client.config.client_side_validation && template_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling TrustedProfileTemplateApi.commit_profile_template"
48
+ end
49
+ # verify the required parameter 'version' is set
50
+ if @api_client.config.client_side_validation && version.nil?
51
+ fail ArgumentError, "Missing the required parameter 'version' when calling TrustedProfileTemplateApi.commit_profile_template"
52
+ end
53
+ # verify the required parameter 'authorization' is set
54
+ if @api_client.config.client_side_validation && authorization.nil?
55
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfileTemplateApi.commit_profile_template"
56
+ end
57
+ # resource path
58
+ local_var_path = '/v1/profile_templates/{template_id}/versions/{version}/commit'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{version}', CGI.escape(version.to_s))
59
+
60
+ # query parameters
61
+ query_params = opts[:query_params] || {}
62
+
63
+ # header parameters
64
+ header_params = opts[:header_params] || {}
65
+ header_params[:'Authorization'] = authorization
66
+
67
+ # form parameters
68
+ form_params = opts[:form_params] || {}
69
+
70
+ # http body (model)
71
+ post_body = opts[:debug_body]
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type]
75
+
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || []
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"TrustedProfileTemplateApi.commit_profile_template",
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: TrustedProfileTemplateApi#commit_profile_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+
96
+ # Create a trusted profile template
97
+ # Create a new trusted profile template in an enterprise account.
98
+ # @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.
99
+ # @param trusted_profile_template_request [TrustedProfileTemplateRequest] Request to create a trusted profile template.
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [TrustedProfileTemplateResponse]
102
+ def create_profile_template(authorization, trusted_profile_template_request, opts = {})
103
+ data, _status_code, _headers = create_profile_template_with_http_info(authorization, trusted_profile_template_request, opts)
104
+ data
105
+ end
106
+
107
+ # Create a trusted profile template
108
+ # Create a new trusted profile template in an enterprise account.
109
+ # @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.
110
+ # @param trusted_profile_template_request [TrustedProfileTemplateRequest] Request to create a trusted profile template.
111
+ # @param [Hash] opts the optional parameters
112
+ # @return [Array<(TrustedProfileTemplateResponse, Integer, Hash)>] TrustedProfileTemplateResponse data, response status code and response headers
113
+ def create_profile_template_with_http_info(authorization, trusted_profile_template_request, opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug 'Calling API: TrustedProfileTemplateApi.create_profile_template ...'
116
+ end
117
+ # verify the required parameter 'authorization' is set
118
+ if @api_client.config.client_side_validation && authorization.nil?
119
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfileTemplateApi.create_profile_template"
120
+ end
121
+ # verify the required parameter 'trusted_profile_template_request' is set
122
+ if @api_client.config.client_side_validation && trusted_profile_template_request.nil?
123
+ fail ArgumentError, "Missing the required parameter 'trusted_profile_template_request' when calling TrustedProfileTemplateApi.create_profile_template"
124
+ end
125
+ # resource path
126
+ local_var_path = '/v1/profile_templates'
127
+
128
+ # query parameters
129
+ query_params = opts[:query_params] || {}
130
+
131
+ # header parameters
132
+ header_params = opts[:header_params] || {}
133
+ # HTTP header 'Accept' (if needed)
134
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
135
+ # HTTP header 'Content-Type'
136
+ content_type = @api_client.select_header_content_type(['application/json'])
137
+ if !content_type.nil?
138
+ header_params['Content-Type'] = content_type
139
+ end
140
+ header_params[:'Authorization'] = authorization
141
+
142
+ # form parameters
143
+ form_params = opts[:form_params] || {}
144
+
145
+ # http body (model)
146
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(trusted_profile_template_request)
147
+
148
+ # return_type
149
+ return_type = opts[:debug_return_type] || 'TrustedProfileTemplateResponse'
150
+
151
+ # auth_names
152
+ auth_names = opts[:debug_auth_names] || []
153
+
154
+ new_options = opts.merge(
155
+ :operation => :"TrustedProfileTemplateApi.create_profile_template",
156
+ :header_params => header_params,
157
+ :query_params => query_params,
158
+ :form_params => form_params,
159
+ :body => post_body,
160
+ :auth_names => auth_names,
161
+ :return_type => return_type
162
+ )
163
+
164
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
165
+ if @api_client.config.debugging
166
+ @api_client.config.logger.debug "API called: TrustedProfileTemplateApi#create_profile_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
167
+ end
168
+ return data, status_code, headers
169
+ end
170
+
171
+ # Create new version of a trusted profile template
172
+ # Create a new version of a trusted profile template in an enterprise account.
173
+ # @param template_id [String] ID of the trusted profile template
174
+ # @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.
175
+ # @param trusted_profile_template_request [TrustedProfileTemplateRequest] Request to create new version of a Trusted Profile Template
176
+ # @param [Hash] opts the optional parameters
177
+ # @return [TrustedProfileTemplateResponse]
178
+ def create_profile_template_version(template_id, authorization, trusted_profile_template_request, opts = {})
179
+ data, _status_code, _headers = create_profile_template_version_with_http_info(template_id, authorization, trusted_profile_template_request, opts)
180
+ data
181
+ end
182
+
183
+ # Create new version of a trusted profile template
184
+ # Create a new version of a trusted profile template in an enterprise account.
185
+ # @param template_id [String] ID of the trusted profile template
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 trusted_profile_template_request [TrustedProfileTemplateRequest] Request to create new version of a Trusted Profile Template
188
+ # @param [Hash] opts the optional parameters
189
+ # @return [Array<(TrustedProfileTemplateResponse, Integer, Hash)>] TrustedProfileTemplateResponse data, response status code and response headers
190
+ def create_profile_template_version_with_http_info(template_id, authorization, trusted_profile_template_request, opts = {})
191
+ if @api_client.config.debugging
192
+ @api_client.config.logger.debug 'Calling API: TrustedProfileTemplateApi.create_profile_template_version ...'
193
+ end
194
+ # verify the required parameter 'template_id' is set
195
+ if @api_client.config.client_side_validation && template_id.nil?
196
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling TrustedProfileTemplateApi.create_profile_template_version"
197
+ end
198
+ # verify the required parameter 'authorization' is set
199
+ if @api_client.config.client_side_validation && authorization.nil?
200
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfileTemplateApi.create_profile_template_version"
201
+ end
202
+ # verify the required parameter 'trusted_profile_template_request' is set
203
+ if @api_client.config.client_side_validation && trusted_profile_template_request.nil?
204
+ fail ArgumentError, "Missing the required parameter 'trusted_profile_template_request' when calling TrustedProfileTemplateApi.create_profile_template_version"
205
+ end
206
+ # resource path
207
+ local_var_path = '/v1/profile_templates/{template_id}/versions'.sub('{template_id}', CGI.escape(template_id.to_s))
208
+
209
+ # query parameters
210
+ query_params = opts[:query_params] || {}
211
+
212
+ # header parameters
213
+ header_params = opts[:header_params] || {}
214
+ # HTTP header 'Accept' (if needed)
215
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
216
+ # HTTP header 'Content-Type'
217
+ content_type = @api_client.select_header_content_type(['application/json'])
218
+ if !content_type.nil?
219
+ header_params['Content-Type'] = content_type
220
+ end
221
+ header_params[:'Authorization'] = authorization
222
+
223
+ # form parameters
224
+ form_params = opts[:form_params] || {}
225
+
226
+ # http body (model)
227
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(trusted_profile_template_request)
228
+
229
+ # return_type
230
+ return_type = opts[:debug_return_type] || 'TrustedProfileTemplateResponse'
231
+
232
+ # auth_names
233
+ auth_names = opts[:debug_auth_names] || []
234
+
235
+ new_options = opts.merge(
236
+ :operation => :"TrustedProfileTemplateApi.create_profile_template_version",
237
+ :header_params => header_params,
238
+ :query_params => query_params,
239
+ :form_params => form_params,
240
+ :body => post_body,
241
+ :auth_names => auth_names,
242
+ :return_type => return_type
243
+ )
244
+
245
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug "API called: TrustedProfileTemplateApi#create_profile_template_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
248
+ end
249
+ return data, status_code, headers
250
+ end
251
+
252
+ # Delete all versions of a trusted profile template
253
+ # Delete all versions of a trusted profile template in an enterprise account. If any version is assigned to child accounts, you must first delete the assignment.
254
+ # @param template_id [String] ID of the trusted profile template
255
+ # @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.
256
+ # @param [Hash] opts the optional parameters
257
+ # @return [nil]
258
+ def delete_all_versions_of_profile_template(template_id, authorization, opts = {})
259
+ delete_all_versions_of_profile_template_with_http_info(template_id, authorization, opts)
260
+ nil
261
+ end
262
+
263
+ # Delete all versions of a trusted profile template
264
+ # Delete all versions of a trusted profile template in an enterprise account. If any version is assigned to child accounts, you must first delete the assignment.
265
+ # @param template_id [String] ID of the trusted profile template
266
+ # @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.
267
+ # @param [Hash] opts the optional parameters
268
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
269
+ def delete_all_versions_of_profile_template_with_http_info(template_id, authorization, opts = {})
270
+ if @api_client.config.debugging
271
+ @api_client.config.logger.debug 'Calling API: TrustedProfileTemplateApi.delete_all_versions_of_profile_template ...'
272
+ end
273
+ # verify the required parameter 'template_id' is set
274
+ if @api_client.config.client_side_validation && template_id.nil?
275
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling TrustedProfileTemplateApi.delete_all_versions_of_profile_template"
276
+ end
277
+ # verify the required parameter 'authorization' is set
278
+ if @api_client.config.client_side_validation && authorization.nil?
279
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfileTemplateApi.delete_all_versions_of_profile_template"
280
+ end
281
+ # resource path
282
+ local_var_path = '/v1/profile_templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s))
283
+
284
+ # query parameters
285
+ query_params = opts[:query_params] || {}
286
+
287
+ # header parameters
288
+ header_params = opts[:header_params] || {}
289
+ header_params[:'Authorization'] = authorization
290
+
291
+ # form parameters
292
+ form_params = opts[:form_params] || {}
293
+
294
+ # http body (model)
295
+ post_body = opts[:debug_body]
296
+
297
+ # return_type
298
+ return_type = opts[:debug_return_type]
299
+
300
+ # auth_names
301
+ auth_names = opts[:debug_auth_names] || []
302
+
303
+ new_options = opts.merge(
304
+ :operation => :"TrustedProfileTemplateApi.delete_all_versions_of_profile_template",
305
+ :header_params => header_params,
306
+ :query_params => query_params,
307
+ :form_params => form_params,
308
+ :body => post_body,
309
+ :auth_names => auth_names,
310
+ :return_type => return_type
311
+ )
312
+
313
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
314
+ if @api_client.config.debugging
315
+ @api_client.config.logger.debug "API called: TrustedProfileTemplateApi#delete_all_versions_of_profile_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
316
+ end
317
+ return data, status_code, headers
318
+ end
319
+
320
+ # Delete version of trusted profile template
321
+ # Delete a specific version of a trusted profile template in an enterprise account. If the version is assigned to child accounts, you must first delete the assignment.
322
+ # @param template_id [String] ID of the trusted profile template
323
+ # @param version [String] Version of the Profile Template
324
+ # @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.
325
+ # @param [Hash] opts the optional parameters
326
+ # @return [nil]
327
+ def delete_profile_template_version(template_id, version, authorization, opts = {})
328
+ delete_profile_template_version_with_http_info(template_id, version, authorization, opts)
329
+ nil
330
+ end
331
+
332
+ # Delete version of trusted profile template
333
+ # Delete a specific version of a trusted profile template in an enterprise account. If the version is assigned to child accounts, you must first delete the assignment.
334
+ # @param template_id [String] ID of the trusted profile template
335
+ # @param version [String] Version of the Profile Template
336
+ # @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.
337
+ # @param [Hash] opts the optional parameters
338
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
339
+ def delete_profile_template_version_with_http_info(template_id, version, authorization, opts = {})
340
+ if @api_client.config.debugging
341
+ @api_client.config.logger.debug 'Calling API: TrustedProfileTemplateApi.delete_profile_template_version ...'
342
+ end
343
+ # verify the required parameter 'template_id' is set
344
+ if @api_client.config.client_side_validation && template_id.nil?
345
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling TrustedProfileTemplateApi.delete_profile_template_version"
346
+ end
347
+ # verify the required parameter 'version' is set
348
+ if @api_client.config.client_side_validation && version.nil?
349
+ fail ArgumentError, "Missing the required parameter 'version' when calling TrustedProfileTemplateApi.delete_profile_template_version"
350
+ end
351
+ # verify the required parameter 'authorization' is set
352
+ if @api_client.config.client_side_validation && authorization.nil?
353
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfileTemplateApi.delete_profile_template_version"
354
+ end
355
+ # resource path
356
+ local_var_path = '/v1/profile_templates/{template_id}/versions/{version}'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{version}', CGI.escape(version.to_s))
357
+
358
+ # query parameters
359
+ query_params = opts[:query_params] || {}
360
+
361
+ # header parameters
362
+ header_params = opts[:header_params] || {}
363
+ header_params[:'Authorization'] = authorization
364
+
365
+ # form parameters
366
+ form_params = opts[:form_params] || {}
367
+
368
+ # http body (model)
369
+ post_body = opts[:debug_body]
370
+
371
+ # return_type
372
+ return_type = opts[:debug_return_type]
373
+
374
+ # auth_names
375
+ auth_names = opts[:debug_auth_names] || []
376
+
377
+ new_options = opts.merge(
378
+ :operation => :"TrustedProfileTemplateApi.delete_profile_template_version",
379
+ :header_params => header_params,
380
+ :query_params => query_params,
381
+ :form_params => form_params,
382
+ :body => post_body,
383
+ :auth_names => auth_names,
384
+ :return_type => return_type
385
+ )
386
+
387
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
388
+ if @api_client.config.debugging
389
+ @api_client.config.logger.debug "API called: TrustedProfileTemplateApi#delete_profile_template_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
390
+ end
391
+ return data, status_code, headers
392
+ end
393
+
394
+ # Get latest version of a trusted profile template
395
+ # Get the latest version of a trusted profile template in an enterprise account.
396
+ # @param template_id [String] ID of the trusted profile template
397
+ # @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.
398
+ # @param [Hash] opts the optional parameters
399
+ # @option opts [Boolean] :include_history Defines if the entity history is included in the response (default to false)
400
+ # @return [TrustedProfileTemplateResponse]
401
+ def get_latest_profile_template_version(template_id, authorization, opts = {})
402
+ data, _status_code, _headers = get_latest_profile_template_version_with_http_info(template_id, authorization, opts)
403
+ data
404
+ end
405
+
406
+ # Get latest version of a trusted profile template
407
+ # Get the latest version of a trusted profile template in an enterprise account.
408
+ # @param template_id [String] ID of the trusted profile template
409
+ # @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.
410
+ # @param [Hash] opts the optional parameters
411
+ # @option opts [Boolean] :include_history Defines if the entity history is included in the response (default to false)
412
+ # @return [Array<(TrustedProfileTemplateResponse, Integer, Hash)>] TrustedProfileTemplateResponse data, response status code and response headers
413
+ def get_latest_profile_template_version_with_http_info(template_id, authorization, opts = {})
414
+ if @api_client.config.debugging
415
+ @api_client.config.logger.debug 'Calling API: TrustedProfileTemplateApi.get_latest_profile_template_version ...'
416
+ end
417
+ # verify the required parameter 'template_id' is set
418
+ if @api_client.config.client_side_validation && template_id.nil?
419
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling TrustedProfileTemplateApi.get_latest_profile_template_version"
420
+ end
421
+ # verify the required parameter 'authorization' is set
422
+ if @api_client.config.client_side_validation && authorization.nil?
423
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfileTemplateApi.get_latest_profile_template_version"
424
+ end
425
+ # resource path
426
+ local_var_path = '/v1/profile_templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s))
427
+
428
+ # query parameters
429
+ query_params = opts[:query_params] || {}
430
+ query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil?
431
+
432
+ # header parameters
433
+ header_params = opts[:header_params] || {}
434
+ # HTTP header 'Accept' (if needed)
435
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
436
+ header_params[:'Authorization'] = authorization
437
+
438
+ # form parameters
439
+ form_params = opts[:form_params] || {}
440
+
441
+ # http body (model)
442
+ post_body = opts[:debug_body]
443
+
444
+ # return_type
445
+ return_type = opts[:debug_return_type] || 'TrustedProfileTemplateResponse'
446
+
447
+ # auth_names
448
+ auth_names = opts[:debug_auth_names] || []
449
+
450
+ new_options = opts.merge(
451
+ :operation => :"TrustedProfileTemplateApi.get_latest_profile_template_version",
452
+ :header_params => header_params,
453
+ :query_params => query_params,
454
+ :form_params => form_params,
455
+ :body => post_body,
456
+ :auth_names => auth_names,
457
+ :return_type => return_type
458
+ )
459
+
460
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
461
+ if @api_client.config.debugging
462
+ @api_client.config.logger.debug "API called: TrustedProfileTemplateApi#get_latest_profile_template_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
463
+ end
464
+ return data, status_code, headers
465
+ end
466
+
467
+ # Get version of trusted profile template
468
+ # Get a specific version of a trusted profile template in an enterprise account.
469
+ # @param template_id [String] ID of the trusted profile template
470
+ # @param version [String] Version of the Profile Template
471
+ # @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.
472
+ # @param [Hash] opts the optional parameters
473
+ # @option opts [Boolean] :include_history Defines if the entity history is included in the response (default to false)
474
+ # @return [TrustedProfileTemplateResponse]
475
+ def get_profile_template_version(template_id, version, authorization, opts = {})
476
+ data, _status_code, _headers = get_profile_template_version_with_http_info(template_id, version, authorization, opts)
477
+ data
478
+ end
479
+
480
+ # Get version of trusted profile template
481
+ # Get a specific version of a trusted profile template in an enterprise account.
482
+ # @param template_id [String] ID of the trusted profile template
483
+ # @param version [String] Version of the Profile Template
484
+ # @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.
485
+ # @param [Hash] opts the optional parameters
486
+ # @option opts [Boolean] :include_history Defines if the entity history is included in the response (default to false)
487
+ # @return [Array<(TrustedProfileTemplateResponse, Integer, Hash)>] TrustedProfileTemplateResponse data, response status code and response headers
488
+ def get_profile_template_version_with_http_info(template_id, version, authorization, opts = {})
489
+ if @api_client.config.debugging
490
+ @api_client.config.logger.debug 'Calling API: TrustedProfileTemplateApi.get_profile_template_version ...'
491
+ end
492
+ # verify the required parameter 'template_id' is set
493
+ if @api_client.config.client_side_validation && template_id.nil?
494
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling TrustedProfileTemplateApi.get_profile_template_version"
495
+ end
496
+ # verify the required parameter 'version' is set
497
+ if @api_client.config.client_side_validation && version.nil?
498
+ fail ArgumentError, "Missing the required parameter 'version' when calling TrustedProfileTemplateApi.get_profile_template_version"
499
+ end
500
+ # verify the required parameter 'authorization' is set
501
+ if @api_client.config.client_side_validation && authorization.nil?
502
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfileTemplateApi.get_profile_template_version"
503
+ end
504
+ # resource path
505
+ local_var_path = '/v1/profile_templates/{template_id}/versions/{version}'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{version}', CGI.escape(version.to_s))
506
+
507
+ # query parameters
508
+ query_params = opts[:query_params] || {}
509
+ query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil?
510
+
511
+ # header parameters
512
+ header_params = opts[:header_params] || {}
513
+ # HTTP header 'Accept' (if needed)
514
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
515
+ header_params[:'Authorization'] = authorization
516
+
517
+ # form parameters
518
+ form_params = opts[:form_params] || {}
519
+
520
+ # http body (model)
521
+ post_body = opts[:debug_body]
522
+
523
+ # return_type
524
+ return_type = opts[:debug_return_type] || 'TrustedProfileTemplateResponse'
525
+
526
+ # auth_names
527
+ auth_names = opts[:debug_auth_names] || []
528
+
529
+ new_options = opts.merge(
530
+ :operation => :"TrustedProfileTemplateApi.get_profile_template_version",
531
+ :header_params => header_params,
532
+ :query_params => query_params,
533
+ :form_params => form_params,
534
+ :body => post_body,
535
+ :auth_names => auth_names,
536
+ :return_type => return_type
537
+ )
538
+
539
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
540
+ if @api_client.config.debugging
541
+ @api_client.config.logger.debug "API called: TrustedProfileTemplateApi#get_profile_template_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
542
+ end
543
+ return data, status_code, headers
544
+ end
545
+
546
+ # List trusted profile templates
547
+ # List the trusted profile templates in an enterprise account.
548
+ # @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.
549
+ # @param [Hash] opts the optional parameters
550
+ # @option opts [String] :account_id Account ID of the trusted profile templates to query. This parameter is required unless using a pagetoken.
551
+ # @option opts [String] :limit Optional size of a single page. (default to '20')
552
+ # @option opts [String] :pagetoken Optional Prev or Next page token returned from a previous query execution. Default is start with first page.
553
+ # @option opts [String] :sort Optional sort property. If specified, the returned templates are sorted according to this property. (default to 'created_at')
554
+ # @option opts [String] :order Optional sort order. (default to 'asc')
555
+ # @option opts [String] :include_history Defines if the entity history is included in the response. (default to 'false')
556
+ # @return [TrustedProfileTemplateList]
557
+ def list_profile_templates(authorization, opts = {})
558
+ data, _status_code, _headers = list_profile_templates_with_http_info(authorization, opts)
559
+ data
560
+ end
561
+
562
+ # List trusted profile templates
563
+ # List the trusted profile templates in an enterprise account.
564
+ # @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.
565
+ # @param [Hash] opts the optional parameters
566
+ # @option opts [String] :account_id Account ID of the trusted profile templates to query. This parameter is required unless using a pagetoken.
567
+ # @option opts [String] :limit Optional size of a single page. (default to '20')
568
+ # @option opts [String] :pagetoken Optional Prev or Next page token returned from a previous query execution. Default is start with first page.
569
+ # @option opts [String] :sort Optional sort property. If specified, the returned templates are sorted according to this property. (default to 'created_at')
570
+ # @option opts [String] :order Optional sort order. (default to 'asc')
571
+ # @option opts [String] :include_history Defines if the entity history is included in the response. (default to 'false')
572
+ # @return [Array<(TrustedProfileTemplateList, Integer, Hash)>] TrustedProfileTemplateList data, response status code and response headers
573
+ def list_profile_templates_with_http_info(authorization, opts = {})
574
+ if @api_client.config.debugging
575
+ @api_client.config.logger.debug 'Calling API: TrustedProfileTemplateApi.list_profile_templates ...'
576
+ end
577
+ # verify the required parameter 'authorization' is set
578
+ if @api_client.config.client_side_validation && authorization.nil?
579
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfileTemplateApi.list_profile_templates"
580
+ end
581
+ allowable_values = ["created_at", "last_modified_at", "name"]
582
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
583
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
584
+ end
585
+ allowable_values = ["asc", "desc"]
586
+ if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
587
+ fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
588
+ end
589
+ # resource path
590
+ local_var_path = '/v1/profile_templates'
591
+
592
+ # query parameters
593
+ query_params = opts[:query_params] || {}
594
+ query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
595
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
596
+ query_params[:'pagetoken'] = opts[:'pagetoken'] if !opts[:'pagetoken'].nil?
597
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
598
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
599
+ query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil?
600
+
601
+ # header parameters
602
+ header_params = opts[:header_params] || {}
603
+ # HTTP header 'Accept' (if needed)
604
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
605
+ header_params[:'Authorization'] = authorization
606
+
607
+ # form parameters
608
+ form_params = opts[:form_params] || {}
609
+
610
+ # http body (model)
611
+ post_body = opts[:debug_body]
612
+
613
+ # return_type
614
+ return_type = opts[:debug_return_type] || 'TrustedProfileTemplateList'
615
+
616
+ # auth_names
617
+ auth_names = opts[:debug_auth_names] || []
618
+
619
+ new_options = opts.merge(
620
+ :operation => :"TrustedProfileTemplateApi.list_profile_templates",
621
+ :header_params => header_params,
622
+ :query_params => query_params,
623
+ :form_params => form_params,
624
+ :body => post_body,
625
+ :auth_names => auth_names,
626
+ :return_type => return_type
627
+ )
628
+
629
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
630
+ if @api_client.config.debugging
631
+ @api_client.config.logger.debug "API called: TrustedProfileTemplateApi#list_profile_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
632
+ end
633
+ return data, status_code, headers
634
+ end
635
+
636
+ # List trusted profile template versions
637
+ # List the versions of a trusted profile template in an enterprise account.
638
+ # @param template_id [String] ID of the trusted profile template
639
+ # @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.
640
+ # @param [Hash] opts the optional parameters
641
+ # @option opts [String] :limit Optional size of a single page. (default to '20')
642
+ # @option opts [String] :pagetoken Optional Prev or Next page token returned from a previous query execution. Default is start with first page.
643
+ # @option opts [String] :sort Optional sort property. If specified, the returned templated are sorted according to this property (default to 'created_at')
644
+ # @option opts [String] :order Optional sort order. (default to 'asc')
645
+ # @option opts [String] :include_history Defines if the entity history is included in the response (default to 'false')
646
+ # @return [TrustedProfileTemplateList]
647
+ def list_versions_of_profile_template(template_id, authorization, opts = {})
648
+ data, _status_code, _headers = list_versions_of_profile_template_with_http_info(template_id, authorization, opts)
649
+ data
650
+ end
651
+
652
+ # List trusted profile template versions
653
+ # List the versions of a trusted profile template in an enterprise account.
654
+ # @param template_id [String] ID of the trusted profile template
655
+ # @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.
656
+ # @param [Hash] opts the optional parameters
657
+ # @option opts [String] :limit Optional size of a single page. (default to '20')
658
+ # @option opts [String] :pagetoken Optional Prev or Next page token returned from a previous query execution. Default is start with first page.
659
+ # @option opts [String] :sort Optional sort property. If specified, the returned templated are sorted according to this property (default to 'created_at')
660
+ # @option opts [String] :order Optional sort order. (default to 'asc')
661
+ # @option opts [String] :include_history Defines if the entity history is included in the response (default to 'false')
662
+ # @return [Array<(TrustedProfileTemplateList, Integer, Hash)>] TrustedProfileTemplateList data, response status code and response headers
663
+ def list_versions_of_profile_template_with_http_info(template_id, authorization, opts = {})
664
+ if @api_client.config.debugging
665
+ @api_client.config.logger.debug 'Calling API: TrustedProfileTemplateApi.list_versions_of_profile_template ...'
666
+ end
667
+ # verify the required parameter 'template_id' is set
668
+ if @api_client.config.client_side_validation && template_id.nil?
669
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling TrustedProfileTemplateApi.list_versions_of_profile_template"
670
+ end
671
+ # verify the required parameter 'authorization' is set
672
+ if @api_client.config.client_side_validation && authorization.nil?
673
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfileTemplateApi.list_versions_of_profile_template"
674
+ end
675
+ allowable_values = ["created_at", "last_modified_at", "name"]
676
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
677
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
678
+ end
679
+ allowable_values = ["asc", "desc"]
680
+ if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
681
+ fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
682
+ end
683
+ # resource path
684
+ local_var_path = '/v1/profile_templates/{template_id}/versions'.sub('{template_id}', CGI.escape(template_id.to_s))
685
+
686
+ # query parameters
687
+ query_params = opts[:query_params] || {}
688
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
689
+ query_params[:'pagetoken'] = opts[:'pagetoken'] if !opts[:'pagetoken'].nil?
690
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
691
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
692
+ query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil?
693
+
694
+ # header parameters
695
+ header_params = opts[:header_params] || {}
696
+ # HTTP header 'Accept' (if needed)
697
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
698
+ header_params[:'Authorization'] = authorization
699
+
700
+ # form parameters
701
+ form_params = opts[:form_params] || {}
702
+
703
+ # http body (model)
704
+ post_body = opts[:debug_body]
705
+
706
+ # return_type
707
+ return_type = opts[:debug_return_type] || 'TrustedProfileTemplateList'
708
+
709
+ # auth_names
710
+ auth_names = opts[:debug_auth_names] || []
711
+
712
+ new_options = opts.merge(
713
+ :operation => :"TrustedProfileTemplateApi.list_versions_of_profile_template",
714
+ :header_params => header_params,
715
+ :query_params => query_params,
716
+ :form_params => form_params,
717
+ :body => post_body,
718
+ :auth_names => auth_names,
719
+ :return_type => return_type
720
+ )
721
+
722
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
723
+ if @api_client.config.debugging
724
+ @api_client.config.logger.debug "API called: TrustedProfileTemplateApi#list_versions_of_profile_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
725
+ end
726
+ return data, status_code, headers
727
+ end
728
+
729
+ # Update version of trusted profile template
730
+ # Update a specific version of a trusted profile template in an enterprise account.
731
+ # @param if_match [String] Entity tag of the Template to be updated. Specify the tag that you retrieved when reading the Profile Template. This value helps identifying parallel usage of this API. Pass * to indicate to update any version available. This might result in stale updates.
732
+ # @param template_id [String] ID of the trusted profile template
733
+ # @param version [String] Version of the Profile Template
734
+ # @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.
735
+ # @param trusted_profile_template_request [TrustedProfileTemplateRequest] Request to create a trusted profile template.
736
+ # @param [Hash] opts the optional parameters
737
+ # @return [TrustedProfileTemplateResponse]
738
+ def update_profile_template_version(if_match, template_id, version, authorization, trusted_profile_template_request, opts = {})
739
+ data, _status_code, _headers = update_profile_template_version_with_http_info(if_match, template_id, version, authorization, trusted_profile_template_request, opts)
740
+ data
741
+ end
742
+
743
+ # Update version of trusted profile template
744
+ # Update a specific version of a trusted profile template in an enterprise account.
745
+ # @param if_match [String] Entity tag of the Template to be updated. Specify the tag that you retrieved when reading the Profile Template. This value helps identifying parallel usage of this API. Pass * to indicate to update any version available. This might result in stale updates.
746
+ # @param template_id [String] ID of the trusted profile template
747
+ # @param version [String] Version of the Profile Template
748
+ # @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.
749
+ # @param trusted_profile_template_request [TrustedProfileTemplateRequest] Request to create a trusted profile template.
750
+ # @param [Hash] opts the optional parameters
751
+ # @return [Array<(TrustedProfileTemplateResponse, Integer, Hash)>] TrustedProfileTemplateResponse data, response status code and response headers
752
+ def update_profile_template_version_with_http_info(if_match, template_id, version, authorization, trusted_profile_template_request, opts = {})
753
+ if @api_client.config.debugging
754
+ @api_client.config.logger.debug 'Calling API: TrustedProfileTemplateApi.update_profile_template_version ...'
755
+ end
756
+ # verify the required parameter 'if_match' is set
757
+ if @api_client.config.client_side_validation && if_match.nil?
758
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling TrustedProfileTemplateApi.update_profile_template_version"
759
+ end
760
+ # verify the required parameter 'template_id' is set
761
+ if @api_client.config.client_side_validation && template_id.nil?
762
+ fail ArgumentError, "Missing the required parameter 'template_id' when calling TrustedProfileTemplateApi.update_profile_template_version"
763
+ end
764
+ # verify the required parameter 'version' is set
765
+ if @api_client.config.client_side_validation && version.nil?
766
+ fail ArgumentError, "Missing the required parameter 'version' when calling TrustedProfileTemplateApi.update_profile_template_version"
767
+ end
768
+ # verify the required parameter 'authorization' is set
769
+ if @api_client.config.client_side_validation && authorization.nil?
770
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TrustedProfileTemplateApi.update_profile_template_version"
771
+ end
772
+ # verify the required parameter 'trusted_profile_template_request' is set
773
+ if @api_client.config.client_side_validation && trusted_profile_template_request.nil?
774
+ fail ArgumentError, "Missing the required parameter 'trusted_profile_template_request' when calling TrustedProfileTemplateApi.update_profile_template_version"
775
+ end
776
+ # resource path
777
+ local_var_path = '/v1/profile_templates/{template_id}/versions/{version}'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{version}', CGI.escape(version.to_s))
778
+
779
+ # query parameters
780
+ query_params = opts[:query_params] || {}
781
+
782
+ # header parameters
783
+ header_params = opts[:header_params] || {}
784
+ # HTTP header 'Accept' (if needed)
785
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
786
+ # HTTP header 'Content-Type'
787
+ content_type = @api_client.select_header_content_type(['application/json'])
788
+ if !content_type.nil?
789
+ header_params['Content-Type'] = content_type
790
+ end
791
+ header_params[:'If-Match'] = if_match
792
+ header_params[:'Authorization'] = authorization
793
+
794
+ # form parameters
795
+ form_params = opts[:form_params] || {}
796
+
797
+ # http body (model)
798
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(trusted_profile_template_request)
799
+
800
+ # return_type
801
+ return_type = opts[:debug_return_type] || 'TrustedProfileTemplateResponse'
802
+
803
+ # auth_names
804
+ auth_names = opts[:debug_auth_names] || []
805
+
806
+ new_options = opts.merge(
807
+ :operation => :"TrustedProfileTemplateApi.update_profile_template_version",
808
+ :header_params => header_params,
809
+ :query_params => query_params,
810
+ :form_params => form_params,
811
+ :body => post_body,
812
+ :auth_names => auth_names,
813
+ :return_type => return_type
814
+ )
815
+
816
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
817
+ if @api_client.config.debugging
818
+ @api_client.config.logger.debug "API called: TrustedProfileTemplateApi#update_profile_template_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
819
+ end
820
+ return data, status_code, headers
821
+ end
822
+ end
823
+ end