azure_mgmt_graph 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/azure_mgmt_graph.gemspec +1 -1
  3. data/lib/generated/azure_mgmt_graph.rb +5 -0
  4. data/lib/generated/azure_mgmt_graph/applications.rb +395 -6
  5. data/lib/generated/azure_mgmt_graph/graph_rbac_management_client.rb +2 -2
  6. data/lib/generated/azure_mgmt_graph/groups.rb +16 -16
  7. data/lib/generated/azure_mgmt_graph/models/aadobject.rb +10 -11
  8. data/lib/generated/azure_mgmt_graph/models/adgroup.rb +5 -5
  9. data/lib/generated/azure_mgmt_graph/models/application.rb +7 -7
  10. data/lib/generated/azure_mgmt_graph/models/application_create_parameters.rb +4 -5
  11. data/lib/generated/azure_mgmt_graph/models/application_update_parameters.rb +14 -4
  12. data/lib/generated/azure_mgmt_graph/models/get_objects_result.rb +1 -1
  13. data/lib/generated/azure_mgmt_graph/models/graph_error.rb +54 -0
  14. data/lib/generated/azure_mgmt_graph/models/group_list_result.rb +2 -2
  15. data/lib/generated/azure_mgmt_graph/models/key_credential.rb +8 -7
  16. data/lib/generated/azure_mgmt_graph/models/key_credential_list_result.rb +52 -0
  17. data/lib/generated/azure_mgmt_graph/models/key_credentials_update_parameters.rb +52 -0
  18. data/lib/generated/azure_mgmt_graph/models/password_credential.rb +5 -5
  19. data/lib/generated/azure_mgmt_graph/models/password_credential_list_result.rb +52 -0
  20. data/lib/generated/azure_mgmt_graph/models/password_credentials_update_parameters.rb +52 -0
  21. data/lib/generated/azure_mgmt_graph/models/service_principal.rb +5 -5
  22. data/lib/generated/azure_mgmt_graph/models/service_principal_create_parameters.rb +38 -1
  23. data/lib/generated/azure_mgmt_graph/models/service_principal_list_result.rb +2 -3
  24. data/lib/generated/azure_mgmt_graph/models/user.rb +6 -6
  25. data/lib/generated/azure_mgmt_graph/models/user_list_result.rb +2 -2
  26. data/lib/generated/azure_mgmt_graph/objects.rb +2 -2
  27. data/lib/generated/azure_mgmt_graph/service_principals.rb +406 -8
  28. data/lib/generated/azure_mgmt_graph/users.rb +10 -10
  29. data/lib/generated/azure_mgmt_graph/version.rb +1 -1
  30. metadata +9 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38461a1a9bfb8a21486b615869ad8193876d0a72
4
- data.tar.gz: c6456ad99067ade973176bb505b1e3c7737cc2de
3
+ metadata.gz: 876e7adc6afb8da8ea9dc1dece02ddf3b21b4cb0
4
+ data.tar.gz: 75415e5f20b26071336f3507569cbb60be9b3b01
5
5
  SHA512:
6
- metadata.gz: 438c0c8ed4ab24db5fbba0e458e5b7faaeaf3456a126779ee27f70213a55d64bc6afcbf7dad9a0986db338ecfa9cbde117e1e154eb593ce3d72003d1a54938a7
7
- data.tar.gz: 27430640d52acd6102d6677ffb61aa12af17cdc7b9e01f6e0a9708e8e54fd5056c31305ddf0efc382632c5881da7c5ed833a349ec46a0337450a242228a5c6d7
6
+ metadata.gz: 8ad8b1e2699d09ec98be07679a9552d0f3f608669d81be8cf9755c91025b811918c0e86262fdcd1f7058033a9399b814458656bf703855311b8fcf6b999497f8
7
+ data.tar.gz: 949afc898140b27fb89dd6a60d6259076ac903d7440baff03280daa8e41f5c67a020c5d966fefd2dcd3204da98e18f07899dc6253744ef3748c273c4c58aecd9
@@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'rspec', '~> 3'
31
31
  spec.add_development_dependency 'dotenv', '~> 2'
32
32
 
