azure_mgmt_key_vault 0.8.0 → 0.9.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bedb04704ca6af5533248ff106b4392238801822
4
- data.tar.gz: fc32f8d77685c86e7fdf5ca6950355a220f59cb8
3
+ metadata.gz: af0d39cdeffc76ef1f81c9d04a3b579deb6d8073
4
+ data.tar.gz: 7ebbf3bf4bad7be7d5c2e3883aeaf293b02db417
5
5
  SHA512:
6
- metadata.gz: 261b5a1a67e31e1d0dfb47c8ba4e5981d1d16d12a49055db6619de1729be1e7eb13c993efeeb3713c26025e90758ed342438df553f2a3902598d0e1a3116ce53
7
- data.tar.gz: 1fe19732c235b2c21a517a6151e1550d9814a1e6ebb49b31eaa02da909782e579af0a73027d9be0d710fe02b94b805b9e22846c59a28eb6dc5ee221f212b192b
6
+ metadata.gz: c6ba03ab733c174cbc5db7dd97387f72c394165a5fd2627db851c8557b6e960b95d590e6076c3316a17eee60ce3d2cc42e5a3eda73b6f6477092f15070b99989
7
+ data.tar.gz: a393173e14b8f0102826225e18d345500e64432bd22e29733a9453499e70fba5a2556dd7b73b2b7bcda7be5702a7c48e4d0cbdbcf20994c271a7bde4f4956b49
@@ -27,9 +27,10 @@ module Azure::ARM::KeyVault
27
27
  autoload :VaultCreateOrUpdateParameters, 'generated/azure_mgmt_key_vault/models/vault_create_or_update_parameters.rb'
28
28
  autoload :Sku, 'generated/azure_mgmt_key_vault/models/sku.rb'
29
29
  autoload :AccessPolicyEntry, 'generated/azure_mgmt_key_vault/models/access_policy_entry.rb'
30
- autoload :VaultProperties, 'generated/azure_mgmt_key_vault/models/vault_properties.rb'
31
30
  autoload :VaultListResult, 'generated/azure_mgmt_key_vault/models/vault_list_result.rb'
32
31
  autoload :Permissions, 'generated/azure_mgmt_key_vault/models/permissions.rb'
32
+ autoload :VaultProperties, 'generated/azure_mgmt_key_vault/models/vault_properties.rb'
33
+ autoload :ResourceListResult, 'generated/azure_mgmt_key_vault/models/resource_list_result.rb'
33
34
  autoload :Vault, 'generated/azure_mgmt_key_vault/models/vault.rb'
34
35
  autoload :SkuName, 'generated/azure_mgmt_key_vault/models/sku_name.rb'
35
36
  autoload :KeyPermissions, 'generated/azure_mgmt_key_vault/models/key_permissions.rb'
@@ -45,12 +45,11 @@ module Azure::ARM::KeyVault
45
45
  # @param base_url [String] the base URI of the service.
46
46
  # @param options [Array] filters to be applied to the HTTP requests.
47
47
  #
48
- def initialize(credentials, base_url = nil, options = nil)
48
+ def initialize(credentials = nil, base_url = nil, options = nil)
49
49
  super(credentials, options)
50
50
  @base_url = base_url || 'https://management.azure.com'
51
51
 
52
- fail ArgumentError, 'credentials is nil' if credentials.nil?
53
- fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
52
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
54
53
  @credentials = credentials
55
54
 
56
55
  @vaults = Vaults.new(self)
@@ -63,7 +62,7 @@ module Azure::ARM::KeyVault
63
62
 
64
63
  #
65
64
  # Makes a request and returns the body of the response.
66
- # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
65
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
67
66
  # @param path [String] the path, relative to {base_url}.
68
67
  # @param options [Hash{String=>String}] specifying any request options like :body.
69
68
  # @return [Hash{String=>String}] containing the body of the response.
@@ -124,7 +123,7 @@ module Azure::ARM::KeyVault
124
123
  def add_telemetry
125
124
  sdk_information = 'azure_mgmt_key_vault'
126
125
  if defined? Azure::ARM::KeyVault::VERSION
127
- sdk_information = "#{sdk_information}/#{Azure::ARM::KeyVault::VERSION}"
126
+ sdk_information = "#{sdk_information}/#{Azure::ARM::KeyVault::VERSION}"
128
127
  end
129
128
  add_user_agent_information(sdk_information)
130
129
  end
@@ -17,9 +17,9 @@ module Azure::ARM::KeyVault
17
17
  # authenticating requests to the key vault.
18
18
  attr_accessor :tenant_id
19
19
 
20
- # @return The object ID of a user, service principal or security group in
21
- # the Azure Active Directory tenant for the vault. The object ID must be
22
- # unique for the list of access policies.
20
+ # @return [String] The object ID of a user, service principal or security
21
+ # group in the Azure Active Directory tenant for the vault. The object ID
22
+ # must be unique for the list of access policies.
23
23
  attr_accessor :object_id
24
24
 
25
25
  # @return Application ID of the client making request on behalf of a
