azure_mgmt_compute 0.20.0 → 0.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-06-15/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2016-03-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2016-04-30-preview/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2017-03-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2017-09-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2017-12-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2018-04-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2018-06-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2018-09-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2018-10-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2019-03-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2019-04-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2019-07-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2019-11-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2019-12-01/generated/azure_mgmt_compute.rb +94 -93
- data/lib/2019-12-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_application_version_publishing_profile.rb +7 -7
- data/lib/2019-12-01/generated/azure_mgmt_compute/models/user_artifact_manage.rb +74 -0
- data/lib/2019-12-01/generated/azure_mgmt_compute/models/user_artifact_source.rb +10 -9
- data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +12 -4
- data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machines.rb +36 -8
- data/lib/2020-06-01/generated/azure_mgmt_compute.rb +102 -92
- data/lib/2020-06-01/generated/azure_mgmt_compute/compute_management_client.rb +6 -1
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group.rb +1 -1
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group_update.rb +1 -1
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/execution_state.rb +21 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/hardware_profile.rb +20 -15
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb +22 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/request_rate_by_interval_input.rb +16 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_key.rb +1 -1
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/throttled_requests_input.rb +16 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine.rb +8 -7
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command.rb +241 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_instance_view.rb +135 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_script_source.rb +68 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_update.rb +206 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_commands_list_result.rb +98 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +12 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb +12 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +8 -7
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextension.rb +190 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextension_update.rb +164 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_list_result.rb +57 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +8 -7
- data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +8 -7
- data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_run_commands.rb +790 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vmextensions.rb +35 -35
- data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vmrun_commands.rb +827 -0
- data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machines.rb +5 -5
- data/lib/2020-06-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute.rb +106 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/compute_management_client.rb +165 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/galleries.rb +994 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_application_versions.rb +915 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_applications.rb +856 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_image_versions.rb +911 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_images.rb +856 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_sharing_profile.rb +189 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/aggregated_replication_state.rb +18 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/api_error.rb +100 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/data_disk_image_encryption.rb +57 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/disallowed.rb +54 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/disk_image_encryption.rb +47 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/encryption_images.rb +69 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery.rb +137 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application.rb +161 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_list.rb +100 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_update.rb +153 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version.rb +127 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_list.rb +101 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_publishing_profile.rb +130 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_update.rb +119 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_publishing_profile_base.rb +120 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_source.rb +47 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_version_source.rb +60 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_data_disk_image.rb +76 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_disk_image.rb +74 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_identifier.rb +48 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image.rb +271 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_feature.rb +57 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_identifier.rb +68 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_list.rb +100 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_update.rb +263 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version.rb +139 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_list.rb +100 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_publishing_profile.rb +93 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_storage_profile.rb +79 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_update.rb +131 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_list.rb +99 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_osdisk_image.rb +62 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_sharing_permission_types.rb +16 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_update.rb +129 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/host_caching.rb +17 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/hyper_vgeneration.rb +16 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/image_purchase_plan.rb +69 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/managed_artifact.rb +46 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/osdisk_image_encryption.rb +43 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/pir_resource.rb +59 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/pir_shared_gallery_resource.rb +64 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/recommended_machine_configuration.rb +60 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/regional_replication_status.rb +86 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/replication_state.rb +18 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/replication_status.rb +71 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/replication_status_types.rb +15 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/resource.rb +110 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/resource_range.rb +57 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/select_permissions.rb +15 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery.rb +62 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image.rb +186 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_list.rb +100 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_version.rb +88 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_version_list.rb +101 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_list.rb +99 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_to_values.rb +15 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile.rb +70 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile_group.rb +69 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile_group_types.rb +16 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_update.rb +69 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_update_operation_types.rb +17 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/storage_account_type.rb +17 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/target_region.rb +83 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/update_resource_definition.rb +90 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/user_artifact_manage.rb +74 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/user_artifact_source.rb +59 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/module_definition.rb +9 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/shared_galleries.rb +332 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/shared_gallery_image_versions.rb +366 -0
- data/lib/2020-09-30-preview/generated/azure_mgmt_compute/shared_gallery_images.rb +344 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute.rb +89 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/compute_management_client.rb +149 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/disk_accesses.rb +1804 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/disk_encryption_sets.rb +1236 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/disk_restore_point_operations.rb +372 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/disks.rb +1294 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/access_level.rb +17 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/access_uri.rb +47 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/api_error.rb +100 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/creation_data.rb +150 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk.rb +462 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_access.rb +133 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_access_list.rb +100 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_access_update.rb +54 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_create_option.rb +21 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set.rb +160 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_identity_type.rb +16 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_list.rb +100 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_type.rb +16 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_update.rb +79 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_list.rb +99 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_restore_point.rb +164 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_restore_point_list.rb +100 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_sku.rb +61 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_state.rb +20 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_storage_account_types.rb +18 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_update.rb +251 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption.rb +60 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_set_identity.rb +81 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_settings_collection.rb +85 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_settings_element.rb +62 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_type.rb +17 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/extended_location.rb +58 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/extended_location_types.rb +15 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/grant_access_data.rb +58 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/hyper_vgeneration.rb +16 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/image_disk_reference.rb +60 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/key_for_disk_encryption_set.rb +61 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb +60 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +59 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/network_access_policy.rb +17 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint.rb +47 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_connection.rb +110 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_connection_list_result.rb +100 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_connection_provisioning_state.rb +18 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_service_connection_status.rb +17 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_link_resource.rb +123 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_link_resource_list_result.rb +55 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_link_service_connection_state.rb +72 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/proxy_only_resource.rb +71 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/purchase_plan.rb +82 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/resource.rb +110 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/resource_uri_list.rb +100 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/share_info_element.rb +49 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot.rb +316 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_list.rb +99 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_sku.rb +62 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_storage_account_types.rb +17 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_update.rb +145 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/models/source_vault.rb +47 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/module_definition.rb +9 -0
- data/lib/2020-09-30/generated/azure_mgmt_compute/snapshots.rb +1294 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute.rb +73 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb +1091 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_roles.rb +343 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_services.rb +1870 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_services_update_domain.rb +486 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/compute_management_client.rb +145 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/api_error.rb +100 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service.rb +113 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_extension_profile.rb +55 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_extension_properties.rb +180 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_instance_view.rb +81 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_list_result.rb +98 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_network_profile.rb +68 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_os_profile.rb +56 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_properties.rb +176 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role.rb +107 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_list_result.rb +98 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_profile.rb +56 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_profile_properties.rb +58 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_properties.rb +49 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_sku.rb +72 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_update.rb +55 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_upgrade_mode.rb +17 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_and_secret_reference.rb +59 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_certificate.rb +48 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_secret_group.rb +69 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/extension.rb +58 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/instance_sku.rb +60 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/instance_view_statuses_summary.rb +56 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_configuration.rb +58 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_configuration_properties.rb +56 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_frontend_ipconfiguration.rb +59 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_frontend_ipconfiguration_properties.rb +72 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/resource_instance_view_status.rb +97 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance.rb +128 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_instance_view.rb +95 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_list_result.rb +98 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_network_profile.rb +57 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_properties.rb +60 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instances.rb +55 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/status_code_count.rb +60 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/sub_resource.rb +47 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/update_domain.rb +59 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/update_domain_list_result.rb +98 -0
- data/lib/2020-10-01-preview/generated/azure_mgmt_compute/module_definition.rb +9 -0
- data/lib/azure_mgmt_compute.rb +3 -0
- data/lib/profiles/latest/modules/compute_profile_module.rb +700 -468
- data/lib/version.rb +1 -1
- metadata +209 -2
@@ -264,7 +264,7 @@ module Azure::Compute::Mgmt::V2020_06_01
|
|
264
264
|
# @param resource_group_name [String] The name of the resource group.
|
265
265
|
# @param vm_name [String] The name of the virtual machine.
|
266
266
|
# @param force_deletion [Boolean] Optional parameter to force delete virtual
|
267
|
-
# machines.
|
267
|
+
# machines.(Feature in Preview)
|
268
268
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
269
269
|
# will be added to the HTTP request.
|
270
270
|
#
|
@@ -277,7 +277,7 @@ module Azure::Compute::Mgmt::V2020_06_01
|
|
277
277
|
# @param resource_group_name [String] The name of the resource group.
|
278
278
|
# @param vm_name [String] The name of the virtual machine.
|
279
279
|
# @param force_deletion [Boolean] Optional parameter to force delete virtual
|
280
|
-
# machines.
|
280
|
+
# machines.(Feature in Preview)
|
281
281
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
282
282
|
# will be added to the HTTP request.
|
283
283
|
#
|
@@ -1876,7 +1876,7 @@ module Azure::Compute::Mgmt::V2020_06_01
|
|
1876
1876
|
# @param resource_group_name [String] The name of the resource group.
|
1877
1877
|
# @param vm_name [String] The name of the virtual machine.
|
1878
1878
|
# @param force_deletion [Boolean] Optional parameter to force delete virtual
|
1879
|
-
# machines.
|
1879
|
+
# machines.(Feature in Preview)
|
1880
1880
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1881
1881
|
# will be added to the HTTP request.
|
1882
1882
|
#
|
@@ -1892,7 +1892,7 @@ module Azure::Compute::Mgmt::V2020_06_01
|
|
1892
1892
|
# @param resource_group_name [String] The name of the resource group.
|
1893
1893
|
# @param vm_name [String] The name of the virtual machine.
|
1894
1894
|
# @param force_deletion [Boolean] Optional parameter to force delete virtual
|
1895
|
-
# machines.
|
1895
|
+
# machines.(Feature in Preview)
|
1896
1896
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1897
1897
|
# will be added to the HTTP request.
|
1898
1898
|
#
|
@@ -1908,7 +1908,7 @@ module Azure::Compute::Mgmt::V2020_06_01
|
|
1908
1908
|
# @param resource_group_name [String] The name of the resource group.
|
1909
1909
|
# @param vm_name [String] The name of the virtual machine.
|
1910
1910
|
# @param force_deletion [Boolean] Optional parameter to force delete virtual
|
1911
|
-
# machines.
|
1911
|
+
# machines.(Feature in Preview)
|
1912
1912
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1913
1913
|
# to the HTTP request.
|
1914
1914
|
#
|
@@ -138,7 +138,7 @@ module Azure::Compute::Mgmt::V2020_06_30
|
|
138
138
|
#
|
139
139
|
def add_telemetry
|
140
140
|
sdk_information = 'azure_mgmt_compute'
|
141
|
-
sdk_information = "#{sdk_information}/0.
|
141
|
+
sdk_information = "#{sdk_information}/0.21.1"
|
142
142
|
add_user_agent_information(sdk_information)
|
143
143
|
end
|
144
144
|
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2020-09-30-preview/generated/azure_mgmt_compute/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::Compute::Mgmt::V2020_09_30_preview
|
23
|
+
autoload :Galleries, '2020-09-30-preview/generated/azure_mgmt_compute/galleries.rb'
|
24
|
+
autoload :GalleryImages, '2020-09-30-preview/generated/azure_mgmt_compute/gallery_images.rb'
|
25
|
+
autoload :GalleryImageVersions, '2020-09-30-preview/generated/azure_mgmt_compute/gallery_image_versions.rb'
|
26
|
+
autoload :GalleryApplications, '2020-09-30-preview/generated/azure_mgmt_compute/gallery_applications.rb'
|
27
|
+
autoload :GalleryApplicationVersions, '2020-09-30-preview/generated/azure_mgmt_compute/gallery_application_versions.rb'
|
28
|
+
autoload :GallerySharingProfile, '2020-09-30-preview/generated/azure_mgmt_compute/gallery_sharing_profile.rb'
|
29
|
+
autoload :SharedGalleries, '2020-09-30-preview/generated/azure_mgmt_compute/shared_galleries.rb'
|
30
|
+
autoload :SharedGalleryImages, '2020-09-30-preview/generated/azure_mgmt_compute/shared_gallery_images.rb'
|
31
|
+
autoload :SharedGalleryImageVersions, '2020-09-30-preview/generated/azure_mgmt_compute/shared_gallery_image_versions.rb'
|
32
|
+
autoload :ComputeManagementClient, '2020-09-30-preview/generated/azure_mgmt_compute/compute_management_client.rb'
|
33
|
+
|
34
|
+
module Models
|
35
|
+
autoload :GalleryArtifactVersionSource, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_version_source.rb'
|
36
|
+
autoload :UpdateResourceDefinition, '2020-09-30-preview/generated/azure_mgmt_compute/models/update_resource_definition.rb'
|
37
|
+
autoload :SharingProfileGroup, '2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile_group.rb'
|
38
|
+
autoload :PirResource, '2020-09-30-preview/generated/azure_mgmt_compute/models/pir_resource.rb'
|
39
|
+
autoload :GalleryApplicationList, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_list.rb'
|
40
|
+
autoload :GalleryImageVersionList, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_list.rb'
|
41
|
+
autoload :GalleryImageList, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_list.rb'
|
42
|
+
autoload :UserArtifactSource, '2020-09-30-preview/generated/azure_mgmt_compute/models/user_artifact_source.rb'
|
43
|
+
autoload :GalleryIdentifier, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_identifier.rb'
|
44
|
+
autoload :InnerError, '2020-09-30-preview/generated/azure_mgmt_compute/models/inner_error.rb'
|
45
|
+
autoload :SharingProfile, '2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile.rb'
|
46
|
+
autoload :ReplicationStatus, '2020-09-30-preview/generated/azure_mgmt_compute/models/replication_status.rb'
|
47
|
+
autoload :GalleryList, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_list.rb'
|
48
|
+
autoload :GalleryApplicationVersionList, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_list.rb'
|
49
|
+
autoload :GalleryImageVersionStorageProfile, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_storage_profile.rb'
|
50
|
+
autoload :GalleryImageIdentifier, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_identifier.rb'
|
51
|
+
autoload :SharingUpdate, '2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_update.rb'
|
52
|
+
autoload :RecommendedMachineConfiguration, '2020-09-30-preview/generated/azure_mgmt_compute/models/recommended_machine_configuration.rb'
|
53
|
+
autoload :SharedGalleryImageVersionList, '2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_version_list.rb'
|
54
|
+
autoload :ImagePurchasePlan, '2020-09-30-preview/generated/azure_mgmt_compute/models/image_purchase_plan.rb'
|
55
|
+
autoload :SharedGalleryImageList, '2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_list.rb'
|
56
|
+
autoload :ApiError, '2020-09-30-preview/generated/azure_mgmt_compute/models/api_error.rb'
|
57
|
+
autoload :SharedGalleryList, '2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_list.rb'
|
58
|
+
autoload :RegionalReplicationStatus, '2020-09-30-preview/generated/azure_mgmt_compute/models/regional_replication_status.rb'
|
59
|
+
autoload :EncryptionImages, '2020-09-30-preview/generated/azure_mgmt_compute/models/encryption_images.rb'
|
60
|
+
autoload :GalleryImageFeature, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_feature.rb'
|
61
|
+
autoload :TargetRegion, '2020-09-30-preview/generated/azure_mgmt_compute/models/target_region.rb'
|
62
|
+
autoload :Disallowed, '2020-09-30-preview/generated/azure_mgmt_compute/models/disallowed.rb'
|
63
|
+
autoload :GalleryArtifactPublishingProfileBase, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_publishing_profile_base.rb'
|
64
|
+
autoload :UserArtifactManage, '2020-09-30-preview/generated/azure_mgmt_compute/models/user_artifact_manage.rb'
|
65
|
+
autoload :DiskImageEncryption, '2020-09-30-preview/generated/azure_mgmt_compute/models/disk_image_encryption.rb'
|
66
|
+
autoload :ResourceRange, '2020-09-30-preview/generated/azure_mgmt_compute/models/resource_range.rb'
|
67
|
+
autoload :ManagedArtifact, '2020-09-30-preview/generated/azure_mgmt_compute/models/managed_artifact.rb'
|
68
|
+
autoload :ApiErrorBase, '2020-09-30-preview/generated/azure_mgmt_compute/models/api_error_base.rb'
|
69
|
+
autoload :GalleryArtifactSource, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_source.rb'
|
70
|
+
autoload :Resource, '2020-09-30-preview/generated/azure_mgmt_compute/models/resource.rb'
|
71
|
+
autoload :GalleryDiskImage, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_disk_image.rb'
|
72
|
+
autoload :Gallery, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery.rb'
|
73
|
+
autoload :GalleryUpdate, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_update.rb'
|
74
|
+
autoload :GalleryApplication, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application.rb'
|
75
|
+
autoload :GalleryApplicationUpdate, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_update.rb'
|
76
|
+
autoload :GalleryApplicationVersionPublishingProfile, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_publishing_profile.rb'
|
77
|
+
autoload :GalleryApplicationVersion, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version.rb'
|
78
|
+
autoload :GalleryApplicationVersionUpdate, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_update.rb'
|
79
|
+
autoload :GalleryImage, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image.rb'
|
80
|
+
autoload :GalleryImageUpdate, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_update.rb'
|
81
|
+
autoload :GalleryImageVersionPublishingProfile, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_publishing_profile.rb'
|
82
|
+
autoload :GalleryOSDiskImage, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_osdisk_image.rb'
|
83
|
+
autoload :GalleryDataDiskImage, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_data_disk_image.rb'
|
84
|
+
autoload :GalleryImageVersion, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version.rb'
|
85
|
+
autoload :GalleryImageVersionUpdate, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_update.rb'
|
86
|
+
autoload :OSDiskImageEncryption, '2020-09-30-preview/generated/azure_mgmt_compute/models/osdisk_image_encryption.rb'
|
87
|
+
autoload :DataDiskImageEncryption, '2020-09-30-preview/generated/azure_mgmt_compute/models/data_disk_image_encryption.rb'
|
88
|
+
autoload :PirSharedGalleryResource, '2020-09-30-preview/generated/azure_mgmt_compute/models/pir_shared_gallery_resource.rb'
|
89
|
+
autoload :SharedGallery, '2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery.rb'
|
90
|
+
autoload :SharedGalleryImage, '2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image.rb'
|
91
|
+
autoload :SharedGalleryImageVersion, '2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_version.rb'
|
92
|
+
autoload :GallerySharingPermissionTypes, '2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_sharing_permission_types.rb'
|
93
|
+
autoload :SharingProfileGroupTypes, '2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile_group_types.rb'
|
94
|
+
autoload :OperatingSystemTypes, '2020-09-30-preview/generated/azure_mgmt_compute/models/operating_system_types.rb'
|
95
|
+
autoload :AggregatedReplicationState, '2020-09-30-preview/generated/azure_mgmt_compute/models/aggregated_replication_state.rb'
|
96
|
+
autoload :ReplicationState, '2020-09-30-preview/generated/azure_mgmt_compute/models/replication_state.rb'
|
97
|
+
autoload :OperatingSystemStateTypes, '2020-09-30-preview/generated/azure_mgmt_compute/models/operating_system_state_types.rb'
|
98
|
+
autoload :HyperVGeneration, '2020-09-30-preview/generated/azure_mgmt_compute/models/hyper_vgeneration.rb'
|
99
|
+
autoload :StorageAccountType, '2020-09-30-preview/generated/azure_mgmt_compute/models/storage_account_type.rb'
|
100
|
+
autoload :HostCaching, '2020-09-30-preview/generated/azure_mgmt_compute/models/host_caching.rb'
|
101
|
+
autoload :SharingUpdateOperationTypes, '2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_update_operation_types.rb'
|
102
|
+
autoload :SelectPermissions, '2020-09-30-preview/generated/azure_mgmt_compute/models/select_permissions.rb'
|
103
|
+
autoload :ReplicationStatusTypes, '2020-09-30-preview/generated/azure_mgmt_compute/models/replication_status_types.rb'
|
104
|
+
autoload :SharedToValues, '2020-09-30-preview/generated/azure_mgmt_compute/models/shared_to_values.rb'
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,165 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Compute::Mgmt::V2020_09_30_preview
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class ComputeManagementClient < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials
|
19
|
+
|
20
|
+
# @return [String] Subscription credentials which uniquely identify
|
21
|
+
# Microsoft Azure subscription. The subscription ID forms part of the URI
|
22
|
+
# for every service call.
|
23
|
+
attr_accessor :subscription_id
|
24
|
+
|
25
|
+
# @return [String] Client Api Version.
|
26
|
+
attr_reader :api_version
|
27
|
+
|
28
|
+
# @return [String] The preferred language for the response.
|
29
|
+
attr_accessor :accept_language
|
30
|
+
|
31
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
32
|
+
# Operations. Default value is 30.
|
33
|
+
attr_accessor :long_running_operation_retry_timeout
|
34
|
+
|
35
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
36
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
37
|
+
# generated and included in each request. Default is true.
|
38
|
+
attr_accessor :generate_client_request_id
|
39
|
+
|
40
|
+
# @return [Galleries] galleries
|
41
|
+
attr_reader :galleries
|
42
|
+
|
43
|
+
# @return [GalleryImages] gallery_images
|
44
|
+
attr_reader :gallery_images
|
45
|
+
|
46
|
+
# @return [GalleryImageVersions] gallery_image_versions
|
47
|
+
attr_reader :gallery_image_versions
|
48
|
+
|
49
|
+
# @return [GalleryApplications] gallery_applications
|
50
|
+
attr_reader :gallery_applications
|
51
|
+
|
52
|
+
# @return [GalleryApplicationVersions] gallery_application_versions
|
53
|
+
attr_reader :gallery_application_versions
|
54
|
+
|
55
|
+
# @return [GallerySharingProfile] gallery_sharing_profile
|
56
|
+
attr_reader :gallery_sharing_profile
|
57
|
+
|
58
|
+
# @return [SharedGalleries] shared_galleries
|
59
|
+
attr_reader :shared_galleries
|
60
|
+
|
61
|
+
# @return [SharedGalleryImages] shared_gallery_images
|
62
|
+
attr_reader :shared_gallery_images
|
63
|
+
|
64
|
+
# @return [SharedGalleryImageVersions] shared_gallery_image_versions
|
65
|
+
attr_reader :shared_gallery_image_versions
|
66
|
+
|
67
|
+
#
|
68
|
+
# Creates initializes a new instance of the ComputeManagementClient class.
|
69
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
70
|
+
# @param base_url [String] the base URI of the service.
|
71
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
72
|
+
#
|
73
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
74
|
+
super(credentials, options)
|
75
|
+
@base_url = base_url || 'https://management.azure.com'
|
76
|
+
|
77
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
78
|
+
@credentials = credentials
|
79
|
+
|
80
|
+
@galleries = Galleries.new(self)
|
81
|
+
@gallery_images = GalleryImages.new(self)
|
82
|
+
@gallery_image_versions = GalleryImageVersions.new(self)
|
83
|
+
@gallery_applications = GalleryApplications.new(self)
|
84
|
+
@gallery_application_versions = GalleryApplicationVersions.new(self)
|
85
|
+
@gallery_sharing_profile = GallerySharingProfile.new(self)
|
86
|
+
@shared_galleries = SharedGalleries.new(self)
|
87
|
+
@shared_gallery_images = SharedGalleryImages.new(self)
|
88
|
+
@shared_gallery_image_versions = SharedGalleryImageVersions.new(self)
|
89
|
+
@api_version = '2020-09-30'
|
90
|
+
@accept_language = 'en-US'
|
91
|
+
@long_running_operation_retry_timeout = 30
|
92
|
+
@generate_client_request_id = true
|
93
|
+
add_telemetry
|
94
|
+
end
|
95
|
+
|
96
|
+
#
|
97
|
+
# Makes a request and returns the body of the response.
|
98
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
99
|
+
# @param path [String] the path, relative to {base_url}.
|
100
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
101
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
102
|
+
# Example:
|
103
|
+
#
|
104
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
105
|
+
# path = "/path"
|
106
|
+
# options = {
|
107
|
+
# body: request_content,
|
108
|
+
# query_params: {'api-version' => '2016-02-01'}
|
109
|
+
# }
|
110
|
+
# result = @client.make_request(:put, path, options)
|
111
|
+
#
|
112
|
+
def make_request(method, path, options = {})
|
113
|
+
result = make_request_with_http_info(method, path, options)
|
114
|
+
result.body unless result.nil?
|
115
|
+
end
|
116
|
+
|
117
|
+
#
|
118
|
+
# Makes a request and returns the operation response.
|
119
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
120
|
+
# @param path [String] the path, relative to {base_url}.
|
121
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
122
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
123
|
+
#
|
124
|
+
def make_request_with_http_info(method, path, options = {})
|
125
|
+
result = make_request_async(method, path, options).value!
|
126
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
127
|
+
result
|
128
|
+
end
|
129
|
+
|
130
|
+
#
|
131
|
+
# Makes a request asynchronously.
|
132
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
133
|
+
# @param path [String] the path, relative to {base_url}.
|
134
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
135
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
136
|
+
#
|
137
|
+
def make_request_async(method, path, options = {})
|
138
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
139
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
140
|
+
|
141
|
+
request_url = options[:base_url] || @base_url
|
142
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
143
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
144
|
+
end
|
145
|
+
|
146
|
+
request_headers = @request_headers
|
147
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
148
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
149
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
150
|
+
|
151
|
+
super(request_url, method, path, options)
|
152
|
+
end
|
153
|
+
|
154
|
+
|
155
|
+
private
|
156
|
+
#
|
157
|
+
# Adds telemetry information.
|
158
|
+
#
|
159
|
+
def add_telemetry
|
160
|
+
sdk_information = 'azure_mgmt_compute'
|
161
|
+
sdk_information = "#{sdk_information}/0.21.1"
|
162
|
+
add_user_agent_information(sdk_information)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
@@ -0,0 +1,994 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Compute::Mgmt::V2020_09_30_preview
|
7
|
+
#
|
8
|
+
# Galleries
|
9
|
+
#
|
10
|
+
class Galleries
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Galleries class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [ComputeManagementClient] reference to the ComputeManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Create or update a Shared Image Gallery.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group.
|
28
|
+
# @param gallery_name [String] The name of the Shared Image Gallery. The
|
29
|
+
# allowed characters are alphabets and numbers with dots and periods allowed in
|
30
|
+
# the middle. The maximum length is 80 characters.
|
31
|
+
# @param gallery [Gallery] Parameters supplied to the create or update Shared
|
32
|
+
# Image Gallery operation.
|
33
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
34
|
+
# will be added to the HTTP request.
|
35
|
+
#
|
36
|
+
# @return [Gallery] operation results.
|
37
|
+
#
|
38
|
+
def create_or_update(resource_group_name, gallery_name, gallery, custom_headers:nil)
|
39
|
+
response = create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers).value!
|
40
|
+
response.body unless response.nil?
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# @param resource_group_name [String] The name of the resource group.
|
45
|
+
# @param gallery_name [String] The name of the Shared Image Gallery. The
|
46
|
+
# allowed characters are alphabets and numbers with dots and periods allowed in
|
47
|
+
# the middle. The maximum length is 80 characters.
|
48
|
+
# @param gallery [Gallery] Parameters supplied to the create or update Shared
|
49
|
+
# Image Gallery operation.
|
50
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
51
|
+
# will be added to the HTTP request.
|
52
|
+
#
|
53
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
54
|
+
# response.
|
55
|
+
#
|
56
|
+
def create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:nil)
|
57
|
+
# Send request
|
58
|
+
promise = begin_create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers)
|
59
|
+
|
60
|
+
promise = promise.then do |response|
|
61
|
+
# Defining deserialization method.
|
62
|
+
deserialize_method = lambda do |parsed_response|
|
63
|
+
result_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::Gallery.mapper()
|
64
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Waiting for response.
|
68
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
69
|
+
end
|
70
|
+
|
71
|
+
promise
|
72
|
+
end
|
73
|
+
|
74
|
+
#
|
75
|
+
# Update a Shared Image Gallery.
|
76
|
+
#
|
77
|
+
# @param resource_group_name [String] The name of the resource group.
|
78
|
+
# @param gallery_name [String] The name of the Shared Image Gallery. The
|
79
|
+
# allowed characters are alphabets and numbers with dots and periods allowed in
|
80
|
+
# the middle. The maximum length is 80 characters.
|
81
|
+
# @param gallery [GalleryUpdate] Parameters supplied to the update Shared Image
|
82
|
+
# Gallery operation.
|
83
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
84
|
+
# will be added to the HTTP request.
|
85
|
+
#
|
86
|
+
# @return [Gallery] operation results.
|
87
|
+
#
|
88
|
+
def update(resource_group_name, gallery_name, gallery, custom_headers:nil)
|
89
|
+
response = update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers).value!
|
90
|
+
response.body unless response.nil?
|
91
|
+
end
|
92
|
+
|
93
|
+
#
|
94
|
+
# @param resource_group_name [String] The name of the resource group.
|
95
|
+
# @param gallery_name [String] The name of the Shared Image Gallery. The
|
96
|
+
# allowed characters are alphabets and numbers with dots and periods allowed in
|
97
|
+
# the middle. The maximum length is 80 characters.
|
98
|
+
# @param gallery [GalleryUpdate] Parameters supplied to the update Shared Image
|
99
|
+
# Gallery operation.
|
100
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
101
|
+
# will be added to the HTTP request.
|
102
|
+
#
|
103
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
104
|
+
# response.
|
105
|
+
#
|
106
|
+
def update_async(resource_group_name, gallery_name, gallery, custom_headers:nil)
|
107
|
+
# Send request
|
108
|
+
promise = begin_update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers)
|
109
|
+
|
110
|
+
promise = promise.then do |response|
|
111
|
+
# Defining deserialization method.
|
112
|
+
deserialize_method = lambda do |parsed_response|
|
113
|
+
result_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::Gallery.mapper()
|
114
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Waiting for response.
|
118
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
119
|
+
end
|
120
|
+
|
121
|
+
promise
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# Retrieves information about a Shared Image Gallery.
|
126
|
+
#
|
127
|
+
# @param resource_group_name [String] The name of the resource group.
|
128
|
+
# @param gallery_name [String] The name of the Shared Image Gallery.
|
129
|
+
# @param select [SelectPermissions] The select expression to apply on the
|
130
|
+
# operation. Possible values include: 'Permissions'
|
131
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
132
|
+
# will be added to the HTTP request.
|
133
|
+
#
|
134
|
+
# @return [Gallery] operation results.
|
135
|
+
#
|
136
|
+
def get(resource_group_name, gallery_name, select:nil, custom_headers:nil)
|
137
|
+
response = get_async(resource_group_name, gallery_name, select:select, custom_headers:custom_headers).value!
|
138
|
+
response.body unless response.nil?
|
139
|
+
end
|
140
|
+
|
141
|
+
#
|
142
|
+
# Retrieves information about a Shared Image Gallery.
|
143
|
+
#
|
144
|
+
# @param resource_group_name [String] The name of the resource group.
|
145
|
+
# @param gallery_name [String] The name of the Shared Image Gallery.
|
146
|
+
# @param select [SelectPermissions] The select expression to apply on the
|
147
|
+
# operation. Possible values include: 'Permissions'
|
148
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
149
|
+
# will be added to the HTTP request.
|
150
|
+
#
|
151
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
152
|
+
#
|
153
|
+
def get_with_http_info(resource_group_name, gallery_name, select:nil, custom_headers:nil)
|
154
|
+
get_async(resource_group_name, gallery_name, select:select, custom_headers:custom_headers).value!
|
155
|
+
end
|
156
|
+
|
157
|
+
#
|
158
|
+
# Retrieves information about a Shared Image Gallery.
|
159
|
+
#
|
160
|
+
# @param resource_group_name [String] The name of the resource group.
|
161
|
+
# @param gallery_name [String] The name of the Shared Image Gallery.
|
162
|
+
# @param select [SelectPermissions] The select expression to apply on the
|
163
|
+
# operation. Possible values include: 'Permissions'
|
164
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
165
|
+
# to the HTTP request.
|
166
|
+
#
|
167
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
168
|
+
#
|
169
|
+
def get_async(resource_group_name, gallery_name, select:nil, custom_headers:nil)
|
170
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
171
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
172
|
+
fail ArgumentError, 'gallery_name is nil' if gallery_name.nil?
|
173
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
174
|
+
|
175
|
+
|
176
|
+
request_headers = {}
|
177
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
178
|
+
|
179
|
+
# Set Headers
|
180
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
181
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
182
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'
|
183
|
+
|
184
|
+
request_url = @base_url || @client.base_url
|
185
|
+
|
186
|
+
options = {
|
187
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
188
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'galleryName' => gallery_name},
|
189
|
+
query_params: {'api-version' => @client.api_version,'$select' => select},
|
190
|
+
headers: request_headers.merge(custom_headers || {}),
|
191
|
+
base_url: request_url
|
192
|
+
}
|
193
|
+
promise = @client.make_request_async(:get, path_template, options)
|
194
|
+
|
195
|
+
promise = promise.then do |result|
|
196
|
+
http_response = result.response
|
197
|
+
status_code = http_response.status
|
198
|
+
response_content = http_response.body
|
199
|
+
unless status_code == 200
|
200
|
+
error_model = JSON.load(response_content)
|
201
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
202
|
+
end
|
203
|
+
|
204
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
205
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
206
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
207
|
+
# Deserialize Response
|
208
|
+
if status_code == 200
|
209
|
+
begin
|
210
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
211
|
+
result_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::Gallery.mapper()
|
212
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
213
|
+
rescue Exception => e
|
214
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
result
|
219
|
+
end
|
220
|
+
|
221
|
+
promise.execute
|
222
|
+
end
|
223
|
+
|
224
|
+
#
|
225
|
+
# Delete a Shared Image Gallery.
|
226
|
+
#
|
227
|
+
# @param resource_group_name [String] The name of the resource group.
|
228
|
+
# @param gallery_name [String] The name of the Shared Image Gallery to be
|
229
|
+
# deleted.
|
230
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
231
|
+
# will be added to the HTTP request.
|
232
|
+
#
|
233
|
+
def delete(resource_group_name, gallery_name, custom_headers:nil)
|
234
|
+
response = delete_async(resource_group_name, gallery_name, custom_headers:custom_headers).value!
|
235
|
+
nil
|
236
|
+
end
|
237
|
+
|
238
|
+
#
|
239
|
+
# @param resource_group_name [String] The name of the resource group.
|
240
|
+
# @param gallery_name [String] The name of the Shared Image Gallery to be
|
241
|
+
# deleted.
|
242
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
243
|
+
# will be added to the HTTP request.
|
244
|
+
#
|
245
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
246
|
+
# response.
|
247
|
+
#
|
248
|
+
def delete_async(resource_group_name, gallery_name, custom_headers:nil)
|
249
|
+
# Send request
|
250
|
+
promise = begin_delete_async(resource_group_name, gallery_name, custom_headers:custom_headers)
|
251
|
+
|
252
|
+
promise = promise.then do |response|
|
253
|
+
# Defining deserialization method.
|
254
|
+
deserialize_method = lambda do |parsed_response|
|
255
|
+
end
|
256
|
+
|
257
|
+
# Waiting for response.
|
258
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
259
|
+
end
|
260
|
+
|
261
|
+
promise
|
262
|
+
end
|
263
|
+
|
264
|
+
#
|
265
|
+
# List galleries under a resource group.
|
266
|
+
#
|
267
|
+
# @param resource_group_name [String] The name of the resource group.
|
268
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
269
|
+
# will be added to the HTTP request.
|
270
|
+
#
|
271
|
+
# @return [Array<Gallery>] operation results.
|
272
|
+
#
|
273
|
+
def list_by_resource_group(resource_group_name, custom_headers:nil)
|
274
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
|
275
|
+
first_page.get_all_items
|
276
|
+
end
|
277
|
+
|
278
|
+
#
|
279
|
+
# List galleries under a resource group.
|
280
|
+
#
|
281
|
+
# @param resource_group_name [String] The name of the resource group.
|
282
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
283
|
+
# will be added to the HTTP request.
|
284
|
+
#
|
285
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
286
|
+
#
|
287
|
+
def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
|
288
|
+
list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
289
|
+
end
|
290
|
+
|
291
|
+
#
|
292
|
+
# List galleries under a resource group.
|
293
|
+
#
|
294
|
+
# @param resource_group_name [String] The name of the resource group.
|
295
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
296
|
+
# to the HTTP request.
|
297
|
+
#
|
298
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
299
|
+
#
|
300
|
+
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
|
301
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
302
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
303
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
304
|
+
|
305
|
+
|
306
|
+
request_headers = {}
|
307
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
308
|
+
|
309
|
+
# Set Headers
|
310
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
311
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
312
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries'
|
313
|
+
|
314
|
+
request_url = @base_url || @client.base_url
|
315
|
+
|
316
|
+
options = {
|
317
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
318
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
319
|
+
query_params: {'api-version' => @client.api_version},
|
320
|
+
headers: request_headers.merge(custom_headers || {}),
|
321
|
+
base_url: request_url
|
322
|
+
}
|
323
|
+
promise = @client.make_request_async(:get, path_template, options)
|
324
|
+
|
325
|
+
promise = promise.then do |result|
|
326
|
+
http_response = result.response
|
327
|
+
status_code = http_response.status
|
328
|
+
response_content = http_response.body
|
329
|
+
unless status_code == 200
|
330
|
+
error_model = JSON.load(response_content)
|
331
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
332
|
+
end
|
333
|
+
|
334
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
335
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
336
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
337
|
+
# Deserialize Response
|
338
|
+
if status_code == 200
|
339
|
+
begin
|
340
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
341
|
+
result_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::GalleryList.mapper()
|
342
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
343
|
+
rescue Exception => e
|
344
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
result
|
349
|
+
end
|
350
|
+
|
351
|
+
promise.execute
|
352
|
+
end
|
353
|
+
|
354
|
+
#
|
355
|
+
# List galleries under a subscription.
|
356
|
+
#
|
357
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
358
|
+
# will be added to the HTTP request.
|
359
|
+
#
|
360
|
+
# @return [Array<Gallery>] operation results.
|
361
|
+
#
|
362
|
+
def list(custom_headers:nil)
|
363
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
364
|
+
first_page.get_all_items
|
365
|
+
end
|
366
|
+
|
367
|
+
#
|
368
|
+
# List galleries under a subscription.
|
369
|
+
#
|
370
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
371
|
+
# will be added to the HTTP request.
|
372
|
+
#
|
373
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
374
|
+
#
|
375
|
+
def list_with_http_info(custom_headers:nil)
|
376
|
+
list_async(custom_headers:custom_headers).value!
|
377
|
+
end
|
378
|
+
|
379
|
+
#
|
380
|
+
# List galleries under a subscription.
|
381
|
+
#
|
382
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
383
|
+
# to the HTTP request.
|
384
|
+
#
|
385
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
386
|
+
#
|
387
|
+
def list_async(custom_headers:nil)
|
388
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
389
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
390
|
+
|
391
|
+
|
392
|
+
request_headers = {}
|
393
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
394
|
+
|
395
|
+
# Set Headers
|
396
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
397
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
398
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'
|
399
|
+
|
400
|
+
request_url = @base_url || @client.base_url
|
401
|
+
|
402
|
+
options = {
|
403
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
404
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
405
|
+
query_params: {'api-version' => @client.api_version},
|
406
|
+
headers: request_headers.merge(custom_headers || {}),
|
407
|
+
base_url: request_url
|
408
|
+
}
|
409
|
+
promise = @client.make_request_async(:get, path_template, options)
|
410
|
+
|
411
|
+
promise = promise.then do |result|
|
412
|
+
http_response = result.response
|
413
|
+
status_code = http_response.status
|
414
|
+
response_content = http_response.body
|
415
|
+
unless status_code == 200
|
416
|
+
error_model = JSON.load(response_content)
|
417
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
418
|
+
end
|
419
|
+
|
420
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
421
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
422
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
423
|
+
# Deserialize Response
|
424
|
+
if status_code == 200
|
425
|
+
begin
|
426
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
427
|
+
result_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::GalleryList.mapper()
|
428
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
429
|
+
rescue Exception => e
|
430
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
431
|
+
end
|
432
|
+
end
|
433
|
+
|
434
|
+
result
|
435
|
+
end
|
436
|
+
|
437
|
+
promise.execute
|
438
|
+
end
|
439
|
+
|
440
|
+
#
|
441
|
+
# Create or update a Shared Image Gallery.
|
442
|
+
#
|
443
|
+
# @param resource_group_name [String] The name of the resource group.
|
444
|
+
# @param gallery_name [String] The name of the Shared Image Gallery. The
|
445
|
+
# allowed characters are alphabets and numbers with dots and periods allowed in
|
446
|
+
# the middle. The maximum length is 80 characters.
|
447
|
+
# @param gallery [Gallery] Parameters supplied to the create or update Shared
|
448
|
+
# Image Gallery operation.
|
449
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
450
|
+
# will be added to the HTTP request.
|
451
|
+
#
|
452
|
+
# @return [Gallery] operation results.
|
453
|
+
#
|
454
|
+
def begin_create_or_update(resource_group_name, gallery_name, gallery, custom_headers:nil)
|
455
|
+
response = begin_create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers).value!
|
456
|
+
response.body unless response.nil?
|
457
|
+
end
|
458
|
+
|
459
|
+
#
|
460
|
+
# Create or update a Shared Image Gallery.
|
461
|
+
#
|
462
|
+
# @param resource_group_name [String] The name of the resource group.
|
463
|
+
# @param gallery_name [String] The name of the Shared Image Gallery. The
|
464
|
+
# allowed characters are alphabets and numbers with dots and periods allowed in
|
465
|
+
# the middle. The maximum length is 80 characters.
|
466
|
+
# @param gallery [Gallery] Parameters supplied to the create or update Shared
|
467
|
+
# Image Gallery operation.
|
468
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
469
|
+
# will be added to the HTTP request.
|
470
|
+
#
|
471
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
472
|
+
#
|
473
|
+
def begin_create_or_update_with_http_info(resource_group_name, gallery_name, gallery, custom_headers:nil)
|
474
|
+
begin_create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers).value!
|
475
|
+
end
|
476
|
+
|
477
|
+
#
|
478
|
+
# Create or update a Shared Image Gallery.
|
479
|
+
#
|
480
|
+
# @param resource_group_name [String] The name of the resource group.
|
481
|
+
# @param gallery_name [String] The name of the Shared Image Gallery. The
|
482
|
+
# allowed characters are alphabets and numbers with dots and periods allowed in
|
483
|
+
# the middle. The maximum length is 80 characters.
|
484
|
+
# @param gallery [Gallery] Parameters supplied to the create or update Shared
|
485
|
+
# Image Gallery operation.
|
486
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
487
|
+
# to the HTTP request.
|
488
|
+
#
|
489
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
490
|
+
#
|
491
|
+
def begin_create_or_update_async(resource_group_name, gallery_name, gallery, custom_headers:nil)
|
492
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
493
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
494
|
+
fail ArgumentError, 'gallery_name is nil' if gallery_name.nil?
|
495
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
496
|
+
fail ArgumentError, 'gallery is nil' if gallery.nil?
|
497
|
+
|
498
|
+
|
499
|
+
request_headers = {}
|
500
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
501
|
+
|
502
|
+
# Set Headers
|
503
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
504
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
505
|
+
|
506
|
+
# Serialize Request
|
507
|
+
request_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::Gallery.mapper()
|
508
|
+
request_content = @client.serialize(request_mapper, gallery)
|
509
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
510
|
+
|
511
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'
|
512
|
+
|
513
|
+
request_url = @base_url || @client.base_url
|
514
|
+
|
515
|
+
options = {
|
516
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
517
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'galleryName' => gallery_name},
|
518
|
+
query_params: {'api-version' => @client.api_version},
|
519
|
+
body: request_content,
|
520
|
+
headers: request_headers.merge(custom_headers || {}),
|
521
|
+
base_url: request_url
|
522
|
+
}
|
523
|
+
promise = @client.make_request_async(:put, path_template, options)
|
524
|
+
|
525
|
+
promise = promise.then do |result|
|
526
|
+
http_response = result.response
|
527
|
+
status_code = http_response.status
|
528
|
+
response_content = http_response.body
|
529
|
+
unless status_code == 200 || status_code == 201 || status_code == 202
|
530
|
+
error_model = JSON.load(response_content)
|
531
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
532
|
+
end
|
533
|
+
|
534
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
535
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
536
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
537
|
+
# Deserialize Response
|
538
|
+
if status_code == 200
|
539
|
+
begin
|
540
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
541
|
+
result_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::Gallery.mapper()
|
542
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
543
|
+
rescue Exception => e
|
544
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
545
|
+
end
|
546
|
+
end
|
547
|
+
# Deserialize Response
|
548
|
+
if status_code == 201
|
549
|
+
begin
|
550
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
551
|
+
result_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::Gallery.mapper()
|
552
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
553
|
+
rescue Exception => e
|
554
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
555
|
+
end
|
556
|
+
end
|
557
|
+
# Deserialize Response
|
558
|
+
if status_code == 202
|
559
|
+
begin
|
560
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
561
|
+
result_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::Gallery.mapper()
|
562
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
563
|
+
rescue Exception => e
|
564
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
565
|
+
end
|
566
|
+
end
|
567
|
+
|
568
|
+
result
|
569
|
+
end
|
570
|
+
|
571
|
+
promise.execute
|
572
|
+
end
|
573
|
+
|
574
|
+
#
|
575
|
+
# Update a Shared Image Gallery.
|
576
|
+
#
|
577
|
+
# @param resource_group_name [String] The name of the resource group.
|
578
|
+
# @param gallery_name [String] The name of the Shared Image Gallery. The
|
579
|
+
# allowed characters are alphabets and numbers with dots and periods allowed in
|
580
|
+
# the middle. The maximum length is 80 characters.
|
581
|
+
# @param gallery [GalleryUpdate] Parameters supplied to the update Shared Image
|
582
|
+
# Gallery operation.
|
583
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
584
|
+
# will be added to the HTTP request.
|
585
|
+
#
|
586
|
+
# @return [Gallery] operation results.
|
587
|
+
#
|
588
|
+
def begin_update(resource_group_name, gallery_name, gallery, custom_headers:nil)
|
589
|
+
response = begin_update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers).value!
|
590
|
+
response.body unless response.nil?
|
591
|
+
end
|
592
|
+
|
593
|
+
#
|
594
|
+
# Update a Shared Image Gallery.
|
595
|
+
#
|
596
|
+
# @param resource_group_name [String] The name of the resource group.
|
597
|
+
# @param gallery_name [String] The name of the Shared Image Gallery. The
|
598
|
+
# allowed characters are alphabets and numbers with dots and periods allowed in
|
599
|
+
# the middle. The maximum length is 80 characters.
|
600
|
+
# @param gallery [GalleryUpdate] Parameters supplied to the update Shared Image
|
601
|
+
# Gallery operation.
|
602
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
603
|
+
# will be added to the HTTP request.
|
604
|
+
#
|
605
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
606
|
+
#
|
607
|
+
def begin_update_with_http_info(resource_group_name, gallery_name, gallery, custom_headers:nil)
|
608
|
+
begin_update_async(resource_group_name, gallery_name, gallery, custom_headers:custom_headers).value!
|
609
|
+
end
|
610
|
+
|
611
|
+
#
|
612
|
+
# Update a Shared Image Gallery.
|
613
|
+
#
|
614
|
+
# @param resource_group_name [String] The name of the resource group.
|
615
|
+
# @param gallery_name [String] The name of the Shared Image Gallery. The
|
616
|
+
# allowed characters are alphabets and numbers with dots and periods allowed in
|
617
|
+
# the middle. The maximum length is 80 characters.
|
618
|
+
# @param gallery [GalleryUpdate] Parameters supplied to the update Shared Image
|
619
|
+
# Gallery operation.
|
620
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
621
|
+
# to the HTTP request.
|
622
|
+
#
|
623
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
624
|
+
#
|
625
|
+
def begin_update_async(resource_group_name, gallery_name, gallery, custom_headers:nil)
|
626
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
627
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
628
|
+
fail ArgumentError, 'gallery_name is nil' if gallery_name.nil?
|
629
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
630
|
+
fail ArgumentError, 'gallery is nil' if gallery.nil?
|
631
|
+
|
632
|
+
|
633
|
+
request_headers = {}
|
634
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
635
|
+
|
636
|
+
# Set Headers
|
637
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
638
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
639
|
+
|
640
|
+
# Serialize Request
|
641
|
+
request_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::GalleryUpdate.mapper()
|
642
|
+
request_content = @client.serialize(request_mapper, gallery)
|
643
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
644
|
+
|
645
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'
|
646
|
+
|
647
|
+
request_url = @base_url || @client.base_url
|
648
|
+
|
649
|
+
options = {
|
650
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
651
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'galleryName' => gallery_name},
|
652
|
+
query_params: {'api-version' => @client.api_version},
|
653
|
+
body: request_content,
|
654
|
+
headers: request_headers.merge(custom_headers || {}),
|
655
|
+
base_url: request_url
|
656
|
+
}
|
657
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
658
|
+
|
659
|
+
promise = promise.then do |result|
|
660
|
+
http_response = result.response
|
661
|
+
status_code = http_response.status
|
662
|
+
response_content = http_response.body
|
663
|
+
unless status_code == 200
|
664
|
+
error_model = JSON.load(response_content)
|
665
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
666
|
+
end
|
667
|
+
|
668
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
669
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
670
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
671
|
+
# Deserialize Response
|
672
|
+
if status_code == 200
|
673
|
+
begin
|
674
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
675
|
+
result_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::Gallery.mapper()
|
676
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
677
|
+
rescue Exception => e
|
678
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
679
|
+
end
|
680
|
+
end
|
681
|
+
|
682
|
+
result
|
683
|
+
end
|
684
|
+
|
685
|
+
promise.execute
|
686
|
+
end
|
687
|
+
|
688
|
+
#
|
689
|
+
# Delete a Shared Image Gallery.
|
690
|
+
#
|
691
|
+
# @param resource_group_name [String] The name of the resource group.
|
692
|
+
# @param gallery_name [String] The name of the Shared Image Gallery to be
|
693
|
+
# deleted.
|
694
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
695
|
+
# will be added to the HTTP request.
|
696
|
+
#
|
697
|
+
#
|
698
|
+
def begin_delete(resource_group_name, gallery_name, custom_headers:nil)
|
699
|
+
response = begin_delete_async(resource_group_name, gallery_name, custom_headers:custom_headers).value!
|
700
|
+
nil
|
701
|
+
end
|
702
|
+
|
703
|
+
#
|
704
|
+
# Delete a Shared Image Gallery.
|
705
|
+
#
|
706
|
+
# @param resource_group_name [String] The name of the resource group.
|
707
|
+
# @param gallery_name [String] The name of the Shared Image Gallery to be
|
708
|
+
# deleted.
|
709
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
710
|
+
# will be added to the HTTP request.
|
711
|
+
#
|
712
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
713
|
+
#
|
714
|
+
def begin_delete_with_http_info(resource_group_name, gallery_name, custom_headers:nil)
|
715
|
+
begin_delete_async(resource_group_name, gallery_name, custom_headers:custom_headers).value!
|
716
|
+
end
|
717
|
+
|
718
|
+
#
|
719
|
+
# Delete a Shared Image Gallery.
|
720
|
+
#
|
721
|
+
# @param resource_group_name [String] The name of the resource group.
|
722
|
+
# @param gallery_name [String] The name of the Shared Image Gallery to be
|
723
|
+
# deleted.
|
724
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
725
|
+
# to the HTTP request.
|
726
|
+
#
|
727
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
728
|
+
#
|
729
|
+
def begin_delete_async(resource_group_name, gallery_name, custom_headers:nil)
|
730
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
731
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
732
|
+
fail ArgumentError, 'gallery_name is nil' if gallery_name.nil?
|
733
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
734
|
+
|
735
|
+
|
736
|
+
request_headers = {}
|
737
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
738
|
+
|
739
|
+
# Set Headers
|
740
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
741
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
742
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'
|
743
|
+
|
744
|
+
request_url = @base_url || @client.base_url
|
745
|
+
|
746
|
+
options = {
|
747
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
748
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'galleryName' => gallery_name},
|
749
|
+
query_params: {'api-version' => @client.api_version},
|
750
|
+
headers: request_headers.merge(custom_headers || {}),
|
751
|
+
base_url: request_url
|
752
|
+
}
|
753
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
754
|
+
|
755
|
+
promise = promise.then do |result|
|
756
|
+
http_response = result.response
|
757
|
+
status_code = http_response.status
|
758
|
+
response_content = http_response.body
|
759
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
760
|
+
error_model = JSON.load(response_content)
|
761
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
762
|
+
end
|
763
|
+
|
764
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
765
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
766
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
767
|
+
|
768
|
+
result
|
769
|
+
end
|
770
|
+
|
771
|
+
promise.execute
|
772
|
+
end
|
773
|
+
|
774
|
+
#
|
775
|
+
# List galleries under a resource group.
|
776
|
+
#
|
777
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
778
|
+
# to List operation.
|
779
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
780
|
+
# will be added to the HTTP request.
|
781
|
+
#
|
782
|
+
# @return [GalleryList] operation results.
|
783
|
+
#
|
784
|
+
def list_by_resource_group_next(next_page_link, custom_headers:nil)
|
785
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
786
|
+
response.body unless response.nil?
|
787
|
+
end
|
788
|
+
|
789
|
+
#
|
790
|
+
# List galleries under a resource group.
|
791
|
+
#
|
792
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
793
|
+
# to List operation.
|
794
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
795
|
+
# will be added to the HTTP request.
|
796
|
+
#
|
797
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
798
|
+
#
|
799
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
|
800
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
801
|
+
end
|
802
|
+
|
803
|
+
#
|
804
|
+
# List galleries under a resource group.
|
805
|
+
#
|
806
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
807
|
+
# to List operation.
|
808
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
809
|
+
# to the HTTP request.
|
810
|
+
#
|
811
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
812
|
+
#
|
813
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
|
814
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
815
|
+
|
816
|
+
|
817
|
+
request_headers = {}
|
818
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
819
|
+
|
820
|
+
# Set Headers
|
821
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
822
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
823
|
+
path_template = '{nextLink}'
|
824
|
+
|
825
|
+
request_url = @base_url || @client.base_url
|
826
|
+
|
827
|
+
options = {
|
828
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
829
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
830
|
+
headers: request_headers.merge(custom_headers || {}),
|
831
|
+
base_url: request_url
|
832
|
+
}
|
833
|
+
promise = @client.make_request_async(:get, path_template, options)
|
834
|
+
|
835
|
+
promise = promise.then do |result|
|
836
|
+
http_response = result.response
|
837
|
+
status_code = http_response.status
|
838
|
+
response_content = http_response.body
|
839
|
+
unless status_code == 200
|
840
|
+
error_model = JSON.load(response_content)
|
841
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
842
|
+
end
|
843
|
+
|
844
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
845
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
846
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
847
|
+
# Deserialize Response
|
848
|
+
if status_code == 200
|
849
|
+
begin
|
850
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
851
|
+
result_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::GalleryList.mapper()
|
852
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
853
|
+
rescue Exception => e
|
854
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
855
|
+
end
|
856
|
+
end
|
857
|
+
|
858
|
+
result
|
859
|
+
end
|
860
|
+
|
861
|
+
promise.execute
|
862
|
+
end
|
863
|
+
|
864
|
+
#
|
865
|
+
# List galleries under a subscription.
|
866
|
+
#
|
867
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
868
|
+
# to List operation.
|
869
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
870
|
+
# will be added to the HTTP request.
|
871
|
+
#
|
872
|
+
# @return [GalleryList] operation results.
|
873
|
+
#
|
874
|
+
def list_next(next_page_link, custom_headers:nil)
|
875
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
876
|
+
response.body unless response.nil?
|
877
|
+
end
|
878
|
+
|
879
|
+
#
|
880
|
+
# List galleries under a subscription.
|
881
|
+
#
|
882
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
883
|
+
# to List operation.
|
884
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
885
|
+
# will be added to the HTTP request.
|
886
|
+
#
|
887
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
888
|
+
#
|
889
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
890
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
891
|
+
end
|
892
|
+
|
893
|
+
#
|
894
|
+
# List galleries under a subscription.
|
895
|
+
#
|
896
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
897
|
+
# to List operation.
|
898
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
899
|
+
# to the HTTP request.
|
900
|
+
#
|
901
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
902
|
+
#
|
903
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
904
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
905
|
+
|
906
|
+
|
907
|
+
request_headers = {}
|
908
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
909
|
+
|
910
|
+
# Set Headers
|
911
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
912
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
913
|
+
path_template = '{nextLink}'
|
914
|
+
|
915
|
+
request_url = @base_url || @client.base_url
|
916
|
+
|
917
|
+
options = {
|
918
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
919
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
920
|
+
headers: request_headers.merge(custom_headers || {}),
|
921
|
+
base_url: request_url
|
922
|
+
}
|
923
|
+
promise = @client.make_request_async(:get, path_template, options)
|
924
|
+
|
925
|
+
promise = promise.then do |result|
|
926
|
+
http_response = result.response
|
927
|
+
status_code = http_response.status
|
928
|
+
response_content = http_response.body
|
929
|
+
unless status_code == 200
|
930
|
+
error_model = JSON.load(response_content)
|
931
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
932
|
+
end
|
933
|
+
|
934
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
935
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
936
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
937
|
+
# Deserialize Response
|
938
|
+
if status_code == 200
|
939
|
+
begin
|
940
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
941
|
+
result_mapper = Azure::Compute::Mgmt::V2020_09_30_preview::Models::GalleryList.mapper()
|
942
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
943
|
+
rescue Exception => e
|
944
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
945
|
+
end
|
946
|
+
end
|
947
|
+
|
948
|
+
result
|
949
|
+
end
|
950
|
+
|
951
|
+
promise.execute
|
952
|
+
end
|
953
|
+
|
954
|
+
#
|
955
|
+
# List galleries under a resource group.
|
956
|
+
#
|
957
|
+
# @param resource_group_name [String] The name of the resource group.
|
958
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
959
|
+
# will be added to the HTTP request.
|
960
|
+
#
|
961
|
+
# @return [GalleryList] which provide lazy access to pages of the response.
|
962
|
+
#
|
963
|
+
def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
|
964
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
965
|
+
unless response.nil?
|
966
|
+
page = response.body
|
967
|
+
page.next_method = Proc.new do |next_page_link|
|
968
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
|
969
|
+
end
|
970
|
+
page
|
971
|
+
end
|
972
|
+
end
|
973
|
+
|
974
|
+
#
|
975
|
+
# List galleries under a subscription.
|
976
|
+
#
|
977
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
978
|
+
# will be added to the HTTP request.
|
979
|
+
#
|
980
|
+
# @return [GalleryList] which provide lazy access to pages of the response.
|
981
|
+
#
|
982
|
+
def list_as_lazy(custom_headers:nil)
|
983
|
+
response = list_async(custom_headers:custom_headers).value!
|
984
|
+
unless response.nil?
|
985
|
+
page = response.body
|
986
|
+
page.next_method = Proc.new do |next_page_link|
|
987
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
988
|
+
end
|
989
|
+
page
|
990
|
+
end
|
991
|
+
end
|
992
|
+
|
993
|
+
end
|
994
|
+
end
|