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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4855a2247443fb42e20540fe6f1abd5d4b5e3b5
4
- data.tar.gz: e0d9305b02d75c9057b8c9cdf822aa05ad108146
3
+ metadata.gz: 5ccf461eca96d9d2f26aea598734a145f4adc578
4
+ data.tar.gz: 0fe5aba24502d5adfa683e5ed7df852ce190b73a
5
5
  SHA512:
6
- metadata.gz: 72841fd21fb2917e3f33bf25014f9e1bc8ae0bc530fe934876ca16df02ab6f2b0d6d11aeb86aa830dfc5c175936df230a4e629652d6e5fcd2435fb41c92cba4f
7
- data.tar.gz: 3bbd52305fef25425ed65f007766b857eacfb0cd48afb523e3ffd2be0fa9179f14e97522db5ec6349f148fa1fcbfb577a2ceab17918d63d22ce2518e2f67d18d
6
+ metadata.gz: 2cee9a41848193ca0a3136d5d0343f49c1b77ed88b5725642d905df099c8875a61a516263277bae07b6fc4cd4229f7e8251abd5dc43b3cbb3c0a1edddeefd727
7
+ data.tar.gz: 97e29d54dac9bdad51c6ae6cd461b03cab3b89dffe40c2d7caa22fb51935b30938f70ade847223d2bf09487d831154da62fd61c09d248bdabb0c2a1f9f7399b3
@@ -25,15 +25,16 @@ module Azure::KeyVault::Mgmt::V2015_06_01
25
25
  # @return [String] Client Api Version.
26
26
  attr_reader :api_version
27
27
 
28
- # @return [String] Gets or sets the preferred language for the response.
28
+ # @return [String] The preferred language for the response.
29
29
  attr_accessor :accept_language
30
30
 
31
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
32
- # Running Operations. Default value is 30.
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
33
  attr_accessor :long_running_operation_retry_timeout
34
34
 
35
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
36
- # is generated and included in each request. Default is true.
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.
37
38
  attr_accessor :generate_client_request_id
38
39
 
39
40
  # @return [Vaults] vaults
@@ -125,7 +126,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
125
126
  #
126
127
  def add_telemetry
127
128
  sdk_information = 'azure_mgmt_key_vault'
128
- sdk_information = "#{sdk_information}/0.16.0"
129
+ sdk_information = "#{sdk_information}/0.17.0"
129
130
  add_user_agent_information(sdk_information)
130
131
  end
131
132
  end
@@ -25,15 +25,16 @@ module Azure::KeyVault::Mgmt::V2016_10_01
25
25
  # @return [String] Client Api Version.
26
26
  attr_reader :api_version
27
27
 
28
- # @return [String] Gets or sets the preferred language for the response.
28
+ # @return [String] The preferred language for the response.
29
29
  attr_accessor :accept_language
30
30
 
31
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
32
- # Running Operations. Default value is 30.
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
33
  attr_accessor :long_running_operation_retry_timeout
34
34
 
35
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
36
- # is generated and included in each request. Default is true.
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.
37
38
  attr_accessor :generate_client_request_id
38
39
 
39
40
  # @return [Vaults] vaults
@@ -129,7 +130,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
129
130
  #
130
131
  def add_telemetry
131
132
  sdk_information = 'azure_mgmt_key_vault'
132
- sdk_information = "#{sdk_information}/0.16.0"
133
+ sdk_information = "#{sdk_information}/0.17.0"
133
134
  add_user_agent_information(sdk_information)
134
135
  end
135
136
  end
@@ -15,6 +15,10 @@ module Azure::KeyVault::Mgmt::V2016_10_01
15
15
  Set = "set"
16
16
  Update = "update"
17
17
  Regeneratekey = "regeneratekey"
18
+ Recover = "recover"
19
+ Purge = "purge"
20
+ Backup = "backup"
21
+ Restore = "restore"
18
22
  Setsas = "setsas"
19
23
  Listsas = "listsas"
20
24
  Getsas = "getsas"
@@ -37,9 +37,9 @@ module Azure::KeyVault::Mgmt::V2016_10_01
37
37
  # permitted to retrieve secrets from the key vault.
38
38
  attr_accessor :enabled_for_template_deployment
39
39
 
40
- # @return [Boolean] Property to specify whether the 'soft delete'
41
- # functionality is enabled for this key vault. It does not accept false
42
- # value.
40
+ # @return [Boolean] Property specifying whether recoverable deletion
41
+ # ('soft' delete) is enabled for this key vault. The property may not be
42
+ # set to false.
43
43
  attr_accessor :enable_soft_delete
