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,1217 @@
|
|
|
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 Field, StrictInt, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from ..models.import_keypair_payload import ImportKeypairPayload
|
|
23
|
+
from ..models.import_keypair_response import ImportKeypairResponse
|
|
24
|
+
from ..models.keypairs import Keypairs
|
|
25
|
+
from ..models.response_model import ResponseModel
|
|
26
|
+
from ..models.update_keypair_name import UpdateKeypairName
|
|
27
|
+
from ..models.update_keypairnameresponse import UpdateKeypairnameresponse
|
|
28
|
+
|
|
29
|
+
from ..api_client import ApiClient, RequestSerialized
|
|
30
|
+
from ..api_response import ApiResponse
|
|
31
|
+
from ..rest import RESTResponseType
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class KeypairApi:
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, api_client=None) -> None:
|
|
42
|
+
if api_client is None:
|
|
43
|
+
api_client = ApiClient.get_default()
|
|
44
|
+
self.api_client = api_client
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@validate_call
|
|
48
|
+
def delete_key_pair(
|
|
49
|
+
self,
|
|
50
|
+
id: StrictInt,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> ResponseModel:
|
|
64
|
+
"""Delete key pair
|
|
65
|
+
|
|
66
|
+
Permanently deletes a specified key pair. Include the key pair ID in the request path to remove the designated key pair.
|
|
67
|
+
|
|
68
|
+
:param id: (required)
|
|
69
|
+
:type id: int
|
|
70
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
71
|
+
number provided, it will be total request
|
|
72
|
+
timeout. It can also be a pair (tuple) of
|
|
73
|
+
(connection, read) timeouts.
|
|
74
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
75
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
76
|
+
request; this effectively ignores the
|
|
77
|
+
authentication in the spec for a single request.
|
|
78
|
+
:type _request_auth: dict, optional
|
|
79
|
+
:param _content_type: force content-type for the request.
|
|
80
|
+
:type _content_type: str, Optional
|
|
81
|
+
:param _headers: set to override the headers for a single
|
|
82
|
+
request; this effectively ignores the headers
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _headers: dict, optional
|
|
85
|
+
:param _host_index: set to override the host_index for a single
|
|
86
|
+
request; this effectively ignores the host_index
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _host_index: int, optional
|
|
89
|
+
:return: Returns the result object.
|
|
90
|
+
""" # noqa: E501
|
|
91
|
+
|
|
92
|
+
_param = self._delete_key_pair_serialize(
|
|
93
|
+
id=id,
|
|
94
|
+
_request_auth=_request_auth,
|
|
95
|
+
_content_type=_content_type,
|
|
96
|
+
_headers=_headers,
|
|
97
|
+
_host_index=_host_index
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
101
|
+
'200': "ResponseModel",
|
|
102
|
+
'400': "ErrorResponseModel",
|
|
103
|
+
'401': "ErrorResponseModel",
|
|
104
|
+
'404': "ErrorResponseModel",
|
|
105
|
+
'500': None,
|
|
106
|
+
}
|
|
107
|
+
response_data = self.api_client.call_api(
|
|
108
|
+
*_param,
|
|
109
|
+
_request_timeout=_request_timeout
|
|
110
|
+
)
|
|
111
|
+
response_data.read()
|
|
112
|
+
return self.api_client.response_deserialize(
|
|
113
|
+
response_data=response_data,
|
|
114
|
+
response_types_map=_response_types_map,
|
|
115
|
+
).data
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
@validate_call
|
|
119
|
+
def delete_key_pair_with_http_info(
|
|
120
|
+
self,
|
|
121
|
+
id: StrictInt,
|
|
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[ResponseModel]:
|
|
135
|
+
"""Delete key pair
|
|
136
|
+
|
|
137
|
+
Permanently deletes a specified key pair. Include the key pair ID in the request path to remove the designated key pair.
|
|
138
|
+
|
|
139
|
+
:param id: (required)
|
|
140
|
+
:type id: int
|
|
141
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
142
|
+
number provided, it will be total request
|
|
143
|
+
timeout. It can also be a pair (tuple) of
|
|
144
|
+
(connection, read) timeouts.
|
|
145
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
146
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
147
|
+
request; this effectively ignores the
|
|
148
|
+
authentication in the spec for a single request.
|
|
149
|
+
:type _request_auth: dict, optional
|
|
150
|
+
:param _content_type: force content-type for the request.
|
|
151
|
+
:type _content_type: str, Optional
|
|
152
|
+
:param _headers: set to override the headers for a single
|
|
153
|
+
request; this effectively ignores the headers
|
|
154
|
+
in the spec for a single request.
|
|
155
|
+
:type _headers: dict, optional
|
|
156
|
+
:param _host_index: set to override the host_index for a single
|
|
157
|
+
request; this effectively ignores the host_index
|
|
158
|
+
in the spec for a single request.
|
|
159
|
+
:type _host_index: int, optional
|
|
160
|
+
:return: Returns the result object.
|
|
161
|
+
""" # noqa: E501
|
|
162
|
+
|
|
163
|
+
_param = self._delete_key_pair_serialize(
|
|
164
|
+
id=id,
|
|
165
|
+
_request_auth=_request_auth,
|
|
166
|
+
_content_type=_content_type,
|
|
167
|
+
_headers=_headers,
|
|
168
|
+
_host_index=_host_index
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
172
|
+
'200': "ResponseModel",
|
|
173
|
+
'400': "ErrorResponseModel",
|
|
174
|
+
'401': "ErrorResponseModel",
|
|
175
|
+
'404': "ErrorResponseModel",
|
|
176
|
+
'500': None,
|
|
177
|
+
}
|
|
178
|
+
response_data = self.api_client.call_api(
|
|
179
|
+
*_param,
|
|
180
|
+
_request_timeout=_request_timeout
|
|
181
|
+
)
|
|
182
|
+
response_data.read()
|
|
183
|
+
return self.api_client.response_deserialize(
|
|
184
|
+
response_data=response_data,
|
|
185
|
+
response_types_map=_response_types_map,
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
@validate_call
|
|
190
|
+
def delete_key_pair_without_preload_content(
|
|
191
|
+
self,
|
|
192
|
+
id: StrictInt,
|
|
193
|
+
_request_timeout: Union[
|
|
194
|
+
None,
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
196
|
+
Tuple[
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
198
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
199
|
+
]
|
|
200
|
+
] = None,
|
|
201
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
202
|
+
_content_type: Optional[StrictStr] = None,
|
|
203
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
205
|
+
) -> RESTResponseType:
|
|
206
|
+
"""Delete key pair
|
|
207
|
+
|
|
208
|
+
Permanently deletes a specified key pair. Include the key pair ID in the request path to remove the designated key pair.
|
|
209
|
+
|
|
210
|
+
:param id: (required)
|
|
211
|
+
:type id: int
|
|
212
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
213
|
+
number provided, it will be total request
|
|
214
|
+
timeout. It can also be a pair (tuple) of
|
|
215
|
+
(connection, read) timeouts.
|
|
216
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
217
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
218
|
+
request; this effectively ignores the
|
|
219
|
+
authentication in the spec for a single request.
|
|
220
|
+
:type _request_auth: dict, optional
|
|
221
|
+
:param _content_type: force content-type for the request.
|
|
222
|
+
:type _content_type: str, Optional
|
|
223
|
+
:param _headers: set to override the headers for a single
|
|
224
|
+
request; this effectively ignores the headers
|
|
225
|
+
in the spec for a single request.
|
|
226
|
+
:type _headers: dict, optional
|
|
227
|
+
:param _host_index: set to override the host_index for a single
|
|
228
|
+
request; this effectively ignores the host_index
|
|
229
|
+
in the spec for a single request.
|
|
230
|
+
:type _host_index: int, optional
|
|
231
|
+
:return: Returns the result object.
|
|
232
|
+
""" # noqa: E501
|
|
233
|
+
|
|
234
|
+
_param = self._delete_key_pair_serialize(
|
|
235
|
+
id=id,
|
|
236
|
+
_request_auth=_request_auth,
|
|
237
|
+
_content_type=_content_type,
|
|
238
|
+
_headers=_headers,
|
|
239
|
+
_host_index=_host_index
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
243
|
+
'200': "ResponseModel",
|
|
244
|
+
'400': "ErrorResponseModel",
|
|
245
|
+
'401': "ErrorResponseModel",
|
|
246
|
+
'404': "ErrorResponseModel",
|
|
247
|
+
'500': None,
|
|
248
|
+
}
|
|
249
|
+
response_data = self.api_client.call_api(
|
|
250
|
+
*_param,
|
|
251
|
+
_request_timeout=_request_timeout
|
|
252
|
+
)
|
|
253
|
+
return response_data.response
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
def _delete_key_pair_serialize(
|
|
257
|
+
self,
|
|
258
|
+
id,
|
|
259
|
+
_request_auth,
|
|
260
|
+
_content_type,
|
|
261
|
+
_headers,
|
|
262
|
+
_host_index,
|
|
263
|
+
) -> RequestSerialized:
|
|
264
|
+
|
|
265
|
+
_host = None
|
|
266
|
+
|
|
267
|
+
_collection_formats: Dict[str, str] = {
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
_path_params: Dict[str, str] = {}
|
|
271
|
+
_query_params: List[Tuple[str, str]] = []
|
|
272
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
273
|
+
_form_params: List[Tuple[str, str]] = []
|
|
274
|
+
_files: Dict[
|
|
275
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
276
|
+
] = {}
|
|
277
|
+
_body_params: Optional[bytes] = None
|
|
278
|
+
|
|
279
|
+
# process the path parameters
|
|
280
|
+
if id is not None:
|
|
281
|
+
_path_params['id'] = id
|
|
282
|
+
# process the query parameters
|
|
283
|
+
# process the header parameters
|
|
284
|
+
# process the form parameters
|
|
285
|
+
# process the body parameter
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
# set the HTTP header `Accept`
|
|
289
|
+
if 'Accept' not in _header_params:
|
|
290
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
291
|
+
[
|
|
292
|
+
'application/json'
|
|
293
|
+
]
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
# authentication setting
|
|
298
|
+
_auth_settings: List[str] = [
|
|
299
|
+
'apiKey',
|
|
300
|
+
'accessToken'
|
|
301
|
+
]
|
|
302
|
+
|
|
303
|
+
return self.api_client.param_serialize(
|
|
304
|
+
method='DELETE',
|
|
305
|
+
resource_path='/core/keypair/{id}',
|
|
306
|
+
path_params=_path_params,
|
|
307
|
+
query_params=_query_params,
|
|
308
|
+
header_params=_header_params,
|
|
309
|
+
body=_body_params,
|
|
310
|
+
post_params=_form_params,
|
|
311
|
+
files=_files,
|
|
312
|
+
auth_settings=_auth_settings,
|
|
313
|
+
collection_formats=_collection_formats,
|
|
314
|
+
_host=_host,
|
|
315
|
+
_request_auth=_request_auth
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
@validate_call
|
|
322
|
+
def import_key_pair(
|
|
323
|
+
self,
|
|
324
|
+
payload: ImportKeypairPayload,
|
|
325
|
+
_request_timeout: Union[
|
|
326
|
+
None,
|
|
327
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
328
|
+
Tuple[
|
|
329
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
330
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
331
|
+
]
|
|
332
|
+
] = None,
|
|
333
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
334
|
+
_content_type: Optional[StrictStr] = None,
|
|
335
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
336
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
337
|
+
) -> ImportKeypairResponse:
|
|
338
|
+
"""Import key pair
|
|
339
|
+
|
|
340
|
+
Imports a new key pair for secure shell (SSH) access to your resources. To import a new key pair, include the key name, environment name, and public key in the request body. For additional information on importing SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair#importing-an-ssh-key).
|
|
341
|
+
|
|
342
|
+
:param payload: (required)
|
|
343
|
+
:type payload: ImportKeypairPayload
|
|
344
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
345
|
+
number provided, it will be total request
|
|
346
|
+
timeout. It can also be a pair (tuple) of
|
|
347
|
+
(connection, read) timeouts.
|
|
348
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
349
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
350
|
+
request; this effectively ignores the
|
|
351
|
+
authentication in the spec for a single request.
|
|
352
|
+
:type _request_auth: dict, optional
|
|
353
|
+
:param _content_type: force content-type for the request.
|
|
354
|
+
:type _content_type: str, Optional
|
|
355
|
+
:param _headers: set to override the headers for a single
|
|
356
|
+
request; this effectively ignores the headers
|
|
357
|
+
in the spec for a single request.
|
|
358
|
+
:type _headers: dict, optional
|
|
359
|
+
:param _host_index: set to override the host_index for a single
|
|
360
|
+
request; this effectively ignores the host_index
|
|
361
|
+
in the spec for a single request.
|
|
362
|
+
:type _host_index: int, optional
|
|
363
|
+
:return: Returns the result object.
|
|
364
|
+
""" # noqa: E501
|
|
365
|
+
|
|
366
|
+
_param = self._import_key_pair_serialize(
|
|
367
|
+
payload=payload,
|
|
368
|
+
_request_auth=_request_auth,
|
|
369
|
+
_content_type=_content_type,
|
|
370
|
+
_headers=_headers,
|
|
371
|
+
_host_index=_host_index
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
375
|
+
'200': "ImportKeypairResponse",
|
|
376
|
+
'400': "ErrorResponseModel",
|
|
377
|
+
'401': "ErrorResponseModel",
|
|
378
|
+
'404': "ErrorResponseModel",
|
|
379
|
+
'409': "ErrorResponseModel",
|
|
380
|
+
'500': None,
|
|
381
|
+
}
|
|
382
|
+
response_data = self.api_client.call_api(
|
|
383
|
+
*_param,
|
|
384
|
+
_request_timeout=_request_timeout
|
|
385
|
+
)
|
|
386
|
+
response_data.read()
|
|
387
|
+
return self.api_client.response_deserialize(
|
|
388
|
+
response_data=response_data,
|
|
389
|
+
response_types_map=_response_types_map,
|
|
390
|
+
).data
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
@validate_call
|
|
394
|
+
def import_key_pair_with_http_info(
|
|
395
|
+
self,
|
|
396
|
+
payload: ImportKeypairPayload,
|
|
397
|
+
_request_timeout: Union[
|
|
398
|
+
None,
|
|
399
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
400
|
+
Tuple[
|
|
401
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
402
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
403
|
+
]
|
|
404
|
+
] = None,
|
|
405
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
406
|
+
_content_type: Optional[StrictStr] = None,
|
|
407
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
408
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
409
|
+
) -> ApiResponse[ImportKeypairResponse]:
|
|
410
|
+
"""Import key pair
|
|
411
|
+
|
|
412
|
+
Imports a new key pair for secure shell (SSH) access to your resources. To import a new key pair, include the key name, environment name, and public key in the request body. For additional information on importing SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair#importing-an-ssh-key).
|
|
413
|
+
|
|
414
|
+
:param payload: (required)
|
|
415
|
+
:type payload: ImportKeypairPayload
|
|
416
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
417
|
+
number provided, it will be total request
|
|
418
|
+
timeout. It can also be a pair (tuple) of
|
|
419
|
+
(connection, read) timeouts.
|
|
420
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
421
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
422
|
+
request; this effectively ignores the
|
|
423
|
+
authentication in the spec for a single request.
|
|
424
|
+
:type _request_auth: dict, optional
|
|
425
|
+
:param _content_type: force content-type for the request.
|
|
426
|
+
:type _content_type: str, Optional
|
|
427
|
+
:param _headers: set to override the headers for a single
|
|
428
|
+
request; this effectively ignores the headers
|
|
429
|
+
in the spec for a single request.
|
|
430
|
+
:type _headers: dict, optional
|
|
431
|
+
:param _host_index: set to override the host_index for a single
|
|
432
|
+
request; this effectively ignores the host_index
|
|
433
|
+
in the spec for a single request.
|
|
434
|
+
:type _host_index: int, optional
|
|
435
|
+
:return: Returns the result object.
|
|
436
|
+
""" # noqa: E501
|
|
437
|
+
|
|
438
|
+
_param = self._import_key_pair_serialize(
|
|
439
|
+
payload=payload,
|
|
440
|
+
_request_auth=_request_auth,
|
|
441
|
+
_content_type=_content_type,
|
|
442
|
+
_headers=_headers,
|
|
443
|
+
_host_index=_host_index
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
447
|
+
'200': "ImportKeypairResponse",
|
|
448
|
+
'400': "ErrorResponseModel",
|
|
449
|
+
'401': "ErrorResponseModel",
|
|
450
|
+
'404': "ErrorResponseModel",
|
|
451
|
+
'409': "ErrorResponseModel",
|
|
452
|
+
'500': None,
|
|
453
|
+
}
|
|
454
|
+
response_data = self.api_client.call_api(
|
|
455
|
+
*_param,
|
|
456
|
+
_request_timeout=_request_timeout
|
|
457
|
+
)
|
|
458
|
+
response_data.read()
|
|
459
|
+
return self.api_client.response_deserialize(
|
|
460
|
+
response_data=response_data,
|
|
461
|
+
response_types_map=_response_types_map,
|
|
462
|
+
)
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
@validate_call
|
|
466
|
+
def import_key_pair_without_preload_content(
|
|
467
|
+
self,
|
|
468
|
+
payload: ImportKeypairPayload,
|
|
469
|
+
_request_timeout: Union[
|
|
470
|
+
None,
|
|
471
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
472
|
+
Tuple[
|
|
473
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
474
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
475
|
+
]
|
|
476
|
+
] = None,
|
|
477
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
478
|
+
_content_type: Optional[StrictStr] = None,
|
|
479
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
480
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
481
|
+
) -> RESTResponseType:
|
|
482
|
+
"""Import key pair
|
|
483
|
+
|
|
484
|
+
Imports a new key pair for secure shell (SSH) access to your resources. To import a new key pair, include the key name, environment name, and public key in the request body. For additional information on importing SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair#importing-an-ssh-key).
|
|
485
|
+
|
|
486
|
+
:param payload: (required)
|
|
487
|
+
:type payload: ImportKeypairPayload
|
|
488
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
489
|
+
number provided, it will be total request
|
|
490
|
+
timeout. It can also be a pair (tuple) of
|
|
491
|
+
(connection, read) timeouts.
|
|
492
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
493
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
494
|
+
request; this effectively ignores the
|
|
495
|
+
authentication in the spec for a single request.
|
|
496
|
+
:type _request_auth: dict, optional
|
|
497
|
+
:param _content_type: force content-type for the request.
|
|
498
|
+
:type _content_type: str, Optional
|
|
499
|
+
:param _headers: set to override the headers for a single
|
|
500
|
+
request; this effectively ignores the headers
|
|
501
|
+
in the spec for a single request.
|
|
502
|
+
:type _headers: dict, optional
|
|
503
|
+
:param _host_index: set to override the host_index for a single
|
|
504
|
+
request; this effectively ignores the host_index
|
|
505
|
+
in the spec for a single request.
|
|
506
|
+
:type _host_index: int, optional
|
|
507
|
+
:return: Returns the result object.
|
|
508
|
+
""" # noqa: E501
|
|
509
|
+
|
|
510
|
+
_param = self._import_key_pair_serialize(
|
|
511
|
+
payload=payload,
|
|
512
|
+
_request_auth=_request_auth,
|
|
513
|
+
_content_type=_content_type,
|
|
514
|
+
_headers=_headers,
|
|
515
|
+
_host_index=_host_index
|
|
516
|
+
)
|
|
517
|
+
|
|
518
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
519
|
+
'200': "ImportKeypairResponse",
|
|
520
|
+
'400': "ErrorResponseModel",
|
|
521
|
+
'401': "ErrorResponseModel",
|
|
522
|
+
'404': "ErrorResponseModel",
|
|
523
|
+
'409': "ErrorResponseModel",
|
|
524
|
+
'500': None,
|
|
525
|
+
}
|
|
526
|
+
response_data = self.api_client.call_api(
|
|
527
|
+
*_param,
|
|
528
|
+
_request_timeout=_request_timeout
|
|
529
|
+
)
|
|
530
|
+
return response_data.response
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
def _import_key_pair_serialize(
|
|
534
|
+
self,
|
|
535
|
+
payload,
|
|
536
|
+
_request_auth,
|
|
537
|
+
_content_type,
|
|
538
|
+
_headers,
|
|
539
|
+
_host_index,
|
|
540
|
+
) -> RequestSerialized:
|
|
541
|
+
|
|
542
|
+
_host = None
|
|
543
|
+
|
|
544
|
+
_collection_formats: Dict[str, str] = {
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
_path_params: Dict[str, str] = {}
|
|
548
|
+
_query_params: List[Tuple[str, str]] = []
|
|
549
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
550
|
+
_form_params: List[Tuple[str, str]] = []
|
|
551
|
+
_files: Dict[
|
|
552
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
553
|
+
] = {}
|
|
554
|
+
_body_params: Optional[bytes] = None
|
|
555
|
+
|
|
556
|
+
# process the path parameters
|
|
557
|
+
# process the query parameters
|
|
558
|
+
# process the header parameters
|
|
559
|
+
# process the form parameters
|
|
560
|
+
# process the body parameter
|
|
561
|
+
if payload is not None:
|
|
562
|
+
_body_params = payload
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
# set the HTTP header `Accept`
|
|
566
|
+
if 'Accept' not in _header_params:
|
|
567
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
568
|
+
[
|
|
569
|
+
'application/json'
|
|
570
|
+
]
|
|
571
|
+
)
|
|
572
|
+
|
|
573
|
+
# set the HTTP header `Content-Type`
|
|
574
|
+
if _content_type:
|
|
575
|
+
_header_params['Content-Type'] = _content_type
|
|
576
|
+
else:
|
|
577
|
+
_default_content_type = (
|
|
578
|
+
self.api_client.select_header_content_type(
|
|
579
|
+
[
|
|
580
|
+
'application/json'
|
|
581
|
+
]
|
|
582
|
+
)
|
|
583
|
+
)
|
|
584
|
+
if _default_content_type is not None:
|
|
585
|
+
_header_params['Content-Type'] = _default_content_type
|
|
586
|
+
|
|
587
|
+
# authentication setting
|
|
588
|
+
_auth_settings: List[str] = [
|
|
589
|
+
'apiKey',
|
|
590
|
+
'accessToken'
|
|
591
|
+
]
|
|
592
|
+
|
|
593
|
+
return self.api_client.param_serialize(
|
|
594
|
+
method='POST',
|
|
595
|
+
resource_path='/core/keypairs',
|
|
596
|
+
path_params=_path_params,
|
|
597
|
+
query_params=_query_params,
|
|
598
|
+
header_params=_header_params,
|
|
599
|
+
body=_body_params,
|
|
600
|
+
post_params=_form_params,
|
|
601
|
+
files=_files,
|
|
602
|
+
auth_settings=_auth_settings,
|
|
603
|
+
collection_formats=_collection_formats,
|
|
604
|
+
_host=_host,
|
|
605
|
+
_request_auth=_request_auth
|
|
606
|
+
)
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
@validate_call
|
|
612
|
+
def list_key_pairs(
|
|
613
|
+
self,
|
|
614
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
615
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
616
|
+
search: Optional[StrictStr] = None,
|
|
617
|
+
_request_timeout: Union[
|
|
618
|
+
None,
|
|
619
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
620
|
+
Tuple[
|
|
621
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
622
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
623
|
+
]
|
|
624
|
+
] = None,
|
|
625
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
626
|
+
_content_type: Optional[StrictStr] = None,
|
|
627
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
628
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
629
|
+
) -> Keypairs:
|
|
630
|
+
"""List key pairs
|
|
631
|
+
|
|
632
|
+
Retrieves a list of your existing SSH key pairs, providing details for each. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/keypairs-available-features).
|
|
633
|
+
|
|
634
|
+
:param page: Page Number
|
|
635
|
+
:type page: str
|
|
636
|
+
:param page_size: Data Per Page
|
|
637
|
+
:type page_size: str
|
|
638
|
+
:param search:
|
|
639
|
+
:type search: str
|
|
640
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
641
|
+
number provided, it will be total request
|
|
642
|
+
timeout. It can also be a pair (tuple) of
|
|
643
|
+
(connection, read) timeouts.
|
|
644
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
645
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
646
|
+
request; this effectively ignores the
|
|
647
|
+
authentication in the spec for a single request.
|
|
648
|
+
:type _request_auth: dict, optional
|
|
649
|
+
:param _content_type: force content-type for the request.
|
|
650
|
+
:type _content_type: str, Optional
|
|
651
|
+
:param _headers: set to override the headers for a single
|
|
652
|
+
request; this effectively ignores the headers
|
|
653
|
+
in the spec for a single request.
|
|
654
|
+
:type _headers: dict, optional
|
|
655
|
+
:param _host_index: set to override the host_index for a single
|
|
656
|
+
request; this effectively ignores the host_index
|
|
657
|
+
in the spec for a single request.
|
|
658
|
+
:type _host_index: int, optional
|
|
659
|
+
:return: Returns the result object.
|
|
660
|
+
""" # noqa: E501
|
|
661
|
+
|
|
662
|
+
_param = self._list_key_pairs_serialize(
|
|
663
|
+
page=page,
|
|
664
|
+
page_size=page_size,
|
|
665
|
+
search=search,
|
|
666
|
+
_request_auth=_request_auth,
|
|
667
|
+
_content_type=_content_type,
|
|
668
|
+
_headers=_headers,
|
|
669
|
+
_host_index=_host_index
|
|
670
|
+
)
|
|
671
|
+
|
|
672
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
673
|
+
'200': "Keypairs",
|
|
674
|
+
'400': "ErrorResponseModel",
|
|
675
|
+
'401': "ErrorResponseModel",
|
|
676
|
+
'500': None,
|
|
677
|
+
}
|
|
678
|
+
response_data = self.api_client.call_api(
|
|
679
|
+
*_param,
|
|
680
|
+
_request_timeout=_request_timeout
|
|
681
|
+
)
|
|
682
|
+
response_data.read()
|
|
683
|
+
return self.api_client.response_deserialize(
|
|
684
|
+
response_data=response_data,
|
|
685
|
+
response_types_map=_response_types_map,
|
|
686
|
+
).data
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
@validate_call
|
|
690
|
+
def list_key_pairs_with_http_info(
|
|
691
|
+
self,
|
|
692
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
693
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
694
|
+
search: Optional[StrictStr] = None,
|
|
695
|
+
_request_timeout: Union[
|
|
696
|
+
None,
|
|
697
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
698
|
+
Tuple[
|
|
699
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
700
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
701
|
+
]
|
|
702
|
+
] = None,
|
|
703
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
704
|
+
_content_type: Optional[StrictStr] = None,
|
|
705
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
706
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
707
|
+
) -> ApiResponse[Keypairs]:
|
|
708
|
+
"""List key pairs
|
|
709
|
+
|
|
710
|
+
Retrieves a list of your existing SSH key pairs, providing details for each. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/keypairs-available-features).
|
|
711
|
+
|
|
712
|
+
:param page: Page Number
|
|
713
|
+
:type page: str
|
|
714
|
+
:param page_size: Data Per Page
|
|
715
|
+
:type page_size: str
|
|
716
|
+
:param search:
|
|
717
|
+
:type search: str
|
|
718
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
719
|
+
number provided, it will be total request
|
|
720
|
+
timeout. It can also be a pair (tuple) of
|
|
721
|
+
(connection, read) timeouts.
|
|
722
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
723
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
724
|
+
request; this effectively ignores the
|
|
725
|
+
authentication in the spec for a single request.
|
|
726
|
+
:type _request_auth: dict, optional
|
|
727
|
+
:param _content_type: force content-type for the request.
|
|
728
|
+
:type _content_type: str, Optional
|
|
729
|
+
:param _headers: set to override the headers for a single
|
|
730
|
+
request; this effectively ignores the headers
|
|
731
|
+
in the spec for a single request.
|
|
732
|
+
:type _headers: dict, optional
|
|
733
|
+
:param _host_index: set to override the host_index for a single
|
|
734
|
+
request; this effectively ignores the host_index
|
|
735
|
+
in the spec for a single request.
|
|
736
|
+
:type _host_index: int, optional
|
|
737
|
+
:return: Returns the result object.
|
|
738
|
+
""" # noqa: E501
|
|
739
|
+
|
|
740
|
+
_param = self._list_key_pairs_serialize(
|
|
741
|
+
page=page,
|
|
742
|
+
page_size=page_size,
|
|
743
|
+
search=search,
|
|
744
|
+
_request_auth=_request_auth,
|
|
745
|
+
_content_type=_content_type,
|
|
746
|
+
_headers=_headers,
|
|
747
|
+
_host_index=_host_index
|
|
748
|
+
)
|
|
749
|
+
|
|
750
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
751
|
+
'200': "Keypairs",
|
|
752
|
+
'400': "ErrorResponseModel",
|
|
753
|
+
'401': "ErrorResponseModel",
|
|
754
|
+
'500': None,
|
|
755
|
+
}
|
|
756
|
+
response_data = self.api_client.call_api(
|
|
757
|
+
*_param,
|
|
758
|
+
_request_timeout=_request_timeout
|
|
759
|
+
)
|
|
760
|
+
response_data.read()
|
|
761
|
+
return self.api_client.response_deserialize(
|
|
762
|
+
response_data=response_data,
|
|
763
|
+
response_types_map=_response_types_map,
|
|
764
|
+
)
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
@validate_call
|
|
768
|
+
def list_key_pairs_without_preload_content(
|
|
769
|
+
self,
|
|
770
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
771
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
772
|
+
search: Optional[StrictStr] = None,
|
|
773
|
+
_request_timeout: Union[
|
|
774
|
+
None,
|
|
775
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
776
|
+
Tuple[
|
|
777
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
778
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
779
|
+
]
|
|
780
|
+
] = None,
|
|
781
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
782
|
+
_content_type: Optional[StrictStr] = None,
|
|
783
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
784
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
785
|
+
) -> RESTResponseType:
|
|
786
|
+
"""List key pairs
|
|
787
|
+
|
|
788
|
+
Retrieves a list of your existing SSH key pairs, providing details for each. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/keypairs-available-features).
|
|
789
|
+
|
|
790
|
+
:param page: Page Number
|
|
791
|
+
:type page: str
|
|
792
|
+
:param page_size: Data Per Page
|
|
793
|
+
:type page_size: str
|
|
794
|
+
:param search:
|
|
795
|
+
:type search: str
|
|
796
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
797
|
+
number provided, it will be total request
|
|
798
|
+
timeout. It can also be a pair (tuple) of
|
|
799
|
+
(connection, read) timeouts.
|
|
800
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
801
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
802
|
+
request; this effectively ignores the
|
|
803
|
+
authentication in the spec for a single request.
|
|
804
|
+
:type _request_auth: dict, optional
|
|
805
|
+
:param _content_type: force content-type for the request.
|
|
806
|
+
:type _content_type: str, Optional
|
|
807
|
+
:param _headers: set to override the headers for a single
|
|
808
|
+
request; this effectively ignores the headers
|
|
809
|
+
in the spec for a single request.
|
|
810
|
+
:type _headers: dict, optional
|
|
811
|
+
:param _host_index: set to override the host_index for a single
|
|
812
|
+
request; this effectively ignores the host_index
|
|
813
|
+
in the spec for a single request.
|
|
814
|
+
:type _host_index: int, optional
|
|
815
|
+
:return: Returns the result object.
|
|
816
|
+
""" # noqa: E501
|
|
817
|
+
|
|
818
|
+
_param = self._list_key_pairs_serialize(
|
|
819
|
+
page=page,
|
|
820
|
+
page_size=page_size,
|
|
821
|
+
search=search,
|
|
822
|
+
_request_auth=_request_auth,
|
|
823
|
+
_content_type=_content_type,
|
|
824
|
+
_headers=_headers,
|
|
825
|
+
_host_index=_host_index
|
|
826
|
+
)
|
|
827
|
+
|
|
828
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
829
|
+
'200': "Keypairs",
|
|
830
|
+
'400': "ErrorResponseModel",
|
|
831
|
+
'401': "ErrorResponseModel",
|
|
832
|
+
'500': None,
|
|
833
|
+
}
|
|
834
|
+
response_data = self.api_client.call_api(
|
|
835
|
+
*_param,
|
|
836
|
+
_request_timeout=_request_timeout
|
|
837
|
+
)
|
|
838
|
+
return response_data.response
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
def _list_key_pairs_serialize(
|
|
842
|
+
self,
|
|
843
|
+
page,
|
|
844
|
+
page_size,
|
|
845
|
+
search,
|
|
846
|
+
_request_auth,
|
|
847
|
+
_content_type,
|
|
848
|
+
_headers,
|
|
849
|
+
_host_index,
|
|
850
|
+
) -> RequestSerialized:
|
|
851
|
+
|
|
852
|
+
_host = None
|
|
853
|
+
|
|
854
|
+
_collection_formats: Dict[str, str] = {
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
_path_params: Dict[str, str] = {}
|
|
858
|
+
_query_params: List[Tuple[str, str]] = []
|
|
859
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
860
|
+
_form_params: List[Tuple[str, str]] = []
|
|
861
|
+
_files: Dict[
|
|
862
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
863
|
+
] = {}
|
|
864
|
+
_body_params: Optional[bytes] = None
|
|
865
|
+
|
|
866
|
+
# process the path parameters
|
|
867
|
+
# process the query parameters
|
|
868
|
+
if page is not None:
|
|
869
|
+
|
|
870
|
+
_query_params.append(('page', page))
|
|
871
|
+
|
|
872
|
+
if page_size is not None:
|
|
873
|
+
|
|
874
|
+
_query_params.append(('pageSize', page_size))
|
|
875
|
+
|
|
876
|
+
if search is not None:
|
|
877
|
+
|
|
878
|
+
_query_params.append(('search', search))
|
|
879
|
+
|
|
880
|
+
# process the header parameters
|
|
881
|
+
# process the form parameters
|
|
882
|
+
# process the body parameter
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
# set the HTTP header `Accept`
|
|
886
|
+
if 'Accept' not in _header_params:
|
|
887
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
888
|
+
[
|
|
889
|
+
'application/json'
|
|
890
|
+
]
|
|
891
|
+
)
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
# authentication setting
|
|
895
|
+
_auth_settings: List[str] = [
|
|
896
|
+
'apiKey',
|
|
897
|
+
'accessToken'
|
|
898
|
+
]
|
|
899
|
+
|
|
900
|
+
return self.api_client.param_serialize(
|
|
901
|
+
method='GET',
|
|
902
|
+
resource_path='/core/keypairs',
|
|
903
|
+
path_params=_path_params,
|
|
904
|
+
query_params=_query_params,
|
|
905
|
+
header_params=_header_params,
|
|
906
|
+
body=_body_params,
|
|
907
|
+
post_params=_form_params,
|
|
908
|
+
files=_files,
|
|
909
|
+
auth_settings=_auth_settings,
|
|
910
|
+
collection_formats=_collection_formats,
|
|
911
|
+
_host=_host,
|
|
912
|
+
_request_auth=_request_auth
|
|
913
|
+
)
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
@validate_call
|
|
919
|
+
def update_key_pair_name(
|
|
920
|
+
self,
|
|
921
|
+
id: StrictInt,
|
|
922
|
+
payload: UpdateKeypairName,
|
|
923
|
+
_request_timeout: Union[
|
|
924
|
+
None,
|
|
925
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
926
|
+
Tuple[
|
|
927
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
928
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
929
|
+
]
|
|
930
|
+
] = None,
|
|
931
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
932
|
+
_content_type: Optional[StrictStr] = None,
|
|
933
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
934
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
935
|
+
) -> UpdateKeypairnameresponse:
|
|
936
|
+
"""Update key pair name
|
|
937
|
+
|
|
938
|
+
Updates the name of a specified key pair. Include the key pair ID in the request path and the new `name` of the key pair in the request body.
|
|
939
|
+
|
|
940
|
+
:param id: (required)
|
|
941
|
+
:type id: int
|
|
942
|
+
:param payload: (required)
|
|
943
|
+
:type payload: UpdateKeypairName
|
|
944
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
945
|
+
number provided, it will be total request
|
|
946
|
+
timeout. It can also be a pair (tuple) of
|
|
947
|
+
(connection, read) timeouts.
|
|
948
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
949
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
950
|
+
request; this effectively ignores the
|
|
951
|
+
authentication in the spec for a single request.
|
|
952
|
+
:type _request_auth: dict, optional
|
|
953
|
+
:param _content_type: force content-type for the request.
|
|
954
|
+
:type _content_type: str, Optional
|
|
955
|
+
:param _headers: set to override the headers for a single
|
|
956
|
+
request; this effectively ignores the headers
|
|
957
|
+
in the spec for a single request.
|
|
958
|
+
:type _headers: dict, optional
|
|
959
|
+
:param _host_index: set to override the host_index for a single
|
|
960
|
+
request; this effectively ignores the host_index
|
|
961
|
+
in the spec for a single request.
|
|
962
|
+
:type _host_index: int, optional
|
|
963
|
+
:return: Returns the result object.
|
|
964
|
+
""" # noqa: E501
|
|
965
|
+
|
|
966
|
+
_param = self._update_key_pair_name_serialize(
|
|
967
|
+
id=id,
|
|
968
|
+
payload=payload,
|
|
969
|
+
_request_auth=_request_auth,
|
|
970
|
+
_content_type=_content_type,
|
|
971
|
+
_headers=_headers,
|
|
972
|
+
_host_index=_host_index
|
|
973
|
+
)
|
|
974
|
+
|
|
975
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
976
|
+
'200': "UpdateKeypairnameresponse",
|
|
977
|
+
'400': "ErrorResponseModel",
|
|
978
|
+
'401': "ErrorResponseModel",
|
|
979
|
+
'404': "ErrorResponseModel",
|
|
980
|
+
'500': None,
|
|
981
|
+
}
|
|
982
|
+
response_data = self.api_client.call_api(
|
|
983
|
+
*_param,
|
|
984
|
+
_request_timeout=_request_timeout
|
|
985
|
+
)
|
|
986
|
+
response_data.read()
|
|
987
|
+
return self.api_client.response_deserialize(
|
|
988
|
+
response_data=response_data,
|
|
989
|
+
response_types_map=_response_types_map,
|
|
990
|
+
).data
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
@validate_call
|
|
994
|
+
def update_key_pair_name_with_http_info(
|
|
995
|
+
self,
|
|
996
|
+
id: StrictInt,
|
|
997
|
+
payload: UpdateKeypairName,
|
|
998
|
+
_request_timeout: Union[
|
|
999
|
+
None,
|
|
1000
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1001
|
+
Tuple[
|
|
1002
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1003
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1004
|
+
]
|
|
1005
|
+
] = None,
|
|
1006
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1007
|
+
_content_type: Optional[StrictStr] = None,
|
|
1008
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1009
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1010
|
+
) -> ApiResponse[UpdateKeypairnameresponse]:
|
|
1011
|
+
"""Update key pair name
|
|
1012
|
+
|
|
1013
|
+
Updates the name of a specified key pair. Include the key pair ID in the request path and the new `name` of the key pair in the request body.
|
|
1014
|
+
|
|
1015
|
+
:param id: (required)
|
|
1016
|
+
:type id: int
|
|
1017
|
+
:param payload: (required)
|
|
1018
|
+
:type payload: UpdateKeypairName
|
|
1019
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1020
|
+
number provided, it will be total request
|
|
1021
|
+
timeout. It can also be a pair (tuple) of
|
|
1022
|
+
(connection, read) timeouts.
|
|
1023
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1024
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1025
|
+
request; this effectively ignores the
|
|
1026
|
+
authentication in the spec for a single request.
|
|
1027
|
+
:type _request_auth: dict, optional
|
|
1028
|
+
:param _content_type: force content-type for the request.
|
|
1029
|
+
:type _content_type: str, Optional
|
|
1030
|
+
:param _headers: set to override the headers for a single
|
|
1031
|
+
request; this effectively ignores the headers
|
|
1032
|
+
in the spec for a single request.
|
|
1033
|
+
:type _headers: dict, optional
|
|
1034
|
+
:param _host_index: set to override the host_index for a single
|
|
1035
|
+
request; this effectively ignores the host_index
|
|
1036
|
+
in the spec for a single request.
|
|
1037
|
+
:type _host_index: int, optional
|
|
1038
|
+
:return: Returns the result object.
|
|
1039
|
+
""" # noqa: E501
|
|
1040
|
+
|
|
1041
|
+
_param = self._update_key_pair_name_serialize(
|
|
1042
|
+
id=id,
|
|
1043
|
+
payload=payload,
|
|
1044
|
+
_request_auth=_request_auth,
|
|
1045
|
+
_content_type=_content_type,
|
|
1046
|
+
_headers=_headers,
|
|
1047
|
+
_host_index=_host_index
|
|
1048
|
+
)
|
|
1049
|
+
|
|
1050
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1051
|
+
'200': "UpdateKeypairnameresponse",
|
|
1052
|
+
'400': "ErrorResponseModel",
|
|
1053
|
+
'401': "ErrorResponseModel",
|
|
1054
|
+
'404': "ErrorResponseModel",
|
|
1055
|
+
'500': None,
|
|
1056
|
+
}
|
|
1057
|
+
response_data = self.api_client.call_api(
|
|
1058
|
+
*_param,
|
|
1059
|
+
_request_timeout=_request_timeout
|
|
1060
|
+
)
|
|
1061
|
+
response_data.read()
|
|
1062
|
+
return self.api_client.response_deserialize(
|
|
1063
|
+
response_data=response_data,
|
|
1064
|
+
response_types_map=_response_types_map,
|
|
1065
|
+
)
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
@validate_call
|
|
1069
|
+
def update_key_pair_name_without_preload_content(
|
|
1070
|
+
self,
|
|
1071
|
+
id: StrictInt,
|
|
1072
|
+
payload: UpdateKeypairName,
|
|
1073
|
+
_request_timeout: Union[
|
|
1074
|
+
None,
|
|
1075
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1076
|
+
Tuple[
|
|
1077
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1078
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1079
|
+
]
|
|
1080
|
+
] = None,
|
|
1081
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1082
|
+
_content_type: Optional[StrictStr] = None,
|
|
1083
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1084
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1085
|
+
) -> RESTResponseType:
|
|
1086
|
+
"""Update key pair name
|
|
1087
|
+
|
|
1088
|
+
Updates the name of a specified key pair. Include the key pair ID in the request path and the new `name` of the key pair in the request body.
|
|
1089
|
+
|
|
1090
|
+
:param id: (required)
|
|
1091
|
+
:type id: int
|
|
1092
|
+
:param payload: (required)
|
|
1093
|
+
:type payload: UpdateKeypairName
|
|
1094
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1095
|
+
number provided, it will be total request
|
|
1096
|
+
timeout. It can also be a pair (tuple) of
|
|
1097
|
+
(connection, read) timeouts.
|
|
1098
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1099
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1100
|
+
request; this effectively ignores the
|
|
1101
|
+
authentication in the spec for a single request.
|
|
1102
|
+
:type _request_auth: dict, optional
|
|
1103
|
+
:param _content_type: force content-type for the request.
|
|
1104
|
+
:type _content_type: str, Optional
|
|
1105
|
+
:param _headers: set to override the headers for a single
|
|
1106
|
+
request; this effectively ignores the headers
|
|
1107
|
+
in the spec for a single request.
|
|
1108
|
+
:type _headers: dict, optional
|
|
1109
|
+
:param _host_index: set to override the host_index for a single
|
|
1110
|
+
request; this effectively ignores the host_index
|
|
1111
|
+
in the spec for a single request.
|
|
1112
|
+
:type _host_index: int, optional
|
|
1113
|
+
:return: Returns the result object.
|
|
1114
|
+
""" # noqa: E501
|
|
1115
|
+
|
|
1116
|
+
_param = self._update_key_pair_name_serialize(
|
|
1117
|
+
id=id,
|
|
1118
|
+
payload=payload,
|
|
1119
|
+
_request_auth=_request_auth,
|
|
1120
|
+
_content_type=_content_type,
|
|
1121
|
+
_headers=_headers,
|
|
1122
|
+
_host_index=_host_index
|
|
1123
|
+
)
|
|
1124
|
+
|
|
1125
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1126
|
+
'200': "UpdateKeypairnameresponse",
|
|
1127
|
+
'400': "ErrorResponseModel",
|
|
1128
|
+
'401': "ErrorResponseModel",
|
|
1129
|
+
'404': "ErrorResponseModel",
|
|
1130
|
+
'500': None,
|
|
1131
|
+
}
|
|
1132
|
+
response_data = self.api_client.call_api(
|
|
1133
|
+
*_param,
|
|
1134
|
+
_request_timeout=_request_timeout
|
|
1135
|
+
)
|
|
1136
|
+
return response_data.response
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
def _update_key_pair_name_serialize(
|
|
1140
|
+
self,
|
|
1141
|
+
id,
|
|
1142
|
+
payload,
|
|
1143
|
+
_request_auth,
|
|
1144
|
+
_content_type,
|
|
1145
|
+
_headers,
|
|
1146
|
+
_host_index,
|
|
1147
|
+
) -> RequestSerialized:
|
|
1148
|
+
|
|
1149
|
+
_host = None
|
|
1150
|
+
|
|
1151
|
+
_collection_formats: Dict[str, str] = {
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
_path_params: Dict[str, str] = {}
|
|
1155
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1156
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1157
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1158
|
+
_files: Dict[
|
|
1159
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1160
|
+
] = {}
|
|
1161
|
+
_body_params: Optional[bytes] = None
|
|
1162
|
+
|
|
1163
|
+
# process the path parameters
|
|
1164
|
+
if id is not None:
|
|
1165
|
+
_path_params['id'] = id
|
|
1166
|
+
# process the query parameters
|
|
1167
|
+
# process the header parameters
|
|
1168
|
+
# process the form parameters
|
|
1169
|
+
# process the body parameter
|
|
1170
|
+
if payload is not None:
|
|
1171
|
+
_body_params = payload
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
# set the HTTP header `Accept`
|
|
1175
|
+
if 'Accept' not in _header_params:
|
|
1176
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1177
|
+
[
|
|
1178
|
+
'application/json'
|
|
1179
|
+
]
|
|
1180
|
+
)
|
|
1181
|
+
|
|
1182
|
+
# set the HTTP header `Content-Type`
|
|
1183
|
+
if _content_type:
|
|
1184
|
+
_header_params['Content-Type'] = _content_type
|
|
1185
|
+
else:
|
|
1186
|
+
_default_content_type = (
|
|
1187
|
+
self.api_client.select_header_content_type(
|
|
1188
|
+
[
|
|
1189
|
+
'application/json'
|
|
1190
|
+
]
|
|
1191
|
+
)
|
|
1192
|
+
)
|
|
1193
|
+
if _default_content_type is not None:
|
|
1194
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1195
|
+
|
|
1196
|
+
# authentication setting
|
|
1197
|
+
_auth_settings: List[str] = [
|
|
1198
|
+
'apiKey',
|
|
1199
|
+
'accessToken'
|
|
1200
|
+
]
|
|
1201
|
+
|
|
1202
|
+
return self.api_client.param_serialize(
|
|
1203
|
+
method='PUT',
|
|
1204
|
+
resource_path='/core/keypair/{id}',
|
|
1205
|
+
path_params=_path_params,
|
|
1206
|
+
query_params=_query_params,
|
|
1207
|
+
header_params=_header_params,
|
|
1208
|
+
body=_body_params,
|
|
1209
|
+
post_params=_form_params,
|
|
1210
|
+
files=_files,
|
|
1211
|
+
auth_settings=_auth_settings,
|
|
1212
|
+
collection_formats=_collection_formats,
|
|
1213
|
+
_host=_host,
|
|
1214
|
+
_request_auth=_request_auth
|
|
1215
|
+
)
|
|
1216
|
+
|
|
1217
|
+
|