33
- spec.add_runtime_dependency 'ms_rest_azure', '~> 0.3.0'
33
+ spec.add_runtime_dependency 'ms_rest_azure', '~> 0.4.0'
34
34
  end
@@ -28,12 +28,17 @@ module Azure::ARM::Graph
28
28
  autoload :GraphRbacManagementClient, 'generated/azure_mgmt_graph/graph_rbac_management_client.rb'
29
29
 
30
30
  module Models
31
+ autoload :GraphError, 'generated/azure_mgmt_graph/models/graph_error.rb'
31
32
  autoload :KeyCredential, 'generated/azure_mgmt_graph/models/key_credential.rb'
32
33
  autoload :PasswordCredential, 'generated/azure_mgmt_graph/models/password_credential.rb'
33
34
  autoload :ApplicationCreateParameters, 'generated/azure_mgmt_graph/models/application_create_parameters.rb'
34
35
  autoload :ApplicationUpdateParameters, 'generated/azure_mgmt_graph/models/application_update_parameters.rb'
35
36
  autoload :Application, 'generated/azure_mgmt_graph/models/application.rb'
36
37
  autoload :ApplicationListResult, 'generated/azure_mgmt_graph/models/application_list_result.rb'
38
+ autoload :KeyCredentialListResult, 'generated/azure_mgmt_graph/models/key_credential_list_result.rb'
39
+ autoload :KeyCredentialsUpdateParameters, 'generated/azure_mgmt_graph/models/key_credentials_update_parameters.rb'
40
+ autoload :PasswordCredentialListResult, 'generated/azure_mgmt_graph/models/password_credential_list_result.rb'
41
+ autoload :PasswordCredentialsUpdateParameters, 'generated/azure_mgmt_graph/models/password_credentials_update_parameters.rb'
37
42
  autoload :AADObject, 'generated/azure_mgmt_graph/models/aadobject.rb'
38
43
  autoload :GetObjectsResult, 'generated/azure_mgmt_graph/models/get_objects_result.rb'
39
44
  autoload :GroupAddMemberParameters, 'generated/azure_mgmt_graph/models/group_add_member_parameters.rb'
@@ -19,7 +19,7 @@ module Azure::ARM::Graph
19
19
  @client = client
20
20
  end
21
21
 
22
- # @return reference to the GraphRbacManagementClient
22
+ # @return [GraphRbacManagementClient] reference to the GraphRbacManagementClient
23
23
  attr_reader :client
24
24
 
25
25
  #
@@ -104,7 +104,7 @@ module Azure::ARM::Graph
104
104
  response_content = http_response.body
105
105
  unless status_code == 201
106
106
  error_model = JSON.load(response_content)
107
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
107
+ fail MsRest::HttpOperationError.new(request, http_response, error_model)
108
108
  end
109
109
 
110
110
  # Create Result
@@ -196,7 +196,7 @@ module Azure::ARM::Graph
196
196
  response_content = http_response.body
197
197
  unless status_code == 200
198
198
  error_model = JSON.load(response_content)
199
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
199
+ fail MsRest::HttpOperationError.new(request, http_response, error_model)
200
200
  end
201
201
 
202
202
  # Create Result
@@ -289,7 +289,7 @@ module Azure::ARM::Graph
289
289
  response_content = http_response.body
290
290
  unless status_code == 204
291
291
  error_model = JSON.load(response_content)
292
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
292
+ fail MsRest::HttpOperationError.new(request, http_response, error_model)
293
293
  end
294
294
 
295
295
  # Create Result
@@ -373,7 +373,7 @@ module Azure::ARM::Graph
373
373
  response_content = http_response.body
374
374
  unless status_code == 200
375
375
  error_model = JSON.load(response_content)
376
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
376
+ fail MsRest::HttpOperationError.new(request, http_response, error_model)
377
377
  end
378
378
 
379
379
  # Create Result
@@ -482,7 +482,396 @@ module Azure::ARM::Graph
482
482
  response_content = http_response.body
483
483
  unless status_code == 204
484
484
  error_model = JSON.load(response_content)