44
44
 
45
45
  # @return [CreateMode] The vault's create mode to indicate whether the
@@ -47,6 +47,11 @@ module Azure::KeyVault::Mgmt::V2016_10_01
47
47
  # 'default'
48
48
  attr_accessor :create_mode
49
49
 
50
+ # @return [Boolean] Property specifying whether protection against purge
51
+ # is enabled for this vault; it is only effective if soft delete is also
52
+ # enabled. Once activated, the property may no longer be reset to false.
53
+ attr_accessor :enable_purge_protection
54
+
50
55
 
51
56
  #
52
57
  # Mapper for VaultPatchProperties class as Ruby Hash.
@@ -135,6 +140,14 @@ module Azure::KeyVault::Mgmt::V2016_10_01
135
140
  name: 'Enum',
136
141
  module: 'CreateMode'
137
142
  }
143
+ },
144
+ enable_purge_protection: {
145
+ client_side_validation: true,
146
+ required: false,
147
+ serialized_name: 'enablePurgeProtection',
148
+ type: {
149
+ name: 'Boolean'
150
+ }
138
151
  }
139
152
  }
140
153
  }
@@ -41,9 +41,11 @@ module Azure::KeyVault::Mgmt::V2016_10_01
41
41
  # permitted to retrieve secrets from the key vault.
42
42
  attr_accessor :enabled_for_template_deployment
43
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.
44
+ # @return [Boolean] Property specifying whether recoverable deletion is
45
+ # enabled for this key vault. Setting this property to true activates the
46
+ # soft delete feature, whereby vaults or vault entities can be recovered
47
+ # after deletion. Enabling this functionality is irreversible - that is,
48
+ # the property does not accept false as its value.
47
49
  attr_accessor :enable_soft_delete
48
50
 
49
51
  # @return [CreateMode] The vault's create mode to indicate whether the
@@ -51,6 +53,15 @@ module Azure::KeyVault::Mgmt::V2016_10_01
51
53
  # 'default'
52
54
  attr_accessor :create_mode
53
55
 
56
+ # @return [Boolean] Property specifying whether protection against purge
57
+ # is enabled for this vault. Setting this property to true activates
58
+ # protection against purge for this vault and its content - only the Key
59
+ # Vault service may initiate a hard, irrecoverable deletion. The setting
60
+ # is effective only if soft delete is also enabled. Enabling this
61
+ # functionality is irreversible - that is, the property does not accept
62
+ # false as its value.
63
+ attr_accessor :enable_purge_protection
64
+
54
65
 
55
66
  #
56
67
  # Mapper for VaultProperties class as Ruby Hash.
@@ -103,7 +114,6 @@ module Azure::KeyVault::Mgmt::V2016_10_01
103
114
  vault_uri: {
104
115
  client_side_validation: true,
105
116
  required: false,
106
- read_only: true,
107
117
  serialized_name: 'vaultUri',
108
118
  type: {
109
119
  name: 'String'
@@ -149,6 +159,14 @@ module Azure::KeyVault::Mgmt::V2016_10_01
149
159
  name: 'Enum',
150
160
  module: 'CreateMode'
151
161
  }
162
+ },
163
+ enable_purge_protection: {
164
+ client_side_validation: true,
165
+ required: false,
166
+ serialized_name: 'enablePurgeProtection',
167
+ type: {
168
+ name: 'Boolean'
169
+ }
152
170
  }
153
171
  }
154
172
  }
@@ -40,6 +40,8 @@ module Azure::KeyVault::Mgmt::V2016_10_01
40
40
  response.body unless response.nil?
41
41
  end
42
42
 
43
+ #
44
+ # Create or update a key vault in the specified subscription.
43
45
  #
44
46
  # @param resource_group_name [String] The name of the Resource Group to which
45
47
  # the server belongs.
@@ -49,25 +51,95 @@ module Azure::KeyVault::Mgmt::V2016_10_01
49
51
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
50
52
  # will be added to the HTTP request.
51
53
  #
52
- # @return [Concurrent::Promise] promise which provides async access to http
53
- # response.
54
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
55
+ #
56
+ def create_or_update_with_http_info(resource_group_name, vault_name, parameters, custom_headers:nil)
57
+ create_or_update_async(resource_group_name, vault_name, parameters, custom_headers:custom_headers).value!
58
+ end
59
+
60
+ #
61
+ # Create or update a key vault in the specified subscription.
62
+ #
63
+ # @param resource_group_name [String] The name of the Resource Group to which
64
+ # the server belongs.
65
+ # @param vault_name [String] Name of the vault
66
+ # @param parameters [VaultCreateOrUpdateParameters] Parameters to create or
67
+ # update the vault
68
+ # @param [Hash{String => String}] A hash of custom headers that will be added
69
+ # to the HTTP request.
70
+ #
71
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
54
72
  #
