azure_mgmt_deployment_manager 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager.rb +70 -0
  4. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/artifact_sources.rb +339 -0
  5. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/azure_deployment_manager.rb +157 -0
  6. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/artifact_source.rb +130 -0
  7. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/artifact_source_properties_model.rb +79 -0
  8. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/authentication.rb +46 -0
  9. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/azure_entity_resource.rb +75 -0
  10. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/cloud_error_body.rb +90 -0
  11. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/deployment_mode.rb +16 -0
  12. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/identity.rb +65 -0
  13. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/message.rb +59 -0
  14. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/operation.rb +80 -0
  15. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/operation_detail.rb +80 -0
  16. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/pre_post_step.rb +46 -0
  17. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/proxy_resource.rb +63 -0
  18. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/resource.rb +83 -0
  19. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/resource_operation.rb +111 -0
  20. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/rollout.rb +214 -0
  21. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_operation_info.rb +102 -0
  22. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_properties_model.rb +95 -0
  23. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_request.rb +154 -0
  24. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_step.rb +127 -0
  25. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/sas_authentication.rb +64 -0
  26. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service.rb +83 -0
  27. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_properties.rb +59 -0
  28. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_resource.rb +110 -0
  29. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_topology_properties.rb +47 -0
  30. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_topology_resource.rb +98 -0
  31. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit.rb +92 -0
  32. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit_artifacts.rb +83 -0
  33. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit_properties.rb +73 -0
  34. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit_resource.rb +124 -0
  35. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/step.rb +121 -0
  36. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/step_operation_info.rb +109 -0
  37. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/step_properties.rb +46 -0
  38. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/step_resource.rb +100 -0
  39. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/tracked_resource.rb +92 -0
  40. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/wait_step_attributes.rb +47 -0
  41. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/wait_step_properties.rb +62 -0
  42. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/module_definition.rb +9 -0
  43. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/operations.rb +130 -0
  44. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/rollouts.rb +626 -0
  45. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/service_topologies.rb +340 -0
  46. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/service_units.rb +419 -0
  47. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/services.rb +346 -0
  48. data/lib/2018-09-01-preview/generated/azure_mgmt_deployment_manager/steps.rb +333 -0
  49. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager.rb +84 -0
  50. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/artifact_sources.rb +451 -0
  51. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/azure_deployment_manager.rb +157 -0
  52. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/api_key_authentication.rb +86 -0
  53. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/artifact_source.rb +130 -0
  54. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/artifact_source_properties_model.rb +79 -0
  55. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/authentication.rb +46 -0
  56. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/azure_entity_resource.rb +75 -0
  57. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/cloud_error_body.rb +90 -0
  58. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/deployment_mode.rb +16 -0
  59. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/health_check_step_attributes.rb +86 -0
  60. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/health_check_step_properties.rb +64 -0
  61. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/identity.rb +65 -0
  62. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/message.rb +59 -0
  63. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/operation.rb +80 -0
  64. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/operation_detail.rb +80 -0
  65. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/operations_list.rb +47 -0
  66. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/pre_post_step.rb +46 -0
  67. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/proxy_resource.rb +63 -0
  68. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/resource.rb +83 -0
  69. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/resource_operation.rb +111 -0
  70. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rest_auth_location.rb +16 -0
  71. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rest_health_check.rb +72 -0
  72. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rest_health_check_step_attributes.rb +95 -0
  73. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rest_match_quantifier.rb +16 -0
  74. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rest_request.rb +74 -0
  75. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rest_request_authentication.rb +48 -0
  76. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rest_request_method.rb +16 -0
  77. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rest_response.rb +70 -0
  78. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rest_response_regex.rb +68 -0
  79. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rollout.rb +214 -0
  80. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_identity_authentication.rb +51 -0
  81. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_operation_info.rb +102 -0
  82. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_properties_model.rb +95 -0
  83. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_request.rb +154 -0
  84. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_step.rb +127 -0
  85. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/sas_authentication.rb +64 -0
  86. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/service.rb +83 -0
  87. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/service_properties.rb +59 -0
  88. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/service_resource.rb +110 -0
  89. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/service_topology_properties.rb +47 -0
  90. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/service_topology_resource.rb +98 -0
  91. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit.rb +92 -0
  92. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit_artifacts.rb +83 -0
  93. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit_properties.rb +73 -0
  94. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit_resource.rb +124 -0
  95. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/step_group.rb +121 -0
  96. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/step_operation_info.rb +109 -0
  97. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/step_properties.rb +47 -0
  98. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/step_resource.rb +100 -0
  99. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/tracked_resource.rb +92 -0
  100. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/wait_step_attributes.rb +47 -0
  101. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/models/wait_step_properties.rb +62 -0
  102. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/module_definition.rb +9 -0
  103. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/operations.rb +112 -0
  104. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/rollouts.rb +738 -0
  105. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/service_topologies.rb +452 -0
  106. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/service_units.rb +539 -0
  107. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/services.rb +462 -0
  108. data/lib/2019-11-01-preview/generated/azure_mgmt_deployment_manager/steps.rb +445 -0
  109. data/lib/azure_mgmt_deployment_manager.rb +7 -0
  110. data/lib/module_definition.rb +7 -0
  111. data/lib/profiles/latest/deploymentmanager_latest_profile_client.rb +40 -0
  112. data/lib/profiles/latest/deploymentmanager_module_definition.rb +8 -0
  113. data/lib/profiles/latest/modules/deploymentmanager_profile_module.rb +273 -0
  114. data/lib/version.rb +7 -0
  115. metadata +230 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ad097d9d75f3ede3d3e5974e0e42bf849d72f172
