Class: RBACApiClient::CrossAccountRequestApi
- Inherits:
-
Object
- Object
- RBACApiClient::CrossAccountRequestApi
- Defined in:
- lib/insights-rbac-api-client/api/cross_account_request_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_cross_account_requests(cross_account_request_in, opts = {}) ⇒ CrossAccountRequestOut
Create a cross account request.
-
#create_cross_account_requests_with_http_info(cross_account_request_in, opts = {}) ⇒ Array<(CrossAccountRequestOut, Integer, Hash)>
Create a cross account request.
-
#get_cross_account_request(uuid, opts = {}) ⇒ CrossAccountRequestDetail
Get a cross account request.
-
#get_cross_account_request_with_http_info(uuid, opts = {}) ⇒ Array<(CrossAccountRequestDetail, Integer, Hash)>
Get a cross account request.
-
#initialize(api_client = ApiClient.default) ⇒ CrossAccountRequestApi
constructor
A new instance of CrossAccountRequestApi.
-
#list_cross_account_requests(opts = {}) ⇒ CrossAccountRequestPagination
List the cross account requests for a user or account By default, responses are sorted in ascending order by created_at.
-
#list_cross_account_requests_with_http_info(opts = {}) ⇒ Array<(CrossAccountRequestPagination, Integer, Hash)>
List the cross account requests for a user or account By default, responses are sorted in ascending order by created_at.
-
#patch_cross_account_request(uuid, cross_account_request_patch, opts = {}) ⇒ CrossAccountRequestDetail
Patch a cross account request Patch the start_date/end_date/roles of an existing request.
-
#patch_cross_account_request_with_http_info(uuid, cross_account_request_patch, opts = {}) ⇒ Array<(CrossAccountRequestDetail, Integer, Hash)>
Patch a cross account request Patch the start_date/end_date/roles of an existing request.
-
#put_cross_account_request(uuid, cross_account_request_update_in, opts = {}) ⇒ CrossAccountRequestDetail
Update a cross account request For TAM requestor to update the start_date/end_date/roles of an existing cross account request.
-
#put_cross_account_request_with_http_info(uuid, cross_account_request_update_in, opts = {}) ⇒ Array<(CrossAccountRequestDetail, Integer, Hash)>
Update a cross account request For TAM requestor to update the start_date/end_date/roles of an existing cross account request.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CrossAccountRequestApi
Returns a new instance of CrossAccountRequestApi.
19 20 21 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_cross_account_requests(cross_account_request_in, opts = {}) ⇒ CrossAccountRequestOut
Create a cross account request
26 27 28 29 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 26 def create_cross_account_requests(cross_account_request_in, opts = {}) data, _status_code, _headers = create_cross_account_requests_with_http_info(cross_account_request_in, opts) data end |
#create_cross_account_requests_with_http_info(cross_account_request_in, opts = {}) ⇒ Array<(CrossAccountRequestOut, Integer, Hash)>
Create a cross account request
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 35 def create_cross_account_requests_with_http_info(cross_account_request_in, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CrossAccountRequestApi.create_cross_account_requests ...' end # verify the required parameter 'cross_account_request_in' is set if @api_client.config.client_side_validation && cross_account_request_in.nil? fail ArgumentError, "Missing the required parameter 'cross_account_request_in' when calling CrossAccountRequestApi.create_cross_account_requests" end # resource path local_var_path = '/cross-account-requests/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(cross_account_request_in) # return_type return_type = opts[:debug_return_type] || 'CrossAccountRequestOut' # auth_names auth_names = opts[:debug_auth_names] || ['basic_auth'] = opts.merge( :operation => :"CrossAccountRequestApi.create_cross_account_requests", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CrossAccountRequestApi#create_cross_account_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_cross_account_request(uuid, opts = {}) ⇒ CrossAccountRequestDetail
Get a cross account request
95 96 97 98 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 95 def get_cross_account_request(uuid, opts = {}) data, _status_code, _headers = get_cross_account_request_with_http_info(uuid, opts) data end |
#get_cross_account_request_with_http_info(uuid, opts = {}) ⇒ Array<(CrossAccountRequestDetail, Integer, Hash)>
Get a cross account request
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 107 def get_cross_account_request_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CrossAccountRequestApi.get_cross_account_request ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling CrossAccountRequestApi.get_cross_account_request" end allowable_values = ["user_id", "target_org"] if @api_client.config.client_side_validation && opts[:'query_by'] && !allowable_values.include?(opts[:'query_by']) fail ArgumentError, "invalid value for \"query_by\", must be one of #{allowable_values}" end allowable_values = ["true"] if @api_client.config.client_side_validation && opts[:'approved_only'] && !allowable_values.include?(opts[:'approved_only']) fail ArgumentError, "invalid value for \"approved_only\", must be one of #{allowable_values}" end # resource path local_var_path = '/cross-account-requests/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'query_by'] = opts[:'query_by'] if !opts[:'query_by'].nil? query_params[:'account'] = opts[:'account'] if !opts[:'account'].nil? query_params[:'approved_only'] = opts[:'approved_only'] if !opts[:'approved_only'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CrossAccountRequestDetail' # auth_names auth_names = opts[:debug_auth_names] || ['basic_auth'] = opts.merge( :operation => :"CrossAccountRequestApi.get_cross_account_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CrossAccountRequestApi#get_cross_account_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_cross_account_requests(opts = {}) ⇒ CrossAccountRequestPagination
List the cross account requests for a user or account By default, responses are sorted in ascending order by created_at
178 179 180 181 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 178 def list_cross_account_requests(opts = {}) data, _status_code, _headers = list_cross_account_requests_with_http_info(opts) data end |
#list_cross_account_requests_with_http_info(opts = {}) ⇒ Array<(CrossAccountRequestPagination, Integer, Hash)>
List the cross account requests for a user or account By default, responses are sorted in ascending order by created_at
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 195 def list_cross_account_requests_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CrossAccountRequestApi.list_cross_account_requests ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CrossAccountRequestApi.list_cross_account_requests, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CrossAccountRequestApi.list_cross_account_requests, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling CrossAccountRequestApi.list_cross_account_requests, must be greater than or equal to 0.' end allowable_values = ["user_id", "target_org"] if @api_client.config.client_side_validation && opts[:'query_by'] && !allowable_values.include?(opts[:'query_by']) fail ArgumentError, "invalid value for \"query_by\", must be one of #{allowable_values}" end allowable_values = ["true"] if @api_client.config.client_side_validation && opts[:'approved_only'] && !allowable_values.include?(opts[:'approved_only']) fail ArgumentError, "invalid value for \"approved_only\", must be one of #{allowable_values}" end allowable_values = ["pending", "approved", "denied", "cancelled", "expired"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end allowable_values = ["request_id", "start_date", "end_date", "created", "modified", "status"] if @api_client.config.client_side_validation && opts[:'order_by'] && !allowable_values.include?(opts[:'order_by']) fail ArgumentError, "invalid value for \"order_by\", must be one of #{allowable_values}" end # resource path local_var_path = '/cross-account-requests/' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'query_by'] = opts[:'query_by'] if !opts[:'query_by'].nil? query_params[:'account'] = opts[:'account'] if !opts[:'account'].nil? query_params[:'org_id'] = opts[:'org_id'] if !opts[:'org_id'].nil? query_params[:'approved_only'] = opts[:'approved_only'] if !opts[:'approved_only'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CrossAccountRequestPagination' # auth_names auth_names = opts[:debug_auth_names] || ['basic_auth'] = opts.merge( :operation => :"CrossAccountRequestApi.list_cross_account_requests", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CrossAccountRequestApi#list_cross_account_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_cross_account_request(uuid, cross_account_request_patch, opts = {}) ⇒ CrossAccountRequestDetail
Patch a cross account request Patch the start_date/end_date/roles of an existing request. Could be used by TAM requestor to cancel request or target account admin to approve/deny request.
281 282 283 284 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 281 def patch_cross_account_request(uuid, cross_account_request_patch, opts = {}) data, _status_code, _headers = patch_cross_account_request_with_http_info(uuid, cross_account_request_patch, opts) data end |
#patch_cross_account_request_with_http_info(uuid, cross_account_request_patch, opts = {}) ⇒ Array<(CrossAccountRequestDetail, Integer, Hash)>
Patch a cross account request Patch the start_date/end_date/roles of an existing request. Could be used by TAM requestor to cancel request or target account admin to approve/deny request.
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 292 def patch_cross_account_request_with_http_info(uuid, cross_account_request_patch, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CrossAccountRequestApi.patch_cross_account_request ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling CrossAccountRequestApi.patch_cross_account_request" end # verify the required parameter 'cross_account_request_patch' is set if @api_client.config.client_side_validation && cross_account_request_patch.nil? fail ArgumentError, "Missing the required parameter 'cross_account_request_patch' when calling CrossAccountRequestApi.patch_cross_account_request" end # resource path local_var_path = '/cross-account-requests/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(cross_account_request_patch) # return_type return_type = opts[:debug_return_type] || 'CrossAccountRequestDetail' # auth_names auth_names = opts[:debug_auth_names] || ['basic_auth'] = opts.merge( :operation => :"CrossAccountRequestApi.patch_cross_account_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CrossAccountRequestApi#patch_cross_account_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_cross_account_request(uuid, cross_account_request_update_in, opts = {}) ⇒ CrossAccountRequestDetail
Update a cross account request For TAM requestor to update the start_date/end_date/roles of an existing cross account request.
355 356 357 358 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 355 def put_cross_account_request(uuid, cross_account_request_update_in, opts = {}) data, _status_code, _headers = put_cross_account_request_with_http_info(uuid, cross_account_request_update_in, opts) data end |
#put_cross_account_request_with_http_info(uuid, cross_account_request_update_in, opts = {}) ⇒ Array<(CrossAccountRequestDetail, Integer, Hash)>
Update a cross account request For TAM requestor to update the start_date/end_date/roles of an existing cross account request.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/insights-rbac-api-client/api/cross_account_request_api.rb', line 366 def put_cross_account_request_with_http_info(uuid, cross_account_request_update_in, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CrossAccountRequestApi.put_cross_account_request ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling CrossAccountRequestApi.put_cross_account_request" end # verify the required parameter 'cross_account_request_update_in' is set if @api_client.config.client_side_validation && cross_account_request_update_in.nil? fail ArgumentError, "Missing the required parameter 'cross_account_request_update_in' when calling CrossAccountRequestApi.put_cross_account_request" end # resource path local_var_path = '/cross-account-requests/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(cross_account_request_update_in) # return_type return_type = opts[:debug_return_type] || 'CrossAccountRequestDetail' # auth_names auth_names = opts[:debug_auth_names] || ['basic_auth'] = opts.merge( :operation => :"CrossAccountRequestApi.put_cross_account_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CrossAccountRequestApi#put_cross_account_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |