ibm_cloud_iam 1.0.2 → 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.
- checksums.yaml +4 -4
- data/README.md +548 -36
- data/docs/APIKeysApi.md +714 -0
- data/docs/AccessGroupCount.md +20 -0
- data/docs/AccountBasedMfaEnrollment.md +24 -0
- data/docs/AccountIdpSettings.md +32 -0
- data/docs/AccountLimitsApi.md +173 -0
- data/docs/AccountLoginSettings.md +18 -0
- data/docs/AccountSettingsApi.md +224 -0
- data/docs/AccountSettingsAssignedTemplatesSection.md +46 -0
- data/docs/AccountSettingsEffectiveSection.md +38 -0
- data/docs/AccountSettingsForIdPApi.md +489 -0
- data/docs/AccountSettingsMeta.md +24 -0
- data/docs/AccountSettingsRequest.md +40 -0
- data/docs/AccountSettingsResponse.md +48 -0
- data/docs/AccountSettingsTemplateApi.md +720 -0
- data/docs/AccountSettingsTemplateAssignmentsApi.md +376 -0
- data/docs/AccountSettingsTemplateList.md +30 -0
- data/docs/AccountSettingsTemplateRequest.md +24 -0
- data/docs/AccountSettingsTemplateResponse.md +44 -0
- data/docs/AccountSettingsUserDomainRestriction.md +22 -0
- data/docs/AccountSettingsUserMFAResponse.md +28 -0
- data/docs/ActionControls.md +22 -0
- data/docs/ActionControlsIdentities.md +20 -0
- data/docs/ActivitiesApi.md +149 -0
- data/docs/Activity.md +20 -0
- data/docs/AddAccountIdpSettingRequest.md +22 -0
- data/docs/ApiKey.md +44 -33
- data/docs/ApiKeyInsideCreateServiceIdRequest.md +18 -13
- data/docs/ApiKeyList.md +20 -19
- data/docs/ApikeyActivity.md +28 -0
- data/docs/ApikeyActivityServiceid.md +20 -0
- data/docs/ApikeyActivityUser.md +24 -0
- data/docs/AssignedTemplatesAccountSettings.md +40 -0
- data/docs/CommonAccountSettingsRequest.md +36 -0
- data/docs/CommonAccountSettingsResponse.md +34 -0
- data/docs/ConsumersResponse.md +20 -0
- data/docs/ConsumersResponseConsumersInner.md +20 -0
- data/docs/CreateApiKeyRequest.md +24 -17
- data/docs/CreateIdpRequest.md +30 -0
- data/docs/CreateIdpRequestProperties.md +20 -0
- data/docs/CreateIdpRequestPropertiesIdp.md +26 -0
- data/docs/CreateIdpRequestPropertiesSp.md +32 -0
- data/docs/CreateIdpRequestPropertiesSpAuthnContext.md +20 -0
- data/docs/CreateIdpRequestSecrets.md +20 -0
- data/docs/CreateIdpRequestSecretsIdp.md +22 -0
- data/docs/CreateIdpRequestSecretsIdpSigningInner.md +20 -0
- data/docs/CreateIdpRequestSecretsSp.md +18 -0
- data/docs/CreateIdpRequestSecretsSpSigningInner.md +24 -0
- data/docs/CreateProfileLinkRequest.md +24 -0
- data/docs/CreateProfileLinkRequestLink.md +26 -0
- data/docs/CreateServiceIdGroupRequest.md +22 -0
- data/docs/CreateServiceIdRequest.md +18 -15
- data/docs/CreateTemplateAssignmentRequest.md +24 -0
- data/docs/CreateTrustedProfileRequest.md +24 -0
- data/docs/EffectiveAccountSettingsResponse.md +26 -0
- data/docs/EnityHistoryRecord.md +18 -17
- data/docs/EntityActivity.md +22 -0
- data/docs/Error.md +14 -13
- data/docs/ExceptionResponse.md +14 -13
- data/docs/ExceptionResponseContext.md +30 -29
- data/docs/IDPManagementApi.md +692 -0
- data/docs/IdBasedMfaEnrollment.md +26 -0
- data/docs/IdentityCount.md +20 -0
- data/docs/IdentityLimitsUsageRequest.md +42 -0
- data/docs/IdentityLimitsUsageResponse.md +44 -0
- data/docs/IdentityLimitsUsageResponseApikeysPerIdentity.md +20 -0
- data/docs/IdentityLimitsUsageResponseClaimRulesPerGroup.md +20 -0
- data/docs/IdentityLimitsUsageResponseClaimRulesPerProfile.md +20 -0
- data/docs/IdentityLimitsUsageResponseServiceidsPerGroup.md +20 -0
- data/docs/IdentityLimitsUsageResponseTemplateVersionsPerTemplate.md +20 -0
- data/docs/IdentityPreferenceResponse.md +28 -0
- data/docs/IdentityPreferencesApi.md +304 -0
- data/docs/IdentityPreferencesResponse.md +18 -0
- data/docs/Idp.md +38 -0
- data/docs/LimitCount.md +20 -0
- data/docs/ListIdPSettings200Response.md +18 -0
- data/docs/ListIdps200Response.md +18 -0
- data/docs/MFAEnrollmentStatusApi.md +216 -0
- data/docs/MFARequirementsResponse.md +12 -11
- data/docs/MfaEnrollmentTypeStatus.md +20 -0
- data/docs/MfaOptions.md +15 -0
- data/docs/OidcExceptionResponse.md +16 -15
- data/docs/PolicyTemplateReference.md +20 -0
- data/docs/ProfileClaimRule.md +36 -0
- data/docs/ProfileClaimRuleConditions.md +22 -0
- data/docs/ProfileClaimRuleList.md +20 -0
- data/docs/ProfileClaimRuleRequest.md +30 -0
- data/docs/ProfileCount.md +20 -0
- data/docs/ProfileIdentitiesResponse.md +20 -0
- data/docs/ProfileIdentitiesUpdateRequest.md +18 -0
- data/docs/ProfileIdentityRequest.md +24 -0
- data/docs/ProfileIdentityResponse.md +26 -0
- data/docs/ProfileLink.md +32 -0
- data/docs/ProfileLinkLink.md +26 -0
- data/docs/ProfileLinkList.md +18 -0
- data/docs/Report.md +34 -0
- data/docs/ReportMfaEnrollmentStatus.md +28 -0
- data/docs/ReportReference.md +18 -0
- data/docs/ResponseContext.md +28 -27
- data/docs/RetrictActions.md +15 -0
- data/docs/SamlMetadataImportResponse.md +42 -0
- data/docs/ServiceIDGroupsApi.md +347 -0
- data/docs/ServiceIDsApi.md +515 -0
- data/docs/ServiceId.md +38 -33
- data/docs/ServiceIdGroup.md +34 -0
- data/docs/ServiceIdGroupCount.md +20 -0
- data/docs/ServiceIdGroupList.md +18 -0
- data/docs/ServiceIdList.md +20 -19
- data/docs/ShareScope.md +20 -0
- data/docs/TemplateAccountSettings.md +40 -0
- data/docs/TemplateAccountSettingsAllOfRestrictUserDomains.md +20 -0
- data/docs/TemplateAssignmentListResponse.md +30 -0
- data/docs/TemplateAssignmentResource.md +18 -0
- data/docs/TemplateAssignmentResourceError.md +24 -0
- data/docs/TemplateAssignmentResponse.md +48 -0
- data/docs/TemplateAssignmentResponseResource.md +24 -0
- data/docs/TemplateAssignmentResponseResourceDetail.md +26 -0
- data/docs/TemplateCount.md +20 -0
- data/docs/TemplateProfileComponentRequest.md +26 -0
- data/docs/TemplateProfileComponentResponse.md +26 -0
- data/docs/TestResult.md +28 -0
- data/docs/TestResultStepsInner.md +24 -0
- data/docs/TestTriggerResponse.md +20 -0
- data/docs/TokenResponse.md +18 -17
- data/docs/TokenRetrievalApi.md +461 -0
- data/docs/TrustedProfile.md +50 -0
- data/docs/TrustedProfileTemplateApi.md +720 -0
- data/docs/TrustedProfileTemplateAssignmentsApi.md +376 -0
- data/docs/TrustedProfileTemplateClaimRule.md +26 -0
- data/docs/TrustedProfileTemplateList.md +30 -0
- data/docs/TrustedProfileTemplateRequest.md +28 -0
- data/docs/TrustedProfileTemplateResponse.md +48 -0
- data/docs/TrustedProfilesApi.md +1414 -0
- data/docs/TrustedProfilesList.md +30 -0
- data/docs/UpdateAccountIdpSettingRequest.md +22 -0
- data/docs/UpdateAccountLoginSettings.md +18 -0
- data/docs/UpdateApiKeyRequest.md +16 -9
- data/docs/UpdateIdPRequest.md +28 -0
- data/docs/UpdateIdPRequestProperties.md +20 -0
- data/docs/UpdateIdPRequestPropertiesIdp.md +24 -0
- data/docs/UpdateIdPRequestSecrets.md +20 -0
- data/docs/UpdateIdPRequestSecretsIdp.md +20 -0
- data/docs/UpdatePreferenceRequest.md +20 -0
- data/docs/UpdateServiceIdGroupRequest.md +20 -0
- data/docs/UpdateServiceIdRequest.md +12 -11
- data/docs/UpdateTemplateAssignmentRequest.md +18 -0
- data/docs/UpdateTrustedProfileRequest.md +22 -0
- data/docs/UserActivity.md +26 -0
- data/docs/UserMFAResolved.md +24 -0
- data/docs/UserMfa.md +20 -0
- data/docs/UserMfaEnrollments.md +24 -0
- data/docs/UserReportMfaEnrollmentStatus.md +30 -0
- data/docs/UserVisbilityRetrictActions.md +15 -0
- data/docs/UserVisbilityRetrictActionsForTemplate.md +15 -0
- data/git_push.sh +3 -4
- data/ibm_cloud_iam.gemspec +6 -6
- data/lib/ibm_cloud_iam/api/account_limits_api.rb +208 -0
- data/lib/ibm_cloud_iam/api/account_settings_api.rb +262 -0
- data/lib/ibm_cloud_iam/api/account_settings_for_id_p_api.rb +571 -0
- data/lib/ibm_cloud_iam/api/account_settings_template_api.rb +823 -0
- data/lib/ibm_cloud_iam/api/account_settings_template_assignments_api.rb +422 -0
- data/lib/ibm_cloud_iam/api/activities_api.rb +174 -0
- data/lib/ibm_cloud_iam/api/api_keys_api.rb +786 -0
- data/lib/ibm_cloud_iam/api/identity_preferences_api.rb +357 -0
- data/lib/ibm_cloud_iam/api/idp_management_api.rb +744 -0
- data/lib/ibm_cloud_iam/api/mfa_enrollment_status_api.rb +248 -0
- data/lib/ibm_cloud_iam/api/service_id_groups_api.rb +392 -0
- data/lib/ibm_cloud_iam/api/service_ids_api.rb +575 -0
- data/lib/ibm_cloud_iam/api/token_retrieval_api.rb +557 -0
- data/lib/ibm_cloud_iam/api/trusted_profile_template_api.rb +823 -0
- data/lib/ibm_cloud_iam/api/trusted_profile_template_assignments_api.rb +422 -0
- data/lib/ibm_cloud_iam/api/trusted_profiles_api.rb +1630 -0
- data/lib/ibm_cloud_iam/api_client.rb +74 -65
- data/lib/ibm_cloud_iam/api_error.rb +4 -3
- data/lib/ibm_cloud_iam/api_model_base.rb +88 -0
- data/lib/ibm_cloud_iam/configuration.rb +75 -15
- data/lib/ibm_cloud_iam/models/access_group_count.rb +159 -0
- data/lib/ibm_cloud_iam/models/account_based_mfa_enrollment.rb +243 -0
- data/lib/ibm_cloud_iam/models/account_idp_settings.rb +244 -0
- data/lib/ibm_cloud_iam/models/account_login_settings.rb +147 -0
- data/lib/ibm_cloud_iam/models/account_settings_assigned_templates_section.rb +377 -0
- data/lib/ibm_cloud_iam/models/account_settings_effective_section.rb +282 -0
- data/lib/ibm_cloud_iam/models/account_settings_meta.rb +179 -0
- data/lib/ibm_cloud_iam/models/account_settings_request.rb +301 -0
- data/lib/ibm_cloud_iam/models/account_settings_response.rb +567 -0
- data/lib/ibm_cloud_iam/models/account_settings_template_list.rb +256 -0
- data/lib/ibm_cloud_iam/models/account_settings_template_request.rb +178 -0
- data/lib/ibm_cloud_iam/models/account_settings_template_response.rb +416 -0
- data/lib/ibm_cloud_iam/models/account_settings_user_domain_restriction.rb +188 -0
- data/lib/ibm_cloud_iam/models/account_settings_user_mfa_response.rb +261 -0
- data/lib/ibm_cloud_iam/models/action_controls.rb +199 -0
- data/lib/ibm_cloud_iam/models/action_controls_identities.rb +190 -0
- data/lib/ibm_cloud_iam/models/activity.rb +175 -0
- data/lib/ibm_cloud_iam/models/add_account_idp_setting_request.rb +243 -0
- data/lib/ibm_cloud_iam/models/api_key.rb +188 -104
- data/lib/ibm_cloud_iam/models/api_key_inside_create_service_id_request.rb +70 -99
- data/lib/ibm_cloud_iam/models/api_key_list.rb +46 -95
- data/lib/ibm_cloud_iam/models/apikey_activity.rb +231 -0
- data/lib/ibm_cloud_iam/models/apikey_activity_serviceid.rb +159 -0
- data/lib/ibm_cloud_iam/models/apikey_activity_user.rb +179 -0
- data/lib/ibm_cloud_iam/models/assigned_templates_account_settings.rb +296 -0
- data/lib/ibm_cloud_iam/models/common_account_settings_request.rb +272 -0
- data/lib/ibm_cloud_iam/models/common_account_settings_response.rb +260 -0
- data/lib/ibm_cloud_iam/models/consumers_response.rb +158 -0
- data/lib/ibm_cloud_iam/models/consumers_response_consumers_inner.rb +158 -0
- data/lib/ibm_cloud_iam/models/create_api_key_request.rb +92 -99
- data/lib/ibm_cloud_iam/models/create_idp_request.rb +283 -0
- data/lib/ibm_cloud_iam/models/create_idp_request_properties.rb +157 -0
- data/lib/ibm_cloud_iam/models/create_idp_request_properties_idp.rb +189 -0
- data/lib/ibm_cloud_iam/models/create_idp_request_properties_sp.rb +222 -0
- data/lib/ibm_cloud_iam/models/create_idp_request_properties_sp_authn_context.rb +163 -0
- data/lib/ibm_cloud_iam/models/create_idp_request_secrets.rb +157 -0
- data/lib/ibm_cloud_iam/models/create_idp_request_secrets_idp.rb +173 -0
- data/lib/ibm_cloud_iam/models/create_idp_request_secrets_idp_signing_inner.rb +192 -0
- data/lib/ibm_cloud_iam/models/create_idp_request_secrets_sp.rb +151 -0
- data/lib/ibm_cloud_iam/models/create_idp_request_secrets_sp_signing_inner.rb +212 -0
- data/lib/ibm_cloud_iam/models/create_profile_link_request.rb +211 -0
- data/lib/ibm_cloud_iam/models/create_profile_link_request_link.rb +206 -0
- data/lib/ibm_cloud_iam/models/create_service_id_group_request.rb +203 -0
- data/lib/ibm_cloud_iam/models/create_service_id_request.rb +68 -95
- data/lib/ibm_cloud_iam/models/create_template_assignment_request.rb +280 -0
- data/lib/ibm_cloud_iam/models/create_trusted_profile_request.rb +213 -0
- data/lib/ibm_cloud_iam/models/effective_account_settings_response.rb +239 -0
- data/lib/ibm_cloud_iam/models/enity_history_record.rb +112 -101
- data/lib/ibm_cloud_iam/models/entity_activity.rb +185 -0
- data/lib/ibm_cloud_iam/models/error.rb +69 -94
- data/lib/ibm_cloud_iam/models/exception_response.rb +57 -94
- data/lib/ibm_cloud_iam/models/exception_response_context.rb +33 -94
- data/lib/ibm_cloud_iam/models/id_based_mfa_enrollment.rb +270 -0
- data/lib/ibm_cloud_iam/models/identity_count.rb +159 -0
- data/lib/ibm_cloud_iam/models/identity_limits_usage_request.rb +283 -0
- data/lib/ibm_cloud_iam/models/identity_limits_usage_response.rb +265 -0
- data/lib/ibm_cloud_iam/models/identity_limits_usage_response_apikeys_per_identity.rb +178 -0
- data/lib/ibm_cloud_iam/models/identity_limits_usage_response_claim_rules_per_group.rb +178 -0
- data/lib/ibm_cloud_iam/models/identity_limits_usage_response_claim_rules_per_profile.rb +178 -0
- data/lib/ibm_cloud_iam/models/identity_limits_usage_response_serviceids_per_group.rb +178 -0
- data/lib/ibm_cloud_iam/models/identity_limits_usage_response_template_versions_per_template.rb +178 -0
- data/lib/ibm_cloud_iam/models/identity_preference_response.rb +200 -0
- data/lib/ibm_cloud_iam/models/identity_preferences_response.rb +167 -0
- data/lib/ibm_cloud_iam/models/idp.rb +239 -0
- data/lib/ibm_cloud_iam/models/limit_count.rb +176 -0
- data/lib/ibm_cloud_iam/models/list_id_p_settings200_response.rb +149 -0
- data/lib/ibm_cloud_iam/models/list_idps200_response.rb +149 -0
- data/lib/ibm_cloud_iam/models/mfa_enrollment_type_status.rb +192 -0
- data/lib/ibm_cloud_iam/models/mfa_options.rb +45 -0
- data/lib/ibm_cloud_iam/models/mfa_requirements_response.rb +69 -94
- data/lib/ibm_cloud_iam/models/oidc_exception_response.rb +57 -94
- data/lib/ibm_cloud_iam/models/policy_template_reference.rb +193 -0
- data/lib/ibm_cloud_iam/models/profile_claim_rule.rb +342 -0
- data/lib/ibm_cloud_iam/models/profile_claim_rule_conditions.rb +219 -0
- data/lib/ibm_cloud_iam/models/profile_claim_rule_list.rb +176 -0
- data/lib/ibm_cloud_iam/models/profile_claim_rule_request.rb +243 -0
- data/lib/ibm_cloud_iam/models/profile_count.rb +159 -0
- data/lib/ibm_cloud_iam/models/profile_identities_response.rb +160 -0
- data/lib/ibm_cloud_iam/models/profile_identities_update_request.rb +150 -0
- data/lib/ibm_cloud_iam/models/profile_identity_request.rb +238 -0
- data/lib/ibm_cloud_iam/models/profile_identity_response.rb +265 -0
- data/lib/ibm_cloud_iam/models/profile_link.rb +320 -0
- data/lib/ibm_cloud_iam/models/profile_link_link.rb +188 -0
- data/lib/ibm_cloud_iam/models/profile_link_list.rb +167 -0
- data/lib/ibm_cloud_iam/models/report.rb +321 -0
- data/lib/ibm_cloud_iam/models/report_mfa_enrollment_status.rb +268 -0
- data/lib/ibm_cloud_iam/models/report_reference.rb +165 -0
- data/lib/ibm_cloud_iam/models/response_context.rb +33 -94
- data/lib/ibm_cloud_iam/models/retrict_actions.rb +41 -0
- data/lib/ibm_cloud_iam/models/saml_metadata_import_response.rb +494 -0
- data/lib/ibm_cloud_iam/models/service_id.rb +184 -108
- data/lib/ibm_cloud_iam/models/service_id_group.rb +313 -0
- data/lib/ibm_cloud_iam/models/service_id_group_count.rb +159 -0
- data/lib/ibm_cloud_iam/models/service_id_group_list.rb +167 -0
- data/lib/ibm_cloud_iam/models/service_id_list.rb +47 -96
- data/lib/ibm_cloud_iam/models/share_scope.rb +190 -0
- data/lib/ibm_cloud_iam/models/template_account_settings.rb +296 -0
- data/lib/ibm_cloud_iam/models/template_account_settings_all_of_restrict_user_domains.rb +159 -0
- data/lib/ibm_cloud_iam/models/template_assignment_list_response.rb +227 -0
- data/lib/ibm_cloud_iam/models/template_assignment_resource.rb +149 -0
- data/lib/ibm_cloud_iam/models/template_assignment_resource_error.rb +179 -0
- data/lib/ibm_cloud_iam/models/template_assignment_response.rb +506 -0
- data/lib/ibm_cloud_iam/models/template_assignment_response_resource.rb +196 -0
- data/lib/ibm_cloud_iam/models/template_assignment_response_resource_detail.rb +203 -0
- data/lib/ibm_cloud_iam/models/template_count.rb +159 -0
- data/lib/ibm_cloud_iam/models/template_profile_component_request.rb +210 -0
- data/lib/ibm_cloud_iam/models/template_profile_component_response.rb +210 -0
- data/lib/ibm_cloud_iam/models/test_result.rb +194 -0
- data/lib/ibm_cloud_iam/models/test_result_steps_inner.rb +174 -0
- data/lib/ibm_cloud_iam/models/test_trigger_response.rb +156 -0
- data/lib/ibm_cloud_iam/models/token_response.rb +34 -105
- data/lib/ibm_cloud_iam/models/trusted_profile.rb +411 -0
- data/lib/ibm_cloud_iam/models/trusted_profile_template_claim_rule.rb +248 -0
- data/lib/ibm_cloud_iam/models/trusted_profile_template_list.rb +256 -0
- data/lib/ibm_cloud_iam/models/trusted_profile_template_request.rb +199 -0
- data/lib/ibm_cloud_iam/models/trusted_profile_template_response.rb +369 -0
- data/lib/ibm_cloud_iam/models/trusted_profiles_list.rb +227 -0
- data/lib/ibm_cloud_iam/models/update_account_idp_setting_request.rb +202 -0
- data/lib/ibm_cloud_iam/models/update_account_login_settings.rb +148 -0
- data/lib/ibm_cloud_iam/models/update_api_key_request.rb +68 -99
- data/lib/ibm_cloud_iam/models/update_id_p_request.rb +198 -0
- data/lib/ibm_cloud_iam/models/update_id_p_request_properties.rb +157 -0
- data/lib/ibm_cloud_iam/models/update_id_p_request_properties_idp.rb +179 -0
- data/lib/ibm_cloud_iam/models/update_id_p_request_secrets.rb +157 -0
- data/lib/ibm_cloud_iam/models/update_id_p_request_secrets_idp.rb +163 -0
- data/lib/ibm_cloud_iam/models/update_preference_request.rb +161 -0
- data/lib/ibm_cloud_iam/models/update_service_id_group_request.rb +176 -0
- data/lib/ibm_cloud_iam/models/update_service_id_request.rb +34 -95
- data/lib/ibm_cloud_iam/models/update_template_assignment_request.rb +175 -0
- data/lib/ibm_cloud_iam/models/update_trusted_profile_request.rb +169 -0
- data/lib/ibm_cloud_iam/models/user_activity.rb +222 -0
- data/lib/ibm_cloud_iam/models/user_mfa.rb +179 -0
- data/lib/ibm_cloud_iam/models/user_mfa_enrollments.rb +193 -0
- data/lib/ibm_cloud_iam/models/user_mfa_resolved.rb +178 -0
- data/lib/ibm_cloud_iam/models/user_report_mfa_enrollment_status.rb +291 -0
- data/lib/ibm_cloud_iam/models/user_visbility_retrict_actions.rb +40 -0
- data/lib/ibm_cloud_iam/models/user_visbility_retrict_actions_for_template.rb +41 -0
- data/lib/ibm_cloud_iam/version.rb +4 -4
- data/lib/ibm_cloud_iam.rb +140 -9
- data/spec/api/account_limits_api_spec.rb +75 -0
- data/spec/api/account_settings_api_spec.rb +80 -0
- data/spec/api/account_settings_for_id_p_api_spec.rb +132 -0
- data/spec/api/account_settings_template_api_spec.rb +184 -0
- data/spec/api/account_settings_template_assignments_api_spec.rb +112 -0
- data/spec/api/activities_api_spec.rb +64 -0
- data/spec/api/api_keys_api_spec.rb +182 -0
- data/spec/api/identity_preferences_api_spec.rb +98 -0
- data/spec/api/idp_management_api_spec.rb +166 -0
- data/spec/api/mfa_enrollment_status_api_spec.rb +77 -0
- data/spec/api/service_id_groups_api_spec.rb +102 -0
- data/spec/api/service_ids_api_spec.rb +143 -0
- data/spec/api/token_retrieval_api_spec.rb +134 -0
- data/spec/api/trusted_profile_template_api_spec.rb +184 -0
- data/spec/api/trusted_profile_template_assignments_api_spec.rb +112 -0
- data/spec/api/trusted_profiles_api_spec.rb +328 -0
- data/spec/models/access_group_count_spec.rb +42 -0
- data/spec/models/account_based_mfa_enrollment_spec.rb +54 -0
- data/spec/models/account_idp_settings_spec.rb +82 -0
- data/spec/models/account_login_settings_spec.rb +36 -0
- data/spec/models/account_settings_assigned_templates_section_spec.rb +120 -0
- data/spec/models/account_settings_effective_section_spec.rb +96 -0
- data/spec/models/account_settings_meta_spec.rb +54 -0
- data/spec/models/account_settings_request_spec.rb +102 -0
- data/spec/models/account_settings_response_spec.rb +126 -0
- data/spec/models/account_settings_template_list_spec.rb +72 -0
- data/spec/models/account_settings_template_request_spec.rb +54 -0
- data/spec/models/account_settings_template_response_spec.rb +114 -0
- data/spec/models/account_settings_user_domain_restriction_spec.rb +48 -0
- data/spec/models/account_settings_user_mfa_response_spec.rb +66 -0
- data/spec/models/action_controls_identities_spec.rb +42 -0
- data/spec/models/action_controls_spec.rb +48 -0
- data/spec/models/activity_spec.rb +42 -0
- data/spec/models/add_account_idp_setting_request_spec.rb +52 -0
- data/spec/models/api_key_inside_create_service_id_request_spec.rb +24 -17
- data/spec/models/api_key_list_spec.rb +15 -20
- data/spec/models/api_key_spec.rb +52 -27
- data/spec/models/apikey_activity_serviceid_spec.rb +42 -0
- data/spec/models/apikey_activity_spec.rb +66 -0
- data/spec/models/apikey_activity_user_spec.rb +54 -0
- data/spec/models/assigned_templates_account_settings_spec.rb +102 -0
- data/spec/models/common_account_settings_request_spec.rb +90 -0
- data/spec/models/common_account_settings_response_spec.rb +84 -0
- data/spec/models/consumers_response_consumers_inner_spec.rb +42 -0
- data/spec/models/consumers_response_spec.rb +42 -0
- data/spec/models/create_api_key_request_spec.rb +32 -19
- data/spec/models/create_idp_request_properties_idp_spec.rb +60 -0
- data/spec/models/create_idp_request_properties_sp_authn_context_spec.rb +42 -0
- data/spec/models/create_idp_request_properties_sp_spec.rb +78 -0
- data/spec/models/create_idp_request_properties_spec.rb +42 -0
- data/spec/models/create_idp_request_secrets_idp_signing_inner_spec.rb +46 -0
- data/spec/models/create_idp_request_secrets_idp_spec.rb +48 -0
- data/spec/models/create_idp_request_secrets_sp_signing_inner_spec.rb +58 -0
- data/spec/models/create_idp_request_secrets_sp_spec.rb +36 -0
- data/spec/models/create_idp_request_secrets_spec.rb +42 -0
- data/spec/models/create_idp_request_spec.rb +76 -0
- data/spec/models/create_profile_link_request_link_spec.rb +60 -0
- data/spec/models/create_profile_link_request_spec.rb +54 -0
- data/spec/models/create_service_id_group_request_spec.rb +48 -0
- data/spec/models/create_service_id_request_spec.rb +19 -18
- data/spec/models/create_template_assignment_request_spec.rb +58 -0
- data/spec/models/create_trusted_profile_request_spec.rb +54 -0
- data/spec/models/effective_account_settings_response_spec.rb +60 -0
- data/spec/models/enity_history_record_spec.rb +14 -19
- data/spec/models/entity_activity_spec.rb +48 -0
- data/spec/models/error_spec.rb +12 -17
- data/spec/models/exception_response_context_spec.rb +20 -25
- data/spec/models/exception_response_spec.rb +12 -17
- data/spec/models/id_based_mfa_enrollment_spec.rb +64 -0
- data/spec/models/identity_count_spec.rb +42 -0
- data/spec/models/identity_limits_usage_request_spec.rb +108 -0
- data/spec/models/identity_limits_usage_response_apikeys_per_identity_spec.rb +42 -0
- data/spec/models/identity_limits_usage_response_claim_rules_per_group_spec.rb +42 -0
- data/spec/models/identity_limits_usage_response_claim_rules_per_profile_spec.rb +42 -0
- data/spec/models/identity_limits_usage_response_serviceids_per_group_spec.rb +42 -0
- data/spec/models/identity_limits_usage_response_spec.rb +114 -0
- data/spec/models/identity_limits_usage_response_template_versions_per_template_spec.rb +42 -0
- data/spec/models/identity_preference_response_spec.rb +66 -0
- data/spec/models/identity_preferences_response_spec.rb +36 -0
- data/spec/models/idp_spec.rb +96 -0
- data/spec/models/limit_count_spec.rb +42 -0
- data/spec/models/list_id_p_settings200_response_spec.rb +36 -0
- data/spec/models/list_idps200_response_spec.rb +36 -0
- data/spec/models/mfa_enrollment_type_status_spec.rb +42 -0
- data/spec/models/mfa_options_spec.rb +30 -0
- data/spec/models/mfa_requirements_response_spec.rb +11 -16
- data/spec/models/oidc_exception_response_spec.rb +13 -18
- data/spec/models/policy_template_reference_spec.rb +42 -0
- data/spec/models/profile_claim_rule_conditions_spec.rb +48 -0
- data/spec/models/profile_claim_rule_list_spec.rb +42 -0
- data/spec/models/profile_claim_rule_request_spec.rb +72 -0
- data/spec/models/profile_claim_rule_spec.rb +90 -0
- data/spec/models/profile_count_spec.rb +42 -0
- data/spec/models/profile_identities_response_spec.rb +42 -0
- data/spec/models/profile_identities_update_request_spec.rb +36 -0
- data/spec/models/profile_identity_request_spec.rb +58 -0
- data/spec/models/profile_identity_response_spec.rb +64 -0
- data/spec/models/profile_link_link_spec.rb +60 -0
- data/spec/models/profile_link_list_spec.rb +36 -0
- data/spec/models/profile_link_spec.rb +78 -0
- data/spec/models/report_mfa_enrollment_status_spec.rb +66 -0
- data/spec/models/report_reference_spec.rb +36 -0
- data/spec/models/report_spec.rb +84 -0
- data/spec/models/response_context_spec.rb +19 -24
- data/spec/models/retrict_actions_spec.rb +30 -0
- data/spec/models/saml_metadata_import_response_spec.rb +112 -0
- data/spec/models/service_id_group_count_spec.rb +42 -0
- data/spec/models/service_id_group_list_spec.rb +36 -0
- data/spec/models/service_id_group_spec.rb +84 -0
- data/spec/models/service_id_list_spec.rb +15 -20
- data/spec/models/service_id_spec.rb +34 -27
- data/spec/models/share_scope_spec.rb +46 -0
- data/spec/models/template_account_settings_all_of_restrict_user_domains_spec.rb +42 -0
- data/spec/models/template_account_settings_spec.rb +102 -0
- data/spec/models/template_assignment_list_response_spec.rb +72 -0
- data/spec/models/template_assignment_resource_error_spec.rb +54 -0
- data/spec/models/template_assignment_resource_spec.rb +36 -0
- data/spec/models/template_assignment_response_resource_detail_spec.rb +60 -0
- data/spec/models/template_assignment_response_resource_spec.rb +54 -0
- data/spec/models/template_assignment_response_spec.rb +126 -0
- data/spec/models/template_count_spec.rb +42 -0
- data/spec/models/template_profile_component_request_spec.rb +60 -0
- data/spec/models/template_profile_component_response_spec.rb +60 -0
- data/spec/models/test_result_spec.rb +66 -0
- data/spec/models/test_result_steps_inner_spec.rb +54 -0
- data/spec/models/test_trigger_response_spec.rb +42 -0
- data/spec/models/token_response_spec.rb +14 -19
- data/spec/models/trusted_profile_spec.rb +132 -0
- data/spec/models/trusted_profile_template_claim_rule_spec.rb +64 -0
- data/spec/models/trusted_profile_template_list_spec.rb +72 -0
- data/spec/models/trusted_profile_template_request_spec.rb +66 -0
- data/spec/models/trusted_profile_template_response_spec.rb +126 -0
- data/spec/models/trusted_profiles_list_spec.rb +72 -0
- data/spec/models/update_account_idp_setting_request_spec.rb +52 -0
- data/spec/models/update_account_login_settings_spec.rb +36 -0
- data/spec/models/update_api_key_request_spec.rb +28 -15
- data/spec/models/update_id_p_request_properties_idp_spec.rb +54 -0
- data/spec/models/update_id_p_request_properties_spec.rb +42 -0
- data/spec/models/update_id_p_request_secrets_idp_spec.rb +42 -0
- data/spec/models/update_id_p_request_secrets_spec.rb +42 -0
- data/spec/models/update_id_p_request_spec.rb +66 -0
- data/spec/models/update_preference_request_spec.rb +42 -0
- data/spec/models/update_service_id_group_request_spec.rb +42 -0
- data/spec/models/update_service_id_request_spec.rb +11 -16
- data/spec/models/update_template_assignment_request_spec.rb +36 -0
- data/spec/models/update_trusted_profile_request_spec.rb +48 -0
- data/spec/models/user_activity_spec.rb +60 -0
- data/spec/models/user_mfa_enrollments_spec.rb +54 -0
- data/spec/models/user_mfa_resolved_spec.rb +54 -0
- data/spec/models/user_mfa_spec.rb +42 -0
- data/spec/models/user_report_mfa_enrollment_status_spec.rb +72 -0
- data/spec/models/user_visbility_retrict_actions_for_template_spec.rb +30 -0
- data/spec/models/user_visbility_retrict_actions_spec.rb +30 -0
- data/spec/spec_helper.rb +3 -3
- metadata +549 -35
- data/docs/IdentityOperationsApi.md +0 -828
- data/docs/InlineObject.md +0 -19
- data/docs/InlineObject1.md +0 -23
- data/docs/InlineObject2.md +0 -21
- data/docs/InlineObject3.md +0 -25
- data/docs/TokenOperationsApi.md +0 -226
- data/lib/ibm_cloud_iam/api/identity_operations_api.rb +0 -1083
- data/lib/ibm_cloud_iam/api/token_operations_api.rb +0 -351
- data/lib/ibm_cloud_iam/models/inline_object.rb +0 -229
- data/lib/ibm_cloud_iam/models/inline_object1.rb +0 -254
- data/lib/ibm_cloud_iam/models/inline_object2.rb +0 -244
- data/lib/ibm_cloud_iam/models/inline_object3.rb +0 -269
- data/spec/api/identity_operations_api_spec.rb +0 -253
- data/spec/api/token_operations_api_spec.rb +0 -94
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/inline_object1_spec.rb +0 -59
- data/spec/models/inline_object2_spec.rb +0 -53
- data/spec/models/inline_object3_spec.rb +0 -65
- data/spec/models/inline_object_spec.rb +0 -47
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#IAM Identity Services API
|
|
3
|
-
|
|
4
|
-
#The IAM Identity Service API allows for the management of Identities (Service IDs, ApiKeys).
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0.0
|
|
7
|
-
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.0.0-beta2
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'cgi'
|
|
14
|
-
|
|
15
|
-
module IbmCloudIam
|
|
16
|
-
class TokenOperationsApi
|
|
17
|
-
attr_accessor :api_client
|
|
18
|
-
|
|
19
|
-
def initialize(api_client = ApiClient.default)
|
|
20
|
-
@api_client = api_client
|
|
21
|
-
end
|
|
22
|
-
# Create an IAM access token for a user or service ID using an API key
|
|
23
|
-
# Creates a non-opaque access token for an API key.
|
|
24
|
-
# @param grant_type [String] Grant type for this API call. You must set the grant type to `urn:ibm:params:oauth:grant-type:apikey`.
|
|
25
|
-
# @param apikey [String] The value of the api key
|
|
26
|
-
# @param [Hash] opts the optional parameters
|
|
27
|
-
# @return [TokenResponse]
|
|
28
|
-
def get_token_api_key(grant_type, apikey, opts = {})
|
|
29
|
-
data, _status_code, _headers = get_token_api_key_with_http_info(grant_type, apikey, opts)
|
|
30
|
-
data
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# Create an IAM access token for a user or service ID using an API key
|
|
34
|
-
# Creates a non-opaque access token for an API key.
|
|
35
|
-
# @param grant_type [String] Grant type for this API call. You must set the grant type to `urn:ibm:params:oauth:grant-type:apikey`.
|
|
36
|
-
# @param apikey [String] The value of the api key
|
|
37
|
-
# @param [Hash] opts the optional parameters
|
|
38
|
-
# @return [Array<(TokenResponse, Integer, Hash)>] TokenResponse data, response status code and response headers
|
|
39
|
-
def get_token_api_key_with_http_info(grant_type, apikey, opts = {})
|
|
40
|
-
if @api_client.config.debugging
|
|
41
|
-
@api_client.config.logger.debug 'Calling API: TokenOperationsApi.get_token_api_key ...'
|
|
42
|
-
end
|
|
43
|
-
# verify the required parameter 'grant_type' is set
|
|
44
|
-
if @api_client.config.client_side_validation && grant_type.nil?
|
|
45
|
-
fail ArgumentError, "Missing the required parameter 'grant_type' when calling TokenOperationsApi.get_token_api_key"
|
|
46
|
-
end
|
|
47
|
-
# verify the required parameter 'apikey' is set
|
|
48
|
-
if @api_client.config.client_side_validation && apikey.nil?
|
|
49
|
-
fail ArgumentError, "Missing the required parameter 'apikey' when calling TokenOperationsApi.get_token_api_key"
|
|
50
|
-
end
|
|
51
|
-
# resource path
|
|
52
|
-
local_var_path = '/identity/token#apikey'
|
|
53
|
-
|
|
54
|
-
# query parameters
|
|
55
|
-
query_params = opts[:query_params] || {}
|
|
56
|
-
|
|
57
|
-
# header parameters
|
|
58
|
-
header_params = opts[:header_params] || {}
|
|
59
|
-
# HTTP header 'Accept' (if needed)
|
|
60
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
61
|
-
# HTTP header 'Content-Type'
|
|
62
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
63
|
-
|
|
64
|
-
# form parameters
|
|
65
|
-
form_params = opts[:form_params] || {}
|
|
66
|
-
form_params['grant_type'] = grant_type
|
|
67
|
-
form_params['apikey'] = apikey
|
|
68
|
-
|
|
69
|
-
# http body (model)
|
|
70
|
-
post_body = opts[:body]
|
|
71
|
-
|
|
72
|
-
# return_type
|
|
73
|
-
return_type = opts[:return_type] || 'TokenResponse'
|
|
74
|
-
|
|
75
|
-
# auth_names
|
|
76
|
-
auth_names = opts[:auth_names] || []
|
|
77
|
-
|
|
78
|
-
new_options = opts.merge(
|
|
79
|
-
:header_params => header_params,
|
|
80
|
-
:query_params => query_params,
|
|
81
|
-
:form_params => form_params,
|
|
82
|
-
:body => post_body,
|
|
83
|
-
:auth_names => auth_names,
|
|
84
|
-
:return_type => return_type
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
88
|
-
if @api_client.config.debugging
|
|
89
|
-
@api_client.config.logger.debug "API called: TokenOperationsApi#get_token_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
90
|
-
end
|
|
91
|
-
return data, status_code, headers
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
# Create an IAM access token and delegated refresh token for a user or service ID
|
|
95
|
-
# Creates a non-opaque access token and a delegated refresh token for an API key.
|
|
96
|
-
# @param grant_type [String] Grant type for this API call. You must set the grant type to `urn:ibm:params:oauth:grant-type:apikey`.
|
|
97
|
-
# @param apikey [String] The value of the API key.
|
|
98
|
-
# @param response_type [String] Either 'delegated_refresh_token' to receive a delegated refresh token only, or 'cloud_iam delegated_refresh_token' to receive both an IAM access token and a delegated refresh token in one API call.
|
|
99
|
-
# @param receiver_client_ids [String] A comma separated list of one or more client IDs that will be able to consume the delegated refresh token. The service that accepts a delegated refresh token as API parameter must expose its client ID to allow this API call. The receiver of the delegated refresh token will be able to use the refresh token until it expires.
|
|
100
|
-
# @param [Hash] opts the optional parameters
|
|
101
|
-
# @option opts [Integer] :delegated_refresh_token_expiry Expiration in seconds until the delegated refresh token must be consumed by the receiver client IDs. After the expiration, no client ID can consume the delegated refresh token, even if the life time of the refresh token inside is still not expired. The default, if not specified, is 518,400 seconds which corresponds to 6 days.
|
|
102
|
-
# @return [TokenResponse]
|
|
103
|
-
def get_token_api_key_delegated_refresh_token(grant_type, apikey, response_type, receiver_client_ids, opts = {})
|
|
104
|
-
data, _status_code, _headers = get_token_api_key_delegated_refresh_token_with_http_info(grant_type, apikey, response_type, receiver_client_ids, opts)
|
|
105
|
-
data
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
# Create an IAM access token and delegated refresh token for a user or service ID
|
|
109
|
-
# Creates a non-opaque access token and a delegated refresh token for an API key.
|
|
110
|
-
# @param grant_type [String] Grant type for this API call. You must set the grant type to `urn:ibm:params:oauth:grant-type:apikey`.
|
|
111
|
-
# @param apikey [String] The value of the API key.
|
|
112
|
-
# @param response_type [String] Either 'delegated_refresh_token' to receive a delegated refresh token only, or 'cloud_iam delegated_refresh_token' to receive both an IAM access token and a delegated refresh token in one API call.
|
|
113
|
-
# @param receiver_client_ids [String] A comma separated list of one or more client IDs that will be able to consume the delegated refresh token. The service that accepts a delegated refresh token as API parameter must expose its client ID to allow this API call. The receiver of the delegated refresh token will be able to use the refresh token until it expires.
|
|
114
|
-
# @param [Hash] opts the optional parameters
|
|
115
|
-
# @option opts [Integer] :delegated_refresh_token_expiry Expiration in seconds until the delegated refresh token must be consumed by the receiver client IDs. After the expiration, no client ID can consume the delegated refresh token, even if the life time of the refresh token inside is still not expired. The default, if not specified, is 518,400 seconds which corresponds to 6 days.
|
|
116
|
-
# @return [Array<(TokenResponse, Integer, Hash)>] TokenResponse data, response status code and response headers
|
|
117
|
-
def get_token_api_key_delegated_refresh_token_with_http_info(grant_type, apikey, response_type, receiver_client_ids, opts = {})
|
|
118
|
-
if @api_client.config.debugging
|
|
119
|
-
@api_client.config.logger.debug 'Calling API: TokenOperationsApi.get_token_api_key_delegated_refresh_token ...'
|
|
120
|
-
end
|
|
121
|
-
# verify the required parameter 'grant_type' is set
|
|
122
|
-
if @api_client.config.client_side_validation && grant_type.nil?
|
|
123
|
-
fail ArgumentError, "Missing the required parameter 'grant_type' when calling TokenOperationsApi.get_token_api_key_delegated_refresh_token"
|
|
124
|
-
end
|
|
125
|
-
# verify the required parameter 'apikey' is set
|
|
126
|
-
if @api_client.config.client_side_validation && apikey.nil?
|
|
127
|
-
fail ArgumentError, "Missing the required parameter 'apikey' when calling TokenOperationsApi.get_token_api_key_delegated_refresh_token"
|
|
128
|
-
end
|
|
129
|
-
# verify the required parameter 'response_type' is set
|
|
130
|
-
if @api_client.config.client_side_validation && response_type.nil?
|
|
131
|
-
fail ArgumentError, "Missing the required parameter 'response_type' when calling TokenOperationsApi.get_token_api_key_delegated_refresh_token"
|
|
132
|
-
end
|
|
133
|
-
# verify the required parameter 'receiver_client_ids' is set
|
|
134
|
-
if @api_client.config.client_side_validation && receiver_client_ids.nil?
|
|
135
|
-
fail ArgumentError, "Missing the required parameter 'receiver_client_ids' when calling TokenOperationsApi.get_token_api_key_delegated_refresh_token"
|
|
136
|
-
end
|
|
137
|
-
# resource path
|
|
138
|
-
local_var_path = '/identity/token#apikey-delegated-refresh-token'
|
|
139
|
-
|
|
140
|
-
# query parameters
|
|
141
|
-
query_params = opts[:query_params] || {}
|
|
142
|
-
|
|
143
|
-
# header parameters
|
|
144
|
-
header_params = opts[:header_params] || {}
|
|
145
|
-
# HTTP header 'Accept' (if needed)
|
|
146
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
147
|
-
# HTTP header 'Content-Type'
|
|
148
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
149
|
-
|
|
150
|
-
# form parameters
|
|
151
|
-
form_params = opts[:form_params] || {}
|
|
152
|
-
form_params['grant_type'] = grant_type
|
|
153
|
-
form_params['apikey'] = apikey
|
|
154
|
-
form_params['response_type'] = response_type
|
|
155
|
-
form_params['receiver_client_ids'] = receiver_client_ids
|
|
156
|
-
form_params['delegated_refresh_token_expiry'] = opts[:'delegated_refresh_token_expiry'] if !opts[:'delegated_refresh_token_expiry'].nil?
|
|
157
|
-
|
|
158
|
-
# http body (model)
|
|
159
|
-
post_body = opts[:body]
|
|
160
|
-
|
|
161
|
-
# return_type
|
|
162
|
-
return_type = opts[:return_type] || 'TokenResponse'
|
|
163
|
-
|
|
164
|
-
# auth_names
|
|
165
|
-
auth_names = opts[:auth_names] || []
|
|
166
|
-
|
|
167
|
-
new_options = opts.merge(
|
|
168
|
-
:header_params => header_params,
|
|
169
|
-
:query_params => query_params,
|
|
170
|
-
:form_params => form_params,
|
|
171
|
-
:body => post_body,
|
|
172
|
-
:auth_names => auth_names,
|
|
173
|
-
:return_type => return_type
|
|
174
|
-
)
|
|
175
|
-
|
|
176
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
177
|
-
if @api_client.config.debugging
|
|
178
|
-
@api_client.config.logger.debug "API called: TokenOperationsApi#get_token_api_key_delegated_refresh_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
179
|
-
end
|
|
180
|
-
return data, status_code, headers
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# Create an IAM access token based on an authorization policy
|
|
184
|
-
# Creates a non-opaque access token, if an appropriate authorization policy is in place. This kind of IAM access token is typically used for access between services.
|
|
185
|
-
# @param grant_type [String] Grant type for this API call. You must set the grant type to `urn:ibm:params:oauth:grant-type:iam-authz`.
|
|
186
|
-
# @param access_token [String] The IAM access token of the identity that has the appropriate authorization to create an IAM access token for a given resource.
|
|
187
|
-
# @param desired_iam_id [String] The IAM ID of the IAM access token identity that should be created. The desired_iam_id identifies a resource identity. The IAM ID consists of the prefix crn- and the CRN of the target identity, e.g. crn-crn:v1:bluemix:public:cloud-object-storage:global:a/59bcbfa6ea2f006b4ed7094c1a08dcdd:1a0ec336-f391-4091-a6fb-5e084a4c56f4::.
|
|
188
|
-
# @param [Hash] opts the optional parameters
|
|
189
|
-
# @return [TokenResponse]
|
|
190
|
-
def get_token_iam_authz(grant_type, access_token, desired_iam_id, opts = {})
|
|
191
|
-
data, _status_code, _headers = get_token_iam_authz_with_http_info(grant_type, access_token, desired_iam_id, opts)
|
|
192
|
-
data
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
# Create an IAM access token based on an authorization policy
|
|
196
|
-
# Creates a non-opaque access token, if an appropriate authorization policy is in place. This kind of IAM access token is typically used for access between services.
|
|
197
|
-
# @param grant_type [String] Grant type for this API call. You must set the grant type to `urn:ibm:params:oauth:grant-type:iam-authz`.
|
|
198
|
-
# @param access_token [String] The IAM access token of the identity that has the appropriate authorization to create an IAM access token for a given resource.
|
|
199
|
-
# @param desired_iam_id [String] The IAM ID of the IAM access token identity that should be created. The desired_iam_id identifies a resource identity. The IAM ID consists of the prefix crn- and the CRN of the target identity, e.g. crn-crn:v1:bluemix:public:cloud-object-storage:global:a/59bcbfa6ea2f006b4ed7094c1a08dcdd:1a0ec336-f391-4091-a6fb-5e084a4c56f4::.
|
|
200
|
-
# @param [Hash] opts the optional parameters
|
|
201
|
-
# @return [Array<(TokenResponse, Integer, Hash)>] TokenResponse data, response status code and response headers
|
|
202
|
-
def get_token_iam_authz_with_http_info(grant_type, access_token, desired_iam_id, opts = {})
|
|
203
|
-
if @api_client.config.debugging
|
|
204
|
-
@api_client.config.logger.debug 'Calling API: TokenOperationsApi.get_token_iam_authz ...'
|
|
205
|
-
end
|
|
206
|
-
# verify the required parameter 'grant_type' is set
|
|
207
|
-
if @api_client.config.client_side_validation && grant_type.nil?
|
|
208
|
-
fail ArgumentError, "Missing the required parameter 'grant_type' when calling TokenOperationsApi.get_token_iam_authz"
|
|
209
|
-
end
|
|
210
|
-
# verify the required parameter 'access_token' is set
|
|
211
|
-
if @api_client.config.client_side_validation && access_token.nil?
|
|
212
|
-
fail ArgumentError, "Missing the required parameter 'access_token' when calling TokenOperationsApi.get_token_iam_authz"
|
|
213
|
-
end
|
|
214
|
-
# verify the required parameter 'desired_iam_id' is set
|
|
215
|
-
if @api_client.config.client_side_validation && desired_iam_id.nil?
|
|
216
|
-
fail ArgumentError, "Missing the required parameter 'desired_iam_id' when calling TokenOperationsApi.get_token_iam_authz"
|
|
217
|
-
end
|
|
218
|
-
# resource path
|
|
219
|
-
local_var_path = '/identity/token#iam-authz'
|
|
220
|
-
|
|
221
|
-
# query parameters
|
|
222
|
-
query_params = opts[:query_params] || {}
|
|
223
|
-
|
|
224
|
-
# header parameters
|
|
225
|
-
header_params = opts[:header_params] || {}
|
|
226
|
-
# HTTP header 'Accept' (if needed)
|
|
227
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
228
|
-
# HTTP header 'Content-Type'
|
|
229
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
230
|
-
|
|
231
|
-
# form parameters
|
|
232
|
-
form_params = opts[:form_params] || {}
|
|
233
|
-
form_params['grant_type'] = grant_type
|
|
234
|
-
form_params['access_token'] = access_token
|
|
235
|
-
form_params['desired_iam_id'] = desired_iam_id
|
|
236
|
-
|
|
237
|
-
# http body (model)
|
|
238
|
-
post_body = opts[:body]
|
|
239
|
-
|
|
240
|
-
# return_type
|
|
241
|
-
return_type = opts[:return_type] || 'TokenResponse'
|
|
242
|
-
|
|
243
|
-
# auth_names
|
|
244
|
-
auth_names = opts[:auth_names] || []
|
|
245
|
-
|
|
246
|
-
new_options = opts.merge(
|
|
247
|
-
:header_params => header_params,
|
|
248
|
-
:query_params => query_params,
|
|
249
|
-
:form_params => form_params,
|
|
250
|
-
:body => post_body,
|
|
251
|
-
:auth_names => auth_names,
|
|
252
|
-
:return_type => return_type
|
|
253
|
-
)
|
|
254
|
-
|
|
255
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
256
|
-
if @api_client.config.debugging
|
|
257
|
-
@api_client.config.logger.debug "API called: TokenOperationsApi#get_token_iam_authz\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
258
|
-
end
|
|
259
|
-
return data, status_code, headers
|
|
260
|
-
end
|
|
261
|
-
|
|
262
|
-
# Create an IAM access token for a user using username / password credentials and an optional account identifier
|
|
263
|
-
# Creates a non-opaque access token for a username and password. To be able to call IBM Cloud APIs, the token must be made account-specific. For this purpose, also pass the 32 character long identifier for your account in the API call. This API call is possible only for non-federated IBMid users.
|
|
264
|
-
# @param authorization [String] Basic Authorization Header containing a valid client ID and secret. If this header is omitted the request fails with BXNIM0308E: 'No authorization header found'. You can use the client ID and secret that is used by the IBM Cloud CLI: `bx / bx`
|
|
265
|
-
# @param grant_type [String] Grant type for this API call. You must set the grant type to `password`.
|
|
266
|
-
# @param username [String] The value of the username
|
|
267
|
-
# @param password [String] The value of the password
|
|
268
|
-
# @param [Hash] opts the optional parameters
|
|
269
|
-
# @option opts [String] :account The 32 character identifier of the account. Specify this parameter to get an account-specific IAM token. IBM Cloud APIs require that IAM tokens are account-specific.
|
|
270
|
-
# @return [TokenResponse]
|
|
271
|
-
def get_token_password(authorization, grant_type, username, password, opts = {})
|
|
272
|
-
data, _status_code, _headers = get_token_password_with_http_info(authorization, grant_type, username, password, opts)
|
|
273
|
-
data
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
# Create an IAM access token for a user using username / password credentials and an optional account identifier
|
|
277
|
-
# Creates a non-opaque access token for a username and password. To be able to call IBM Cloud APIs, the token must be made account-specific. For this purpose, also pass the 32 character long identifier for your account in the API call. This API call is possible only for non-federated IBMid users.
|
|
278
|
-
# @param authorization [String] Basic Authorization Header containing a valid client ID and secret. If this header is omitted the request fails with BXNIM0308E: 'No authorization header found'. You can use the client ID and secret that is used by the IBM Cloud CLI: `bx / bx`
|
|
279
|
-
# @param grant_type [String] Grant type for this API call. You must set the grant type to `password`.
|
|
280
|
-
# @param username [String] The value of the username
|
|
281
|
-
# @param password [String] The value of the password
|
|
282
|
-
# @param [Hash] opts the optional parameters
|
|
283
|
-
# @option opts [String] :account The 32 character identifier of the account. Specify this parameter to get an account-specific IAM token. IBM Cloud APIs require that IAM tokens are account-specific.
|
|
284
|
-
# @return [Array<(TokenResponse, Integer, Hash)>] TokenResponse data, response status code and response headers
|
|
285
|
-
def get_token_password_with_http_info(authorization, grant_type, username, password, opts = {})
|
|
286
|
-
if @api_client.config.debugging
|
|
287
|
-
@api_client.config.logger.debug 'Calling API: TokenOperationsApi.get_token_password ...'
|
|
288
|
-
end
|
|
289
|
-
# verify the required parameter 'authorization' is set
|
|
290
|
-
if @api_client.config.client_side_validation && authorization.nil?
|
|
291
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling TokenOperationsApi.get_token_password"
|
|
292
|
-
end
|
|
293
|
-
# verify the required parameter 'grant_type' is set
|
|
294
|
-
if @api_client.config.client_side_validation && grant_type.nil?
|
|
295
|
-
fail ArgumentError, "Missing the required parameter 'grant_type' when calling TokenOperationsApi.get_token_password"
|
|
296
|
-
end
|
|
297
|
-
# verify the required parameter 'username' is set
|
|
298
|
-
if @api_client.config.client_side_validation && username.nil?
|
|
299
|
-
fail ArgumentError, "Missing the required parameter 'username' when calling TokenOperationsApi.get_token_password"
|
|
300
|
-
end
|
|
301
|
-
# verify the required parameter 'password' is set
|
|
302
|
-
if @api_client.config.client_side_validation && password.nil?
|
|
303
|
-
fail ArgumentError, "Missing the required parameter 'password' when calling TokenOperationsApi.get_token_password"
|
|
304
|
-
end
|
|
305
|
-
# resource path
|
|
306
|
-
local_var_path = '/identity/token#password'
|
|
307
|
-
|
|
308
|
-
# query parameters
|
|
309
|
-
query_params = opts[:query_params] || {}
|
|
310
|
-
|
|
311
|
-
# header parameters
|
|
312
|
-
header_params = opts[:header_params] || {}
|
|
313
|
-
# HTTP header 'Accept' (if needed)
|
|
314
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
315
|
-
# HTTP header 'Content-Type'
|
|
316
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
317
|
-
header_params[:'Authorization'] = authorization
|
|
318
|
-
|
|
319
|
-
# form parameters
|
|
320
|
-
form_params = opts[:form_params] || {}
|
|
321
|
-
form_params['grant_type'] = grant_type
|
|
322
|
-
form_params['username'] = username
|
|
323
|
-
form_params['password'] = password
|
|
324
|
-
form_params['account'] = opts[:'account'] if !opts[:'account'].nil?
|
|
325
|
-
|
|
326
|
-
# http body (model)
|
|
327
|
-
post_body = opts[:body]
|
|
328
|
-
|
|
329
|
-
# return_type
|
|
330
|
-
return_type = opts[:return_type] || 'TokenResponse'
|
|
331
|
-
|
|
332
|
-
# auth_names
|
|
333
|
-
auth_names = opts[:auth_names] || []
|
|
334
|
-
|
|
335
|
-
new_options = opts.merge(
|
|
336
|
-
:header_params => header_params,
|
|
337
|
-
:query_params => query_params,
|
|
338
|
-
:form_params => form_params,
|
|
339
|
-
:body => post_body,
|
|
340
|
-
:auth_names => auth_names,
|
|
341
|
-
:return_type => return_type
|
|
342
|
-
)
|
|
343
|
-
|
|
344
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
345
|
-
if @api_client.config.debugging
|
|
346
|
-
@api_client.config.logger.debug "API called: TokenOperationsApi#get_token_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
347
|
-
end
|
|
348
|
-
return data, status_code, headers
|
|
349
|
-
end
|
|
350
|
-
end
|
|
351
|
-
end
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#IAM Identity Services API
|
|
3
|
-
|
|
4
|
-
#The IAM Identity Service API allows for the management of Identities (Service IDs, ApiKeys).
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0.0
|
|
7
|
-
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.0.0-beta2
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'date'
|
|
14
|
-
|
|
15
|
-
module IbmCloudIam
|
|
16
|
-
class InlineObject
|
|
17
|
-
# Grant type for this API call. You must set the grant type to `urn:ibm:params:oauth:grant-type:apikey`.
|
|
18
|
-
attr_accessor :grant_type
|
|
19
|
-
|
|
20
|
-
# The value of the api key
|
|
21
|
-
attr_accessor :apikey
|
|
22
|
-
|
|
23
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
-
def self.attribute_map
|
|
25
|
-
{
|
|
26
|
-
:'grant_type' => :'grant_type',
|
|
27
|
-
:'apikey' => :'apikey'
|
|
28
|
-
}
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Attribute type mapping.
|
|
32
|
-
def self.openapi_types
|
|
33
|
-
{
|
|
34
|
-
:'grant_type' => :'String',
|
|
35
|
-
:'apikey' => :'String'
|
|
36
|
-
}
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
# List of attributes with nullable: true
|
|
40
|
-
def self.openapi_nullable
|
|
41
|
-
Set.new([
|
|
42
|
-
])
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
# Initializes the object
|
|
46
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
47
|
-
def initialize(attributes = {})
|
|
48
|
-
if (!attributes.is_a?(Hash))
|
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `IbmCloudIam::InlineObject` initialize method"
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
53
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
54
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `IbmCloudIam::InlineObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
56
|
-
end
|
|
57
|
-
h[k.to_sym] = v
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if attributes.key?(:'grant_type')
|
|
61
|
-
self.grant_type = attributes[:'grant_type']
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
if attributes.key?(:'apikey')
|
|
65
|
-
self.apikey = attributes[:'apikey']
|
|
66
|
-
end
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
70
|
-
# @return Array for valid properties with the reasons
|
|
71
|
-
def list_invalid_properties
|
|
72
|
-
invalid_properties = Array.new
|
|
73
|
-
if @grant_type.nil?
|
|
74
|
-
invalid_properties.push('invalid value for "grant_type", grant_type cannot be nil.')
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
if @apikey.nil?
|
|
78
|
-
invalid_properties.push('invalid value for "apikey", apikey cannot be nil.')
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
invalid_properties
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Check to see if the all the properties in the model are valid
|
|
85
|
-
# @return true if the model is valid
|
|
86
|
-
def valid?
|
|
87
|
-
return false if @grant_type.nil?
|
|
88
|
-
return false if @apikey.nil?
|
|
89
|
-
true
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
# Checks equality by comparing each attribute.
|
|
93
|
-
# @param [Object] Object to be compared
|
|
94
|
-
def ==(o)
|
|
95
|
-
return true if self.equal?(o)
|
|
96
|
-
self.class == o.class &&
|
|
97
|
-
grant_type == o.grant_type &&
|
|
98
|
-
apikey == o.apikey
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# @see the `==` method
|
|
102
|
-
# @param [Object] Object to be compared
|
|
103
|
-
def eql?(o)
|
|
104
|
-
self == o
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
# Calculates hash code according to all attributes.
|
|
108
|
-
# @return [Integer] Hash code
|
|
109
|
-
def hash
|
|
110
|
-
[grant_type, apikey].hash
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
# Builds the object from hash
|
|
114
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
115
|
-
# @return [Object] Returns the model itself
|
|
116
|
-
def self.build_from_hash(attributes)
|
|
117
|
-
new.build_from_hash(attributes)
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
# Builds the object from hash
|
|
121
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
122
|
-
# @return [Object] Returns the model itself
|
|
123
|
-
def build_from_hash(attributes)
|
|
124
|
-
return nil unless attributes.is_a?(Hash)
|
|
125
|
-
self.class.openapi_types.each_pair do |key, type|
|
|
126
|
-
if type =~ /\AArray<(.*)>/i
|
|
127
|
-
# check to ensure the input is an array given that the attribute
|
|
128
|
-
# is documented as an array but the input is not
|
|
129
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
130
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
131
|
-
end
|
|
132
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
133
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
134
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
135
|
-
self.send("#{key}=", nil)
|
|
136
|
-
end
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
self
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
# Deserializes the data based on type
|
|
143
|
-
# @param string type Data type
|
|
144
|
-
# @param string value Value to be deserialized
|
|
145
|
-
# @return [Object] Deserialized data
|
|
146
|
-
def _deserialize(type, value)
|
|
147
|
-
case type.to_sym
|
|
148
|
-
when :DateTime
|
|
149
|
-
DateTime.parse(value)
|
|
150
|
-
when :Date
|
|
151
|
-
Date.parse(value)
|
|
152
|
-
when :String
|
|
153
|
-
value.to_s
|
|
154
|
-
when :Integer
|
|
155
|
-
value.to_i
|
|
156
|
-
when :Float
|
|
157
|
-
value.to_f
|
|
158
|
-
when :Boolean
|
|
159
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
160
|
-
true
|
|
161
|
-
else
|
|
162
|
-
false
|
|
163
|
-
end
|
|
164
|
-
when :Object
|
|
165
|
-
# generic object (usually a Hash), return directly
|
|
166
|
-
value
|
|
167
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
168
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
169
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
170
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
171
|
-
k_type = Regexp.last_match[:k_type]
|
|
172
|
-
v_type = Regexp.last_match[:v_type]
|
|
173
|
-
{}.tap do |hash|
|
|
174
|
-
value.each do |k, v|
|
|
175
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
176
|
-
end
|
|
177
|
-
end
|
|
178
|
-
else # model
|
|
179
|
-
IbmCloudIam.const_get(type).build_from_hash(value)
|
|
180
|
-
end
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# Returns the string representation of the object
|
|
184
|
-
# @return [String] String presentation of the object
|
|
185
|
-
def to_s
|
|
186
|
-
to_hash.to_s
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
190
|
-
# @return [Hash] Returns the object in the form of hash
|
|
191
|
-
def to_body
|
|
192
|
-
to_hash
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
# Returns the object in the form of hash
|
|
196
|
-
# @return [Hash] Returns the object in the form of hash
|
|
197
|
-
def to_hash
|
|
198
|
-
hash = {}
|
|
199
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
200
|
-
value = self.send(attr)
|
|
201
|
-
if value.nil?
|
|
202
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
203
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
hash[param] = _to_hash(value)
|
|
207
|
-
end
|
|
208
|
-
hash
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
# Outputs non-array value in the form of hash
|
|
212
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
213
|
-
# @param [Object] value Any valid value
|
|
214
|
-
# @return [Hash] Returns the value in the form of hash
|
|
215
|
-
def _to_hash(value)
|
|
216
|
-
if value.is_a?(Array)
|
|
217
|
-
value.compact.map { |v| _to_hash(v) }
|
|
218
|
-
elsif value.is_a?(Hash)
|
|
219
|
-
{}.tap do |hash|
|
|
220
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
221
|
-
end
|
|
222
|
-
elsif value.respond_to? :to_hash
|
|
223
|
-
value.to_hash
|
|
224
|
-
else
|
|
225
|
-
value
|
|
226
|
-
end
|
|
227
|
-
end
|
|
228
|
-
end
|
|
229
|
-
end
|