azure_mgmt_maintenance 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance.rb +48 -0
  4. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/apply_updates.rb +481 -0
  5. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/configuration_assignments.rb +747 -0
  6. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/maintenance_configurations.rb +509 -0
  7. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/maintenance_management_client.rb +149 -0
  8. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/apply_update.rb +96 -0
  9. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/configuration_assignment.rb +95 -0
  10. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/error_details.rb +58 -0
  11. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/impact_type.rb +18 -0
  12. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/list_configuration_assignments_result.rb +56 -0
  13. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/list_maintenance_configurations_result.rb +56 -0
  14. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/list_updates_result.rb +55 -0
  15. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/maintenance_configuration.rb +136 -0
  16. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/maintenance_error.rb +47 -0
  17. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/maintenance_scope.rb +18 -0
  18. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/operation.rb +80 -0
  19. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/operation_info.rb +79 -0
  20. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/operations_list_result.rb +55 -0
  21. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/resource.rb +80 -0
  22. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/update.rb +105 -0
  23. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/models/update_status.rb +19 -0
  24. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/module_definition.rb +9 -0
  25. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/operations.rb +118 -0
  26. data/lib/2018-06-01-preview/generated/azure_mgmt_maintenance/updates.rb +249 -0
  27. data/lib/azure_mgmt_maintenance.rb +6 -0
  28. data/lib/module_definition.rb +7 -0
  29. data/lib/profiles/latest/maintenance_latest_profile_client.rb +40 -0
  30. data/lib/profiles/latest/maintenance_module_definition.rb +8 -0
  31. data/lib/profiles/latest/modules/maintenance_profile_module.rb +133 -0
  32. data/lib/version.rb +7 -0
  33. metadata +148 -0
