azure_mgmt_authorization 0.16.1 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/{2015-06-01 → 2015-06-01-preview}/generated/azure_mgmt_authorization.rb +6 -6
  3. data/lib/{2015-06-01 → 2015-06-01-preview}/generated/azure_mgmt_authorization/authorization_management_client.rb +2 -2
  4. data/lib/{2015-06-01 → 2015-06-01-preview}/generated/azure_mgmt_authorization/classic_administrators.rb +3 -3
  5. data/lib/{2015-06-01 → 2015-06-01-preview}/generated/azure_mgmt_authorization/models/classic_administrator.rb +1 -1
  6. data/lib/{2015-06-01 → 2015-06-01-preview}/generated/azure_mgmt_authorization/models/classic_administrator_list_result.rb +1 -1
  7. data/lib/{2015-06-01 → 2015-06-01-preview}/generated/azure_mgmt_authorization/module_definition.rb +1 -1
  8. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization.rb +39 -0
  9. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb +139 -0
  10. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/models/permission.rb +73 -0
  11. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/models/permission_get_result.rb +98 -0
  12. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/models/provider_operation.rb +90 -0
  13. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/models/provider_operations_metadata.rb +119 -0
  14. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/models/provider_operations_metadata_list_result.rb +98 -0
  15. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/models/resource_type.rb +77 -0
  16. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/models/role_definition.rb +143 -0
  17. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/models/role_definition_filter.rb +46 -0
  18. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/models/role_definition_list_result.rb +98 -0
  19. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/module_definition.rb +9 -0
  20. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/permissions.rb +460 -0
  21. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/provider_operations_metadata_operations.rb +323 -0
  22. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/role_definitions.rb +622 -0
  23. data/lib/2015-07-01/generated/azure_mgmt_authorization/authorization_management_client.rb +1 -1
  24. data/lib/2017-10-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb +1 -1
  25. data/lib/2018-01-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb +1 -1
  26. data/lib/azure_mgmt_authorization.rb +2 -1
  27. data/lib/profiles/latest/modules/authorization_profile_module.rb +6 -6
  28. data/lib/version.rb +1 -1
  29. metadata +23 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76694e92a51280610f50a89dc4ca16593758ffdf
4
- data.tar.gz: 51b1a63180c5257c8e1517f409042cec80d56433
3
+ metadata.gz: a179588365770c36c1735aef59eff8fb91981dd2
4
+ data.tar.gz: 2d969c701eb8be57d80db1c3a65488a452c99951
5
5
  SHA512:
6
- metadata.gz: 19a37dd89014c552dbd0d7f2a716e1ca96167785d0b6b0fb2ff9df2a5bbd162cc23f05a383fc42106a6a52b3adf4ddcc477af39fe2888ebfe30ee8b5e10b980d
7
- data.tar.gz: fc49589db060b1fa4ce13db8600b985bae6624365c36833bbfe642f9b0ff8274e29b243fe94087ea62ffe4ead010b442bd771c250d86822308264b0e524656be
6
+ metadata.gz: 511baf38fff1eb74cf58ed24d28835ffc3a904ff1faa7a51e2c277673ea41d976df81bba37bb35736a0022f23db1e71f82eb9e4b32f2b05f5200b28652a70bdd
7
+ data.tar.gz: 9a049bc37fa2a3f0786481ef142b965bcdbb8ad7564fc2d50059e239cf44e3ad8274a78655c8370218f4a3ef92d371c62f82adfff3f5d4becdcaa006e7baa2e9
@@ -16,15 +16,15 @@ require 'faraday'
16
16
  require 'faraday-cookie_jar'
17
17
  require 'concurrent'
18
18
  require 'ms_rest'
19
- require '2015-06-01/generated/azure_mgmt_authorization/module_definition'
19
+ require '2015-06-01-preview/generated/azure_mgmt_authorization/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
- module Azure::Authorization::Mgmt::V2015_06_01
23
- autoload :ClassicAdministrators, '2015-06-01/generated/azure_mgmt_authorization/classic_administrators.rb'
24
- autoload :AuthorizationManagementClient, '2015-06-01/generated/azure_mgmt_authorization/authorization_management_client.rb'
22
+ module Azure::Authorization::Mgmt::V2015_06_01_preview
23
+ autoload :ClassicAdministrators, '2015-06-01-preview/generated/azure_mgmt_authorization/classic_administrators.rb'
24
+ autoload :AuthorizationManagementClient, '2015-06-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb'
25
25
 