55
73
  def create_or_update_async(resource_group_name, vault_name, parameters, custom_headers:nil)
56
- # Send request
57
- promise = begin_create_or_update_async(resource_group_name, vault_name, parameters, custom_headers:custom_headers)
74
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
75
+ fail ArgumentError, 'vault_name is nil' if vault_name.nil?
76
+ fail ArgumentError, "'vault_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]{3,24}$'" if !vault_name.nil? && vault_name.match(Regexp.new('^^[a-zA-Z0-9-]{3,24}$$')).nil?
77
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
78
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
79
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
58
80
 
59
- promise = promise.then do |response|
60
- # Defining deserialization method.
61
- deserialize_method = lambda do |parsed_response|
62
- result_mapper = Azure::KeyVault::Mgmt::V2016_10_01::Models::Vault.mapper()
63
- parsed_response = @client.deserialize(result_mapper, parsed_response)
81
+
82
+ request_headers = {}
83
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
84
+
85
+ # Set Headers
86
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
87
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
88
+
89
+ # Serialize Request
90
+ request_mapper = Azure::KeyVault::Mgmt::V2016_10_01::Models::VaultCreateOrUpdateParameters.mapper()
91
+ request_content = @client.serialize(request_mapper, parameters)
92
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
93
+
94
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'
95
+
96
+ request_url = @base_url || @client.base_url
97
+
98
+ options = {
99
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
100
+ path_params: {'resourceGroupName' => resource_group_name,'vaultName' => vault_name,'subscriptionId' => @client.subscription_id},
101
+ query_params: {'api-version' => @client.api_version},
102
+ body: request_content,
103
+ headers: request_headers.merge(custom_headers || {}),
104
+ base_url: request_url
105
+ }
106
+ promise = @client.make_request_async(:put, path_template, options)
107
+
108
+ promise = promise.then do |result|
109
+ http_response = result.response
110
+ status_code = http_response.status
111
+ response_content = http_response.body
112
+ unless status_code == 201 || status_code == 200
113
+ error_model = JSON.load(response_content)
114
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
64
115
  end
65
116
 
66
- # Waiting for response.
67
- @client.get_long_running_operation_result(response, deserialize_method)
117
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
118
+ # Deserialize Response
119
+ if status_code == 201
120
+ begin
121
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
122
+ result_mapper = Azure::KeyVault::Mgmt::V2016_10_01::Models::Vault.mapper()
123
+ result.body = @client.deserialize(result_mapper, parsed_response)
124
+ rescue Exception => e
125
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
126
+ end
127
+ end
128
+ # Deserialize Response
129
+ if status_code == 200
130
+ begin
131
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
132
+ result_mapper = Azure::KeyVault::Mgmt::V2016_10_01::Models::Vault.mapper()
133
+ result.body = @client.deserialize(result_mapper, parsed_response)
134
+ rescue Exception => e
135
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
136
+ end
137
+ end
138
+
139
+ result
68
140
  end
69
141
 
70
- promise
142
+ promise.execute
71
143
  end
72
144
 
73
145
  #
@@ -1084,126 +1156,6 @@ module Azure::KeyVault::Mgmt::V2016_10_01
1084
1156
  promise.execute
1085
1157
  end
1086
1158
 
