Class: Azure::GraphRbac::V1_6::Applications
- Inherits:
-
Object
- Object
- Azure::GraphRbac::V1_6::Applications
- Includes:
- MsRestAzure
- Defined in:
- lib/1.6/generated/azure_graph_rbac/applications.rb
Overview
The Graph RBAC Management Client
Instance Attribute Summary collapse
-
#client ⇒ GraphRbacClient
readonly
Reference to the GraphRbacClient.
Instance Method Summary collapse
-
#add_owner(application_object_id, parameters, custom_headers: nil) ⇒ Object
Add an owner to an application.
-
#add_owner_async(application_object_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Add an owner to an application.
-
#add_owner_with_http_info(application_object_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Add an owner to an application.
-
#create(parameters, custom_headers: nil) ⇒ Application
Create a new application.
-
#create_async(parameters, custom_headers: nil) ⇒ Concurrent::Promise
Create a new application.
-
#create_with_http_info(parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Create a new application.
-
#delete(application_object_id, custom_headers: nil) ⇒ Object
Delete an application.
-
#delete_async(application_object_id, custom_headers: nil) ⇒ Concurrent::Promise
Delete an application.
-
#delete_with_http_info(application_object_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Delete an application.
-
#get(application_object_id, custom_headers: nil) ⇒ Application
Get an application by object ID.
-
#get_async(application_object_id, custom_headers: nil) ⇒ Concurrent::Promise
Get an application by object ID.
-
#get_with_http_info(application_object_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get an application by object ID.
-
#initialize(client) ⇒ Applications
constructor
Creates and initializes a new instance of the Applications class.
-
#list(filter: nil, custom_headers: nil) ⇒ Array<Application>
Lists applications by filter parameters.
-
#list_as_lazy(filter: nil, custom_headers: nil) ⇒ ApplicationListResult
Lists applications by filter parameters.
-
#list_async(filter: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists applications by filter parameters.
-
#list_key_credentials(application_object_id, custom_headers: nil) ⇒ KeyCredentialListResult
Get the keyCredentials associated with an application.
-
#list_key_credentials_async(application_object_id, custom_headers: nil) ⇒ Concurrent::Promise
Get the keyCredentials associated with an application.
-
#list_key_credentials_with_http_info(application_object_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the keyCredentials associated with an application.
-
#list_next(next_link, custom_headers: nil) ⇒ Array<Application>
Gets a list of applications from the current tenant.
-
#list_next_async(next_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of applications from the current tenant.
-
#list_next_with_http_info(next_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of applications from the current tenant.
-
#list_owners(application_object_id, custom_headers: nil) ⇒ DirectoryObjectListResult
Directory objects that are owners of the application.
-
#list_owners_async(application_object_id, custom_headers: nil) ⇒ Concurrent::Promise
Directory objects that are owners of the application.
-
#list_owners_with_http_info(application_object_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Directory objects that are owners of the application.
-
#list_password_credentials(application_object_id, custom_headers: nil) ⇒ PasswordCredentialListResult
Get the passwordCredentials associated with an application.
-
#list_password_credentials_async(application_object_id, custom_headers: nil) ⇒ Concurrent::Promise
Get the passwordCredentials associated with an application.
-
#list_password_credentials_with_http_info(application_object_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the passwordCredentials associated with an application.
-
#list_with_http_info(filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists applications by filter parameters.
-
#patch(application_object_id, parameters, custom_headers: nil) ⇒ Object
Update an existing application.
-
#patch_async(application_object_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update an existing application.
-
#patch_with_http_info(application_object_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update an existing application.
-
#update_key_credentials(application_object_id, parameters, custom_headers: nil) ⇒ Object
Update the keyCredentials associated with an application.
-
#update_key_credentials_async(application_object_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update the keyCredentials associated with an application.
-
#update_key_credentials_with_http_info(application_object_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the keyCredentials associated with an application.
-
#update_password_credentials(application_object_id, parameters, custom_headers: nil) ⇒ Object
Update passwordCredentials associated with an application.
-
#update_password_credentials_async(application_object_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update passwordCredentials associated with an application.
-
#update_password_credentials_with_http_info(application_object_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update passwordCredentials associated with an application.
Constructor Details
#initialize(client) ⇒ Applications
Creates and initializes a new instance of the Applications class.
17 18 19 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ GraphRbacClient (readonly)
Returns reference to the GraphRbacClient.
22 23 24 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 22 def client @client end |
Instance Method Details
#add_owner(application_object_id, parameters, custom_headers: nil) ⇒ Object
Add an owner to an application.
which to add the owner. object, such as graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. will be added to the HTTP request.
577 578 579 580 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 577 def add_owner(application_object_id, parameters, custom_headers:nil) response = add_owner_async(application_object_id, parameters, custom_headers:custom_headers).value! nil end |
#add_owner_async(application_object_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Add an owner to an application.
which to add the owner. object, such as graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. to the HTTP request.
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 612 def add_owner_async(application_object_id, parameters, custom_headers:nil) fail ArgumentError, 'application_object_id is nil' if application_object_id.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::GraphRbac::V1_6::Models::ApplicationAddOwnerParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '{tenantID}/applications/{applicationObjectId}/$links/owners' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'applicationObjectId' => application_object_id,'tenantID' => @client.tenant_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#add_owner_with_http_info(application_object_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Add an owner to an application.
which to add the owner. object, such as graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. will be added to the HTTP request.
595 596 597 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 595 def add_owner_with_http_info(application_object_id, parameters, custom_headers:nil) add_owner_async(application_object_id, parameters, custom_headers:custom_headers).value! end |
#create(parameters, custom_headers: nil) ⇒ Application
Create a new application.
an application. will be added to the HTTP request.
34 35 36 37 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 34 def create(parameters, custom_headers:nil) response = create_async(parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_async(parameters, custom_headers: nil) ⇒ Concurrent::Promise
Create a new application.
an application. to the HTTP request.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 63 def create_async(parameters, custom_headers:nil) fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::GraphRbac::V1_6::Models::ApplicationCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '{tenantID}/applications' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'tenantID' => @client.tenant_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::GraphRbac::V1_6::Models::Application.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#create_with_http_info(parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Create a new application.
an application. will be added to the HTTP request.
49 50 51 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 49 def create_with_http_info(parameters, custom_headers:nil) create_async(parameters, custom_headers:custom_headers).value! end |
#delete(application_object_id, custom_headers: nil) ⇒ Object
Delete an application.
will be added to the HTTP request.
217 218 219 220 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 217 def delete(application_object_id, custom_headers:nil) response = delete_async(application_object_id, custom_headers:custom_headers).value! nil end |
#delete_async(application_object_id, custom_headers: nil) ⇒ Concurrent::Promise
Delete an application.
to the HTTP request.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 244 def delete_async(application_object_id, custom_headers:nil) fail ArgumentError, 'application_object_id is nil' if application_object_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{tenantID}/applications/{applicationObjectId}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'applicationObjectId' => application_object_id,'tenantID' => @client.tenant_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#delete_with_http_info(application_object_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Delete an application.
will be added to the HTTP request.
231 232 233 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 231 def delete_with_http_info(application_object_id, custom_headers:nil) delete_async(application_object_id, custom_headers:custom_headers).value! end |
#get(application_object_id, custom_headers: nil) ⇒ Application
Get an application by object ID.
will be added to the HTTP request.
295 296 297 298 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 295 def get(application_object_id, custom_headers:nil) response = get_async(application_object_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(application_object_id, custom_headers: nil) ⇒ Concurrent::Promise
Get an application by object ID.
to the HTTP request.
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 322 def get_async(application_object_id, custom_headers:nil) fail ArgumentError, 'application_object_id is nil' if application_object_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{tenantID}/applications/{applicationObjectId}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'applicationObjectId' => application_object_id,'tenantID' => @client.tenant_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::GraphRbac::V1_6::Models::Application.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_with_http_info(application_object_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get an application by object ID.
will be added to the HTTP request.
309 310 311 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 309 def get_with_http_info(application_object_id, custom_headers:nil) get_async(application_object_id, custom_headers:custom_headers).value! end |
#list(filter: nil, custom_headers: nil) ⇒ Array<Application>
Lists applications by filter parameters.
will be added to the HTTP request.
131 132 133 134 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 131 def list(filter:nil, custom_headers:nil) first_page = list_as_lazy(filter:filter, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(filter: nil, custom_headers: nil) ⇒ ApplicationListResult
Lists applications by filter parameters.
will be added to the HTTP request.
response.
1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 1119 def list_as_lazy(filter:nil, custom_headers:nil) response = list_async(filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_link| list_next_async(next_link, custom_headers:custom_headers) end page end end |
#list_async(filter: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists applications by filter parameters.
to the HTTP request.
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 158 def list_async(filter:nil, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{tenantID}/applications' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'tenantID' => @client.tenant_id}, query_params: {'$filter' => filter,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::GraphRbac::V1_6::Models::ApplicationListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_key_credentials(application_object_id, custom_headers: nil) ⇒ KeyCredentialListResult
Get the keyCredentials associated with an application.
will be added to the HTTP request.
671 672 673 674 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 671 def list_key_credentials(application_object_id, custom_headers:nil) response = list_key_credentials_async(application_object_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_key_credentials_async(application_object_id, custom_headers: nil) ⇒ Concurrent::Promise
Get the keyCredentials associated with an application.
to the HTTP request.
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 698 def list_key_credentials_async(application_object_id, custom_headers:nil) fail ArgumentError, 'application_object_id is nil' if application_object_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{tenantID}/applications/{applicationObjectId}/keyCredentials' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'applicationObjectId' => application_object_id,'tenantID' => @client.tenant_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::GraphRbac::V1_6::Models::KeyCredentialListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_key_credentials_with_http_info(application_object_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the keyCredentials associated with an application.
will be added to the HTTP request.
685 686 687 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 685 def list_key_credentials_with_http_info(application_object_id, custom_headers:nil) list_key_credentials_async(application_object_id, custom_headers:custom_headers).value! end |
#list_next(next_link, custom_headers: nil) ⇒ Array<Application>
Gets a list of applications from the current tenant.
will be added to the HTTP request.
1029 1030 1031 1032 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 1029 def list_next(next_link, custom_headers:nil) response = list_next_async(next_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_next_async(next_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of applications from the current tenant.
to the HTTP request.
1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 1056 def list_next_async(next_link, custom_headers:nil) fail ArgumentError, 'next_link is nil' if next_link.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{tenantID}/{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'tenantID' => @client.tenant_id}, skip_encoding_path_params: {'nextLink' => next_link}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::GraphRbac::V1_6::Models::ApplicationListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next_with_http_info(next_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of applications from the current tenant.
will be added to the HTTP request.
1043 1044 1045 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 1043 def list_next_with_http_info(next_link, custom_headers:nil) list_next_async(next_link, custom_headers:custom_headers).value! end |
#list_owners(application_object_id, custom_headers: nil) ⇒ DirectoryObjectListResult
Directory objects that are owners of the application.
The owners are a set of non-admin users who are allowed to modify this object.
which to get owners. will be added to the HTTP request.
478 479 480 481 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 478 def list_owners(application_object_id, custom_headers:nil) response = list_owners_async(application_object_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_owners_async(application_object_id, custom_headers: nil) ⇒ Concurrent::Promise
Directory objects that are owners of the application.
The owners are a set of non-admin users who are allowed to modify this object.
which to get owners. to the HTTP request.
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 513 def list_owners_async(application_object_id, custom_headers:nil) fail ArgumentError, 'application_object_id is nil' if application_object_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{tenantID}/applications/{applicationObjectId}/owners' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'applicationObjectId' => application_object_id,'tenantID' => @client.tenant_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::GraphRbac::V1_6::Models::DirectoryObjectListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_owners_with_http_info(application_object_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Directory objects that are owners of the application.
The owners are a set of non-admin users who are allowed to modify this object.
which to get owners. will be added to the HTTP request.
496 497 498 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 496 def list_owners_with_http_info(application_object_id, custom_headers:nil) list_owners_async(application_object_id, custom_headers:custom_headers).value! end |
#list_password_credentials(application_object_id, custom_headers: nil) ⇒ PasswordCredentialListResult
Get the passwordCredentials associated with an application.
will be added to the HTTP request.
850 851 852 853 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 850 def list_password_credentials(application_object_id, custom_headers:nil) response = list_password_credentials_async(application_object_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_password_credentials_async(application_object_id, custom_headers: nil) ⇒ Concurrent::Promise
Get the passwordCredentials associated with an application.
to the HTTP request.
877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 877 def list_password_credentials_async(application_object_id, custom_headers:nil) fail ArgumentError, 'application_object_id is nil' if application_object_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{tenantID}/applications/{applicationObjectId}/passwordCredentials' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'applicationObjectId' => application_object_id,'tenantID' => @client.tenant_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::GraphRbac::V1_6::Models::PasswordCredentialListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_password_credentials_with_http_info(application_object_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the passwordCredentials associated with an application.
will be added to the HTTP request.
864 865 866 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 864 def list_password_credentials_with_http_info(application_object_id, custom_headers:nil) list_password_credentials_async(application_object_id, custom_headers:custom_headers).value! end |
#list_with_http_info(filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists applications by filter parameters.
will be added to the HTTP request.
145 146 147 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 145 def list_with_http_info(filter:nil, custom_headers:nil) list_async(filter:filter, custom_headers:custom_headers).value! end |
#patch(application_object_id, parameters, custom_headers: nil) ⇒ Object
Update an existing application.
existing application. will be added to the HTTP request.
384 385 386 387 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 384 def patch(application_object_id, parameters, custom_headers:nil) response = patch_async(application_object_id, parameters, custom_headers:custom_headers).value! nil end |
#patch_async(application_object_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update an existing application.
existing application. to the HTTP request.
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 415 def patch_async(application_object_id, parameters, custom_headers:nil) fail ArgumentError, 'application_object_id is nil' if application_object_id.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::GraphRbac::V1_6::Models::ApplicationUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '{tenantID}/applications/{applicationObjectId}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'applicationObjectId' => application_object_id,'tenantID' => @client.tenant_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#patch_with_http_info(application_object_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update an existing application.
existing application. will be added to the HTTP request.
400 401 402 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 400 def patch_with_http_info(application_object_id, parameters, custom_headers:nil) patch_async(application_object_id, parameters, custom_headers:custom_headers).value! end |
#update_key_credentials(application_object_id, parameters, custom_headers: nil) ⇒ Object
Update the keyCredentials associated with an application.
keyCredentials of an existing application. will be added to the HTTP request.
760 761 762 763 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 760 def update_key_credentials(application_object_id, parameters, custom_headers:nil) response = update_key_credentials_async(application_object_id, parameters, custom_headers:custom_headers).value! nil end |
#update_key_credentials_async(application_object_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update the keyCredentials associated with an application.
keyCredentials of an existing application. to the HTTP request.
791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 791 def update_key_credentials_async(application_object_id, parameters, custom_headers:nil) fail ArgumentError, 'application_object_id is nil' if application_object_id.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::GraphRbac::V1_6::Models::KeyCredentialsUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '{tenantID}/applications/{applicationObjectId}/keyCredentials' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'applicationObjectId' => application_object_id,'tenantID' => @client.tenant_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#update_key_credentials_with_http_info(application_object_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the keyCredentials associated with an application.
keyCredentials of an existing application. will be added to the HTTP request.
776 777 778 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 776 def update_key_credentials_with_http_info(application_object_id, parameters, custom_headers:nil) update_key_credentials_async(application_object_id, parameters, custom_headers:custom_headers).value! end |
#update_password_credentials(application_object_id, parameters, custom_headers: nil) ⇒ Object
Update passwordCredentials associated with an application.
passwordCredentials of an existing application. will be added to the HTTP request.
939 940 941 942 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 939 def update_password_credentials(application_object_id, parameters, custom_headers:nil) response = update_password_credentials_async(application_object_id, parameters, custom_headers:custom_headers).value! nil end |
#update_password_credentials_async(application_object_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update passwordCredentials associated with an application.
passwordCredentials of an existing application. to the HTTP request.
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 970 def update_password_credentials_async(application_object_id, parameters, custom_headers:nil) fail ArgumentError, 'application_object_id is nil' if application_object_id.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::GraphRbac::V1_6::Models::PasswordCredentialsUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '{tenantID}/applications/{applicationObjectId}/passwordCredentials' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'applicationObjectId' => application_object_id,'tenantID' => @client.tenant_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRest::HttpOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result end promise.execute end |
#update_password_credentials_with_http_info(application_object_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update passwordCredentials associated with an application.
passwordCredentials of an existing application. will be added to the HTTP request.
955 956 957 |
# File 'lib/1.6/generated/azure_graph_rbac/applications.rb', line 955 def update_password_credentials_with_http_info(application_object_id, parameters, custom_headers:nil) update_password_credentials_async(application_object_id, parameters, custom_headers:custom_headers).value! end |