oraclebmc 1.2.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/{README.md → README_BMCS.md} +21 -26
  3. data/lib/oraclebmc.rb +1 -19
  4. metadata +16 -259
  5. data/lib/oraclebmc/api_client.rb +0 -306
  6. data/lib/oraclebmc/config.rb +0 -80
  7. data/lib/oraclebmc/config_file_loader.rb +0 -85
  8. data/lib/oraclebmc/core/blockstorage_client.rb +0 -460
  9. data/lib/oraclebmc/core/compute_client.rb +0 -1267
  10. data/lib/oraclebmc/core/core.rb +0 -112
  11. data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +0 -137
  12. data/lib/oraclebmc/core/models/attach_vnic_details.rb +0 -144
  13. data/lib/oraclebmc/core/models/attach_volume_details.rb +0 -165
  14. data/lib/oraclebmc/core/models/capture_console_history_details.rb +0 -120
  15. data/lib/oraclebmc/core/models/console_history.rb +0 -213
  16. data/lib/oraclebmc/core/models/cpe.rb +0 -169
  17. data/lib/oraclebmc/core/models/create_cpe_details.rb +0 -145
  18. data/lib/oraclebmc/core/models/create_cross_connect_details.rb +0 -204
  19. data/lib/oraclebmc/core/models/create_cross_connect_group_details.rb +0 -133
  20. data/lib/oraclebmc/core/models/create_dhcp_details.rb +0 -153
  21. data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +0 -142
  22. data/lib/oraclebmc/core/models/create_drg_details.rb +0 -131
  23. data/lib/oraclebmc/core/models/create_image_details.rb +0 -159
  24. data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +0 -153
  25. data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +0 -168
  26. data/lib/oraclebmc/core/models/create_private_ip_details.rb +0 -173
  27. data/lib/oraclebmc/core/models/create_route_table_details.rb +0 -153
  28. data/lib/oraclebmc/core/models/create_security_list_details.rb +0 -164
  29. data/lib/oraclebmc/core/models/create_subnet_details.rb +0 -257
  30. data/lib/oraclebmc/core/models/create_vcn_details.rb +0 -171
  31. data/lib/oraclebmc/core/models/create_virtual_circuit_details.rb +0 -260
  32. data/lib/oraclebmc/core/models/create_vnic_details.rb +0 -214
  33. data/lib/oraclebmc/core/models/create_volume_backup_details.rb +0 -133
  34. data/lib/oraclebmc/core/models/create_volume_details.rb +0 -170
  35. data/lib/oraclebmc/core/models/cross_connect.rb +0 -235
  36. data/lib/oraclebmc/core/models/cross_connect_group.rb +0 -187
  37. data/lib/oraclebmc/core/models/cross_connect_location.rb +0 -134
  38. data/lib/oraclebmc/core/models/cross_connect_mapping.rb +0 -190
  39. data/lib/oraclebmc/core/models/cross_connect_port_speed_shape.rb +0 -137
  40. data/lib/oraclebmc/core/models/cross_connect_status.rb +0 -200
  41. data/lib/oraclebmc/core/models/dhcp_dns_option.rb +0 -171
  42. data/lib/oraclebmc/core/models/dhcp_option.rb +0 -135
  43. data/lib/oraclebmc/core/models/dhcp_options.rb +0 -208
  44. data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +0 -141
  45. data/lib/oraclebmc/core/models/drg.rb +0 -186
  46. data/lib/oraclebmc/core/models/drg_attachment.rb +0 -208
  47. data/lib/oraclebmc/core/models/egress_security_rule.rb +0 -198
  48. data/lib/oraclebmc/core/models/export_image_details.rb +0 -134
  49. data/lib/oraclebmc/core/models/export_image_via_object_storage_tuple_details.rb +0 -150
  50. data/lib/oraclebmc/core/models/export_image_via_object_storage_uri_details.rb +0 -130
  51. data/lib/oraclebmc/core/models/fast_connect_provider_service.rb +0 -145
  52. data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +0 -212
  53. data/lib/oraclebmc/core/models/icmp_options.rb +0 -131
  54. data/lib/oraclebmc/core/models/image.rb +0 -245
  55. data/lib/oraclebmc/core/models/image_source_details.rb +0 -134
  56. data/lib/oraclebmc/core/models/image_source_via_object_storage_tuple_details.rb +0 -150
  57. data/lib/oraclebmc/core/models/image_source_via_object_storage_uri_details.rb +0 -128
  58. data/lib/oraclebmc/core/models/ingress_security_rule.rb +0 -198
  59. data/lib/oraclebmc/core/models/instance.rb +0 -307
  60. data/lib/oraclebmc/core/models/instance_credentials.rb +0 -131
  61. data/lib/oraclebmc/core/models/internet_gateway.rb +0 -210
  62. data/lib/oraclebmc/core/models/ip_sec_connection.rb +0 -223
  63. data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +0 -153
  64. data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +0 -156
  65. data/lib/oraclebmc/core/models/launch_instance_details.rb +0 -336
  66. data/lib/oraclebmc/core/models/letter_of_authority.rb +0 -194
  67. data/lib/oraclebmc/core/models/port_range.rb +0 -133
  68. data/lib/oraclebmc/core/models/private_ip.rb +0 -248
  69. data/lib/oraclebmc/core/models/route_rule.rb +0 -135
  70. data/lib/oraclebmc/core/models/route_table.rb +0 -208
  71. data/lib/oraclebmc/core/models/security_list.rb +0 -219
  72. data/lib/oraclebmc/core/models/shape.rb +0 -122
  73. data/lib/oraclebmc/core/models/subnet.rb +0 -351
  74. data/lib/oraclebmc/core/models/tcp_options.rb +0 -135
  75. data/lib/oraclebmc/core/models/tunnel_config.rb +0 -151
  76. data/lib/oraclebmc/core/models/tunnel_status.rb +0 -178
  77. data/lib/oraclebmc/core/models/udp_options.rb +0 -135
  78. data/lib/oraclebmc/core/models/update_cpe_details.rb +0 -122
  79. data/lib/oraclebmc/core/models/update_cross_connect_details.rb +0 -138
  80. data/lib/oraclebmc/core/models/update_cross_connect_group_details.rb +0 -122
  81. data/lib/oraclebmc/core/models/update_dhcp_details.rb +0 -132
  82. data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +0 -122
  83. data/lib/oraclebmc/core/models/update_drg_details.rb +0 -122
  84. data/lib/oraclebmc/core/models/update_image_details.rb +0 -124
  85. data/lib/oraclebmc/core/models/update_instance_details.rb +0 -124
  86. data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +0 -133
  87. data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +0 -122
  88. data/lib/oraclebmc/core/models/update_private_ip_details.rb +0 -157
  89. data/lib/oraclebmc/core/models/update_route_table_details.rb +0 -133
  90. data/lib/oraclebmc/core/models/update_security_list_details.rb +0 -144
  91. data/lib/oraclebmc/core/models/update_subnet_details.rb +0 -122
  92. data/lib/oraclebmc/core/models/update_vcn_details.rb +0 -122
  93. data/lib/oraclebmc/core/models/update_virtual_circuit_details.rb +0 -240
  94. data/lib/oraclebmc/core/models/update_vnic_details.rb +0 -144
  95. data/lib/oraclebmc/core/models/update_volume_backup_details.rb +0 -122
  96. data/lib/oraclebmc/core/models/update_volume_details.rb +0 -122
  97. data/lib/oraclebmc/core/models/vcn.rb +0 -276
  98. data/lib/oraclebmc/core/models/virtual_circuit.rb +0 -395
  99. data/lib/oraclebmc/core/models/virtual_circuit_bandwidth_shape.rb +0 -137
  100. data/lib/oraclebmc/core/models/vnic.rb +0 -287
  101. data/lib/oraclebmc/core/models/vnic_attachment.rb +0 -250
  102. data/lib/oraclebmc/core/models/volume.rb +0 -210
  103. data/lib/oraclebmc/core/models/volume_attachment.rb +0 -246
  104. data/lib/oraclebmc/core/models/volume_backup.rb +0 -235
  105. data/lib/oraclebmc/core/util.rb +0 -1
  106. data/lib/oraclebmc/core/virtual_network_client.rb +0 -3419
  107. data/lib/oraclebmc/errors.rb +0 -80
  108. data/lib/oraclebmc/global_context.rb +0 -21
  109. data/lib/oraclebmc/identity/identity.rb +0 -51
  110. data/lib/oraclebmc/identity/identity_client.rb +0 -1983
  111. data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +0 -131
  112. data/lib/oraclebmc/identity/models/api_key.rb +0 -211
  113. data/lib/oraclebmc/identity/models/availability_domain.rb +0 -131
  114. data/lib/oraclebmc/identity/models/compartment.rb +0 -211
  115. data/lib/oraclebmc/identity/models/create_api_key_details.rb +0 -120
  116. data/lib/oraclebmc/identity/models/create_compartment_details.rb +0 -145
  117. data/lib/oraclebmc/identity/models/create_group_details.rb +0 -144
  118. data/lib/oraclebmc/identity/models/create_identity_provider_details.rb +0 -212
  119. data/lib/oraclebmc/identity/models/create_idp_group_mapping_details.rb +0 -133
  120. data/lib/oraclebmc/identity/models/create_policy_details.rb +0 -173
  121. data/lib/oraclebmc/identity/models/create_region_subscription_details.rb +0 -127
  122. data/lib/oraclebmc/identity/models/create_saml2_identity_provider_details.rb +0 -154
  123. data/lib/oraclebmc/identity/models/create_swift_password_details.rb +0 -121
  124. data/lib/oraclebmc/identity/models/create_user_details.rb +0 -144
  125. data/lib/oraclebmc/identity/models/group.rb +0 -211
  126. data/lib/oraclebmc/identity/models/identity_provider.rb +0 -256
  127. data/lib/oraclebmc/identity/models/idp_group_mapping.rb +0 -220
  128. data/lib/oraclebmc/identity/models/policy.rb +0 -237
  129. data/lib/oraclebmc/identity/models/region.rb +0 -141
  130. data/lib/oraclebmc/identity/models/region_subscription.rb +0 -178
  131. data/lib/oraclebmc/identity/models/saml2_identity_provider.rb +0 -180
  132. data/lib/oraclebmc/identity/models/swift_password.rb +0 -226
  133. data/lib/oraclebmc/identity/models/tenancy.rb +0 -158
  134. data/lib/oraclebmc/identity/models/ui_password.rb +0 -187
  135. data/lib/oraclebmc/identity/models/update_compartment_details.rb +0 -120
  136. data/lib/oraclebmc/identity/models/update_group_details.rb +0 -120
  137. data/lib/oraclebmc/identity/models/update_identity_provider_details.rb +0 -160
  138. data/lib/oraclebmc/identity/models/update_idp_group_mapping_details.rb +0 -131
  139. data/lib/oraclebmc/identity/models/update_policy_details.rb +0 -148
  140. data/lib/oraclebmc/identity/models/update_saml2_identity_provider_details.rb +0 -145
  141. data/lib/oraclebmc/identity/models/update_state_details.rb +0 -121
  142. data/lib/oraclebmc/identity/models/update_swift_password_details.rb +0 -120
  143. data/lib/oraclebmc/identity/models/update_user_details.rb +0 -120
  144. data/lib/oraclebmc/identity/models/user.rb +0 -217
  145. data/lib/oraclebmc/identity/models/user_group_membership.rb +0 -209
  146. data/lib/oraclebmc/identity/util.rb +0 -1
  147. data/lib/oraclebmc/internal/internal.rb +0 -11
  148. data/lib/oraclebmc/internal/util.rb +0 -69
  149. data/lib/oraclebmc/load_balancer/load_balancer.rb +0 -46
  150. data/lib/oraclebmc/load_balancer/load_balancer_client.rb +0 -1281
  151. data/lib/oraclebmc/load_balancer/models/backend.rb +0 -220
  152. data/lib/oraclebmc/load_balancer/models/backend_details.rb +0 -206
  153. data/lib/oraclebmc/load_balancer/models/backend_set.rb +0 -179
  154. data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +0 -165
  155. data/lib/oraclebmc/load_balancer/models/certificate.rb +0 -167
  156. data/lib/oraclebmc/load_balancer/models/certificate_details.rb +0 -203
  157. data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +0 -206
  158. data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +0 -178
  159. data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +0 -203
  160. data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +0 -174
  161. data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +0 -219
  162. data/lib/oraclebmc/load_balancer/models/health_checker.rb +0 -223
  163. data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +0 -222
  164. data/lib/oraclebmc/load_balancer/models/ip_address.rb +0 -139
  165. data/lib/oraclebmc/load_balancer/models/listener.rb +0 -174
  166. data/lib/oraclebmc/load_balancer/models/listener_details.rb +0 -160
  167. data/lib/oraclebmc/load_balancer/models/load_balancer.rb +0 -280
  168. data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +0 -120
  169. data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +0 -120
  170. data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +0 -120
  171. data/lib/oraclebmc/load_balancer/models/session_persistence_configuration_details.rb +0 -141
  172. data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +0 -153
  173. data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +0 -153
  174. data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +0 -178
  175. data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +0 -165
  176. data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +0 -221
  177. data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +0 -160
  178. data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +0 -123
  179. data/lib/oraclebmc/load_balancer/models/work_request.rb +0 -229
  180. data/lib/oraclebmc/load_balancer/models/work_request_error.rb +0 -145
  181. data/lib/oraclebmc/load_balancer/util.rb +0 -55
  182. data/lib/oraclebmc/regions.rb +0 -41
  183. data/lib/oraclebmc/response.rb +0 -86
  184. data/lib/oraclebmc/signer.rb +0 -119
  185. data/lib/oraclebmc/version.rb +0 -5
  186. data/lib/oraclebmc/waiter.rb +0 -111
