Class: OCI::NetworkFirewall::NetworkFirewallClient
- Inherits:
-
Object
- Object
- OCI::NetworkFirewall::NetworkFirewallClient
- Defined in:
- lib/oci/network_firewall/network_firewall_client.rb
Overview
Use the Network Firewall API to create network firewalls and configure policies that regulates network traffic in and across VCNs.
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
-
#cancel_work_request(work_request_id, opts = {}) ⇒ Response
Cancel work request with the given ID.
-
#change_network_firewall_compartment(network_firewall_id, change_network_firewall_compartment_details, opts = {}) ⇒ Response
Moves a NetworkFirewall resource from one compartment identifier to another.
-
#change_network_firewall_policy_compartment(network_firewall_policy_id, change_network_firewall_policy_compartment_details, opts = {}) ⇒ Response
Moves a NetworkFirewallPolicy resource from one compartment identifier to another.
-
#create_network_firewall(create_network_firewall_details, opts = {}) ⇒ Response
Creates a new NetworkFirewall.
-
#create_network_firewall_policy(create_network_firewall_policy_details, opts = {}) ⇒ Response
Creates a new Network Firewall Policy.
-
#delete_network_firewall(network_firewall_id, opts = {}) ⇒ Response
Deletes a NetworkFirewall resource by identifier.
-
#delete_network_firewall_policy(network_firewall_policy_id, opts = {}) ⇒ Response
Deletes a NetworkFirewallPolicy resource with the given identifier.
-
#get_network_firewall(network_firewall_id, opts = {}) ⇒ Response
Gets a NetworkFirewall by identifier.
-
#get_network_firewall_policy(network_firewall_policy_id, opts = {}) ⇒ Response
Gets a NetworkFirewallPolicy given the network firewall policy identifier.
-
#get_work_request(work_request_id, opts = {}) ⇒ Response
Gets the status of the work request with the given ID.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ NetworkFirewallClient
constructor
Creates a new NetworkFirewallClient.
-
#list_network_firewall_policies(compartment_id, opts = {}) ⇒ Response
Returns a list of Network Firewall Policies.
-
#list_network_firewalls(compartment_id, opts = {}) ⇒ Response
Returns a list of NetworkFirewalls.
-
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Return a (paginated) list of errors for a given work request.
-
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Return a (paginated) list of logs for a given work request.
-
#list_work_requests(compartment_id, opts = {}) ⇒ Response
Lists the work requests in a compartment.
-
#logger ⇒ Logger
The logger for this client.
-
#update_network_firewall(network_firewall_id, update_network_firewall_details, opts = {}) ⇒ Response
Updates the NetworkFirewall.
-
#update_network_firewall_policy(network_firewall_policy_id, update_network_firewall_policy_details, opts = {}) ⇒ Response
Updates the NetworkFirewallPolicy.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ NetworkFirewallClient
Creates a new NetworkFirewallClient. 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.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 53 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 + '/20211001' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "NetworkFirewallClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
13 14 15 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 13 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
17 18 19 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 17 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
27 28 29 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 27 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
23 24 25 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 23 def retry_config @retry_config end |
Instance Method Details
#cancel_work_request(work_request_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/cancel_work_request.rb.html) to see an example of how to use cancel_work_request API.
Cancel work request with the given ID.
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 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 115 def cancel_work_request(work_request_id, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#cancel_work_request.' if logger raise "Missing the required parameter 'work_request_id' when calling cancel_work_request." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_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: 'NetworkFirewallClient#cancel_work_request') 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 |
#change_network_firewall_compartment(network_firewall_id, change_network_firewall_compartment_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/change_network_firewall_compartment.rb.html) to see an example of how to use change_network_firewall_compartment API.
Moves a NetworkFirewall resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 176 def change_network_firewall_compartment(network_firewall_id, change_network_firewall_compartment_details, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#change_network_firewall_compartment.' if logger raise "Missing the required parameter 'network_firewall_id' when calling change_network_firewall_compartment." if network_firewall_id.nil? raise "Missing the required parameter 'change_network_firewall_compartment_details' when calling change_network_firewall_compartment." if change_network_firewall_compartment_details.nil? raise "Parameter value for 'network_firewall_id' must not be blank" if OCI::Internal::Util.blank_string?(network_firewall_id) path = '/networkFirewalls/{networkFirewallId}/actions/changeCompartment'.sub('{networkFirewallId}', network_firewall_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(change_network_firewall_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'NetworkFirewallClient#change_network_firewall_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_network_firewall_policy_compartment(network_firewall_policy_id, change_network_firewall_policy_compartment_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/change_network_firewall_policy_compartment.rb.html) to see an example of how to use change_network_firewall_policy_compartment API.
Moves a NetworkFirewallPolicy resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
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 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 244 def change_network_firewall_policy_compartment(network_firewall_policy_id, change_network_firewall_policy_compartment_details, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#change_network_firewall_policy_compartment.' if logger raise "Missing the required parameter 'network_firewall_policy_id' when calling change_network_firewall_policy_compartment." if network_firewall_policy_id.nil? raise "Missing the required parameter 'change_network_firewall_policy_compartment_details' when calling change_network_firewall_policy_compartment." if change_network_firewall_policy_compartment_details.nil? raise "Parameter value for 'network_firewall_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(network_firewall_policy_id) path = '/networkFirewallPolicies/{networkFirewallPolicyId}/actions/changeCompartment'.sub('{networkFirewallPolicyId}', network_firewall_policy_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] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_network_firewall_policy_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'NetworkFirewallClient#change_network_firewall_policy_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_network_firewall(create_network_firewall_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/create_network_firewall.rb.html) to see an example of how to use create_network_firewall API.
Creates a new NetworkFirewall.
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 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 308 def create_network_firewall(create_network_firewall_details, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#create_network_firewall.' if logger raise "Missing the required parameter 'create_network_firewall_details' when calling create_network_firewall." if create_network_firewall_details.nil? path = '/networkFirewalls' 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_network_firewall_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'NetworkFirewallClient#create_network_firewall') 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::NetworkFirewall::Models::NetworkFirewall' ) end # rubocop:enable Metrics/BlockLength end |
#create_network_firewall_policy(create_network_firewall_policy_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/create_network_firewall_policy.rb.html) to see an example of how to use create_network_firewall_policy API.
Creates a new Network Firewall Policy.
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 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 370 def create_network_firewall_policy(create_network_firewall_policy_details, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#create_network_firewall_policy.' if logger raise "Missing the required parameter 'create_network_firewall_policy_details' when calling create_network_firewall_policy." if create_network_firewall_policy_details.nil? path = '/networkFirewallPolicies' 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_network_firewall_policy_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'NetworkFirewallClient#create_network_firewall_policy') 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::NetworkFirewall::Models::NetworkFirewallPolicy' ) end # rubocop:enable Metrics/BlockLength end |
#delete_network_firewall(network_firewall_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/delete_network_firewall.rb.html) to see an example of how to use delete_network_firewall API.
Deletes a NetworkFirewall resource by identifier
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 431 def delete_network_firewall(network_firewall_id, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#delete_network_firewall.' if logger raise "Missing the required parameter 'network_firewall_id' when calling delete_network_firewall." if network_firewall_id.nil? raise "Parameter value for 'network_firewall_id' must not be blank" if OCI::Internal::Util.blank_string?(network_firewall_id) path = '/networkFirewalls/{networkFirewallId}'.sub('{networkFirewallId}', network_firewall_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: 'NetworkFirewallClient#delete_network_firewall') 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_network_firewall_policy(network_firewall_policy_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/delete_network_firewall_policy.rb.html) to see an example of how to use delete_network_firewall_policy API.
Deletes a NetworkFirewallPolicy resource with the given identifier.
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 491 def delete_network_firewall_policy(network_firewall_policy_id, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#delete_network_firewall_policy.' if logger raise "Missing the required parameter 'network_firewall_policy_id' when calling delete_network_firewall_policy." if network_firewall_policy_id.nil? raise "Parameter value for 'network_firewall_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(network_firewall_policy_id) path = '/networkFirewallPolicies/{networkFirewallPolicyId}'.sub('{networkFirewallPolicyId}', network_firewall_policy_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: 'NetworkFirewallClient#delete_network_firewall_policy') 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_network_firewall(network_firewall_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/get_network_firewall.rb.html) to see an example of how to use get_network_firewall API.
Gets a NetworkFirewall by identifier
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 545 def get_network_firewall(network_firewall_id, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#get_network_firewall.' if logger raise "Missing the required parameter 'network_firewall_id' when calling get_network_firewall." if network_firewall_id.nil? raise "Parameter value for 'network_firewall_id' must not be blank" if OCI::Internal::Util.blank_string?(network_firewall_id) path = '/networkFirewalls/{networkFirewallId}'.sub('{networkFirewallId}', network_firewall_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: 'NetworkFirewallClient#get_network_firewall') 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::NetworkFirewall::Models::NetworkFirewall' ) end # rubocop:enable Metrics/BlockLength end |
#get_network_firewall_policy(network_firewall_policy_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/get_network_firewall_policy.rb.html) to see an example of how to use get_network_firewall_policy API.
Gets a NetworkFirewallPolicy given the network firewall policy identifier.
599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 599 def get_network_firewall_policy(network_firewall_policy_id, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#get_network_firewall_policy.' if logger raise "Missing the required parameter 'network_firewall_policy_id' when calling get_network_firewall_policy." if network_firewall_policy_id.nil? raise "Parameter value for 'network_firewall_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(network_firewall_policy_id) path = '/networkFirewallPolicies/{networkFirewallPolicyId}'.sub('{networkFirewallPolicyId}', network_firewall_policy_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: 'NetworkFirewallClient#get_network_firewall_policy') 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::NetworkFirewall::Models::NetworkFirewallPolicy' ) end # rubocop:enable Metrics/BlockLength end |
#get_work_request(work_request_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/get_work_request.rb.html) to see an example of how to use get_work_request API.
Gets the status of the work request with the given ID.
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 653 def get_work_request(work_request_id, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#get_work_request.' if logger raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_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: 'NetworkFirewallClient#get_work_request') 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::NetworkFirewall::Models::WorkRequest' ) end # rubocop:enable Metrics/BlockLength end |
#list_network_firewall_policies(compartment_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/list_network_firewall_policies.rb.html) to see an example of how to use list_network_firewall_policies API.
Returns a list of Network Firewall Policies.
Allowed values are: timeCreated, displayName
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 767 768 769 770 771 772 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 717 def list_network_firewall_policies(compartment_id, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#list_network_firewall_policies.' if logger raise "Missing the required parameter 'compartment_id' when calling list_network_firewall_policies." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::NetworkFirewall::Models::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::NetworkFirewall::Models::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::NetworkFirewall::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::NetworkFirewall::Models::SORT_ORDER_ENUM.' 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 = '/networkFirewallPolicies' 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[:id] = opts[:id] if opts[:id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] 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: 'NetworkFirewallClient#list_network_firewall_policies') 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::NetworkFirewall::Models::NetworkFirewallPolicySummaryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_network_firewalls(compartment_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/list_network_firewalls.rb.html) to see an example of how to use list_network_firewalls API.
Returns a list of NetworkFirewalls.
Allowed values are: timeCreated, displayName
805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 805 def list_network_firewalls(compartment_id, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#list_network_firewalls.' if logger raise "Missing the required parameter 'compartment_id' when calling list_network_firewalls." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::NetworkFirewall::Models::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::NetworkFirewall::Models::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::NetworkFirewall::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::NetworkFirewall::Models::SORT_ORDER_ENUM.' 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 = '/networkFirewalls' 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[:networkFirewallPolicyId] = opts[:network_firewall_policy_id] if opts[:network_firewall_policy_id] query_params[:id] = opts[:id] if opts[:id] query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] 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: 'NetworkFirewallClient#list_network_firewalls') 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::NetworkFirewall::Models::NetworkFirewallCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/list_work_request_errors.rb.html) to see an example of how to use list_work_request_errors API.
Return a (paginated) list of errors for a given work request.
Allowed values are: timeAccepted
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 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 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 887 def list_work_request_errors(work_request_id, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#list_work_request_errors.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil? if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeAccepted.' end if opts[:sort_order] && !OCI::NetworkFirewall::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::NetworkFirewall::Models::SORT_ORDER_ENUM.' end raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # 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: 'NetworkFirewallClient#list_work_request_errors') 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::NetworkFirewall::Models::WorkRequestErrorCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs API.
Return a (paginated) list of logs for a given work request.
Allowed values are: timeAccepted
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 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 960 def list_work_request_logs(work_request_id, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#list_work_request_logs.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil? if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeAccepted.' end if opts[:sort_order] && !OCI::NetworkFirewall::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::NetworkFirewall::Models::SORT_ORDER_ENUM.' end raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # 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: 'NetworkFirewallClient#list_work_request_logs') 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::NetworkFirewall::Models::WorkRequestLogEntryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_requests(compartment_id, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/list_work_requests.rb.html) to see an example of how to use list_work_requests API.
Lists the work requests in a compartment.
Allowed values are: timeAccepted
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 1088 1089 1090 1091 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 1036 def list_work_requests(compartment_id, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#list_work_requests.' if logger raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil? if opts[:status] && !OCI::NetworkFirewall::Models::OPERATION_STATUS_ENUM.include?(opts[:status]) raise 'Invalid value for "status", must be one of the values in OCI::NetworkFirewall::Models::OPERATION_STATUS_ENUM.' end if opts[:sort_order] && !OCI::NetworkFirewall::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::NetworkFirewall::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeAccepted.' end path = '/workRequests' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id] query_params[:status] = opts[:status] if opts[:status] query_params[:resourceId] = opts[:resource_id] if opts[:resource_id] query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] 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: 'NetworkFirewallClient#list_work_requests') 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::NetworkFirewall::Models::WorkRequestSummaryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
92 93 94 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 92 def logger @api_client.config.logger end |
#update_network_firewall(network_firewall_id, update_network_firewall_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/update_network_firewall.rb.html) to see an example of how to use update_network_firewall API.
Updates the NetworkFirewall
1116 1117 1118 1119 1120 1121 1122 1123 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 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 1116 def update_network_firewall(network_firewall_id, update_network_firewall_details, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#update_network_firewall.' if logger raise "Missing the required parameter 'network_firewall_id' when calling update_network_firewall." if network_firewall_id.nil? raise "Missing the required parameter 'update_network_firewall_details' when calling update_network_firewall." if update_network_firewall_details.nil? raise "Parameter value for 'network_firewall_id' must not be blank" if OCI::Internal::Util.blank_string?(network_firewall_id) path = '/networkFirewalls/{networkFirewallId}'.sub('{networkFirewallId}', network_firewall_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_network_firewall_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'NetworkFirewallClient#update_network_firewall') 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_network_firewall_policy(network_firewall_policy_id, update_network_firewall_policy_details, opts = {}) ⇒ Response
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkfirewall/update_network_firewall_policy.rb.html) to see an example of how to use update_network_firewall_policy API.
Updates the NetworkFirewallPolicy
1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 |
# File 'lib/oci/network_firewall/network_firewall_client.rb', line 1178 def update_network_firewall_policy(network_firewall_policy_id, update_network_firewall_policy_details, opts = {}) logger.debug 'Calling operation NetworkFirewallClient#update_network_firewall_policy.' if logger raise "Missing the required parameter 'network_firewall_policy_id' when calling update_network_firewall_policy." if network_firewall_policy_id.nil? raise "Missing the required parameter 'update_network_firewall_policy_details' when calling update_network_firewall_policy." if update_network_firewall_policy_details.nil? raise "Parameter value for 'network_firewall_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(network_firewall_policy_id) path = '/networkFirewallPolicies/{networkFirewallPolicyId}'.sub('{networkFirewallPolicyId}', network_firewall_policy_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_network_firewall_policy_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'NetworkFirewallClient#update_network_firewall_policy') 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 |