azure_mgmt_resources 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -3
- data/lib/2016-02-01/generated/azure_mgmt_resources.rb +79 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/deployment_operations.rb +331 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/deployments.rb +1000 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/alias_path_type.rb +62 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/alias_type.rb +63 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/basic_dependency.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/debug_setting.rb +45 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/dependency.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment.rb +45 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_export_result.rb +45 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/deployment_extended.rb +1 -1
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/deployment_extended_filter.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_list_result.rb +94 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/deployment_mode.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_operation.rb +65 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_operation_properties.rb +117 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb +94 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_properties.rb +103 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_properties_extended.rb +179 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/deployment_validate_result.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/export_template_request.rb +65 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/generic_resource.rb +142 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/generic_resource_filter.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/http_message.rb +45 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/identity.rb +68 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/parameters_link.rb +55 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/plan.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/provider.rb +83 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/provider_list_result.rb +94 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/provider_resource_type.rb +115 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource.rb +95 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource_group.rb +97 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource_group_export_result.rb +56 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/resource_group_filter.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource_group_list_result.rb +94 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/resource_group_properties.rb +1 -1
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/resource_identity_type.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource_list_result.rb +94 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb +83 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/resources_move_info.rb +61 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/sku.rb +94 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/sub_resource.rb +45 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/tag_count.rb +54 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/tag_details.rb +83 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/tag_value.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/tags_list_result.rb +94 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/target_resource.rb +1 -1
- data/lib/2016-02-01/generated/azure_mgmt_resources/models/template_link.rb +55 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/module_definition.rb +9 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/providers.rb +507 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/resource_groups.rb +1067 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/resource_management_client.rb +151 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/resources.rb +805 -0
- data/lib/2016-02-01/generated/azure_mgmt_resources/tags.rb +568 -0
- data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/version.rb +2 -2
- data/lib/2016-07-01/generated/azure_mgmt_resources.rb +79 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/deployment_operations.rb +331 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/deployments.rb +1000 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/alias_path_type.rb +61 -0
- data/lib/{generated → 2016-07-01/generated}/azure_mgmt_resources/models/alias_type.rb +1 -1
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/basic_dependency.rb +64 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/debug_setting.rb +45 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/dependency.rb +82 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment.rb +45 -0
- data/lib/{generated → 2016-07-01/generated}/azure_mgmt_resources/models/deployment_export_result.rb +1 -1
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_extended.rb +65 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_extended_filter.rb +44 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_list_result.rb +94 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_mode.rb +16 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_operation.rb +65 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_operation_properties.rb +117 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb +94 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_properties.rb +103 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_properties_extended.rb +179 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_validate_result.rb +57 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/export_template_request.rb +65 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/generic_resource.rb +142 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/generic_resource_filter.rb +64 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/http_message.rb +45 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/identity.rb +68 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/parameters_link.rb +55 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/plan.rb +74 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/provider.rb +83 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/provider_list_result.rb +94 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/provider_resource_type.rb +115 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource.rb +95 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_group.rb +97 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_group_export_result.rb +56 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_group_filter.rb +54 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_group_list_result.rb +94 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_group_properties.rb +45 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_identity_type.rb +15 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_list_result.rb +94 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb +83 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +85 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/resources_move_info.rb +61 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/sku.rb +94 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/sub_resource.rb +45 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/tag_count.rb +54 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/tag_details.rb +83 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/tag_value.rb +65 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/tags_list_result.rb +94 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/target_resource.rb +64 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/models/template_link.rb +55 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/module_definition.rb +9 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/providers.rb +507 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/resource_groups.rb +1067 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/resource_management_client.rb +151 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/resources.rb +805 -0
- data/lib/2016-07-01/generated/azure_mgmt_resources/tags.rb +568 -0
- data/lib/{generated/azure_mgmt_resources/module_definition.rb → 2016-07-01/generated/azure_mgmt_resources/version.rb} +3 -3
- data/lib/2016-09-01/generated/azure_mgmt_resources.rb +79 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/deployment_operations.rb +4 -4
- data/lib/2016-09-01/generated/azure_mgmt_resources/deployments.rb +1086 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/alias_path_type.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/alias_type.rb +62 -0
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/basic_dependency.rb +64 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/debug_setting.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/dependency.rb +82 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/deployment_export_result.rb +44 -0
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/deployment_extended.rb +65 -0
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/deployment_extended_filter.rb +44 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_list_result.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/deployment_mode.rb +16 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_operation.rb +1 -1
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_operation_properties.rb +1 -1
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_operations_list_result.rb +1 -1
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_properties.rb +1 -1
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_properties_extended.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/deployment_validate_result.rb +57 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/export_template_request.rb +1 -1
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/generic_resource.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/generic_resource_filter.rb +64 -0
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/http_message.rb +45 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/identity.rb +1 -1
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/parameters_link.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/plan.rb +74 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/provider.rb +1 -1
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/provider_list_result.rb +1 -1
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/provider_resource_type.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource.rb +95 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/resource_group.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_group_export_result.rb +56 -0
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_group_filter.rb +54 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/resource_group_list_result.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_group_properties.rb +45 -0
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_identity_type.rb +15 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/resource_list_result.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb +87 -0
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +85 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/resources_move_info.rb +1 -1
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/sku.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/sub_resource.rb +45 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/tag_count.rb +1 -1
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/tag_details.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/tag_value.rb +65 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/tags_list_result.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/models/target_resource.rb +64 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/template_link.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_resources/module_definition.rb +9 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/providers.rb +6 -6
- data/lib/2016-09-01/generated/azure_mgmt_resources/resource_groups.rb +1086 -0
- data/lib/2016-09-01/generated/azure_mgmt_resources/resource_management_client.rb +149 -0
- data/lib/2016-09-01/generated/azure_mgmt_resources/resources.rb +1429 -0
- data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/tags.rb +7 -7
- data/lib/2016-09-01/generated/azure_mgmt_resources/version.rb +8 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources.rb +80 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/deployment_operations.rb +335 -0
- data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/deployments.rb +12 -12
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/alias_path_type.rb +61 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/alias_type.rb +62 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/basic_dependency.rb +64 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/debug_setting.rb +52 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/dependency.rb +82 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment.rb +45 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_export_result.rb +44 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_extended.rb +65 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_extended_filter.rb +44 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_list_result.rb +95 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_mode.rb +16 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_operation.rb +67 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_operation_properties.rb +125 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb +95 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_properties.rb +117 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_properties_extended.rb +183 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_validate_result.rb +57 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/export_template_request.rb +65 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/generic_resource.rb +145 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/generic_resource_filter.rb +64 -0
- data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/http_message.rb +1 -1
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/identity.rb +68 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/parameters_link.rb +55 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/plan.rb +74 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/provider.rb +86 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/provider_list_result.rb +95 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/provider_resource_type.rb +115 -0
- data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/resource.rb +1 -1
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_group.rb +107 -0
- data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/resource_group_export_result.rb +1 -1
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_group_filter.rb +54 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_group_list_result.rb +95 -0
- data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/resource_group_patchable.rb +1 -1
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_group_properties.rb +45 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_identity_type.rb +15 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_list_result.rb +95 -0
- data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/resource_management_error_with_details.rb +1 -1
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +85 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/resources_move_info.rb +61 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/sku.rb +94 -0
- data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/sub_resource.rb +1 -1
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/tag_count.rb +54 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/tag_details.rb +85 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/tag_value.rb +65 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/tags_list_result.rb +95 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/target_resource.rb +64 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/models/template_link.rb +55 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/module_definition.rb +9 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/providers.rb +515 -0
- data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/resource_groups.rb +11 -11
- data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/resource_management_client.rb +3 -3
- data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/resources.rb +17 -17
- data/lib/2017-05-10/generated/azure_mgmt_resources/tags.rb +593 -0
- data/lib/2017-05-10/generated/azure_mgmt_resources/version.rb +8 -0
- data/lib/azure_mgmt_resources.rb +6 -1
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/common/configurable.rb +73 -0
- data/lib/profiles/common/default.rb +68 -0
- data/lib/profiles/latest/modules/resources_profile_module.rb +240 -0
- data/lib/profiles/latest/resources_latest_profile_client.rb +33 -0
- data/lib/profiles/latest/resources_module_definition.rb +9 -0
- data/lib/profiles/v2017_03_09/modules/resources_profile_module.rb +236 -0
- data/lib/profiles/v2017_03_09/resources_module_definition.rb +9 -0
- data/lib/profiles/v2017_03_09/resources_v2017_03_09_profile_client.rb +33 -0
- data/lib/version.rb +7 -0
- metadata +237 -59
- data/lib/generated/azure_mgmt_resources.rb +0 -80
@@ -0,0 +1,151 @@
|
|
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::Resources::Mgmt::V2016_02_01
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class ResourceManagementClient < 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] Gets 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] Gets or sets the preferred language for the response.
|
29
|
+
attr_accessor :accept_language
|
30
|
+
|
31
|
+
# @return [Integer] Gets or sets the retry timeout in seconds for Long
|
32
|
+
# Running Operations. Default value is 30.
|
33
|
+
attr_accessor :long_running_operation_retry_timeout
|
34
|
+
|
35
|
+
# @return [Boolean] When set to true a unique x-ms-client-request-id value
|
36
|
+
# is generated and included in each request. Default is true.
|
37
|
+
attr_accessor :generate_client_request_id
|
38
|
+
|
39
|
+
# @return [Deployments] deployments
|
40
|
+
attr_reader :deployments
|
41
|
+
|
42
|
+
# @return [Providers] providers
|
43
|
+
attr_reader :providers
|
44
|
+
|
45
|
+
# @return [ResourceGroups] resource_groups
|
46
|
+
attr_reader :resource_groups
|
47
|
+
|
48
|
+
# @return [Resources] resources
|
49
|
+
attr_reader :resources
|
50
|
+
|
51
|
+
# @return [Tags] tags
|
52
|
+
attr_reader :tags
|
53
|
+
|
54
|
+
# @return [DeploymentOperations] deployment_operations
|
55
|
+
attr_reader :deployment_operations
|
56
|
+
|
57
|
+
#
|
58
|
+
# Creates initializes a new instance of the ResourceManagementClient class.
|
59
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
60
|
+
# @param base_url [String] the base URI of the service.
|
61
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
62
|
+
#
|
63
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
64
|
+
super(credentials, options)
|
65
|
+
@base_url = base_url || 'https://management.azure.com'
|
66
|
+
|
67
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
68
|
+
@credentials = credentials
|
69
|
+
|
70
|
+
@deployments = Deployments.new(self)
|
71
|
+
@providers = Providers.new(self)
|
72
|
+
@resource_groups = ResourceGroups.new(self)
|
73
|
+
@resources = Resources.new(self)
|
74
|
+
@tags = Tags.new(self)
|
75
|
+
@deployment_operations = DeploymentOperations.new(self)
|
76
|
+
@api_version = '2016-02-01'
|
77
|
+
@accept_language = 'en-US'
|
78
|
+
@long_running_operation_retry_timeout = 30
|
79
|
+
@generate_client_request_id = true
|
80
|
+
add_telemetry
|
81
|
+
end
|
82
|
+
|
83
|
+
#
|
84
|
+
# Makes a request and returns the body of the response.
|
85
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
86
|
+
# @param path [String] the path, relative to {base_url}.
|
87
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
88
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
89
|
+
# Example:
|
90
|
+
#
|
91
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
92
|
+
# path = "/path"
|
93
|
+
# options = {
|
94
|
+
# body: request_content,
|
95
|
+
# query_params: {'api-version' => '2016-02-01'}
|
96
|
+
# }
|
97
|
+
# result = @client.make_request(:put, path, options)
|
98
|
+
#
|
99
|
+
def make_request(method, path, options = {})
|
100
|
+
result = make_request_with_http_info(method, path, options)
|
101
|
+
result.body unless result.nil?
|
102
|
+
end
|
103
|
+
|
104
|
+
#
|
105
|
+
# Makes a request and returns the operation response.
|
106
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
107
|
+
# @param path [String] the path, relative to {base_url}.
|
108
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
109
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
110
|
+
#
|
111
|
+
def make_request_with_http_info(method, path, options = {})
|
112
|
+
result = make_request_async(method, path, options).value!
|
113
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
114
|
+
result
|
115
|
+
end
|
116
|
+
|
117
|
+
#
|
118
|
+
# Makes a request asynchronously.
|
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 [Concurrent::Promise] Promise object which holds the HTTP response.
|
123
|
+
#
|
124
|
+
def make_request_async(method, path, options = {})
|
125
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
126
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
127
|
+
|
128
|
+
request_url = options[:base_url] || @base_url
|
129
|
+
|
130
|
+
request_headers = @request_headers
|
131
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
132
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
133
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
134
|
+
|
135
|
+
super(request_url, method, path, options)
|
136
|
+
end
|
137
|
+
|
138
|
+
|
139
|
+
private
|
140
|
+
#
|
141
|
+
# Adds telemetry information.
|
142
|
+
#
|
143
|
+
def add_telemetry
|
144
|
+
sdk_information = 'azure_mgmt_resources'
|
145
|
+
if defined? Azure::Resources::Mgmt::V2016_02_01::VERSION
|
146
|
+
sdk_information = "#{sdk_information}/#{Azure::Resources::Mgmt::V2016_02_01::VERSION}"
|
147
|
+
end
|
148
|
+
add_user_agent_information(sdk_information)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
@@ -0,0 +1,805 @@
|
|
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::Resources::Mgmt::V2016_02_01
|
7
|
+
#
|
8
|
+
# Resources
|
9
|
+
#
|
10
|
+
class Resources
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Resources class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [ResourceManagementClient] reference to the ResourceManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Move resources from one resource group to another. The resources being moved
|
26
|
+
# should all be in the same resource group.
|
27
|
+
#
|
28
|
+
# @param source_resource_group_name [String] Source resource group name.
|
29
|
+
# @param parameters [ResourcesMoveInfo] move resources' parameters.
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
def move_resources(source_resource_group_name, parameters, custom_headers = nil)
|
34
|
+
response = move_resources_async(source_resource_group_name, parameters, custom_headers).value!
|
35
|
+
nil
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# @param source_resource_group_name [String] Source resource group name.
|
40
|
+
# @param parameters [ResourcesMoveInfo] move resources' parameters.
|
41
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
42
|
+
# will be added to the HTTP request.
|
43
|
+
#
|
44
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
45
|
+
# response.
|
46
|
+
#
|
47
|
+
def move_resources_async(source_resource_group_name, parameters, custom_headers = nil)
|
48
|
+
# Send request
|
49
|
+
promise = begin_move_resources_async(source_resource_group_name, parameters, custom_headers)
|
50
|
+
|
51
|
+
promise = promise.then do |response|
|
52
|
+
# Defining deserialization method.
|
53
|
+
deserialize_method = lambda do |parsed_response|
|
54
|
+
end
|
55
|
+
|
56
|
+
# Waiting for response.
|
57
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
58
|
+
end
|
59
|
+
|
60
|
+
promise
|
61
|
+
end
|
62
|
+
|
63
|
+
#
|
64
|
+
# Get all of the resources under a subscription.
|
65
|
+
#
|
66
|
+
# @param filter [String] The filter to apply on the operation.
|
67
|
+
# @param expand [String] The $expand query parameter.
|
68
|
+
# @param top [Integer] Query parameters. If null is passed returns all resource
|
69
|
+
# groups.
|
70
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
71
|
+
# will be added to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Array<GenericResource>] operation results.
|
74
|
+
#
|
75
|
+
def list(filter = nil, expand = nil, top = nil, custom_headers = nil)
|
76
|
+
first_page = list_as_lazy(filter, expand, top, custom_headers)
|
77
|
+
first_page.get_all_items
|
78
|
+
end
|
79
|
+
|
80
|
+
#
|
81
|
+
# Get all of the resources under a subscription.
|
82
|
+
#
|
83
|
+
# @param filter [String] The filter to apply on the operation.
|
84
|
+
# @param expand [String] The $expand query parameter.
|
85
|
+
# @param top [Integer] Query parameters. If null is passed returns all resource
|
86
|
+
# groups.
|
87
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
88
|
+
# will be added to the HTTP request.
|
89
|
+
#
|
90
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
91
|
+
#
|
92
|
+
def list_with_http_info(filter = nil, expand = nil, top = nil, custom_headers = nil)
|
93
|
+
list_async(filter, expand, top, custom_headers).value!
|
94
|
+
end
|
95
|
+
|
96
|
+
#
|
97
|
+
# Get all of the resources under a subscription.
|
98
|
+
#
|
99
|
+
# @param filter [String] The filter to apply on the operation.
|
100
|
+
# @param expand [String] The $expand query parameter.
|
101
|
+
# @param top [Integer] Query parameters. If null is passed returns all resource
|
102
|
+
# groups.
|
103
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
104
|
+
# to the HTTP request.
|
105
|
+
#
|
106
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
107
|
+
#
|
108
|
+
def list_async(filter = nil, expand = nil, top = nil, custom_headers = nil)
|
109
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
110
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
111
|
+
|
112
|
+
|
113
|
+
request_headers = {}
|
114
|
+
|
115
|
+
# Set Headers
|
116
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
117
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
118
|
+
path_template = 'subscriptions/{subscriptionId}/resources'
|
119
|
+
|
120
|
+
request_url = @base_url || @client.base_url
|
121
|
+
|
122
|
+
options = {
|
123
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
124
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
125
|
+
query_params: {'$filter' => filter,'$expand' => expand,'$top' => top,'api-version' => @client.api_version},
|
126
|
+
headers: request_headers.merge(custom_headers || {}),
|
127
|
+
base_url: request_url
|
128
|
+
}
|
129
|
+
promise = @client.make_request_async(:get, path_template, options)
|
130
|
+
|
131
|
+
promise = promise.then do |result|
|
132
|
+
http_response = result.response
|
133
|
+
status_code = http_response.status
|
134
|
+
response_content = http_response.body
|
135
|
+
unless status_code == 200
|
136
|
+
error_model = JSON.load(response_content)
|
137
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
138
|
+
end
|
139
|
+
|
140
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
141
|
+
# Deserialize Response
|
142
|
+
if status_code == 200
|
143
|
+
begin
|
144
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
145
|
+
result_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceListResult.mapper()
|
146
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
147
|
+
rescue Exception => e
|
148
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
result
|
153
|
+
end
|
154
|
+
|
155
|
+
promise.execute
|
156
|
+
end
|
157
|
+
|
158
|
+
#
|
159
|
+
# Checks whether resource exists.
|
160
|
+
#
|
161
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
162
|
+
# is case insensitive.
|
163
|
+
# @param resource_provider_namespace [String] Resource identity.
|
164
|
+
# @param parent_resource_path [String] Resource identity.
|
165
|
+
# @param resource_type [String] Resource identity.
|
166
|
+
# @param resource_name [String] Resource identity.
|
167
|
+
# @param api_version [String]
|
168
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
169
|
+
# will be added to the HTTP request.
|
170
|
+
#
|
171
|
+
# @return [Boolean] operation results.
|
172
|
+
#
|
173
|
+
def check_existence(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers = nil)
|
174
|
+
response = check_existence_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
175
|
+
response.body unless response.nil?
|
176
|
+
end
|
177
|
+
|
178
|
+
#
|
179
|
+
# Checks whether resource exists.
|
180
|
+
#
|
181
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
182
|
+
# is case insensitive.
|
183
|
+
# @param resource_provider_namespace [String] Resource identity.
|
184
|
+
# @param parent_resource_path [String] Resource identity.
|
185
|
+
# @param resource_type [String] Resource identity.
|
186
|
+
# @param resource_name [String] Resource identity.
|
187
|
+
# @param api_version [String]
|
188
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
189
|
+
# will be added to the HTTP request.
|
190
|
+
#
|
191
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
192
|
+
#
|
193
|
+
def check_existence_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers = nil)
|
194
|
+
check_existence_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
195
|
+
end
|
196
|
+
|
197
|
+
#
|
198
|
+
# Checks whether resource exists.
|
199
|
+
#
|
200
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
201
|
+
# is case insensitive.
|
202
|
+
# @param resource_provider_namespace [String] Resource identity.
|
203
|
+
# @param parent_resource_path [String] Resource identity.
|
204
|
+
# @param resource_type [String] Resource identity.
|
205
|
+
# @param resource_name [String] Resource identity.
|
206
|
+
# @param api_version [String]
|
207
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
208
|
+
# to the HTTP request.
|
209
|
+
#
|
210
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
211
|
+
#
|
212
|
+
def check_existence_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers = nil)
|
213
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
214
|
+
fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
|
215
|
+
fail ArgumentError, 'parent_resource_path is nil' if parent_resource_path.nil?
|
216
|
+
fail ArgumentError, 'resource_type is nil' if resource_type.nil?
|
217
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
218
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
219
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
220
|
+
|
221
|
+
|
222
|
+
request_headers = {}
|
223
|
+
|
224
|
+
# Set Headers
|
225
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
226
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
227
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'
|
228
|
+
|
229
|
+
request_url = @base_url || @client.base_url
|
230
|
+
|
231
|
+
options = {
|
232
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
233
|
+
path_params: {'resourceGroupName' => resource_group_name,'resourceProviderNamespace' => resource_provider_namespace,'resourceName' => resource_name,'subscriptionId' => @client.subscription_id},
|
234
|
+
skip_encoding_path_params: {'parentResourcePath' => parent_resource_path,'resourceType' => resource_type},
|
235
|
+
query_params: {'api-version' => api_version},
|
236
|
+
headers: request_headers.merge(custom_headers || {}),
|
237
|
+
base_url: request_url
|
238
|
+
}
|
239
|
+
promise = @client.make_request_async(:head, path_template, options)
|
240
|
+
|
241
|
+
promise = promise.then do |result|
|
242
|
+
http_response = result.response
|
243
|
+
status_code = http_response.status
|
244
|
+
response_content = http_response.body
|
245
|
+
unless status_code == 204 || status_code == 404
|
246
|
+
error_model = JSON.load(response_content)
|
247
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
248
|
+
end
|
249
|
+
|
250
|
+
result.body = (status_code == 204)
|
251
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
252
|
+
|
253
|
+
result
|
254
|
+
end
|
255
|
+
|
256
|
+
promise.execute
|
257
|
+
end
|
258
|
+
|
259
|
+
#
|
260
|
+
# Delete resource and all of its resources.
|
261
|
+
#
|
262
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
263
|
+
# is case insensitive.
|
264
|
+
# @param resource_provider_namespace [String] Resource identity.
|
265
|
+
# @param parent_resource_path [String] Resource identity.
|
266
|
+
# @param resource_type [String] Resource identity.
|
267
|
+
# @param resource_name [String] Resource identity.
|
268
|
+
# @param api_version [String]
|
269
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
270
|
+
# will be added to the HTTP request.
|
271
|
+
#
|
272
|
+
#
|
273
|
+
def delete(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers = nil)
|
274
|
+
response = delete_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
275
|
+
nil
|
276
|
+
end
|
277
|
+
|
278
|
+
#
|
279
|
+
# Delete resource and all of its resources.
|
280
|
+
#
|
281
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
282
|
+
# is case insensitive.
|
283
|
+
# @param resource_provider_namespace [String] Resource identity.
|
284
|
+
# @param parent_resource_path [String] Resource identity.
|
285
|
+
# @param resource_type [String] Resource identity.
|
286
|
+
# @param resource_name [String] Resource identity.
|
287
|
+
# @param api_version [String]
|
288
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
289
|
+
# will be added to the HTTP request.
|
290
|
+
#
|
291
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
292
|
+
#
|
293
|
+
def delete_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers = nil)
|
294
|
+
delete_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
295
|
+
end
|
296
|
+
|
297
|
+
#
|
298
|
+
# Delete resource and all of its resources.
|
299
|
+
#
|
300
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
301
|
+
# is case insensitive.
|
302
|
+
# @param resource_provider_namespace [String] Resource identity.
|
303
|
+
# @param parent_resource_path [String] Resource identity.
|
304
|
+
# @param resource_type [String] Resource identity.
|
305
|
+
# @param resource_name [String] Resource identity.
|
306
|
+
# @param api_version [String]
|
307
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
308
|
+
# to the HTTP request.
|
309
|
+
#
|
310
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
311
|
+
#
|
312
|
+
def delete_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers = nil)
|
313
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
314
|
+
fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
|
315
|
+
fail ArgumentError, 'parent_resource_path is nil' if parent_resource_path.nil?
|
316
|
+
fail ArgumentError, 'resource_type is nil' if resource_type.nil?
|
317
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
318
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
319
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
320
|
+
|
321
|
+
|
322
|
+
request_headers = {}
|
323
|
+
|
324
|
+
# Set Headers
|
325
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
326
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
327
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'
|
328
|
+
|
329
|
+
request_url = @base_url || @client.base_url
|
330
|
+
|
331
|
+
options = {
|
332
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
333
|
+
path_params: {'resourceGroupName' => resource_group_name,'resourceProviderNamespace' => resource_provider_namespace,'resourceName' => resource_name,'subscriptionId' => @client.subscription_id},
|
334
|
+
skip_encoding_path_params: {'parentResourcePath' => parent_resource_path,'resourceType' => resource_type},
|
335
|
+
query_params: {'api-version' => api_version},
|
336
|
+
headers: request_headers.merge(custom_headers || {}),
|
337
|
+
base_url: request_url
|
338
|
+
}
|
339
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
340
|
+
|
341
|
+
promise = promise.then do |result|
|
342
|
+
http_response = result.response
|
343
|
+
status_code = http_response.status
|
344
|
+
response_content = http_response.body
|
345
|
+
unless status_code == 200 || status_code == 204 || status_code == 202
|
346
|
+
error_model = JSON.load(response_content)
|
347
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
348
|
+
end
|
349
|
+
|
350
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
351
|
+
|
352
|
+
result
|
353
|
+
end
|
354
|
+
|
355
|
+
promise.execute
|
356
|
+
end
|
357
|
+
|
358
|
+
#
|
359
|
+
# Create a resource.
|
360
|
+
#
|
361
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
362
|
+
# is case insensitive.
|
363
|
+
# @param resource_provider_namespace [String] Resource identity.
|
364
|
+
# @param parent_resource_path [String] Resource identity.
|
365
|
+
# @param resource_type [String] Resource identity.
|
366
|
+
# @param resource_name [String] Resource identity.
|
367
|
+
# @param api_version [String]
|
368
|
+
# @param parameters [GenericResource] Create or update resource parameters.
|
369
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
370
|
+
# will be added to the HTTP request.
|
371
|
+
#
|
372
|
+
# @return [GenericResource] operation results.
|
373
|
+
#
|
374
|
+
def create_or_update(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers = nil)
|
375
|
+
response = create_or_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers).value!
|
376
|
+
response.body unless response.nil?
|
377
|
+
end
|
378
|
+
|
379
|
+
#
|
380
|
+
# Create a resource.
|
381
|
+
#
|
382
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
383
|
+
# is case insensitive.
|
384
|
+
# @param resource_provider_namespace [String] Resource identity.
|
385
|
+
# @param parent_resource_path [String] Resource identity.
|
386
|
+
# @param resource_type [String] Resource identity.
|
387
|
+
# @param resource_name [String] Resource identity.
|
388
|
+
# @param api_version [String]
|
389
|
+
# @param parameters [GenericResource] Create or update resource parameters.
|
390
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
391
|
+
# will be added to the HTTP request.
|
392
|
+
#
|
393
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
394
|
+
#
|
395
|
+
def create_or_update_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers = nil)
|
396
|
+
create_or_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers).value!
|
397
|
+
end
|
398
|
+
|
399
|
+
#
|
400
|
+
# Create a resource.
|
401
|
+
#
|
402
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
403
|
+
# is case insensitive.
|
404
|
+
# @param resource_provider_namespace [String] Resource identity.
|
405
|
+
# @param parent_resource_path [String] Resource identity.
|
406
|
+
# @param resource_type [String] Resource identity.
|
407
|
+
# @param resource_name [String] Resource identity.
|
408
|
+
# @param api_version [String]
|
409
|
+
# @param parameters [GenericResource] Create or update resource parameters.
|
410
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
411
|
+
# to the HTTP request.
|
412
|
+
#
|
413
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
414
|
+
#
|
415
|
+
def create_or_update_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, parameters, custom_headers = nil)
|
416
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
417
|
+
fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
|
418
|
+
fail ArgumentError, 'parent_resource_path is nil' if parent_resource_path.nil?
|
419
|
+
fail ArgumentError, 'resource_type is nil' if resource_type.nil?
|
420
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
421
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
422
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
423
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
424
|
+
|
425
|
+
|
426
|
+
request_headers = {}
|
427
|
+
|
428
|
+
# Set Headers
|
429
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
430
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
431
|
+
|
432
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
433
|
+
|
434
|
+
# Serialize Request
|
435
|
+
request_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::GenericResource.mapper()
|
436
|
+
request_content = @client.serialize(request_mapper, parameters)
|
437
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
438
|
+
|
439
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'
|
440
|
+
|
441
|
+
request_url = @base_url || @client.base_url
|
442
|
+
|
443
|
+
options = {
|
444
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
445
|
+
path_params: {'resourceGroupName' => resource_group_name,'resourceProviderNamespace' => resource_provider_namespace,'resourceName' => resource_name,'subscriptionId' => @client.subscription_id},
|
446
|
+
skip_encoding_path_params: {'parentResourcePath' => parent_resource_path,'resourceType' => resource_type},
|
447
|
+
query_params: {'api-version' => api_version},
|
448
|
+
body: request_content,
|
449
|
+
headers: request_headers.merge(custom_headers || {}),
|
450
|
+
base_url: request_url
|
451
|
+
}
|
452
|
+
promise = @client.make_request_async(:put, path_template, options)
|
453
|
+
|
454
|
+
promise = promise.then do |result|
|
455
|
+
http_response = result.response
|
456
|
+
status_code = http_response.status
|
457
|
+
response_content = http_response.body
|
458
|
+
unless status_code == 201 || status_code == 200
|
459
|
+
error_model = JSON.load(response_content)
|
460
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
461
|
+
end
|
462
|
+
|
463
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
464
|
+
# Deserialize Response
|
465
|
+
if status_code == 201
|
466
|
+
begin
|
467
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
468
|
+
result_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::GenericResource.mapper()
|
469
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
470
|
+
rescue Exception => e
|
471
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
472
|
+
end
|
473
|
+
end
|
474
|
+
# Deserialize Response
|
475
|
+
if status_code == 200
|
476
|
+
begin
|
477
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
478
|
+
result_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::GenericResource.mapper()
|
479
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
480
|
+
rescue Exception => e
|
481
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
482
|
+
end
|
483
|
+
end
|
484
|
+
|
485
|
+
result
|
486
|
+
end
|
487
|
+
|
488
|
+
promise.execute
|
489
|
+
end
|
490
|
+
|
491
|
+
#
|
492
|
+
# Returns a resource belonging to a resource group.
|
493
|
+
#
|
494
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
495
|
+
# is case insensitive.
|
496
|
+
# @param resource_provider_namespace [String] Resource identity.
|
497
|
+
# @param parent_resource_path [String] Resource identity.
|
498
|
+
# @param resource_type [String] Resource identity.
|
499
|
+
# @param resource_name [String] Resource identity.
|
500
|
+
# @param api_version [String]
|
501
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
502
|
+
# will be added to the HTTP request.
|
503
|
+
#
|
504
|
+
# @return [GenericResource] operation results.
|
505
|
+
#
|
506
|
+
def get(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers = nil)
|
507
|
+
response = get_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
508
|
+
response.body unless response.nil?
|
509
|
+
end
|
510
|
+
|
511
|
+
#
|
512
|
+
# Returns a resource belonging to a resource group.
|
513
|
+
#
|
514
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
515
|
+
# is case insensitive.
|
516
|
+
# @param resource_provider_namespace [String] Resource identity.
|
517
|
+
# @param parent_resource_path [String] Resource identity.
|
518
|
+
# @param resource_type [String] Resource identity.
|
519
|
+
# @param resource_name [String] Resource identity.
|
520
|
+
# @param api_version [String]
|
521
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
522
|
+
# will be added to the HTTP request.
|
523
|
+
#
|
524
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
525
|
+
#
|
526
|
+
def get_with_http_info(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers = nil)
|
527
|
+
get_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers).value!
|
528
|
+
end
|
529
|
+
|
530
|
+
#
|
531
|
+
# Returns a resource belonging to a resource group.
|
532
|
+
#
|
533
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
534
|
+
# is case insensitive.
|
535
|
+
# @param resource_provider_namespace [String] Resource identity.
|
536
|
+
# @param parent_resource_path [String] Resource identity.
|
537
|
+
# @param resource_type [String] Resource identity.
|
538
|
+
# @param resource_name [String] Resource identity.
|
539
|
+
# @param api_version [String]
|
540
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
541
|
+
# to the HTTP request.
|
542
|
+
#
|
543
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
544
|
+
#
|
545
|
+
def get_async(resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, api_version, custom_headers = nil)
|
546
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
547
|
+
fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
|
548
|
+
fail ArgumentError, 'parent_resource_path is nil' if parent_resource_path.nil?
|
549
|
+
fail ArgumentError, 'resource_type is nil' if resource_type.nil?
|
550
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
551
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
552
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
553
|
+
|
554
|
+
|
555
|
+
request_headers = {}
|
556
|
+
|
557
|
+
# Set Headers
|
558
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
559
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
560
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}'
|
561
|
+
|
562
|
+
request_url = @base_url || @client.base_url
|
563
|
+
|
564
|
+
options = {
|
565
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
566
|
+
path_params: {'resourceGroupName' => resource_group_name,'resourceProviderNamespace' => resource_provider_namespace,'resourceName' => resource_name,'subscriptionId' => @client.subscription_id},
|
567
|
+
skip_encoding_path_params: {'parentResourcePath' => parent_resource_path,'resourceType' => resource_type},
|
568
|
+
query_params: {'api-version' => api_version},
|
569
|
+
headers: request_headers.merge(custom_headers || {}),
|
570
|
+
base_url: request_url
|
571
|
+
}
|
572
|
+
promise = @client.make_request_async(:get, path_template, options)
|
573
|
+
|
574
|
+
promise = promise.then do |result|
|
575
|
+
http_response = result.response
|
576
|
+
status_code = http_response.status
|
577
|
+
response_content = http_response.body
|
578
|
+
unless status_code == 200
|
579
|
+
error_model = JSON.load(response_content)
|
580
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
581
|
+
end
|
582
|
+
|
583
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
584
|
+
# Deserialize Response
|
585
|
+
if status_code == 200
|
586
|
+
begin
|
587
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
588
|
+
result_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::GenericResource.mapper()
|
589
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
590
|
+
rescue Exception => e
|
591
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
592
|
+
end
|
593
|
+
end
|
594
|
+
|
595
|
+
result
|
596
|
+
end
|
597
|
+
|
598
|
+
promise.execute
|
599
|
+
end
|
600
|
+
|
601
|
+
#
|
602
|
+
# Move resources from one resource group to another. The resources being moved
|
603
|
+
# should all be in the same resource group.
|
604
|
+
#
|
605
|
+
# @param source_resource_group_name [String] Source resource group name.
|
606
|
+
# @param parameters [ResourcesMoveInfo] move resources' parameters.
|
607
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
608
|
+
# will be added to the HTTP request.
|
609
|
+
#
|
610
|
+
#
|
611
|
+
def begin_move_resources(source_resource_group_name, parameters, custom_headers = nil)
|
612
|
+
response = begin_move_resources_async(source_resource_group_name, parameters, custom_headers).value!
|
613
|
+
nil
|
614
|
+
end
|
615
|
+
|
616
|
+
#
|
617
|
+
# Move resources from one resource group to another. The resources being moved
|
618
|
+
# should all be in the same resource group.
|
619
|
+
#
|
620
|
+
# @param source_resource_group_name [String] Source resource group name.
|
621
|
+
# @param parameters [ResourcesMoveInfo] move resources' parameters.
|
622
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
623
|
+
# will be added to the HTTP request.
|
624
|
+
#
|
625
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
626
|
+
#
|
627
|
+
def begin_move_resources_with_http_info(source_resource_group_name, parameters, custom_headers = nil)
|
628
|
+
begin_move_resources_async(source_resource_group_name, parameters, custom_headers).value!
|
629
|
+
end
|
630
|
+
|
631
|
+
#
|
632
|
+
# Move resources from one resource group to another. The resources being moved
|
633
|
+
# should all be in the same resource group.
|
634
|
+
#
|
635
|
+
# @param source_resource_group_name [String] Source resource group name.
|
636
|
+
# @param parameters [ResourcesMoveInfo] move resources' parameters.
|
637
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
638
|
+
# to the HTTP request.
|
639
|
+
#
|
640
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
641
|
+
#
|
642
|
+
def begin_move_resources_async(source_resource_group_name, parameters, custom_headers = nil)
|
643
|
+
fail ArgumentError, 'source_resource_group_name is nil' if source_resource_group_name.nil?
|
644
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
645
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
646
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
647
|
+
|
648
|
+
|
649
|
+
request_headers = {}
|
650
|
+
|
651
|
+
# Set Headers
|
652
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
653
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
654
|
+
|
655
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
656
|
+
|
657
|
+
# Serialize Request
|
658
|
+
request_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::ResourcesMoveInfo.mapper()
|
659
|
+
request_content = @client.serialize(request_mapper, parameters)
|
660
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
661
|
+
|
662
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources'
|
663
|
+
|
664
|
+
request_url = @base_url || @client.base_url
|
665
|
+
|
666
|
+
options = {
|
667
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
668
|
+
path_params: {'sourceResourceGroupName' => source_resource_group_name,'subscriptionId' => @client.subscription_id},
|
669
|
+
query_params: {'api-version' => @client.api_version},
|
670
|
+
body: request_content,
|
671
|
+
headers: request_headers.merge(custom_headers || {}),
|
672
|
+
base_url: request_url
|
673
|
+
}
|
674
|
+
promise = @client.make_request_async(:post, path_template, options)
|
675
|
+
|
676
|
+
promise = promise.then do |result|
|
677
|
+
http_response = result.response
|
678
|
+
status_code = http_response.status
|
679
|
+
response_content = http_response.body
|
680
|
+
unless status_code == 202 || status_code == 204
|
681
|
+
error_model = JSON.load(response_content)
|
682
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
683
|
+
end
|
684
|
+
|
685
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
686
|
+
|
687
|
+
result
|
688
|
+
end
|
689
|
+
|
690
|
+
promise.execute
|
691
|
+
end
|
692
|
+
|
693
|
+
#
|
694
|
+
# Get all of the resources under a subscription.
|
695
|
+
#
|
696
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
697
|
+
# to List operation.
|
698
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
699
|
+
# will be added to the HTTP request.
|
700
|
+
#
|
701
|
+
# @return [ResourceListResult] operation results.
|
702
|
+
#
|
703
|
+
def list_next(next_page_link, custom_headers = nil)
|
704
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
705
|
+
response.body unless response.nil?
|
706
|
+
end
|
707
|
+
|
708
|
+
#
|
709
|
+
# Get all of the resources under a subscription.
|
710
|
+
#
|
711
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
712
|
+
# to List operation.
|
713
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
714
|
+
# will be added to the HTTP request.
|
715
|
+
#
|
716
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
717
|
+
#
|
718
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
719
|
+
list_next_async(next_page_link, custom_headers).value!
|
720
|
+
end
|
721
|
+
|
722
|
+
#
|
723
|
+
# Get all of the resources under a subscription.
|
724
|
+
#
|
725
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
726
|
+
# to List operation.
|
727
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
728
|
+
# to the HTTP request.
|
729
|
+
#
|
730
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
731
|
+
#
|
732
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
733
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
734
|
+
|
735
|
+
|
736
|
+
request_headers = {}
|
737
|
+
|
738
|
+
# Set Headers
|
739
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
740
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
741
|
+
path_template = '{nextLink}'
|
742
|
+
|
743
|
+
request_url = @base_url || @client.base_url
|
744
|
+
|
745
|
+
options = {
|
746
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
747
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
748
|
+
headers: request_headers.merge(custom_headers || {}),
|
749
|
+
base_url: request_url
|
750
|
+
}
|
751
|
+
promise = @client.make_request_async(:get, path_template, options)
|
752
|
+
|
753
|
+
promise = promise.then do |result|
|
754
|
+
http_response = result.response
|
755
|
+
status_code = http_response.status
|
756
|
+
response_content = http_response.body
|
757
|
+
unless status_code == 200
|
758
|
+
error_model = JSON.load(response_content)
|
759
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
760
|
+
end
|
761
|
+
|
762
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
763
|
+
# Deserialize Response
|
764
|
+
if status_code == 200
|
765
|
+
begin
|
766
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
767
|
+
result_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceListResult.mapper()
|
768
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
769
|
+
rescue Exception => e
|
770
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
771
|
+
end
|
772
|
+
end
|
773
|
+
|
774
|
+
result
|
775
|
+
end
|
776
|
+
|
777
|
+
promise.execute
|
778
|
+
end
|
779
|
+
|
780
|
+
#
|
781
|
+
# Get all of the resources under a subscription.
|
782
|
+
#
|
783
|
+
# @param filter [String] The filter to apply on the operation.
|
784
|
+
# @param expand [String] The $expand query parameter.
|
785
|
+
# @param top [Integer] Query parameters. If null is passed returns all resource
|
786
|
+
# groups.
|
787
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
788
|
+
# will be added to the HTTP request.
|
789
|
+
#
|
790
|
+
# @return [ResourceListResult] which provide lazy access to pages of the
|
791
|
+
# response.
|
792
|
+
#
|
793
|
+
def list_as_lazy(filter = nil, expand = nil, top = nil, custom_headers = nil)
|
794
|
+
response = list_async(filter, expand, top, custom_headers).value!
|
795
|
+
unless response.nil?
|
796
|
+
page = response.body
|
797
|
+
page.next_method = Proc.new do |next_page_link|
|
798
|
+
list_next_async(next_page_link, custom_headers)
|
799
|
+
end
|
800
|
+
page
|
801
|
+
end
|
802
|
+
end
|
803
|
+
|
804
|
+
end
|
805
|
+
end
|