@@ -0,0 +1,149 @@
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::Maintenance::Mgmt::V2018_06_01_preview
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class MaintenanceManagementClient < 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 that uniquely identify a
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] Version of the API to be used with the client request.
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 [ApplyUpdates] apply_updates
41
+ attr_reader :apply_updates
42
+
43
+ # @return [ConfigurationAssignments] configuration_assignments
44
+ attr_reader :configuration_assignments
45
+
46
+ # @return [MaintenanceConfigurations] maintenance_configurations
47
+ attr_reader :maintenance_configurations
48
+
49
+ # @return [Operations] operations
50
+ attr_reader :operations
51
+
52
+ # @return [Updates] updates
53
+ attr_reader :updates
54
+
55
+ #
56
+ # Creates initializes a new instance of the MaintenanceManagementClient class.
57
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
58
+ # @param base_url [String] the base URI of the service.
59
+ # @param options [Array] filters to be applied to the HTTP requests.
60
+ #
61
+ def initialize(credentials = nil, base_url = nil, options = nil)
62
+ super(credentials, options)
63
+ @base_url = base_url || 'https://management.azure.com'
64
+
65
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
66
+ @credentials = credentials
67
+
68
+ @apply_updates = ApplyUpdates.new(self)
69
+ @configuration_assignments = ConfigurationAssignments.new(self)
70
+ @maintenance_configurations = MaintenanceConfigurations.new(self)
71
+ @operations = Operations.new(self)
72
+ @updates = Updates.new(self)
73
+ @api_version = '2018-06-01-preview'
74
+ @accept_language = 'en-US'
75
+ @long_running_operation_retry_timeout = 30
76
+ @generate_client_request_id = true
77
+ add_telemetry
78
+ end
79
+
80
+ #
81
+ # Makes a request and returns the body of the response.
82
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
83
+ # @param path [String] the path, relative to {base_url}.
84
+ # @param options [Hash{String=>String}] specifying any request options like :body.
85
+ # @return [Hash{String=>String}] containing the body of the response.
86
+ # Example:
87
+ #
88
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
89
+ # path = "/path"
90
+ # options = {
91
+ # body: request_content,
92
+ # query_params: {'api-version' => '2016-02-01'}
93
+ # }
94
+ # result = @client.make_request(:put, path, options)
95
+ #
96
+ def make_request(method, path, options = {})
97
+ result = make_request_with_http_info(method, path, options)
98
+ result.body unless result.nil?
99
+ end
100
+
101
+ #
102
+ # Makes a request and returns the operation response.
103
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
104
+ # @param path [String] the path, relative to {base_url}.
105
+ # @param options [Hash{String=>String}] specifying any request options like :body.
106
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
107
+ #
108
+ def make_request_with_http_info(method, path, options = {})
109
+ result = make_request_async(method, path, options).value!
110
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
111
+ result
112
+ end
113
+
114
+ #
115
+ # Makes a request asynchronously.
116
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
117
+ # @param path [String] the path, relative to {base_url}.
118
+ # @param options [Hash{String=>String}] specifying any request options like :body.
119
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
120
+ #
121
+ def make_request_async(method, path, options = {})
122
+ fail ArgumentError, 'method is nil' if method.nil?
123
+ fail ArgumentError, 'path is nil' if path.nil?
124
+
125
+ request_url = options[:base_url] || @base_url
126
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
127
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
128
+ end
129
+
130
+ request_headers = @request_headers
131
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
132
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
133
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
134
+
135
+ super(request_url, method, path, options)
136
+ end
137
+
138
+
139
+ private
140
+ #
141
+ # Adds telemetry information.
142
+ #
143
+ def add_telemetry
144
+ sdk_information = 'azure_mgmt_maintenance'
145
+ sdk_information = "#{sdk_information}/0.10.0"
146
+ add_user_agent_information(sdk_information)
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,96 @@
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::Maintenance::Mgmt::V2018_06_01_preview
7
+ module Models
8
+ #
9
+ # Apply Update request
10
+ #
11
+ class ApplyUpdate < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [UpdateStatus] The status. Possible values include: 'Pending',
16
+ # 'InProgress', 'Completed', 'RetryNow', 'RetryLater'
17
+ attr_accessor :status
18
+
19
+ # @return [String] The resourceId
20
+ attr_accessor :resource_id
21
+
22
+ # @return [DateTime] Last Update time
23
+ attr_accessor :last_update_time
24
+
25
+
26
+ #
27
+ # Mapper for ApplyUpdate class as Ruby Hash.
28
+ # This will be used for serialization/deserialization.
29
+ #
30
+ def self.mapper()
31
+ {
32
+ client_side_validation: true,
33
+ required: false,
34
+ serialized_name: 'ApplyUpdate',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'ApplyUpdate',
38
+ model_properties: {
39
+ id: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ read_only: true,
43
+ serialized_name: 'id',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ },
48
+ name: {
49
+ client_side_validation: true,
50
+ required: false,
51
+ read_only: true,
52
+ serialized_name: 'name',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ type: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ read_only: true,
61
+ serialized_name: 'type',
62
+ type: {
63
+ name: 'String'
64
+ }
65
+ },
66
+ status: {
67
+ client_side_validation: true,
68
+ required: false,
69
+ serialized_name: 'properties.status',
70
+ type: {
71
+ name: 'String'
72
+ }
73
+ },
74
+ resource_id: {
75
+ client_side_validation: true,
76
+ required: false,
77
+ serialized_name: 'properties.resourceId',
78
+ type: {
79
+ name: 'String'
80
+ }
81
+ },
82
+ last_update_time: {
83
+ client_side_validation: true,
84
+ required: false,
85
+ serialized_name: 'properties.lastUpdateTime',
86
+ type: {
87
+ name: 'DateTime'
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ end
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,95 @@
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::Maintenance::Mgmt::V2018_06_01_preview
7
+ module Models
8
+ #
9
+ # Configuration Assignment
10
+ #
11
+ class ConfigurationAssignment < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Location of the resource
16
+ attr_accessor :location
17
+
18
+ # @return [String] The maintenance configuration Id
19
+ attr_accessor :maintenance_configuration_id
20
+
21
+ # @return [String] The unique resourceId
22
+ attr_accessor :resource_id
23
+
24
+
25
+ #
26
+ # Mapper for ConfigurationAssignment class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ client_side_validation: true,
32
+ required: false,
33
+ serialized_name: 'ConfigurationAssignment',
34
+ type: {
35
+ name: 'Composite',
36
+ class_name: 'ConfigurationAssignment',
37
+ model_properties: {
38
+ id: {
39
+ client_side_validation: true,
40
+ required: false,
41
+ read_only: true,
42
+ serialized_name: 'id',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ },
47
+ name: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ read_only: true,
51
+ serialized_name: 'name',
52
+ type: {
53
+ name: 'String'
54
+ }
55
+ },
56
+ type: {
57
+ client_side_validation: true,
58
+ required: false,
59
+ read_only: true,
60
+ serialized_name: 'type',
61
+ type: {
62
+ name: 'String'
63
+ }
64
+ },
65
+ location: {
66
+ client_side_validation: true,
67
+ required: false,
68
+ serialized_name: 'location',
69
+ type: {
70
+ name: 'String'
71
+ }
72
+ },
73
+ maintenance_configuration_id: {
74
+ client_side_validation: true,
75
+ required: false,
76
+ serialized_name: 'properties.maintenanceConfigurationId',
77
+ type: {
78
+ name: 'String'
79
+ }
80
+ },
81
+ resource_id: {
82
+ client_side_validation: true,
83
+ required: false,
84
+ serialized_name: 'properties.resourceId',
85
+ type: {
86
+ name: 'String'
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ end
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,58 @@
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::Maintenance::Mgmt::V2018_06_01_preview
7
+ module Models
8
+ #
9
+ # An error response details received from the Azure Maintenance service.
10
+ #
11
+ class ErrorDetails
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Service-defined error code. This code serves as a
16
+ # sub-status for the HTTP error code specified in the response.
17
+ attr_accessor :code
18
+
19
+ # @return [String] Human-readable representation of the error.
20
+ attr_accessor :message
21
+
22
+
23
+ #
24
+ # Mapper for ErrorDetails class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ client_side_validation: true,
30
+ required: false,
31
+ serialized_name: 'ErrorDetails',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'ErrorDetails',
35
+ model_properties: {
36
+ code: {
37
+ client_side_validation: true,
38
+ required: false,
39
+ serialized_name: 'code',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ message: {
45
+ client_side_validation: true,
46
+ required: false,
47
+ serialized_name: 'message',
48
+ type: {
49
+ name: 'String'
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,18 @@
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::Maintenance::Mgmt::V2018_06_01_preview
7
+ module Models
8
+ #
9
+ # Defines values for ImpactType
10
+ #
11
+ module ImpactType
12
+ None = "None"
13
+ Freeze = "Freeze"
14
+ Restart = "Restart"
15
+ Redeploy = "Redeploy"
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,56 @@
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::Maintenance::Mgmt::V2018_06_01_preview
7
+ module Models
8
+ #
9
+ # Response for ConfigurationAssignments list
10
+ #
11
+ class ListConfigurationAssignmentsResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<ConfigurationAssignment>] The list of configuration
16
+ # Assignments
17
+ attr_accessor :value
18
+
19
+
20
+ #
21
+ # Mapper for ListConfigurationAssignmentsResult class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'ListConfigurationAssignmentsResult',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'ListConfigurationAssignmentsResult',
32
+ model_properties: {
33
+ value: {
34
+ client_side_validation: true,
35
+ required: false,
36
+ serialized_name: 'value',
37
+ type: {
38
+ name: 'Sequence',
39
+ element: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'ConfigurationAssignmentElementType',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'ConfigurationAssignment'
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ end
54
+ end
55
+ end
56
+ end