4
+ data.tar.gz: e424084d6ec56da758e0ba66c77cfe0ca4d21182
5
+ SHA512:
6
+ metadata.gz: 125bcfb383023200a4a3bebe19bd2f2de5295aeec414f585eae388380c2a94cf121711e1fbeaf9d28d15af3d161fbaebed7cf2f26af8410489c292fc1444b98a
7
+ data.tar.gz: 1500bb76dfd16c31c3035eba1553df230fdcf5214225b0f6eb4051d54860810f0da625c1e24117c517d3ec0f8a2e872d19a21db7f5a6998ad2c8d98209943950
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,70 @@
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 '2018-09-01-preview/generated/azure_mgmt_deployment_manager/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::DeploymentManager::Mgmt::V2018_09_01_preview
23
+ autoload :ServiceTopologies, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/service_topologies.rb'
24
+ autoload :Services, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/services.rb'
25
+ autoload :ServiceUnits, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/service_units.rb'
26
+ autoload :Steps, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/steps.rb'
27
+ autoload :Rollouts, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/rollouts.rb'
28
+ autoload :ArtifactSources, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/artifact_sources.rb'
29
+ autoload :Operations, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/operations.rb'
30
+ autoload :AzureDeploymentManager, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/azure_deployment_manager.rb'
31
+
32
+ module Models
33
+ autoload :RolloutPropertiesModel, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_properties_model.rb'
34
+ autoload :Message, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/message.rb'
35
+ autoload :RolloutStep, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_step.rb'
36
+ autoload :Step, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/step.rb'
37
+ autoload :StepProperties, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/step_properties.rb'
38
+ autoload :WaitStepAttributes, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/wait_step_attributes.rb'
39
+ autoload :Authentication, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/authentication.rb'
40
+ autoload :ServiceUnitArtifacts, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit_artifacts.rb'
41
+ autoload :ServiceUnitProperties, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit_properties.rb'
42
+ autoload :Operation, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/operation.rb'
43
+ autoload :RolloutOperationInfo, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_operation_info.rb'
44
+ autoload :OperationDetail, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/operation_detail.rb'
45
+ autoload :ResourceOperation, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/resource_operation.rb'
46
+ autoload :Identity, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/identity.rb'
47
+ autoload :ArtifactSourcePropertiesModel, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/artifact_source_properties_model.rb'
48
+ autoload :StepOperationInfo, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/step_operation_info.rb'
49
+ autoload :ServiceTopologyProperties, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_topology_properties.rb'
50
+ autoload :CloudErrorBody, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/cloud_error_body.rb'
51
+ autoload :Resource, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/resource.rb'
52
+ autoload :PrePostStep, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/pre_post_step.rb'
53
+ autoload :ServiceProperties, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_properties.rb'
54
+ autoload :RolloutRequest, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/rollout_request.rb'
55
+ autoload :ArtifactSource, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/artifact_source.rb'
56
+ autoload :SasAuthentication, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/sas_authentication.rb'
57
+ autoload :ServiceUnit, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit.rb'
58
+ autoload :Service, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service.rb'
59
+ autoload :TrackedResource, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/tracked_resource.rb'
60
+ autoload :Rollout, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/rollout.rb'
61
+ autoload :ServiceTopologyResource, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_topology_resource.rb'
62
+ autoload :ServiceResource, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_resource.rb'
63
+ autoload :ServiceUnitResource, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/service_unit_resource.rb'
64
+ autoload :StepResource, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/step_resource.rb'
65
+ autoload :WaitStepProperties, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/wait_step_properties.rb'
66
+ autoload :ProxyResource, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/proxy_resource.rb'
67
+ autoload :AzureEntityResource, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/azure_entity_resource.rb'
68
+ autoload :DeploymentMode, '2018-09-01-preview/generated/azure_mgmt_deployment_manager/models/deployment_mode.rb'
69
+ end
70
+ end
@@ -0,0 +1,339 @@
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::DeploymentManager::Mgmt::V2018_09_01_preview
7
+ #
8
+ # REST APIs for orchestrating deployments using the Azure Deployment Manager
9
+ # (ADM). See
10
+ # https://docs.microsoft.com/en-us/azure/azure-resource-manager/deployment-manager-overview
11
+ # for more information.
12
+ #
13
+ class ArtifactSources
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the ArtifactSources class.
18
+ # @param client service class for accessing basic functionality.
19
+ #
20
+ def initialize(client)
21
+ @client = client
22
+ end
23
+
24
+ # @return [AzureDeploymentManager] reference to the AzureDeploymentManager
25
+ attr_reader :client
26
+
27
+ #
28
+ # Creates or updates an artifact source.
29
+ #
30
+ # Synchronously creates a new artifact source or updates an existing artifact
31
+ # source.
32
+ #
33
+ # @param resource_group_name [String] The name of the resource group. The name
34
+ # is case insensitive.
35
+ # @param artifact_source_name [String] The name of the artifact source.
36
+ # @param artifact_source_info [ArtifactSource] Source object that defines the
37
+ # resource.
38
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
39
+ # will be added to the HTTP request.
40
+ #
41
+ # @return [ArtifactSource] operation results.
42
+ #
43
+ def create_or_update(resource_group_name, artifact_source_name, artifact_source_info:nil, custom_headers:nil)
44
+ response = create_or_update_async(resource_group_name, artifact_source_name, artifact_source_info:artifact_source_info, custom_headers:custom_headers).value!
45
+ response.body unless response.nil?
46
+ end
47
+
48
+ #
49
+ # Creates or updates an artifact source.
50
+ #
51
+ # Synchronously creates a new artifact source or updates an existing artifact
52
+ # source.
53
+ #
54
+ # @param resource_group_name [String] The name of the resource group. The name
55
+ # is case insensitive.
56
+ # @param artifact_source_name [String] The name of the artifact source.
57
+ # @param artifact_source_info [ArtifactSource] Source object that defines the
58
+ # resource.
59
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
60
+ # will be added to the HTTP request.
61
+ #
62
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
63
+ #
64
+ def create_or_update_with_http_info(resource_group_name, artifact_source_name, artifact_source_info:nil, custom_headers:nil)
65
+ create_or_update_async(resource_group_name, artifact_source_name, artifact_source_info:artifact_source_info, custom_headers:custom_headers).value!
66
+ end
67
+
68
+ #
69
+ # Creates or updates an artifact source.
70
+ #
71
+ # Synchronously creates a new artifact source or updates an existing artifact
72
+ # source.
73
+ #
74
+ # @param resource_group_name [String] The name of the resource group. The name
75
+ # is case insensitive.
76
+ # @param artifact_source_name [String] The name of the artifact source.
77
+ # @param artifact_source_info [ArtifactSource] Source object that defines the
78
+ # resource.
79
+ # @param [Hash{String => String}] A hash of custom headers that will be added
80
+ # to the HTTP request.
81
+ #
82
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
83
+ #
84
+ def create_or_update_async(resource_group_name, artifact_source_name, artifact_source_info:nil, custom_headers:nil)
85
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
86
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
87
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
88
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
89
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
90
+ fail ArgumentError, 'artifact_source_name is nil' if artifact_source_name.nil?
91
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
92
+
93
+
94
+ request_headers = {}
95
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
96
+
97
+ # Set Headers
98
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
99
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
100
+
101
+ # Serialize Request
102
+ request_mapper = Azure::DeploymentManager::Mgmt::V2018_09_01_preview::Models::ArtifactSource.mapper()
103
+ request_content = @client.serialize(request_mapper, artifact_source_info)
104
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
105
+
106
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}'
107
+
108
+ request_url = @base_url || @client.base_url
109
+
110
+ options = {
111
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
112
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'artifactSourceName' => artifact_source_name},
113
+ query_params: {'api-version' => @client.api_version},
114
+ body: request_content,
115
+ headers: request_headers.merge(custom_headers || {}),
116
+ base_url: request_url
117
+ }
118
+ promise = @client.make_request_async(:put, path_template, options)
119
+
120
+ promise = promise.then do |result|
121
+ http_response = result.response
122
+ status_code = http_response.status
123
+ response_content = http_response.body
124
+ unless status_code == 201
125
+ error_model = JSON.load(response_content)
126
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
127
+ end
128
+
129
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
130
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
131
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
132
+ # Deserialize Response
133
+ if status_code == 201
134
+ begin
135
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
136
+ result_mapper = Azure::DeploymentManager::Mgmt::V2018_09_01_preview::Models::ArtifactSource.mapper()
137
+ result.body = @client.deserialize(result_mapper, parsed_response)
138
+ rescue Exception => e
139
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
140
+ end
141
+ end
142
+
143
+ result
144
+ end
145
+
146
+ promise.execute
147
+ end
148
+
149
+ #
150
+ # Gets an artifact source.
151
+ #
152
+ # @param resource_group_name [String] The name of the resource group. The name
153
+ # is case insensitive.
154
+ # @param artifact_source_name [String] The name of the artifact source.
155
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
156
+ # will be added to the HTTP request.
157
+ #
158
+ # @return [ArtifactSource] operation results.
159
+ #
160
+ def get(resource_group_name, artifact_source_name, custom_headers:nil)
161
+ response = get_async(resource_group_name, artifact_source_name, custom_headers:custom_headers).value!
162
+ response.body unless response.nil?
163
+ end
164
+
165
+ #
166
+ # Gets an artifact source.
167
+ #
168
+ # @param resource_group_name [String] The name of the resource group. The name
169
+ # is case insensitive.
170
+ # @param artifact_source_name [String] The name of the artifact source.
171
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
172
+ # will be added to the HTTP request.
173
+ #
174
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
175
+ #
176
+ def get_with_http_info(resource_group_name, artifact_source_name, custom_headers:nil)
177
+ get_async(resource_group_name, artifact_source_name, custom_headers:custom_headers).value!
178
+ end
179
+
180
+ #
181
+ # Gets an artifact source.
182
+ #
183
+ # @param resource_group_name [String] The name of the resource group. The name
184
+ # is case insensitive.
185
+ # @param artifact_source_name [String] The name of the artifact source.
186
+ # @param [Hash{String => String}] A hash of custom headers that will be added
187
+ # to the HTTP request.
188
+ #
189
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
190
+ #
191
+ def get_async(resource_group_name, artifact_source_name, custom_headers:nil)
192
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
193
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
194
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
195
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
196
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
197
+ fail ArgumentError, 'artifact_source_name is nil' if artifact_source_name.nil?
198
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
199
+
200
+
201
+ request_headers = {}
202
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
203
+
204
+ # Set Headers
205
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
206
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
207
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}'
208
+
209
+ request_url = @base_url || @client.base_url
210
+
211
+ options = {
212
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
213
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'artifactSourceName' => artifact_source_name},
214
+ query_params: {'api-version' => @client.api_version},
215
+ headers: request_headers.merge(custom_headers || {}),
216
+ base_url: request_url
217
+ }
218
+ promise = @client.make_request_async(:get, path_template, options)
219
+
220
+ promise = promise.then do |result|
221
+ http_response = result.response
222
+ status_code = http_response.status
223
+ response_content = http_response.body
224
+ unless status_code == 200
225
+ error_model = JSON.load(response_content)
226
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
227
+ end
228
+
229
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
230
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
231
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
232
+ # Deserialize Response
233
+ if status_code == 200
234
+ begin
235
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
236
+ result_mapper = Azure::DeploymentManager::Mgmt::V2018_09_01_preview::Models::ArtifactSource.mapper()
237
+ result.body = @client.deserialize(result_mapper, parsed_response)
238
+ rescue Exception => e
239
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
240
+ end
241
+ end
242
+
243
+ result
244
+ end
245
+
246
+ promise.execute
247
+ end
248
+
249
+ #
250
+ # Deletes an artifact source.
251
+ #
252
+ # @param resource_group_name [String] The name of the resource group. The name
253
+ # is case insensitive.
254
+ # @param artifact_source_name [String] The name of the artifact source.
255
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
256
+ # will be added to the HTTP request.
257
+ #
258
+ #
259
+ def delete(resource_group_name, artifact_source_name, custom_headers:nil)
260
+ response = delete_async(resource_group_name, artifact_source_name, custom_headers:custom_headers).value!
261
+ nil
262
+ end
263
+
264
+ #
265
+ # Deletes an artifact source.
266
+ #
267
+ # @param resource_group_name [String] The name of the resource group. The name
268
+ # is case insensitive.
269
+ # @param artifact_source_name [String] The name of the artifact source.
270
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
271
+ # will be added to the HTTP request.
272
+ #
273
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
274
+ #
275
+ def delete_with_http_info(resource_group_name, artifact_source_name, custom_headers:nil)
276
+ delete_async(resource_group_name, artifact_source_name, custom_headers:custom_headers).value!
277
+ end
278
+
279
+ #
280
+ # Deletes an artifact source.
281
+ #
282
+ # @param resource_group_name [String] The name of the resource group. The name
283
+ # is case insensitive.
284
+ # @param artifact_source_name [String] The name of the artifact source.
285
+ # @param [Hash{String => String}] A hash of custom headers that will be added
286
+ # to the HTTP request.
287
+ #
288
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
289
+ #
290
+ def delete_async(resource_group_name, artifact_source_name, custom_headers:nil)
291
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
292
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
293
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
294
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
295
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
296
+ fail ArgumentError, 'artifact_source_name is nil' if artifact_source_name.nil?
297
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
298
+
299
+
300
+ request_headers = {}
301
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
302
+
303
+ # Set Headers
304
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
305
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
306
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeploymentManager/artifactSources/{artifactSourceName}'
307
+
308
+ request_url = @base_url || @client.base_url
309
+
310
+ options = {
311
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
312
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'artifactSourceName' => artifact_source_name},
313
+ query_params: {'api-version' => @client.api_version},
314
+ headers: request_headers.merge(custom_headers || {}),
315
+ base_url: request_url
316
+ }
317
+ promise = @client.make_request_async(:delete, path_template, options)
318
+
319
+ promise = promise.then do |result|
320
+ http_response = result.response
321
+ status_code = http_response.status
322
+ response_content = http_response.body
323
+ unless status_code == 200 || status_code == 204
324
+ error_model = JSON.load(response_content)
325
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
326
+ end
327
+
328
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
329
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
330
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
331
+
332
+ result
333
+ end
334
+
335
+ promise.execute
336
+ end
337
+
338
+ end
339
+ end
@@ -0,0 +1,157 @@
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::DeploymentManager::Mgmt::V2018_09_01_preview
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class AzureDeploymentManager < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Subscription credentials which uniquely identify
21
+ # Microsoft Azure subscription. The subscription ID forms part of the URI
22
+ # for every service call.
23
+ attr_accessor :subscription_id
24
+
25
+ # @return [String] The API version to use for this operation.
26
+ attr_reader :api_version
27
+
28
+ # @return [String] The preferred language for the response.
29
+ attr_accessor :accept_language
30
+
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
+ attr_accessor :long_running_operation_retry_timeout
34
+
35
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
36
+ # generated. When set to true a unique x-ms-client-request-id value is
37
+ # generated and included in each request. Default is true.
38
+ attr_accessor :generate_client_request_id
39
+
40
+ # @return [ServiceTopologies] service_topologies
41
+ attr_reader :service_topologies
42
+
43
+ # @return [Services] services
44
+ attr_reader :services
45
+
46
+ # @return [ServiceUnits] service_units
47
+ attr_reader :service_units
48
+
49
+ # @return [Steps] steps
50
+ attr_reader :steps
51
+
52
+ # @return [Rollouts] rollouts
53
+ attr_reader :rollouts
54
+
55
+ # @return [ArtifactSources] artifact_sources
56
+ attr_reader :artifact_sources
57
+
58
+ # @return [Operations] operations
59
+ attr_reader :operations
60
+
61
+ #
62
+ # Creates initializes a new instance of the AzureDeploymentManager class.
63
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
64
+ # @param base_url [String] the base URI of the service.
65
+ # @param options [Array] filters to be applied to the HTTP requests.
66
+ #
67
+ def initialize(credentials = nil, base_url = nil, options = nil)
68
+ super(credentials, options)
69
+ @base_url = base_url || 'https://management.azure.com'
70
+
71
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
72
+ @credentials = credentials
73
+
74
+ @service_topologies = ServiceTopologies.new(self)
75
+ @services = Services.new(self)
76
+ @service_units = ServiceUnits.new(self)
77
+ @steps = Steps.new(self)
78
+ @rollouts = Rollouts.new(self)
79
+ @artifact_sources = ArtifactSources.new(self)
80
+ @operations = Operations.new(self)
81
+ @api_version = '2018-09-01-preview'
82
+ @accept_language = 'en-US'
83
+ @long_running_operation_retry_timeout = 30
84
+ @generate_client_request_id = true
85
+ add_telemetry
86
+ end
87
+
88
+ #
89
+ # Makes a request and returns the body of the response.
90
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
91
+ # @param path [String] the path, relative to {base_url}.
92
+ # @param options [Hash{String=>String}] specifying any request options like :body.
93
+ # @return [Hash{String=>String}] containing the body of the response.
94
+ # Example:
95
+ #
96
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
97
+ # path = "/path"
98
+ # options = {
99
+ # body: request_content,
100
+ # query_params: {'api-version' => '2016-02-01'}
101
+ # }
102
+ # result = @client.make_request(:put, path, options)
103
+ #
104
+ def make_request(method, path, options = {})
105
+ result = make_request_with_http_info(method, path, options)
106
+ result.body unless result.nil?
107
+ end
108
+
109
+ #
110
+ # Makes a request and returns the operation response.
111
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
112
+ # @param path [String] the path, relative to {base_url}.
113
+ # @param options [Hash{String=>String}] specifying any request options like :body.
114
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
115
+ #
116
+ def make_request_with_http_info(method, path, options = {})
117
+ result = make_request_async(method, path, options).value!
118
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
119
+ result
120
+ end
121
+
122
+ #
123
+ # Makes a request asynchronously.
124
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
125
+ # @param path [String] the path, relative to {base_url}.
126
+ # @param options [Hash{String=>String}] specifying any request options like :body.
127
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
128
+ #
129
+ def make_request_async(method, path, options = {})
130
+ fail ArgumentError, 'method is nil' if method.nil?
131
+ fail ArgumentError, 'path is nil' if path.nil?
132
+
133
+ request_url = options[:base_url] || @base_url
134
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
135
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
136
+ end
137
+
138
+ request_headers = @request_headers
139
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
140
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
141
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
142
+
143
+ super(request_url, method, path, options)
144
+ end
145
+
146
+
147
+ private
148
+ #
149
+ # Adds telemetry information.
150
+ #
151
+ def add_telemetry
152
+ sdk_information = 'azure_mgmt_deployment_manager'
153
+ sdk_information = "#{sdk_information}/0.17.0"
154
+ add_user_agent_information(sdk_information)
155
+ end
156
+ end
157
+ end