1087
- #
1088
- # Create or update a key vault in the specified subscription.
1089
- #
1090
- # @param resource_group_name [String] The name of the Resource Group to which
1091
- # the server belongs.
1092
- # @param vault_name [String] Name of the vault
1093
- # @param parameters [VaultCreateOrUpdateParameters] Parameters to create or
1094
- # update the vault
1095
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1096
- # will be added to the HTTP request.
1097
- #
1098
- # @return [Vault] operation results.
1099
- #
1100
- def begin_create_or_update(resource_group_name, vault_name, parameters, custom_headers:nil)
1101
- response = begin_create_or_update_async(resource_group_name, vault_name, parameters, custom_headers:custom_headers).value!
1102
- response.body unless response.nil?
1103
- end
1104
-
1105
- #
1106
- # Create or update a key vault in the specified subscription.
1107
- #
1108
- # @param resource_group_name [String] The name of the Resource Group to which
1109
- # the server belongs.
1110
- # @param vault_name [String] Name of the vault
1111
- # @param parameters [VaultCreateOrUpdateParameters] Parameters to create or
1112
- # update the vault
1113
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1114
- # will be added to the HTTP request.
1115
- #
1116
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1117
- #
1118
- def begin_create_or_update_with_http_info(resource_group_name, vault_name, parameters, custom_headers:nil)
1119
- begin_create_or_update_async(resource_group_name, vault_name, parameters, custom_headers:custom_headers).value!
1120
- end
1121
-
1122
- #
1123
- # Create or update a key vault in the specified subscription.
1124
- #
1125
- # @param resource_group_name [String] The name of the Resource Group to which
1126
- # the server belongs.
1127
- # @param vault_name [String] Name of the vault
1128
- # @param parameters [VaultCreateOrUpdateParameters] Parameters to create or
1129
- # update the vault
1130
- # @param [Hash{String => String}] A hash of custom headers that will be added
1131
- # to the HTTP request.
1132
- #
1133
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1134
- #
1135
- def begin_create_or_update_async(resource_group_name, vault_name, parameters, custom_headers:nil)
1136
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1137
- fail ArgumentError, 'vault_name is nil' if vault_name.nil?
1138
- fail ArgumentError, "'vault_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]{3,24}$'" if !vault_name.nil? && vault_name.match(Regexp.new('^^[a-zA-Z0-9-]{3,24}$$')).nil?
1139
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1140
- fail ArgumentError, 'parameters is nil' if parameters.nil?
1141
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1142
-
1143
-
1144
- request_headers = {}
1145
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
1146
-
1147
- # Set Headers
1148
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1149
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1150
-
1151
- # Serialize Request
1152
- request_mapper = Azure::KeyVault::Mgmt::V2016_10_01::Models::VaultCreateOrUpdateParameters.mapper()
1153
- request_content = @client.serialize(request_mapper, parameters)
1154
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1155
-
1156
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'
1157
-
1158
- request_url = @base_url || @client.base_url
1159
-
1160
- options = {
1161
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1162
- path_params: {'resourceGroupName' => resource_group_name,'vaultName' => vault_name,'subscriptionId' => @client.subscription_id},
1163
- query_params: {'api-version' => @client.api_version},
1164
- body: request_content,
1165
- headers: request_headers.merge(custom_headers || {}),
1166
- base_url: request_url
1167
- }
1168
- promise = @client.make_request_async(:put, path_template, options)
1169
-
1170
- promise = promise.then do |result|
1171
- http_response = result.response
1172
- status_code = http_response.status
1173
- response_content = http_response.body
1174
- unless status_code == 201 || status_code == 200
1175
- error_model = JSON.load(response_content)
1176
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1177
- end
1178
-
1179
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1180
- # Deserialize Response
1181
- if status_code == 201
1182
- begin
1183
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1184
- result_mapper = Azure::KeyVault::Mgmt::V2016_10_01::Models::Vault.mapper()
1185
- result.body = @client.deserialize(result_mapper, parsed_response)
1186
- rescue Exception => e
1187
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1188
- end
1189
- end
1190
- # Deserialize Response
1191
- if status_code == 200
1192
- begin
1193
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1194
- result_mapper = Azure::KeyVault::Mgmt::V2016_10_01::Models::Vault.mapper()
1195
- result.body = @client.deserialize(result_mapper, parsed_response)
1196
- rescue Exception => e
1197
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1198
- end
1199
- end
1200
-
1201
- result
1202
- end
1203
-
1204
- promise.execute
1205
- end
1206
-
1207
1159
  #
1208
1160
  # Permanently deletes the specified vault. aka Purges the deleted Azure key
1209
1161
  # vault.
