azure_mgmt_key_vault 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-06-01/generated/azure_mgmt_key_vault/key_vault_management_client.rb +7 -6
  3. data/lib/2016-10-01/generated/azure_mgmt_key_vault/key_vault_management_client.rb +7 -6
  4. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/storage_permissions.rb +4 -0
  5. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/vault_patch_properties.rb +16 -3
  6. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/vault_properties.rb +22 -4
  7. data/lib/2016-10-01/generated/azure_mgmt_key_vault/vaults.rb +84 -132
  8. data/lib/2018-02-14/generated/azure_mgmt_key_vault.rb +65 -0
  9. data/lib/2018-02-14/generated/azure_mgmt_key_vault/key_vault_management_client.rb +137 -0
  10. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/access_policy_entry.rb +86 -0
  11. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/access_policy_update_kind.rb +17 -0
  12. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/certificate_permissions.rb +30 -0
  13. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/check_name_availability_result.rb +77 -0
  14. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/create_mode.rb +16 -0
  15. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/deleted_vault.rb +83 -0
  16. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/deleted_vault_list_result.rb +98 -0
  17. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/deleted_vault_properties.rb +103 -0
  18. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/iprule.rb +49 -0
  19. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/key_permissions.rb +30 -0
  20. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/log_specification.rb +68 -0
  21. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/network_rule_action.rb +16 -0
  22. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/network_rule_bypass_options.rb +16 -0
  23. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/network_rule_set.rb +103 -0
  24. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/operation.rb +83 -0
  25. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/operation_display.rb +79 -0
  26. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/operation_list_result.rb +100 -0
  27. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/permissions.rb +111 -0
  28. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/reason.rb +16 -0
  29. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/resource.rb +104 -0
  30. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/resource_list_result.rb +98 -0
  31. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/secret_permissions.rb +22 -0
  32. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/service_specification.rb +55 -0
  33. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/sku.rb +62 -0
  34. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/sku_name.rb +16 -0
  35. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/storage_permissions.rb +28 -0
  36. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/vault.rb +99 -0
  37. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/vault_access_policy_parameters.rb +95 -0
  38. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/vault_access_policy_properties.rb +57 -0
  39. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/vault_check_name_availability_parameters.rb +60 -0
  40. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/vault_create_or_update_parameters.rb +80 -0
  41. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/vault_list_result.rb +98 -0
  42. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/vault_patch_parameters.rb +67 -0
  43. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/vault_patch_properties.rb +175 -0
  44. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/vault_properties.rb +188 -0
  45. data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/virtual_network_rule.rb +48 -0
  46. data/lib/2018-02-14/generated/azure_mgmt_key_vault/module_definition.rb +9 -0
  47. data/lib/2018-02-14/generated/azure_mgmt_key_vault/operations.rb +216 -0
  48. data/lib/2018-02-14/generated/azure_mgmt_key_vault/vaults.rb +1739 -0
  49. data/lib/azure_mgmt_key_vault.rb +2 -1
  50. data/lib/profiles/latest/modules/keyvault_profile_module.rb +95 -75
  51. data/lib/version.rb +1 -1
  52. metadata +46 -5