485
- fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
485
+ fail MsRest::HttpOperationError.new(request, http_response, error_model)
486
+ end
487
+
488
+ # Create Result
489
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
490
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
491
+
492
+ result
493
+ end
494
+
495
+ promise.execute
496
+ end
497
+
498
+ #
499
+ # Get keyCredentials associated with the application by object Id. Reference:
500
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#keycredential-type
501
+ #
502
+ # @param application_object_id [String] Application object id
503
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
504
+ # will be added to the HTTP request.
505
+ #
506
+ # @return [KeyCredentialListResult] operation results.
507
+ #
508
+ def list_key_credentials(application_object_id, custom_headers = nil)
509
+ response = list_key_credentials_async(application_object_id, custom_headers).value!
510
+ response.body unless response.nil?
511
+ end
512
+
513
+ #
514
+ # Get keyCredentials associated with the application by object Id. Reference:
515
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#keycredential-type
516
+ #
517
+ # @param application_object_id [String] Application object id
518
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
519
+ # will be added to the HTTP request.
520
+ #
521
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
522
+ #
523
+ def list_key_credentials_with_http_info(application_object_id, custom_headers = nil)
524
+ list_key_credentials_async(application_object_id, custom_headers).value!
525
+ end
526
+
527
+ #
528
+ # Get keyCredentials associated with the application by object Id. Reference:
529
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#keycredential-type
530
+ #
531
+ # @param application_object_id [String] Application object id
532
+ # @param [Hash{String => String}] A hash of custom headers that will be added
533
+ # to the HTTP request.
534
+ #
535
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
536
+ #
537
+ def list_key_credentials_async(application_object_id, custom_headers = nil)
538
+ fail ArgumentError, 'application_object_id is nil' if application_object_id.nil?
539
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
540
+ fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
541
+
542
+
543
+ request_headers = {}
544
+
545
+ # Set Headers
546
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
547
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
548
+ path_template = '/{tenantID}/applications/{applicationObjectId}/keyCredentials'
549
+ options = {
550
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
551
+ path_params: {'tenantID' => @client.tenant_id},
552
+ skip_encoding_path_params: {'applicationObjectId' => application_object_id},
553
+ query_params: {'api-version' => @client.api_version},
554
+ headers: request_headers.merge(custom_headers || {})
555
+ }
556
+
557
+ request_url = @base_url || @client.base_url
558
+
559
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
560
+ promise = request.run_promise do |req|
561
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
562
+ end
563
+
564
+ promise = promise.then do |http_response|
565
+ status_code = http_response.status
566
+ response_content = http_response.body
567
+ unless status_code == 200
568
+ error_model = JSON.load(response_content)
569
+ fail MsRest::HttpOperationError.new(request, http_response, error_model)
570
+ end
571
+
572
+ # Create Result
573
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
574
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
575
+ # Deserialize Response
576
+ if status_code == 200
577
+ begin
578
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
579
+ result_mapper = KeyCredentialListResult.mapper()
580
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
581
+ rescue Exception => e
582
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
583
+ end
584
+ end
585
+
586
+ result
587
+ end
588
+
589
+ promise.execute
590
+ end
591
+
592
+ #
593
+ # Update keyCredentials associated with an existing application. Reference:
594
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#keycredential-type
595
+ #
596
+ # @param application_object_id [String] Application object id
597
+ # @param parameters [KeyCredentialsUpdateParameters] Parameters to update
598
+ # keyCredentials of an existing application.
599
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
600
+ # will be added to the HTTP request.
601
+ #
602
+ #
603
+ def update_key_credentials(application_object_id, parameters, custom_headers = nil)
604
+ response = update_key_credentials_async(application_object_id, parameters, custom_headers).value!
605
+ nil
606
+ end
607
+
608
+ #
609
+ # Update keyCredentials associated with an existing application. Reference:
610
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#keycredential-type
611
+ #
612
+ # @param application_object_id [String] Application object id
613
+ # @param parameters [KeyCredentialsUpdateParameters] Parameters to update
614
+ # keyCredentials of an existing application.
615
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
616
+ # will be added to the HTTP request.
617
+ #
618
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
619
+ #
620
+ def update_key_credentials_with_http_info(application_object_id, parameters, custom_headers = nil)
621
+ update_key_credentials_async(application_object_id, parameters, custom_headers).value!
622
+ end
623
+
624
+ #
625
+ # Update keyCredentials associated with an existing application. Reference:
626
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#keycredential-type
627
+ #
628
+ # @param application_object_id [String] Application object id
629
+ # @param parameters [KeyCredentialsUpdateParameters] Parameters to update
630
+ # keyCredentials of an existing application.
631
+ # @param [Hash{String => String}] A hash of custom headers that will be added
632
+ # to the HTTP request.
633
+ #
634
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
635
+ #
636
+ def update_key_credentials_async(application_object_id, parameters, custom_headers = nil)
637
+ fail ArgumentError, 'application_object_id is nil' if application_object_id.nil?
638
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
639
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
640
+ fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
641
+
642
+
643
+ request_headers = {}
644
+
645
+ # Set Headers
646
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
647
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
648
+
649
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
650
+
651
+ # Serialize Request
652
+ request_mapper = KeyCredentialsUpdateParameters.mapper()
653
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
654
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
655
+
656
+ path_template = '/{tenantID}/applications/{applicationObjectId}/keyCredentials'
657
+ options = {
658
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
659
+ path_params: {'tenantID' => @client.tenant_id},
660
+ skip_encoding_path_params: {'applicationObjectId' => application_object_id},
661
+ query_params: {'api-version' => @client.api_version},
662
+ body: request_content,
663
+ headers: request_headers.merge(custom_headers || {})
664
+ }
665
+
666
+ request_url = @base_url || @client.base_url
667
+
668
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
669
+ promise = request.run_promise do |req|
670
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
671
+ end
672
+
673
+ promise = promise.then do |http_response|
674
+ status_code = http_response.status
675
+ response_content = http_response.body
676
+ unless status_code == 204
677
+ error_model = JSON.load(response_content)
678
+ fail MsRest::HttpOperationError.new(request, http_response, error_model)
679
+ end
680
+
681
+ # Create Result
682
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
683
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
684
+
685
+ result
686
+ end
687
+
688
+ promise.execute
689
+ end
690
+
691
+ #
692
+ # Gets passwordCredentials associated with an existing application. Reference:
693
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#passwordcredential-type
694
+ #
695
+ # @param application_object_id [String] Application object id
696
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
697
+ # will be added to the HTTP request.
698
+ #
699
+ # @return [PasswordCredentialListResult] operation results.
700
+ #
701
+ def list_password_credentials(application_object_id, custom_headers = nil)
702
+ response = list_password_credentials_async(application_object_id, custom_headers).value!
703
+ response.body unless response.nil?
704
+ end
705
+
706
+ #
707
+ # Gets passwordCredentials associated with an existing application. Reference:
708
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#passwordcredential-type
709
+ #
710
+ # @param application_object_id [String] Application object id
711
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
712
+ # will be added to the HTTP request.
713
+ #
714
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
715
+ #
716
+ def list_password_credentials_with_http_info(application_object_id, custom_headers = nil)
717
+ list_password_credentials_async(application_object_id, custom_headers).value!
718
+ end
719
+
720
+ #
721
+ # Gets passwordCredentials associated with an existing application. Reference:
722
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#passwordcredential-type
723
+ #
724
+ # @param application_object_id [String] Application object id
725
+ # @param [Hash{String => String}] A hash of custom headers that will be added
726
+ # to the HTTP request.
727
+ #
728
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
729
+ #
730
+ def list_password_credentials_async(application_object_id, custom_headers = nil)
731
+ fail ArgumentError, 'application_object_id is nil' if application_object_id.nil?
732
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
733
+ fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
734
+
735
+
736
+ request_headers = {}
737
+
738
+ # Set Headers
739
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
740
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
741
+ path_template = '/{tenantID}/applications/{applicationObjectId}/passwordCredentials'
742
+ options = {
743
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
744
+ path_params: {'tenantID' => @client.tenant_id},
745
+ skip_encoding_path_params: {'applicationObjectId' => application_object_id},
746
+ query_params: {'api-version' => @client.api_version},
747
+ headers: request_headers.merge(custom_headers || {})
748
+ }
749
+
750
+ request_url = @base_url || @client.base_url
751
+
752
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
753
+ promise = request.run_promise do |req|
754
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
755
+ end
756
+
757
+ promise = promise.then do |http_response|
758
+ status_code = http_response.status
759
+ response_content = http_response.body
760
+ unless status_code == 200
761
+ error_model = JSON.load(response_content)
762
+ fail MsRest::HttpOperationError.new(request, http_response, error_model)
763
+ end
764
+
765
+ # Create Result
766
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
767
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
768
+ # Deserialize Response
769
+ if status_code == 200
770
+ begin
771
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
772
+ result_mapper = PasswordCredentialListResult.mapper()
773
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
774
+ rescue Exception => e
775
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
776
+ end
777
+ end
778
+
779
+ result
780
+ end
781
+
782
+ promise.execute
783
+ end
784
+
785
+ #
786
+ # Updates passwordCredentials associated with an existing application.
787
+ # Reference:
788
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#passwordcredential-type
789
+ #
790
+ # @param application_object_id [String] Application object id
791
+ # @param parameters [PasswordCredentialsUpdateParameters] Parameters to update
792
+ # passwordCredentials of an existing application.
793
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
794
+ # will be added to the HTTP request.
795
+ #
796
+ #
797
+ def update_password_credentials(application_object_id, parameters, custom_headers = nil)
798
+ response = update_password_credentials_async(application_object_id, parameters, custom_headers).value!
799
+ nil
800
+ end
801
+
802
+ #
803
+ # Updates passwordCredentials associated with an existing application.
804
+ # Reference:
805
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#passwordcredential-type
806
+ #
807
+ # @param application_object_id [String] Application object id
808
+ # @param parameters [PasswordCredentialsUpdateParameters] Parameters to update
809
+ # passwordCredentials of an existing application.
810
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
811
+ # will be added to the HTTP request.
812
+ #
813
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
814
+ #
815
+ def update_password_credentials_with_http_info(application_object_id, parameters, custom_headers = nil)
816
+ update_password_credentials_async(application_object_id, parameters, custom_headers).value!
817
+ end
818
+
819
+ #
820
+ # Updates passwordCredentials associated with an existing application.
821
+ # Reference:
822
+ # https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#passwordcredential-type
823
+ #
824
+ # @param application_object_id [String] Application object id
825
+ # @param parameters [PasswordCredentialsUpdateParameters] Parameters to update
826
+ # passwordCredentials of an existing application.
827
+ # @param [Hash{String => String}] A hash of custom headers that will be added
828
+ # to the HTTP request.
829
+ #
830
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
831
+ #
832
+ def update_password_credentials_async(application_object_id, parameters, custom_headers = nil)
833
+ fail ArgumentError, 'application_object_id is nil' if application_object_id.nil?
834
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
835
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
836
+ fail ArgumentError, '@client.tenant_id is nil' if @client.tenant_id.nil?
837
+
838
+
839
+ request_headers = {}
840
+
841
+ # Set Headers
842
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
843
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
844
+
845
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
846
+
847
+ # Serialize Request
848
+ request_mapper = PasswordCredentialsUpdateParameters.mapper()
849
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
850
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
851
+
852
+ path_template = '/{tenantID}/applications/{applicationObjectId}/passwordCredentials'
853
+ options = {
854
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
855
+ path_params: {'tenantID' => @client.tenant_id},
856
+ skip_encoding_path_params: {'applicationObjectId' => application_object_id},
857
+ query_params: {'api-version' => @client.api_version},
858
+ body: request_content,
859
+ headers: request_headers.merge(custom_headers || {})
860
+ }
861
+
862
+ request_url = @base_url || @client.base_url
863
+
864
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
865
+ promise = request.run_promise do |req|
866
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
867
+ end
868
+
869
+ promise = promise.then do |http_response|
870
+ status_code = http_response.status
871
+ response_content = http_response.body
872
+ unless status_code == 204
873
+ error_model = JSON.load(response_content)
874
+ fail MsRest::HttpOperationError.new(request, http_response, error_model)
486
875
  end
487
876
 
488
877
  # Create Result