Class: OCI::Apigateway::ApiGatewayClient
- Inherits:
-
Object
- Object
- OCI::Apigateway::ApiGatewayClient
- Defined in:
- lib/oci/apigateway/api_gateway_client.rb
Overview
API for the API Gateway service. Use this API to manage gateways, deployments, and related items. For more information, see Overview of API Gateway.
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#change_api_compartment(api_id, change_api_compartment_details, opts = {}) ⇒ Response
Changes the API compartment.
-
#change_certificate_compartment(certificate_id, change_certificate_compartment_details, opts = {}) ⇒ Response
Changes the certificate compartment.
-
#create_api(create_api_details, opts = {}) ⇒ Response
Creates a new API.
-
#create_certificate(create_certificate_details, opts = {}) ⇒ Response
Creates a new Certificate.
-
#create_sdk(create_sdk_details, opts = {}) ⇒ Response
Creates a new SDK.
-
#delete_api(api_id, opts = {}) ⇒ Response
Deletes the API with the given identifier.
-
#delete_certificate(certificate_id, opts = {}) ⇒ Response
Deletes the certificate with the given identifier.
-
#delete_sdk(sdk_id, opts = {}) ⇒ Response
Deletes provided SDK.
-
#get_api(api_id, opts = {}) ⇒ Response
Gets an API by identifier.
-
#get_api_content(api_id, opts = {}, &block) ⇒ Response
Get the raw API content.
-
#get_api_deployment_specification(api_id, opts = {}) ⇒ Response
Gets an API Deployment specification by identifier.
-
#get_api_validations(api_id, opts = {}) ⇒ Response
Gets the API validation results.
-
#get_certificate(certificate_id, opts = {}) ⇒ Response
Gets a certificate by identifier.
-
#get_sdk(sdk_id, opts = {}) ⇒ Response
Return object store downloadable URL and metadata.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ApiGatewayClient
constructor
Creates a new ApiGatewayClient.
-
#list_apis(compartment_id, opts = {}) ⇒ Response
Returns a list of APIs.
-
#list_certificates(compartment_id, opts = {}) ⇒ Response
Returns a list of certificates.
-
#list_sdk_language_types(compartment_id, opts = {}) ⇒ Response
Lists programming languages in which SDK can be generated.
-
#list_sdks(opts = {}) ⇒ Response
Returns list of generated SDKs.
-
#logger ⇒ Logger
The logger for this client.
-
#update_api(api_id, update_api_details, opts = {}) ⇒ Response
Updates the API with the given identifier.
-
#update_certificate(certificate_id, update_certificate_details, opts = {}) ⇒ Response
Updates a certificate with the given identifier.
-
#update_sdk(sdk_id, update_sdk_details, opts = {}) ⇒ Response
Updates the SDK with the given identifier.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ApiGatewayClient
Creates a new ApiGatewayClient. Notes: If a config is not specified, then the global OCI.config will be used.
This client is not thread-safe
Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 57 def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers) # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then # pass it to this constructor. # # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid # so try and load the config from the default file. config = OCI::Config.validate_and_build_config_with_signer(config, signer) signer = OCI::Signer.config_file_auth_builder(config) if signer.nil? @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config if endpoint @endpoint = endpoint + '/20190501' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "ApiGatewayClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
17 18 19 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 17 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
21 22 23 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 21 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
31 32 33 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 31 def region @region end |
#retry_config ⇒ OCI::Retry::RetryConfig (readonly)
The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil
, which means that an operation will not perform any retries
27 28 29 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 27 def retry_config @retry_config end |
Instance Method Details
#change_api_compartment(api_id, change_api_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_api_compartment API.
Changes the API compartment.
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 165 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 126 def change_api_compartment(api_id, change_api_compartment_details, opts = {}) logger.debug 'Calling operation ApiGatewayClient#change_api_compartment.' if logger raise "Missing the required parameter 'api_id' when calling change_api_compartment." if api_id.nil? raise "Missing the required parameter 'change_api_compartment_details' when calling change_api_compartment." if change_api_compartment_details.nil? raise "Parameter value for 'api_id' must not be blank" if OCI::Internal::Util.blank_string?(api_id) path = '/apis/{apiId}/actions/changeCompartment'.sub('{apiId}', api_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_api_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#change_api_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#change_certificate_compartment(certificate_id, change_certificate_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_certificate_compartment API.
Changes the certificate compartment.
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 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 196 def change_certificate_compartment(certificate_id, change_certificate_compartment_details, opts = {}) logger.debug 'Calling operation ApiGatewayClient#change_certificate_compartment.' if logger raise "Missing the required parameter 'certificate_id' when calling change_certificate_compartment." if certificate_id.nil? raise "Missing the required parameter 'change_certificate_compartment_details' when calling change_certificate_compartment." if change_certificate_compartment_details.nil? raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id) path = '/certificates/{certificateId}/actions/changeCompartment'.sub('{certificateId}', certificate_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_certificate_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#change_certificate_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#create_api(create_api_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_api API.
Creates a new API.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 260 def create_api(create_api_details, opts = {}) logger.debug 'Calling operation ApiGatewayClient#create_api.' if logger raise "Missing the required parameter 'create_api_details' when calling create_api." if create_api_details.nil? path = '/apis' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_api_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#create_api') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::Api' ) end # rubocop:enable Metrics/BlockLength end |
#create_certificate(create_certificate_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_certificate API.
Creates a new Certificate.
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 322 def create_certificate(create_certificate_details, opts = {}) logger.debug 'Calling operation ApiGatewayClient#create_certificate.' if logger raise "Missing the required parameter 'create_certificate_details' when calling create_certificate." if create_certificate_details.nil? path = '/certificates' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_certificate_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#create_certificate') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::Certificate' ) end # rubocop:enable Metrics/BlockLength end |
#create_sdk(create_sdk_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_sdk API.
Creates a new SDK.
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 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 383 def create_sdk(create_sdk_details, opts = {}) logger.debug 'Calling operation ApiGatewayClient#create_sdk.' if logger raise "Missing the required parameter 'create_sdk_details' when calling create_sdk." if create_sdk_details.nil? path = '/sdks' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_sdk_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#create_sdk') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::Sdk' ) end # rubocop:enable Metrics/BlockLength end |
#delete_api(api_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_api API.
Deletes the API with the given identifier.
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 444 def delete_api(api_id, opts = {}) logger.debug 'Calling operation ApiGatewayClient#delete_api.' if logger raise "Missing the required parameter 'api_id' when calling delete_api." if api_id.nil? raise "Parameter value for 'api_id' must not be blank" if OCI::Internal::Util.blank_string?(api_id) path = '/apis/{apiId}'.sub('{apiId}', api_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#delete_api') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_certificate(certificate_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_certificate API.
Deletes the certificate with the given identifier.
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 504 def delete_certificate(certificate_id, opts = {}) logger.debug 'Calling operation ApiGatewayClient#delete_certificate.' if logger raise "Missing the required parameter 'certificate_id' when calling delete_certificate." if certificate_id.nil? raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id) path = '/certificates/{certificateId}'.sub('{certificateId}', certificate_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#delete_certificate') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_sdk(sdk_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_sdk API.
Deletes provided SDK.
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 564 def delete_sdk(sdk_id, opts = {}) logger.debug 'Calling operation ApiGatewayClient#delete_sdk.' if logger raise "Missing the required parameter 'sdk_id' when calling delete_sdk." if sdk_id.nil? raise "Parameter value for 'sdk_id' must not be blank" if OCI::Internal::Util.blank_string?(sdk_id) path = '/sdks/{sdkId}'.sub('{sdkId}', sdk_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#delete_sdk') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#get_api(api_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_api API.
Gets an API by identifier.
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 618 def get_api(api_id, opts = {}) logger.debug 'Calling operation ApiGatewayClient#get_api.' if logger raise "Missing the required parameter 'api_id' when calling get_api." if api_id.nil? raise "Parameter value for 'api_id' must not be blank" if OCI::Internal::Util.blank_string?(api_id) path = '/apis/{apiId}'.sub('{apiId}', api_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#get_api') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::Api' ) end # rubocop:enable Metrics/BlockLength end |
#get_api_content(api_id, opts = {}, &block) ⇒ Response
Click here to see an example of how to use get_api_content API.
Get the raw API content.
684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 684 def get_api_content(api_id, opts = {}, &block) logger.debug 'Calling operation ApiGatewayClient#get_api_content.' if logger raise "Missing the required parameter 'api_id' when calling get_api_content." if api_id.nil? raise "Parameter value for 'api_id' must not be blank" if OCI::Internal::Util.blank_string?(api_id) path = '/apis/{apiId}/content'.sub('{apiId}', api_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = opts[:accept] if opts[:accept] header_params[:accept] ||= 'application/json' header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding] header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:range] = opts[:range] if opts[:range] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#get_api_content') do if !block.nil? @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &block ) elsif opts[:response_target] if opts[:response_target].respond_to? :write @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| opts[:response_target].write(chunk) } ) elsif opts[:response_target].is_a?(String) File.open(opts[:response_target], 'wb') do |output| return @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| output.write(chunk) } ) end end else @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'String' ) end end # rubocop:enable Metrics/BlockLength end |
#get_api_deployment_specification(api_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_api_deployment_specification API.
Gets an API Deployment specification by identifier.
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 790 def get_api_deployment_specification(api_id, opts = {}) logger.debug 'Calling operation ApiGatewayClient#get_api_deployment_specification.' if logger raise "Missing the required parameter 'api_id' when calling get_api_deployment_specification." if api_id.nil? raise "Parameter value for 'api_id' must not be blank" if OCI::Internal::Util.blank_string?(api_id) path = '/apis/{apiId}/deploymentSpecification'.sub('{apiId}', api_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#get_api_deployment_specification') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::ApiSpecification' ) end # rubocop:enable Metrics/BlockLength end |
#get_api_validations(api_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_api_validations API.
Gets the API validation results.
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 851 def get_api_validations(api_id, opts = {}) logger.debug 'Calling operation ApiGatewayClient#get_api_validations.' if logger raise "Missing the required parameter 'api_id' when calling get_api_validations." if api_id.nil? raise "Parameter value for 'api_id' must not be blank" if OCI::Internal::Util.blank_string?(api_id) path = '/apis/{apiId}/validations'.sub('{apiId}', api_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#get_api_validations') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::ApiValidations' ) end # rubocop:enable Metrics/BlockLength end |
#get_certificate(certificate_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_certificate API.
Gets a certificate by identifier.
906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 906 def get_certificate(certificate_id, opts = {}) logger.debug 'Calling operation ApiGatewayClient#get_certificate.' if logger raise "Missing the required parameter 'certificate_id' when calling get_certificate." if certificate_id.nil? raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id) path = '/certificates/{certificateId}'.sub('{certificateId}', certificate_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#get_certificate') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::Certificate' ) end # rubocop:enable Metrics/BlockLength end |
#get_sdk(sdk_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_sdk API.
Return object store downloadable URL and metadata.
960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 960 def get_sdk(sdk_id, opts = {}) logger.debug 'Calling operation ApiGatewayClient#get_sdk.' if logger raise "Missing the required parameter 'sdk_id' when calling get_sdk." if sdk_id.nil? raise "Parameter value for 'sdk_id' must not be blank" if OCI::Internal::Util.blank_string?(sdk_id) path = '/sdks/{sdkId}'.sub('{sdkId}', sdk_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#get_sdk') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::Sdk' ) end # rubocop:enable Metrics/BlockLength end |
#list_apis(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_apis API.
Returns a list of APIs.
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 1033 def list_apis(compartment_id, opts = {}) logger.debug 'Calling operation ApiGatewayClient#list_apis.' if logger raise "Missing the required parameter 'compartment_id' when calling list_apis." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::Apigateway::Models::ApiSummary::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Apigateway::Models::ApiSummary::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/apis' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#list_apis') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::ApiCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_certificates(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_certificates API.
Returns a list of certificates.
1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 1124 def list_certificates(compartment_id, opts = {}) logger.debug 'Calling operation ApiGatewayClient#list_certificates.' if logger raise "Missing the required parameter 'compartment_id' when calling list_certificates." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::Apigateway::Models::Certificate::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Apigateway::Models::Certificate::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/certificates' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#list_certificates') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::CertificateCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_sdk_language_types(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_sdk_language_types API.
Lists programming languages in which SDK can be generated.
1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 1210 def list_sdk_language_types(compartment_id, opts = {}) logger.debug 'Calling operation ApiGatewayClient#list_sdk_language_types.' if logger raise "Missing the required parameter 'compartment_id' when calling list_sdk_language_types." if compartment_id.nil? if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/sdkLanguageTypes' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#list_sdk_language_types') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::SdkLanguageTypeCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_sdks(opts = {}) ⇒ Response
Click here to see an example of how to use list_sdks API.
Returns list of generated SDKs.
1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 1296 def list_sdks(opts = {}) logger.debug 'Calling operation ApiGatewayClient#list_sdks.' if logger if opts[:lifecycle_state] && !OCI::Apigateway::Models::Sdk::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Apigateway::Models::Sdk::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/sdks' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:sdkId] = opts[:sdk_id] if opts[:sdk_id] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:apiId] = opts[:api_id] if opts[:api_id] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#list_sdks') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Apigateway::Models::SdkCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
96 97 98 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 96 def logger @api_client.config.logger end |
#update_api(api_id, update_api_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_api API.
Updates the API with the given identifier.
1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 1375 def update_api(api_id, update_api_details, opts = {}) logger.debug 'Calling operation ApiGatewayClient#update_api.' if logger raise "Missing the required parameter 'api_id' when calling update_api." if api_id.nil? raise "Missing the required parameter 'update_api_details' when calling update_api." if update_api_details.nil? raise "Parameter value for 'api_id' must not be blank" if OCI::Internal::Util.blank_string?(api_id) path = '/apis/{apiId}'.sub('{apiId}', api_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_api_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#update_api') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#update_certificate(certificate_id, update_certificate_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_certificate API.
Updates a certificate with the given identifier
1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 1437 def update_certificate(certificate_id, update_certificate_details, opts = {}) logger.debug 'Calling operation ApiGatewayClient#update_certificate.' if logger raise "Missing the required parameter 'certificate_id' when calling update_certificate." if certificate_id.nil? raise "Missing the required parameter 'update_certificate_details' when calling update_certificate." if update_certificate_details.nil? raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id) path = '/certificates/{certificateId}'.sub('{certificateId}', certificate_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_certificate_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#update_certificate') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#update_sdk(sdk_id, update_sdk_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_sdk API.
Updates the SDK with the given identifier.
1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 |
# File 'lib/oci/apigateway/api_gateway_client.rb', line 1499 def update_sdk(sdk_id, update_sdk_details, opts = {}) logger.debug 'Calling operation ApiGatewayClient#update_sdk.' if logger raise "Missing the required parameter 'sdk_id' when calling update_sdk." if sdk_id.nil? raise "Missing the required parameter 'update_sdk_details' when calling update_sdk." if update_sdk_details.nil? raise "Parameter value for 'sdk_id' must not be blank" if OCI::Internal::Util.blank_string?(sdk_id) path = '/sdks/{sdkId}'.sub('{sdkId}', sdk_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_sdk_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ApiGatewayClient#update_sdk') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |