azure_mgmt_azurestack_hci 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci.rb +46 -0
  4. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/azure_stack_hciclient.rb +135 -0
  5. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/clusters.rb +850 -0
  6. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/azure_entity_resource.rb +75 -0
  7. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/cluster.rb +184 -0
  8. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/cluster_list.rb +99 -0
  9. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/cluster_node.rb +144 -0
  10. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/cluster_reported_properties.rb +105 -0
  11. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/cluster_update.rb +54 -0
  12. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/error_additional_info.rb +59 -0
  13. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/error_response.rb +47 -0
  14. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/error_response_error.rb +113 -0
  15. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/operation.rb +59 -0
  16. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/operation_display.rb +79 -0
  17. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/operation_list.rb +67 -0
  18. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/provisioning_state.rb +19 -0
  19. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/proxy_resource.rb +63 -0
  20. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/resource.rb +83 -0
  21. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/status.rb +19 -0
  22. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/models/tracked_resource.rb +92 -0
  23. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/module_definition.rb +9 -0
  24. data/lib/2020-03-01-preview/generated/azure_mgmt_azurestack_hci/operations.rb +110 -0
  25. data/lib/azure_mgmt_azurestack_hci.rb +6 -0
  26. data/lib/module_definition.rb +7 -0
  27. data/lib/profiles/latest/azurestackhci_latest_profile_client.rb +40 -0
  28. data/lib/profiles/latest/azurestackhci_module_definition.rb +8 -0
  29. data/lib/profiles/latest/modules/azurestackhci_profile_module.rb +131 -0
  30. data/lib/version.rb +7 -0
  31. metadata +146 -0
@@ -0,0 +1,67 @@
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::AzureStackHCI::Mgmt::V2020_03_01_preview
7
+ module Models
8
+ #
9
+ # List of available operations.
10
+ #
11
+ class OperationList
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<Operation>] List of operations.
16
+ attr_accessor :value
17
+
18
+ # @return [String] Link to the next set of results.
19
+ attr_accessor :next_link
20
+
21
+
22
+ #
23
+ # Mapper for OperationList class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'OperationList',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'OperationList',
34
+ model_properties: {
35
+ value: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ serialized_name: 'value',
39
+ type: {
40
+ name: 'Sequence',
41
+ element: {
42
+ client_side_validation: true,
43
+ required: false,
44
+ serialized_name: 'OperationElementType',
45
+ type: {
46
+ name: 'Composite',
47
+ class_name: 'Operation'
48
+ }
49
+ }
50
+ }
51
+ },
52
+ next_link: {
53
+ client_side_validation: true,
54
+ required: false,
55
+ read_only: true,
56
+ serialized_name: 'nextLink',
57
+ type: {
58
+ name: 'String'
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,19 @@
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::AzureStackHCI::Mgmt::V2020_03_01_preview
7
+ module Models
8
+ #
9
+ # Defines values for ProvisioningState
10
+ #
11
+ module ProvisioningState
12
+ Succeeded = "Succeeded"
13
+ Failed = "Failed"
14
+ Canceled = "Canceled"
15
+ Accepted = "Accepted"
16
+ Provisioning = "Provisioning"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,63 @@
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::AzureStackHCI::Mgmt::V2020_03_01_preview
7
+ module Models
8
+ #
9
+ # The resource model definition for a ARM proxy resource. It will have
10
+ # everything other than required location and tags
11
+ #
12
+ class ProxyResource < Resource
13
+
14
+ include MsRestAzure
15
+
16
+
17
+ #
18
+ # Mapper for ProxyResource class as Ruby Hash.
19
+ # This will be used for serialization/deserialization.
20
+ #
21
+ def self.mapper()
22
+ {
23
+ client_side_validation: true,
24
+ required: false,
25
+ serialized_name: 'ProxyResource',
26
+ type: {
27
+ name: 'Composite',
28
+ class_name: 'ProxyResource',
29
+ model_properties: {
30
+ id: {
31
+ client_side_validation: true,
32
+ required: false,
33
+ read_only: true,
34
+ serialized_name: 'id',
35
+ type: {
36
+ name: 'String'
37
+ }
38
+ },
39
+ name: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ read_only: true,
43
+ serialized_name: 'name',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ },
48
+ type: {
49
+ client_side_validation: true,
50
+ required: false,
51
+ read_only: true,
52
+ serialized_name: 'type',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,83 @@
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::AzureStackHCI::Mgmt::V2020_03_01_preview
7
+ module Models
8
+ #
9
+ # Model object.
10
+ #
11
+ #
12
+ class Resource
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [String] Fully qualified resource Id for the resource. Ex -
17
+ # /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
18
+ attr_accessor :id
19
+
20
+ # @return [String] The name of the resource
21
+ attr_accessor :name
22
+
23
+ # @return [String] The type of the resource. Ex-
24
+ # Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
25
+ attr_accessor :type
26
+
27
+
28
+ # @return [String] the name of the resource group of the resource.
29
+ def resource_group
30
+ unless self.id.nil?
31
+ groups = self.id.match(/.+\/resourceGroups\/([^\/]+)\/.+/)
32
+ groups.captures[0].strip if groups
33
+ end
34
+ end
35
+
36
+
37
+ #
38
+ # Mapper for Resource class as Ruby Hash.
39
+ # This will be used for serialization/deserialization.
40
+ #
41
+ def self.mapper()
42
+ {
43
+ client_side_validation: true,
44
+ required: false,
45
+ serialized_name: 'Resource',
46
+ type: {
47
+ name: 'Composite',
48
+ class_name: 'Resource',
49
+ model_properties: {
50
+ id: {
51
+ client_side_validation: true,
52
+ required: false,
53
+ read_only: true,
54
+ serialized_name: 'id',
55
+ type: {
56
+ name: 'String'
57
+ }
58
+ },
59
+ name: {
60
+ client_side_validation: true,
61
+ required: false,
62
+ read_only: true,
63
+ serialized_name: 'name',
64
+ type: {
65
+ name: 'String'
66
+ }
67
+ },
68
+ type: {
69
+ client_side_validation: true,
70
+ required: false,
71
+ read_only: true,
72
+ serialized_name: 'type',
73
+ type: {
74
+ name: 'String'
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,19 @@
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::AzureStackHCI::Mgmt::V2020_03_01_preview
7
+ module Models
8
+ #
9
+ # Defines values for Status
10
+ #
11
+ module Status
12
+ NeverConnected = "NeverConnected"
13
+ ConnectedRecently = "ConnectedRecently"
14
+ NotConnectedRecently = "NotConnectedRecently"
15
+ Expired = "Expired"
16
+ Error = "Error"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,92 @@
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::AzureStackHCI::Mgmt::V2020_03_01_preview
7
+ module Models
8
+ #
9
+ # The resource model definition for a ARM tracked top level resource
10
+ #
11
+ class TrackedResource < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Hash{String => String}] Resource tags.
16
+ attr_accessor :tags
17
+
18
+ # @return [String] The geo-location where the resource lives
19
+ attr_accessor :location
20
+
21
+
22
+ #
23
+ # Mapper for TrackedResource class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'TrackedResource',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'TrackedResource',
34
+ model_properties: {
35
+ id: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ read_only: true,
39
+ serialized_name: 'id',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ name: {
45
+ client_side_validation: true,
46
+ required: false,
47
+ read_only: true,
48
+ serialized_name: 'name',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ },
53
+ type: {
54
+ client_side_validation: true,
55
+ required: false,
56
+ read_only: true,
57
+ serialized_name: 'type',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ },
62
+ tags: {
63
+ client_side_validation: true,
64
+ required: false,
65
+ serialized_name: 'tags',
66
+ type: {
67
+ name: 'Dictionary',
68
+ value: {
69
+ client_side_validation: true,
70
+ required: false,
71
+ serialized_name: 'StringElementType',
72
+ type: {
73
+ name: 'String'
74
+ }
75
+ }
76
+ }
77
+ },
78
+ location: {
79
+ client_side_validation: true,
80
+ required: true,
81
+ serialized_name: 'location',
82
+ type: {
83
+ name: 'String'
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,9 @@
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 end
7
+ module Azure::AzureStackHCI end
8
+ module Azure::AzureStackHCI::Mgmt end
9
+ module Azure::AzureStackHCI::Mgmt::V2020_03_01_preview end
@@ -0,0 +1,110 @@
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::AzureStackHCI::Mgmt::V2020_03_01_preview
7
+ #
8
+ # Azure Stack HCI management service
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [AzureStackHCIClient] reference to the AzureStackHCIClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # List all available Microsoft.AzureStackHCI provider operations
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [OperationList] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ response = list_async(custom_headers:custom_headers).value!
34
+ response.body unless response.nil?
35
+ end
36
+
37
+ #
38
+ # List all available Microsoft.AzureStackHCI provider operations
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers:nil)
46
+ list_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # List all available Microsoft.AzureStackHCI provider operations
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
60
+
61
+
62
+ request_headers = {}
63
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
64
+
65
+ # Set Headers
66
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
67
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
68
+ path_template = 'providers/Microsoft.AzureStackHCI/operations'
69
+
70
+ request_url = @base_url || @client.base_url
71
+
72
+ options = {
73
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
74
+ query_params: {'api-version' => @client.api_version},
75
+ headers: request_headers.merge(custom_headers || {}),
76
+ base_url: request_url
77
+ }
78
+ promise = @client.make_request_async(:get, path_template, options)
79
+
80
+ promise = promise.then do |result|
81
+ http_response = result.response
82
+ status_code = http_response.status
83
+ response_content = http_response.body
84
+ unless status_code == 200
85
+ error_model = JSON.load(response_content)
86
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
87
+ end
88
+
89
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
90
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
91
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
92
+ # Deserialize Response
93
+ if status_code == 200
94
+ begin
95
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
96
+ result_mapper = Azure::AzureStackHCI::Mgmt::V2020_03_01_preview::Models::OperationList.mapper()
97
+ result.body = @client.deserialize(result_mapper, parsed_response)
98
+ rescue Exception => e
99
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
100
+ end
101
+ end
102
+
103
+ result
104
+ end
105
+
106
+ promise.execute
107
+ end
108
+
109
+ end
110
+ end