@@ -0,0 +1,188 @@
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::KeyVault::Mgmt::V2018_02_14
7
+ module Models
8
+ #
9
+ # Properties of the vault
10
+ #
11
+ class VaultProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return The Azure Active Directory tenant ID that should be used for
16
+ # authenticating requests to the key vault.
17
+ attr_accessor :tenant_id
18
+
19
+ # @return [Sku] SKU details
20
+ attr_accessor :sku
21
+
22
+ # @return [Array<AccessPolicyEntry>] An array of 0 to 16 identities that
23
+ # have access to the key vault. All identities in the array must use the
24
+ # same tenant ID as the key vault's tenant ID.
25
+ attr_accessor :access_policies
26
+
27
+ # @return [String] The URI of the vault for performing operations on keys
28
+ # and secrets.
29
+ attr_accessor :vault_uri
30
+
31
+ # @return [Boolean] Property to specify whether Azure Virtual Machines
32
+ # are permitted to retrieve certificates stored as secrets from the key
33
+ # vault.
34
+ attr_accessor :enabled_for_deployment
35
+
36
+ # @return [Boolean] Property to specify whether Azure Disk Encryption is
37
+ # permitted to retrieve secrets from the vault and unwrap keys.
38
+ attr_accessor :enabled_for_disk_encryption
39
+
40
+ # @return [Boolean] Property to specify whether Azure Resource Manager is
41
+ # permitted to retrieve secrets from the key vault.
42
+ attr_accessor :enabled_for_template_deployment
43
+
44
+ # @return [Boolean] Property to specify whether the 'soft delete'
45
+ # functionality is enabled for this key vault. It does not accept false
46
+ # value.
47
+ attr_accessor :enable_soft_delete
48
+
49
+ # @return [CreateMode] The vault's create mode to indicate whether the
50
+ # vault need to be recovered or not. Possible values include: 'recover',
51
+ # 'default'
52
+ attr_accessor :create_mode
53
+
54
+ # @return [Boolean] Property specifying whether protection against purge
55
+ # is enabled for this vault. Setting this property to true activates
56
+ # protection against purge for this vault and its content - only the Key
57
+ # Vault service may initiate a hard, irrecoverable deletion. The setting
58
+ # is effective only if soft delete is also enabled. Enabling this
59
+ # functionality is irreversible - that is, the property does not accept
60
+ # false as its value.
61
+ attr_accessor :enable_purge_protection
62
+
63
+ # @return [NetworkRuleSet] A collection of rules governing the
64
+ # accessibility of the vault from specific network locations.
65
+ attr_accessor :network_acls
66
+
67
+
68
+ #
69
+ # Mapper for VaultProperties class as Ruby Hash.
70
+ # This will be used for serialization/deserialization.
71
+ #
72
+ def self.mapper()
73
+ {
74
+ client_side_validation: true,
75
+ required: false,
76
+ serialized_name: 'VaultProperties',
77
+ type: {
78
+ name: 'Composite',
79
+ class_name: 'VaultProperties',
80
+ model_properties: {
81
+ tenant_id: {
82
+ client_side_validation: true,
83
+ required: true,
84
+ serialized_name: 'tenantId',
85
+ type: {
86
+ name: 'String'
87
+ }
88
+ },
89
+ sku: {
90
+ client_side_validation: true,
91
+ required: true,
92
+ serialized_name: 'sku',
93
+ default_value: {},
94
+ type: {
95
+ name: 'Composite',
96
+ class_name: 'Sku'
97
+ }
98
+ },
99
+ access_policies: {
100
+ client_side_validation: true,
101
+ required: false,
102
+ serialized_name: 'accessPolicies',
103
+ type: {
104
+ name: 'Sequence',
105
+ element: {
106
+ client_side_validation: true,
107
+ required: false,
108
+ serialized_name: 'AccessPolicyEntryElementType',
109
+ type: {
110
+ name: 'Composite',
111
+ class_name: 'AccessPolicyEntry'
112
+ }
113
+ }
114
+ }
115
+ },
116
+ vault_uri: {
117
+ client_side_validation: true,
118
+ required: false,
119
+ serialized_name: 'vaultUri',
120
+ type: {
121
+ name: 'String'
122
+ }
123
+ },
124
+ enabled_for_deployment: {
125
+ client_side_validation: true,
126
+ required: false,
127
+ serialized_name: 'enabledForDeployment',
128
+ type: {
129
+ name: 'Boolean'
130
+ }
131
+ },
132
+ enabled_for_disk_encryption: {
133
+ client_side_validation: true,
134
+ required: false,
135
+ serialized_name: 'enabledForDiskEncryption',
136
+ type: {
137
+ name: 'Boolean'
138
+ }
139
+ },
140
+ enabled_for_template_deployment: {
141
+ client_side_validation: true,
142
+ required: false,
143
+ serialized_name: 'enabledForTemplateDeployment',
144
+ type: {
145
+ name: 'Boolean'
146
+ }
147
+ },
148
+ enable_soft_delete: {
149
+ client_side_validation: true,
150
+ required: false,
151
+ serialized_name: 'enableSoftDelete',
152
+ type: {
153
+ name: 'Boolean'
154
+ }
155
+ },
156
+ create_mode: {
157
+ client_side_validation: true,
158
+ required: false,
159
+ serialized_name: 'createMode',
160
+ type: {
161
+ name: 'Enum',
162
+ module: 'CreateMode'
163
+ }
164
+ },
165
+ enable_purge_protection: {
166
+ client_side_validation: true,
167
+ required: false,
168
+ serialized_name: 'enablePurgeProtection',
169
+ type: {
170
+ name: 'Boolean'
171
+ }
172
+ },
173
+ network_acls: {
174
+ client_side_validation: true,
175
+ required: false,
176
+ serialized_name: 'networkAcls',
177
+ type: {
178
+ name: 'Composite',
179
+ class_name: 'NetworkRuleSet'
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ end
186
+ end
187
+ end
188
+ end
@@ -0,0 +1,48 @@
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::KeyVault::Mgmt::V2018_02_14
7
+ module Models
8
+ #
9
+ # A rule governing the accesibility of a vault from a specific virtual
10
+ # network.
11
+ #
12
+ class VirtualNetworkRule
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [String] Full resource id of a vnet subnet, such as
17
+ # '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.
18
+ attr_accessor :id
19
+
20
+
21
+ #
22
+ # Mapper for VirtualNetworkRule class as Ruby Hash.
23
+ # This will be used for serialization/deserialization.
24
+ #
25
+ def self.mapper()
26
+ {
27
+ client_side_validation: true,
28
+ required: false,
29
+ serialized_name: 'VirtualNetworkRule',
30
+ type: {
31
+ name: 'Composite',
32
+ class_name: 'VirtualNetworkRule',
33
+ model_properties: {
34
+ id: {
35
+ client_side_validation: true,
36
+ required: true,
37
+ serialized_name: 'id',
38
+ type: {
39
+ name: 'String'
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ end
46
+ end
47
+ end
48
+ 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::KeyVault end
8
+ module Azure::KeyVault::Mgmt end
9
+ module Azure::KeyVault::Mgmt::V2018_02_14 end
@@ -0,0 +1,216 @@
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::KeyVault::Mgmt::V2018_02_14
7
+ #
8
+ # The Azure management API provides a RESTful set of web services that
9
+ # interact with Azure Key Vault.
10
+ #
11
+ class Operations
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the Operations class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [KeyVaultManagementClient] reference to the KeyVaultManagementClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Lists all of the available Key Vault Rest API operations.
27
+ #
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [Array<Operation>] operation results.
32
+ #
33
+ def list(custom_headers:nil)
34
+ first_page = list_as_lazy(custom_headers:custom_headers)
35
+ first_page.get_all_items
36
+ end
37
+
38
+ #
39
+ # Lists all of the available Key Vault Rest API operations.
40
+ #
41
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
42
+ # will be added to the HTTP request.
43
+ #
44
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
45
+ #
46
+ def list_with_http_info(custom_headers:nil)
47
+ list_async(custom_headers:custom_headers).value!
48
+ end
49
+
50
+ #
51
+ # Lists all of the available Key Vault Rest API operations.
52
+ #
53
+ # @param [Hash{String => String}] A hash of custom headers that will be added
54
+ # to the HTTP request.
55
+ #
56
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
57
+ #
58
+ def list_async(custom_headers:nil)
59
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
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.KeyVault/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 MsRestAzure::AzureOperationError.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
+ # Deserialize Response
91
+ if status_code == 200
92
+ begin
93
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
94
+ result_mapper = Azure::KeyVault::Mgmt::V2018_02_14::Models::OperationListResult.mapper()
95
+ result.body = @client.deserialize(result_mapper, parsed_response)
96
+ rescue Exception => e
97
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
98
+ end
99
+ end
100
+
101
+ result
102
+ end
103
+
104
+ promise.execute
105
+ end
106
+
107
+ #
108
+ # Lists all of the available Key Vault Rest API operations.
109
+ #
110
+ # @param next_page_link [String] The NextLink from the previous successful call
111
+ # to List operation.
112
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
113
+ # will be added to the HTTP request.
114
+ #
115
+ # @return [OperationListResult] operation results.
116
+ #
117
+ def list_next(next_page_link, custom_headers:nil)
118
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
119
+ response.body unless response.nil?
120
+ end
121
+
122
+ #
123
+ # Lists all of the available Key Vault Rest API operations.
124
+ #
125
+ # @param next_page_link [String] The NextLink from the previous successful call
126
+ # to List operation.
127
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
128
+ # will be added to the HTTP request.
129
+ #
130
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
131
+ #
132
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
133
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
134
+ end
135
+
136
+ #
137
+ # Lists all of the available Key Vault Rest API operations.
138
+ #
139
+ # @param next_page_link [String] The NextLink from the previous successful call
140
+ # to List operation.
141
+ # @param [Hash{String => String}] A hash of custom headers that will be added
142
+ # to the HTTP request.
143
+ #
144
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
145
+ #
146
+ def list_next_async(next_page_link, custom_headers:nil)
147
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
148
+
149
+
150
+ request_headers = {}
151
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
152
+
153
+ # Set Headers
154
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
155
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
156
+ path_template = '{nextLink}'
157
+
158
+ request_url = @base_url || @client.base_url
159
+
160
+ options = {
161
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
162
+ skip_encoding_path_params: {'nextLink' => next_page_link},
163
+ headers: request_headers.merge(custom_headers || {}),
164
+ base_url: request_url
165
+ }
166
+ promise = @client.make_request_async(:get, path_template, options)
167
+
168
+ promise = promise.then do |result|
169
+ http_response = result.response
170
+ status_code = http_response.status
171
+ response_content = http_response.body
172
+ unless status_code == 200
173
+ error_model = JSON.load(response_content)
174
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
175
+ end
176
+
177
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
178
+ # Deserialize Response
179
+ if status_code == 200
180
+ begin
181
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
182
+ result_mapper = Azure::KeyVault::Mgmt::V2018_02_14::Models::OperationListResult.mapper()
183
+ result.body = @client.deserialize(result_mapper, parsed_response)
184
+ rescue Exception => e
185
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
186
+ end
187
+ end
188
+
189
+ result
190
+ end
191
+
192
+ promise.execute
193
+ end
194
+
195
+ #
196
+ # Lists all of the available Key Vault Rest API operations.
197
+ #
198
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
199
+ # will be added to the HTTP request.
200
+ #
201
+ # @return [OperationListResult] which provide lazy access to pages of the
202
+ # response.
203
+ #
204
+ def list_as_lazy(custom_headers:nil)
205
+ response = list_async(custom_headers:custom_headers).value!
206
+ unless response.nil?
207
+ page = response.body
208
+ page.next_method = Proc.new do |next_page_link|
209
+ list_next_async(next_page_link, custom_headers:custom_headers)
210
+ end
211
+ page
212
+ end
213
+ end
214
+
215
+ end
216
+ end