@@ -0,0 +1,93 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::KeyVault
7
+ module Models
8
+ #
9
+ # List of vault resources.
10
+ #
11
+ class ResourceListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<Resource>] Gets the list of vault resources.
16
+ attr_accessor :value
17
+
18
+ # @return [String] Gets the URL to get the next set of vault resources.
19
+ attr_accessor :next_link
20
+
21
+ # return [Proc] with next page method call.
22
+ attr_accessor :next_method
23
+
24
+ #
25
+ # Gets the rest of the items for the request, enabling auto-pagination.
26
+ #
27
+ # @return [Array<Resource>] operation results.
28
+ #
29
+ def get_all_items
30
+ items = @value
31
+ page = self
32
+ while page.next_link != nil do
33
+ page = page.get_next_page
34
+ items.concat(page.value)
35
+ end
36
+ items
37
+ end
38
+
39
+ #
40
+ # Gets the next page of results.
41
+ #
42
+ # @return [ResourceListResult] with next page content.
43
+ #
44
+ def get_next_page
45
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
46
+ unless response.nil?
47
+ @next_link = response.body.next_link
48
+ @value = response.body.value
49
+ self
50
+ end
51
+ end
52
+
53
+ #
54
+ # Mapper for ResourceListResult class as Ruby Hash.
55
+ # This will be used for serialization/deserialization.
56
+ #
57
+ def self.mapper()
58
+ {
59
+ required: false,
60
+ serialized_name: 'ResourceListResult',
61
+ type: {
62
+ name: 'Composite',
63
+ class_name: 'ResourceListResult',
64
+ model_properties: {
65
+ value: {
66
+ required: false,
67
+ serialized_name: 'value',
68
+ type: {
69
+ name: 'Sequence',
70
+ element: {
71
+ required: false,
72
+ serialized_name: 'ResourceElementType',
73
+ type: {
74
+ name: 'Composite',
75
+ class_name: 'Resource'
76
+ }
77
+ }
78
+ }
79
+ },
80
+ next_link: {
81
+ required: false,
82
+ serialized_name: 'nextLink',
83
+ type: {
84
+ name: 'String'
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ end
91
+ end
92
+ end
93
+ end
@@ -424,7 +424,7 @@ module Azure::ARM::KeyVault
424
424
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
425
425
  # will be added to the HTTP request.
426
426
  #
427
- # @return [Array<Vault>] operation results.
427
+ # @return [Array<Resource>] operation results.
428
428
  #
429
429
  def list(top = nil, custom_headers = nil)
430
430
  first_page = list_as_lazy(top, custom_headers)
@@ -493,7 +493,7 @@ module Azure::ARM::KeyVault
493
493
  if status_code == 200
494
494
  begin
495
495
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
496
- result_mapper = VaultListResult.mapper()
496
+ result_mapper = ResourceListResult.mapper()
497
497
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
498
498
  rescue Exception => e
499
499
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -605,7 +605,7 @@ module Azure::ARM::KeyVault
605
605
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
606
606
  # will be added to the HTTP request.
607
607
  #
608
- # @return [VaultListResult] operation results.
608
+ # @return [ResourceListResult] operation results.
609
609
  #
610
610
  def list_next(next_page_link, custom_headers = nil)
611
611
  response = list_next_async(next_page_link, custom_headers).value!
@@ -673,7 +673,7 @@ module Azure::ARM::KeyVault
673
673
  if status_code == 200
674
674
  begin
675
675
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
676
- result_mapper = VaultListResult.mapper()
676
+ result_mapper = ResourceListResult.mapper()
677
677
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
678
678
  rescue Exception => e
679
679
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -717,7 +717,8 @@ module Azure::ARM::KeyVault
717
717
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
718
718
  # will be added to the HTTP request.
719
719
  #
720
- # @return [VaultListResult] which provide lazy access to pages of the response.
720
+ # @return [ResourceListResult] which provide lazy access to pages of the
721
+ # response.
721
722
  #
722
723
  def list_as_lazy(top = nil, custom_headers = nil)
723
724
  response = list_async(top, custom_headers).value!
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::KeyVault
7
- VERSION = '0.8.0'
7
+ VERSION = '0.9.0'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_key_vault
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-16 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.6.2
75
+ version: 0.7.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.6.2
82
+ version: 0.7.0
83
83
  description: Microsoft Azure Resource Management Key Vault Client Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []
@@ -94,6 +94,7 @@ files:
94
94
  - lib/generated/azure_mgmt_key_vault/models/certificate_permissions.rb
95
95
  - lib/generated/azure_mgmt_key_vault/models/key_permissions.rb
96
96
  - lib/generated/azure_mgmt_key_vault/models/permissions.rb
97
+ - lib/generated/azure_mgmt_key_vault/models/resource_list_result.rb
97
98
  - lib/generated/azure_mgmt_key_vault/models/secret_permissions.rb
98
99
  - lib/generated/azure_mgmt_key_vault/models/sku.rb
99
100
  - lib/generated/azure_mgmt_key_vault/models/sku_name.rb