oraclebmc 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +82 -0
- data/README.md +220 -0
- data/lib/oraclebmc/api_client.rb +349 -0
- data/lib/oraclebmc/config.rb +80 -0
- data/lib/oraclebmc/config_file_loader.rb +85 -0
- data/lib/oraclebmc/core/blockstorage_client.rb +459 -0
- data/lib/oraclebmc/core/compute_client.rb +1053 -0
- data/lib/oraclebmc/core/core.rb +82 -0
- data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +179 -0
- data/lib/oraclebmc/core/models/attach_volume_details.rb +206 -0
- data/lib/oraclebmc/core/models/capture_console_history_details.rb +162 -0
- data/lib/oraclebmc/core/models/console_history.rb +252 -0
- data/lib/oraclebmc/core/models/cpe.rb +209 -0
- data/lib/oraclebmc/core/models/create_cpe_details.rb +187 -0
- data/lib/oraclebmc/core/models/create_dhcp_details.rb +195 -0
- data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +184 -0
- data/lib/oraclebmc/core/models/create_drg_details.rb +173 -0
- data/lib/oraclebmc/core/models/create_image_details.rb +188 -0
- data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +195 -0
- data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +210 -0
- data/lib/oraclebmc/core/models/create_route_table_details.rb +195 -0
- data/lib/oraclebmc/core/models/create_security_list_details.rb +206 -0
- data/lib/oraclebmc/core/models/create_subnet_details.rb +253 -0
- data/lib/oraclebmc/core/models/create_vcn_details.rb +187 -0
- data/lib/oraclebmc/core/models/create_volume_backup_details.rb +173 -0
- data/lib/oraclebmc/core/models/create_volume_details.rb +211 -0
- data/lib/oraclebmc/core/models/dhcp_dns_option.rb +203 -0
- data/lib/oraclebmc/core/models/dhcp_option.rb +171 -0
- data/lib/oraclebmc/core/models/dhcp_options.rb +246 -0
- data/lib/oraclebmc/core/models/drg.rb +224 -0
- data/lib/oraclebmc/core/models/drg_attachment.rb +246 -0
- data/lib/oraclebmc/core/models/egress_security_rule.rb +240 -0
- data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +254 -0
- data/lib/oraclebmc/core/models/icmp_options.rb +173 -0
- data/lib/oraclebmc/core/models/image.rb +282 -0
- data/lib/oraclebmc/core/models/ingress_security_rule.rb +240 -0
- data/lib/oraclebmc/core/models/instance.rb +326 -0
- data/lib/oraclebmc/core/models/internet_gateway.rb +248 -0
- data/lib/oraclebmc/core/models/ip_sec_connection.rb +261 -0
- data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +195 -0
- data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +198 -0
- data/lib/oraclebmc/core/models/launch_instance_details.rb +327 -0
- data/lib/oraclebmc/core/models/port_range.rb +175 -0
- data/lib/oraclebmc/core/models/route_rule.rb +177 -0
- data/lib/oraclebmc/core/models/route_table.rb +246 -0
- data/lib/oraclebmc/core/models/security_list.rb +257 -0
- data/lib/oraclebmc/core/models/shape.rb +164 -0
- data/lib/oraclebmc/core/models/subnet.rb +325 -0
- data/lib/oraclebmc/core/models/tcp_options.rb +177 -0
- data/lib/oraclebmc/core/models/tunnel_config.rb +193 -0
- data/lib/oraclebmc/core/models/tunnel_status.rb +218 -0
- data/lib/oraclebmc/core/models/udp_options.rb +177 -0
- data/lib/oraclebmc/core/models/update_cpe_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_dhcp_details.rb +172 -0
- data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_drg_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_image_details.rb +165 -0
- data/lib/oraclebmc/core/models/update_instance_details.rb +165 -0
- data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +173 -0
- data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_route_table_details.rb +173 -0
- data/lib/oraclebmc/core/models/update_security_list_details.rb +184 -0
- data/lib/oraclebmc/core/models/update_subnet_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_vcn_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_volume_backup_details.rb +162 -0
- data/lib/oraclebmc/core/models/update_volume_details.rb +163 -0
- data/lib/oraclebmc/core/models/vcn.rb +272 -0
- data/lib/oraclebmc/core/models/vnic.rb +274 -0
- data/lib/oraclebmc/core/models/vnic_attachment.rb +271 -0
- data/lib/oraclebmc/core/models/volume.rb +249 -0
- data/lib/oraclebmc/core/models/volume_attachment.rb +284 -0
- data/lib/oraclebmc/core/models/volume_backup.rb +273 -0
- data/lib/oraclebmc/core/util.rb +1 -0
- data/lib/oraclebmc/core/virtual_network_client.rb +2263 -0
- data/lib/oraclebmc/errors.rb +62 -0
- data/lib/oraclebmc/global_context.rb +21 -0
- data/lib/oraclebmc/identity/identity.rb +38 -0
- data/lib/oraclebmc/identity/identity_client.rb +1462 -0
- data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +173 -0
- data/lib/oraclebmc/identity/models/api_key.rb +251 -0
- data/lib/oraclebmc/identity/models/availability_domain.rb +173 -0
- data/lib/oraclebmc/identity/models/compartment.rb +251 -0
- data/lib/oraclebmc/identity/models/create_api_key_details.rb +162 -0
- data/lib/oraclebmc/identity/models/create_compartment_details.rb +187 -0
- data/lib/oraclebmc/identity/models/create_group_details.rb +186 -0
- data/lib/oraclebmc/identity/models/create_policy_details.rb +215 -0
- data/lib/oraclebmc/identity/models/create_swift_password_details.rb +163 -0
- data/lib/oraclebmc/identity/models/create_user_details.rb +186 -0
- data/lib/oraclebmc/identity/models/group.rb +251 -0
- data/lib/oraclebmc/identity/models/policy.rb +277 -0
- data/lib/oraclebmc/identity/models/swift_password.rb +266 -0
- data/lib/oraclebmc/identity/models/ui_password.rb +227 -0
- data/lib/oraclebmc/identity/models/update_compartment_details.rb +162 -0
- data/lib/oraclebmc/identity/models/update_group_details.rb +162 -0
- data/lib/oraclebmc/identity/models/update_policy_details.rb +190 -0
- data/lib/oraclebmc/identity/models/update_state_details.rb +163 -0
- data/lib/oraclebmc/identity/models/update_swift_password_details.rb +162 -0
- data/lib/oraclebmc/identity/models/update_user_details.rb +162 -0
- data/lib/oraclebmc/identity/models/user.rb +257 -0
- data/lib/oraclebmc/identity/models/user_group_membership.rb +249 -0
- data/lib/oraclebmc/identity/util.rb +1 -0
- data/lib/oraclebmc/load_balancer/load_balancer.rb +45 -0
- data/lib/oraclebmc/load_balancer/load_balancer_client.rb +1218 -0
- data/lib/oraclebmc/load_balancer/models/backend.rb +262 -0
- data/lib/oraclebmc/load_balancer/models/backend_details.rb +248 -0
- data/lib/oraclebmc/load_balancer/models/backend_set.rb +211 -0
- data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +197 -0
- data/lib/oraclebmc/load_balancer/models/certificate.rb +209 -0
- data/lib/oraclebmc/load_balancer/models/certificate_details.rb +245 -0
- data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +248 -0
- data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +210 -0
- data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +245 -0
- data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +216 -0
- data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +233 -0
- data/lib/oraclebmc/load_balancer/models/health_checker.rb +265 -0
- data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +264 -0
- data/lib/oraclebmc/load_balancer/models/ip_address.rb +165 -0
- data/lib/oraclebmc/load_balancer/models/listener.rb +216 -0
- data/lib/oraclebmc/load_balancer/models/listener_details.rb +202 -0
- data/lib/oraclebmc/load_balancer/models/load_balancer.rb +296 -0
- data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +162 -0
- data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +162 -0
- data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +162 -0
- data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +195 -0
- data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +195 -0
- data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +220 -0
- data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +197 -0
- data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +263 -0
- data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +202 -0
- data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +165 -0
- data/lib/oraclebmc/load_balancer/models/work_request.rb +269 -0
- data/lib/oraclebmc/load_balancer/models/work_request_error.rb +185 -0
- data/lib/oraclebmc/load_balancer/util.rb +55 -0
- data/lib/oraclebmc/regions.rb +41 -0
- data/lib/oraclebmc/response.rb +86 -0
- data/lib/oraclebmc/signer.rb +119 -0
- data/lib/oraclebmc/version.rb +5 -0
- data/lib/oraclebmc/waiter.rb +111 -0
- data/lib/oraclebmc.rb +20 -0
- metadata +265 -0
@@ -0,0 +1,1462 @@
|
|
1
|
+
# Copyright (c) 2016 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
|
+
if not OracleBMC::Regions.valid_region? region
|
50
|
+
logger.info "Unknown region '#{@region}', falling back to default endpoint format." if logger
|
51
|
+
end
|
52
|
+
|
53
|
+
@endpoint = OracleBMC::Regions.get_service_endpoint(@region, :IdentityClient) + '/20160918'
|
54
|
+
logger.info "IdentityClient endpoint set to '#{endpoint}'." if logger
|
55
|
+
end
|
56
|
+
|
57
|
+
# @return [Logger] The logger for this client. May be nil.
|
58
|
+
def logger
|
59
|
+
@api_client.config.logger
|
60
|
+
end
|
61
|
+
|
62
|
+
|
63
|
+
# Adds the specified user to the specified group and returns a `UserGroupMembership` object with its own OCID.
|
64
|
+
#
|
65
|
+
# After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the
|
66
|
+
# object, first make sure its `lifecycleState` has changed to ACTIVE.
|
67
|
+
#
|
68
|
+
# @param [AddUserToGroupDetails] add_user_to_group_details Request object for adding a user to a group.
|
69
|
+
# @param [Hash] opts the optional parameters
|
70
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
71
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
72
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
73
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
74
|
+
# may be rejected).
|
75
|
+
#
|
76
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::UserGroupMembership
|
77
|
+
def add_user_to_group(add_user_to_group_details, opts = {})
|
78
|
+
logger.debug "Calling operation IdentityClient#add_user_to_group." if logger
|
79
|
+
|
80
|
+
fail "Missing the required parameter 'add_user_to_group_details' when calling add_user_to_group." if add_user_to_group_details.nil?
|
81
|
+
|
82
|
+
path = "/userGroupMemberships/"
|
83
|
+
|
84
|
+
# Query Params
|
85
|
+
query_params = {}
|
86
|
+
|
87
|
+
# Header Params
|
88
|
+
header_params = {}
|
89
|
+
header_params['accept'] = 'application/json'
|
90
|
+
header_params['content-type'] = 'application/json'
|
91
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
92
|
+
|
93
|
+
post_body = @api_client.object_to_http_body(add_user_to_group_details)
|
94
|
+
|
95
|
+
return @api_client.call_api(
|
96
|
+
:POST,
|
97
|
+
path,
|
98
|
+
endpoint,
|
99
|
+
:header_params => header_params,
|
100
|
+
:query_params => query_params,
|
101
|
+
:body => post_body,
|
102
|
+
:return_type => 'OracleBMC::Identity::Models::UserGroupMembership')
|
103
|
+
end
|
104
|
+
|
105
|
+
# Creates a new compartment in your tenancy.
|
106
|
+
#
|
107
|
+
# **Important:** Compartments cannot be renamed or deleted.
|
108
|
+
#
|
109
|
+
# You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy
|
110
|
+
# is simply the root compartment. For information about OCIDs, see
|
111
|
+
# [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
112
|
+
#
|
113
|
+
# You must also specify a *name* for the compartment, which must be unique across all compartments in
|
114
|
+
# your tenancy and cannot be changed. You can use this name or the OCID when writing policies that apply
|
115
|
+
# to the compartment. For more information about policies, see
|
116
|
+
# [How Policies Work](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm).
|
117
|
+
#
|
118
|
+
# You must also specify a *description* for the compartment (although it can be an empty string). It does
|
119
|
+
# not have to be unique, and you can change it anytime with
|
120
|
+
# {#update_compartment update_compartment}.
|
121
|
+
#
|
122
|
+
# After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the
|
123
|
+
# object, first make sure its `lifecycleState` has changed to ACTIVE.
|
124
|
+
#
|
125
|
+
# @param [CreateCompartmentDetails] create_compartment_details Request object for creating a new compartment.
|
126
|
+
# @param [Hash] opts the optional parameters
|
127
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
128
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
129
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
130
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
131
|
+
# may be rejected).
|
132
|
+
#
|
133
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::Compartment
|
134
|
+
def create_compartment(create_compartment_details, opts = {})
|
135
|
+
logger.debug "Calling operation IdentityClient#create_compartment." if logger
|
136
|
+
|
137
|
+
fail "Missing the required parameter 'create_compartment_details' when calling create_compartment." if create_compartment_details.nil?
|
138
|
+
|
139
|
+
path = "/compartments/"
|
140
|
+
|
141
|
+
# Query Params
|
142
|
+
query_params = {}
|
143
|
+
|
144
|
+
# Header Params
|
145
|
+
header_params = {}
|
146
|
+
header_params['accept'] = 'application/json'
|
147
|
+
header_params['content-type'] = 'application/json'
|
148
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
149
|
+
|
150
|
+
post_body = @api_client.object_to_http_body(create_compartment_details)
|
151
|
+
|
152
|
+
return @api_client.call_api(
|
153
|
+
:POST,
|
154
|
+
path,
|
155
|
+
endpoint,
|
156
|
+
:header_params => header_params,
|
157
|
+
:query_params => query_params,
|
158
|
+
:body => post_body,
|
159
|
+
:return_type => 'OracleBMC::Identity::Models::Compartment')
|
160
|
+
end
|
161
|
+
|
162
|
+
# Creates a new group in your tenancy.
|
163
|
+
#
|
164
|
+
# You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy
|
165
|
+
# is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies)
|
166
|
+
# reside within the tenancy itself, unlike cloud resources such as compute instances, which typically
|
167
|
+
# reside within compartments inside the tenancy. For information about OCIDs, see
|
168
|
+
# [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
169
|
+
#
|
170
|
+
# You must also specify a *name* for the group, which must be unique across all groups in your tenancy and
|
171
|
+
# cannot be changed. You can use this name or the OCID when writing policies that apply to the group. For more
|
172
|
+
# information about policies, see [How Policies Work](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm).
|
173
|
+
#
|
174
|
+
# You must also specify a *description* for the group (although it can be an empty string). It does not
|
175
|
+
# have to be unique, and you can change it anytime with {#update_group update_group}.
|
176
|
+
#
|
177
|
+
# After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the
|
178
|
+
# object, first make sure its `lifecycleState` has changed to ACTIVE.
|
179
|
+
#
|
180
|
+
# After creating the group, you need to put users in it and write policies for it.
|
181
|
+
# See {#add_user_to_group add_user_to_group} and
|
182
|
+
# {#create_policy create_policy}.
|
183
|
+
#
|
184
|
+
# @param [CreateGroupDetails] create_group_details Request object for creating a new group.
|
185
|
+
# @param [Hash] opts the optional parameters
|
186
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
187
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
188
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
189
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
190
|
+
# may be rejected).
|
191
|
+
#
|
192
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::Group
|
193
|
+
def create_group(create_group_details, opts = {})
|
194
|
+
logger.debug "Calling operation IdentityClient#create_group." if logger
|
195
|
+
|
196
|
+
fail "Missing the required parameter 'create_group_details' when calling create_group." if create_group_details.nil?
|
197
|
+
|
198
|
+
path = "/groups/"
|
199
|
+
|
200
|
+
# Query Params
|
201
|
+
query_params = {}
|
202
|
+
|
203
|
+
# Header Params
|
204
|
+
header_params = {}
|
205
|
+
header_params['accept'] = 'application/json'
|
206
|
+
header_params['content-type'] = 'application/json'
|
207
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
208
|
+
|
209
|
+
post_body = @api_client.object_to_http_body(create_group_details)
|
210
|
+
|
211
|
+
return @api_client.call_api(
|
212
|
+
:POST,
|
213
|
+
path,
|
214
|
+
endpoint,
|
215
|
+
:header_params => header_params,
|
216
|
+
:query_params => query_params,
|
217
|
+
:body => post_body,
|
218
|
+
:return_type => 'OracleBMC::Identity::Models::Group')
|
219
|
+
end
|
220
|
+
|
221
|
+
# Creates a new Console one-time password for the specified user. For more information about user
|
222
|
+
# credentials, see [User Credentials](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/usercredentials.htm).
|
223
|
+
#
|
224
|
+
# Use this operation after creating a new user, or if a user forgets their password. The new one-time
|
225
|
+
# password is returned to you in the response, and you must securely deliver it to the user. They'll
|
226
|
+
# be prompted to change this password the next time they sign in to the Console. If they don't change
|
227
|
+
# it within 7 days, the password will expire and you'll need to create a new one-time password for the
|
228
|
+
# user.
|
229
|
+
#
|
230
|
+
# **Note:** The user's Console login is the unique name you specified when you created the user
|
231
|
+
# (see {#create_user create_user}).
|
232
|
+
#
|
233
|
+
# @param [String] user_id The OCID of the user.
|
234
|
+
# @param [Hash] opts the optional parameters
|
235
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
236
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
237
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
238
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
239
|
+
# may be rejected).
|
240
|
+
#
|
241
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::UIPassword
|
242
|
+
def create_or_reset_ui_password(user_id, opts = {})
|
243
|
+
logger.debug "Calling operation IdentityClient#create_or_reset_ui_password." if logger
|
244
|
+
|
245
|
+
fail "Missing the required parameter 'user_id' when calling create_or_reset_ui_password." if user_id.nil?
|
246
|
+
|
247
|
+
path = "/users/{userId}/uiPassword".sub('{userId}', user_id.to_s)
|
248
|
+
|
249
|
+
# Query Params
|
250
|
+
query_params = {}
|
251
|
+
|
252
|
+
# Header Params
|
253
|
+
header_params = {}
|
254
|
+
header_params['accept'] = 'application/json'
|
255
|
+
header_params['content-type'] = 'application/json'
|
256
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
257
|
+
|
258
|
+
post_body = nil
|
259
|
+
|
260
|
+
return @api_client.call_api(
|
261
|
+
:POST,
|
262
|
+
path,
|
263
|
+
endpoint,
|
264
|
+
:header_params => header_params,
|
265
|
+
:query_params => query_params,
|
266
|
+
:body => post_body,
|
267
|
+
:return_type => 'OracleBMC::Identity::Models::UIPassword')
|
268
|
+
end
|
269
|
+
|
270
|
+
# Creates a new policy in the specified compartment (either the tenancy or another of your compartments).
|
271
|
+
# If you're new to policies, see [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
|
272
|
+
#
|
273
|
+
# You must specify a *name* for the policy, which must be unique across all policies in your tenancy
|
274
|
+
# and cannot be changed.
|
275
|
+
#
|
276
|
+
# You must also specify a *description* for the policy (although it can be an empty string). It does not
|
277
|
+
# have to be unique, and you can change it anytime with {#update_policy update_policy}.
|
278
|
+
#
|
279
|
+
# You must specify one or more policy statements in the statements array. For information about writing
|
280
|
+
# policies, see [How Policies Work](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policies.htm) and
|
281
|
+
# [Common Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm).
|
282
|
+
#
|
283
|
+
# After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using the
|
284
|
+
# object, first make sure its `lifecycleState` has changed to ACTIVE.
|
285
|
+
#
|
286
|
+
# New policies take effect typically within 10 seconds.
|
287
|
+
#
|
288
|
+
# @param [CreatePolicyDetails] create_policy_details Request object for creating a new policy.
|
289
|
+
# @param [Hash] opts the optional parameters
|
290
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
291
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
292
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
293
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
294
|
+
# may be rejected).
|
295
|
+
#
|
296
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::Policy
|
297
|
+
def create_policy(create_policy_details, opts = {})
|
298
|
+
logger.debug "Calling operation IdentityClient#create_policy." if logger
|
299
|
+
|
300
|
+
fail "Missing the required parameter 'create_policy_details' when calling create_policy." if create_policy_details.nil?
|
301
|
+
|
302
|
+
path = "/policies/"
|
303
|
+
|
304
|
+
# Query Params
|
305
|
+
query_params = {}
|
306
|
+
|
307
|
+
# Header Params
|
308
|
+
header_params = {}
|
309
|
+
header_params['accept'] = 'application/json'
|
310
|
+
header_params['content-type'] = 'application/json'
|
311
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
312
|
+
|
313
|
+
post_body = @api_client.object_to_http_body(create_policy_details)
|
314
|
+
|
315
|
+
return @api_client.call_api(
|
316
|
+
:POST,
|
317
|
+
path,
|
318
|
+
endpoint,
|
319
|
+
:header_params => header_params,
|
320
|
+
:query_params => query_params,
|
321
|
+
:body => post_body,
|
322
|
+
:return_type => 'OracleBMC::Identity::Models::Policy')
|
323
|
+
end
|
324
|
+
|
325
|
+
# Creates a new Swift password for the specified user. For information about what Swift passwords are for, see
|
326
|
+
# [Managing User Credentials](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm).
|
327
|
+
#
|
328
|
+
# You must specify a *description* for the Swift password (although it can be an empty string). It does not
|
329
|
+
# have to be unique, and you can change it anytime with
|
330
|
+
# {#update_swift_password update_swift_password}.
|
331
|
+
#
|
332
|
+
# Every user has permission to create a Swift password for *their own user ID*. An administrator in your organization
|
333
|
+
# does not need to write a policy to give users this ability. To compare, administrators who have permission to the
|
334
|
+
# tenancy can use this operation to create a Swift password for any user, including themselves.
|
335
|
+
#
|
336
|
+
# @param [CreateSwiftPasswordDetails] create_swift_password_details Request object for creating a new swift password.
|
337
|
+
# @param [String] user_id The OCID of the user.
|
338
|
+
# @param [Hash] opts the optional parameters
|
339
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
340
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
341
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
342
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
343
|
+
# may be rejected).
|
344
|
+
#
|
345
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::SwiftPassword
|
346
|
+
def create_swift_password(create_swift_password_details, user_id, opts = {})
|
347
|
+
logger.debug "Calling operation IdentityClient#create_swift_password." if logger
|
348
|
+
|
349
|
+
fail "Missing the required parameter 'create_swift_password_details' when calling create_swift_password." if create_swift_password_details.nil?
|
350
|
+
fail "Missing the required parameter 'user_id' when calling create_swift_password." if user_id.nil?
|
351
|
+
|
352
|
+
path = "/users/{userId}/swiftPasswords/".sub('{userId}', user_id.to_s)
|
353
|
+
|
354
|
+
# Query Params
|
355
|
+
query_params = {}
|
356
|
+
|
357
|
+
# Header Params
|
358
|
+
header_params = {}
|
359
|
+
header_params['accept'] = 'application/json'
|
360
|
+
header_params['content-type'] = 'application/json'
|
361
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
362
|
+
|
363
|
+
post_body = @api_client.object_to_http_body(create_swift_password_details)
|
364
|
+
|
365
|
+
return @api_client.call_api(
|
366
|
+
:POST,
|
367
|
+
path,
|
368
|
+
endpoint,
|
369
|
+
:header_params => header_params,
|
370
|
+
:query_params => query_params,
|
371
|
+
:body => post_body,
|
372
|
+
:return_type => 'OracleBMC::Identity::Models::SwiftPassword')
|
373
|
+
end
|
374
|
+
|
375
|
+
# Creates a new user in your tenancy. For conceptual information about users, your tenancy, and other
|
376
|
+
# IAM Service components, see [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm).
|
377
|
+
#
|
378
|
+
# You must specify your tenancy's OCID as the compartment ID in the request object (remember that the
|
379
|
+
# tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and
|
380
|
+
# some policies) reside within the tenancy itself, unlike cloud resources such as compute instances,
|
381
|
+
# which typically reside within compartments inside the tenancy. For information about OCIDs, see
|
382
|
+
# [Resource Identifiers](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).
|
383
|
+
#
|
384
|
+
# You must also specify a *name* for the user, which must be unique across all users in your tenancy
|
385
|
+
# and cannot be changed. Allowed characters: No spaces. Only letters, numerals, hyphens, periods,
|
386
|
+
# underscores, +, and @. If you specify a name that's already in use, you'll get a 409 error.
|
387
|
+
# This name will be the user's login to the Console. You might want to pick a
|
388
|
+
# name that your company's own identity system (e.g., Active Directory, LDAP, etc.) already uses.
|
389
|
+
# If you delete a user and then create a new user with the same name, they'll be considered different
|
390
|
+
# users because they have different OCIDs.
|
391
|
+
#
|
392
|
+
# You must also specify a *description* for the user (although it can be an empty string).
|
393
|
+
# It does not have to be unique, and you can change it anytime with
|
394
|
+
# {#update_user update_user}. You can use the field to provide the user's
|
395
|
+
# full name, a description, a nickname, or other information to generally identify the user.
|
396
|
+
#
|
397
|
+
# After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before
|
398
|
+
# using the object, first make sure its `lifecycleState` has changed to ACTIVE.
|
399
|
+
#
|
400
|
+
# A new user has no permissions until you place the user in one or more groups (see
|
401
|
+
# {#add_user_to_group add_user_to_group}). If the user needs to
|
402
|
+
# access the Console, you need to provide the user a password (see
|
403
|
+
# {#create_or_reset_ui_password create_or_reset_ui_password}).
|
404
|
+
# If the user needs to access the Oracle Bare Metal Cloud Services REST API, you need to upload a
|
405
|
+
# public API signing key for that user (see
|
406
|
+
# [Required Keys and OCIDs](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm) and also
|
407
|
+
# {#upload_api_key upload_api_key}).
|
408
|
+
#
|
409
|
+
# **Important:** Make sure to inform the new user which compartment(s) they have access to.
|
410
|
+
#
|
411
|
+
# @param [CreateUserDetails] create_user_details Request object for creating a new user.
|
412
|
+
# @param [Hash] opts the optional parameters
|
413
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
414
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
415
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
416
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
417
|
+
# may be rejected).
|
418
|
+
#
|
419
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::User
|
420
|
+
def create_user(create_user_details, opts = {})
|
421
|
+
logger.debug "Calling operation IdentityClient#create_user." if logger
|
422
|
+
|
423
|
+
fail "Missing the required parameter 'create_user_details' when calling create_user." if create_user_details.nil?
|
424
|
+
|
425
|
+
path = "/users/"
|
426
|
+
|
427
|
+
# Query Params
|
428
|
+
query_params = {}
|
429
|
+
|
430
|
+
# Header Params
|
431
|
+
header_params = {}
|
432
|
+
header_params['accept'] = 'application/json'
|
433
|
+
header_params['content-type'] = 'application/json'
|
434
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
435
|
+
|
436
|
+
post_body = @api_client.object_to_http_body(create_user_details)
|
437
|
+
|
438
|
+
return @api_client.call_api(
|
439
|
+
:POST,
|
440
|
+
path,
|
441
|
+
endpoint,
|
442
|
+
:header_params => header_params,
|
443
|
+
:query_params => query_params,
|
444
|
+
:body => post_body,
|
445
|
+
:return_type => 'OracleBMC::Identity::Models::User')
|
446
|
+
end
|
447
|
+
|
448
|
+
# Deletes the specified API signing key for the specified user.
|
449
|
+
#
|
450
|
+
# Every user has permission to use this operation to delete a key for *their own user ID*. An
|
451
|
+
# administrator in your organization does not need to write a policy to give users this ability.
|
452
|
+
# To compare, administrators who have permission to the tenancy can use this operation to delete
|
453
|
+
# a key for any user, including themselves.
|
454
|
+
#
|
455
|
+
# @param [String] user_id The OCID of the user.
|
456
|
+
# @param [String] fingerprint The key's fingerprint.
|
457
|
+
# @param [Hash] opts the optional parameters
|
458
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
459
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
460
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
461
|
+
#
|
462
|
+
# @return [Response] A Response object with data of type nil
|
463
|
+
def delete_api_key(user_id, fingerprint, opts = {})
|
464
|
+
logger.debug "Calling operation IdentityClient#delete_api_key." if logger
|
465
|
+
|
466
|
+
fail "Missing the required parameter 'user_id' when calling delete_api_key." if user_id.nil?
|
467
|
+
fail "Missing the required parameter 'fingerprint' when calling delete_api_key." if fingerprint.nil?
|
468
|
+
|
469
|
+
path = "/users/{userId}/apiKeys/{fingerprint}".sub('{userId}', user_id.to_s).sub('{fingerprint}', fingerprint.to_s)
|
470
|
+
|
471
|
+
# Query Params
|
472
|
+
query_params = {}
|
473
|
+
|
474
|
+
# Header Params
|
475
|
+
header_params = {}
|
476
|
+
header_params['accept'] = 'application/json'
|
477
|
+
header_params['content-type'] = 'application/json'
|
478
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
479
|
+
|
480
|
+
post_body = nil
|
481
|
+
|
482
|
+
return @api_client.call_api(
|
483
|
+
:DELETE,
|
484
|
+
path,
|
485
|
+
endpoint,
|
486
|
+
:header_params => header_params,
|
487
|
+
:query_params => query_params,
|
488
|
+
:body => post_body)
|
489
|
+
end
|
490
|
+
|
491
|
+
# Deletes the specified group. The group must be empty.
|
492
|
+
#
|
493
|
+
# @param [String] group_id The OCID of the group.
|
494
|
+
# @param [Hash] opts the optional parameters
|
495
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
496
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
497
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
498
|
+
#
|
499
|
+
# @return [Response] A Response object with data of type nil
|
500
|
+
def delete_group(group_id, opts = {})
|
501
|
+
logger.debug "Calling operation IdentityClient#delete_group." if logger
|
502
|
+
|
503
|
+
fail "Missing the required parameter 'group_id' when calling delete_group." if group_id.nil?
|
504
|
+
|
505
|
+
path = "/groups/{groupId}".sub('{groupId}', group_id.to_s)
|
506
|
+
|
507
|
+
# Query Params
|
508
|
+
query_params = {}
|
509
|
+
|
510
|
+
# Header Params
|
511
|
+
header_params = {}
|
512
|
+
header_params['accept'] = 'application/json'
|
513
|
+
header_params['content-type'] = 'application/json'
|
514
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
515
|
+
|
516
|
+
post_body = nil
|
517
|
+
|
518
|
+
return @api_client.call_api(
|
519
|
+
:DELETE,
|
520
|
+
path,
|
521
|
+
endpoint,
|
522
|
+
:header_params => header_params,
|
523
|
+
:query_params => query_params,
|
524
|
+
:body => post_body)
|
525
|
+
end
|
526
|
+
|
527
|
+
# Deletes the specified policy. The deletion takes effect typically within 10 seconds.
|
528
|
+
# @param [String] policy_id The OCID of the policy.
|
529
|
+
# @param [Hash] opts the optional parameters
|
530
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
531
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
532
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
533
|
+
#
|
534
|
+
# @return [Response] A Response object with data of type nil
|
535
|
+
def delete_policy(policy_id, opts = {})
|
536
|
+
logger.debug "Calling operation IdentityClient#delete_policy." if logger
|
537
|
+
|
538
|
+
fail "Missing the required parameter 'policy_id' when calling delete_policy." if policy_id.nil?
|
539
|
+
|
540
|
+
path = "/policies/{policyId}".sub('{policyId}', policy_id.to_s)
|
541
|
+
|
542
|
+
# Query Params
|
543
|
+
query_params = {}
|
544
|
+
|
545
|
+
# Header Params
|
546
|
+
header_params = {}
|
547
|
+
header_params['accept'] = 'application/json'
|
548
|
+
header_params['content-type'] = 'application/json'
|
549
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
550
|
+
|
551
|
+
post_body = nil
|
552
|
+
|
553
|
+
return @api_client.call_api(
|
554
|
+
:DELETE,
|
555
|
+
path,
|
556
|
+
endpoint,
|
557
|
+
:header_params => header_params,
|
558
|
+
:query_params => query_params,
|
559
|
+
:body => post_body)
|
560
|
+
end
|
561
|
+
|
562
|
+
# Deletes the specified Swift password for the specified user.
|
563
|
+
#
|
564
|
+
# @param [String] user_id The OCID of the user.
|
565
|
+
# @param [String] swift_password_id The OCID of the Swift password.
|
566
|
+
# @param [Hash] opts the optional parameters
|
567
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
568
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
569
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
570
|
+
#
|
571
|
+
# @return [Response] A Response object with data of type nil
|
572
|
+
def delete_swift_password(user_id, swift_password_id, opts = {})
|
573
|
+
logger.debug "Calling operation IdentityClient#delete_swift_password." if logger
|
574
|
+
|
575
|
+
fail "Missing the required parameter 'user_id' when calling delete_swift_password." if user_id.nil?
|
576
|
+
fail "Missing the required parameter 'swift_password_id' when calling delete_swift_password." if swift_password_id.nil?
|
577
|
+
|
578
|
+
path = "/users/{userId}/swiftPasswords/{swiftPasswordId}".sub('{userId}', user_id.to_s).sub('{swiftPasswordId}', swift_password_id.to_s)
|
579
|
+
|
580
|
+
# Query Params
|
581
|
+
query_params = {}
|
582
|
+
|
583
|
+
# Header Params
|
584
|
+
header_params = {}
|
585
|
+
header_params['accept'] = 'application/json'
|
586
|
+
header_params['content-type'] = 'application/json'
|
587
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
588
|
+
|
589
|
+
post_body = nil
|
590
|
+
|
591
|
+
return @api_client.call_api(
|
592
|
+
:DELETE,
|
593
|
+
path,
|
594
|
+
endpoint,
|
595
|
+
:header_params => header_params,
|
596
|
+
:query_params => query_params,
|
597
|
+
:body => post_body)
|
598
|
+
end
|
599
|
+
|
600
|
+
# Deletes the specified user. The user must not be in any groups.
|
601
|
+
# @param [String] user_id The OCID of the user.
|
602
|
+
# @param [Hash] opts the optional parameters
|
603
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
604
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
605
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
606
|
+
#
|
607
|
+
# @return [Response] A Response object with data of type nil
|
608
|
+
def delete_user(user_id, opts = {})
|
609
|
+
logger.debug "Calling operation IdentityClient#delete_user." if logger
|
610
|
+
|
611
|
+
fail "Missing the required parameter 'user_id' when calling delete_user." if user_id.nil?
|
612
|
+
|
613
|
+
path = "/users/{userId}".sub('{userId}', user_id.to_s)
|
614
|
+
|
615
|
+
# Query Params
|
616
|
+
query_params = {}
|
617
|
+
|
618
|
+
# Header Params
|
619
|
+
header_params = {}
|
620
|
+
header_params['accept'] = 'application/json'
|
621
|
+
header_params['content-type'] = 'application/json'
|
622
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
623
|
+
|
624
|
+
post_body = nil
|
625
|
+
|
626
|
+
return @api_client.call_api(
|
627
|
+
:DELETE,
|
628
|
+
path,
|
629
|
+
endpoint,
|
630
|
+
:header_params => header_params,
|
631
|
+
:query_params => query_params,
|
632
|
+
:body => post_body)
|
633
|
+
end
|
634
|
+
|
635
|
+
# Gets the specified compartment's information.
|
636
|
+
#
|
637
|
+
# This operation does not return a list of all the resources inside the compartment. There is no single
|
638
|
+
# API operation that does that. Compartments can contain multiple types of resources (instances, block
|
639
|
+
# storage volumes, etc.). To find out what's in a compartment, you must call the \"List\" operation for
|
640
|
+
# each resource type and specify the compartment's OCID as a query parameter in the request. For example,
|
641
|
+
# call the {#list_instances list_instances} operation in the Cloud Compute
|
642
|
+
# Service or the {#list_volumes list_volumes} operation in Cloud Block Storage.
|
643
|
+
#
|
644
|
+
# @param [String] compartment_id The OCID of the compartment.
|
645
|
+
# @param [Hash] opts the optional parameters
|
646
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::Compartment
|
647
|
+
def get_compartment(compartment_id, opts = {})
|
648
|
+
logger.debug "Calling operation IdentityClient#get_compartment." if logger
|
649
|
+
|
650
|
+
fail "Missing the required parameter 'compartment_id' when calling get_compartment." if compartment_id.nil?
|
651
|
+
|
652
|
+
path = "/compartments/{compartmentId}".sub('{compartmentId}', compartment_id.to_s)
|
653
|
+
|
654
|
+
# Query Params
|
655
|
+
query_params = {}
|
656
|
+
|
657
|
+
# Header Params
|
658
|
+
header_params = {}
|
659
|
+
header_params['accept'] = 'application/json'
|
660
|
+
header_params['content-type'] = 'application/json'
|
661
|
+
|
662
|
+
post_body = nil
|
663
|
+
|
664
|
+
return @api_client.call_api(
|
665
|
+
:GET,
|
666
|
+
path,
|
667
|
+
endpoint,
|
668
|
+
:header_params => header_params,
|
669
|
+
:query_params => query_params,
|
670
|
+
:body => post_body,
|
671
|
+
:return_type => 'OracleBMC::Identity::Models::Compartment')
|
672
|
+
end
|
673
|
+
|
674
|
+
# Gets the specified group's information.
|
675
|
+
#
|
676
|
+
# This operation does not return a list of all the users in the group. To do that, use
|
677
|
+
# {#list_user_group_memberships list_user_group_memberships} and
|
678
|
+
# provide the group's OCID as a query parameter in the request.
|
679
|
+
#
|
680
|
+
# @param [String] group_id The OCID of the group.
|
681
|
+
# @param [Hash] opts the optional parameters
|
682
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::Group
|
683
|
+
def get_group(group_id, opts = {})
|
684
|
+
logger.debug "Calling operation IdentityClient#get_group." if logger
|
685
|
+
|
686
|
+
fail "Missing the required parameter 'group_id' when calling get_group." if group_id.nil?
|
687
|
+
|
688
|
+
path = "/groups/{groupId}".sub('{groupId}', group_id.to_s)
|
689
|
+
|
690
|
+
# Query Params
|
691
|
+
query_params = {}
|
692
|
+
|
693
|
+
# Header Params
|
694
|
+
header_params = {}
|
695
|
+
header_params['accept'] = 'application/json'
|
696
|
+
header_params['content-type'] = 'application/json'
|
697
|
+
|
698
|
+
post_body = nil
|
699
|
+
|
700
|
+
return @api_client.call_api(
|
701
|
+
:GET,
|
702
|
+
path,
|
703
|
+
endpoint,
|
704
|
+
:header_params => header_params,
|
705
|
+
:query_params => query_params,
|
706
|
+
:body => post_body,
|
707
|
+
:return_type => 'OracleBMC::Identity::Models::Group')
|
708
|
+
end
|
709
|
+
|
710
|
+
# Gets the specified policy's information.
|
711
|
+
# @param [String] policy_id The OCID of the policy.
|
712
|
+
# @param [Hash] opts the optional parameters
|
713
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::Policy
|
714
|
+
def get_policy(policy_id, opts = {})
|
715
|
+
logger.debug "Calling operation IdentityClient#get_policy." if logger
|
716
|
+
|
717
|
+
fail "Missing the required parameter 'policy_id' when calling get_policy." if policy_id.nil?
|
718
|
+
|
719
|
+
path = "/policies/{policyId}".sub('{policyId}', policy_id.to_s)
|
720
|
+
|
721
|
+
# Query Params
|
722
|
+
query_params = {}
|
723
|
+
|
724
|
+
# Header Params
|
725
|
+
header_params = {}
|
726
|
+
header_params['accept'] = 'application/json'
|
727
|
+
header_params['content-type'] = 'application/json'
|
728
|
+
|
729
|
+
post_body = nil
|
730
|
+
|
731
|
+
return @api_client.call_api(
|
732
|
+
:GET,
|
733
|
+
path,
|
734
|
+
endpoint,
|
735
|
+
:header_params => header_params,
|
736
|
+
:query_params => query_params,
|
737
|
+
:body => post_body,
|
738
|
+
:return_type => 'OracleBMC::Identity::Models::Policy')
|
739
|
+
end
|
740
|
+
|
741
|
+
# Gets the specified user's information.
|
742
|
+
# @param [String] user_id The OCID of the user.
|
743
|
+
# @param [Hash] opts the optional parameters
|
744
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::User
|
745
|
+
def get_user(user_id, opts = {})
|
746
|
+
logger.debug "Calling operation IdentityClient#get_user." if logger
|
747
|
+
|
748
|
+
fail "Missing the required parameter 'user_id' when calling get_user." if user_id.nil?
|
749
|
+
|
750
|
+
path = "/users/{userId}".sub('{userId}', user_id.to_s)
|
751
|
+
|
752
|
+
# Query Params
|
753
|
+
query_params = {}
|
754
|
+
|
755
|
+
# Header Params
|
756
|
+
header_params = {}
|
757
|
+
header_params['accept'] = 'application/json'
|
758
|
+
header_params['content-type'] = 'application/json'
|
759
|
+
|
760
|
+
post_body = nil
|
761
|
+
|
762
|
+
return @api_client.call_api(
|
763
|
+
:GET,
|
764
|
+
path,
|
765
|
+
endpoint,
|
766
|
+
:header_params => header_params,
|
767
|
+
:query_params => query_params,
|
768
|
+
:body => post_body,
|
769
|
+
:return_type => 'OracleBMC::Identity::Models::User')
|
770
|
+
end
|
771
|
+
|
772
|
+
# Gets the specified UserGroupMembership's information.
|
773
|
+
# @param [String] user_group_membership_id The OCID of the userGroupMembership.
|
774
|
+
# @param [Hash] opts the optional parameters
|
775
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::UserGroupMembership
|
776
|
+
def get_user_group_membership(user_group_membership_id, opts = {})
|
777
|
+
logger.debug "Calling operation IdentityClient#get_user_group_membership." if logger
|
778
|
+
|
779
|
+
fail "Missing the required parameter 'user_group_membership_id' when calling get_user_group_membership." if user_group_membership_id.nil?
|
780
|
+
|
781
|
+
path = "/userGroupMemberships/{userGroupMembershipId}".sub('{userGroupMembershipId}', user_group_membership_id.to_s)
|
782
|
+
|
783
|
+
# Query Params
|
784
|
+
query_params = {}
|
785
|
+
|
786
|
+
# Header Params
|
787
|
+
header_params = {}
|
788
|
+
header_params['accept'] = 'application/json'
|
789
|
+
header_params['content-type'] = 'application/json'
|
790
|
+
|
791
|
+
post_body = nil
|
792
|
+
|
793
|
+
return @api_client.call_api(
|
794
|
+
:GET,
|
795
|
+
path,
|
796
|
+
endpoint,
|
797
|
+
:header_params => header_params,
|
798
|
+
:query_params => query_params,
|
799
|
+
:body => post_body,
|
800
|
+
:return_type => 'OracleBMC::Identity::Models::UserGroupMembership')
|
801
|
+
end
|
802
|
+
|
803
|
+
# Lists the API signing keys for the specified user. A user can have a maximum of three keys.
|
804
|
+
#
|
805
|
+
# Every user has permission to use this API call for *their own user ID*. An administrator in your
|
806
|
+
# organization does not need to write a policy to give users this ability.
|
807
|
+
#
|
808
|
+
# @param [String] user_id The OCID of the user.
|
809
|
+
# @param [Hash] opts the optional parameters
|
810
|
+
# @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::ApiKey>
|
811
|
+
def list_api_keys(user_id, opts = {})
|
812
|
+
logger.debug "Calling operation IdentityClient#list_api_keys." if logger
|
813
|
+
|
814
|
+
fail "Missing the required parameter 'user_id' when calling list_api_keys." if user_id.nil?
|
815
|
+
|
816
|
+
path = "/users/{userId}/apiKeys/".sub('{userId}', user_id.to_s)
|
817
|
+
|
818
|
+
# Query Params
|
819
|
+
query_params = {}
|
820
|
+
|
821
|
+
# Header Params
|
822
|
+
header_params = {}
|
823
|
+
header_params['accept'] = 'application/json'
|
824
|
+
header_params['content-type'] = 'application/json'
|
825
|
+
|
826
|
+
post_body = nil
|
827
|
+
|
828
|
+
return @api_client.call_api(
|
829
|
+
:GET,
|
830
|
+
path,
|
831
|
+
endpoint,
|
832
|
+
:header_params => header_params,
|
833
|
+
:query_params => query_params,
|
834
|
+
:body => post_body,
|
835
|
+
:return_type => 'Array<OracleBMC::Identity::Models::ApiKey>')
|
836
|
+
end
|
837
|
+
|
838
|
+
# Lists the Availability Domains in your tenancy. Specify the OCID of either the tenancy or another
|
839
|
+
# of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment).
|
840
|
+
# 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).
|
841
|
+
#
|
842
|
+
# @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
|
843
|
+
#
|
844
|
+
# @param [Hash] opts the optional parameters
|
845
|
+
# @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::AvailabilityDomain>
|
846
|
+
def list_availability_domains(compartment_id, opts = {})
|
847
|
+
logger.debug "Calling operation IdentityClient#list_availability_domains." if logger
|
848
|
+
|
849
|
+
fail "Missing the required parameter 'compartment_id' when calling list_availability_domains." if compartment_id.nil?
|
850
|
+
|
851
|
+
path = "/availabilityDomains/"
|
852
|
+
|
853
|
+
# Query Params
|
854
|
+
query_params = {}
|
855
|
+
query_params[:'compartmentId'] = compartment_id
|
856
|
+
|
857
|
+
# Header Params
|
858
|
+
header_params = {}
|
859
|
+
header_params['accept'] = 'application/json'
|
860
|
+
header_params['content-type'] = 'application/json'
|
861
|
+
|
862
|
+
post_body = nil
|
863
|
+
|
864
|
+
return @api_client.call_api(
|
865
|
+
:GET,
|
866
|
+
path,
|
867
|
+
endpoint,
|
868
|
+
:header_params => header_params,
|
869
|
+
:query_params => query_params,
|
870
|
+
:body => post_body,
|
871
|
+
:return_type => 'Array<OracleBMC::Identity::Models::AvailabilityDomain>')
|
872
|
+
end
|
873
|
+
|
874
|
+
# Lists the compartments in your tenancy. You must specify your tenancy's OCID as the value
|
875
|
+
# for the compartment ID (remember that the tenancy is simply the root compartment).
|
876
|
+
# 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).
|
877
|
+
#
|
878
|
+
# To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized,
|
879
|
+
# talk to an administrator. If you're an administrator who needs to write policies to give users access, see
|
880
|
+
# [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
|
881
|
+
#
|
882
|
+
# @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
|
883
|
+
#
|
884
|
+
# @param [Hash] opts the optional parameters
|
885
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
886
|
+
#
|
887
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
888
|
+
#
|
889
|
+
# @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::Compartment>
|
890
|
+
def list_compartments(compartment_id, opts = {})
|
891
|
+
logger.debug "Calling operation IdentityClient#list_compartments." if logger
|
892
|
+
|
893
|
+
fail "Missing the required parameter 'compartment_id' when calling list_compartments." if compartment_id.nil?
|
894
|
+
|
895
|
+
path = "/compartments/"
|
896
|
+
|
897
|
+
# Query Params
|
898
|
+
query_params = {}
|
899
|
+
query_params[:'compartmentId'] = compartment_id
|
900
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
901
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
902
|
+
|
903
|
+
# Header Params
|
904
|
+
header_params = {}
|
905
|
+
header_params['accept'] = 'application/json'
|
906
|
+
header_params['content-type'] = 'application/json'
|
907
|
+
|
908
|
+
post_body = nil
|
909
|
+
|
910
|
+
return @api_client.call_api(
|
911
|
+
:GET,
|
912
|
+
path,
|
913
|
+
endpoint,
|
914
|
+
:header_params => header_params,
|
915
|
+
:query_params => query_params,
|
916
|
+
:body => post_body,
|
917
|
+
:return_type => 'Array<OracleBMC::Identity::Models::Compartment>')
|
918
|
+
end
|
919
|
+
|
920
|
+
# Lists the groups in your tenancy. You must specify your tenancy's OCID as the value for
|
921
|
+
# the compartment ID (remember that the tenancy is simply the root compartment).
|
922
|
+
# 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).
|
923
|
+
#
|
924
|
+
# @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
|
925
|
+
#
|
926
|
+
# @param [Hash] opts the optional parameters
|
927
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
928
|
+
#
|
929
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
930
|
+
#
|
931
|
+
# @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::Group>
|
932
|
+
def list_groups(compartment_id, opts = {})
|
933
|
+
logger.debug "Calling operation IdentityClient#list_groups." if logger
|
934
|
+
|
935
|
+
fail "Missing the required parameter 'compartment_id' when calling list_groups." if compartment_id.nil?
|
936
|
+
|
937
|
+
path = "/groups/"
|
938
|
+
|
939
|
+
# Query Params
|
940
|
+
query_params = {}
|
941
|
+
query_params[:'compartmentId'] = compartment_id
|
942
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
943
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
944
|
+
|
945
|
+
# Header Params
|
946
|
+
header_params = {}
|
947
|
+
header_params['accept'] = 'application/json'
|
948
|
+
header_params['content-type'] = 'application/json'
|
949
|
+
|
950
|
+
post_body = nil
|
951
|
+
|
952
|
+
return @api_client.call_api(
|
953
|
+
:GET,
|
954
|
+
path,
|
955
|
+
endpoint,
|
956
|
+
:header_params => header_params,
|
957
|
+
:query_params => query_params,
|
958
|
+
:body => post_body,
|
959
|
+
:return_type => 'Array<OracleBMC::Identity::Models::Group>')
|
960
|
+
end
|
961
|
+
|
962
|
+
# Lists the policies in the specified compartment (either the tenancy or another of your compartments).
|
963
|
+
# 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).
|
964
|
+
#
|
965
|
+
# To determine which policies apply to a particular group or compartment, you must view the individual
|
966
|
+
# statements inside all your policies. There isn't a way to automatically obtain that information via the API.
|
967
|
+
#
|
968
|
+
# @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
|
969
|
+
#
|
970
|
+
# @param [Hash] opts the optional parameters
|
971
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
972
|
+
#
|
973
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
974
|
+
#
|
975
|
+
# @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::Policy>
|
976
|
+
def list_policies(compartment_id, opts = {})
|
977
|
+
logger.debug "Calling operation IdentityClient#list_policies." if logger
|
978
|
+
|
979
|
+
fail "Missing the required parameter 'compartment_id' when calling list_policies." if compartment_id.nil?
|
980
|
+
|
981
|
+
path = "/policies/"
|
982
|
+
|
983
|
+
# Query Params
|
984
|
+
query_params = {}
|
985
|
+
query_params[:'compartmentId'] = compartment_id
|
986
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
987
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
988
|
+
|
989
|
+
# Header Params
|
990
|
+
header_params = {}
|
991
|
+
header_params['accept'] = 'application/json'
|
992
|
+
header_params['content-type'] = 'application/json'
|
993
|
+
|
994
|
+
post_body = nil
|
995
|
+
|
996
|
+
return @api_client.call_api(
|
997
|
+
:GET,
|
998
|
+
path,
|
999
|
+
endpoint,
|
1000
|
+
:header_params => header_params,
|
1001
|
+
:query_params => query_params,
|
1002
|
+
:body => post_body,
|
1003
|
+
:return_type => 'Array<OracleBMC::Identity::Models::Policy>')
|
1004
|
+
end
|
1005
|
+
|
1006
|
+
# Lists the Swift passwords for the specified user. The returned object contains the password's OCID, but not
|
1007
|
+
# the password itself. The actual password is returned only upon creation.
|
1008
|
+
#
|
1009
|
+
# @param [String] user_id The OCID of the user.
|
1010
|
+
# @param [Hash] opts the optional parameters
|
1011
|
+
# @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::SwiftPassword>
|
1012
|
+
def list_swift_passwords(user_id, opts = {})
|
1013
|
+
logger.debug "Calling operation IdentityClient#list_swift_passwords." if logger
|
1014
|
+
|
1015
|
+
fail "Missing the required parameter 'user_id' when calling list_swift_passwords." if user_id.nil?
|
1016
|
+
|
1017
|
+
path = "/users/{userId}/swiftPasswords/".sub('{userId}', user_id.to_s)
|
1018
|
+
|
1019
|
+
# Query Params
|
1020
|
+
query_params = {}
|
1021
|
+
|
1022
|
+
# Header Params
|
1023
|
+
header_params = {}
|
1024
|
+
header_params['accept'] = 'application/json'
|
1025
|
+
header_params['content-type'] = 'application/json'
|
1026
|
+
|
1027
|
+
post_body = nil
|
1028
|
+
|
1029
|
+
return @api_client.call_api(
|
1030
|
+
:GET,
|
1031
|
+
path,
|
1032
|
+
endpoint,
|
1033
|
+
:header_params => header_params,
|
1034
|
+
:query_params => query_params,
|
1035
|
+
:body => post_body,
|
1036
|
+
:return_type => 'Array<OracleBMC::Identity::Models::SwiftPassword>')
|
1037
|
+
end
|
1038
|
+
|
1039
|
+
# Lists the `UserGroupMembership` objects in your tenancy. You must specify your tenancy's OCID
|
1040
|
+
# as the value for the compartment ID
|
1041
|
+
# (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)).
|
1042
|
+
# You must also then filter the list in one of these ways:
|
1043
|
+
#
|
1044
|
+
# - You can limit the results to just the memberships for a given user by specifying a `userId`.
|
1045
|
+
# - Similarly, you can limit the results to just the memberships for a given group by specifying a `groupId`.
|
1046
|
+
# - You can set both the `userId` and `groupId` to determine if the specified user is in the specified group.
|
1047
|
+
# If the answer is no, the response is an empty list.
|
1048
|
+
#
|
1049
|
+
# To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized,
|
1050
|
+
# talk to an administrator. If you're an administrator who needs to write policies to give users access, see
|
1051
|
+
# [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
|
1052
|
+
#
|
1053
|
+
# @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
|
1054
|
+
#
|
1055
|
+
# @param [Hash] opts the optional parameters
|
1056
|
+
# @option opts [String] :user_id The OCID of the user.
|
1057
|
+
# @option opts [String] :group_id The OCID of the group.
|
1058
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
1059
|
+
#
|
1060
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
1061
|
+
#
|
1062
|
+
# @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::UserGroupMembership>
|
1063
|
+
def list_user_group_memberships(compartment_id, opts = {})
|
1064
|
+
logger.debug "Calling operation IdentityClient#list_user_group_memberships." if logger
|
1065
|
+
|
1066
|
+
fail "Missing the required parameter 'compartment_id' when calling list_user_group_memberships." if compartment_id.nil?
|
1067
|
+
|
1068
|
+
path = "/userGroupMemberships/"
|
1069
|
+
|
1070
|
+
# Query Params
|
1071
|
+
query_params = {}
|
1072
|
+
query_params[:'compartmentId'] = compartment_id
|
1073
|
+
query_params[:'userId'] = opts[:'user_id'] if opts[:'user_id']
|
1074
|
+
query_params[:'groupId'] = opts[:'group_id'] if opts[:'group_id']
|
1075
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
1076
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
1077
|
+
|
1078
|
+
# Header Params
|
1079
|
+
header_params = {}
|
1080
|
+
header_params['accept'] = 'application/json'
|
1081
|
+
header_params['content-type'] = 'application/json'
|
1082
|
+
|
1083
|
+
post_body = nil
|
1084
|
+
|
1085
|
+
return @api_client.call_api(
|
1086
|
+
:GET,
|
1087
|
+
path,
|
1088
|
+
endpoint,
|
1089
|
+
:header_params => header_params,
|
1090
|
+
:query_params => query_params,
|
1091
|
+
:body => post_body,
|
1092
|
+
:return_type => 'Array<OracleBMC::Identity::Models::UserGroupMembership>')
|
1093
|
+
end
|
1094
|
+
|
1095
|
+
# Lists the users in your tenancy. You must specify your tenancy's OCID as the value for the
|
1096
|
+
# compartment ID (remember that the tenancy is simply the root compartment).
|
1097
|
+
# 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).
|
1098
|
+
#
|
1099
|
+
# @param [String] compartment_id The OCID of the compartment (remember that the tenancy is simply the root compartment).
|
1100
|
+
#
|
1101
|
+
# @param [Hash] opts the optional parameters
|
1102
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
1103
|
+
#
|
1104
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
1105
|
+
#
|
1106
|
+
# @return [Response] A Response object with data of type Array<OracleBMC::Identity::Models::User>
|
1107
|
+
def list_users(compartment_id, opts = {})
|
1108
|
+
logger.debug "Calling operation IdentityClient#list_users." if logger
|
1109
|
+
|
1110
|
+
fail "Missing the required parameter 'compartment_id' when calling list_users." if compartment_id.nil?
|
1111
|
+
|
1112
|
+
path = "/users/"
|
1113
|
+
|
1114
|
+
# Query Params
|
1115
|
+
query_params = {}
|
1116
|
+
query_params[:'compartmentId'] = compartment_id
|
1117
|
+
query_params[:'page'] = opts[:'page'] if opts[:'page']
|
1118
|
+
query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
|
1119
|
+
|
1120
|
+
# Header Params
|
1121
|
+
header_params = {}
|
1122
|
+
header_params['accept'] = 'application/json'
|
1123
|
+
header_params['content-type'] = 'application/json'
|
1124
|
+
|
1125
|
+
post_body = nil
|
1126
|
+
|
1127
|
+
return @api_client.call_api(
|
1128
|
+
:GET,
|
1129
|
+
path,
|
1130
|
+
endpoint,
|
1131
|
+
:header_params => header_params,
|
1132
|
+
:query_params => query_params,
|
1133
|
+
:body => post_body,
|
1134
|
+
:return_type => 'Array<OracleBMC::Identity::Models::User>')
|
1135
|
+
end
|
1136
|
+
|
1137
|
+
# Removes a user from a group by deleting the corresponding `UserGroupMembership`.
|
1138
|
+
# @param [String] user_group_membership_id The OCID of the userGroupMembership.
|
1139
|
+
# @param [Hash] opts the optional parameters
|
1140
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1141
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1142
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1143
|
+
#
|
1144
|
+
# @return [Response] A Response object with data of type nil
|
1145
|
+
def remove_user_from_group(user_group_membership_id, opts = {})
|
1146
|
+
logger.debug "Calling operation IdentityClient#remove_user_from_group." if logger
|
1147
|
+
|
1148
|
+
fail "Missing the required parameter 'user_group_membership_id' when calling remove_user_from_group." if user_group_membership_id.nil?
|
1149
|
+
|
1150
|
+
path = "/userGroupMemberships/{userGroupMembershipId}".sub('{userGroupMembershipId}', user_group_membership_id.to_s)
|
1151
|
+
|
1152
|
+
# Query Params
|
1153
|
+
query_params = {}
|
1154
|
+
|
1155
|
+
# Header Params
|
1156
|
+
header_params = {}
|
1157
|
+
header_params['accept'] = 'application/json'
|
1158
|
+
header_params['content-type'] = 'application/json'
|
1159
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
1160
|
+
|
1161
|
+
post_body = nil
|
1162
|
+
|
1163
|
+
return @api_client.call_api(
|
1164
|
+
:DELETE,
|
1165
|
+
path,
|
1166
|
+
endpoint,
|
1167
|
+
:header_params => header_params,
|
1168
|
+
:query_params => query_params,
|
1169
|
+
:body => post_body)
|
1170
|
+
end
|
1171
|
+
|
1172
|
+
# Updates the specified compartment's description.
|
1173
|
+
# @param [String] compartment_id The OCID of the compartment.
|
1174
|
+
# @param [UpdateCompartmentDetails] update_compartment_details Request object for updating a compartment.
|
1175
|
+
# @param [Hash] opts the optional parameters
|
1176
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1177
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1178
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1179
|
+
#
|
1180
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::Compartment
|
1181
|
+
def update_compartment(compartment_id, update_compartment_details, opts = {})
|
1182
|
+
logger.debug "Calling operation IdentityClient#update_compartment." if logger
|
1183
|
+
|
1184
|
+
fail "Missing the required parameter 'compartment_id' when calling update_compartment." if compartment_id.nil?
|
1185
|
+
fail "Missing the required parameter 'update_compartment_details' when calling update_compartment." if update_compartment_details.nil?
|
1186
|
+
|
1187
|
+
path = "/compartments/{compartmentId}".sub('{compartmentId}', compartment_id.to_s)
|
1188
|
+
|
1189
|
+
# Query Params
|
1190
|
+
query_params = {}
|
1191
|
+
|
1192
|
+
# Header Params
|
1193
|
+
header_params = {}
|
1194
|
+
header_params['accept'] = 'application/json'
|
1195
|
+
header_params['content-type'] = 'application/json'
|
1196
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
1197
|
+
|
1198
|
+
post_body = @api_client.object_to_http_body(update_compartment_details)
|
1199
|
+
|
1200
|
+
return @api_client.call_api(
|
1201
|
+
:PUT,
|
1202
|
+
path,
|
1203
|
+
endpoint,
|
1204
|
+
:header_params => header_params,
|
1205
|
+
:query_params => query_params,
|
1206
|
+
:body => post_body,
|
1207
|
+
:return_type => 'OracleBMC::Identity::Models::Compartment')
|
1208
|
+
end
|
1209
|
+
|
1210
|
+
# Updates the specified group.
|
1211
|
+
# @param [String] group_id The OCID of the group.
|
1212
|
+
# @param [UpdateGroupDetails] update_group_details Request object for updating a group.
|
1213
|
+
# @param [Hash] opts the optional parameters
|
1214
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1215
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1216
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1217
|
+
#
|
1218
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::Group
|
1219
|
+
def update_group(group_id, update_group_details, opts = {})
|
1220
|
+
logger.debug "Calling operation IdentityClient#update_group." if logger
|
1221
|
+
|
1222
|
+
fail "Missing the required parameter 'group_id' when calling update_group." if group_id.nil?
|
1223
|
+
fail "Missing the required parameter 'update_group_details' when calling update_group." if update_group_details.nil?
|
1224
|
+
|
1225
|
+
path = "/groups/{groupId}".sub('{groupId}', group_id.to_s)
|
1226
|
+
|
1227
|
+
# Query Params
|
1228
|
+
query_params = {}
|
1229
|
+
|
1230
|
+
# Header Params
|
1231
|
+
header_params = {}
|
1232
|
+
header_params['accept'] = 'application/json'
|
1233
|
+
header_params['content-type'] = 'application/json'
|
1234
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
1235
|
+
|
1236
|
+
post_body = @api_client.object_to_http_body(update_group_details)
|
1237
|
+
|
1238
|
+
return @api_client.call_api(
|
1239
|
+
:PUT,
|
1240
|
+
path,
|
1241
|
+
endpoint,
|
1242
|
+
:header_params => header_params,
|
1243
|
+
:query_params => query_params,
|
1244
|
+
:body => post_body,
|
1245
|
+
:return_type => 'OracleBMC::Identity::Models::Group')
|
1246
|
+
end
|
1247
|
+
|
1248
|
+
# Updates the specified policy. You can update the description or the policy statements themselves.
|
1249
|
+
#
|
1250
|
+
# Policy changes take effect typically within 10 seconds.
|
1251
|
+
#
|
1252
|
+
# @param [String] policy_id The OCID of the policy.
|
1253
|
+
# @param [UpdatePolicyDetails] update_policy_details Request object for updating a policy.
|
1254
|
+
# @param [Hash] opts the optional parameters
|
1255
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1256
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1257
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1258
|
+
#
|
1259
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::Policy
|
1260
|
+
def update_policy(policy_id, update_policy_details, opts = {})
|
1261
|
+
logger.debug "Calling operation IdentityClient#update_policy." if logger
|
1262
|
+
|
1263
|
+
fail "Missing the required parameter 'policy_id' when calling update_policy." if policy_id.nil?
|
1264
|
+
fail "Missing the required parameter 'update_policy_details' when calling update_policy." if update_policy_details.nil?
|
1265
|
+
|
1266
|
+
path = "/policies/{policyId}".sub('{policyId}', policy_id.to_s)
|
1267
|
+
|
1268
|
+
# Query Params
|
1269
|
+
query_params = {}
|
1270
|
+
|
1271
|
+
# Header Params
|
1272
|
+
header_params = {}
|
1273
|
+
header_params['accept'] = 'application/json'
|
1274
|
+
header_params['content-type'] = 'application/json'
|
1275
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
1276
|
+
|
1277
|
+
post_body = @api_client.object_to_http_body(update_policy_details)
|
1278
|
+
|
1279
|
+
return @api_client.call_api(
|
1280
|
+
:PUT,
|
1281
|
+
path,
|
1282
|
+
endpoint,
|
1283
|
+
:header_params => header_params,
|
1284
|
+
:query_params => query_params,
|
1285
|
+
:body => post_body,
|
1286
|
+
:return_type => 'OracleBMC::Identity::Models::Policy')
|
1287
|
+
end
|
1288
|
+
|
1289
|
+
# Updates the specified Swift password's description.
|
1290
|
+
#
|
1291
|
+
# @param [String] user_id The OCID of the user.
|
1292
|
+
# @param [String] swift_password_id The OCID of the Swift password.
|
1293
|
+
# @param [UpdateSwiftPasswordDetails] update_swift_password_details Request object for updating a Swift password.
|
1294
|
+
# @param [Hash] opts the optional parameters
|
1295
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1296
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1297
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1298
|
+
#
|
1299
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::SwiftPassword
|
1300
|
+
def update_swift_password(user_id, swift_password_id, update_swift_password_details, opts = {})
|
1301
|
+
logger.debug "Calling operation IdentityClient#update_swift_password." if logger
|
1302
|
+
|
1303
|
+
fail "Missing the required parameter 'user_id' when calling update_swift_password." if user_id.nil?
|
1304
|
+
fail "Missing the required parameter 'swift_password_id' when calling update_swift_password." if swift_password_id.nil?
|
1305
|
+
fail "Missing the required parameter 'update_swift_password_details' when calling update_swift_password." if update_swift_password_details.nil?
|
1306
|
+
|
1307
|
+
path = "/users/{userId}/swiftPasswords/{swiftPasswordId}".sub('{userId}', user_id.to_s).sub('{swiftPasswordId}', swift_password_id.to_s)
|
1308
|
+
|
1309
|
+
# Query Params
|
1310
|
+
query_params = {}
|
1311
|
+
|
1312
|
+
# Header Params
|
1313
|
+
header_params = {}
|
1314
|
+
header_params['accept'] = 'application/json'
|
1315
|
+
header_params['content-type'] = 'application/json'
|
1316
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
1317
|
+
|
1318
|
+
post_body = @api_client.object_to_http_body(update_swift_password_details)
|
1319
|
+
|
1320
|
+
return @api_client.call_api(
|
1321
|
+
:PUT,
|
1322
|
+
path,
|
1323
|
+
endpoint,
|
1324
|
+
:header_params => header_params,
|
1325
|
+
:query_params => query_params,
|
1326
|
+
:body => post_body,
|
1327
|
+
:return_type => 'OracleBMC::Identity::Models::SwiftPassword')
|
1328
|
+
end
|
1329
|
+
|
1330
|
+
# Updates the description of the specified user.
|
1331
|
+
# @param [String] user_id The OCID of the user.
|
1332
|
+
# @param [UpdateUserDetails] update_user_details Request object for updating a user.
|
1333
|
+
# @param [Hash] opts the optional parameters
|
1334
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1335
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1336
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1337
|
+
#
|
1338
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::User
|
1339
|
+
def update_user(user_id, update_user_details, opts = {})
|
1340
|
+
logger.debug "Calling operation IdentityClient#update_user." if logger
|
1341
|
+
|
1342
|
+
fail "Missing the required parameter 'user_id' when calling update_user." if user_id.nil?
|
1343
|
+
fail "Missing the required parameter 'update_user_details' when calling update_user." if update_user_details.nil?
|
1344
|
+
|
1345
|
+
path = "/users/{userId}".sub('{userId}', user_id.to_s)
|
1346
|
+
|
1347
|
+
# Query Params
|
1348
|
+
query_params = {}
|
1349
|
+
|
1350
|
+
# Header Params
|
1351
|
+
header_params = {}
|
1352
|
+
header_params['accept'] = 'application/json'
|
1353
|
+
header_params['content-type'] = 'application/json'
|
1354
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
1355
|
+
|
1356
|
+
post_body = @api_client.object_to_http_body(update_user_details)
|
1357
|
+
|
1358
|
+
return @api_client.call_api(
|
1359
|
+
:PUT,
|
1360
|
+
path,
|
1361
|
+
endpoint,
|
1362
|
+
:header_params => header_params,
|
1363
|
+
:query_params => query_params,
|
1364
|
+
:body => post_body,
|
1365
|
+
:return_type => 'OracleBMC::Identity::Models::User')
|
1366
|
+
end
|
1367
|
+
|
1368
|
+
# Updates the state of the specified user.
|
1369
|
+
#
|
1370
|
+
# @param [String] user_id The OCID of the user.
|
1371
|
+
# @param [UpdateStateDetails] update_state_details Request object for updating a user state.
|
1372
|
+
# @param [Hash] opts the optional parameters
|
1373
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1374
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1375
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1376
|
+
#
|
1377
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::User
|
1378
|
+
def update_user_state(user_id, update_state_details, opts = {})
|
1379
|
+
logger.debug "Calling operation IdentityClient#update_user_state." if logger
|
1380
|
+
|
1381
|
+
fail "Missing the required parameter 'user_id' when calling update_user_state." if user_id.nil?
|
1382
|
+
fail "Missing the required parameter 'update_state_details' when calling update_user_state." if update_state_details.nil?
|
1383
|
+
|
1384
|
+
path = "/users/{userId}/state/".sub('{userId}', user_id.to_s)
|
1385
|
+
|
1386
|
+
# Query Params
|
1387
|
+
query_params = {}
|
1388
|
+
|
1389
|
+
# Header Params
|
1390
|
+
header_params = {}
|
1391
|
+
header_params['accept'] = 'application/json'
|
1392
|
+
header_params['content-type'] = 'application/json'
|
1393
|
+
header_params[:'if-match'] = opts[:'if_match'] if opts[:'if_match']
|
1394
|
+
|
1395
|
+
post_body = @api_client.object_to_http_body(update_state_details)
|
1396
|
+
|
1397
|
+
return @api_client.call_api(
|
1398
|
+
:PUT,
|
1399
|
+
path,
|
1400
|
+
endpoint,
|
1401
|
+
:header_params => header_params,
|
1402
|
+
:query_params => query_params,
|
1403
|
+
:body => post_body,
|
1404
|
+
:return_type => 'OracleBMC::Identity::Models::User')
|
1405
|
+
end
|
1406
|
+
|
1407
|
+
# Uploads an API signing key for the specified user.
|
1408
|
+
#
|
1409
|
+
# Every user has permission to use this operation to upload a key for *their own user ID*. An
|
1410
|
+
# administrator in your organization does not need to write a policy to give users this ability.
|
1411
|
+
# To compare, administrators who have permission to the tenancy can use this operation to upload a
|
1412
|
+
# key for any user, including themselves.
|
1413
|
+
#
|
1414
|
+
# **Important:** Even though you have permission to upload an API key, you might not yet
|
1415
|
+
# have permission to do much else. If you try calling an operation unrelated to your own credential
|
1416
|
+
# management (e.g., `ListUsers`, `LaunchInstance`) and receive an \"unauthorized\" error,
|
1417
|
+
# check with an administrator to confirm which IAM Service group(s) you're in and what access
|
1418
|
+
# you have. Also confirm you're working in the correct compartment.
|
1419
|
+
#
|
1420
|
+
# After you send your request, the new object's `lifecycleState` will temporarily be CREATING. Before using
|
1421
|
+
# the object, first make sure its `lifecycleState` has changed to ACTIVE.
|
1422
|
+
#
|
1423
|
+
# @param [String] user_id The OCID of the user.
|
1424
|
+
# @param [CreateApiKeyDetails] create_api_key_details Request object for uploading an API key for a user.
|
1425
|
+
# @param [Hash] opts the optional parameters
|
1426
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
1427
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
1428
|
+
# hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
|
1429
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
1430
|
+
# may be rejected).
|
1431
|
+
#
|
1432
|
+
# @return [Response] A Response object with data of type OracleBMC::Identity::Models::ApiKey
|
1433
|
+
def upload_api_key(user_id, create_api_key_details, opts = {})
|
1434
|
+
logger.debug "Calling operation IdentityClient#upload_api_key." if logger
|
1435
|
+
|
1436
|
+
fail "Missing the required parameter 'user_id' when calling upload_api_key." if user_id.nil?
|
1437
|
+
fail "Missing the required parameter 'create_api_key_details' when calling upload_api_key." if create_api_key_details.nil?
|
1438
|
+
|
1439
|
+
path = "/users/{userId}/apiKeys/".sub('{userId}', user_id.to_s)
|
1440
|
+
|
1441
|
+
# Query Params
|
1442
|
+
query_params = {}
|
1443
|
+
|
1444
|
+
# Header Params
|
1445
|
+
header_params = {}
|
1446
|
+
header_params['accept'] = 'application/json'
|
1447
|
+
header_params['content-type'] = 'application/json'
|
1448
|
+
header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']
|
1449
|
+
|
1450
|
+
post_body = @api_client.object_to_http_body(create_api_key_details)
|
1451
|
+
|
1452
|
+
return @api_client.call_api(
|
1453
|
+
:POST,
|
1454
|
+
path,
|
1455
|
+
endpoint,
|
1456
|
+
:header_params => header_params,
|
1457
|
+
:query_params => query_params,
|
1458
|
+
:body => post_body,
|
1459
|
+
:return_type => 'OracleBMC::Identity::Models::ApiKey')
|
1460
|
+
end
|
1461
|
+
end
|
1462
|
+
end
|