@@ -1,80 +0,0 @@
1
- # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
-
3
- module OracleBMC
4
- module Errors
5
-
6
- # The base error for all requests that return error responses from the service.
7
- class ServiceError < StandardError
8
-
9
- # HTTP status code (such as 200 or 404)
10
- #
11
- # @return [Integer]
12
- attr_reader :statusCode
13
-
14
- # A service-specific error code
15
- #
16
- # @return [String]
17
- attr_reader :serviceCode
18
-
19
- # The request ID, taken from the opc-request-id header.
20
- #
21
- # @return [String]
22
- attr_reader :request_id
23
-
24
- # The error message
25
- #
26
- # @return [String]
27
- attr_reader :message
28
-
29
- def initialize(statusCode, serviceCode, request_id, message)
30
- # We need to mask the message attribute here as otherwise we use StandardError's implementation,
31
- # which calls to_s and so referencing "message" in our to_s in this class would go into an
32
- # infinite loop
33
- if message.nil? || message.strip.empty?
34
- @message = "The service returned error code #{statusCode}"
35
- else
36
- @message = message.strip
37
- end
38
-
39
- super @message
40
-
41
- @statusCode = statusCode
42
- @serviceCode = serviceCode
43
- @request_id = request_id
44
- end
45
-
46
- def to_s
47
- return "{ 'message': '#{message}', 'status': #{statusCode}, 'code': '#{serviceCode}', 'opc-request-id': '#{request_id}'}"
48
- end
49
- end
50
-
51
- # The base error for all network issues (that is, requests that do not reach the server)
52
- class NetworkError < StandardError
53
-
54
- # Error code, which is usually a libcurl error code, not an HTTP error code.
55
- # See http://www.rubydoc.info/github/typhoeus/ethon/master/Ethon%2FCurls%2FCodes%3Aeasy_codes.
56
- attr_reader :code
57
-
58
- def initialize(code)
59
- super "Request could not be completed due to a network error."
60
- @code = code
61
- end
62
- end
63
-
64
- # Raised when the maximum wait time is exceeded.
65
- class MaximumWaitTimeExceededError < StandardError; end
66
-
67
- # Raised when a work request returns as failed while waiting on completion.
68
- class WorkRequestFailedError < StandardError
69
- # The failed work request.
70
- attr_reader :work_request
71
-
72
- def initialize(work_request)
73
- # TODO: May also want to include error_details.
74
- super "Work request failed. ID: #{work_request.id}"
75
- @work_request = work_request
76
- end
77
- end
78
-
79
- end
80
- end
@@ -1,21 +0,0 @@
1
- # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
-
3
- require_relative 'config_file_loader'
4
- require_relative 'api_client'
5
- require_relative 'signer'
6
-
7
- module OracleBMC
8
-
9
- # Gets the global Config, or loads the default config file if a Config has not been set.
10
- #
11
- # @return [Config]
12
- def self.config
13
- @config ||= ConfigFileLoader.load_config
14
- end
15
-
16
- # Set the global Config
17
- def self.config=(c)
18
- @config = c
19
- end
20
-
21
- end
@@ -1,51 +0,0 @@
1
- # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
-
3
- module OracleBMC
4
- module Identity
5
- module Models
6
- end
7
- end
8
- end
9
-
10
- # Require models
11
- require 'oraclebmc/identity/models/add_user_to_group_details'
12
- require 'oraclebmc/identity/models/api_key'
13
- require 'oraclebmc/identity/models/availability_domain'
14
- require 'oraclebmc/identity/models/compartment'
15
- require 'oraclebmc/identity/models/create_api_key_details'
16
- require 'oraclebmc/identity/models/create_compartment_details'
17
- require 'oraclebmc/identity/models/create_group_details'
18
- require 'oraclebmc/identity/models/create_identity_provider_details'
19
- require 'oraclebmc/identity/models/create_idp_group_mapping_details'
20
- require 'oraclebmc/identity/models/create_policy_details'
21
- require 'oraclebmc/identity/models/create_region_subscription_details'
22
- require 'oraclebmc/identity/models/create_saml2_identity_provider_details'
23
- require 'oraclebmc/identity/models/create_swift_password_details'
24
- require 'oraclebmc/identity/models/create_user_details'
25
- require 'oraclebmc/identity/models/group'
26
- require 'oraclebmc/identity/models/identity_provider'
27
- require 'oraclebmc/identity/models/idp_group_mapping'
28
- require 'oraclebmc/identity/models/policy'
29
- require 'oraclebmc/identity/models/region'
30
- require 'oraclebmc/identity/models/region_subscription'
31
- require 'oraclebmc/identity/models/saml2_identity_provider'
32
- require 'oraclebmc/identity/models/swift_password'
33
- require 'oraclebmc/identity/models/tenancy'
34
- require 'oraclebmc/identity/models/ui_password'
35
- require 'oraclebmc/identity/models/update_compartment_details'
36
- require 'oraclebmc/identity/models/update_group_details'
37
- require 'oraclebmc/identity/models/update_identity_provider_details'
38
- require 'oraclebmc/identity/models/update_idp_group_mapping_details'
39
- require 'oraclebmc/identity/models/update_policy_details'
40
- require 'oraclebmc/identity/models/update_saml2_identity_provider_details'
41
- require 'oraclebmc/identity/models/update_state_details'
42
- require 'oraclebmc/identity/models/update_swift_password_details'
43
- require 'oraclebmc/identity/models/update_user_details'
44
- require 'oraclebmc/identity/models/user'
45
- require 'oraclebmc/identity/models/user_group_membership'
46
-
47
- # Require generated clients
48
- require 'oraclebmc/identity/identity_client'
49
-
50
- # Require service utilities
51
- require 'oraclebmc/identity/util'
@@ -1,1983 +0,0 @@
1
- # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
-
3
- require "uri"
4
- require "logger"
5
-
6
- module OracleBMC
7
-
8
- class Identity::IdentityClient
9
-
10
- # Client used to make HTTP requests.
11
- # @return [OracleBMC::ApiClient]
12
- attr_reader :api_client
13
-
14
- # Fully qualified endpoint URL
15
- # @return [String]
16
- attr_reader :endpoint
17
-
18
- # The region, which will usually correspond to a value in {OracleBMC::Regions::REGION_ENUM}.
19
- # @return [String]
20
- attr_accessor :region
21
-
22
- # Creates a new IdentityClient.
23
- # If a config is not specified, then the global OracleBMC.config will be used.
24
- #
25
- # A region must be specified in either the config or the region parameter. If specified
26
- # in both, then the region parameter will be used.
27
- #
28
- # @param [Config] config A Config object.
29
- # @param [String] region A region used to determine the service endpoint. This will usually
30
- # correspond to a value in {OracleBMC::Regions::REGION_ENUM}, but may be an arbitrary string.
31
- #
32
- def initialize(config:nil, region:nil)
33
- config ||= OracleBMC.config
34
- signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase)
35
- @api_client = ApiClient.new(config, signer)
36
-
37
- region ||= config.region
38
- self.region = region
39
- end
40
-
41
- # Set the region that will be used to determine the service endpoint.
42
- # This will usually correspond to a value in {OracleBMC::Regions::REGION_ENUM},
43
- # but may be an arbitrary string.
44
- def region=(r)
45
- @region = r
46
-
47
- fail 'A region must be specified.' unless @region
48
-
49
- @endpoint = OracleBMC::Regions.get_service_endpoint(@region, :IdentityClient) + '/20160918'
50
- logger.info "IdentityClient endpoint set to '#{endpoint}'." if logger
51
- end
52
-
53
- # @return [Logger] The logger for this client. May be nil.
54
- def logger
55
- @api_client.config.logger
56
- end
57
-
58
-
59
- # Adds the specified user to the specified group and returns a `UserGroupMembership` object with its own OCID.
60
- #
61
- # After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the
62
- # object, first make sure its `lifecycleState` has changed to ACTIVE.
63
- #
64
- # @param [AddUserToGroupDetails] add_user_to_group_details Request object for adding a user to a group.
65
- # @param [Hash] opts the optional parameters
66
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
67
- # server error without risk of executing that same action again. Retry tokens expire after 24
68
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
69
- # has been deleted and purged from the system, then a retry of the original creation request
70
- # may be rejected).
71
- #
72
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::UserGroupMembership
73
- def add_user_to_group(add_user_to_group_details, opts = {})
74
- logger.debug "Calling operation IdentityClient#add_user_to_group." if logger
75
-
76
- fail "Missing the required parameter 'add_user_to_group_details' when calling add_user_to_group." if add_user_to_group_details.nil?
77
-
78
- path = "/userGroupMemberships/"
79
-
80
- # Query Params
81
- query_params = {}
82
-
83
- # Header Params
84
- header_params = {}
85
- header_params['accept'] = 'application/json'
86
- header_params['content-type'] = 'application/json'
87
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
88
-
89
- post_body = @api_client.object_to_http_body(add_user_to_group_details)
90
-
91
- return @api_client.call_api(
92
- :POST,
93
- path,
94
- endpoint,
95
- :header_params => header_params,
96
- :query_params => query_params,
97
- :body => post_body,
98
- :return_type => 'OracleBMC::Identity::Models::UserGroupMembership')
99
- end
100
-
101
- # Creates a new compartment in your tenancy.
102
- #
103
- # **Important:** Compartments cannot be renamed or deleted.
104
- #
105
- # You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy
106
- # is simply the root compartment. For information about OCIDs, see
107
- # [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
108
- #
109
- # You must also specify a *name* for the compartment, which must be unique across all compartments in
110
- # your tenancy and cannot be changed. You can use this name or the OCID when writing policies that apply
111
- # to the compartment. For more information about policies, see
112
- # [How Policies Work](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm).
113
- #
114
- # You must also specify a *description* for the compartment (although it can be an empty string). It does
115
- # not have to be unique, and you can change it anytime with
116
- # {#update_compartment update_compartment}.
117
- #
118
- # After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the
119
- # object, first make sure its `lifecycleState` has changed to ACTIVE.
120
- #
121
- # @param [CreateCompartmentDetails] create_compartment_details Request object for creating a new compartment.
122
- # @param [Hash] opts the optional parameters
123
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
124
- # server error without risk of executing that same action again. Retry tokens expire after 24
125
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
126
- # has been deleted and purged from the system, then a retry of the original creation request
127
- # may be rejected).
128
- #
129
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::Compartment
130
- def create_compartment(create_compartment_details, opts = {})
131
- logger.debug "Calling operation IdentityClient#create_compartment." if logger
132
-
133
- fail "Missing the required parameter 'create_compartment_details' when calling create_compartment." if create_compartment_details.nil?
134
-
135
- path = "/compartments/"
136
-
137
- # Query Params
138
- query_params = {}
139
-
140
- # Header Params
141
- header_params = {}
142
- header_params['accept'] = 'application/json'
143
- header_params['content-type'] = 'application/json'
144
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
145
-
146
- post_body = @api_client.object_to_http_body(create_compartment_details)
147
-
148
- return @api_client.call_api(
149
- :POST,
150
- path,
151
- endpoint,
152
- :header_params => header_params,
153
- :query_params => query_params,
154
- :body => post_body,
155
- :return_type => 'OracleBMC::Identity::Models::Compartment')
156
- end
157
-
158
- # Creates a new group in your tenancy.
159
- #
160
- # You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy
161
- # is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies)
162
- # reside within the tenancy itself, unlike cloud resources such as compute instances, which typically
163
- # reside within compartments inside the tenancy. For information about OCIDs, see
164
- # [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
165
- #
166
- # You must also specify a *name* for the group, which must be unique across all groups in your tenancy and
167
- # cannot be changed. You can use this name or the OCID when writing policies that apply to the group. For more
168
- # information about policies, see [How Policies Work](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm).
169
- #
170
- # You must also specify a *description* for the group (although it can be an empty string). It does not
171
- # have to be unique, and you can change it anytime with {#update_group update_group}.
172
- #
173
- # After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the
174
- # object, first make sure its `lifecycleState` has changed to ACTIVE.
175
- #
176
- # After creating the group, you need to put users in it and write policies for it.
177
- # See {#add_user_to_group add_user_to_group} and
178
- # {#create_policy create_policy}.
179
- #
180
- # @param [CreateGroupDetails] create_group_details Request object for creating a new group.
181
- # @param [Hash] opts the optional parameters
182
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
183
- # server error without risk of executing that same action again. Retry tokens expire after 24
184
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
185
- # has been deleted and purged from the system, then a retry of the original creation request
186
- # may be rejected).
187
- #
188
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::Group
189
- def create_group(create_group_details, opts = {})
190
- logger.debug "Calling operation IdentityClient#create_group." if logger
191
-
192
- fail "Missing the required parameter 'create_group_details' when calling create_group." if create_group_details.nil?
193
-
194
- path = "/groups/"
195
-
196
- # Query Params
197
- query_params = {}
198
-
199
- # Header Params
200
- header_params = {}
201
- header_params['accept'] = 'application/json'
202
- header_params['content-type'] = 'application/json'
203
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
204
-
205
- post_body = @api_client.object_to_http_body(create_group_details)
206
-
207
- return @api_client.call_api(
208
- :POST,
209
- path,
210
- endpoint,
211
- :header_params => header_params,
212
- :query_params => query_params,
213
- :body => post_body,
214
- :return_type => 'OracleBMC::Identity::Models::Group')
215
- end
216
-
217
- # Creates a new identity provider in your tenancy. For more information, see
218
- # [Identity Providers and Federation](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/federation.htm).
219
- #
220
- # You must specify your tenancy's OCID as the compartment ID in the request object.
221
- # Remember that the tenancy is simply the root compartment. For information about
222
- # OCIDs, see [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
223
- #
224
- # You must also specify a *name* for the `IdentityProvider`, which must be unique
225
- # across all `IdentityProvider` objects in your tenancy and cannot be changed.
226
- #
227
- # You must also specify a *description* for the `IdentityProvider` (although
228
- # it can be an empty string). It does not have to be unique, and you can change
229
- # it anytime with
230
- # {#update_identity_provider update_identity_provider}.
231
- #
232
- # After you send your request, the new object's `lifecycleState` will temporarily
233
- # be CREATING. Before using the object, first make sure its `lifecycleState` has
234
- # changed to ACTIVE.
235
- #
236
- # @param [CreateIdentityProviderDetails] create_identity_provider_details Request object for creating a new SAML2 identity provider.
237
- # @param [Hash] opts the optional parameters
238
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
239
- # server error without risk of executing that same action again. Retry tokens expire after 24
240
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
241
- # has been deleted and purged from the system, then a retry of the original creation request
242
- # may be rejected).
243
- #
244
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::IdentityProvider
245
- def create_identity_provider(create_identity_provider_details, opts = {})
246
- logger.debug "Calling operation IdentityClient#create_identity_provider." if logger
247
-
248
- fail "Missing the required parameter 'create_identity_provider_details' when calling create_identity_provider." if create_identity_provider_details.nil?
249
-
250
- path = "/identityProviders/"
251
-
252
- # Query Params
253
- query_params = {}
254
-
255
- # Header Params
256
- header_params = {}
257
- header_params['accept'] = 'application/json'
258
- header_params['content-type'] = 'application/json'
259
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
260
-
261
- post_body = @api_client.object_to_http_body(create_identity_provider_details)
262
-
263
- return @api_client.call_api(
264
- :POST,
265
- path,
266
- endpoint,
267
- :header_params => header_params,
268
- :query_params => query_params,
269
- :body => post_body,
270
- :return_type => 'OracleBMC::Identity::Models::IdentityProvider')
271
- end
272
-
273
- # Creates a single mapping between an IdP group and an IAM Service
274
- # {Group}.
275
- #
276
- # @param [CreateIdpGroupMappingDetails] create_idp_group_mapping_details Add a mapping from an SAML2.0 identity provider group to a BMC group.
277
- # @param [String] identity_provider_id The OCID of the identity provider.
278
- # @param [Hash] opts the optional parameters
279
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
280
- # server error without risk of executing that same action again. Retry tokens expire after 24
281
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
282
- # has been deleted and purged from the system, then a retry of the original creation request
283
- # may be rejected).
284
- #
285
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::IdpGroupMapping
286
- def create_idp_group_mapping(create_idp_group_mapping_details, identity_provider_id, opts = {})
287
- logger.debug "Calling operation IdentityClient#create_idp_group_mapping." if logger
288
-
289
- fail "Missing the required parameter 'create_idp_group_mapping_details' when calling create_idp_group_mapping." if create_idp_group_mapping_details.nil?
290
- fail "Missing the required parameter 'identity_provider_id' when calling create_idp_group_mapping." if identity_provider_id.nil?
291
-
292
- path = "/identityProviders/{identityProviderId}/groupMappings/".sub('{identityProviderId}', identity_provider_id.to_s)
293
-
294
- # Query Params
295
- query_params = {}
296
-
297
- # Header Params
298
- header_params = {}
299
- header_params['accept'] = 'application/json'
300
- header_params['content-type'] = 'application/json'
301
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
302
-
303
- post_body = @api_client.object_to_http_body(create_idp_group_mapping_details)
304
-
305
- return @api_client.call_api(
306
- :POST,
307
- path,
308
- endpoint,
309
- :header_params => header_params,
310
- :query_params => query_params,
311
- :body => post_body,
312
- :return_type => 'OracleBMC::Identity::Models::IdpGroupMapping')
313
- end
314
-
315
- # Creates a new Console one-time password for the specified user. For more information about user
316
- # credentials, see [User Credentials](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/usercredentials.htm).
317
- #
318
- # Use this operation after creating a new user, or if a user forgets their password. The new one-time
319
- # password is returned to you in the response, and you must securely deliver it to the user. They'll
320
- # be prompted to change this password the next time they sign in to the Console. If they don't change
321
- # it within 7 days, the password will expire and you'll need to create a new one-time password for the
322
- # user.
323
- #
324
- # **Note:** The user's Console login is the unique name you specified when you created the user
325
- # (see {#create_user create_user}).
326
- #
327
- # @param [String] user_id The OCID of the user.
328
- # @param [Hash] opts the optional parameters
329
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
330
- # server error without risk of executing that same action again. Retry tokens expire after 24
331
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
332
- # has been deleted and purged from the system, then a retry of the original creation request
333
- # may be rejected).
334
- #
335
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::UIPassword
336
- def create_or_reset_ui_password(user_id, opts = {})
337
- logger.debug "Calling operation IdentityClient#create_or_reset_ui_password." if logger
338
-
339
- fail "Missing the required parameter 'user_id' when calling create_or_reset_ui_password." if user_id.nil?
340
-
341
- path = "/users/{userId}/uiPassword".sub('{userId}', user_id.to_s)
342
-
343
- # Query Params
344
- query_params = {}
345
-
346
- # Header Params
347
- header_params = {}
348
- header_params['accept'] = 'application/json'
349
- header_params['content-type'] = 'application/json'
350
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
351
-
352
- post_body = nil
353
-
354
- return @api_client.call_api(
355
- :POST,
356
- path,
357
- endpoint,
358
- :header_params => header_params,
359
- :query_params => query_params,
360
- :body => post_body,
361
- :return_type => 'OracleBMC::Identity::Models::UIPassword')
362
- end
363
-
364
- # Creates a new policy in the specified compartment (either the tenancy or another of your compartments).
365
- # If you're new to policies, see [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
366
- #
367
- # You must specify a *name* for the policy, which must be unique across all policies in your tenancy
368
- # and cannot be changed.
369
- #
370
- # You must also specify a *description* for the policy (although it can be an empty string). It does not
371
- # have to be unique, and you can change it anytime with {#update_policy update_policy}.
372
- #
373
- # You must specify one or more policy statements in the statements array. For information about writing
374
- # policies, see [How Policies Work](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm) and
375
- # [Common Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm).
376
- #
377
- # After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the
378
- # object, first make sure its `lifecycleState` has changed to ACTIVE.
379
- #
380
- # New policies take effect typically within 10 seconds.
381
- #
382
- # @param [CreatePolicyDetails] create_policy_details Request object for creating a new policy.
383
- # @param [Hash] opts the optional parameters
384
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
385
- # server error without risk of executing that same action again. Retry tokens expire after 24
386
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
387
- # has been deleted and purged from the system, then a retry of the original creation request
388
- # may be rejected).
389
- #
390
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::Policy
391
- def create_policy(create_policy_details, opts = {})
392
- logger.debug "Calling operation IdentityClient#create_policy." if logger
393
-
394
- fail "Missing the required parameter 'create_policy_details' when calling create_policy." if create_policy_details.nil?
395
-
396
- path = "/policies/"
397
-
398
- # Query Params
399
- query_params = {}
400
-
401
- # Header Params
402
- header_params = {}
403
- header_params['accept'] = 'application/json'
404
- header_params['content-type'] = 'application/json'
405
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
406
-
407
- post_body = @api_client.object_to_http_body(create_policy_details)
408
-
409
- return @api_client.call_api(
410
- :POST,
411
- path,
412
- endpoint,
413
- :header_params => header_params,
414
- :query_params => query_params,
415
- :body => post_body,
416
- :return_type => 'OracleBMC::Identity::Models::Policy')
417
- end
418
-
419
- # Creates a subscription to a region for a tenancy.
420
- #
421
- # @param [CreateRegionSubscriptionDetails] create_region_subscription_details Request object for activate a new region.
422
- # @param [String] tenancy_id The OCID of the tenancy.
423
- # @param [Hash] opts the optional parameters
424
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
425
- # server error without risk of executing that same action again. Retry tokens expire after 24
426
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
427
- # has been deleted and purged from the system, then a retry of the original creation request
428
- # may be rejected).
429
- #
430
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::RegionSubscription
431
- def create_region_subscription(create_region_subscription_details, tenancy_id, opts = {})
432
- logger.debug "Calling operation IdentityClient#create_region_subscription." if logger
433
-
434
- fail "Missing the required parameter 'create_region_subscription_details' when calling create_region_subscription." if create_region_subscription_details.nil?
435
- fail "Missing the required parameter 'tenancy_id' when calling create_region_subscription." if tenancy_id.nil?
436
-
437
- path = "/tenancies/{tenancyId}/regionSubscriptions".sub('{tenancyId}', tenancy_id.to_s)
438
-
439
- # Query Params
440
- query_params = {}
441
-
442
- # Header Params
443
- header_params = {}
444
- header_params['accept'] = 'application/json'
445
- header_params['content-type'] = 'application/json'
446
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
447
-
448
- post_body = @api_client.object_to_http_body(create_region_subscription_details)
449
-
450
- return @api_client.call_api(
451
- :POST,
452
- path,
453
- endpoint,
454
- :header_params => header_params,
455
- :query_params => query_params,
456
- :body => post_body,
457
- :return_type => 'OracleBMC::Identity::Models::RegionSubscription')
458
- end
459
-
460
- # Creates a new Swift password for the specified user. For information about what Swift passwords are for, see
461
- # [Managing User Credentials](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm).
462
- #
463
- # You must specify a *description* for the Swift password (although it can be an empty string). It does not
464
- # have to be unique, and you can change it anytime with
465
- # {#update_swift_password update_swift_password}.
466
- #
467
- # Every user has permission to create a Swift password for *their own user ID*. An administrator in your organization
468
- # does not need to write a policy to give users this ability. To compare, administrators who have permission to the
469
- # tenancy can use this operation to create a Swift password for any user, including themselves.
470
- #
471
- # @param [CreateSwiftPasswordDetails] create_swift_password_details Request object for creating a new swift password.
472
- # @param [String] user_id The OCID of the user.
473
- # @param [Hash] opts the optional parameters
474
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
475
- # server error without risk of executing that same action again. Retry tokens expire after 24
476
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
477
- # has been deleted and purged from the system, then a retry of the original creation request
478
- # may be rejected).
479
- #
480
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::SwiftPassword
481
- def create_swift_password(create_swift_password_details, user_id, opts = {})
482
- logger.debug "Calling operation IdentityClient#create_swift_password." if logger
483
-
484
- fail "Missing the required parameter 'create_swift_password_details' when calling create_swift_password." if create_swift_password_details.nil?
485
- fail "Missing the required parameter 'user_id' when calling create_swift_password." if user_id.nil?
486
-
487
- path = "/users/{userId}/swiftPasswords/".sub('{userId}', user_id.to_s)
488
-
489
- # Query Params
490
- query_params = {}
491
-
492
- # Header Params
493
- header_params = {}
494
- header_params['accept'] = 'application/json'
495
- header_params['content-type'] = 'application/json'
496
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
497
-
498
- post_body = @api_client.object_to_http_body(create_swift_password_details)
499
-
500
- return @api_client.call_api(
501
- :POST,
502
- path,
503
- endpoint,
504
- :header_params => header_params,
505
- :query_params => query_params,
506
- :body => post_body,
507
- :return_type => 'OracleBMC::Identity::Models::SwiftPassword')
508
- end
509
-
510
- # Creates a new user in your tenancy. For conceptual information about users, your tenancy, and other
511
- # IAM Service components, see [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm).
512
- #
513
- # You must specify your tenancy's OCID as the compartment ID in the request object (remember that the
514
- # tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and
515
- # some policies) reside within the tenancy itself, unlike cloud resources such as compute instances,
516
- # which typically reside within compartments inside the tenancy. For information about OCIDs, see
517
- # [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
518
- #
519
- # You must also specify a *name* for the user, which must be unique across all users in your tenancy
520
- # and cannot be changed. Allowed characters: No spaces. Only letters, numerals, hyphens, periods,
521
- # underscores, +, and @. If you specify a name that's already in use, you'll get a 409 error.
522
- # This name will be the user's login to the Console. You might want to pick a
523
- # name that your company's own identity system (e.g., Active Directory, LDAP, etc.) already uses.
524
- # If you delete a user and then create a new user with the same name, they'll be considered different
525
- # users because they have different OCIDs.
526
- #
527
- # You must also specify a *description* for the user (although it can be an empty string).
528
- # It does not have to be unique, and you can change it anytime with
529
- # {#update_user update_user}. You can use the field to provide the user's
530
- # full name, a description, a nickname, or other information to generally identify the user.
531
- #
532
- # After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before
533
- # using the object, first make sure its `lifecycleState` has changed to ACTIVE.
534
- #
535
- # A new user has no permissions until you place the user in one or more groups (see
536
- # {#add_user_to_group add_user_to_group}). If the user needs to
537
- # access the Console, you need to provide the user a password (see
538
- # {#create_or_reset_ui_password create_or_reset_ui_password}).
539
- # If the user needs to access the Oracle Bare Metal Cloud Services REST API, you need to upload a
540
- # public API signing key for that user (see
541
- # [Required Keys and OCIDs](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm) and also
542
- # {#upload_api_key upload_api_key}).
543
- #
544
- # **Important:** Make sure to inform the new user which compartment(s) they have access to.
545
- #
546
- # @param [CreateUserDetails] create_user_details Request object for creating a new user.
547
- # @param [Hash] opts the optional parameters
548
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
549
- # server error without risk of executing that same action again. Retry tokens expire after 24
550
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
551
- # has been deleted and purged from the system, then a retry of the original creation request
552
- # may be rejected).
553
- #
554
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::User
555
- def create_user(create_user_details, opts = {})
556
- logger.debug "Calling operation IdentityClient#create_user." if logger
557
-
558
- fail "Missing the required parameter 'create_user_details' when calling create_user." if create_user_details.nil?
559
-
560
- path = "/users/"
561
-
562
- # Query Params
563
- query_params = {}
564
-
565
- # Header Params
566
- header_params = {}
567
- header_params['accept'] = 'application/json'
568
- header_params['content-type'] = 'application/json'
569
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
570
-
571
- post_body = @api_client.object_to_http_body(create_user_details)
572
-
573
- return @api_client.call_api(
574
- :POST,
575
- path,
576
- endpoint,
577
- :header_params => header_params,
578
- :query_params => query_params,
579
- :body => post_body,
580
- :return_type => 'OracleBMC::Identity::Models::User')
581
- end
582
-
583
- # Deletes the specified API signing key for the specified user.
584
- #
585
- # Every user has permission to use this operation to delete a key for *their own user ID*. An
586
- # administrator in your organization does not need to write a policy to give users this ability.
587
- # To compare, administrators who have permission to the tenancy can use this operation to delete
588
- # a key for any user, including themselves.
589
- #
590
- # @param [String] user_id The OCID of the user.
591
- # @param [String] fingerprint The key's fingerprint.
592
- # @param [Hash] opts the optional parameters
593
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
594
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
595
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
596
- #
597
- # @return [Response] A Response object with data of type nil
598
- def delete_api_key(user_id, fingerprint, opts = {})
599
- logger.debug "Calling operation IdentityClient#delete_api_key." if logger
600
-
601
- fail "Missing the required parameter 'user_id' when calling delete_api_key." if user_id.nil?
602
- fail "Missing the required parameter 'fingerprint' when calling delete_api_key." if fingerprint.nil?
603
-
604
- path = "/users/{userId}/apiKeys/{fingerprint}".sub('{userId}', user_id.to_s).sub('{fingerprint}', fingerprint.to_s)
605
-
606
- # Query Params
607
- query_params = {}
608
-
609
- # Header Params
610
- header_params = {}
611
- header_params['accept'] = 'application/json'
612
- header_params['content-type'] = 'application/json'
613
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
614
-
615
- post_body = nil
616
-
617
- return @api_client.call_api(
618
- :DELETE,
619
- path,
620
- endpoint,
621
- :header_params => header_params,
622
- :query_params => query_params,
623
- :body => post_body)
624
- end
625
-
626
- # Deletes the specified group. The group must be empty.
627
- #
628
- # @param [String] group_id The OCID of the group.
629
- # @param [Hash] opts the optional parameters
630
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
631
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
632
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
633
- #
634
- # @return [Response] A Response object with data of type nil
635
- def delete_group(group_id, opts = {})
636
- logger.debug "Calling operation IdentityClient#delete_group." if logger
637
-
638
- fail "Missing the required parameter 'group_id' when calling delete_group." if group_id.nil?
639
-
640
- path = "/groups/{groupId}".sub('{groupId}', group_id.to_s)
641
-
642
- # Query Params
643
- query_params = {}
644
-
645
- # Header Params
646
- header_params = {}
647
- header_params['accept'] = 'application/json'
648
- header_params['content-type'] = 'application/json'
649
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
650
-
651
- post_body = nil
652
-
653
- return @api_client.call_api(
654
- :DELETE,
655
- path,
656
- endpoint,
657
- :header_params => header_params,
658
- :query_params => query_params,
659
- :body => post_body)
660
- end
661
-
662
- # Deletes the specified identity provider. The identity provider must not have
663
- # any group mappings (see {IdpGroupMapping}).
664
- #
665
- # @param [String] identity_provider_id The OCID of the identity provider.
666
- # @param [Hash] opts the optional parameters
667
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
668
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
669
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
670
- #
671
- # @return [Response] A Response object with data of type nil
672
- def delete_identity_provider(identity_provider_id, opts = {})
673
- logger.debug "Calling operation IdentityClient#delete_identity_provider." if logger
674
-
675
- fail "Missing the required parameter 'identity_provider_id' when calling delete_identity_provider." if identity_provider_id.nil?
676
-
677
- path = "/identityProviders/{identityProviderId}".sub('{identityProviderId}', identity_provider_id.to_s)
678
-
679
- # Query Params
680
- query_params = {}
681
-
682
- # Header Params
683
- header_params = {}
684
- header_params['accept'] = 'application/json'
685
- header_params['content-type'] = 'application/json'
686
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
687
-
688
- post_body = nil
689
-
690
- return @api_client.call_api(
691
- :DELETE,
692
- path,
693
- endpoint,
694
- :header_params => header_params,
695
- :query_params => query_params,
696
- :body => post_body)
697
- end
698
-
699
- # Deletes the specified group mapping.
700
- # @param [String] identity_provider_id The OCID of the identity provider.
701
- # @param [String] mapping_id The OCID of the group mapping.
702
- # @param [Hash] opts the optional parameters
703
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
704
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
705
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
706
- #
707
- # @return [Response] A Response object with data of type nil
708
- def delete_idp_group_mapping(identity_provider_id, mapping_id, opts = {})
709
- logger.debug "Calling operation IdentityClient#delete_idp_group_mapping." if logger
710
-
711
- fail "Missing the required parameter 'identity_provider_id' when calling delete_idp_group_mapping." if identity_provider_id.nil?
712
- fail "Missing the required parameter 'mapping_id' when calling delete_idp_group_mapping." if mapping_id.nil?
713
-
714
- path = "/identityProviders/{identityProviderId}/groupMappings/{mappingId}".sub('{identityProviderId}', identity_provider_id.to_s).sub('{mappingId}', mapping_id.to_s)
715
-
716
- # Query Params
717
- query_params = {}
718
-
719
- # Header Params
720
- header_params = {}
721
- header_params['accept'] = 'application/json'
722
- header_params['content-type'] = 'application/json'
723
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
724
-
725
- post_body = nil
726
-
727
- return @api_client.call_api(
728
- :DELETE,
729
- path,
730
- endpoint,
731
- :header_params => header_params,
732
- :query_params => query_params,
733
- :body => post_body)
734
- end
735
-
736
- # Deletes the specified policy. The deletion takes effect typically within 10 seconds.
737
- # @param [String] policy_id The OCID of the policy.
738
- # @param [Hash] opts the optional parameters
739
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
740
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
741
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
742
- #
743
- # @return [Response] A Response object with data of type nil
744
- def delete_policy(policy_id, opts = {})
745
- logger.debug "Calling operation IdentityClient#delete_policy." if logger
746
-
747
- fail "Missing the required parameter 'policy_id' when calling delete_policy." if policy_id.nil?
748
-
749
- path = "/policies/{policyId}".sub('{policyId}', policy_id.to_s)
750
-
751
- # Query Params
752
- query_params = {}
753
-
754
- # Header Params
755
- header_params = {}
756
- header_params['accept'] = 'application/json'
757
- header_params['content-type'] = 'application/json'
758
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
759
-
760
- post_body = nil
761
-
762
- return @api_client.call_api(
763
- :DELETE,
764
- path,
765
- endpoint,
766
- :header_params => header_params,
767
- :query_params => query_params,
768
- :body => post_body)
769
- end
770
-
771
- # Deletes the specified Swift password for the specified user.
772
- #
773
- # @param [String] user_id The OCID of the user.
774
- # @param [String] swift_password_id The OCID of the Swift password.
775
- # @param [Hash] opts the optional parameters
776
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
777
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
778
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
779
- #
780
- # @return [Response] A Response object with data of type nil
781
- def delete_swift_password(user_id, swift_password_id, opts = {})
782
- logger.debug "Calling operation IdentityClient#delete_swift_password." if logger
783
-
784
- fail "Missing the required parameter 'user_id' when calling delete_swift_password." if user_id.nil?
785
- fail "Missing the required parameter 'swift_password_id' when calling delete_swift_password." if swift_password_id.nil?
786
-
787
- path = "/users/{userId}/swiftPasswords/{swiftPasswordId}".sub('{userId}', user_id.to_s).sub('{swiftPasswordId}', swift_password_id.to_s)
788
-
789
- # Query Params
790
- query_params = {}
791
-
792
- # Header Params
793
- header_params = {}
794
- header_params['accept'] = 'application/json'
795
- header_params['content-type'] = 'application/json'
796
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
797
-
798
- post_body = nil
799
-
800
- return @api_client.call_api(
801
- :DELETE,
802
- path,
803
- endpoint,
804
- :header_params => header_params,
805
- :query_params => query_params,
806
- :body => post_body)
807
- end
808
-
809
- # Deletes the specified user. The user must not be in any groups.
810
- # @param [String] user_id The OCID of the user.
811
- # @param [Hash] opts the optional parameters
812
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
813
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
814
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
815
- #
816
- # @return [Response] A Response object with data of type nil
817
- def delete_user(user_id, opts = {})
818
- logger.debug "Calling operation IdentityClient#delete_user." if logger
819
-
820
- fail "Missing the required parameter 'user_id' when calling delete_user." if user_id.nil?
821
-
822
- path = "/users/{userId}".sub('{userId}', user_id.to_s)
823
-
824
- # Query Params
825
- query_params = {}
826
-
827
- # Header Params
828
- header_params = {}
829
- header_params['accept'] = 'application/json'
830
- header_params['content-type'] = 'application/json'
831
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
832
-
833
- post_body = nil
834
-
835
- return @api_client.call_api(
836
- :DELETE,
837
- path,
838
- endpoint,
839
- :header_params => header_params,
840
- :query_params => query_params,
841
- :body => post_body)
842
- end
843
-
844
- # Gets the specified compartment's information.
845
- #
846
- # This operation does not return a list of all the resources inside the compartment. There is no single
847
- # API operation that does that. Compartments can contain multiple types of resources (instances, block
848
- # storage volumes, etc.). To find out what's in a compartment, you must call the \"List\" operation for
849
- # each resource type and specify the compartment's OCID as a query parameter in the request. For example,
850
- # call the {#list_instances list_instances} operation in the Cloud Compute
851
- # Service or the {#list_volumes list_volumes} operation in Cloud Block Storage.
852
- #
853
- # @param [String] compartment_id The OCID of the compartment.
854
- # @param [Hash] opts the optional parameters
855
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::Compartment
856
- def get_compartment(compartment_id, opts = {})
857
- logger.debug "Calling operation IdentityClient#get_compartment." if logger
858
-
859
- fail "Missing the required parameter 'compartment_id' when calling get_compartment." if compartment_id.nil?
860
-
861
- path = "/compartments/{compartmentId}".sub('{compartmentId}', compartment_id.to_s)
862
-
863
- # Query Params
864
- query_params = {}
865
-
866
- # Header Params
867
- header_params = {}
868
- header_params['accept'] = 'application/json'
869
- header_params['content-type'] = 'application/json'
870
-
871
- post_body = nil
872
-
873
- return @api_client.call_api(
874
- :GET,
875
- path,
876
- endpoint,
877
- :header_params => header_params,
878
- :query_params => query_params,
879
- :body => post_body,
880
- :return_type => 'OracleBMC::Identity::Models::Compartment')
881
- end
882
-
883
- # Gets the specified group's information.
884
- #
885
- # This operation does not return a list of all the users in the group. To do that, use
886
- # {#list_user_group_memberships list_user_group_memberships} and
887
- # provide the group's OCID as a query parameter in the request.
888
- #
889
- # @param [String] group_id The OCID of the group.
890
- # @param [Hash] opts the optional parameters
891
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::Group
892
- def get_group(group_id, opts = {})
893
- logger.debug "Calling operation IdentityClient#get_group." if logger
894
-
895
- fail "Missing the required parameter 'group_id' when calling get_group." if group_id.nil?
896
-
897
- path = "/groups/{groupId}".sub('{groupId}', group_id.to_s)
898
-
899
- # Query Params
900
- query_params = {}
901
-
902
- # Header Params
903
- header_params = {}
904
- header_params['accept'] = 'application/json'
905
- header_params['content-type'] = 'application/json'
906
-
907
- post_body = nil
908
-
909
- return @api_client.call_api(
910
- :GET,
911
- path,
912
- endpoint,
913
- :header_params => header_params,
914
- :query_params => query_params,
915
- :body => post_body,
916
- :return_type => 'OracleBMC::Identity::Models::Group')
917
- end
918
-
919
- # Gets the specified identity provider's information.
920
- # @param [String] identity_provider_id The OCID of the identity provider.
921
- # @param [Hash] opts the optional parameters
922
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::IdentityProvider
923
- def get_identity_provider(identity_provider_id, opts = {})
924
- logger.debug "Calling operation IdentityClient#get_identity_provider." if logger
925
-
926
- fail "Missing the required parameter 'identity_provider_id' when calling get_identity_provider." if identity_provider_id.nil?
927
-
928
- path = "/identityProviders/{identityProviderId}".sub('{identityProviderId}', identity_provider_id.to_s)
929
-
930
- # Query Params
931
- query_params = {}
932
-
933
- # Header Params
934
- header_params = {}
935
- header_params['accept'] = 'application/json'
936
- header_params['content-type'] = 'application/json'
937
-
938
- post_body = nil
939
-
940
- return @api_client.call_api(
941
- :GET,
942
- path,
943
- endpoint,
944
- :header_params => header_params,
945
- :query_params => query_params,
946
- :body => post_body,
947
- :return_type => 'OracleBMC::Identity::Models::IdentityProvider')
948
- end
949
-
950
- # Gets the specified group mapping.
951
- # @param [String] identity_provider_id The OCID of the identity provider.
952
- # @param [String] mapping_id The OCID of the group mapping.
953
- # @param [Hash] opts the optional parameters
954
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::IdpGroupMapping
955
- def get_idp_group_mapping(identity_provider_id, mapping_id, opts = {})
956
- logger.debug "Calling operation IdentityClient#get_idp_group_mapping." if logger
957
-
958
- fail "Missing the required parameter 'identity_provider_id' when calling get_idp_group_mapping." if identity_provider_id.nil?
959
- fail "Missing the required parameter 'mapping_id' when calling get_idp_group_mapping." if mapping_id.nil?
960
-
961
- path = "/identityProviders/{identityProviderId}/groupMappings/{mappingId}".sub('{identityProviderId}', identity_provider_id.to_s).sub('{mappingId}', mapping_id.to_s)
962
-
963
- # Query Params
964
- query_params = {}
965
-
966
- # Header Params
967
- header_params = {}
968
- header_params['accept'] = 'application/json'
969
- header_params['content-type'] = 'application/json'
970
-
971
- post_body = nil
972
-
973
- return @api_client.call_api(
974
- :GET,
975
- path,
976
- endpoint,
977
- :header_params => header_params,
978
- :query_params => query_params,
979
- :body => post_body,
980
- :return_type => 'OracleBMC::Identity::Models::IdpGroupMapping')
981
- end
982
-
983
- # Gets the specified policy's information.
984
- # @param [String] policy_id The OCID of the policy.
985
- # @param [Hash] opts the optional parameters
986
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::Policy
987
- def get_policy(policy_id, opts = {})
988
- logger.debug "Calling operation IdentityClient#get_policy." if logger
989
-
990
- fail "Missing the required parameter 'policy_id' when calling get_policy." if policy_id.nil?
991
-
992
- path = "/policies/{policyId}".sub('{policyId}', policy_id.to_s)
993
-
994
- # Query Params
995
- query_params = {}
996
-
997
- # Header Params
998
- header_params = {}
999
- header_params['accept'] = 'application/json'
1000
- header_params['content-type'] = 'application/json'
1001
-
1002
- post_body = nil
1003
-
1004
- return @api_client.call_api(
1005
- :GET,
1006
- path,
1007
- endpoint,
1008
- :header_params => header_params,
1009
- :query_params => query_params,
1010
- :body => post_body,
1011
- :return_type => 'OracleBMC::Identity::Models::Policy')
1012
- end
1013
-
1014
- # Get the specified tenancy's information.
1015
- # @param [String] tenancy_id The OCID of the tenancy.
1016
- # @param [Hash] opts the optional parameters
1017
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::Tenancy
1018
- def get_tenancy(tenancy_id, opts = {})
1019
- logger.debug "Calling operation IdentityClient#get_tenancy." if logger
1020
-
1021
- fail "Missing the required parameter 'tenancy_id' when calling get_tenancy." if tenancy_id.nil?
1022
-
1023
- path = "/tenancies/{tenancyId}".sub('{tenancyId}', tenancy_id.to_s)
1024
-
1025
- # Query Params
1026
- query_params = {}
1027
-
1028
- # Header Params
1029
- header_params = {}
1030
- header_params['accept'] = 'application/json'
1031
- header_params['content-type'] = 'application/json'
1032
-
1033
- post_body = nil
1034
-
1035
- return @api_client.call_api(
1036
- :GET,
1037
- path,
1038
- endpoint,
1039
- :header_params => header_params,
1040
- :query_params => query_params,
1041
- :body => post_body,
1042
- :return_type => 'OracleBMC::Identity::Models::Tenancy')
1043
- end
1044
-
1045
- # Gets the specified user's information.
1046
- # @param [String] user_id The OCID of the user.
1047
- # @param [Hash] opts the optional parameters
1048
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::User
1049
- def get_user(user_id, opts = {})
1050
- logger.debug "Calling operation IdentityClient#get_user." if logger
1051
-
1052
- fail "Missing the required parameter 'user_id' when calling get_user." if user_id.nil?
1053
-
1054
- path = "/users/{userId}".sub('{userId}', user_id.to_s)
1055
-
1056
- # Query Params
1057
- query_params = {}
1058
-
1059
- # Header Params
1060
- header_params = {}
1061
- header_params['accept'] = 'application/json'
1062
- header_params['content-type'] = 'application/json'
1063
-
1064
- post_body = nil
1065
-
1066
- return @api_client.call_api(
1067
- :GET,
1068
- path,
1069
- endpoint,
1070
- :header_params => header_params,
1071
- :query_params => query_params,
1072
- :body => post_body,
1073
- :return_type => 'OracleBMC::Identity::Models::User')
1074
- end
1075
-
1076
- # Gets the specified UserGroupMembership's information.
1077
- # @param [String] user_group_membership_id The OCID of the userGroupMembership.
1078
- # @param [Hash] opts the optional parameters
1079
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::UserGroupMembership
1080
- def get_user_group_membership(user_group_membership_id, opts = {})
1081
- logger.debug "Calling operation IdentityClient#get_user_group_membership." if logger
1082
-
1083
- fail "Missing the required parameter 'user_group_membership_id' when calling get_user_group_membership." if user_group_membership_id.nil?
1084
-
1085
- path = "/userGroupMemberships/{userGroupMembershipId}".sub('{userGroupMembershipId}', user_group_membership_id.to_s)
1086
-
1087
- # Query Params
1088
- query_params = {}
1089
-
1090
- # Header Params
1091
- header_params = {}
1092
- header_params['accept'] = 'application/json'
1093
- header_params['content-type'] = 'application/json'
1094
-
1095
- post_body = nil
1096
-
1097
- return @api_client.call_api(
1098
- :GET,
1099
- path,
1100
- endpoint,
1101
- :header_params => header_params,
1102
- :query_params => query_params,
1103
- :body => post_body,
1104
- :return_type => 'OracleBMC::Identity::Models::UserGroupMembership')
1105
- end
1106
-
1107
- # Lists the API signing keys for the specified user. A user can have a maximum of three keys.
1108
- #
1109
- # Every user has permission to use this API call for *their own user ID*. An administrator in your
1110
- # organization does not need to write a policy to give users this ability.
1111
- #
1112
- # @param [String] user_id The OCID of the user.
1113
- # @param [Hash] opts the optional parameters
1114
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::ApiKey>
1115
- def list_api_keys(user_id, opts = {})
1116
- logger.debug "Calling operation IdentityClient#list_api_keys." if logger
1117
-
1118
- fail "Missing the required parameter 'user_id' when calling list_api_keys." if user_id.nil?
1119
-
1120
- path = "/users/{userId}/apiKeys/".sub('{userId}', user_id.to_s)
1121
-
1122
- # Query Params
1123
- query_params = {}
1124
-
1125
- # Header Params
1126
- header_params = {}
1127
- header_params['accept'] = 'application/json'
1128
- header_params['content-type'] = 'application/json'
1129
-
1130
- post_body = nil
1131
-
1132
- return @api_client.call_api(
1133
- :GET,
1134
- path,
1135
- endpoint,
1136
- :header_params => header_params,
1137
- :query_params => query_params,
1138
- :body => post_body,
1139
- :return_type => 'Array<OracleBMC::Identity::Models::ApiKey>')
1140
- end
1141
-
1142
- # Lists the Availability Domains in your tenancy. Specify the OCID of either the tenancy or another
1143
- # of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment).
1144
- # See [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1145
- #
1146
- # @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
1147
- #
1148
- # @param [Hash] opts the optional parameters
1149
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::AvailabilityDomain>
1150
- def list_availability_domains(compartment_id, opts = {})
1151
- logger.debug "Calling operation IdentityClient#list_availability_domains." if logger
1152
-
1153
- fail "Missing the required parameter 'compartment_id' when calling list_availability_domains." if compartment_id.nil?
1154
-
1155
- path = "/availabilityDomains/"
1156
-
1157
- # Query Params
1158
- query_params = {}
1159
- query_params[:'compartmentId'] = compartment_id
1160
-
1161
- # Header Params
1162
- header_params = {}
1163
- header_params['accept'] = 'application/json'
1164
- header_params['content-type'] = 'application/json'
1165
-
1166
- post_body = nil
1167
-
1168
- return @api_client.call_api(
1169
- :GET,
1170
- path,
1171
- endpoint,
1172
- :header_params => header_params,
1173
- :query_params => query_params,
1174
- :body => post_body,
1175
- :return_type => 'Array<OracleBMC::Identity::Models::AvailabilityDomain>')
1176
- end
1177
-
1178
- # Lists the compartments in your tenancy. You must specify your tenancy's OCID as the value
1179
- # for the compartment ID (remember that the tenancy is simply the root compartment).
1180
- # See [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1181
- #
1182
- # @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
1183
- #
1184
- # @param [Hash] opts the optional parameters
1185
- # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
1186
- #
1187
- # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
1188
- #
1189
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::Compartment>
1190
- def list_compartments(compartment_id, opts = {})
1191
- logger.debug "Calling operation IdentityClient#list_compartments." if logger
1192
-
1193
- fail "Missing the required parameter 'compartment_id' when calling list_compartments." if compartment_id.nil?
1194
-
1195
- path = "/compartments/"
1196
-
1197
- # Query Params
1198
- query_params = {}
1199
- query_params[:'compartmentId'] = compartment_id
1200
- query_params[:'page'] = opts[:'page'] if opts[:'page']
1201
- query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
1202
-
1203
- # Header Params
1204
- header_params = {}
1205
- header_params['accept'] = 'application/json'
1206
- header_params['content-type'] = 'application/json'
1207
-
1208
- post_body = nil
1209
-
1210
- return @api_client.call_api(
1211
- :GET,
1212
- path,
1213
- endpoint,
1214
- :header_params => header_params,
1215
- :query_params => query_params,
1216
- :body => post_body,
1217
- :return_type => 'Array<OracleBMC::Identity::Models::Compartment>')
1218
- end
1219
-
1220
- # Lists the groups in your tenancy. You must specify your tenancy's OCID as the value for
1221
- # the compartment ID (remember that the tenancy is simply the root compartment).
1222
- # See [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1223
- #
1224
- # @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
1225
- #
1226
- # @param [Hash] opts the optional parameters
1227
- # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
1228
- #
1229
- # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
1230
- #
1231
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::Group>
1232
- def list_groups(compartment_id, opts = {})
1233
- logger.debug "Calling operation IdentityClient#list_groups." if logger
1234
-
1235
- fail "Missing the required parameter 'compartment_id' when calling list_groups." if compartment_id.nil?
1236
-
1237
- path = "/groups/"
1238
-
1239
- # Query Params
1240
- query_params = {}
1241
- query_params[:'compartmentId'] = compartment_id
1242
- query_params[:'page'] = opts[:'page'] if opts[:'page']
1243
- query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
1244
-
1245
- # Header Params
1246
- header_params = {}
1247
- header_params['accept'] = 'application/json'
1248
- header_params['content-type'] = 'application/json'
1249
-
1250
- post_body = nil
1251
-
1252
- return @api_client.call_api(
1253
- :GET,
1254
- path,
1255
- endpoint,
1256
- :header_params => header_params,
1257
- :query_params => query_params,
1258
- :body => post_body,
1259
- :return_type => 'Array<OracleBMC::Identity::Models::Group>')
1260
- end
1261
-
1262
- # Lists all the identity providers in your tenancy. You must specify the identity provider type (e.g., `SAML2` for
1263
- # identity providers using the SAML2.0 protocol). You must specify your tenancy's OCID as the value for the
1264
- # compartment ID (remember that the tenancy is simply the root compartment).
1265
- # See [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1266
- #
1267
- # @param [String] protocol The protocol used for federation.
1268
- # @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
1269
- #
1270
- # @param [Hash] opts the optional parameters
1271
- # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
1272
- #
1273
- # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
1274
- #
1275
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::IdentityProvider>
1276
- def list_identity_providers(protocol, compartment_id, opts = {})
1277
- logger.debug "Calling operation IdentityClient#list_identity_providers." if logger
1278
-
1279
- fail "Missing the required parameter 'protocol' when calling list_identity_providers." if protocol.nil?
1280
- unless ['SAML2'].include?(protocol)
1281
- fail "Invalid value for 'protocol', must be one of SAML2."
1282
- end
1283
- fail "Missing the required parameter 'compartment_id' when calling list_identity_providers." if compartment_id.nil?
1284
-
1285
- path = "/identityProviders/"
1286
-
1287
- # Query Params
1288
- query_params = {}
1289
- query_params[:'protocol'] = protocol
1290
- query_params[:'compartmentId'] = compartment_id
1291
- query_params[:'page'] = opts[:'page'] if opts[:'page']
1292
- query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
1293
-
1294
- # Header Params
1295
- header_params = {}
1296
- header_params['accept'] = 'application/json'
1297
- header_params['content-type'] = 'application/json'
1298
-
1299
- post_body = nil
1300
-
1301
- return @api_client.call_api(
1302
- :GET,
1303
- path,
1304
- endpoint,
1305
- :header_params => header_params,
1306
- :query_params => query_params,
1307
- :body => post_body,
1308
- :return_type => 'Array<OracleBMC::Identity::Models::IdentityProvider>')
1309
- end
1310
-
1311
- # Lists the group mappings for the specified identity provider.
1312
- #
1313
- # @param [String] identity_provider_id The OCID of the identity provider.
1314
- # @param [Hash] opts the optional parameters
1315
- # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
1316
- #
1317
- # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
1318
- #
1319
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::IdpGroupMapping>
1320
- def list_idp_group_mappings(identity_provider_id, opts = {})
1321
- logger.debug "Calling operation IdentityClient#list_idp_group_mappings." if logger
1322
-
1323
- fail "Missing the required parameter 'identity_provider_id' when calling list_idp_group_mappings." if identity_provider_id.nil?
1324
-
1325
- path = "/identityProviders/{identityProviderId}/groupMappings/".sub('{identityProviderId}', identity_provider_id.to_s)
1326
-
1327
- # Query Params
1328
- query_params = {}
1329
- query_params[:'page'] = opts[:'page'] if opts[:'page']
1330
- query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
1331
-
1332
- # Header Params
1333
- header_params = {}
1334
- header_params['accept'] = 'application/json'
1335
- header_params['content-type'] = 'application/json'
1336
-
1337
- post_body = nil
1338
-
1339
- return @api_client.call_api(
1340
- :GET,
1341
- path,
1342
- endpoint,
1343
- :header_params => header_params,
1344
- :query_params => query_params,
1345
- :body => post_body,
1346
- :return_type => 'Array<OracleBMC::Identity::Models::IdpGroupMapping>')
1347
- end
1348
-
1349
- # Lists the policies in the specified compartment (either the tenancy or another of your compartments).
1350
- # See [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1351
- #
1352
- # To determine which policies apply to a particular group or compartment, you must view the individual
1353
- # statements inside all your policies. There isn't a way to automatically obtain that information via the API.
1354
- #
1355
- # @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
1356
- #
1357
- # @param [Hash] opts the optional parameters
1358
- # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
1359
- #
1360
- # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
1361
- #
1362
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::Policy>
1363
- def list_policies(compartment_id, opts = {})
1364
- logger.debug "Calling operation IdentityClient#list_policies." if logger
1365
-
1366
- fail "Missing the required parameter 'compartment_id' when calling list_policies." if compartment_id.nil?
1367
-
1368
- path = "/policies/"
1369
-
1370
- # Query Params
1371
- query_params = {}
1372
- query_params[:'compartmentId'] = compartment_id
1373
- query_params[:'page'] = opts[:'page'] if opts[:'page']
1374
- query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
1375
-
1376
- # Header Params
1377
- header_params = {}
1378
- header_params['accept'] = 'application/json'
1379
- header_params['content-type'] = 'application/json'
1380
-
1381
- post_body = nil
1382
-
1383
- return @api_client.call_api(
1384
- :GET,
1385
- path,
1386
- endpoint,
1387
- :header_params => header_params,
1388
- :query_params => query_params,
1389
- :body => post_body,
1390
- :return_type => 'Array<OracleBMC::Identity::Models::Policy>')
1391
- end
1392
-
1393
- # Lists the region subscriptions for the specified tenancy.
1394
- # @param [String] tenancy_id The OCID of the tenancy.
1395
- # @param [Hash] opts the optional parameters
1396
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::RegionSubscription>
1397
- def list_region_subscriptions(tenancy_id, opts = {})
1398
- logger.debug "Calling operation IdentityClient#list_region_subscriptions." if logger
1399
-
1400
- fail "Missing the required parameter 'tenancy_id' when calling list_region_subscriptions." if tenancy_id.nil?
1401
-
1402
- path = "/tenancies/{tenancyId}/regionSubscriptions".sub('{tenancyId}', tenancy_id.to_s)
1403
-
1404
- # Query Params
1405
- query_params = {}
1406
-
1407
- # Header Params
1408
- header_params = {}
1409
- header_params['accept'] = 'application/json'
1410
- header_params['content-type'] = 'application/json'
1411
-
1412
- post_body = nil
1413
-
1414
- return @api_client.call_api(
1415
- :GET,
1416
- path,
1417
- endpoint,
1418
- :header_params => header_params,
1419
- :query_params => query_params,
1420
- :body => post_body,
1421
- :return_type => 'Array<OracleBMC::Identity::Models::RegionSubscription>')
1422
- end
1423
-
1424
- # Lists all the regions offered by Oracle Bare Metal Cloud Services.
1425
- # @param [Hash] opts the optional parameters
1426
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::Region>
1427
- def list_regions(opts = {})
1428
- logger.debug "Calling operation IdentityClient#list_regions." if logger
1429
-
1430
-
1431
- path = "/regions"
1432
-
1433
- # Query Params
1434
- query_params = {}
1435
-
1436
- # Header Params
1437
- header_params = {}
1438
- header_params['accept'] = 'application/json'
1439
- header_params['content-type'] = 'application/json'
1440
-
1441
- post_body = nil
1442
-
1443
- return @api_client.call_api(
1444
- :GET,
1445
- path,
1446
- endpoint,
1447
- :header_params => header_params,
1448
- :query_params => query_params,
1449
- :body => post_body,
1450
- :return_type => 'Array<OracleBMC::Identity::Models::Region>')
1451
- end
1452
-
1453
- # Lists the Swift passwords for the specified user. The returned object contains the password's OCID, but not
1454
- # the password itself. The actual password is returned only upon creation.
1455
- #
1456
- # @param [String] user_id The OCID of the user.
1457
- # @param [Hash] opts the optional parameters
1458
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::SwiftPassword>
1459
- def list_swift_passwords(user_id, opts = {})
1460
- logger.debug "Calling operation IdentityClient#list_swift_passwords." if logger
1461
-
1462
- fail "Missing the required parameter 'user_id' when calling list_swift_passwords." if user_id.nil?
1463
-
1464
- path = "/users/{userId}/swiftPasswords/".sub('{userId}', user_id.to_s)
1465
-
1466
- # Query Params
1467
- query_params = {}
1468
-
1469
- # Header Params
1470
- header_params = {}
1471
- header_params['accept'] = 'application/json'
1472
- header_params['content-type'] = 'application/json'
1473
-
1474
- post_body = nil
1475
-
1476
- return @api_client.call_api(
1477
- :GET,
1478
- path,
1479
- endpoint,
1480
- :header_params => header_params,
1481
- :query_params => query_params,
1482
- :body => post_body,
1483
- :return_type => 'Array<OracleBMC::Identity::Models::SwiftPassword>')
1484
- end
1485
-
1486
- # Lists the `UserGroupMembership` objects in your tenancy. You must specify your tenancy's OCID
1487
- # as the value for the compartment ID
1488
- # (see [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five)).
1489
- # You must also then filter the list in one of these ways:
1490
- #
1491
- # - You can limit the results to just the memberships for a given user by specifying a `userId`.
1492
- # - Similarly, you can limit the results to just the memberships for a given group by specifying a `groupId`.
1493
- # - You can set both the `userId` and `groupId` to determine if the specified user is in the specified group.
1494
- # If the answer is no, the response is an empty list.
1495
- #
1496
- # @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
1497
- #
1498
- # @param [Hash] opts the optional parameters
1499
- # @option opts [String] :user_id The OCID of the user.
1500
- # @option opts [String] :group_id The OCID of the group.
1501
- # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
1502
- #
1503
- # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
1504
- #
1505
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::UserGroupMembership>
1506
- def list_user_group_memberships(compartment_id, opts = {})
1507
- logger.debug "Calling operation IdentityClient#list_user_group_memberships." if logger
1508
-
1509
- fail "Missing the required parameter 'compartment_id' when calling list_user_group_memberships." if compartment_id.nil?
1510
-
1511
- path = "/userGroupMemberships/"
1512
-
1513
- # Query Params
1514
- query_params = {}
1515
- query_params[:'compartmentId'] = compartment_id
1516
- query_params[:'userId'] = opts[:'user_id'] if opts[:'user_id']
1517
- query_params[:'groupId'] = opts[:'group_id'] if opts[:'group_id']
1518
- query_params[:'page'] = opts[:'page'] if opts[:'page']
1519
- query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
1520
-
1521
- # Header Params
1522
- header_params = {}
1523
- header_params['accept'] = 'application/json'
1524
- header_params['content-type'] = 'application/json'
1525
-
1526
- post_body = nil
1527
-
1528
- return @api_client.call_api(
1529
- :GET,
1530
- path,
1531
- endpoint,
1532
- :header_params => header_params,
1533
- :query_params => query_params,
1534
- :body => post_body,
1535
- :return_type => 'Array<OracleBMC::Identity::Models::UserGroupMembership>')
1536
- end
1537
-
1538
- # Lists the users in your tenancy. You must specify your tenancy's OCID as the value for the
1539
- # compartment ID (remember that the tenancy is simply the root compartment).
1540
- # See [Where to Get the Tenancy's OCID and User's OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#five).
1541
- #
1542
- # @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
1543
- #
1544
- # @param [Hash] opts the optional parameters
1545
- # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
1546
- #
1547
- # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
1548
- #
1549
- # @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::User>
1550
- def list_users(compartment_id, opts = {})
1551
- logger.debug "Calling operation IdentityClient#list_users." if logger
1552
-
1553
- fail "Missing the required parameter 'compartment_id' when calling list_users." if compartment_id.nil?
1554
-
1555
- path = "/users/"
1556
-
1557
- # Query Params
1558
- query_params = {}
1559
- query_params[:'compartmentId'] = compartment_id
1560
- query_params[:'page'] = opts[:'page'] if opts[:'page']
1561
- query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
1562
-
1563
- # Header Params
1564
- header_params = {}
1565
- header_params['accept'] = 'application/json'
1566
- header_params['content-type'] = 'application/json'
1567
-
1568
- post_body = nil
1569
-
1570
- return @api_client.call_api(
1571
- :GET,
1572
- path,
1573
- endpoint,
1574
- :header_params => header_params,
1575
- :query_params => query_params,
1576
- :body => post_body,
1577
- :return_type => 'Array<OracleBMC::Identity::Models::User>')
1578
- end
1579
-
1580
- # Removes a user from a group by deleting the corresponding `UserGroupMembership`.
1581
- # @param [String] user_group_membership_id The OCID of the userGroupMembership.
1582
- # @param [Hash] opts the optional parameters
1583
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1584
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1585
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1586
- #
1587
- # @return [Response] A Response object with data of type nil
1588
- def remove_user_from_group(user_group_membership_id, opts = {})
1589
- logger.debug "Calling operation IdentityClient#remove_user_from_group." if logger
1590
-
1591
- fail "Missing the required parameter 'user_group_membership_id' when calling remove_user_from_group." if user_group_membership_id.nil?
1592
-
1593
- path = "/userGroupMemberships/{userGroupMembershipId}".sub('{userGroupMembershipId}', user_group_membership_id.to_s)
1594
-
1595
- # Query Params
1596
- query_params = {}
1597
-
1598
- # Header Params
1599
- header_params = {}
1600
- header_params['accept'] = 'application/json'
1601
- header_params['content-type'] = 'application/json'
1602
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
1603
-
1604
- post_body = nil
1605
-
1606
- return @api_client.call_api(
1607
- :DELETE,
1608
- path,
1609
- endpoint,
1610
- :header_params => header_params,
1611
- :query_params => query_params,
1612
- :body => post_body)
1613
- end
1614
-
1615
- # Updates the specified compartment's description.
1616
- # @param [String] compartment_id The OCID of the compartment.
1617
- # @param [UpdateCompartmentDetails] update_compartment_details Request object for updating a compartment.
1618
- # @param [Hash] opts the optional parameters
1619
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1620
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1621
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1622
- #
1623
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::Compartment
1624
- def update_compartment(compartment_id, update_compartment_details, opts = {})
1625
- logger.debug "Calling operation IdentityClient#update_compartment." if logger
1626
-
1627
- fail "Missing the required parameter 'compartment_id' when calling update_compartment." if compartment_id.nil?
1628
- fail "Missing the required parameter 'update_compartment_details' when calling update_compartment." if update_compartment_details.nil?
1629
-
1630
- path = "/compartments/{compartmentId}".sub('{compartmentId}', compartment_id.to_s)
1631
-
1632
- # Query Params
1633
- query_params = {}
1634
-
1635
- # Header Params
1636
- header_params = {}
1637
- header_params['accept'] = 'application/json'
1638
- header_params['content-type'] = 'application/json'
1639
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
1640
-
1641
- post_body = @api_client.object_to_http_body(update_compartment_details)
1642
-
1643
- return @api_client.call_api(
1644
- :PUT,
1645
- path,
1646
- endpoint,
1647
- :header_params => header_params,
1648
- :query_params => query_params,
1649
- :body => post_body,
1650
- :return_type => 'OracleBMC::Identity::Models::Compartment')
1651
- end
1652
-
1653
- # Updates the specified group.
1654
- # @param [String] group_id The OCID of the group.
1655
- # @param [UpdateGroupDetails] update_group_details Request object for updating a group.
1656
- # @param [Hash] opts the optional parameters
1657
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1658
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1659
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1660
- #
1661
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::Group
1662
- def update_group(group_id, update_group_details, opts = {})
1663
- logger.debug "Calling operation IdentityClient#update_group." if logger
1664
-
1665
- fail "Missing the required parameter 'group_id' when calling update_group." if group_id.nil?
1666
- fail "Missing the required parameter 'update_group_details' when calling update_group." if update_group_details.nil?
1667
-
1668
- path = "/groups/{groupId}".sub('{groupId}', group_id.to_s)
1669
-
1670
- # Query Params
1671
- query_params = {}
1672
-
1673
- # Header Params
1674
- header_params = {}
1675
- header_params['accept'] = 'application/json'
1676
- header_params['content-type'] = 'application/json'
1677
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
1678
-
1679
- post_body = @api_client.object_to_http_body(update_group_details)
1680
-
1681
- return @api_client.call_api(
1682
- :PUT,
1683
- path,
1684
- endpoint,
1685
- :header_params => header_params,
1686
- :query_params => query_params,
1687
- :body => post_body,
1688
- :return_type => 'OracleBMC::Identity::Models::Group')
1689
- end
1690
-
1691
- # Updates the specified identity provider.
1692
- # @param [String] identity_provider_id The OCID of the identity provider.
1693
- # @param [UpdateIdentityProviderDetails] update_identity_provider_details Request object for updating a identity provider.
1694
- # @param [Hash] opts the optional parameters
1695
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1696
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1697
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1698
- #
1699
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::IdentityProvider
1700
- def update_identity_provider(identity_provider_id, update_identity_provider_details, opts = {})
1701
- logger.debug "Calling operation IdentityClient#update_identity_provider." if logger
1702
-
1703
- fail "Missing the required parameter 'identity_provider_id' when calling update_identity_provider." if identity_provider_id.nil?
1704
- fail "Missing the required parameter 'update_identity_provider_details' when calling update_identity_provider." if update_identity_provider_details.nil?
1705
-
1706
- path = "/identityProviders/{identityProviderId}".sub('{identityProviderId}', identity_provider_id.to_s)
1707
-
1708
- # Query Params
1709
- query_params = {}
1710
-
1711
- # Header Params
1712
- header_params = {}
1713
- header_params['accept'] = 'application/json'
1714
- header_params['content-type'] = 'application/json'
1715
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
1716
-
1717
- post_body = @api_client.object_to_http_body(update_identity_provider_details)
1718
-
1719
- return @api_client.call_api(
1720
- :PUT,
1721
- path,
1722
- endpoint,
1723
- :header_params => header_params,
1724
- :query_params => query_params,
1725
- :body => post_body,
1726
- :return_type => 'OracleBMC::Identity::Models::IdentityProvider')
1727
- end
1728
-
1729
- # Updates the specified group mapping.
1730
- # @param [String] identity_provider_id The OCID of the identity provider.
1731
- # @param [String] mapping_id The OCID of the group mapping.
1732
- # @param [UpdateIdpGroupMappingDetails] update_idp_group_mapping_details Request object for updating an identity provider group mapping
1733
- # @param [Hash] opts the optional parameters
1734
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1735
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1736
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1737
- #
1738
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::IdpGroupMapping
1739
- def update_idp_group_mapping(identity_provider_id, mapping_id, update_idp_group_mapping_details, opts = {})
1740
- logger.debug "Calling operation IdentityClient#update_idp_group_mapping." if logger
1741
-
1742
- fail "Missing the required parameter 'identity_provider_id' when calling update_idp_group_mapping." if identity_provider_id.nil?
1743
- fail "Missing the required parameter 'mapping_id' when calling update_idp_group_mapping." if mapping_id.nil?
1744
- fail "Missing the required parameter 'update_idp_group_mapping_details' when calling update_idp_group_mapping." if update_idp_group_mapping_details.nil?
1745
-
1746
- path = "/identityProviders/{identityProviderId}/groupMappings/{mappingId}".sub('{identityProviderId}', identity_provider_id.to_s).sub('{mappingId}', mapping_id.to_s)
1747
-
1748
- # Query Params
1749
- query_params = {}
1750
-
1751
- # Header Params
1752
- header_params = {}
1753
- header_params['accept'] = 'application/json'
1754
- header_params['content-type'] = 'application/json'
1755
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
1756
-
1757
- post_body = @api_client.object_to_http_body(update_idp_group_mapping_details)
1758
-
1759
- return @api_client.call_api(
1760
- :PUT,
1761
- path,
1762
- endpoint,
1763
- :header_params => header_params,
1764
- :query_params => query_params,
1765
- :body => post_body,
1766
- :return_type => 'OracleBMC::Identity::Models::IdpGroupMapping')
1767
- end
1768
-
1769
- # Updates the specified policy. You can update the description or the policy statements themselves.
1770
- #
1771
- # Policy changes take effect typically within 10 seconds.
1772
- #
1773
- # @param [String] policy_id The OCID of the policy.
1774
- # @param [UpdatePolicyDetails] update_policy_details Request object for updating a policy.
1775
- # @param [Hash] opts the optional parameters
1776
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1777
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1778
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1779
- #
1780
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::Policy
1781
- def update_policy(policy_id, update_policy_details, opts = {})
1782
- logger.debug "Calling operation IdentityClient#update_policy." if logger
1783
-
1784
- fail "Missing the required parameter 'policy_id' when calling update_policy." if policy_id.nil?
1785
- fail "Missing the required parameter 'update_policy_details' when calling update_policy." if update_policy_details.nil?
1786
-
1787
- path = "/policies/{policyId}".sub('{policyId}', policy_id.to_s)
1788
-
1789
- # Query Params
1790
- query_params = {}
1791
-
1792
- # Header Params
1793
- header_params = {}
1794
- header_params['accept'] = 'application/json'
1795
- header_params['content-type'] = 'application/json'
1796
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
1797
-
1798
- post_body = @api_client.object_to_http_body(update_policy_details)
1799
-
1800
- return @api_client.call_api(
1801
- :PUT,
1802
- path,
1803
- endpoint,
1804
- :header_params => header_params,
1805
- :query_params => query_params,
1806
- :body => post_body,
1807
- :return_type => 'OracleBMC::Identity::Models::Policy')
1808
- end
1809
-
1810
- # Updates the specified Swift password's description.
1811
- #
1812
- # @param [String] user_id The OCID of the user.
1813
- # @param [String] swift_password_id The OCID of the Swift password.
1814
- # @param [UpdateSwiftPasswordDetails] update_swift_password_details Request object for updating a Swift password.
1815
- # @param [Hash] opts the optional parameters
1816
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1817
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1818
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1819
- #
1820
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::SwiftPassword
1821
- def update_swift_password(user_id, swift_password_id, update_swift_password_details, opts = {})
1822
- logger.debug "Calling operation IdentityClient#update_swift_password." if logger
1823
-
1824
- fail "Missing the required parameter 'user_id' when calling update_swift_password." if user_id.nil?
1825
- fail "Missing the required parameter 'swift_password_id' when calling update_swift_password." if swift_password_id.nil?
1826
- fail "Missing the required parameter 'update_swift_password_details' when calling update_swift_password." if update_swift_password_details.nil?
1827
-
1828
- path = "/users/{userId}/swiftPasswords/{swiftPasswordId}".sub('{userId}', user_id.to_s).sub('{swiftPasswordId}', swift_password_id.to_s)
1829
-
1830
- # Query Params
1831
- query_params = {}
1832
-
1833
- # Header Params
1834
- header_params = {}
1835
- header_params['accept'] = 'application/json'
1836
- header_params['content-type'] = 'application/json'
1837
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
1838
-
1839
- post_body = @api_client.object_to_http_body(update_swift_password_details)
1840
-
1841
- return @api_client.call_api(
1842
- :PUT,
1843
- path,
1844
- endpoint,
1845
- :header_params => header_params,
1846
- :query_params => query_params,
1847
- :body => post_body,
1848
- :return_type => 'OracleBMC::Identity::Models::SwiftPassword')
1849
- end
1850
-
1851
- # Updates the description of the specified user.
1852
- # @param [String] user_id The OCID of the user.
1853
- # @param [UpdateUserDetails] update_user_details Request object for updating a user.
1854
- # @param [Hash] opts the optional parameters
1855
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1856
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1857
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1858
- #
1859
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::User
1860
- def update_user(user_id, update_user_details, opts = {})
1861
- logger.debug "Calling operation IdentityClient#update_user." if logger
1862
-
1863
- fail "Missing the required parameter 'user_id' when calling update_user." if user_id.nil?
1864
- fail "Missing the required parameter 'update_user_details' when calling update_user." if update_user_details.nil?
1865
-
1866
- path = "/users/{userId}".sub('{userId}', user_id.to_s)
1867
-
1868
- # Query Params
1869
- query_params = {}
1870
-
1871
- # Header Params
1872
- header_params = {}
1873
- header_params['accept'] = 'application/json'
1874
- header_params['content-type'] = 'application/json'
1875
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
1876
-
1877
- post_body = @api_client.object_to_http_body(update_user_details)
1878
-
1879
- return @api_client.call_api(
1880
- :PUT,
1881
- path,
1882
- endpoint,
1883
- :header_params => header_params,
1884
- :query_params => query_params,
1885
- :body => post_body,
1886
- :return_type => 'OracleBMC::Identity::Models::User')
1887
- end
1888
-
1889
- # Updates the state of the specified user.
1890
- #
1891
- # @param [String] user_id The OCID of the user.
1892
- # @param [UpdateStateDetails] update_state_details Request object for updating a user state.
1893
- # @param [Hash] opts the optional parameters
1894
- # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1895
- # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1896
- # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1897
- #
1898
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::User
1899
- def update_user_state(user_id, update_state_details, opts = {})
1900
- logger.debug "Calling operation IdentityClient#update_user_state." if logger
1901
-
1902
- fail "Missing the required parameter 'user_id' when calling update_user_state." if user_id.nil?
1903
- fail "Missing the required parameter 'update_state_details' when calling update_user_state." if update_state_details.nil?
1904
-
1905
- path = "/users/{userId}/state/".sub('{userId}', user_id.to_s)
1906
-
1907
- # Query Params
1908
- query_params = {}
1909
-
1910
- # Header Params
1911
- header_params = {}
1912
- header_params['accept'] = 'application/json'
1913
- header_params['content-type'] = 'application/json'
1914
- header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
1915
-
1916
- post_body = @api_client.object_to_http_body(update_state_details)
1917
-
1918
- return @api_client.call_api(
1919
- :PUT,
1920
- path,
1921
- endpoint,
1922
- :header_params => header_params,
1923
- :query_params => query_params,
1924
- :body => post_body,
1925
- :return_type => 'OracleBMC::Identity::Models::User')
1926
- end
1927
-
1928
- # Uploads an API signing key for the specified user.
1929
- #
1930
- # Every user has permission to use this operation to upload a key for *their own user ID*. An
1931
- # administrator in your organization does not need to write a policy to give users this ability.
1932
- # To compare, administrators who have permission to the tenancy can use this operation to upload a
1933
- # key for any user, including themselves.
1934
- #
1935
- # **Important:** Even though you have permission to upload an API key, you might not yet
1936
- # have permission to do much else. If you try calling an operation unrelated to your own credential
1937
- # management (e.g., `ListUsers`, `LaunchInstance`) and receive an \"unauthorized\" error,
1938
- # check with an administrator to confirm which IAM Service group(s) you're in and what access
1939
- # you have. Also confirm you're working in the correct compartment.
1940
- #
1941
- # After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using
1942
- # the object, first make sure its `lifecycleState` has changed to ACTIVE.
1943
- #
1944
- # @param [String] user_id The OCID of the user.
1945
- # @param [CreateApiKeyDetails] create_api_key_details Request object for uploading an API key for a user.
1946
- # @param [Hash] opts the optional parameters
1947
- # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
1948
- # server error without risk of executing that same action again. Retry tokens expire after 24
1949
- # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
1950
- # has been deleted and purged from the system, then a retry of the original creation request
1951
- # may be rejected).
1952
- #
1953
- # @return [Response] A Response object with data of type OracleBMC::Identity::Models::ApiKey
1954
- def upload_api_key(user_id, create_api_key_details, opts = {})
1955
- logger.debug "Calling operation IdentityClient#upload_api_key." if logger
1956
-
1957
- fail "Missing the required parameter 'user_id' when calling upload_api_key." if user_id.nil?
1958
- fail "Missing the required parameter 'create_api_key_details' when calling upload_api_key." if create_api_key_details.nil?
1959
-
1960
- path = "/users/{userId}/apiKeys/".sub('{userId}', user_id.to_s)
1961
-
1962
- # Query Params
1963
- query_params = {}
1964
-
1965
- # Header Params
1966
- header_params = {}
1967
- header_params['accept'] = 'application/json'
1968
- header_params['content-type'] = 'application/json'
1969
- header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
1970
-
1971
- post_body = @api_client.object_to_http_body(create_api_key_details)
1972
-
1973
- return @api_client.call_api(
1974
- :POST,
1975
- path,
1976
- endpoint,
1977
- :header_params => header_params,
1978
- :query_params => query_params,
1979
- :body => post_body,
1980
- :return_type => 'OracleBMC::Identity::Models::ApiKey')
1981
- end
1982
- end
1983
- end