azure_mgmt_key_vault 0.17.1 → 0.17.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/2015-06-01/generated/azure_mgmt_key_vault/key_vault_management_client.rb +1 -1
- data/lib/2015-06-01/generated/azure_mgmt_key_vault/models/resource_list_result.rb +1 -1
- data/lib/2015-06-01/generated/azure_mgmt_key_vault/models/vault_list_result.rb +1 -1
- data/lib/2015-06-01/generated/azure_mgmt_key_vault/vaults.rb +14 -0
- data/lib/2016-10-01/generated/azure_mgmt_key_vault/key_vault_management_client.rb +1 -1
- data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/deleted_vault_list_result.rb +1 -1
- data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/operation_list_result.rb +1 -1
- data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/resource_list_result.rb +1 -1
- data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/vault_list_result.rb +1 -1
- data/lib/2016-10-01/generated/azure_mgmt_key_vault/operations.rb +4 -0
- data/lib/2016-10-01/generated/azure_mgmt_key_vault/vaults.rb +32 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault.rb +74 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/key_vault_management_client.rb +141 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/access_policy_entry.rb +86 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/access_policy_update_kind.rb +17 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/attributes.rb +92 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/certificate_permissions.rb +30 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/check_name_availability_result.rb +77 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/create_mode.rb +16 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/deleted_vault.rb +83 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/deleted_vault_list_result.rb +98 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/deleted_vault_properties.rb +103 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/iprule.rb +49 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/key_permissions.rb +30 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/log_specification.rb +68 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/network_rule_action.rb +16 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/network_rule_bypass_options.rb +16 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/network_rule_set.rb +103 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/operation.rb +83 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/operation_display.rb +79 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/operation_list_result.rb +100 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/permissions.rb +111 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/reason.rb +16 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/resource.rb +113 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/resource_list_result.rb +98 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/secret.rb +98 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/secret_attributes.rb +77 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/secret_create_or_update_parameters.rb +67 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/secret_list_result.rb +98 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/secret_patch_parameters.rb +67 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/secret_patch_properties.rb +69 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/secret_permissions.rb +22 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/secret_properties.rb +97 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/service_specification.rb +55 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/sku.rb +62 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/sku_name.rb +16 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/storage_permissions.rb +28 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/vault.rb +99 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/vault_access_policy_parameters.rb +95 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/vault_access_policy_properties.rb +57 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/vault_check_name_availability_parameters.rb +60 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/vault_create_or_update_parameters.rb +80 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/vault_list_result.rb +98 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/vault_patch_parameters.rb +67 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/vault_patch_properties.rb +175 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/vault_properties.rb +188 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/models/virtual_network_rule.rb +48 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/module_definition.rb +9 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/operations.rb +220 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/secrets.rb +624 -0
- data/lib/2018-02-14-preview/generated/azure_mgmt_key_vault/vaults.rb +1771 -0
- data/lib/2018-02-14/generated/azure_mgmt_key_vault/key_vault_management_client.rb +1 -1
- data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/deleted_vault_list_result.rb +1 -1
- data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/operation_list_result.rb +1 -1
- data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/resource_list_result.rb +1 -1
- data/lib/2018-02-14/generated/azure_mgmt_key_vault/models/vault_list_result.rb +1 -1
- data/lib/2018-02-14/generated/azure_mgmt_key_vault/operations.rb +4 -0
- data/lib/2018-02-14/generated/azure_mgmt_key_vault/vaults.rb +32 -0
- data/lib/azure_mgmt_key_vault.rb +6 -2
- data/lib/profiles/v2017_03_09/keyvault_module_definition.rb +8 -0
- data/lib/profiles/v2017_03_09/keyvault_v2017_03_09_profile_client.rb +40 -0
- data/lib/profiles/v2017_03_09/modules/keyvault_profile_module.rb +187 -0
- data/lib/profiles/v2018_03_01/keyvault_module_definition.rb +8 -0
- data/lib/profiles/v2018_03_01/keyvault_v2018_03_01_profile_client.rb +40 -0
- data/lib/profiles/v2018_03_01/modules/keyvault_profile_module.rb +187 -0
- data/lib/profiles/v2019_03_01_hybrid/keyvault_module_definition.rb +8 -0
- data/lib/profiles/v2019_03_01_hybrid/keyvault_v2019_03_01_hybrid_profile_client.rb +40 -0
- data/lib/profiles/v2019_03_01_hybrid/modules/keyvault_profile_module.rb +187 -0
- data/lib/version.rb +1 -1
- metadata +64 -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_preview
|
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_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# A rule governing the accessibility 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_preview end
|
@@ -0,0 +1,220 @@
|
|
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_preview
|
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
|
+
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::KeyVault::Mgmt::V2018_02_14_preview::Models::OperationListResult.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
|
+
#
|
110
|
+
# Lists all of the available Key Vault Rest API operations.
|
111
|
+
#
|
112
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
113
|
+
# to List operation.
|
114
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
115
|
+
# will be added to the HTTP request.
|
116
|
+
#
|
117
|
+
# @return [OperationListResult] operation results.
|
118
|
+
#
|
119
|
+
def list_next(next_page_link, custom_headers:nil)
|
120
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
121
|
+
response.body unless response.nil?
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# Lists all of the available Key Vault Rest API operations.
|
126
|
+
#
|
127
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
128
|
+
# to List operation.
|
129
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
130
|
+
# will be added to the HTTP request.
|
131
|
+
#
|
132
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
133
|
+
#
|
134
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
135
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
136
|
+
end
|
137
|
+
|
138
|
+
#
|
139
|
+
# Lists all of the available Key Vault Rest API operations.
|
140
|
+
#
|
141
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
142
|
+
# to List operation.
|
143
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
144
|
+
# to the HTTP request.
|
145
|
+
#
|
146
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
147
|
+
#
|
148
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
149
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
150
|
+
|
151
|
+
|
152
|
+
request_headers = {}
|
153
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
154
|
+
|
155
|
+
# Set Headers
|
156
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
157
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
158
|
+
path_template = '{nextLink}'
|
159
|
+
|
160
|
+
request_url = @base_url || @client.base_url
|
161
|
+
|
162
|
+
options = {
|
163
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
164
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
165
|
+
headers: request_headers.merge(custom_headers || {}),
|
166
|
+
base_url: request_url
|
167
|
+
}
|
168
|
+
promise = @client.make_request_async(:get, path_template, options)
|
169
|
+
|
170
|
+
promise = promise.then do |result|
|
171
|
+
http_response = result.response
|
172
|
+
status_code = http_response.status
|
173
|
+
response_content = http_response.body
|
174
|
+
unless status_code == 200
|
175
|
+
error_model = JSON.load(response_content)
|
176
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
177
|
+
end
|
178
|
+
|
179
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
180
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
181
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
182
|
+
# Deserialize Response
|
183
|
+
if status_code == 200
|
184
|
+
begin
|
185
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
186
|
+
result_mapper = Azure::KeyVault::Mgmt::V2018_02_14_preview::Models::OperationListResult.mapper()
|
187
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
188
|
+
rescue Exception => e
|
189
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
result
|
194
|
+
end
|
195
|
+
|
196
|
+
promise.execute
|
197
|
+
end
|
198
|
+
|
199
|
+
#
|
200
|
+
# Lists all of the available Key Vault Rest API operations.
|
201
|
+
#
|
202
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
203
|
+
# will be added to the HTTP request.
|
204
|
+
#
|
205
|
+
# @return [OperationListResult] which provide lazy access to pages of the
|
206
|
+
# response.
|
207
|
+
#
|
208
|
+
def list_as_lazy(custom_headers:nil)
|
209
|
+
response = list_async(custom_headers:custom_headers).value!
|
210
|
+
unless response.nil?
|
211
|
+
page = response.body
|
212
|
+
page.next_method = Proc.new do |next_page_link|
|
213
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
214
|
+
end
|
215
|
+
page
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
220
|
+
end
|