azure_mgmt_authorization 0.18.1 → 0.18.2

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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-06-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb +1 -1
  3. data/lib/2015-07-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb +1 -1
  4. data/lib/2015-07-01/generated/azure_mgmt_authorization/authorization_management_client.rb +1 -1
  5. data/lib/2017-10-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb +1 -1
  6. data/lib/2018-01-01-preview/generated/azure_mgmt_authorization.rb +9 -9
  7. data/lib/2018-01-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb +5 -5
  8. data/lib/2018-01-01-preview/generated/azure_mgmt_authorization/permissions.rb +1 -5
  9. data/lib/2018-01-01-preview/generated/azure_mgmt_authorization/provider_operations_metadata_operations.rb +1 -5
  10. data/lib/2018-01-01-preview/generated/azure_mgmt_authorization/role_assignments.rb +1 -5
  11. data/lib/2018-01-01-preview/generated/azure_mgmt_authorization/role_definitions.rb +1 -5
  12. data/lib/2018-07-01-preview/generated/azure_mgmt_authorization.rb +33 -0
  13. data/lib/2018-07-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb +131 -0
  14. data/lib/2018-07-01-preview/generated/azure_mgmt_authorization/deny_assignments.rb +1226 -0
  15. data/lib/2018-07-01-preview/generated/azure_mgmt_authorization/models/deny_assignment.rb +191 -0
  16. data/lib/2018-07-01-preview/generated/azure_mgmt_authorization/models/deny_assignment_filter.rb +71 -0
  17. data/lib/2018-07-01-preview/generated/azure_mgmt_authorization/models/deny_assignment_list_result.rb +98 -0
  18. data/lib/2018-07-01-preview/generated/azure_mgmt_authorization/models/deny_assignment_permission.rb +115 -0
  19. data/lib/2018-07-01-preview/generated/azure_mgmt_authorization/models/principal.rb +65 -0
  20. data/lib/2018-07-01-preview/generated/azure_mgmt_authorization/module_definition.rb +9 -0
  21. data/lib/2018-09-01-preview/generated/azure_mgmt_authorization.rb +33 -0
  22. data/lib/2018-09-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb +131 -0
  23. data/lib/2018-09-01-preview/generated/azure_mgmt_authorization/models/principal_type.rb +24 -0
  24. data/lib/2018-09-01-preview/generated/azure_mgmt_authorization/models/role_assignment.rb +115 -0
  25. data/lib/2018-09-01-preview/generated/azure_mgmt_authorization/models/role_assignment_create_parameters.rb +85 -0
  26. data/lib/2018-09-01-preview/generated/azure_mgmt_authorization/models/role_assignment_filter.rb +57 -0
  27. data/lib/2018-09-01-preview/generated/azure_mgmt_authorization/models/role_assignment_list_result.rb +98 -0
  28. data/lib/2018-09-01-preview/generated/azure_mgmt_authorization/module_definition.rb +9 -0
  29. data/lib/2018-09-01-preview/generated/azure_mgmt_authorization/role_assignments.rb +1492 -0
  30. data/lib/azure_mgmt_authorization.rb +2 -0
  31. data/lib/profiles/latest/modules/authorization_profile_module.rb +72 -30
  32. data/lib/version.rb +1 -1
  33. metadata +20 -2
