azure_mgmt_policy 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +5 -0
- data/azure_mgmt_policy.gemspec +34 -0
- data/lib/azure_mgmt_policy.rb +5 -0
- data/lib/generated/azure_mgmt_policy.rb +34 -0
- data/lib/generated/azure_mgmt_policy/models/policy_assignment.rb +95 -0
- data/lib/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_policy/models/policy_definition.rb +95 -0
- data/lib/generated/azure_mgmt_policy/models/policy_definition_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_policy/models/policy_type.rb +17 -0
- data/lib/generated/azure_mgmt_policy/module_definition.rb +8 -0
- data/lib/generated/azure_mgmt_policy/policy_assignments.rb +1246 -0
- data/lib/generated/azure_mgmt_policy/policy_client.rb +72 -0
- data/lib/generated/azure_mgmt_policy/policy_definitions.rb +498 -0
- data/lib/generated/azure_mgmt_policy/version.rb +8 -0
- metadata +130 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 32ffba424cf959b742005bb8b1c8a852aa86795c
|
4
|
+
data.tar.gz: 314ef92f8ca4a4f949157035f447c0d2703e7ceb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b03860becce64aa3451f6390cd81c90b453a134744988e191989c0e881361cfbee630ec8624f5110011a5d23d4beaea3ac8c36602d4e2dab8e0bd2e3c48f0457
|
7
|
+
data.tar.gz: 8739b984cbef3298d06e7e8f166109526cf91ef50fd0669cdf4920a3c3c80388120ab1a302d1bdbeb70783923eaec8f09aaa44904aa46af16e170c64ee893051
|
data/.rspec
ADDED
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,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_policy/module_definition'
|
9
|
+
require 'generated/azure_mgmt_policy/version'
|
10
|
+
|
11
|
+
Gem::Specification.new do |spec|
|
12
|
+
spec.name = 'azure_mgmt_policy'
|
13
|
+
spec.version = Azure::ARM::Policy::VERSION
|
14
|
+
spec.authors = 'Microsoft Corporation'
|
15
|
+
spec.email = 'azrubyteam@microsoft.com'
|
16
|
+
spec.description = 'Microsoft Azure Resource Policy Management Client Library for Ruby'
|
17
|
+
spec.summary = 'Official Ruby client library to consume Microsoft Azure Resource Policy Management 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,34 @@
|
|
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_policy/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::ARM::Policy
|
23
|
+
autoload :PolicyAssignments, 'generated/azure_mgmt_policy/policy_assignments.rb'
|
24
|
+
autoload :PolicyDefinitions, 'generated/azure_mgmt_policy/policy_definitions.rb'
|
25
|
+
autoload :PolicyClient, 'generated/azure_mgmt_policy/policy_client.rb'
|
26
|
+
|
27
|
+
module Models
|
28
|
+
autoload :PolicyDefinition, 'generated/azure_mgmt_policy/models/policy_definition.rb'
|
29
|
+
autoload :PolicyDefinitionListResult, 'generated/azure_mgmt_policy/models/policy_definition_list_result.rb'
|
30
|
+
autoload :PolicyAssignment, 'generated/azure_mgmt_policy/models/policy_assignment.rb'
|
31
|
+
autoload :PolicyAssignmentListResult, 'generated/azure_mgmt_policy/models/policy_assignment_list_result.rb'
|
32
|
+
autoload :PolicyType, 'generated/azure_mgmt_policy/models/policy_type.rb'
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,95 @@
|
|
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::Policy
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The policy definition.
|
10
|
+
#
|
11
|
+
class PolicyAssignment
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the policy assignment display name.
|
16
|
+
attr_accessor :display_name
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the policy definition Id.
|
19
|
+
attr_accessor :policy_definition_id
|
20
|
+
|
21
|
+
# @return [String] Gets or sets the scope at which the policy assignment
|
22
|
+
# exists.
|
23
|
+
attr_accessor :scope
|
24
|
+
|
25
|
+
# @return [String] Gets or sets the Id of the policy assignment.
|
26
|
+
attr_accessor :id
|
27
|
+
|
28
|
+
# @return [String] Gets or sets the type of the policy assignment.
|
29
|
+
attr_accessor :type
|
30
|
+
|
31
|
+
# @return [String] Gets or sets the name of the policy assignment.
|
32
|
+
attr_accessor :name
|
33
|
+
|
34
|
+
|
35
|
+
#
|
36
|
+
# Mapper for PolicyAssignment class as Ruby Hash.
|
37
|
+
# This will be used for serialization/deserialization.
|
38
|
+
#
|
39
|
+
def self.mapper()
|
40
|
+
{
|
41
|
+
required: false,
|
42
|
+
serialized_name: 'PolicyAssignment',
|
43
|
+
type: {
|
44
|
+
name: 'Composite',
|
45
|
+
class_name: 'PolicyAssignment',
|
46
|
+
model_properties: {
|
47
|
+
display_name: {
|
48
|
+
required: false,
|
49
|
+
serialized_name: 'properties.displayName',
|
50
|
+
type: {
|
51
|
+
name: 'String'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
policy_definition_id: {
|
55
|
+
required: false,
|
56
|
+
serialized_name: 'properties.policyDefinitionId',
|
57
|
+
type: {
|
58
|
+
name: 'String'
|
59
|
+
}
|
60
|
+
},
|
61
|
+
scope: {
|
62
|
+
required: false,
|
63
|
+
serialized_name: 'properties.scope',
|
64
|
+
type: {
|
65
|
+
name: 'String'
|
66
|
+
}
|
67
|
+
},
|
68
|
+
id: {
|
69
|
+
required: false,
|
70
|
+
serialized_name: 'id',
|
71
|
+
type: {
|
72
|
+
name: 'String'
|
73
|
+
}
|
74
|
+
},
|
75
|
+
type: {
|
76
|
+
required: false,
|
77
|
+
serialized_name: 'type',
|
78
|
+
type: {
|
79
|
+
name: 'String'
|
80
|
+
}
|
81
|
+
},
|
82
|
+
name: {
|
83
|
+
required: false,
|
84
|
+
serialized_name: 'name',
|
85
|
+
type: {
|
86
|
+
name: 'String'
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,94 @@
|
|
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::Policy
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# List of policy assignments.
|
10
|
+
#
|
11
|
+
class PolicyAssignmentListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<PolicyAssignment>] Gets or sets the list of policy
|
16
|
+
# assignments.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] Gets or sets the URL to get the next set of results.
|
20
|
+
attr_accessor :next_link
|
21
|
+
|
22
|
+
# return [Proc] with next page method call.
|
23
|
+
attr_accessor :next_method
|
24
|
+
|
25
|
+
#
|
26
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
27
|
+
#
|
28
|
+
# @return [Array<PolicyAssignment>] operation results.
|
29
|
+
#
|
30
|
+
def get_all_items
|
31
|
+
items = @value
|
32
|
+
page = self
|
33
|
+
while page.next_link != nil do
|
34
|
+
page = page.get_next_page
|
35
|
+
items.concat(page.value)
|
36
|
+
end
|
37
|
+
items
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Gets the next page of results.
|
42
|
+
#
|
43
|
+
# @return [PolicyAssignmentListResult] with next page content.
|
44
|
+
#
|
45
|
+
def get_next_page
|
46
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
47
|
+
unless response.nil?
|
48
|
+
@next_link = response.body.next_link
|
49
|
+
@value = response.body.value
|
50
|
+
self
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Mapper for PolicyAssignmentListResult class as Ruby Hash.
|
56
|
+
# This will be used for serialization/deserialization.
|
57
|
+
#
|
58
|
+
def self.mapper()
|
59
|
+
{
|
60
|
+
required: false,
|
61
|
+
serialized_name: 'PolicyAssignmentListResult',
|
62
|
+
type: {
|
63
|
+
name: 'Composite',
|
64
|
+
class_name: 'PolicyAssignmentListResult',
|
65
|
+
model_properties: {
|
66
|
+
value: {
|
67
|
+
required: false,
|
68
|
+
serialized_name: 'value',
|
69
|
+
type: {
|
70
|
+
name: 'Sequence',
|
71
|
+
element: {
|
72
|
+
required: false,
|
73
|
+
serialized_name: 'PolicyAssignmentElementType',
|
74
|
+
type: {
|
75
|
+
name: 'Composite',
|
76
|
+
class_name: 'PolicyAssignment'
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
},
|
81
|
+
next_link: {
|
82
|
+
required: false,
|
83
|
+
serialized_name: 'nextLink',
|
84
|
+
type: {
|
85
|
+
name: 'String'
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,95 @@
|
|
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::Policy
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The policy definition.
|
10
|
+
#
|
11
|
+
class PolicyDefinition
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [PolicyType] Gets or sets policy definition policy type.
|
16
|
+
# Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'
|
17
|
+
attr_accessor :policy_type
|
18
|
+
|
19
|
+
# @return [String] Gets or sets the policy definition display name.
|
20
|
+
attr_accessor :display_name
|
21
|
+
|
22
|
+
# @return [String] Gets or sets the policy definition description.
|
23
|
+
attr_accessor :description
|
24
|
+
|
25
|
+
# @return Gets or sets the policy rule.
|
26
|
+
attr_accessor :policy_rule
|
27
|
+
|
28
|
+
# @return [String] Gets or sets the Id of the policy definition.
|
29
|
+
attr_accessor :id
|
30
|
+
|
31
|
+
# @return [String] Gets or sets the name of the policy definition.
|
32
|
+
attr_accessor :name
|
33
|
+
|
34
|
+
|
35
|
+
#
|
36
|
+
# Mapper for PolicyDefinition class as Ruby Hash.
|
37
|
+
# This will be used for serialization/deserialization.
|
38
|
+
#
|
39
|
+
def self.mapper()
|
40
|
+
{
|
41
|
+
required: false,
|
42
|
+
serialized_name: 'PolicyDefinition',
|
43
|
+
type: {
|
44
|
+
name: 'Composite',
|
45
|
+
class_name: 'PolicyDefinition',
|
46
|
+
model_properties: {
|
47
|
+
policy_type: {
|
48
|
+
required: false,
|
49
|
+
serialized_name: 'properties.policyType',
|
50
|
+
type: {
|
51
|
+
name: 'String'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
display_name: {
|
55
|
+
required: false,
|
56
|
+
serialized_name: 'properties.displayName',
|
57
|
+
type: {
|
58
|
+
name: 'String'
|
59
|
+
}
|
60
|
+
},
|
61
|
+
description: {
|
62
|
+
required: false,
|
63
|
+
serialized_name: 'properties.description',
|
64
|
+
type: {
|
65
|
+
name: 'String'
|
66
|
+
}
|
67
|
+
},
|
68
|
+
policy_rule: {
|
69
|
+
required: false,
|
70
|
+
serialized_name: 'properties.policyRule',
|
71
|
+
type: {
|
72
|
+
name: 'Object'
|
73
|
+
}
|
74
|
+
},
|
75
|
+
id: {
|
76
|
+
required: false,
|
77
|
+
serialized_name: 'id',
|
78
|
+
type: {
|
79
|
+
name: 'String'
|
80
|
+
}
|
81
|
+
},
|
82
|
+
name: {
|
83
|
+
required: false,
|
84
|
+
serialized_name: 'name',
|
85
|
+
type: {
|
86
|
+
name: 'String'
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,94 @@
|
|
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::Policy
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# List of policy definitions.
|
10
|
+
#
|
11
|
+
class PolicyDefinitionListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<PolicyDefinition>] Gets or sets the list of policy
|
16
|
+
# definitions.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] Gets or sets the URL to get the next set of results.
|
20
|
+
attr_accessor :next_link
|
21
|
+
|
22
|
+
# return [Proc] with next page method call.
|
23
|
+
attr_accessor :next_method
|
24
|
+
|
25
|
+
#
|
26
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
27
|
+
#
|
28
|
+
# @return [Array<PolicyDefinition>] operation results.
|
29
|
+
#
|
30
|
+
def get_all_items
|
31
|
+
items = @value
|
32
|
+
page = self
|
33
|
+
while page.next_link != nil do
|
34
|
+
page = page.get_next_page
|
35
|
+
items.concat(page.value)
|
36
|
+
end
|
37
|
+
items
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Gets the next page of results.
|
42
|
+
#
|
43
|
+
# @return [PolicyDefinitionListResult] with next page content.
|
44
|
+
#
|
45
|
+
def get_next_page
|
46
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
47
|
+
unless response.nil?
|
48
|
+
@next_link = response.body.next_link
|
49
|
+
@value = response.body.value
|
50
|
+
self
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Mapper for PolicyDefinitionListResult class as Ruby Hash.
|
56
|
+
# This will be used for serialization/deserialization.
|
57
|
+
#
|
58
|
+
def self.mapper()
|
59
|
+
{
|
60
|
+
required: false,
|
61
|
+
serialized_name: 'PolicyDefinitionListResult',
|
62
|
+
type: {
|
63
|
+
name: 'Composite',
|
64
|
+
class_name: 'PolicyDefinitionListResult',
|
65
|
+
model_properties: {
|
66
|
+
value: {
|
67
|
+
required: false,
|
68
|
+
serialized_name: 'value',
|
69
|
+
type: {
|
70
|
+
name: 'Sequence',
|
71
|
+
element: {
|
72
|
+
required: false,
|
73
|
+
serialized_name: 'PolicyDefinitionElementType',
|
74
|
+
type: {
|
75
|
+
name: 'Composite',
|
76
|
+
class_name: 'PolicyDefinition'
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
},
|
81
|
+
next_link: {
|
82
|
+
required: false,
|
83
|
+
serialized_name: 'nextLink',
|
84
|
+
type: {
|
85
|
+
name: 'String'
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|