26
26
  module Models
27
- autoload :ClassicAdministratorListResult, '2015-06-01/generated/azure_mgmt_authorization/models/classic_administrator_list_result.rb'
28
- autoload :ClassicAdministrator, '2015-06-01/generated/azure_mgmt_authorization/models/classic_administrator.rb'
27
+ autoload :ClassicAdministratorListResult, '2015-06-01-preview/generated/azure_mgmt_authorization/models/classic_administrator_list_result.rb'
28
+ autoload :ClassicAdministrator, '2015-06-01-preview/generated/azure_mgmt_authorization/models/classic_administrator.rb'
29
29
  end
30
30
  end
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::Authorization::Mgmt::V2015_06_01
6
+ module Azure::Authorization::Mgmt::V2015_06_01_preview
7
7
  #
8
8
  # A service client - single point of access to the REST API.
9
9
  #
@@ -123,7 +123,7 @@ module Azure::Authorization::Mgmt::V2015_06_01
123
123
  #
124
124
  def add_telemetry
125
125
  sdk_information = 'azure_mgmt_authorization'
126
- sdk_information = "#{sdk_information}/0.16.1"
126
+ sdk_information = "#{sdk_information}/0.17.0"
127
127
  add_user_agent_information(sdk_information)
128
128
  end
129
129
  end
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::Authorization::Mgmt::V2015_06_01
6
+ module Azure::Authorization::Mgmt::V2015_06_01_preview
7
7
  #
8
8
  # Role based access control provides you a way to apply granular level policy
9
9
  # administration down to individual resources or resource groups. These
@@ -99,7 +99,7 @@ module Azure::Authorization::Mgmt::V2015_06_01
99
99
  if status_code == 200
100
100
  begin
101
101
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
102
- result_mapper = Azure::Authorization::Mgmt::V2015_06_01::Models::ClassicAdministratorListResult.mapper()
102
+ result_mapper = Azure::Authorization::Mgmt::V2015_06_01_preview::Models::ClassicAdministratorListResult.mapper()
103
103
  result.body = @client.deserialize(result_mapper, parsed_response)
104
104
  rescue Exception => e
105
105
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -190,7 +190,7 @@ module Azure::Authorization::Mgmt::V2015_06_01
190
190
  if status_code == 200
191
191
  begin
192
192
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
193
- result_mapper = Azure::Authorization::Mgmt::V2015_06_01::Models::ClassicAdministratorListResult.mapper()
193
+ result_mapper = Azure::Authorization::Mgmt::V2015_06_01_preview::Models::ClassicAdministratorListResult.mapper()
194
194
  result.body = @client.deserialize(result_mapper, parsed_response)
195
195
  rescue Exception => e
196
196
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::Authorization::Mgmt::V2015_06_01
6
+ module Azure::Authorization::Mgmt::V2015_06_01_preview
7
7
  module Models
8
8
  #
9
9
  # Classic Administrators
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::Authorization::Mgmt::V2015_06_01
6
+ module Azure::Authorization::Mgmt::V2015_06_01_preview
7
7
  module Models
8
8
  #
9
9
  # ClassicAdministrator list result information.
@@ -6,4 +6,4 @@
6
6
  module Azure end
7
7
  module Azure::Authorization end
8
8
  module Azure::Authorization::Mgmt end