@@ -0,0 +1,65 @@
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::V2018_07_01_preview
7
+ module Models
8
+ #
9
+ # Deny assignment principal.
10
+ #
11
+ class Principal
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Object ID of the Azure AD principal (user, group, or
16
+ # service principal) to which the deny assignment applies. An empty guid
17
+ # '00000000-0000-0000-0000-000000000000' as principal id and principal
18
+ # type as 'Everyone' represents all users, groups and service principals.
19
+ attr_accessor :id
20
+
21
+ # @return [String] Type of object represented by principal id (user,
22
+ # group, or service principal). An empty guid
23
+ # '00000000-0000-0000-0000-000000000000' as principal id and principal
24
+ # type as 'Everyone' represents all users, groups and service principals.
25
+ attr_accessor :type
26
+
27
+
28
+ #
29
+ # Mapper for Principal class as Ruby Hash.
30
+ # This will be used for serialization/deserialization.
31
+ #
32
+ def self.mapper()
33
+ {
34
+ client_side_validation: true,
35
+ required: false,
36
+ serialized_name: 'Principal',
37
+ type: {
38
+ name: 'Composite',
39
+ class_name: 'Principal',
40
+ model_properties: {
41
+ id: {
42
+ client_side_validation: true,
43
+ required: false,
44
+ read_only: true,
45
+ serialized_name: 'id',
46
+ type: {
47
+ name: 'String'
48
+ }
49
+ },
50
+ type: {
51
+ client_side_validation: true,
52
+ required: false,
53
+ read_only: true,
54
+ serialized_name: 'type',
55
+ type: {
56
+ name: 'String'
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ end
63
+ end
64
+ end
65
+ 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::Authorization end
8
+ module Azure::Authorization::Mgmt end
9
+ module Azure::Authorization::Mgmt::V2018_07_01_preview end
@@ -0,0 +1,33 @@
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 '2018-09-01-preview/generated/azure_mgmt_authorization/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Authorization::Mgmt::V2018_09_01_preview
23
+ autoload :RoleAssignments, '2018-09-01-preview/generated/azure_mgmt_authorization/role_assignments.rb'
24
+ autoload :AuthorizationManagementClient, '2018-09-01-preview/generated/azure_mgmt_authorization/authorization_management_client.rb'
25
+
26
+ module Models
27
+ autoload :RoleAssignmentListResult, '2018-09-01-preview/generated/azure_mgmt_authorization/models/role_assignment_list_result.rb'
28
+ autoload :RoleAssignmentFilter, '2018-09-01-preview/generated/azure_mgmt_authorization/models/role_assignment_filter.rb'
29
+ autoload :RoleAssignmentCreateParameters, '2018-09-01-preview/generated/azure_mgmt_authorization/models/role_assignment_create_parameters.rb'
30
+ autoload :RoleAssignment, '2018-09-01-preview/generated/azure_mgmt_authorization/models/role_assignment.rb'
31
+ autoload :PrincipalType, '2018-09-01-preview/generated/azure_mgmt_authorization/models/principal_type.rb'
32
+ end
33
+ end
@@ -0,0 +1,131 @@
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::V2018_09_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] The preferred language for the response.
27
+ attr_accessor :accept_language
28
+
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
+ attr_accessor :long_running_operation_retry_timeout
32
+
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
36
+ attr_accessor :generate_client_request_id
37
+
38
+ # @return [RoleAssignments] role_assignments
39
+ attr_reader :role_assignments
40
+
41
+ #
42
+ # Creates initializes a new instance of the AuthorizationManagementClient class.
43
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
44
+ # @param base_url [String] the base URI of the service.
45
+ # @param options [Array] filters to be applied to the HTTP requests.
46
+ #
47
+ def initialize(credentials = nil, base_url = nil, options = nil)
48
+ super(credentials, options)
49
+ @base_url = base_url || 'https://management.azure.com'
50
+
51
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
52
+ @credentials = credentials
53
+
54
+ @role_assignments = RoleAssignments.new(self)
55
+ @api_version = '2018-09-01-preview'
56
+ @accept_language = 'en-US'
57
+ @long_running_operation_retry_timeout = 30
58
+ @generate_client_request_id = true
59
+ add_telemetry
60
+ end
61
+
62
+ #
63
+ # Makes a request and returns the body of the response.
64
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
65
+ # @param path [String] the path, relative to {base_url}.
66
+ # @param options [Hash{String=>String}] specifying any request options like :body.
67
+ # @return [Hash{String=>String}] containing the body of the response.
68
+ # Example:
69
+ #
70
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
71
+ # path = "/path"
72
+ # options = {
73
+ # body: request_content,
74
+ # query_params: {'api-version' => '2016-02-01'}
75
+ # }
76
+ # result = @client.make_request(:put, path, options)
77
+ #
78
+ def make_request(method, path, options = {})
79
+ result = make_request_with_http_info(method, path, options)
80
+ result.body unless result.nil?
81
+ end
82
+
83
+ #
84
+ # Makes a request and returns the operation response.
85
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
86
+ # @param path [String] the path, relative to {base_url}.
87
+ # @param options [Hash{String=>String}] specifying any request options like :body.
88
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
89
+ #
90
+ def make_request_with_http_info(method, path, options = {})
91
+ result = make_request_async(method, path, options).value!
92
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
93
+ result
94
+ end
95
+
96
+ #
97
+ # Makes a request asynchronously.
98
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
99
+ # @param path [String] the path, relative to {base_url}.
100
+ # @param options [Hash{String=>String}] specifying any request options like :body.
101
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
102
+ #
103
+ def make_request_async(method, path, options = {})
104
+ fail ArgumentError, 'method is nil' if method.nil?
105
+ fail ArgumentError, 'path is nil' if path.nil?
106
+
107
+ request_url = options[:base_url] || @base_url
108
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
109
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
110
+ end
111
+
112
+ request_headers = @request_headers
113
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
114
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
115
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
116
+
117
+ super(request_url, method, path, options)
118
+ end
119
+
120
+
121
+ private
122
+ #
123
+ # Adds telemetry information.
124
+ #
125
+ def add_telemetry
126
+ sdk_information = 'azure_mgmt_authorization'
127
+ sdk_information = "#{sdk_information}/0.18.2"
128
+ add_user_agent_information(sdk_information)
129
+ end
130
+ end
131
+ end
@@ -0,0 +1,24 @@
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::V2018_09_01_preview
7
+ module Models
8
+ #
9
+ # Defines values for PrincipalType
10
+ #
11
+ module PrincipalType
12
+ User = "User"
13
+ Group = "Group"
14
+ ServicePrincipal = "ServicePrincipal"
15
+ Unknown = "Unknown"
16
+ DirectoryRoleTemplate = "DirectoryRoleTemplate"
17
+ ForeignGroup = "ForeignGroup"
18
+ Application = "Application"
19
+ MSI = "MSI"
20
+ DirectoryObjectOrGroup = "DirectoryObjectOrGroup"
21
+ Everyone = "Everyone"
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,115 @@
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::V2018_09_01_preview
7
+ module Models
8
+ #
9
+ # Role Assignments
10
+ #
11
+ class RoleAssignment
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The role assignment ID.
16
+ attr_accessor :id
17
+
18
+ # @return [String] The role assignment name.
19
+ attr_accessor :name
20
+
21
+ # @return [String] The role assignment type.
22
+ attr_accessor :type
23
+
24
+ # @return [String] The role assignment scope.
25
+ attr_accessor :scope
26
+
27
+ # @return [String] The role definition ID.
28
+ attr_accessor :role_definition_id
29
+
30
+ # @return [String] The principal ID.
31
+ attr_accessor :principal_id
32
+
33
+ # @return [Boolean] The Delegation flag for the roleassignment
34
+ attr_accessor :can_delegate
35
+
36
+
37
+ #
38
+ # Mapper for RoleAssignment class as Ruby Hash.
39
+ # This will be used for serialization/deserialization.
40
+ #
41
+ def self.mapper()
42
+ {
43
+ client_side_validation: true,
44
+ required: false,
45
+ serialized_name: 'RoleAssignment',
46
+ type: {
47
+ name: 'Composite',
48
+ class_name: 'RoleAssignment',
49
+ model_properties: {
50
+ id: {
51
+ client_side_validation: true,
52
+ required: false,
53
+ read_only: true,
54
+ serialized_name: 'id',
55
+ type: {
56
+ name: 'String'
57
+ }
58
+ },
59
+ name: {
60
+ client_side_validation: true,
61
+ required: false,
62
+ read_only: true,
63
+ serialized_name: 'name',
64
+ type: {
65
+ name: 'String'
66
+ }
67
+ },
68
+ type: {
69
+ client_side_validation: true,
70
+ required: false,
71
+ read_only: true,
72
+ serialized_name: 'type',
73
+ type: {
74
+ name: 'String'
75
+ }
76
+ },
77
+ scope: {
78
+ client_side_validation: true,
79
+ required: false,
80
+ serialized_name: 'properties.scope',
81
+ type: {
82
+ name: 'String'
83
+ }
84
+ },
85
+ role_definition_id: {
86
+ client_side_validation: true,
87
+ required: false,
88
+ serialized_name: 'properties.roleDefinitionId',
89
+ type: {
90
+ name: 'String'
91
+ }
92
+ },
93
+ principal_id: {
94
+ client_side_validation: true,
95
+ required: false,
96
+ serialized_name: 'properties.principalId',
97
+ type: {
98
+ name: 'String'
99
+ }
100
+ },
101
+ can_delegate: {
102
+ client_side_validation: true,
103
+ required: false,
104
+ serialized_name: 'properties.canDelegate',
105
+ type: {
106
+ name: 'Boolean'
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
112
+ end
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,85 @@
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::V2018_09_01_preview
7
+ module Models
8
+ #
9
+ # Role assignment create parameters.
10
+ #
11
+ class RoleAssignmentCreateParameters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The role definition ID used in the role assignment.
16
+ attr_accessor :role_definition_id
17
+
18
+ # @return [String] The principal ID assigned to the role. This maps to
19
+ # the ID inside the Active Directory. It can point to a user, service
20
+ # principal, or security group.
21
+ attr_accessor :principal_id
22
+
23
+ # @return [PrincipalType] The principal type of the assigned principal
24
+ # ID. Possible values include: 'User', 'Group', 'ServicePrincipal',
25
+ # 'Unknown', 'DirectoryRoleTemplate', 'ForeignGroup', 'Application',
26
+ # 'MSI', 'DirectoryObjectOrGroup', 'Everyone'
27
+ attr_accessor :principal_type
28
+
29
+ # @return [Boolean] The delgation flag used for creating a role
30
+ # assignment
31
+ attr_accessor :can_delegate
32
+
33
+
34
+ #
35
+ # Mapper for RoleAssignmentCreateParameters class as Ruby Hash.
36
+ # This will be used for serialization/deserialization.
37
+ #
38
+ def self.mapper()
39
+ {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'RoleAssignmentCreateParameters',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'RoleAssignmentCreateParameters',
46
+ model_properties: {
47
+ role_definition_id: {
48
+ client_side_validation: true,
49
+ required: true,
50
+ serialized_name: 'properties.roleDefinitionId',
51
+ type: {
52
+ name: 'String'
53
+ }
54
+ },
55
+ principal_id: {
56
+ client_side_validation: true,
57
+ required: true,
58
+ serialized_name: 'properties.principalId',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ },
63
+ principal_type: {
64
+ client_side_validation: true,
65
+ required: false,
66
+ serialized_name: 'properties.principalType',
67
+ type: {
68
+ name: 'String'
69
+ }
70
+ },
71
+ can_delegate: {
72
+ client_side_validation: true,
73
+ required: false,
74
+ serialized_name: 'properties.canDelegate',
75
+ type: {
76
+ name: 'Boolean'
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ end
83
+ end
84
+ end
85
+ end