azure_mgmt_key_vault 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9cef0f115b0cb54b6cd5b896e08c64cb4df002bb
4
+ data.tar.gz: 2495aa4730f561d1fe53cc0a6c52444844ae9c74
5
+ SHA512:
6
+ metadata.gz: ae2ea36579308fb0ab19094e0a873032d2d33a06f888c9ea4351f8e6b888cfa4b2d68c3474742342976b3e3f3d5869fda4be1bd5df1a3cbe6746c329f17a8a75
7
+ data.tar.gz: 08fd7e055810e4dbda2ddb2b5b3f5c7d222b944181f6d3910ac1d0e0119ee830e293535884e7e2f8d506eb6a18784d6664708fb10620c8ffcc3f6888c8b47f04
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --require spec_helper
2
+ --color
3
+ --format documentation
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require "bundler/gem_tasks"
@@ -0,0 +1,34 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ lib = File.expand_path('../lib', __FILE__)
6
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
+
8
+ require 'generated/azure_mgmt_key_vault/module_definition'
9
+ require 'generated/azure_mgmt_key_vault/version'
10
+
11
+ Gem::Specification.new do |spec|
12
+ spec.name = 'azure_mgmt_key_vault'
13
+ spec.version = Azure::ARM::KeyVault::VERSION
14
+ spec.authors = 'Microsoft Corporation'
15
+ spec.email = 'azrubyteam@microsoft.com'
16
+ spec.description = 'Microsoft Azure Resource Management Key Vault Client Library for Ruby'
17
+ spec.summary = 'Official Ruby client library to consume Microsoft Azure Resource Management Key Vault services.'
18
+ spec.homepage = 'https://aka.ms/azure-sdk-for-ruby'
19
+ spec.license = 'MIT'
20
+
21
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ spec.bindir = 'bin'
23
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ['lib']
25
+
26
+ spec.required_ruby_version = '>= 1.9.3'
27
+
28
+ spec.add_development_dependency 'bundler', '~> 1.9'
29
+ spec.add_development_dependency 'rake', '~> 10'
30
+ spec.add_development_dependency 'rspec', '~> 3'
31
+ spec.add_development_dependency 'dotenv', '~> 2'
32
+
33
+ spec.add_runtime_dependency 'ms_rest_azure', '~> 0.3.0'
34
+ end
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require 'generated/azure_mgmt_key_vault'
@@ -0,0 +1,37 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
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 'generated/azure_mgmt_key_vault/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ARM::KeyVault
23
+ autoload :Vaults, 'generated/azure_mgmt_key_vault/vaults.rb'
24
+ autoload :KeyVaultManagementClient, 'generated/azure_mgmt_key_vault/key_vault_management_client.rb'
25
+
26
+ module Models
27
+ autoload :Sku, 'generated/azure_mgmt_key_vault/models/sku.rb'
28
+ autoload :AccessPolicyEntry, 'generated/azure_mgmt_key_vault/models/access_policy_entry.rb'
29
+ autoload :Permissions, 'generated/azure_mgmt_key_vault/models/permissions.rb'
30
+ autoload :VaultProperties, 'generated/azure_mgmt_key_vault/models/vault_properties.rb'
31
+ autoload :VaultCreateOrUpdateParameters, 'generated/azure_mgmt_key_vault/models/vault_create_or_update_parameters.rb'
32
+ autoload :VaultListResult, 'generated/azure_mgmt_key_vault/models/vault_list_result.rb'
33
+ autoload :Vault, 'generated/azure_mgmt_key_vault/models/vault.rb'
34
+ autoload :SkuFamily, 'generated/azure_mgmt_key_vault/models/sku_family.rb'
35
+ autoload :SkuName, 'generated/azure_mgmt_key_vault/models/sku_name.rb'
36
+ end
37
+ end
@@ -0,0 +1,68 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class KeyVaultManagementClient < MsRestAzure::AzureServiceClient
11
+ include MsRest::Serialization
12
+ include MsRestAzure
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Gets subscription credentials which uniquely identify
21
+ # Microsoft Azure subscription. The subscription ID forms part of the URI
22
+ # for every service call.
23
+ attr_accessor :subscription_id
24
+
25
+ # @return [String] Client Api Version.
26
+ attr_reader :api_version
27
+
28
+ # @return [String] Gets or sets the preferred language for the response.
29
+ attr_accessor :accept_language
30
+
31
+ # @return [Integer] Gets or sets the retry timeout in seconds for Long
32
+ # Running Operations. Default value is 30.
33
+ attr_accessor :long_running_operation_retry_timeout
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.
37
+ attr_accessor :generate_client_request_id
38
+
39
+ # @return Subscription credentials which uniquely identify client
40
+ # subscription.
41
+ attr_accessor :credentials
42
+
43
+ # @return [Vaults] vaults
44
+ attr_reader :vaults
45
+
46
+ #
47
+ # Creates initializes a new instance of the KeyVaultManagementClient class.
48
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
49
+ # @param base_url [String] the base URI of the service.
50
+ # @param options [Array] filters to be applied to the HTTP requests.
51
+ #
52
+ def initialize(credentials, base_url = nil, options = nil)
53
+ super(credentials, options)
54
+ @base_url = base_url || 'https://management.azure.com'
55
+
56
+ fail ArgumentError, 'credentials is nil' if credentials.nil?
57
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
58
+ @credentials = credentials
59
+
60
+ @vaults = Vaults.new(self)
61
+ @api_version = '2015-06-01'
62
+ @accept_language = 'en-US'
63
+ @long_running_operation_retry_timeout = 30
64
+ @generate_client_request_id = true
65
+ end
66
+
67
+ end
68
+ end
@@ -0,0 +1,80 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # An array of 0 to 16 identities that have access to the key vault. All
10
+ # identities in the array must use the same tenant ID as the key vault's
11
+ # tenant ID.
12
+ #
13
+ class AccessPolicyEntry
14
+
15
+ include MsRestAzure
16
+
17
+ # @return The Azure Active Directory tenant ID that should be used for
18
+ # authenticating requests to the key vault.
19
+ attr_accessor :tenant_id
20
+
21
+ # @return The object ID of a user or service principal in the Azure
22
+ # Active Directory tenant for the vault.
23
+ attr_accessor :object_id
24
+
25
+ # @return Application ID of the client making request on behalf of a
26
+ # principal
27
+ attr_accessor :application_id
28
+
29
+ # @return [Permissions] Permissions the identity has for keys and secrets
30
+ attr_accessor :permissions
31
+
32
+
33
+ #
34
+ # Mapper for AccessPolicyEntry class as Ruby Hash.
35
+ # This will be used for serialization/deserialization.
36
+ #
37
+ def self.mapper()
38
+ {
39
+ required: false,
40
+ serialized_name: 'AccessPolicyEntry',
41
+ type: {
42
+ name: 'Composite',
43
+ class_name: 'AccessPolicyEntry',
44
+ model_properties: {
45
+ tenant_id: {
46
+ required: false,
47
+ serialized_name: 'tenantId',
48
+ type: {
49
+ name: 'String'
50
+ }
51
+ },
52
+ object_id: {
53
+ required: false,
54
+ serialized_name: 'objectId',
55
+ type: {
56
+ name: 'String'
57
+ }
58
+ },
59
+ application_id: {
60
+ required: false,
61
+ serialized_name: 'applicationId',
62
+ type: {
63
+ name: 'String'
64
+ }
65
+ },
66
+ permissions: {
67
+ required: false,
68
+ serialized_name: 'permissions',
69
+ type: {
70
+ name: 'Composite',
71
+ class_name: 'Permissions'
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,68 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # Permissions the identity has for keys and secrets
10
+ #
11
+ class Permissions
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<String>] Permissions to keys
16
+ attr_accessor :keys
17
+
18
+ # @return [Array<String>] Permissions to secrets
19
+ attr_accessor :secrets
20
+
21
+
22
+ #
23
+ # Mapper for Permissions class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ required: false,
29
+ serialized_name: 'Permissions',
30
+ type: {
31
+ name: 'Composite',
32
+ class_name: 'Permissions',
33
+ model_properties: {
34
+ keys: {
35
+ required: false,
36
+ serialized_name: 'keys',
37
+ type: {
38
+ name: 'Sequence',
39
+ element: {
40
+ required: false,
41
+ serialized_name: 'StringElementType',
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ }
46
+ }
47
+ },
48
+ secrets: {
49
+ required: false,
50
+ serialized_name: 'secrets',
51
+ type: {
52
+ name: 'Sequence',
53
+ element: {
54
+ required: false,
55
+ serialized_name: 'StringElementType',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,57 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # SKU details
10
+ #
11
+ class Sku
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [SkuFamily] SKU family name. Possible values include: 'A'
16
+ attr_accessor :family
17
+
18
+ # @return [SkuName] SKU name to specify whether the key vault is a
19
+ # standard vault or a premium vault. Possible values include:
20
+ # 'standard', 'premium'
21
+ attr_accessor :name
22
+
23
+
24
+ #
25
+ # Mapper for Sku class as Ruby Hash.
26
+ # This will be used for serialization/deserialization.
27
+ #
28
+ def self.mapper()
29
+ {
30
+ required: false,
31
+ serialized_name: 'Sku',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'Sku',
35
+ model_properties: {
36
+ family: {
37
+ required: false,
38
+ serialized_name: 'family',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ name: {
44
+ required: true,
45
+ serialized_name: 'name',
46
+ type: {
47
+ name: 'Enum',
48
+ module: 'SkuName'
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # Defines values for SkuFamily
10
+ #
11
+ module SkuFamily
12
+ A = "A"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # Defines values for SkuName
10
+ #
11
+ module SkuName
12
+ Standard = "standard"
13
+ Premium = "premium"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,89 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # Resource information with extended details.
10
+ #
11
+ class Vault < MsRestAzure::Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [VaultProperties] Properties of the vault
16
+ attr_accessor :properties
17
+
18
+
19
+ #
20
+ # Mapper for Vault class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ required: false,
26
+ serialized_name: 'Vault',
27
+ type: {
28
+ name: 'Composite',
29
+ class_name: 'Vault',
30
+ model_properties: {
31
+ id: {
32
+ required: false,
33
+ read_only: true,
34
+ serialized_name: 'id',
35
+ type: {
36
+ name: 'String'
37
+ }
38
+ },
39
+ name: {
40
+ required: true,
41
+ serialized_name: 'name',
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ },
46
+ type: {
47
+ required: false,
48
+ read_only: true,
49
+ serialized_name: 'type',
50
+ type: {
51
+ name: 'String'
52
+ }
53
+ },
54
+ location: {
55
+ required: true,
56
+ serialized_name: 'location',
57
+ type: {
58
+ name: 'String'
59
+ }
60
+ },
61
+ tags: {
62
+ required: false,
63
+ serialized_name: 'tags',
64
+ type: {
65
+ name: 'Dictionary',
66
+ value: {
67
+ required: false,
68
+ serialized_name: 'StringElementType',
69
+ type: {
70
+ name: 'String'
71
+ }
72
+ }
73
+ }
74
+ },
75
+ properties: {
76
+ required: true,
77
+ serialized_name: 'properties',
78
+ type: {
79
+ name: 'Composite',
80
+ class_name: 'VaultProperties'
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ end
87
+ end
88
+ end
89
+ end