hyperstack 1.25.0a0__py3-none-any.whl
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.
- hyperstack/__init__.py +420 -0
- hyperstack/api/__init__.py +48 -0
- hyperstack/api/alive_api.py +270 -0
- hyperstack/api/api_key_api.py +1161 -0
- hyperstack/api/assigning_member_role_api.py +615 -0
- hyperstack/api/auth_api.py +292 -0
- hyperstack/api/billing_api.py +5946 -0
- hyperstack/api/calculate_api.py +326 -0
- hyperstack/api/callbacks_api.py +1795 -0
- hyperstack/api/cluster_events_api.py +308 -0
- hyperstack/api/clusters_api.py +1651 -0
- hyperstack/api/compliance_api.py +1169 -0
- hyperstack/api/credit_api.py +295 -0
- hyperstack/api/customer_contract_api.py +922 -0
- hyperstack/api/dashboard_api.py +292 -0
- hyperstack/api/deployment_api.py +1122 -0
- hyperstack/api/environment_api.py +1490 -0
- hyperstack/api/firewall_attachment_api.py +343 -0
- hyperstack/api/firewalls_api.py +1819 -0
- hyperstack/api/flavor_api.py +315 -0
- hyperstack/api/floating_ip_api.py +585 -0
- hyperstack/api/gpu_api.py +292 -0
- hyperstack/api/image_api.py +1228 -0
- hyperstack/api/invite_api.py +857 -0
- hyperstack/api/keypair_api.py +1217 -0
- hyperstack/api/organization_api.py +864 -0
- hyperstack/api/payment_api.py +584 -0
- hyperstack/api/permission_api.py +292 -0
- hyperstack/api/policy_api.py +292 -0
- hyperstack/api/pricebook_api.py +293 -0
- hyperstack/api/profile_api.py +1131 -0
- hyperstack/api/rbac_role_api.py +1434 -0
- hyperstack/api/region_api.py +292 -0
- hyperstack/api/security_rules_api.py +292 -0
- hyperstack/api/snapshot_events_api.py +291 -0
- hyperstack/api/snapshots_api.py +1779 -0
- hyperstack/api/stock_api.py +292 -0
- hyperstack/api/template_api.py +1497 -0
- hyperstack/api/user_api.py +871 -0
- hyperstack/api/user_detail_choice_api.py +295 -0
- hyperstack/api/user_permission_api.py +567 -0
- hyperstack/api/virtual_machine_api.py +5289 -0
- hyperstack/api/virtual_machine_events_api.py +311 -0
- hyperstack/api/vnc_url_api.py +595 -0
- hyperstack/api/volume_api.py +1742 -0
- hyperstack/api/volume_attachment_api.py +650 -0
- hyperstack/api_client.py +797 -0
- hyperstack/api_response.py +21 -0
- hyperstack/configuration.py +605 -0
- hyperstack/exceptions.py +199 -0
- hyperstack/models/__init__.py +360 -0
- hyperstack/models/add_update_flavor_organization_payload.py +111 -0
- hyperstack/models/add_user_info_success_response_model.py +95 -0
- hyperstack/models/allocated_gpu_count_graph.py +89 -0
- hyperstack/models/api_key_fields.py +96 -0
- hyperstack/models/api_key_verify_fields.py +93 -0
- hyperstack/models/assign_rbac_role_payload.py +87 -0
- hyperstack/models/attach_callback_payload.py +87 -0
- hyperstack/models/attach_callback_response.py +91 -0
- hyperstack/models/attach_firewall_with_vm.py +87 -0
- hyperstack/models/attach_firewalls_to_vm_payload.py +87 -0
- hyperstack/models/attach_volume_fields.py +96 -0
- hyperstack/models/attach_volumes.py +99 -0
- hyperstack/models/attach_volumes_payload.py +87 -0
- hyperstack/models/auth_get_token_response_model.py +97 -0
- hyperstack/models/auth_request_login_fields.py +89 -0
- hyperstack/models/auth_request_login_response_model.py +95 -0
- hyperstack/models/auth_user_fields.py +94 -0
- hyperstack/models/auth_user_info_response_model.py +95 -0
- hyperstack/models/billing_immune_resources_response.py +95 -0
- hyperstack/models/billing_response.py +100 -0
- hyperstack/models/billingmetricesfields.py +108 -0
- hyperstack/models/billingmetricesresponse.py +99 -0
- hyperstack/models/cluster_events.py +99 -0
- hyperstack/models/cluster_events_fields.py +104 -0
- hyperstack/models/cluster_fields.py +114 -0
- hyperstack/models/cluster_list_response.py +99 -0
- hyperstack/models/cluster_response.py +95 -0
- hyperstack/models/cluster_versions.py +91 -0
- hyperstack/models/common_response_model.py +89 -0
- hyperstack/models/compliance_fields.py +93 -0
- hyperstack/models/compliance_model_fields.py +99 -0
- hyperstack/models/compliance_payload.py +97 -0
- hyperstack/models/compliance_response.py +95 -0
- hyperstack/models/container_overview_fields.py +95 -0
- hyperstack/models/contract.py +105 -0
- hyperstack/models/contract_billing_history.py +97 -0
- hyperstack/models/contract_billing_history_response_attributes.py +99 -0
- hyperstack/models/contract_billing_history_response_model.py +95 -0
- hyperstack/models/contract_change_payload.py +101 -0
- hyperstack/models/contract_discount_plan_fields.py +103 -0
- hyperstack/models/contract_eligible_instance_fields.py +99 -0
- hyperstack/models/contract_eligible_instances_response.py +101 -0
- hyperstack/models/contract_event_create_model.py +91 -0
- hyperstack/models/contract_gpu_allocation_graph_response.py +95 -0
- hyperstack/models/contract_instance_fields.py +102 -0
- hyperstack/models/contract_instances_response.py +99 -0
- hyperstack/models/contract_resource_payload.py +95 -0
- hyperstack/models/contractl_billing_history_response_metrics.py +87 -0
- hyperstack/models/create_cluster_payload.py +101 -0
- hyperstack/models/create_contract_fields.py +110 -0
- hyperstack/models/create_contract_payload.py +106 -0
- hyperstack/models/create_discount_response.py +95 -0
- hyperstack/models/create_discounts_payload.py +112 -0
- hyperstack/models/create_environment.py +90 -0
- hyperstack/models/create_firewall_payload.py +91 -0
- hyperstack/models/create_firewall_rule_payload.py +104 -0
- hyperstack/models/create_gpu.py +91 -0
- hyperstack/models/create_image.py +91 -0
- hyperstack/models/create_image_payload.py +89 -0
- hyperstack/models/create_instances_payload.py +134 -0
- hyperstack/models/create_instances_response.py +99 -0
- hyperstack/models/create_profile_payload.py +92 -0
- hyperstack/models/create_profile_response.py +95 -0
- hyperstack/models/create_security_rule_payload.py +104 -0
- hyperstack/models/create_snapshot_payload.py +93 -0
- hyperstack/models/create_snapshot_response.py +95 -0
- hyperstack/models/create_update_compliance_response.py +95 -0
- hyperstack/models/create_update_permission_payload.py +93 -0
- hyperstack/models/create_update_permission_response_model.py +95 -0
- hyperstack/models/create_update_policy_payload.py +93 -0
- hyperstack/models/create_update_policy_response_model.py +95 -0
- hyperstack/models/create_update_rbac_role_payload.py +94 -0
- hyperstack/models/create_volume_payload.py +100 -0
- hyperstack/models/creditrechargelimitfield.py +93 -0
- hyperstack/models/creditrechargelimitresponse.py +99 -0
- hyperstack/models/creditrequestresponse.py +99 -0
- hyperstack/models/creditrequests.py +96 -0
- hyperstack/models/customer_contract_detail_response_model.py +95 -0
- hyperstack/models/customer_contract_fields.py +112 -0
- hyperstack/models/customer_fields.py +89 -0
- hyperstack/models/customer_payload.py +89 -0
- hyperstack/models/dashboard_info_response.py +95 -0
- hyperstack/models/data.py +91 -0
- hyperstack/models/deployment_fields.py +98 -0
- hyperstack/models/deployment_fieldsforstartdeployments.py +100 -0
- hyperstack/models/deployments.py +99 -0
- hyperstack/models/detach_volumes.py +99 -0
- hyperstack/models/detach_volumes_payload.py +87 -0
- hyperstack/models/discount_entity_model.py +97 -0
- hyperstack/models/discount_fields.py +100 -0
- hyperstack/models/discount_plan_fields.py +108 -0
- hyperstack/models/discount_resource_fields.py +93 -0
- hyperstack/models/discount_resource_payload.py +93 -0
- hyperstack/models/editlabelofanexisting_vm_payload.py +87 -0
- hyperstack/models/environment.py +95 -0
- hyperstack/models/environment_features.py +87 -0
- hyperstack/models/environment_fields.py +100 -0
- hyperstack/models/environment_fieldsfor_volume.py +87 -0
- hyperstack/models/environments.py +105 -0
- hyperstack/models/error_response_model.py +91 -0
- hyperstack/models/exclude_billing_post_payload.py +91 -0
- hyperstack/models/exclude_billing_post_response.py +91 -0
- hyperstack/models/export_billing_data_request.py +105 -0
- hyperstack/models/export_billing_data_response.py +89 -0
- hyperstack/models/field_change.py +91 -0
- hyperstack/models/firewall_attachment_model.py +98 -0
- hyperstack/models/firewall_attachment_vm_model.py +98 -0
- hyperstack/models/firewall_detail_fields.py +122 -0
- hyperstack/models/firewall_detail_response.py +95 -0
- hyperstack/models/firewall_environment_fields.py +91 -0
- hyperstack/models/firewall_fields.py +102 -0
- hyperstack/models/firewall_response.py +95 -0
- hyperstack/models/firewall_rule.py +95 -0
- hyperstack/models/firewalls_list_response.py +105 -0
- hyperstack/models/flavor_fields.py +120 -0
- hyperstack/models/flavor_item_get_response.py +99 -0
- hyperstack/models/flavor_list_response.py +99 -0
- hyperstack/models/flavor_object_fields.py +95 -0
- hyperstack/models/flavor_payload.py +101 -0
- hyperstack/models/flavor_response.py +95 -0
- hyperstack/models/flavor_vm_fields.py +100 -0
- hyperstack/models/flavor_vms_response.py +99 -0
- hyperstack/models/future_node_model.py +106 -0
- hyperstack/models/future_node_response_model.py +97 -0
- hyperstack/models/future_node_stock_model.py +93 -0
- hyperstack/models/future_node_update_model.py +98 -0
- hyperstack/models/future_nodes_stock_model.py +95 -0
- hyperstack/models/generate_update_api_key_payload.py +89 -0
- hyperstack/models/generate_update_api_key_response_model.py +95 -0
- hyperstack/models/get_all_contract_fields.py +100 -0
- hyperstack/models/get_all_contracts_response_model.py +99 -0
- hyperstack/models/get_all_discount_for_all_organization_response.py +99 -0
- hyperstack/models/get_all_discounts_fields.py +106 -0
- hyperstack/models/get_api_keys_response_model.py +99 -0
- hyperstack/models/get_customer_contracts_list_response_model.py +101 -0
- hyperstack/models/get_discount_detail_response.py +95 -0
- hyperstack/models/get_discount_response.py +99 -0
- hyperstack/models/get_entity_discount_detail_response.py +108 -0
- hyperstack/models/get_invites_response_model.py +99 -0
- hyperstack/models/get_organization_response_model.py +95 -0
- hyperstack/models/get_permissions_response_model.py +99 -0
- hyperstack/models/get_policies_response_model.py +99 -0
- hyperstack/models/get_rbac_roles_response_model.py +99 -0
- hyperstack/models/get_token_payload.py +89 -0
- hyperstack/models/get_user_permissions_response_model.py +99 -0
- hyperstack/models/get_version_response.py +91 -0
- hyperstack/models/getcreditandthresholdinfo.py +91 -0
- hyperstack/models/getcreditandthresholdinfoinresponse.py +95 -0
- hyperstack/models/gpu.py +95 -0
- hyperstack/models/gpu_fields.py +106 -0
- hyperstack/models/gpu_list.py +99 -0
- hyperstack/models/gpu_region_fields.py +89 -0
- hyperstack/models/graph_datetime_value_model.py +89 -0
- hyperstack/models/historical_instance.py +101 -0
- hyperstack/models/historical_instances_fields.py +110 -0
- hyperstack/models/image.py +91 -0
- hyperstack/models/image_fields.py +113 -0
- hyperstack/models/image_get_response.py +101 -0
- hyperstack/models/image_logos.py +99 -0
- hyperstack/models/images.py +99 -0
- hyperstack/models/import_keypair_payload.py +92 -0
- hyperstack/models/import_keypair_response.py +95 -0
- hyperstack/models/infrahub_resource_object_response.py +119 -0
- hyperstack/models/infrahub_resource_object_response_for_customer.py +109 -0
- hyperstack/models/insert_discount_plan_fields.py +112 -0
- hyperstack/models/instance.py +95 -0
- hyperstack/models/instance_environment_fields.py +99 -0
- hyperstack/models/instance_events.py +99 -0
- hyperstack/models/instance_events_fields.py +102 -0
- hyperstack/models/instance_fields.py +162 -0
- hyperstack/models/instance_flavor_fields.py +101 -0
- hyperstack/models/instance_image_fields.py +87 -0
- hyperstack/models/instance_keypair_fields.py +87 -0
- hyperstack/models/instance_overview_fields.py +95 -0
- hyperstack/models/instance_resize_payload.py +93 -0
- hyperstack/models/instances.py +105 -0
- hyperstack/models/instances_summary_fields.py +120 -0
- hyperstack/models/internal_environment_fields.py +94 -0
- hyperstack/models/internal_instance_fields.py +156 -0
- hyperstack/models/internal_instance_flavor_fields.py +104 -0
- hyperstack/models/internal_instance_image_fields.py +95 -0
- hyperstack/models/internal_instance_keypair_fields.py +98 -0
- hyperstack/models/internal_instances_response.py +99 -0
- hyperstack/models/internal_security_rules_fields_for_instance.py +104 -0
- hyperstack/models/internal_volume_attachment_fields.py +98 -0
- hyperstack/models/internal_volume_fields.py +95 -0
- hyperstack/models/internal_volumes_response.py +99 -0
- hyperstack/models/invite_fields.py +94 -0
- hyperstack/models/invite_user_payload.py +88 -0
- hyperstack/models/invite_user_response_model.py +95 -0
- hyperstack/models/keypair_fields.py +98 -0
- hyperstack/models/keypairs.py +105 -0
- hyperstack/models/lable_resonse.py +89 -0
- hyperstack/models/lastdaycostfields.py +93 -0
- hyperstack/models/lastdaycostresponse.py +95 -0
- hyperstack/models/logo_get_response.py +91 -0
- hyperstack/models/logout_payload.py +87 -0
- hyperstack/models/metric_item_fields.py +91 -0
- hyperstack/models/metrics_fields.py +116 -0
- hyperstack/models/name_available_model.py +91 -0
- hyperstack/models/new_configurations_response.py +95 -0
- hyperstack/models/new_model_response.py +101 -0
- hyperstack/models/new_stock_response.py +99 -0
- hyperstack/models/new_stock_retrive_response.py +95 -0
- hyperstack/models/new_stock_update_response_model.py +89 -0
- hyperstack/models/node_model.py +114 -0
- hyperstack/models/node_payload_model.py +97 -0
- hyperstack/models/node_power_usage_model.py +120 -0
- hyperstack/models/node_response_model.py +97 -0
- hyperstack/models/node_stock_payload_model.py +95 -0
- hyperstack/models/node_stock_response_model.py +95 -0
- hyperstack/models/node_stocks_payload.py +93 -0
- hyperstack/models/organization_fields.py +114 -0
- hyperstack/models/organization_level_billing_history.py +99 -0
- hyperstack/models/organization_level_billing_history_resources.py +97 -0
- hyperstack/models/organization_level_billing_history_response_attributes.py +87 -0
- hyperstack/models/organization_level_billing_history_response_metrics.py +97 -0
- hyperstack/models/organization_level_billing_history_response_model.py +95 -0
- hyperstack/models/organization_object_response.py +97 -0
- hyperstack/models/organization_thresholdfields.py +95 -0
- hyperstack/models/organization_user_response_model.py +112 -0
- hyperstack/models/organizationcreditrechargelimitresponse.py +95 -0
- hyperstack/models/organizationthresholdsresponse.py +99 -0
- hyperstack/models/organizationthresholdupdateresponse.py +95 -0
- hyperstack/models/overview_info.py +103 -0
- hyperstack/models/pagination_data.py +91 -0
- hyperstack/models/payment_details_fields.py +106 -0
- hyperstack/models/payment_details_response.py +95 -0
- hyperstack/models/payment_initiate_fields.py +87 -0
- hyperstack/models/payment_initiate_payload.py +87 -0
- hyperstack/models/payment_initiate_response.py +95 -0
- hyperstack/models/permission_fields.py +98 -0
- hyperstack/models/policy_fields.py +104 -0
- hyperstack/models/policy_permission_fields.py +91 -0
- hyperstack/models/power_usage_model.py +89 -0
- hyperstack/models/pricebook_model.py +100 -0
- hyperstack/models/pricebook_resource_object_response.py +107 -0
- hyperstack/models/pricebook_resource_object_response_for_customer.py +99 -0
- hyperstack/models/profile_fields.py +96 -0
- hyperstack/models/profile_list_response.py +99 -0
- hyperstack/models/profile_object_fields.py +89 -0
- hyperstack/models/rbac_role_detail_response_model.py +95 -0
- hyperstack/models/rbac_role_detail_response_model_fixed.py +95 -0
- hyperstack/models/rbac_role_field.py +87 -0
- hyperstack/models/rbac_role_fields.py +114 -0
- hyperstack/models/refresh_token_payload.py +89 -0
- hyperstack/models/region_fields.py +91 -0
- hyperstack/models/region_payload.py +89 -0
- hyperstack/models/region_response.py +95 -0
- hyperstack/models/regions.py +99 -0
- hyperstack/models/remove_member_from_organization_response_model.py +89 -0
- hyperstack/models/remove_member_payload.py +88 -0
- hyperstack/models/request_console.py +91 -0
- hyperstack/models/resource_billing_events_history_metrics.py +95 -0
- hyperstack/models/resource_billing_events_history_response.py +99 -0
- hyperstack/models/resource_billing_response_for_customer.py +95 -0
- hyperstack/models/resource_level_billing_details_attributes.py +91 -0
- hyperstack/models/resource_level_billing_details_metrics.py +101 -0
- hyperstack/models/resource_level_billing_details_vm.py +99 -0
- hyperstack/models/resource_level_billing_details_volume.py +99 -0
- hyperstack/models/resource_level_billing_details_volume_attributes.py +95 -0
- hyperstack/models/resource_level_billing_details_volume_metrics.py +95 -0
- hyperstack/models/resource_level_billing_history.py +105 -0
- hyperstack/models/resource_level_billing_history_resources.py +97 -0
- hyperstack/models/resource_level_billing_history_response_attributes.py +93 -0
- hyperstack/models/resource_level_billing_history_response_metrics.py +91 -0
- hyperstack/models/resource_level_billing_vm_details_resources.py +97 -0
- hyperstack/models/resource_level_billing_volume_details_resources.py +97 -0
- hyperstack/models/resource_level_graph_billing_detail_volume.py +101 -0
- hyperstack/models/resource_level_graph_billing_details_attributes.py +91 -0
- hyperstack/models/resource_level_graph_billing_details_metrics.py +97 -0
- hyperstack/models/resource_level_graph_billing_details_vm.py +101 -0
- hyperstack/models/resource_level_graph_billing_vm_details_resources.py +97 -0
- hyperstack/models/resource_level_graph_billing_volume_details_resources.py +97 -0
- hyperstack/models/resource_level_vm_billing_details_response_model.py +95 -0
- hyperstack/models/resource_level_vm_billing_history_response_model.py +95 -0
- hyperstack/models/resource_level_vm_graph_billing_details_response_model.py +95 -0
- hyperstack/models/resource_level_volume_billing_details_response_model.py +95 -0
- hyperstack/models/resource_level_volume_billing_history_response_model.py +95 -0
- hyperstack/models/resource_level_volume_graph_billing_details_response_model.py +95 -0
- hyperstack/models/resource_object_response_for_customer.py +93 -0
- hyperstack/models/response_model.py +89 -0
- hyperstack/models/role_permission_fields.py +91 -0
- hyperstack/models/role_policy_fields.py +91 -0
- hyperstack/models/security_group_rule.py +95 -0
- hyperstack/models/security_group_rule_fields.py +104 -0
- hyperstack/models/security_rules_fieldsfor_instance.py +104 -0
- hyperstack/models/security_rules_protocol_fields.py +91 -0
- hyperstack/models/set_defaults_payload.py +89 -0
- hyperstack/models/single_visibility_user_response.py +91 -0
- hyperstack/models/snapshot_fields.py +105 -0
- hyperstack/models/snapshot_restore_request.py +89 -0
- hyperstack/models/snapshot_retrieve.py +95 -0
- hyperstack/models/snapshot_retrieve_fields.py +103 -0
- hyperstack/models/snapshots.py +105 -0
- hyperstack/models/start_deployment.py +95 -0
- hyperstack/models/start_deployment_payload.py +93 -0
- hyperstack/models/stock_visibility_user_list_response.py +99 -0
- hyperstack/models/stock_visibility_user_payload.py +87 -0
- hyperstack/models/sub_resource_graph_billing_details_metrics.py +152 -0
- hyperstack/models/sub_resources_costs_response_model.py +101 -0
- hyperstack/models/sub_resources_graph_billing_history_fields.py +97 -0
- hyperstack/models/sub_resources_graph_response_model.py +95 -0
- hyperstack/models/subscribeorunsubscribeupdatepayload.py +87 -0
- hyperstack/models/success_response_model.py +89 -0
- hyperstack/models/template.py +95 -0
- hyperstack/models/template_fields.py +98 -0
- hyperstack/models/templates.py +99 -0
- hyperstack/models/token_fields.py +91 -0
- hyperstack/models/update_contract_payload.py +104 -0
- hyperstack/models/update_discounts_payload.py +102 -0
- hyperstack/models/update_discounts_status_payload.py +87 -0
- hyperstack/models/update_environment.py +88 -0
- hyperstack/models/update_gpu.py +91 -0
- hyperstack/models/update_keypair_name.py +88 -0
- hyperstack/models/update_keypairnameresponse.py +95 -0
- hyperstack/models/update_organization_payload.py +88 -0
- hyperstack/models/update_organization_response_model.py +89 -0
- hyperstack/models/update_template.py +91 -0
- hyperstack/models/user_default_choice_for_user_fields.py +91 -0
- hyperstack/models/user_default_choices_for_user_response.py +99 -0
- hyperstack/models/user_permission_fields.py +91 -0
- hyperstack/models/user_transfer_payload.py +89 -0
- hyperstack/models/userinfopostpayload.py +107 -0
- hyperstack/models/users_info_fields.py +114 -0
- hyperstack/models/users_info_list_response.py +95 -0
- hyperstack/models/verify_api_key_payload.py +87 -0
- hyperstack/models/verify_api_key_response_model.py +95 -0
- hyperstack/models/virtual_machine_usage.py +93 -0
- hyperstack/models/vm_usage_request_payload.py +87 -0
- hyperstack/models/vm_usage_response.py +101 -0
- hyperstack/models/vncurl.py +95 -0
- hyperstack/models/vncurl_fields.py +89 -0
- hyperstack/models/volume.py +95 -0
- hyperstack/models/volume_attachment_fields.py +98 -0
- hyperstack/models/volume_fields.py +116 -0
- hyperstack/models/volume_fieldsfor_instance.py +97 -0
- hyperstack/models/volume_overview_fields.py +91 -0
- hyperstack/models/volume_status_change_fields.py +96 -0
- hyperstack/models/volume_types.py +91 -0
- hyperstack/models/volumes.py +99 -0
- hyperstack/models/volumes_last_status_change_response.py +99 -0
- hyperstack/models/warning_mail_log_fields.py +99 -0
- hyperstack/models/warning_mail_log_response.py +101 -0
- hyperstack/py.typed +0 -0
- hyperstack/rest.py +257 -0
- hyperstack-1.25.0a0.dist-info/METADATA +23 -0
- hyperstack-1.25.0a0.dist-info/RECORD +401 -0
- hyperstack-1.25.0a0.dist-info/WHEEL +5 -0
- hyperstack-1.25.0a0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Infrahub-API
|
|
5
|
+
|
|
6
|
+
Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import StrictInt
|
|
20
|
+
from ..models.assign_rbac_role_payload import AssignRbacRolePayload
|
|
21
|
+
from ..models.common_response_model import CommonResponseModel
|
|
22
|
+
from ..models.rbac_role_detail_response_model import RbacRoleDetailResponseModel
|
|
23
|
+
|
|
24
|
+
from ..api_client import ApiClient, RequestSerialized
|
|
25
|
+
from ..api_response import ApiResponse
|
|
26
|
+
from ..rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class AssigningMemberRoleApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def assign_rbac_role(
|
|
44
|
+
self,
|
|
45
|
+
user_id: StrictInt,
|
|
46
|
+
payload: AssignRbacRolePayload,
|
|
47
|
+
_request_timeout: Union[
|
|
48
|
+
None,
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Tuple[
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
|
+
) -> RbacRoleDetailResponseModel:
|
|
60
|
+
"""Assign RBAC Role
|
|
61
|
+
|
|
62
|
+
Assigns a specific RBAC role to a user within your organization, granting them access to the resource actions permitted by the role. Provide the user ID in the path and the role ID in the request body. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/rbac/manage-member-roles/assign-rbac-role).
|
|
63
|
+
|
|
64
|
+
:param user_id: (required)
|
|
65
|
+
:type user_id: int
|
|
66
|
+
:param payload: (required)
|
|
67
|
+
:type payload: AssignRbacRolePayload
|
|
68
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
69
|
+
number provided, it will be total request
|
|
70
|
+
timeout. It can also be a pair (tuple) of
|
|
71
|
+
(connection, read) timeouts.
|
|
72
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
73
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
74
|
+
request; this effectively ignores the
|
|
75
|
+
authentication in the spec for a single request.
|
|
76
|
+
:type _request_auth: dict, optional
|
|
77
|
+
:param _content_type: force content-type for the request.
|
|
78
|
+
:type _content_type: str, Optional
|
|
79
|
+
:param _headers: set to override the headers for a single
|
|
80
|
+
request; this effectively ignores the headers
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _headers: dict, optional
|
|
83
|
+
:param _host_index: set to override the host_index for a single
|
|
84
|
+
request; this effectively ignores the host_index
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _host_index: int, optional
|
|
87
|
+
:return: Returns the result object.
|
|
88
|
+
""" # noqa: E501
|
|
89
|
+
|
|
90
|
+
_param = self._assign_rbac_role_serialize(
|
|
91
|
+
user_id=user_id,
|
|
92
|
+
payload=payload,
|
|
93
|
+
_request_auth=_request_auth,
|
|
94
|
+
_content_type=_content_type,
|
|
95
|
+
_headers=_headers,
|
|
96
|
+
_host_index=_host_index
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
100
|
+
'200': "RbacRoleDetailResponseModel",
|
|
101
|
+
'400': "ErrorResponseModel",
|
|
102
|
+
'401': "ErrorResponseModel",
|
|
103
|
+
'404': "ErrorResponseModel",
|
|
104
|
+
'500': None,
|
|
105
|
+
}
|
|
106
|
+
response_data = self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=_request_timeout
|
|
109
|
+
)
|
|
110
|
+
response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
def assign_rbac_role_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
user_id: StrictInt,
|
|
121
|
+
payload: AssignRbacRolePayload,
|
|
122
|
+
_request_timeout: Union[
|
|
123
|
+
None,
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Tuple[
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
128
|
+
]
|
|
129
|
+
] = None,
|
|
130
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_content_type: Optional[StrictStr] = None,
|
|
132
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
134
|
+
) -> ApiResponse[RbacRoleDetailResponseModel]:
|
|
135
|
+
"""Assign RBAC Role
|
|
136
|
+
|
|
137
|
+
Assigns a specific RBAC role to a user within your organization, granting them access to the resource actions permitted by the role. Provide the user ID in the path and the role ID in the request body. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/rbac/manage-member-roles/assign-rbac-role).
|
|
138
|
+
|
|
139
|
+
:param user_id: (required)
|
|
140
|
+
:type user_id: int
|
|
141
|
+
:param payload: (required)
|
|
142
|
+
:type payload: AssignRbacRolePayload
|
|
143
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
144
|
+
number provided, it will be total request
|
|
145
|
+
timeout. It can also be a pair (tuple) of
|
|
146
|
+
(connection, read) timeouts.
|
|
147
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
148
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
149
|
+
request; this effectively ignores the
|
|
150
|
+
authentication in the spec for a single request.
|
|
151
|
+
:type _request_auth: dict, optional
|
|
152
|
+
:param _content_type: force content-type for the request.
|
|
153
|
+
:type _content_type: str, Optional
|
|
154
|
+
:param _headers: set to override the headers for a single
|
|
155
|
+
request; this effectively ignores the headers
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _headers: dict, optional
|
|
158
|
+
:param _host_index: set to override the host_index for a single
|
|
159
|
+
request; this effectively ignores the host_index
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _host_index: int, optional
|
|
162
|
+
:return: Returns the result object.
|
|
163
|
+
""" # noqa: E501
|
|
164
|
+
|
|
165
|
+
_param = self._assign_rbac_role_serialize(
|
|
166
|
+
user_id=user_id,
|
|
167
|
+
payload=payload,
|
|
168
|
+
_request_auth=_request_auth,
|
|
169
|
+
_content_type=_content_type,
|
|
170
|
+
_headers=_headers,
|
|
171
|
+
_host_index=_host_index
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
175
|
+
'200': "RbacRoleDetailResponseModel",
|
|
176
|
+
'400': "ErrorResponseModel",
|
|
177
|
+
'401': "ErrorResponseModel",
|
|
178
|
+
'404': "ErrorResponseModel",
|
|
179
|
+
'500': None,
|
|
180
|
+
}
|
|
181
|
+
response_data = self.api_client.call_api(
|
|
182
|
+
*_param,
|
|
183
|
+
_request_timeout=_request_timeout
|
|
184
|
+
)
|
|
185
|
+
response_data.read()
|
|
186
|
+
return self.api_client.response_deserialize(
|
|
187
|
+
response_data=response_data,
|
|
188
|
+
response_types_map=_response_types_map,
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
@validate_call
|
|
193
|
+
def assign_rbac_role_without_preload_content(
|
|
194
|
+
self,
|
|
195
|
+
user_id: StrictInt,
|
|
196
|
+
payload: AssignRbacRolePayload,
|
|
197
|
+
_request_timeout: Union[
|
|
198
|
+
None,
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
200
|
+
Tuple[
|
|
201
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
202
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
203
|
+
]
|
|
204
|
+
] = None,
|
|
205
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
+
_content_type: Optional[StrictStr] = None,
|
|
207
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
208
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
209
|
+
) -> RESTResponseType:
|
|
210
|
+
"""Assign RBAC Role
|
|
211
|
+
|
|
212
|
+
Assigns a specific RBAC role to a user within your organization, granting them access to the resource actions permitted by the role. Provide the user ID in the path and the role ID in the request body. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/rbac/manage-member-roles/assign-rbac-role).
|
|
213
|
+
|
|
214
|
+
:param user_id: (required)
|
|
215
|
+
:type user_id: int
|
|
216
|
+
:param payload: (required)
|
|
217
|
+
:type payload: AssignRbacRolePayload
|
|
218
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
219
|
+
number provided, it will be total request
|
|
220
|
+
timeout. It can also be a pair (tuple) of
|
|
221
|
+
(connection, read) timeouts.
|
|
222
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
223
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
224
|
+
request; this effectively ignores the
|
|
225
|
+
authentication in the spec for a single request.
|
|
226
|
+
:type _request_auth: dict, optional
|
|
227
|
+
:param _content_type: force content-type for the request.
|
|
228
|
+
:type _content_type: str, Optional
|
|
229
|
+
:param _headers: set to override the headers for a single
|
|
230
|
+
request; this effectively ignores the headers
|
|
231
|
+
in the spec for a single request.
|
|
232
|
+
:type _headers: dict, optional
|
|
233
|
+
:param _host_index: set to override the host_index for a single
|
|
234
|
+
request; this effectively ignores the host_index
|
|
235
|
+
in the spec for a single request.
|
|
236
|
+
:type _host_index: int, optional
|
|
237
|
+
:return: Returns the result object.
|
|
238
|
+
""" # noqa: E501
|
|
239
|
+
|
|
240
|
+
_param = self._assign_rbac_role_serialize(
|
|
241
|
+
user_id=user_id,
|
|
242
|
+
payload=payload,
|
|
243
|
+
_request_auth=_request_auth,
|
|
244
|
+
_content_type=_content_type,
|
|
245
|
+
_headers=_headers,
|
|
246
|
+
_host_index=_host_index
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
250
|
+
'200': "RbacRoleDetailResponseModel",
|
|
251
|
+
'400': "ErrorResponseModel",
|
|
252
|
+
'401': "ErrorResponseModel",
|
|
253
|
+
'404': "ErrorResponseModel",
|
|
254
|
+
'500': None,
|
|
255
|
+
}
|
|
256
|
+
response_data = self.api_client.call_api(
|
|
257
|
+
*_param,
|
|
258
|
+
_request_timeout=_request_timeout
|
|
259
|
+
)
|
|
260
|
+
return response_data.response
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def _assign_rbac_role_serialize(
|
|
264
|
+
self,
|
|
265
|
+
user_id,
|
|
266
|
+
payload,
|
|
267
|
+
_request_auth,
|
|
268
|
+
_content_type,
|
|
269
|
+
_headers,
|
|
270
|
+
_host_index,
|
|
271
|
+
) -> RequestSerialized:
|
|
272
|
+
|
|
273
|
+
_host = None
|
|
274
|
+
|
|
275
|
+
_collection_formats: Dict[str, str] = {
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
_path_params: Dict[str, str] = {}
|
|
279
|
+
_query_params: List[Tuple[str, str]] = []
|
|
280
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
281
|
+
_form_params: List[Tuple[str, str]] = []
|
|
282
|
+
_files: Dict[
|
|
283
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
284
|
+
] = {}
|
|
285
|
+
_body_params: Optional[bytes] = None
|
|
286
|
+
|
|
287
|
+
# process the path parameters
|
|
288
|
+
if user_id is not None:
|
|
289
|
+
_path_params['user_id'] = user_id
|
|
290
|
+
# process the query parameters
|
|
291
|
+
# process the header parameters
|
|
292
|
+
# process the form parameters
|
|
293
|
+
# process the body parameter
|
|
294
|
+
if payload is not None:
|
|
295
|
+
_body_params = payload
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
# set the HTTP header `Accept`
|
|
299
|
+
if 'Accept' not in _header_params:
|
|
300
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
301
|
+
[
|
|
302
|
+
'application/json'
|
|
303
|
+
]
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
# set the HTTP header `Content-Type`
|
|
307
|
+
if _content_type:
|
|
308
|
+
_header_params['Content-Type'] = _content_type
|
|
309
|
+
else:
|
|
310
|
+
_default_content_type = (
|
|
311
|
+
self.api_client.select_header_content_type(
|
|
312
|
+
[
|
|
313
|
+
'application/json'
|
|
314
|
+
]
|
|
315
|
+
)
|
|
316
|
+
)
|
|
317
|
+
if _default_content_type is not None:
|
|
318
|
+
_header_params['Content-Type'] = _default_content_type
|
|
319
|
+
|
|
320
|
+
# authentication setting
|
|
321
|
+
_auth_settings: List[str] = [
|
|
322
|
+
'apiKey',
|
|
323
|
+
'accessToken'
|
|
324
|
+
]
|
|
325
|
+
|
|
326
|
+
return self.api_client.param_serialize(
|
|
327
|
+
method='PUT',
|
|
328
|
+
resource_path='/auth/users/{user_id}/assign-roles',
|
|
329
|
+
path_params=_path_params,
|
|
330
|
+
query_params=_query_params,
|
|
331
|
+
header_params=_header_params,
|
|
332
|
+
body=_body_params,
|
|
333
|
+
post_params=_form_params,
|
|
334
|
+
files=_files,
|
|
335
|
+
auth_settings=_auth_settings,
|
|
336
|
+
collection_formats=_collection_formats,
|
|
337
|
+
_host=_host,
|
|
338
|
+
_request_auth=_request_auth
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
@validate_call
|
|
345
|
+
def remove_rbac_role_from_user(
|
|
346
|
+
self,
|
|
347
|
+
user_id: StrictInt,
|
|
348
|
+
_request_timeout: Union[
|
|
349
|
+
None,
|
|
350
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
351
|
+
Tuple[
|
|
352
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
353
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
354
|
+
]
|
|
355
|
+
] = None,
|
|
356
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
357
|
+
_content_type: Optional[StrictStr] = None,
|
|
358
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
359
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
360
|
+
) -> CommonResponseModel:
|
|
361
|
+
"""Remove RBAC Role From User
|
|
362
|
+
|
|
363
|
+
Removes an RBAC role from a user within your organization, revoking the resource permissions they had access to. Provide the user ID in the path. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/rbac/manage-member-roles/revoke-rbac-role).
|
|
364
|
+
|
|
365
|
+
:param user_id: (required)
|
|
366
|
+
:type user_id: int
|
|
367
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
368
|
+
number provided, it will be total request
|
|
369
|
+
timeout. It can also be a pair (tuple) of
|
|
370
|
+
(connection, read) timeouts.
|
|
371
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
372
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
373
|
+
request; this effectively ignores the
|
|
374
|
+
authentication in the spec for a single request.
|
|
375
|
+
:type _request_auth: dict, optional
|
|
376
|
+
:param _content_type: force content-type for the request.
|
|
377
|
+
:type _content_type: str, Optional
|
|
378
|
+
:param _headers: set to override the headers for a single
|
|
379
|
+
request; this effectively ignores the headers
|
|
380
|
+
in the spec for a single request.
|
|
381
|
+
:type _headers: dict, optional
|
|
382
|
+
:param _host_index: set to override the host_index for a single
|
|
383
|
+
request; this effectively ignores the host_index
|
|
384
|
+
in the spec for a single request.
|
|
385
|
+
:type _host_index: int, optional
|
|
386
|
+
:return: Returns the result object.
|
|
387
|
+
""" # noqa: E501
|
|
388
|
+
|
|
389
|
+
_param = self._remove_rbac_role_from_user_serialize(
|
|
390
|
+
user_id=user_id,
|
|
391
|
+
_request_auth=_request_auth,
|
|
392
|
+
_content_type=_content_type,
|
|
393
|
+
_headers=_headers,
|
|
394
|
+
_host_index=_host_index
|
|
395
|
+
)
|
|
396
|
+
|
|
397
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
398
|
+
'200': "CommonResponseModel",
|
|
399
|
+
'400': "ErrorResponseModel",
|
|
400
|
+
'401': "ErrorResponseModel",
|
|
401
|
+
'404': "ErrorResponseModel",
|
|
402
|
+
'500': None,
|
|
403
|
+
}
|
|
404
|
+
response_data = self.api_client.call_api(
|
|
405
|
+
*_param,
|
|
406
|
+
_request_timeout=_request_timeout
|
|
407
|
+
)
|
|
408
|
+
response_data.read()
|
|
409
|
+
return self.api_client.response_deserialize(
|
|
410
|
+
response_data=response_data,
|
|
411
|
+
response_types_map=_response_types_map,
|
|
412
|
+
).data
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
@validate_call
|
|
416
|
+
def remove_rbac_role_from_user_with_http_info(
|
|
417
|
+
self,
|
|
418
|
+
user_id: StrictInt,
|
|
419
|
+
_request_timeout: Union[
|
|
420
|
+
None,
|
|
421
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
422
|
+
Tuple[
|
|
423
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
424
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
425
|
+
]
|
|
426
|
+
] = None,
|
|
427
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
428
|
+
_content_type: Optional[StrictStr] = None,
|
|
429
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
430
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
431
|
+
) -> ApiResponse[CommonResponseModel]:
|
|
432
|
+
"""Remove RBAC Role From User
|
|
433
|
+
|
|
434
|
+
Removes an RBAC role from a user within your organization, revoking the resource permissions they had access to. Provide the user ID in the path. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/rbac/manage-member-roles/revoke-rbac-role).
|
|
435
|
+
|
|
436
|
+
:param user_id: (required)
|
|
437
|
+
:type user_id: int
|
|
438
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
439
|
+
number provided, it will be total request
|
|
440
|
+
timeout. It can also be a pair (tuple) of
|
|
441
|
+
(connection, read) timeouts.
|
|
442
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
443
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
444
|
+
request; this effectively ignores the
|
|
445
|
+
authentication in the spec for a single request.
|
|
446
|
+
:type _request_auth: dict, optional
|
|
447
|
+
:param _content_type: force content-type for the request.
|
|
448
|
+
:type _content_type: str, Optional
|
|
449
|
+
:param _headers: set to override the headers for a single
|
|
450
|
+
request; this effectively ignores the headers
|
|
451
|
+
in the spec for a single request.
|
|
452
|
+
:type _headers: dict, optional
|
|
453
|
+
:param _host_index: set to override the host_index for a single
|
|
454
|
+
request; this effectively ignores the host_index
|
|
455
|
+
in the spec for a single request.
|
|
456
|
+
:type _host_index: int, optional
|
|
457
|
+
:return: Returns the result object.
|
|
458
|
+
""" # noqa: E501
|
|
459
|
+
|
|
460
|
+
_param = self._remove_rbac_role_from_user_serialize(
|
|
461
|
+
user_id=user_id,
|
|
462
|
+
_request_auth=_request_auth,
|
|
463
|
+
_content_type=_content_type,
|
|
464
|
+
_headers=_headers,
|
|
465
|
+
_host_index=_host_index
|
|
466
|
+
)
|
|
467
|
+
|
|
468
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
469
|
+
'200': "CommonResponseModel",
|
|
470
|
+
'400': "ErrorResponseModel",
|
|
471
|
+
'401': "ErrorResponseModel",
|
|
472
|
+
'404': "ErrorResponseModel",
|
|
473
|
+
'500': None,
|
|
474
|
+
}
|
|
475
|
+
response_data = self.api_client.call_api(
|
|
476
|
+
*_param,
|
|
477
|
+
_request_timeout=_request_timeout
|
|
478
|
+
)
|
|
479
|
+
response_data.read()
|
|
480
|
+
return self.api_client.response_deserialize(
|
|
481
|
+
response_data=response_data,
|
|
482
|
+
response_types_map=_response_types_map,
|
|
483
|
+
)
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
@validate_call
|
|
487
|
+
def remove_rbac_role_from_user_without_preload_content(
|
|
488
|
+
self,
|
|
489
|
+
user_id: StrictInt,
|
|
490
|
+
_request_timeout: Union[
|
|
491
|
+
None,
|
|
492
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
493
|
+
Tuple[
|
|
494
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
495
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
496
|
+
]
|
|
497
|
+
] = None,
|
|
498
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
499
|
+
_content_type: Optional[StrictStr] = None,
|
|
500
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
501
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
502
|
+
) -> RESTResponseType:
|
|
503
|
+
"""Remove RBAC Role From User
|
|
504
|
+
|
|
505
|
+
Removes an RBAC role from a user within your organization, revoking the resource permissions they had access to. Provide the user ID in the path. For additional information, [click here](https://infrahub-doc.nexgencloud.com/docs/api-reference/auth-resources/rbac/manage-member-roles/revoke-rbac-role).
|
|
506
|
+
|
|
507
|
+
:param user_id: (required)
|
|
508
|
+
:type user_id: int
|
|
509
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
510
|
+
number provided, it will be total request
|
|
511
|
+
timeout. It can also be a pair (tuple) of
|
|
512
|
+
(connection, read) timeouts.
|
|
513
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
514
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
515
|
+
request; this effectively ignores the
|
|
516
|
+
authentication in the spec for a single request.
|
|
517
|
+
:type _request_auth: dict, optional
|
|
518
|
+
:param _content_type: force content-type for the request.
|
|
519
|
+
:type _content_type: str, Optional
|
|
520
|
+
:param _headers: set to override the headers for a single
|
|
521
|
+
request; this effectively ignores the headers
|
|
522
|
+
in the spec for a single request.
|
|
523
|
+
:type _headers: dict, optional
|
|
524
|
+
:param _host_index: set to override the host_index for a single
|
|
525
|
+
request; this effectively ignores the host_index
|
|
526
|
+
in the spec for a single request.
|
|
527
|
+
:type _host_index: int, optional
|
|
528
|
+
:return: Returns the result object.
|
|
529
|
+
""" # noqa: E501
|
|
530
|
+
|
|
531
|
+
_param = self._remove_rbac_role_from_user_serialize(
|
|
532
|
+
user_id=user_id,
|
|
533
|
+
_request_auth=_request_auth,
|
|
534
|
+
_content_type=_content_type,
|
|
535
|
+
_headers=_headers,
|
|
536
|
+
_host_index=_host_index
|
|
537
|
+
)
|
|
538
|
+
|
|
539
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
540
|
+
'200': "CommonResponseModel",
|
|
541
|
+
'400': "ErrorResponseModel",
|
|
542
|
+
'401': "ErrorResponseModel",
|
|
543
|
+
'404': "ErrorResponseModel",
|
|
544
|
+
'500': None,
|
|
545
|
+
}
|
|
546
|
+
response_data = self.api_client.call_api(
|
|
547
|
+
*_param,
|
|
548
|
+
_request_timeout=_request_timeout
|
|
549
|
+
)
|
|
550
|
+
return response_data.response
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
def _remove_rbac_role_from_user_serialize(
|
|
554
|
+
self,
|
|
555
|
+
user_id,
|
|
556
|
+
_request_auth,
|
|
557
|
+
_content_type,
|
|
558
|
+
_headers,
|
|
559
|
+
_host_index,
|
|
560
|
+
) -> RequestSerialized:
|
|
561
|
+
|
|
562
|
+
_host = None
|
|
563
|
+
|
|
564
|
+
_collection_formats: Dict[str, str] = {
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
_path_params: Dict[str, str] = {}
|
|
568
|
+
_query_params: List[Tuple[str, str]] = []
|
|
569
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
570
|
+
_form_params: List[Tuple[str, str]] = []
|
|
571
|
+
_files: Dict[
|
|
572
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
573
|
+
] = {}
|
|
574
|
+
_body_params: Optional[bytes] = None
|
|
575
|
+
|
|
576
|
+
# process the path parameters
|
|
577
|
+
if user_id is not None:
|
|
578
|
+
_path_params['user_id'] = user_id
|
|
579
|
+
# process the query parameters
|
|
580
|
+
# process the header parameters
|
|
581
|
+
# process the form parameters
|
|
582
|
+
# process the body parameter
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
# set the HTTP header `Accept`
|
|
586
|
+
if 'Accept' not in _header_params:
|
|
587
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
588
|
+
[
|
|
589
|
+
'application/json'
|
|
590
|
+
]
|
|
591
|
+
)
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
# authentication setting
|
|
595
|
+
_auth_settings: List[str] = [
|
|
596
|
+
'apiKey',
|
|
597
|
+
'accessToken'
|
|
598
|
+
]
|
|
599
|
+
|
|
600
|
+
return self.api_client.param_serialize(
|
|
601
|
+
method='DELETE',
|
|
602
|
+
resource_path='/auth/users/{user_id}/roles',
|
|
603
|
+
path_params=_path_params,
|
|
604
|
+
query_params=_query_params,
|
|
605
|
+
header_params=_header_params,
|
|
606
|
+
body=_body_params,
|
|
607
|
+
post_params=_form_params,
|
|
608
|
+
files=_files,
|
|
609
|
+
auth_settings=_auth_settings,
|
|
610
|
+
collection_formats=_collection_formats,
|
|
611
|
+
_host=_host,
|
|
612
|
+
_request_auth=_request_auth
|
|
613
|
+
)
|
|
614
|
+
|
|
615
|
+
|