@@ -0,0 +1,65 @@
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-02-14/generated/azure_mgmt_key_vault/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::KeyVault::Mgmt::V2018_02_14
23
+ autoload :Vaults, '2018-02-14/generated/azure_mgmt_key_vault/vaults.rb'
24
+ autoload :Operations, '2018-02-14/generated/azure_mgmt_key_vault/operations.rb'
25
+ autoload :KeyVaultManagementClient, '2018-02-14/generated/azure_mgmt_key_vault/key_vault_management_client.rb'
26
+
27
+ module Models
28
+ autoload :VaultAccessPolicyParameters, '2018-02-14/generated/azure_mgmt_key_vault/models/vault_access_policy_parameters.rb'
29
+ autoload :Permissions, '2018-02-14/generated/azure_mgmt_key_vault/models/permissions.rb'
30
+ autoload :DeletedVault, '2018-02-14/generated/azure_mgmt_key_vault/models/deleted_vault.rb'
31
+ autoload :IPRule, '2018-02-14/generated/azure_mgmt_key_vault/models/iprule.rb'
32
+ autoload :VaultListResult, '2018-02-14/generated/azure_mgmt_key_vault/models/vault_list_result.rb'
33
+ autoload :NetworkRuleSet, '2018-02-14/generated/azure_mgmt_key_vault/models/network_rule_set.rb'
34
+ autoload :DeletedVaultListResult, '2018-02-14/generated/azure_mgmt_key_vault/models/deleted_vault_list_result.rb'
35
+ autoload :VaultPatchProperties, '2018-02-14/generated/azure_mgmt_key_vault/models/vault_patch_properties.rb'
36
+ autoload :Resource, '2018-02-14/generated/azure_mgmt_key_vault/models/resource.rb'
37
+ autoload :DeletedVaultProperties, '2018-02-14/generated/azure_mgmt_key_vault/models/deleted_vault_properties.rb'
38
+ autoload :ResourceListResult, '2018-02-14/generated/azure_mgmt_key_vault/models/resource_list_result.rb'
39
+ autoload :VaultPatchParameters, '2018-02-14/generated/azure_mgmt_key_vault/models/vault_patch_parameters.rb'
40
+ autoload :VaultCheckNameAvailabilityParameters, '2018-02-14/generated/azure_mgmt_key_vault/models/vault_check_name_availability_parameters.rb'
41
+ autoload :AccessPolicyEntry, '2018-02-14/generated/azure_mgmt_key_vault/models/access_policy_entry.rb'
42
+ autoload :CheckNameAvailabilityResult, '2018-02-14/generated/azure_mgmt_key_vault/models/check_name_availability_result.rb'
43
+ autoload :VaultProperties, '2018-02-14/generated/azure_mgmt_key_vault/models/vault_properties.rb'
44
+ autoload :OperationDisplay, '2018-02-14/generated/azure_mgmt_key_vault/models/operation_display.rb'
45
+ autoload :VaultCreateOrUpdateParameters, '2018-02-14/generated/azure_mgmt_key_vault/models/vault_create_or_update_parameters.rb'
46
+ autoload :LogSpecification, '2018-02-14/generated/azure_mgmt_key_vault/models/log_specification.rb'
47
+ autoload :VirtualNetworkRule, '2018-02-14/generated/azure_mgmt_key_vault/models/virtual_network_rule.rb'
48
+ autoload :ServiceSpecification, '2018-02-14/generated/azure_mgmt_key_vault/models/service_specification.rb'
49
+ autoload :Sku, '2018-02-14/generated/azure_mgmt_key_vault/models/sku.rb'
50
+ autoload :Operation, '2018-02-14/generated/azure_mgmt_key_vault/models/operation.rb'
51
+ autoload :VaultAccessPolicyProperties, '2018-02-14/generated/azure_mgmt_key_vault/models/vault_access_policy_properties.rb'
52
+ autoload :OperationListResult, '2018-02-14/generated/azure_mgmt_key_vault/models/operation_list_result.rb'
53
+ autoload :Vault, '2018-02-14/generated/azure_mgmt_key_vault/models/vault.rb'
54
+ autoload :SkuName, '2018-02-14/generated/azure_mgmt_key_vault/models/sku_name.rb'
55
+ autoload :KeyPermissions, '2018-02-14/generated/azure_mgmt_key_vault/models/key_permissions.rb'
56
+ autoload :SecretPermissions, '2018-02-14/generated/azure_mgmt_key_vault/models/secret_permissions.rb'
57
+ autoload :CertificatePermissions, '2018-02-14/generated/azure_mgmt_key_vault/models/certificate_permissions.rb'
58
+ autoload :StoragePermissions, '2018-02-14/generated/azure_mgmt_key_vault/models/storage_permissions.rb'
59
+ autoload :CreateMode, '2018-02-14/generated/azure_mgmt_key_vault/models/create_mode.rb'
60
+ autoload :NetworkRuleBypassOptions, '2018-02-14/generated/azure_mgmt_key_vault/models/network_rule_bypass_options.rb'
61
+ autoload :NetworkRuleAction, '2018-02-14/generated/azure_mgmt_key_vault/models/network_rule_action.rb'
62
+ autoload :Reason, '2018-02-14/generated/azure_mgmt_key_vault/models/reason.rb'
63
+ autoload :AccessPolicyUpdateKind, '2018-02-14/generated/azure_mgmt_key_vault/models/access_policy_update_kind.rb'
64
+ end
65
+ end