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,79 @@
|
|
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 '2016-07-01/generated/azure_mgmt_resources/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::Resources::Mgmt::V2016_07_01
|
23
|
+
autoload :Deployments, '2016-07-01/generated/azure_mgmt_resources/deployments.rb'
|
24
|
+
autoload :Providers, '2016-07-01/generated/azure_mgmt_resources/providers.rb'
|
25
|
+
autoload :ResourceGroups, '2016-07-01/generated/azure_mgmt_resources/resource_groups.rb'
|
26
|
+
autoload :Resources, '2016-07-01/generated/azure_mgmt_resources/resources.rb'
|
27
|
+
autoload :Tags, '2016-07-01/generated/azure_mgmt_resources/tags.rb'
|
28
|
+
autoload :DeploymentOperations, '2016-07-01/generated/azure_mgmt_resources/deployment_operations.rb'
|
29
|
+
autoload :ResourceManagementClient, '2016-07-01/generated/azure_mgmt_resources/resource_management_client.rb'
|
30
|
+
|
31
|
+
module Models
|
32
|
+
autoload :Sku, '2016-07-01/generated/azure_mgmt_resources/models/sku.rb'
|
33
|
+
autoload :DeploymentExtendedFilter, '2016-07-01/generated/azure_mgmt_resources/models/deployment_extended_filter.rb'
|
34
|
+
autoload :Identity, '2016-07-01/generated/azure_mgmt_resources/models/identity.rb'
|
35
|
+
autoload :ResourceGroupFilter, '2016-07-01/generated/azure_mgmt_resources/models/resource_group_filter.rb'
|
36
|
+
autoload :TemplateLink, '2016-07-01/generated/azure_mgmt_resources/models/template_link.rb'
|
37
|
+
autoload :DebugSetting, '2016-07-01/generated/azure_mgmt_resources/models/debug_setting.rb'
|
38
|
+
autoload :ResourceListResult, '2016-07-01/generated/azure_mgmt_resources/models/resource_list_result.rb'
|
39
|
+
autoload :Deployment, '2016-07-01/generated/azure_mgmt_resources/models/deployment.rb'
|
40
|
+
autoload :ResourceGroupProperties, '2016-07-01/generated/azure_mgmt_resources/models/resource_group_properties.rb'
|
41
|
+
autoload :ResourceManagementErrorWithDetails, '2016-07-01/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb'
|
42
|
+
autoload :ResourceGroup, '2016-07-01/generated/azure_mgmt_resources/models/resource_group.rb'
|
43
|
+
autoload :AliasType, '2016-07-01/generated/azure_mgmt_resources/models/alias_type.rb'
|
44
|
+
autoload :ResourceGroupListResult, '2016-07-01/generated/azure_mgmt_resources/models/resource_group_list_result.rb'
|
45
|
+
autoload :Provider, '2016-07-01/generated/azure_mgmt_resources/models/provider.rb'
|
46
|
+
autoload :ResourcesMoveInfo, '2016-07-01/generated/azure_mgmt_resources/models/resources_move_info.rb'
|
47
|
+
autoload :Dependency, '2016-07-01/generated/azure_mgmt_resources/models/dependency.rb'
|
48
|
+
autoload :ExportTemplateRequest, '2016-07-01/generated/azure_mgmt_resources/models/export_template_request.rb'
|
49
|
+
autoload :DeploymentValidateResult, '2016-07-01/generated/azure_mgmt_resources/models/deployment_validate_result.rb'
|
50
|
+
autoload :TagCount, '2016-07-01/generated/azure_mgmt_resources/models/tag_count.rb'
|
51
|
+
autoload :DeploymentListResult, '2016-07-01/generated/azure_mgmt_resources/models/deployment_list_result.rb'
|
52
|
+
autoload :TagValue, '2016-07-01/generated/azure_mgmt_resources/models/tag_value.rb'
|
53
|
+
autoload :Plan, '2016-07-01/generated/azure_mgmt_resources/models/plan.rb'
|
54
|
+
autoload :TagDetails, '2016-07-01/generated/azure_mgmt_resources/models/tag_details.rb'
|
55
|
+
autoload :ParametersLink, '2016-07-01/generated/azure_mgmt_resources/models/parameters_link.rb'
|
56
|
+
autoload :TagsListResult, '2016-07-01/generated/azure_mgmt_resources/models/tags_list_result.rb'
|
57
|
+
autoload :DeploymentExportResult, '2016-07-01/generated/azure_mgmt_resources/models/deployment_export_result.rb'
|
58
|
+
autoload :TargetResource, '2016-07-01/generated/azure_mgmt_resources/models/target_resource.rb'
|
59
|
+
autoload :ProviderResourceType, '2016-07-01/generated/azure_mgmt_resources/models/provider_resource_type.rb'
|
60
|
+
autoload :HttpMessage, '2016-07-01/generated/azure_mgmt_resources/models/http_message.rb'
|
61
|
+
autoload :DeploymentPropertiesExtended, '2016-07-01/generated/azure_mgmt_resources/models/deployment_properties_extended.rb'
|
62
|
+
autoload :DeploymentOperationProperties, '2016-07-01/generated/azure_mgmt_resources/models/deployment_operation_properties.rb'
|
63
|
+
autoload :ProviderListResult, '2016-07-01/generated/azure_mgmt_resources/models/provider_list_result.rb'
|
64
|
+
autoload :DeploymentOperation, '2016-07-01/generated/azure_mgmt_resources/models/deployment_operation.rb'
|
65
|
+
autoload :DeploymentProperties, '2016-07-01/generated/azure_mgmt_resources/models/deployment_properties.rb'
|
66
|
+
autoload :DeploymentOperationsListResult, '2016-07-01/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb'
|
67
|
+
autoload :BasicDependency, '2016-07-01/generated/azure_mgmt_resources/models/basic_dependency.rb'
|
68
|
+
autoload :ResourceProviderOperationDisplayProperties, '2016-07-01/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb'
|
69
|
+
autoload :GenericResourceFilter, '2016-07-01/generated/azure_mgmt_resources/models/generic_resource_filter.rb'
|
70
|
+
autoload :Resource, '2016-07-01/generated/azure_mgmt_resources/models/resource.rb'
|
71
|
+
autoload :DeploymentExtended, '2016-07-01/generated/azure_mgmt_resources/models/deployment_extended.rb'
|
72
|
+
autoload :SubResource, '2016-07-01/generated/azure_mgmt_resources/models/sub_resource.rb'
|
73
|
+
autoload :AliasPathType, '2016-07-01/generated/azure_mgmt_resources/models/alias_path_type.rb'
|
74
|
+
autoload :ResourceGroupExportResult, '2016-07-01/generated/azure_mgmt_resources/models/resource_group_export_result.rb'
|
75
|
+
autoload :GenericResource, '2016-07-01/generated/azure_mgmt_resources/models/generic_resource.rb'
|
76
|
+
autoload :DeploymentMode, '2016-07-01/generated/azure_mgmt_resources/models/deployment_mode.rb'
|
77
|
+
autoload :ResourceIdentityType, '2016-07-01/generated/azure_mgmt_resources/models/resource_identity_type.rb'
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,331 @@
|
|
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_07_01
|
7
|
+
#
|
8
|
+
# DeploymentOperations
|
9
|
+
#
|
10
|
+
class DeploymentOperations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the DeploymentOperations 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
|
+
# Get a list of deployments operations.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
28
|
+
# is case insensitive.
|
29
|
+
# @param deployment_name [String] The name of the deployment.
|
30
|
+
# @param operation_id [String] Operation Id.
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
32
|
+
# will be added to the HTTP request.
|
33
|
+
#
|
34
|
+
# @return [DeploymentOperation] operation results.
|
35
|
+
#
|
36
|
+
def get(resource_group_name, deployment_name, operation_id, custom_headers = nil)
|
37
|
+
response = get_async(resource_group_name, deployment_name, operation_id, custom_headers).value!
|
38
|
+
response.body unless response.nil?
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Get a list of deployments operations.
|
43
|
+
#
|
44
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
45
|
+
# is case insensitive.
|
46
|
+
# @param deployment_name [String] The name of the deployment.
|
47
|
+
# @param operation_id [String] Operation Id.
|
48
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
49
|
+
# will be added to the HTTP request.
|
50
|
+
#
|
51
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
52
|
+
#
|
53
|
+
def get_with_http_info(resource_group_name, deployment_name, operation_id, custom_headers = nil)
|
54
|
+
get_async(resource_group_name, deployment_name, operation_id, custom_headers).value!
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Get a list of deployments operations.
|
59
|
+
#
|
60
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
61
|
+
# is case insensitive.
|
62
|
+
# @param deployment_name [String] The name of the deployment.
|
63
|
+
# @param operation_id [String] Operation Id.
|
64
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
65
|
+
# to the HTTP request.
|
66
|
+
#
|
67
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
68
|
+
#
|
69
|
+
def get_async(resource_group_name, deployment_name, operation_id, custom_headers = nil)
|
70
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
71
|
+
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
72
|
+
fail ArgumentError, 'operation_id is nil' if operation_id.nil?
|
73
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
74
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
75
|
+
|
76
|
+
|
77
|
+
request_headers = {}
|
78
|
+
|
79
|
+
# Set Headers
|
80
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
81
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
82
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}'
|
83
|
+
|
84
|
+
request_url = @base_url || @client.base_url
|
85
|
+
|
86
|
+
options = {
|
87
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
88
|
+
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
|
89
|
+
query_params: {'api-version' => @client.api_version},
|
90
|
+
headers: request_headers.merge(custom_headers || {}),
|
91
|
+
base_url: request_url
|
92
|
+
}
|
93
|
+
promise = @client.make_request_async(:get, path_template, options)
|
94
|
+
|
95
|
+
promise = promise.then do |result|
|
96
|
+
http_response = result.response
|
97
|
+
status_code = http_response.status
|
98
|
+
response_content = http_response.body
|
99
|
+
unless status_code == 200
|
100
|
+
error_model = JSON.load(response_content)
|
101
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
102
|
+
end
|
103
|
+
|
104
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
105
|
+
# Deserialize Response
|
106
|
+
if status_code == 200
|
107
|
+
begin
|
108
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
109
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentOperation.mapper()
|
110
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
111
|
+
rescue Exception => e
|
112
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
result
|
117
|
+
end
|
118
|
+
|
119
|
+
promise.execute
|
120
|
+
end
|
121
|
+
|
122
|
+
#
|
123
|
+
# Gets a list of deployments operations.
|
124
|
+
#
|
125
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
126
|
+
# is case insensitive.
|
127
|
+
# @param deployment_name [String] The name of the deployment.
|
128
|
+
# @param top [Integer] Query parameters.
|
129
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
130
|
+
# will be added to the HTTP request.
|
131
|
+
#
|
132
|
+
# @return [Array<DeploymentOperation>] operation results.
|
133
|
+
#
|
134
|
+
def list(resource_group_name, deployment_name, top = nil, custom_headers = nil)
|
135
|
+
first_page = list_as_lazy(resource_group_name, deployment_name, top, custom_headers)
|
136
|
+
first_page.get_all_items
|
137
|
+
end
|
138
|
+
|
139
|
+
#
|
140
|
+
# Gets a list of deployments operations.
|
141
|
+
#
|
142
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
143
|
+
# is case insensitive.
|
144
|
+
# @param deployment_name [String] The name of the deployment.
|
145
|
+
# @param top [Integer] Query parameters.
|
146
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
147
|
+
# will be added to the HTTP request.
|
148
|
+
#
|
149
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
150
|
+
#
|
151
|
+
def list_with_http_info(resource_group_name, deployment_name, top = nil, custom_headers = nil)
|
152
|
+
list_async(resource_group_name, deployment_name, top, custom_headers).value!
|
153
|
+
end
|
154
|
+
|
155
|
+
#
|
156
|
+
# Gets a list of deployments operations.
|
157
|
+
#
|
158
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
159
|
+
# is case insensitive.
|
160
|
+
# @param deployment_name [String] The name of the deployment.
|
161
|
+
# @param top [Integer] Query parameters.
|
162
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
163
|
+
# to the HTTP request.
|
164
|
+
#
|
165
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
166
|
+
#
|
167
|
+
def list_async(resource_group_name, deployment_name, top = nil, custom_headers = nil)
|
168
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
169
|
+
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
170
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
171
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
172
|
+
|
173
|
+
|
174
|
+
request_headers = {}
|
175
|
+
|
176
|
+
# Set Headers
|
177
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
178
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
179
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations'
|
180
|
+
|
181
|
+
request_url = @base_url || @client.base_url
|
182
|
+
|
183
|
+
options = {
|
184
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
185
|
+
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
186
|
+
query_params: {'$top' => top,'api-version' => @client.api_version},
|
187
|
+
headers: request_headers.merge(custom_headers || {}),
|
188
|
+
base_url: request_url
|
189
|
+
}
|
190
|
+
promise = @client.make_request_async(:get, path_template, options)
|
191
|
+
|
192
|
+
promise = promise.then do |result|
|
193
|
+
http_response = result.response
|
194
|
+
status_code = http_response.status
|
195
|
+
response_content = http_response.body
|
196
|
+
unless status_code == 200
|
197
|
+
error_model = JSON.load(response_content)
|
198
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
199
|
+
end
|
200
|
+
|
201
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
202
|
+
# Deserialize Response
|
203
|
+
if status_code == 200
|
204
|
+
begin
|
205
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
206
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentOperationsListResult.mapper()
|
207
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
208
|
+
rescue Exception => e
|
209
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
result
|
214
|
+
end
|
215
|
+
|
216
|
+
promise.execute
|
217
|
+
end
|
218
|
+
|
219
|
+
#
|
220
|
+
# Gets a list of deployments operations.
|
221
|
+
#
|
222
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
223
|
+
# to List operation.
|
224
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
225
|
+
# will be added to the HTTP request.
|
226
|
+
#
|
227
|
+
# @return [DeploymentOperationsListResult] operation results.
|
228
|
+
#
|
229
|
+
def list_next(next_page_link, custom_headers = nil)
|
230
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
231
|
+
response.body unless response.nil?
|
232
|
+
end
|
233
|
+
|
234
|
+
#
|
235
|
+
# Gets a list of deployments operations.
|
236
|
+
#
|
237
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
238
|
+
# to List operation.
|
239
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
240
|
+
# will be added to the HTTP request.
|
241
|
+
#
|
242
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
243
|
+
#
|
244
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
245
|
+
list_next_async(next_page_link, custom_headers).value!
|
246
|
+
end
|
247
|
+
|
248
|
+
#
|
249
|
+
# Gets a list of deployments operations.
|
250
|
+
#
|
251
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
252
|
+
# to List operation.
|
253
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
254
|
+
# to the HTTP request.
|
255
|
+
#
|
256
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
257
|
+
#
|
258
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
259
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
260
|
+
|
261
|
+
|
262
|
+
request_headers = {}
|
263
|
+
|
264
|
+
# Set Headers
|
265
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
266
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
267
|
+
path_template = '{nextLink}'
|
268
|
+
|
269
|
+
request_url = @base_url || @client.base_url
|
270
|
+
|
271
|
+
options = {
|
272
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
273
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
274
|
+
headers: request_headers.merge(custom_headers || {}),
|
275
|
+
base_url: request_url
|
276
|
+
}
|
277
|
+
promise = @client.make_request_async(:get, path_template, options)
|
278
|
+
|
279
|
+
promise = promise.then do |result|
|
280
|
+
http_response = result.response
|
281
|
+
status_code = http_response.status
|
282
|
+
response_content = http_response.body
|
283
|
+
unless status_code == 200
|
284
|
+
error_model = JSON.load(response_content)
|
285
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
286
|
+
end
|
287
|
+
|
288
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
289
|
+
# Deserialize Response
|
290
|
+
if status_code == 200
|
291
|
+
begin
|
292
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
293
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentOperationsListResult.mapper()
|
294
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
295
|
+
rescue Exception => e
|
296
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
result
|
301
|
+
end
|
302
|
+
|
303
|
+
promise.execute
|
304
|
+
end
|
305
|
+
|
306
|
+
#
|
307
|
+
# Gets a list of deployments operations.
|
308
|
+
#
|
309
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
310
|
+
# is case insensitive.
|
311
|
+
# @param deployment_name [String] The name of the deployment.
|
312
|
+
# @param top [Integer] Query parameters.
|
313
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
314
|
+
# will be added to the HTTP request.
|
315
|
+
#
|
316
|
+
# @return [DeploymentOperationsListResult] which provide lazy access to pages
|
317
|
+
# of the response.
|
318
|
+
#
|
319
|
+
def list_as_lazy(resource_group_name, deployment_name, top = nil, custom_headers = nil)
|
320
|
+
response = list_async(resource_group_name, deployment_name, top, custom_headers).value!
|
321
|
+
unless response.nil?
|
322
|
+
page = response.body
|
323
|
+
page.next_method = Proc.new do |next_page_link|
|
324
|
+
list_next_async(next_page_link, custom_headers)
|
325
|
+
end
|
326
|
+
page
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
end
|
331
|
+
end
|
@@ -0,0 +1,1000 @@
|
|
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_07_01
|
7
|
+
#
|
8
|
+
# Deployments
|
9
|
+
#
|
10
|
+
class Deployments
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Deployments 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
|
+
# Delete deployment.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
28
|
+
# is case insensitive.
|
29
|
+
# @param deployment_name [String] The name of the deployment to be deleted.
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
def delete(resource_group_name, deployment_name, custom_headers = nil)
|
34
|
+
response = delete_async(resource_group_name, deployment_name, custom_headers).value!
|
35
|
+
nil
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
40
|
+
# is case insensitive.
|
41
|
+
# @param deployment_name [String] The name of the deployment to be deleted.
|
42
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
43
|
+
# will be added to the HTTP request.
|
44
|
+
#
|
45
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
46
|
+
# response.
|
47
|
+
#
|
48
|
+
def delete_async(resource_group_name, deployment_name, custom_headers = nil)
|
49
|
+
# Send request
|
50
|
+
promise = begin_delete_async(resource_group_name, deployment_name, custom_headers)
|
51
|
+
|
52
|
+
promise = promise.then do |response|
|
53
|
+
# Defining deserialization method.
|
54
|
+
deserialize_method = lambda do |parsed_response|
|
55
|
+
end
|
56
|
+
|
57
|
+
# Waiting for response.
|
58
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
59
|
+
end
|
60
|
+
|
61
|
+
promise
|
62
|
+
end
|
63
|
+
|
64
|
+
#
|
65
|
+
# Checks whether deployment exists.
|
66
|
+
#
|
67
|
+
# @param resource_group_name [String] The name of the resource group to check.
|
68
|
+
# The name is case insensitive.
|
69
|
+
# @param deployment_name [String] The name of the deployment.
|
70
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
71
|
+
# will be added to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Boolean] operation results.
|
74
|
+
#
|
75
|
+
def check_existence(resource_group_name, deployment_name, custom_headers = nil)
|
76
|
+
response = check_existence_async(resource_group_name, deployment_name, custom_headers).value!
|
77
|
+
response.body unless response.nil?
|
78
|
+
end
|
79
|
+
|
80
|
+
#
|
81
|
+
# Checks whether deployment exists.
|
82
|
+
#
|
83
|
+
# @param resource_group_name [String] The name of the resource group to check.
|
84
|
+
# The name is case insensitive.
|
85
|
+
# @param deployment_name [String] The name of the deployment.
|
86
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
87
|
+
# will be added to the HTTP request.
|
88
|
+
#
|
89
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
90
|
+
#
|
91
|
+
def check_existence_with_http_info(resource_group_name, deployment_name, custom_headers = nil)
|
92
|
+
check_existence_async(resource_group_name, deployment_name, custom_headers).value!
|
93
|
+
end
|
94
|
+
|
95
|
+
#
|
96
|
+
# Checks whether deployment exists.
|
97
|
+
#
|
98
|
+
# @param resource_group_name [String] The name of the resource group to check.
|
99
|
+
# The name is case insensitive.
|
100
|
+
# @param deployment_name [String] The name of the deployment.
|
101
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
102
|
+
# to the HTTP request.
|
103
|
+
#
|
104
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
105
|
+
#
|
106
|
+
def check_existence_async(resource_group_name, deployment_name, custom_headers = nil)
|
107
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
108
|
+
fail ArgumentError, 'deployment_name is nil' if deployment_name.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}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
|
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: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
125
|
+
query_params: {'api-version' => @client.api_version},
|
126
|
+
headers: request_headers.merge(custom_headers || {}),
|
127
|
+
base_url: request_url
|
128
|
+
}
|
129
|
+
promise = @client.make_request_async(:head, 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 == 204 || status_code == 404
|
136
|
+
error_model = JSON.load(response_content)
|
137
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
138
|
+
end
|
139
|
+
|
140
|
+
result.body = (status_code == 204)
|
141
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
142
|
+
|
143
|
+
result
|
144
|
+
end
|
145
|
+
|
146
|
+
promise.execute
|
147
|
+
end
|
148
|
+
|
149
|
+
#
|
150
|
+
# Create a named template deployment using a template.
|
151
|
+
#
|
152
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
153
|
+
# is case insensitive.
|
154
|
+
# @param deployment_name [String] The name of the deployment.
|
155
|
+
# @param parameters [Deployment] Additional parameters supplied to the
|
156
|
+
# operation.
|
157
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
158
|
+
# will be added to the HTTP request.
|
159
|
+
#
|
160
|
+
# @return [DeploymentExtended] operation results.
|
161
|
+
#
|
162
|
+
def create_or_update(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
163
|
+
response = create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers).value!
|
164
|
+
response.body unless response.nil?
|
165
|
+
end
|
166
|
+
|
167
|
+
#
|
168
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
169
|
+
# is case insensitive.
|
170
|
+
# @param deployment_name [String] The name of the deployment.
|
171
|
+
# @param parameters [Deployment] Additional parameters supplied to the
|
172
|
+
# operation.
|
173
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
174
|
+
# will be added to the HTTP request.
|
175
|
+
#
|
176
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
177
|
+
# response.
|
178
|
+
#
|
179
|
+
def create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
180
|
+
# Send request
|
181
|
+
promise = begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers)
|
182
|
+
|
183
|
+
promise = promise.then do |response|
|
184
|
+
# Defining deserialization method.
|
185
|
+
deserialize_method = lambda do |parsed_response|
|
186
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentExtended.mapper()
|
187
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
188
|
+
end
|
189
|
+
|
190
|
+
# Waiting for response.
|
191
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
192
|
+
end
|
193
|
+
|
194
|
+
promise
|
195
|
+
end
|
196
|
+
|
197
|
+
#
|
198
|
+
# Get a deployment.
|
199
|
+
#
|
200
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
201
|
+
# The name is case insensitive.
|
202
|
+
# @param deployment_name [String] The name of the deployment.
|
203
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
204
|
+
# will be added to the HTTP request.
|
205
|
+
#
|
206
|
+
# @return [DeploymentExtended] operation results.
|
207
|
+
#
|
208
|
+
def get(resource_group_name, deployment_name, custom_headers = nil)
|
209
|
+
response = get_async(resource_group_name, deployment_name, custom_headers).value!
|
210
|
+
response.body unless response.nil?
|
211
|
+
end
|
212
|
+
|
213
|
+
#
|
214
|
+
# Get a deployment.
|
215
|
+
#
|
216
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
217
|
+
# The name is case insensitive.
|
218
|
+
# @param deployment_name [String] The name of the deployment.
|
219
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
220
|
+
# will be added to the HTTP request.
|
221
|
+
#
|
222
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
223
|
+
#
|
224
|
+
def get_with_http_info(resource_group_name, deployment_name, custom_headers = nil)
|
225
|
+
get_async(resource_group_name, deployment_name, custom_headers).value!
|
226
|
+
end
|
227
|
+
|
228
|
+
#
|
229
|
+
# Get a deployment.
|
230
|
+
#
|
231
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
232
|
+
# The name is case insensitive.
|
233
|
+
# @param deployment_name [String] The name of the deployment.
|
234
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
235
|
+
# to the HTTP request.
|
236
|
+
#
|
237
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
238
|
+
#
|
239
|
+
def get_async(resource_group_name, deployment_name, custom_headers = nil)
|
240
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
241
|
+
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
242
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
243
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
244
|
+
|
245
|
+
|
246
|
+
request_headers = {}
|
247
|
+
|
248
|
+
# Set Headers
|
249
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
250
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
251
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
|
252
|
+
|
253
|
+
request_url = @base_url || @client.base_url
|
254
|
+
|
255
|
+
options = {
|
256
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
257
|
+
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
258
|
+
query_params: {'api-version' => @client.api_version},
|
259
|
+
headers: request_headers.merge(custom_headers || {}),
|
260
|
+
base_url: request_url
|
261
|
+
}
|
262
|
+
promise = @client.make_request_async(:get, path_template, options)
|
263
|
+
|
264
|
+
promise = promise.then do |result|
|
265
|
+
http_response = result.response
|
266
|
+
status_code = http_response.status
|
267
|
+
response_content = http_response.body
|
268
|
+
unless status_code == 200
|
269
|
+
error_model = JSON.load(response_content)
|
270
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
271
|
+
end
|
272
|
+
|
273
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
274
|
+
# Deserialize Response
|
275
|
+
if status_code == 200
|
276
|
+
begin
|
277
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
278
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentExtended.mapper()
|
279
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
280
|
+
rescue Exception => e
|
281
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
result
|
286
|
+
end
|
287
|
+
|
288
|
+
promise.execute
|
289
|
+
end
|
290
|
+
|
291
|
+
#
|
292
|
+
# Cancel a currently running template deployment.
|
293
|
+
#
|
294
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
295
|
+
# is case insensitive.
|
296
|
+
# @param deployment_name [String] The name of the deployment.
|
297
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
298
|
+
# will be added to the HTTP request.
|
299
|
+
#
|
300
|
+
#
|
301
|
+
def cancel(resource_group_name, deployment_name, custom_headers = nil)
|
302
|
+
response = cancel_async(resource_group_name, deployment_name, custom_headers).value!
|
303
|
+
nil
|
304
|
+
end
|
305
|
+
|
306
|
+
#
|
307
|
+
# Cancel a currently running template deployment.
|
308
|
+
#
|
309
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
310
|
+
# is case insensitive.
|
311
|
+
# @param deployment_name [String] The name of the deployment.
|
312
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
313
|
+
# will be added to the HTTP request.
|
314
|
+
#
|
315
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
316
|
+
#
|
317
|
+
def cancel_with_http_info(resource_group_name, deployment_name, custom_headers = nil)
|
318
|
+
cancel_async(resource_group_name, deployment_name, custom_headers).value!
|
319
|
+
end
|
320
|
+
|
321
|
+
#
|
322
|
+
# Cancel a currently running template deployment.
|
323
|
+
#
|
324
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
325
|
+
# is case insensitive.
|
326
|
+
# @param deployment_name [String] The name of the deployment.
|
327
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
328
|
+
# to the HTTP request.
|
329
|
+
#
|
330
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
331
|
+
#
|
332
|
+
def cancel_async(resource_group_name, deployment_name, custom_headers = nil)
|
333
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
334
|
+
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
335
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
336
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
337
|
+
|
338
|
+
|
339
|
+
request_headers = {}
|
340
|
+
|
341
|
+
# Set Headers
|
342
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
343
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
344
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel'
|
345
|
+
|
346
|
+
request_url = @base_url || @client.base_url
|
347
|
+
|
348
|
+
options = {
|
349
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
350
|
+
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
351
|
+
query_params: {'api-version' => @client.api_version},
|
352
|
+
headers: request_headers.merge(custom_headers || {}),
|
353
|
+
base_url: request_url
|
354
|
+
}
|
355
|
+
promise = @client.make_request_async(:post, path_template, options)
|
356
|
+
|
357
|
+
promise = promise.then do |result|
|
358
|
+
http_response = result.response
|
359
|
+
status_code = http_response.status
|
360
|
+
response_content = http_response.body
|
361
|
+
unless status_code == 204
|
362
|
+
error_model = JSON.load(response_content)
|
363
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
364
|
+
end
|
365
|
+
|
366
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
367
|
+
|
368
|
+
result
|
369
|
+
end
|
370
|
+
|
371
|
+
promise.execute
|
372
|
+
end
|
373
|
+
|
374
|
+
#
|
375
|
+
# Validate a deployment template.
|
376
|
+
#
|
377
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
378
|
+
# is case insensitive.
|
379
|
+
# @param deployment_name [String] The name of the deployment.
|
380
|
+
# @param parameters [Deployment] Deployment to validate.
|
381
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
382
|
+
# will be added to the HTTP request.
|
383
|
+
#
|
384
|
+
# @return [DeploymentValidateResult] operation results.
|
385
|
+
#
|
386
|
+
def validate(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
387
|
+
response = validate_async(resource_group_name, deployment_name, parameters, custom_headers).value!
|
388
|
+
response.body unless response.nil?
|
389
|
+
end
|
390
|
+
|
391
|
+
#
|
392
|
+
# Validate a deployment template.
|
393
|
+
#
|
394
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
395
|
+
# is case insensitive.
|
396
|
+
# @param deployment_name [String] The name of the deployment.
|
397
|
+
# @param parameters [Deployment] Deployment to validate.
|
398
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
399
|
+
# will be added to the HTTP request.
|
400
|
+
#
|
401
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
402
|
+
#
|
403
|
+
def validate_with_http_info(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
404
|
+
validate_async(resource_group_name, deployment_name, parameters, custom_headers).value!
|
405
|
+
end
|
406
|
+
|
407
|
+
#
|
408
|
+
# Validate a deployment template.
|
409
|
+
#
|
410
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
411
|
+
# is case insensitive.
|
412
|
+
# @param deployment_name [String] The name of the deployment.
|
413
|
+
# @param parameters [Deployment] Deployment to validate.
|
414
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
415
|
+
# to the HTTP request.
|
416
|
+
#
|
417
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
418
|
+
#
|
419
|
+
def validate_async(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
420
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
421
|
+
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
422
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
423
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
424
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
425
|
+
|
426
|
+
|
427
|
+
request_headers = {}
|
428
|
+
|
429
|
+
# Set Headers
|
430
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
431
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
432
|
+
|
433
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
434
|
+
|
435
|
+
# Serialize Request
|
436
|
+
request_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::Deployment.mapper()
|
437
|
+
request_content = @client.serialize(request_mapper, parameters)
|
438
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
439
|
+
|
440
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate'
|
441
|
+
|
442
|
+
request_url = @base_url || @client.base_url
|
443
|
+
|
444
|
+
options = {
|
445
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
446
|
+
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
447
|
+
query_params: {'api-version' => @client.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(:post, 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 == 200 || status_code == 400
|
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 == 200
|
466
|
+
begin
|
467
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
468
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentValidateResult.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 == 400
|
476
|
+
begin
|
477
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
478
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentValidateResult.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
|
+
# Exports a deployment template.
|
493
|
+
#
|
494
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
495
|
+
# is case insensitive.
|
496
|
+
# @param deployment_name [String] The name of the deployment.
|
497
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
498
|
+
# will be added to the HTTP request.
|
499
|
+
#
|
500
|
+
# @return [DeploymentExportResult] operation results.
|
501
|
+
#
|
502
|
+
def export_template(resource_group_name, deployment_name, custom_headers = nil)
|
503
|
+
response = export_template_async(resource_group_name, deployment_name, custom_headers).value!
|
504
|
+
response.body unless response.nil?
|
505
|
+
end
|
506
|
+
|
507
|
+
#
|
508
|
+
# Exports a deployment template.
|
509
|
+
#
|
510
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
511
|
+
# is case insensitive.
|
512
|
+
# @param deployment_name [String] The name of the deployment.
|
513
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
514
|
+
# will be added to the HTTP request.
|
515
|
+
#
|
516
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
517
|
+
#
|
518
|
+
def export_template_with_http_info(resource_group_name, deployment_name, custom_headers = nil)
|
519
|
+
export_template_async(resource_group_name, deployment_name, custom_headers).value!
|
520
|
+
end
|
521
|
+
|
522
|
+
#
|
523
|
+
# Exports a deployment template.
|
524
|
+
#
|
525
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
526
|
+
# is case insensitive.
|
527
|
+
# @param deployment_name [String] The name of the deployment.
|
528
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
529
|
+
# to the HTTP request.
|
530
|
+
#
|
531
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
532
|
+
#
|
533
|
+
def export_template_async(resource_group_name, deployment_name, custom_headers = nil)
|
534
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
535
|
+
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
536
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
537
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
538
|
+
|
539
|
+
|
540
|
+
request_headers = {}
|
541
|
+
|
542
|
+
# Set Headers
|
543
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
544
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
545
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate'
|
546
|
+
|
547
|
+
request_url = @base_url || @client.base_url
|
548
|
+
|
549
|
+
options = {
|
550
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
551
|
+
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
552
|
+
query_params: {'api-version' => @client.api_version},
|
553
|
+
headers: request_headers.merge(custom_headers || {}),
|
554
|
+
base_url: request_url
|
555
|
+
}
|
556
|
+
promise = @client.make_request_async(:post, path_template, options)
|
557
|
+
|
558
|
+
promise = promise.then do |result|
|
559
|
+
http_response = result.response
|
560
|
+
status_code = http_response.status
|
561
|
+
response_content = http_response.body
|
562
|
+
unless status_code == 200
|
563
|
+
error_model = JSON.load(response_content)
|
564
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
565
|
+
end
|
566
|
+
|
567
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
568
|
+
# Deserialize Response
|
569
|
+
if status_code == 200
|
570
|
+
begin
|
571
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
572
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentExportResult.mapper()
|
573
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
574
|
+
rescue Exception => e
|
575
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
576
|
+
end
|
577
|
+
end
|
578
|
+
|
579
|
+
result
|
580
|
+
end
|
581
|
+
|
582
|
+
promise.execute
|
583
|
+
end
|
584
|
+
|
585
|
+
#
|
586
|
+
# Get a list of deployments.
|
587
|
+
#
|
588
|
+
# @param resource_group_name [String] The name of the resource group to filter
|
589
|
+
# by. The name is case insensitive.
|
590
|
+
# @param filter [String] The filter to apply on the operation.
|
591
|
+
# @param top [Integer] Query parameters. If null is passed returns all
|
592
|
+
# deployments.
|
593
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
594
|
+
# will be added to the HTTP request.
|
595
|
+
#
|
596
|
+
# @return [Array<DeploymentExtended>] operation results.
|
597
|
+
#
|
598
|
+
def list(resource_group_name, filter = nil, top = nil, custom_headers = nil)
|
599
|
+
first_page = list_as_lazy(resource_group_name, filter, top, custom_headers)
|
600
|
+
first_page.get_all_items
|
601
|
+
end
|
602
|
+
|
603
|
+
#
|
604
|
+
# Get a list of deployments.
|
605
|
+
#
|
606
|
+
# @param resource_group_name [String] The name of the resource group to filter
|
607
|
+
# by. The name is case insensitive.
|
608
|
+
# @param filter [String] The filter to apply on the operation.
|
609
|
+
# @param top [Integer] Query parameters. If null is passed returns all
|
610
|
+
# deployments.
|
611
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
612
|
+
# will be added to the HTTP request.
|
613
|
+
#
|
614
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
615
|
+
#
|
616
|
+
def list_with_http_info(resource_group_name, filter = nil, top = nil, custom_headers = nil)
|
617
|
+
list_async(resource_group_name, filter, top, custom_headers).value!
|
618
|
+
end
|
619
|
+
|
620
|
+
#
|
621
|
+
# Get a list of deployments.
|
622
|
+
#
|
623
|
+
# @param resource_group_name [String] The name of the resource group to filter
|
624
|
+
# by. The name is case insensitive.
|
625
|
+
# @param filter [String] The filter to apply on the operation.
|
626
|
+
# @param top [Integer] Query parameters. If null is passed returns all
|
627
|
+
# deployments.
|
628
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
629
|
+
# to the HTTP request.
|
630
|
+
#
|
631
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
632
|
+
#
|
633
|
+
def list_async(resource_group_name, filter = nil, top = nil, custom_headers = nil)
|
634
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
635
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
636
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
637
|
+
|
638
|
+
|
639
|
+
request_headers = {}
|
640
|
+
|
641
|
+
# Set Headers
|
642
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
643
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
644
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/'
|
645
|
+
|
646
|
+
request_url = @base_url || @client.base_url
|
647
|
+
|
648
|
+
options = {
|
649
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
650
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
651
|
+
query_params: {'$filter' => filter,'$top' => top,'api-version' => @client.api_version},
|
652
|
+
headers: request_headers.merge(custom_headers || {}),
|
653
|
+
base_url: request_url
|
654
|
+
}
|
655
|
+
promise = @client.make_request_async(:get, path_template, options)
|
656
|
+
|
657
|
+
promise = promise.then do |result|
|
658
|
+
http_response = result.response
|
659
|
+
status_code = http_response.status
|
660
|
+
response_content = http_response.body
|
661
|
+
unless status_code == 200
|
662
|
+
error_model = JSON.load(response_content)
|
663
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
664
|
+
end
|
665
|
+
|
666
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
667
|
+
# Deserialize Response
|
668
|
+
if status_code == 200
|
669
|
+
begin
|
670
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
671
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentListResult.mapper()
|
672
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
673
|
+
rescue Exception => e
|
674
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
675
|
+
end
|
676
|
+
end
|
677
|
+
|
678
|
+
result
|
679
|
+
end
|
680
|
+
|
681
|
+
promise.execute
|
682
|
+
end
|
683
|
+
|
684
|
+
#
|
685
|
+
# Delete deployment.
|
686
|
+
#
|
687
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
688
|
+
# is case insensitive.
|
689
|
+
# @param deployment_name [String] The name of the deployment to be deleted.
|
690
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
691
|
+
# will be added to the HTTP request.
|
692
|
+
#
|
693
|
+
#
|
694
|
+
def begin_delete(resource_group_name, deployment_name, custom_headers = nil)
|
695
|
+
response = begin_delete_async(resource_group_name, deployment_name, custom_headers).value!
|
696
|
+
nil
|
697
|
+
end
|
698
|
+
|
699
|
+
#
|
700
|
+
# Delete deployment.
|
701
|
+
#
|
702
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
703
|
+
# is case insensitive.
|
704
|
+
# @param deployment_name [String] The name of the deployment to be deleted.
|
705
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
706
|
+
# will be added to the HTTP request.
|
707
|
+
#
|
708
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
709
|
+
#
|
710
|
+
def begin_delete_with_http_info(resource_group_name, deployment_name, custom_headers = nil)
|
711
|
+
begin_delete_async(resource_group_name, deployment_name, custom_headers).value!
|
712
|
+
end
|
713
|
+
|
714
|
+
#
|
715
|
+
# Delete deployment.
|
716
|
+
#
|
717
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
718
|
+
# is case insensitive.
|
719
|
+
# @param deployment_name [String] The name of the deployment to be deleted.
|
720
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
721
|
+
# to the HTTP request.
|
722
|
+
#
|
723
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
724
|
+
#
|
725
|
+
def begin_delete_async(resource_group_name, deployment_name, custom_headers = nil)
|
726
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
727
|
+
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
728
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
729
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
730
|
+
|
731
|
+
|
732
|
+
request_headers = {}
|
733
|
+
|
734
|
+
# Set Headers
|
735
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
736
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
737
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
|
738
|
+
|
739
|
+
request_url = @base_url || @client.base_url
|
740
|
+
|
741
|
+
options = {
|
742
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
743
|
+
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
744
|
+
query_params: {'api-version' => @client.api_version},
|
745
|
+
headers: request_headers.merge(custom_headers || {}),
|
746
|
+
base_url: request_url
|
747
|
+
}
|
748
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
749
|
+
|
750
|
+
promise = promise.then do |result|
|
751
|
+
http_response = result.response
|
752
|
+
status_code = http_response.status
|
753
|
+
response_content = http_response.body
|
754
|
+
unless status_code == 202 || status_code == 204
|
755
|
+
error_model = JSON.load(response_content)
|
756
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
757
|
+
end
|
758
|
+
|
759
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
760
|
+
|
761
|
+
result
|
762
|
+
end
|
763
|
+
|
764
|
+
promise.execute
|
765
|
+
end
|
766
|
+
|
767
|
+
#
|
768
|
+
# Create a named template deployment using a template.
|
769
|
+
#
|
770
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
771
|
+
# is case insensitive.
|
772
|
+
# @param deployment_name [String] The name of the deployment.
|
773
|
+
# @param parameters [Deployment] Additional parameters supplied to the
|
774
|
+
# operation.
|
775
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
776
|
+
# will be added to the HTTP request.
|
777
|
+
#
|
778
|
+
# @return [DeploymentExtended] operation results.
|
779
|
+
#
|
780
|
+
def begin_create_or_update(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
781
|
+
response = begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers).value!
|
782
|
+
response.body unless response.nil?
|
783
|
+
end
|
784
|
+
|
785
|
+
#
|
786
|
+
# Create a named template deployment using a template.
|
787
|
+
#
|
788
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
789
|
+
# is case insensitive.
|
790
|
+
# @param deployment_name [String] The name of the deployment.
|
791
|
+
# @param parameters [Deployment] Additional parameters supplied to the
|
792
|
+
# operation.
|
793
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
794
|
+
# will be added to the HTTP request.
|
795
|
+
#
|
796
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
797
|
+
#
|
798
|
+
def begin_create_or_update_with_http_info(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
799
|
+
begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers).value!
|
800
|
+
end
|
801
|
+
|
802
|
+
#
|
803
|
+
# Create a named template deployment using a template.
|
804
|
+
#
|
805
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
806
|
+
# is case insensitive.
|
807
|
+
# @param deployment_name [String] The name of the deployment.
|
808
|
+
# @param parameters [Deployment] Additional parameters supplied to the
|
809
|
+
# operation.
|
810
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
811
|
+
# to the HTTP request.
|
812
|
+
#
|
813
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
814
|
+
#
|
815
|
+
def begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
816
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
817
|
+
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
818
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
819
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
820
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
821
|
+
|
822
|
+
|
823
|
+
request_headers = {}
|
824
|
+
|
825
|
+
# Set Headers
|
826
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
827
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
828
|
+
|
829
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
830
|
+
|
831
|
+
# Serialize Request
|
832
|
+
request_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::Deployment.mapper()
|
833
|
+
request_content = @client.serialize(request_mapper, parameters)
|
834
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
835
|
+
|
836
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
|
837
|
+
|
838
|
+
request_url = @base_url || @client.base_url
|
839
|
+
|
840
|
+
options = {
|
841
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
842
|
+
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
843
|
+
query_params: {'api-version' => @client.api_version},
|
844
|
+
body: request_content,
|
845
|
+
headers: request_headers.merge(custom_headers || {}),
|
846
|
+
base_url: request_url
|
847
|
+
}
|
848
|
+
promise = @client.make_request_async(:put, path_template, options)
|
849
|
+
|
850
|
+
promise = promise.then do |result|
|
851
|
+
http_response = result.response
|
852
|
+
status_code = http_response.status
|
853
|
+
response_content = http_response.body
|
854
|
+
unless status_code == 200 || status_code == 201
|
855
|
+
error_model = JSON.load(response_content)
|
856
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
857
|
+
end
|
858
|
+
|
859
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
860
|
+
# Deserialize Response
|
861
|
+
if status_code == 200
|
862
|
+
begin
|
863
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
864
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentExtended.mapper()
|
865
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
866
|
+
rescue Exception => e
|
867
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
868
|
+
end
|
869
|
+
end
|
870
|
+
# Deserialize Response
|
871
|
+
if status_code == 201
|
872
|
+
begin
|
873
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
874
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentExtended.mapper()
|
875
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
876
|
+
rescue Exception => e
|
877
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
878
|
+
end
|
879
|
+
end
|
880
|
+
|
881
|
+
result
|
882
|
+
end
|
883
|
+
|
884
|
+
promise.execute
|
885
|
+
end
|
886
|
+
|
887
|
+
#
|
888
|
+
# Get a list of deployments.
|
889
|
+
#
|
890
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
891
|
+
# to List operation.
|
892
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
893
|
+
# will be added to the HTTP request.
|
894
|
+
#
|
895
|
+
# @return [DeploymentListResult] operation results.
|
896
|
+
#
|
897
|
+
def list_next(next_page_link, custom_headers = nil)
|
898
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
899
|
+
response.body unless response.nil?
|
900
|
+
end
|
901
|
+
|
902
|
+
#
|
903
|
+
# Get a list of deployments.
|
904
|
+
#
|
905
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
906
|
+
# to List operation.
|
907
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
908
|
+
# will be added to the HTTP request.
|
909
|
+
#
|
910
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
911
|
+
#
|
912
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
913
|
+
list_next_async(next_page_link, custom_headers).value!
|
914
|
+
end
|
915
|
+
|
916
|
+
#
|
917
|
+
# Get a list of deployments.
|
918
|
+
#
|
919
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
920
|
+
# to List operation.
|
921
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
922
|
+
# to the HTTP request.
|
923
|
+
#
|
924
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
925
|
+
#
|
926
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
927
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
928
|
+
|
929
|
+
|
930
|
+
request_headers = {}
|
931
|
+
|
932
|
+
# Set Headers
|
933
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
934
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
935
|
+
path_template = '{nextLink}'
|
936
|
+
|
937
|
+
request_url = @base_url || @client.base_url
|
938
|
+
|
939
|
+
options = {
|
940
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
941
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
942
|
+
headers: request_headers.merge(custom_headers || {}),
|
943
|
+
base_url: request_url
|
944
|
+
}
|
945
|
+
promise = @client.make_request_async(:get, path_template, options)
|
946
|
+
|
947
|
+
promise = promise.then do |result|
|
948
|
+
http_response = result.response
|
949
|
+
status_code = http_response.status
|
950
|
+
response_content = http_response.body
|
951
|
+
unless status_code == 200
|
952
|
+
error_model = JSON.load(response_content)
|
953
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
954
|
+
end
|
955
|
+
|
956
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
957
|
+
# Deserialize Response
|
958
|
+
if status_code == 200
|
959
|
+
begin
|
960
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
961
|
+
result_mapper = Azure::Resources::Mgmt::V2016_07_01::Models::DeploymentListResult.mapper()
|
962
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
963
|
+
rescue Exception => e
|
964
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
965
|
+
end
|
966
|
+
end
|
967
|
+
|
968
|
+
result
|
969
|
+
end
|
970
|
+
|
971
|
+
promise.execute
|
972
|
+
end
|
973
|
+
|
974
|
+
#
|
975
|
+
# Get a list of deployments.
|
976
|
+
#
|
977
|
+
# @param resource_group_name [String] The name of the resource group to filter
|
978
|
+
# by. The name is case insensitive.
|
979
|
+
# @param filter [String] The filter to apply on the operation.
|
980
|
+
# @param top [Integer] Query parameters. If null is passed returns all
|
981
|
+
# deployments.
|
982
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
983
|
+
# will be added to the HTTP request.
|
984
|
+
#
|
985
|
+
# @return [DeploymentListResult] which provide lazy access to pages of the
|
986
|
+
# response.
|
987
|
+
#
|
988
|
+
def list_as_lazy(resource_group_name, filter = nil, top = nil, custom_headers = nil)
|
989
|
+
response = list_async(resource_group_name, filter, top, custom_headers).value!
|
990
|
+
unless response.nil?
|
991
|
+
page = response.body
|
992
|
+
page.next_method = Proc.new do |next_page_link|
|
993
|
+
list_next_async(next_page_link, custom_headers)
|
994
|
+
end
|
995
|
+
page
|
996
|
+
end
|
997
|
+
end
|
998
|
+
|
999
|
+
end
|
1000
|
+
end
|