9
- module Azure::Authorization::Mgmt::V2015_06_01 end
9
+ module Azure::Authorization::Mgmt::V2015_06_01_preview end
@@ -0,0 +1,39 @@
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 '2015-07-01-preview/generated/azure_mgmt_authorization/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Authorization::Mgmt::V2015_07_01_preview
23
+ autoload :Permissions, '2015-07-01-preview/generated/azure_mgmt_authorization/permissions.rb'
24
+ autoload :ProviderOperationsMetadataOperations, '2015-07-01-preview/generated/azure_mgmt_authorization/provider_operations_metadata_operations.rb'
25
+ autoload :RoleDefinitions, '2015-07-01-preview/generated/azure_mgmt_authorization/role_definitions.rb'
26
+ autoload :AuthorizationManagementClient, '2015-07-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb'
27
+
28
+ module Models
29
+ autoload :ResourceType, '2015-07-01-preview/generated/azure_mgmt_authorization/models/resource_type.rb'
30
+ autoload :ProviderOperationsMetadata, '2015-07-01-preview/generated/azure_mgmt_authorization/models/provider_operations_metadata.rb'
31
+ autoload :Permission, '2015-07-01-preview/generated/azure_mgmt_authorization/models/permission.rb'
32
+ autoload :ProviderOperationsMetadataListResult, '2015-07-01-preview/generated/azure_mgmt_authorization/models/provider_operations_metadata_list_result.rb'
33
+ autoload :ProviderOperation, '2015-07-01-preview/generated/azure_mgmt_authorization/models/provider_operation.rb'
34
+ autoload :RoleDefinition, '2015-07-01-preview/generated/azure_mgmt_authorization/models/role_definition.rb'
35
+ autoload :PermissionGetResult, '2015-07-01-preview/generated/azure_mgmt_authorization/models/permission_get_result.rb'
36
+ autoload :RoleDefinitionListResult, '2015-07-01-preview/generated/azure_mgmt_authorization/models/role_definition_list_result.rb'
37
+ autoload :RoleDefinitionFilter, '2015-07-01-preview/generated/azure_mgmt_authorization/models/role_definition_filter.rb'
38
+ end
39
+ end
@@ -0,0 +1,139 @@
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::Authorization::Mgmt::V2015_07_01_preview
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class AuthorizationManagementClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
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] The ID of the target subscription.
21
+ attr_accessor :subscription_id
22
+
23
+ # @return [String] The API version to use for this operation.
24
+ attr_reader :api_version
25
+
26
+ # @return [String] Gets or sets the preferred language for the response.
27
+ attr_accessor :accept_language
28
+
29
+ # @return [Integer] Gets or sets the retry timeout in seconds for Long
30
+ # Running Operations. Default value is 30.
31
+ attr_accessor :long_running_operation_retry_timeout
32
+
33
+ # @return [Boolean] When set to true a unique x-ms-client-request-id value
34
+ # is generated and included in each request. Default is true.
35
+ attr_accessor :generate_client_request_id
36
+
37
+ # @return [Permissions] permissions
38
+ attr_reader :permissions
39
+
40
+ # @return [ProviderOperationsMetadataOperations]
41
+ # provider_operations_metadata_operations
42
+ attr_reader :provider_operations_metadata_operations
43
+
44
+ # @return [RoleDefinitions] role_definitions
45
+ attr_reader :role_definitions
46
+
47
+ #
48
+ # Creates initializes a new instance of the AuthorizationManagementClient class.
49
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
50
+ # @param base_url [String] the base URI of the service.
51
+ # @param options [Array] filters to be applied to the HTTP requests.
52
+ #
53
+ def initialize(credentials = nil, base_url = nil, options = nil)
54
+ super(credentials, options)
55
+ @base_url = base_url || 'https://management.azure.com'
56
+
57
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
58
+ @credentials = credentials
59
+
60
+ @permissions = Permissions.new(self)
61
+ @provider_operations_metadata_operations = ProviderOperationsMetadataOperations.new(self)
62
+ @role_definitions = RoleDefinitions.new(self)
63
+ @api_version = '2015-07-01'
64
+ @accept_language = 'en-US'
65
+ @long_running_operation_retry_timeout = 30
66
+ @generate_client_request_id = true
67
+ add_telemetry
68
+ end
69
+
70
+ #
71
+ # Makes a request and returns the body of the response.
72
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
73
+ # @param path [String] the path, relative to {base_url}.
74
+ # @param options [Hash{String=>String}] specifying any request options like :body.
75
+ # @return [Hash{String=>String}] containing the body of the response.
76
+ # Example:
77
+ #
78
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
79
+ # path = "/path"
80
+ # options = {
81
+ # body: request_content,
82
+ # query_params: {'api-version' => '2016-02-01'}
83
+ # }
84
+ # result = @client.make_request(:put, path, options)
85
+ #
86
+ def make_request(method, path, options = {})
87
+ result = make_request_with_http_info(method, path, options)
88
+ result.body unless result.nil?
89
+ end
90
+
91
+ #
92
+ # Makes a request and returns the operation response.
93
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
94
+ # @param path [String] the path, relative to {base_url}.
95
+ # @param options [Hash{String=>String}] specifying any request options like :body.
96
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
97
+ #
98
+ def make_request_with_http_info(method, path, options = {})
99
+ result = make_request_async(method, path, options).value!
100
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
101
+ result
102
+ end
103
+
104
+ #
105
+ # Makes a request asynchronously.
106
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
107
+ # @param path [String] the path, relative to {base_url}.
108
+ # @param options [Hash{String=>String}] specifying any request options like :body.
109
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
110
+ #
111
+ def make_request_async(method, path, options = {})
112
+ fail ArgumentError, 'method is nil' if method.nil?
113
+ fail ArgumentError, 'path is nil' if path.nil?
114
+
115
+ request_url = options[:base_url] || @base_url
116
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
117
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
118
+ end
119
+
120
+ request_headers = @request_headers
121
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
122
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
123
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
124
+
125
+ super(request_url, method, path, options)
126
+ end
127
+
128
+
129
+ private
130
+ #
131
+ # Adds telemetry information.
132
+ #
133
+ def add_telemetry
134
+ sdk_information = 'azure_mgmt_authorization'
135
+ sdk_information = "#{sdk_information}/0.17.0"
136
+ add_user_agent_information(sdk_information)
137
+ end
138
+ end
139
+ end
@@ -0,0 +1,73 @@
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::Authorization::Mgmt::V2015_07_01_preview
7
+ module Models
8
+ #
9
+ # Role definition permissions.
10
+ #
11
+ class Permission
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<String>] Allowed actions.
16
+ attr_accessor :actions
17
+
18
+ # @return [Array<String>] Denied actions.
19
+ attr_accessor :not_actions
20
+
21
+
22
+ #
23
+ # Mapper for Permission class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'Permission',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'Permission',
34
+ model_properties: {
35
+ actions: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ serialized_name: 'actions',
39
+ type: {
40
+ name: 'Sequence',
41
+ element: {
42
+ client_side_validation: true,
43
+ required: false,
44
+ serialized_name: 'StringElementType',
45
+ type: {
46
+ name: 'String'
47
+ }
48
+ }
49
+ }
50
+ },
51
+ not_actions: {
52
+ client_side_validation: true,
53
+ required: false,
54
+ serialized_name: 'notActions',
55
+ type: {
56
+ name: 'Sequence',
57
+ element: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ serialized_name: 'StringElementType',
61
+ type: {
62
+ name: 'String'
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,98 @@
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::Authorization::Mgmt::V2015_07_01_preview
7
+ module Models
8
+ #
9
+ # Permissions information.
10
+ #
11
+ class PermissionGetResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Array<Permission>] An array of permissions.
17
+ attr_accessor :value
18
+
19
+ # @return [String] The URL to use for getting 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<Permission>] 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 [PermissionGetResult] 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 PermissionGetResult class as Ruby Hash.
56
+ # This will be used for serialization/deserialization.
57
+ #
58
+ def self.mapper()
59
+ {
60
+ client_side_validation: true,
61
+ required: false,
62
+ serialized_name: 'PermissionGetResult',
63
+ type: {
64
+ name: 'Composite',
65
+ class_name: 'PermissionGetResult',
66
+ model_properties: {
67
+ value: {
68
+ client_side_validation: true,
69
+ required: false,
70
+ serialized_name: 'value',
71
+ type: {
72
+ name: 'Sequence',
73
+ element: {
74
+ client_side_validation: true,
75
+ required: false,
76
+ serialized_name: 'PermissionElementType',
77
+ type: {
78
+ name: 'Composite',
79
+ class_name: 'Permission'
80
+ }
81
+ }
82
+ }
83
+ },
84
+ next_link: {
85
+ client_side_validation: true,
86
+ required: false,
87
+ serialized_name: 'nextLink',
88
+ type: {
89
+ name: 'String'
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ end
96
+ end
97
+ end
98
+ end