oci 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -2
- data/lib/oci.rb +1 -0
- data/lib/oci/autoscaling/auto_scaling_client.rb +5 -5
- data/lib/oci/autoscaling/models/auto_scaling_configuration.rb +2 -2
- data/lib/oci/autoscaling/models/create_auto_scaling_configuration_details.rb +2 -2
- data/lib/oci/autoscaling/models/update_auto_scaling_configuration_details.rb +2 -2
- data/lib/oci/budget/budget.rb +33 -0
- data/lib/oci/budget/budget_client.rb +767 -0
- data/lib/oci/budget/budget_client_composite_operations.rb +224 -0
- data/lib/oci/budget/models/alert_rule.rb +398 -0
- data/lib/oci/budget/models/alert_rule_summary.rb +396 -0
- data/lib/oci/budget/models/alert_type.rb +10 -0
- data/lib/oci/budget/models/budget.rb +413 -0
- data/lib/oci/budget/models/budget_summary.rb +413 -0
- data/lib/oci/budget/models/create_alert_rule_details.rb +288 -0
- data/lib/oci/budget/models/create_budget_details.rb +267 -0
- data/lib/oci/budget/models/lifecycle_state.rb +10 -0
- data/lib/oci/budget/models/reset_period.rb +9 -0
- data/lib/oci/budget/models/sort_by.rb +10 -0
- data/lib/oci/budget/models/sort_order.rb +10 -0
- data/lib/oci/budget/models/threshold_type.rb +10 -0
- data/lib/oci/budget/models/update_alert_rule_details.rb +288 -0
- data/lib/oci/budget/models/update_budget_details.rb +239 -0
- data/lib/oci/budget/util.rb +2 -0
- data/lib/oci/core/blockstorage_client.rb +35 -35
- data/lib/oci/core/compute_client.rb +41 -41
- data/lib/oci/core/compute_management_client.rb +6 -6
- data/lib/oci/core/models/app_catalog_listing_resource_version.rb +1 -1
- data/lib/oci/core/models/attach_vnic_details.rb +1 -1
- data/lib/oci/core/models/boot_volume.rb +4 -4
- data/lib/oci/core/models/boot_volume_backup.rb +4 -4
- data/lib/oci/core/models/capture_console_history_details.rb +2 -2
- data/lib/oci/core/models/console_history.rb +2 -2
- data/lib/oci/core/models/cpe.rb +4 -4
- data/lib/oci/core/models/create_boot_volume_backup_details.rb +2 -2
- data/lib/oci/core/models/create_boot_volume_details.rb +2 -2
- data/lib/oci/core/models/create_cpe_details.rb +2 -2
- data/lib/oci/core/models/create_dhcp_details.rb +2 -2
- data/lib/oci/core/models/create_drg_attachment_details.rb +1 -1
- data/lib/oci/core/models/create_drg_details.rb +2 -2
- data/lib/oci/core/models/create_image_details.rb +2 -2
- data/lib/oci/core/models/create_instance_configuration_details.rb +2 -2
- data/lib/oci/core/models/create_instance_console_connection_details.rb +2 -2
- data/lib/oci/core/models/create_instance_pool_details.rb +2 -2
- data/lib/oci/core/models/create_internet_gateway_details.rb +2 -2
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +2 -2
- data/lib/oci/core/models/create_local_peering_gateway_details.rb +3 -3
- data/lib/oci/core/models/create_nat_gateway_details.rb +4 -4
- data/lib/oci/core/models/create_private_ip_details.rb +3 -3
- data/lib/oci/core/models/create_public_ip_details.rb +3 -3
- data/lib/oci/core/models/create_route_table_details.rb +2 -2
- data/lib/oci/core/models/create_security_list_details.rb +2 -2
- data/lib/oci/core/models/create_service_gateway_details.rb +4 -4
- data/lib/oci/core/models/create_subnet_details.rb +3 -3
- data/lib/oci/core/models/create_vcn_details.rb +3 -3
- data/lib/oci/core/models/create_vnic_details.rb +7 -7
- data/lib/oci/core/models/create_volume_backup_details.rb +2 -2
- data/lib/oci/core/models/create_volume_details.rb +2 -2
- data/lib/oci/core/models/create_volume_group_backup_details.rb +2 -2
- data/lib/oci/core/models/create_volume_group_details.rb +2 -2
- data/lib/oci/core/models/cross_connect.rb +2 -2
- data/lib/oci/core/models/cross_connect_group.rb +2 -2
- data/lib/oci/core/models/dhcp_dns_option.rb +2 -2
- data/lib/oci/core/models/dhcp_option.rb +2 -2
- data/lib/oci/core/models/dhcp_options.rb +5 -5
- data/lib/oci/core/models/dhcp_search_domain_option.rb +1 -1
- data/lib/oci/core/models/drg.rb +4 -4
- data/lib/oci/core/models/drg_attachment.rb +2 -2
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +2 -2
- data/lib/oci/core/models/fast_connect_provider_service.rb +1 -1
- data/lib/oci/core/models/image.rb +4 -4
- data/lib/oci/core/models/instance.rb +5 -5
- data/lib/oci/core/models/instance_configuration.rb +2 -2
- data/lib/oci/core/models/instance_configuration_attach_vnic_details.rb +1 -1
- data/lib/oci/core/models/instance_configuration_create_volume_details.rb +2 -2
- data/lib/oci/core/models/instance_configuration_launch_instance_details.rb +3 -3
- data/lib/oci/core/models/instance_console_connection.rb +3 -3
- data/lib/oci/core/models/instance_pool.rb +2 -2
- data/lib/oci/core/models/internet_gateway.rb +4 -4
- data/lib/oci/core/models/ip_sec_connection.rb +4 -4
- data/lib/oci/core/models/launch_instance_details.rb +3 -3
- data/lib/oci/core/models/local_peering_gateway.rb +5 -5
- data/lib/oci/core/models/nat_gateway.rb +7 -7
- data/lib/oci/core/models/peer_region_for_remote_peering.rb +1 -1
- data/lib/oci/core/models/private_ip.rb +5 -5
- data/lib/oci/core/models/public_ip.rb +4 -4
- data/lib/oci/core/models/remote_peering_connection.rb +2 -2
- data/lib/oci/core/models/route_rule.rb +1 -1
- data/lib/oci/core/models/route_table.rb +4 -4
- data/lib/oci/core/models/security_list.rb +4 -4
- data/lib/oci/core/models/service.rb +1 -1
- data/lib/oci/core/models/service_gateway.rb +7 -7
- data/lib/oci/core/models/service_id_request_details.rb +1 -1
- data/lib/oci/core/models/service_id_response_details.rb +1 -1
- data/lib/oci/core/models/shape.rb +1 -1
- data/lib/oci/core/models/subnet.rb +7 -7
- data/lib/oci/core/models/update_boot_volume_backup_details.rb +2 -2
- data/lib/oci/core/models/update_boot_volume_details.rb +2 -2
- data/lib/oci/core/models/update_console_history_details.rb +2 -2
- data/lib/oci/core/models/update_cpe_details.rb +2 -2
- data/lib/oci/core/models/update_dhcp_details.rb +2 -2
- data/lib/oci/core/models/update_drg_attachment_details.rb +1 -1
- data/lib/oci/core/models/update_drg_details.rb +2 -2
- data/lib/oci/core/models/update_image_details.rb +2 -2
- data/lib/oci/core/models/update_instance_configuration_details.rb +2 -2
- data/lib/oci/core/models/update_instance_details.rb +2 -2
- data/lib/oci/core/models/update_instance_pool_details.rb +2 -2
- data/lib/oci/core/models/update_internet_gateway_details.rb +2 -2
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +2 -2
- data/lib/oci/core/models/update_local_peering_gateway_details.rb +3 -3
- data/lib/oci/core/models/update_nat_gateway_details.rb +2 -2
- data/lib/oci/core/models/update_private_ip_details.rb +3 -3
- data/lib/oci/core/models/update_public_ip_details.rb +2 -2
- data/lib/oci/core/models/update_route_table_details.rb +2 -2
- data/lib/oci/core/models/update_security_list_details.rb +2 -2
- data/lib/oci/core/models/update_service_gateway_details.rb +2 -2
- data/lib/oci/core/models/update_subnet_details.rb +2 -2
- data/lib/oci/core/models/update_vcn_details.rb +2 -2
- data/lib/oci/core/models/update_vnic_details.rb +4 -4
- data/lib/oci/core/models/update_volume_backup_details.rb +2 -2
- data/lib/oci/core/models/update_volume_details.rb +2 -2
- data/lib/oci/core/models/update_volume_group_backup_details.rb +2 -2
- data/lib/oci/core/models/update_volume_group_details.rb +2 -2
- data/lib/oci/core/models/vcn.rb +6 -6
- data/lib/oci/core/models/virtual_circuit.rb +4 -4
- data/lib/oci/core/models/virtual_circuit_public_prefix.rb +1 -1
- data/lib/oci/core/models/vnic.rb +7 -7
- data/lib/oci/core/models/vnic_attachment.rb +2 -2
- data/lib/oci/core/models/volume.rb +4 -4
- data/lib/oci/core/models/volume_attachment.rb +1 -1
- data/lib/oci/core/models/volume_backup.rb +4 -4
- data/lib/oci/core/models/volume_group.rb +3 -3
- data/lib/oci/core/models/volume_group_backup.rb +4 -4
- data/lib/oci/core/virtual_network_client.rb +121 -121
- data/lib/oci/core/virtual_network_client_composite_operations.rb +6 -6
- data/lib/oci/database/database.rb +4 -0
- data/lib/oci/database/database_client.rb +202 -78
- data/lib/oci/database/database_client_composite_operations.rb +65 -25
- data/lib/oci/database/models/autonomous_data_warehouse.rb +4 -4
- data/lib/oci/database/models/autonomous_data_warehouse_backup.rb +3 -3
- data/lib/oci/database/models/autonomous_data_warehouse_backup_summary.rb +4 -4
- data/lib/oci/database/models/autonomous_data_warehouse_summary.rb +4 -4
- data/lib/oci/database/models/autonomous_database.rb +43 -8
- data/lib/oci/database/models/autonomous_database_backup.rb +3 -3
- data/lib/oci/database/models/autonomous_database_backup_summary.rb +4 -4
- data/lib/oci/database/models/autonomous_database_summary.rb +43 -8
- data/lib/oci/database/models/backup.rb +3 -3
- data/lib/oci/database/models/backup_summary.rb +4 -4
- data/lib/oci/database/models/create_autonomous_data_warehouse_backup_details.rb +1 -1
- data/lib/oci/database/models/create_autonomous_data_warehouse_details.rb +3 -3
- data/lib/oci/database/models/create_autonomous_database_backup_details.rb +1 -1
- data/lib/oci/database/models/create_autonomous_database_details.rb +33 -4
- data/lib/oci/database/models/create_backup_details.rb +1 -1
- data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +1 -1
- data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +1 -1
- data/lib/oci/database/models/create_database_details.rb +2 -2
- data/lib/oci/database/models/create_database_from_backup_details.rb +1 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +1 -1
- data/lib/oci/database/models/create_external_backup_job_details.rb +1 -1
- data/lib/oci/database/models/data_guard_association.rb +6 -6
- data/lib/oci/database/models/data_guard_association_summary.rb +9 -9
- data/lib/oci/database/models/database.rb +5 -5
- data/lib/oci/database/models/database_summary.rb +7 -7
- data/lib/oci/database/models/db_backup_config.rb +1 -1
- data/lib/oci/database/models/db_home.rb +4 -4
- data/lib/oci/database/models/db_home_summary.rb +6 -6
- data/lib/oci/database/models/db_iorm_config.rb +181 -0
- data/lib/oci/database/models/db_iorm_config_update_detail.rb +166 -0
- data/lib/oci/database/models/db_node.rb +4 -4
- data/lib/oci/database/models/db_node_summary.rb +5 -5
- data/lib/oci/database/models/db_system.rb +41 -11
- data/lib/oci/database/models/db_system_shape_summary.rb +2 -2
- data/lib/oci/database/models/db_system_summary.rb +30 -16
- data/lib/oci/database/models/db_version_summary.rb +1 -1
- data/lib/oci/database/models/exadata_iorm_config.rb +247 -0
- data/lib/oci/database/models/exadata_iorm_config_update_details.rb +186 -0
- data/lib/oci/database/models/external_backup_job.rb +2 -2
- data/lib/oci/database/models/launch_db_system_base.rb +24 -10
- data/lib/oci/database/models/launch_db_system_details.rb +5 -1
- data/lib/oci/database/models/launch_db_system_from_backup_details.rb +5 -1
- data/lib/oci/database/models/patch.rb +1 -1
- data/lib/oci/database/models/patch_details.rb +1 -1
- data/lib/oci/database/models/patch_history_entry.rb +2 -2
- data/lib/oci/database/models/patch_history_entry_summary.rb +2 -2
- data/lib/oci/database/models/patch_summary.rb +2 -2
- data/lib/oci/database/models/update_autonomous_data_warehouse_details.rb +2 -2
- data/lib/oci/database/models/update_autonomous_database_details.rb +2 -2
- data/lib/oci/database/models/update_database_details.rb +2 -2
- data/lib/oci/database/models/update_db_system_details.rb +2 -2
- data/lib/oci/dns/dns_client.rb +1 -1
- data/lib/oci/dns/models/create_steering_policy_details.rb +1 -1
- data/lib/oci/dns/models/create_zone_details.rb +1 -1
- data/lib/oci/dns/models/record.rb +1 -1
- data/lib/oci/dns/models/record_details.rb +1 -1
- data/lib/oci/dns/models/record_operation.rb +1 -1
- data/lib/oci/dns/models/steering_policy.rb +1 -1
- data/lib/oci/dns/models/steering_policy_summary.rb +1 -1
- data/lib/oci/dns/models/update_steering_policy_details.rb +1 -1
- data/lib/oci/dns/models/update_zone_details.rb +1 -1
- data/lib/oci/dns/models/zone.rb +1 -1
- data/lib/oci/dns/models/zone_summary.rb +1 -1
- data/lib/oci/email/email_client.rb +3 -3
- data/lib/oci/email/models/create_sender_details.rb +2 -2
- data/lib/oci/email/models/sender.rb +2 -2
- data/lib/oci/email/models/sender_summary.rb +2 -2
- data/lib/oci/email/models/update_sender_details.rb +2 -2
- data/lib/oci/file_storage/file_storage_client.rb +14 -14
- data/lib/oci/file_storage/models/create_file_system_details.rb +2 -2
- data/lib/oci/file_storage/models/create_mount_target_details.rb +3 -3
- data/lib/oci/file_storage/models/create_snapshot_details.rb +2 -2
- data/lib/oci/file_storage/models/export.rb +1 -1
- data/lib/oci/file_storage/models/file_system.rb +3 -3
- data/lib/oci/file_storage/models/mount_target.rb +2 -2
- data/lib/oci/file_storage/models/snapshot.rb +2 -2
- data/lib/oci/file_storage/models/update_file_system_details.rb +2 -2
- data/lib/oci/file_storage/models/update_mount_target_details.rb +2 -2
- data/lib/oci/file_storage/models/update_snapshot_details.rb +2 -2
- data/lib/oci/healthchecks/models/create_http_monitor_details.rb +2 -2
- data/lib/oci/healthchecks/models/create_ping_monitor_details.rb +2 -2
- data/lib/oci/healthchecks/models/http_monitor.rb +2 -2
- data/lib/oci/healthchecks/models/http_monitor_summary.rb +2 -2
- data/lib/oci/healthchecks/models/ping_monitor.rb +2 -2
- data/lib/oci/healthchecks/models/ping_monitor_summary.rb +2 -2
- data/lib/oci/healthchecks/models/update_http_monitor_details.rb +2 -2
- data/lib/oci/healthchecks/models/update_ping_monitor_details.rb +2 -2
- data/lib/oci/identity/identity.rb +7 -0
- data/lib/oci/identity/identity_client.rb +461 -36
- data/lib/oci/identity/identity_client_composite_operations.rb +119 -0
- data/lib/oci/identity/models/api_key.rb +2 -2
- data/lib/oci/identity/models/auth_token.rb +1 -1
- data/lib/oci/identity/models/authentication_policy.rb +168 -0
- data/lib/oci/identity/models/availability_domain.rb +1 -1
- data/lib/oci/identity/models/compartment.rb +5 -5
- data/lib/oci/identity/models/create_compartment_details.rb +2 -2
- data/lib/oci/identity/models/create_dynamic_group_details.rb +1 -1
- data/lib/oci/identity/models/create_group_details.rb +2 -2
- data/lib/oci/identity/models/create_identity_provider_details.rb +2 -2
- data/lib/oci/identity/models/create_policy_details.rb +4 -4
- data/lib/oci/identity/models/create_tag_default_details.rb +180 -0
- data/lib/oci/identity/models/create_tag_details.rb +2 -2
- data/lib/oci/identity/models/create_tag_namespace_details.rb +2 -2
- data/lib/oci/identity/models/create_user_details.rb +13 -3
- data/lib/oci/identity/models/customer_secret_key.rb +2 -2
- data/lib/oci/identity/models/dynamic_group.rb +2 -2
- data/lib/oci/identity/models/group.rb +5 -5
- data/lib/oci/identity/models/identity_provider.rb +4 -4
- data/lib/oci/identity/models/idp_group_mapping.rb +1 -1
- data/lib/oci/identity/models/mfa_totp_device.rb +20 -9
- data/lib/oci/identity/models/mfa_totp_device_summary.rb +7 -1
- data/lib/oci/identity/models/password_policy.rb +234 -0
- data/lib/oci/identity/models/policy.rb +4 -4
- data/lib/oci/identity/models/region.rb +2 -2
- data/lib/oci/identity/models/region_subscription.rb +2 -2
- data/lib/oci/identity/models/saml2_identity_provider.rb +1 -1
- data/lib/oci/identity/models/smtp_credential.rb +1 -1
- data/lib/oci/identity/models/smtp_credential_summary.rb +1 -1
- data/lib/oci/identity/models/swift_password.rb +1 -1
- data/lib/oci/identity/models/tag.rb +4 -4
- data/lib/oci/identity/models/tag_default.rb +280 -0
- data/lib/oci/identity/models/tag_default_summary.rb +274 -0
- data/lib/oci/identity/models/tag_namespace.rb +4 -4
- data/lib/oci/identity/models/tag_namespace_summary.rb +3 -3
- data/lib/oci/identity/models/tag_summary.rb +3 -3
- data/lib/oci/identity/models/tenancy.rb +4 -4
- data/lib/oci/identity/models/ui_password.rb +1 -1
- data/lib/oci/identity/models/update_authentication_policy_details.rb +154 -0
- data/lib/oci/identity/models/update_compartment_details.rb +2 -2
- data/lib/oci/identity/models/update_dynamic_group_details.rb +1 -1
- data/lib/oci/identity/models/update_group_details.rb +2 -2
- data/lib/oci/identity/models/update_identity_provider_details.rb +2 -2
- data/lib/oci/identity/models/update_policy_details.rb +4 -4
- data/lib/oci/identity/models/update_tag_default_details.rb +150 -0
- data/lib/oci/identity/models/update_tag_details.rb +3 -3
- data/lib/oci/identity/models/update_tag_namespace_details.rb +3 -3
- data/lib/oci/identity/models/update_user_details.rb +13 -3
- data/lib/oci/identity/models/user.rb +19 -7
- data/lib/oci/load_balancer/load_balancer_client.rb +64 -64
- data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +23 -23
- data/lib/oci/load_balancer/models/backend.rb +2 -2
- data/lib/oci/load_balancer/models/backend_details.rb +1 -1
- data/lib/oci/load_balancer/models/backend_set.rb +1 -1
- data/lib/oci/load_balancer/models/backend_set_details.rb +1 -1
- data/lib/oci/load_balancer/models/certificate.rb +1 -1
- data/lib/oci/load_balancer/models/certificate_details.rb +1 -1
- data/lib/oci/load_balancer/models/connection_configuration.rb +1 -1
- data/lib/oci/load_balancer/models/create_backend_details.rb +2 -2
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +1 -1
- data/lib/oci/load_balancer/models/create_certificate_details.rb +1 -1
- data/lib/oci/load_balancer/models/create_hostname_details.rb +1 -1
- data/lib/oci/load_balancer/models/create_listener_details.rb +1 -1
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +6 -6
- data/lib/oci/load_balancer/models/health_check_result.rb +1 -1
- data/lib/oci/load_balancer/models/health_checker.rb +1 -1
- data/lib/oci/load_balancer/models/hostname.rb +1 -1
- data/lib/oci/load_balancer/models/hostname_details.rb +1 -1
- data/lib/oci/load_balancer/models/listener.rb +1 -1
- data/lib/oci/load_balancer/models/load_balancer.rb +11 -11
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +1 -1
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +1 -1
- data/lib/oci/load_balancer/models/path_match_type.rb +1 -1
- data/lib/oci/load_balancer/models/path_route_set.rb +1 -1
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +1 -1
- data/lib/oci/load_balancer/models/update_backend_details.rb +1 -1
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +1 -1
- data/lib/oci/load_balancer/models/update_hostname_details.rb +2 -2
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +2 -2
- data/lib/oci/load_balancer/models/work_request.rb +3 -3
- data/lib/oci/monitoring/models/alarm.rb +10 -10
- data/lib/oci/monitoring/models/alarm_history_collection.rb +1 -1
- data/lib/oci/monitoring/models/alarm_status_summary.rb +5 -5
- data/lib/oci/monitoring/models/alarm_summary.rb +10 -10
- data/lib/oci/monitoring/models/create_alarm_details.rb +5 -5
- data/lib/oci/monitoring/models/metric.rb +2 -2
- data/lib/oci/monitoring/models/metric_data.rb +2 -2
- data/lib/oci/monitoring/models/metric_data_details.rb +1 -1
- data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +2 -2
- data/lib/oci/monitoring/models/suppression.rb +1 -1
- data/lib/oci/monitoring/models/update_alarm_details.rb +5 -5
- data/lib/oci/monitoring/monitoring_client.rb +20 -20
- data/lib/oci/monitoring/monitoring_client_composite_operations.rb +2 -2
- data/lib/oci/object_storage/models/bucket.rb +4 -4
- data/lib/oci/object_storage/models/bucket_summary.rb +3 -3
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +1 -1
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +1 -1
- data/lib/oci/object_storage/models/copy_object_details.rb +1 -1
- data/lib/oci/object_storage/models/create_bucket_details.rb +3 -3
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +1 -1
- data/lib/oci/object_storage/models/list_objects.rb +1 -1
- data/lib/oci/object_storage/models/multipart_upload.rb +2 -2
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +1 -1
- data/lib/oci/object_storage/models/object_lifecycle_policy.rb +1 -1
- data/lib/oci/object_storage/models/object_lifecycle_rule.rb +2 -2
- data/lib/oci/object_storage/models/object_summary.rb +1 -1
- data/lib/oci/object_storage/models/preauthenticated_request.rb +2 -2
- data/lib/oci/object_storage/models/rename_object_details.rb +1 -1
- data/lib/oci/object_storage/models/update_bucket_details.rb +3 -3
- data/lib/oci/object_storage/object_storage_client.rb +3 -3
- data/lib/oci/ons/models/confirmation_result.rb +2 -2
- data/lib/oci/ons/models/create_subscription_details.rb +4 -4
- data/lib/oci/ons/models/create_topic_details.rb +3 -3
- data/lib/oci/ons/models/notification_topic.rb +4 -4
- data/lib/oci/ons/models/notification_topic_summary.rb +4 -4
- data/lib/oci/ons/models/subscription.rb +3 -3
- data/lib/oci/ons/models/subscription_summary.rb +4 -4
- data/lib/oci/ons/models/topic_attributes_details.rb +2 -2
- data/lib/oci/ons/models/update_subscription_details.rb +2 -2
- data/lib/oci/ons/notification_control_plane_client.rb +9 -9
- data/lib/oci/ons/notification_data_plane_client.rb +10 -10
- data/lib/oci/ons/notification_data_plane_client_composite_operations.rb +1 -1
- data/lib/oci/regions.rb +1 -0
- data/lib/oci/resource_manager/models/create_job_details.rb +2 -2
- data/lib/oci/resource_manager/models/create_stack_details.rb +2 -2
- data/lib/oci/resource_manager/models/job.rb +2 -2
- data/lib/oci/resource_manager/models/job_summary.rb +2 -2
- data/lib/oci/resource_manager/models/stack.rb +2 -2
- data/lib/oci/resource_manager/models/stack_summary.rb +2 -2
- data/lib/oci/resource_manager/models/update_job_details.rb +2 -2
- data/lib/oci/resource_manager/models/update_stack_details.rb +2 -2
- data/lib/oci/resource_manager/resource_manager_client.rb +6 -6
- data/lib/oci/streaming/models/create_stream_details.rb +2 -2
- data/lib/oci/streaming/models/stream.rb +2 -2
- data/lib/oci/streaming/models/stream_summary.rb +2 -2
- data/lib/oci/streaming/models/update_stream_details.rb +2 -2
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waas/models/certificate.rb +2 -2
- data/lib/oci/waas/models/certificate_summary.rb +2 -2
- data/lib/oci/waas/models/create_certificate_details.rb +1 -1
- data/lib/oci/waas/models/create_waas_policy_details.rb +1 -1
- data/lib/oci/waas/models/update_waas_policy_details.rb +1 -1
- data/lib/oci/waas/models/waas_policy.rb +2 -2
- data/lib/oci/waas/models/waas_policy_summary.rb +2 -2
- data/lib/oci/waas/models/work_request.rb +3 -3
- data/lib/oci/waas/models/work_request_resource.rb +1 -1
- data/lib/oci/waas/models/work_request_summary.rb +2 -2
- data/lib/oci/waas/waas_client.rb +53 -53
- data/lib/oci/waas/waas_client_composite_operations.rb +18 -18
- metadata +31 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ff60640046be66b4ea3e8bc2b12fa7c99142fd5b203d2b9bb81f9d21643f40a
|
4
|
+
data.tar.gz: 5e1ac47c684293b30603c99277b4537f4e9e82019d1f83a009ff97ecb4232021
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69b0557e4787b24e61dceab239044340d86f7d3865840d63887e34a147087f0839087dfd049dca0e23bc5d9810f33115e6e1e6e9f6f5a285c8ede059ca6fcd0a
|
7
|
+
data.tar.gz: efc11890a2c853e9bef7ad7d87b8e8e4363e317d6bb0eeeed6caab9972ea6994b984412fbcf7f164fbaa9e15937a70bae1121e11271debeb454f71b1e9218154
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Oracle Cloud Infrastructure Ruby SDK
|
2
|
-
**Version 2.5.
|
2
|
+
**Version 2.5.2**
|
3
3
|
|
4
4
|
This topic describes how to install, configure, and use the Oracle Cloud Infrastructure Ruby SDK.
|
5
5
|
|
@@ -9,6 +9,7 @@ The Ruby SDK supports the following services:
|
|
9
9
|
|
10
10
|
* Announcements
|
11
11
|
* Audit
|
12
|
+
* Budgets
|
12
13
|
* Compute Autoscaling
|
13
14
|
* Container Engine
|
14
15
|
* Core Services (which includes Networking, Compute, and Block Volume)
|
@@ -186,7 +187,21 @@ For regions in the oraclecloud.com realm, even if the `OCI::Regions::REGION_ENUM
|
|
186
187
|
|
187
188
|
### Other Realms
|
188
189
|
|
189
|
-
|
190
|
+
For regions in realms other than oraclecloud.com, you can use the following workarounds to reach new regions with earlier versions of the SDK.
|
191
|
+
|
192
|
+
You can set the endpoint when creating a new client:
|
193
|
+
```
|
194
|
+
identity_client = OCI::Identity::IdentityClient.new(
|
195
|
+
endpoint: 'https://identity.us-gov-phoenix-1.oraclegovcloud.com'
|
196
|
+
)
|
197
|
+
```
|
198
|
+
|
199
|
+
If you are authenticating via instance principals, you can set the `federation_endpoint` for the region using `InstancePrincipalsSecurityTokenSigner` when initializing the signer:
|
200
|
+
```
|
201
|
+
instance_principals_signer = OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner.new(
|
202
|
+
federation_endpoint: 'https://auth.us-gov-phoenix-1.oraclegovcloud.com/v1/x509'
|
203
|
+
)
|
204
|
+
```
|
190
205
|
|
191
206
|
## Writing Your First Ruby Program with the SDK
|
192
207
|
|
data/lib/oci.rb
CHANGED
@@ -38,6 +38,7 @@ require 'oci/monitoring/monitoring'
|
|
38
38
|
require 'oci/resource_manager/resource_manager'
|
39
39
|
require 'oci/autoscaling/autoscaling'
|
40
40
|
require 'oci/ons/ons'
|
41
|
+
require 'oci/budget/budget'
|
41
42
|
|
42
43
|
# Top level module for the Oracle Cloud Infrastructure SDK
|
43
44
|
module OCI
|
@@ -459,7 +459,7 @@ module OCI
|
|
459
459
|
|
460
460
|
# Lists AutoScalingConfigurations in the specific compartment.
|
461
461
|
#
|
462
|
-
# @param [String] compartment_id The [OCID](https://docs.
|
462
|
+
# @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment containing the
|
463
463
|
# resources monitored by the metric that you are searching for. Use tenancyId to search in
|
464
464
|
# the root compartment.
|
465
465
|
#
|
@@ -470,10 +470,10 @@ module OCI
|
|
470
470
|
#
|
471
471
|
# @option opts [String] :opc_request_id
|
472
472
|
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call. For information about pagination, see
|
473
|
-
# [List Pagination](https://docs.
|
473
|
+
# [List Pagination](https://docs.cloud.oracle.com/#API/Concepts/usingapi.htm#List_Pagination).
|
474
474
|
#
|
475
475
|
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call. For information about
|
476
|
-
# pagination, see [List Pagination](https://docs.
|
476
|
+
# pagination, see [List Pagination](https://docs.cloud.oracle.com/#API/Concepts/usingapi.htm#List_Pagination).
|
477
477
|
#
|
478
478
|
# @option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for
|
479
479
|
# TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
|
@@ -554,10 +554,10 @@ module OCI
|
|
554
554
|
#
|
555
555
|
# @option opts [String] :opc_request_id
|
556
556
|
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call. For information about pagination, see
|
557
|
-
# [List Pagination](https://docs.
|
557
|
+
# [List Pagination](https://docs.cloud.oracle.com/#API/Concepts/usingapi.htm#List_Pagination).
|
558
558
|
#
|
559
559
|
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call. For information about
|
560
|
-
# pagination, see [List Pagination](https://docs.
|
560
|
+
# pagination, see [List Pagination](https://docs.cloud.oracle.com/#API/Concepts/usingapi.htm#List_Pagination).
|
561
561
|
#
|
562
562
|
# @option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for
|
563
563
|
# TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
|
@@ -12,7 +12,7 @@ module OCI
|
|
12
12
|
attr_accessor :compartment_id
|
13
13
|
|
14
14
|
# Defined tags for this resource. Each key is predefined and scoped to a
|
15
|
-
# namespace. For more information, see [Resource Tags](https://docs.
|
15
|
+
# namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
16
16
|
#
|
17
17
|
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
18
18
|
#
|
@@ -26,7 +26,7 @@ module OCI
|
|
26
26
|
attr_accessor :display_name
|
27
27
|
|
28
28
|
# Free-form tags for this resource. Each tag is a simple key-value pair with no
|
29
|
-
# predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.
|
29
|
+
# predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
30
30
|
#
|
31
31
|
# Example: `{\"Department\": \"Finance\"}`
|
32
32
|
#
|
@@ -13,7 +13,7 @@ module OCI
|
|
13
13
|
attr_accessor :compartment_id
|
14
14
|
|
15
15
|
# Defined tags for this resource. Each key is predefined and scoped to a
|
16
|
-
# namespace. For more information, see [Resource Tags](https://docs.
|
16
|
+
# namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
17
17
|
#
|
18
18
|
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
19
19
|
#
|
@@ -27,7 +27,7 @@ module OCI
|
|
27
27
|
attr_accessor :display_name
|
28
28
|
|
29
29
|
# Free-form tags for this resource. Each tag is a simple key-value pair with no
|
30
|
-
# predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.
|
30
|
+
# predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
31
31
|
#
|
32
32
|
# Example: `{\"Department\": \"Finance\"}`
|
33
33
|
#
|
@@ -7,7 +7,7 @@ module OCI
|
|
7
7
|
# UpdateAutoScalingConfigurationDetails model.
|
8
8
|
class Autoscaling::Models::UpdateAutoScalingConfigurationDetails # rubocop:disable Metrics/LineLength
|
9
9
|
# Defined tags for this resource. Each key is predefined and scoped to a
|
10
|
-
# namespace. For more information, see [Resource Tags](https://docs.
|
10
|
+
# namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
11
11
|
#
|
12
12
|
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
13
13
|
#
|
@@ -20,7 +20,7 @@ module OCI
|
|
20
20
|
attr_accessor :display_name
|
21
21
|
|
22
22
|
# Free-form tags for this resource. Each tag is a simple key-value pair with no
|
23
|
-
# predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.
|
23
|
+
# predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
24
24
|
#
|
25
25
|
# Example: `{\"Department\": \"Finance\"}`
|
26
26
|
#
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
module OCI
|
4
|
+
module Budget
|
5
|
+
# Module containing models for requests made to, and responses received from,
|
6
|
+
# OCI Budget services
|
7
|
+
module Models
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# Require models
|
13
|
+
require 'oci/budget/models/alert_rule'
|
14
|
+
require 'oci/budget/models/alert_rule_summary'
|
15
|
+
require 'oci/budget/models/alert_type'
|
16
|
+
require 'oci/budget/models/budget'
|
17
|
+
require 'oci/budget/models/budget_summary'
|
18
|
+
require 'oci/budget/models/create_alert_rule_details'
|
19
|
+
require 'oci/budget/models/create_budget_details'
|
20
|
+
require 'oci/budget/models/lifecycle_state'
|
21
|
+
require 'oci/budget/models/reset_period'
|
22
|
+
require 'oci/budget/models/sort_by'
|
23
|
+
require 'oci/budget/models/sort_order'
|
24
|
+
require 'oci/budget/models/threshold_type'
|
25
|
+
require 'oci/budget/models/update_alert_rule_details'
|
26
|
+
require 'oci/budget/models/update_budget_details'
|
27
|
+
|
28
|
+
# Require generated clients
|
29
|
+
require 'oci/budget/budget_client'
|
30
|
+
require 'oci/budget/budget_client_composite_operations'
|
31
|
+
|
32
|
+
# Require service utilities
|
33
|
+
require 'oci/budget/util'
|
@@ -0,0 +1,767 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'uri'
|
4
|
+
require 'logger'
|
5
|
+
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
7
|
+
module OCI
|
8
|
+
# Use the Budgets API to manage budgets and budget alerts.
|
9
|
+
class Budget::BudgetClient
|
10
|
+
# Client used to make HTTP requests.
|
11
|
+
# @return [OCI::ApiClient]
|
12
|
+
attr_reader :api_client
|
13
|
+
|
14
|
+
# Fully qualified endpoint URL
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :endpoint
|
17
|
+
|
18
|
+
# The default retry configuration to apply to all operations in this service client. This can be overridden
|
19
|
+
# on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
20
|
+
# will not perform any retries
|
21
|
+
# @return [OCI::Retry::RetryConfig]
|
22
|
+
attr_reader :retry_config
|
23
|
+
|
24
|
+
# The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}.
|
25
|
+
# @return [String]
|
26
|
+
attr_reader :region
|
27
|
+
|
28
|
+
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
|
29
|
+
|
30
|
+
|
31
|
+
# Creates a new BudgetClient.
|
32
|
+
# Notes:
|
33
|
+
# If a config is not specified, then the global OCI.config will be used.
|
34
|
+
#
|
35
|
+
# This client is not thread-safe
|
36
|
+
#
|
37
|
+
# Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the
|
38
|
+
# region. A region may be specified in the config or via or the region parameter. If specified in both, then the
|
39
|
+
# region parameter will be used.
|
40
|
+
# @param [Config] config A Config object.
|
41
|
+
# @param [String] region A region used to determine the service endpoint. This will usually
|
42
|
+
# correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
|
43
|
+
# @param [String] endpoint The fully qualified endpoint URL
|
44
|
+
# @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
|
45
|
+
# a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication,
|
46
|
+
# so that the instance principals signer can be provided to the client
|
47
|
+
# @param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests
|
48
|
+
# the details for the proxy can be provided in this parameter
|
49
|
+
# @param [OCI::Retry::RetryConfig] retry_config The retry configuration for this service client. This represents the default retry configuration to
|
50
|
+
# apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
51
|
+
# will not perform any retries
|
52
|
+
def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
|
53
|
+
# If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
|
54
|
+
# then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
|
55
|
+
# and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
|
56
|
+
# pass it to this constructor.
|
57
|
+
#
|
58
|
+
# If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
|
59
|
+
# so try and load the config from the default file.
|
60
|
+
config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
61
|
+
config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
62
|
+
config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
63
|
+
|
64
|
+
if signer.nil?
|
65
|
+
signer = OCI::Signer.new(
|
66
|
+
config.user,
|
67
|
+
config.fingerprint,
|
68
|
+
config.tenancy,
|
69
|
+
config.key_file,
|
70
|
+
pass_phrase: config.pass_phrase,
|
71
|
+
private_key_content: config.key_content
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
75
|
+
@api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
|
76
|
+
@retry_config = retry_config
|
77
|
+
|
78
|
+
if endpoint
|
79
|
+
@endpoint = endpoint + '/20190111'
|
80
|
+
else
|
81
|
+
region ||= config.region
|
82
|
+
region ||= signer.region if signer.respond_to?(:region)
|
83
|
+
self.region = region
|
84
|
+
end
|
85
|
+
logger.info "BudgetClient endpoint set to '#{@endpoint}'." if logger
|
86
|
+
end
|
87
|
+
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
|
88
|
+
|
89
|
+
# Set the region that will be used to determine the service endpoint.
|
90
|
+
# This will usually correspond to a value in {OCI::Regions::REGION_ENUM},
|
91
|
+
# but may be an arbitrary string.
|
92
|
+
def region=(new_region)
|
93
|
+
@region = new_region
|
94
|
+
|
95
|
+
raise 'A region must be specified.' unless @region
|
96
|
+
|
97
|
+
@endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://usage.{region}.oci.{secondLevelDomain}') + '/20190111'
|
98
|
+
logger.info "BudgetClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
|
99
|
+
end
|
100
|
+
|
101
|
+
# @return [Logger] The logger for this client. May be nil.
|
102
|
+
def logger
|
103
|
+
@api_client.config.logger
|
104
|
+
end
|
105
|
+
|
106
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
107
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
108
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
109
|
+
|
110
|
+
|
111
|
+
# Creates a new Alert Rule.
|
112
|
+
#
|
113
|
+
# @param [String] budget_id The unique Budget OCID
|
114
|
+
# @param [OCI::Budget::Models::CreateAlertRuleDetails] create_alert_rule_details Details for the new Alert Rule.
|
115
|
+
# @param [Hash] opts the optional parameters
|
116
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
117
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
118
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
119
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
120
|
+
# hours, but can be invalidated before then due to conflicting operations. For example, if a resource
|
121
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
122
|
+
# might be rejected.
|
123
|
+
#
|
124
|
+
# @option opts [String] :opc_request_id The client request ID for tracing.
|
125
|
+
# @return [Response] A Response object with data of type {OCI::Budget::Models::AlertRule AlertRule}
|
126
|
+
def create_alert_rule(budget_id, create_alert_rule_details, opts = {})
|
127
|
+
logger.debug 'Calling operation BudgetClient#create_alert_rule.' if logger
|
128
|
+
|
129
|
+
raise "Missing the required parameter 'budget_id' when calling create_alert_rule." if budget_id.nil?
|
130
|
+
raise "Missing the required parameter 'create_alert_rule_details' when calling create_alert_rule." if create_alert_rule_details.nil?
|
131
|
+
raise "Parameter value for 'budget_id' must not be blank" if OCI::Internal::Util.blank_string?(budget_id)
|
132
|
+
|
133
|
+
path = '/budgets/{budgetId}/alertRules'.sub('{budgetId}', budget_id.to_s)
|
134
|
+
operation_signing_strategy = :standard
|
135
|
+
|
136
|
+
# rubocop:disable Style/NegatedIf
|
137
|
+
# Query Params
|
138
|
+
query_params = {}
|
139
|
+
|
140
|
+
# Header Params
|
141
|
+
header_params = {}
|
142
|
+
header_params[:accept] = 'application/json'
|
143
|
+
header_params[:'content-type'] = 'application/json'
|
144
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
145
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
146
|
+
# rubocop:enable Style/NegatedIf
|
147
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
148
|
+
|
149
|
+
post_body = @api_client.object_to_http_body(create_alert_rule_details)
|
150
|
+
|
151
|
+
# rubocop:disable Metrics/BlockLength
|
152
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BudgetClient#create_alert_rule') do
|
153
|
+
@api_client.call_api(
|
154
|
+
:POST,
|
155
|
+
path,
|
156
|
+
endpoint,
|
157
|
+
header_params: header_params,
|
158
|
+
query_params: query_params,
|
159
|
+
operation_signing_strategy: operation_signing_strategy,
|
160
|
+
body: post_body,
|
161
|
+
return_type: 'OCI::Budget::Models::AlertRule'
|
162
|
+
)
|
163
|
+
end
|
164
|
+
# rubocop:enable Metrics/BlockLength
|
165
|
+
end
|
166
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
167
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
168
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
169
|
+
|
170
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
171
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
172
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
173
|
+
|
174
|
+
|
175
|
+
# Creates a new Budget.
|
176
|
+
#
|
177
|
+
# @param [OCI::Budget::Models::CreateBudgetDetails] create_budget_details Details for the new Budget.
|
178
|
+
# @param [Hash] opts the optional parameters
|
179
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
180
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
181
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
182
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
183
|
+
# hours, but can be invalidated before then due to conflicting operations. For example, if a resource
|
184
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
185
|
+
# might be rejected.
|
186
|
+
#
|
187
|
+
# @option opts [String] :opc_request_id The client request ID for tracing.
|
188
|
+
# @return [Response] A Response object with data of type {OCI::Budget::Models::Budget Budget}
|
189
|
+
def create_budget(create_budget_details, opts = {})
|
190
|
+
logger.debug 'Calling operation BudgetClient#create_budget.' if logger
|
191
|
+
|
192
|
+
raise "Missing the required parameter 'create_budget_details' when calling create_budget." if create_budget_details.nil?
|
193
|
+
|
194
|
+
path = '/budgets'
|
195
|
+
operation_signing_strategy = :standard
|
196
|
+
|
197
|
+
# rubocop:disable Style/NegatedIf
|
198
|
+
# Query Params
|
199
|
+
query_params = {}
|
200
|
+
|
201
|
+
# Header Params
|
202
|
+
header_params = {}
|
203
|
+
header_params[:accept] = 'application/json'
|
204
|
+
header_params[:'content-type'] = 'application/json'
|
205
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
206
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
207
|
+
# rubocop:enable Style/NegatedIf
|
208
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
209
|
+
|
210
|
+
post_body = @api_client.object_to_http_body(create_budget_details)
|
211
|
+
|
212
|
+
# rubocop:disable Metrics/BlockLength
|
213
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BudgetClient#create_budget') do
|
214
|
+
@api_client.call_api(
|
215
|
+
:POST,
|
216
|
+
path,
|
217
|
+
endpoint,
|
218
|
+
header_params: header_params,
|
219
|
+
query_params: query_params,
|
220
|
+
operation_signing_strategy: operation_signing_strategy,
|
221
|
+
body: post_body,
|
222
|
+
return_type: 'OCI::Budget::Models::Budget'
|
223
|
+
)
|
224
|
+
end
|
225
|
+
# rubocop:enable Metrics/BlockLength
|
226
|
+
end
|
227
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
228
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
229
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
230
|
+
|
231
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
232
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
233
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
234
|
+
|
235
|
+
|
236
|
+
# Deletes a specified Alert Rule resource.
|
237
|
+
# @param [String] budget_id The unique Budget OCID
|
238
|
+
# @param [String] alert_rule_id The unique Alert Rule OCID
|
239
|
+
# @param [Hash] opts the optional parameters
|
240
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
241
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
242
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
|
243
|
+
# for a resource, set the `if-match` parameter to the value of the
|
244
|
+
# etag from a previous GET or POST response for that resource.
|
245
|
+
# The resource will be updated or deleted only if the etag you
|
246
|
+
# provide matches the resource's current etag value.
|
247
|
+
#
|
248
|
+
# @option opts [String] :opc_request_id The client request ID for tracing.
|
249
|
+
# @return [Response] A Response object with data of type nil
|
250
|
+
def delete_alert_rule(budget_id, alert_rule_id, opts = {})
|
251
|
+
logger.debug 'Calling operation BudgetClient#delete_alert_rule.' if logger
|
252
|
+
|
253
|
+
raise "Missing the required parameter 'budget_id' when calling delete_alert_rule." if budget_id.nil?
|
254
|
+
raise "Missing the required parameter 'alert_rule_id' when calling delete_alert_rule." if alert_rule_id.nil?
|
255
|
+
raise "Parameter value for 'budget_id' must not be blank" if OCI::Internal::Util.blank_string?(budget_id)
|
256
|
+
raise "Parameter value for 'alert_rule_id' must not be blank" if OCI::Internal::Util.blank_string?(alert_rule_id)
|
257
|
+
|
258
|
+
path = '/budgets/{budgetId}/alertRules/{alertRuleId}'.sub('{budgetId}', budget_id.to_s).sub('{alertRuleId}', alert_rule_id.to_s)
|
259
|
+
operation_signing_strategy = :standard
|
260
|
+
|
261
|
+
# rubocop:disable Style/NegatedIf
|
262
|
+
# Query Params
|
263
|
+
query_params = {}
|
264
|
+
|
265
|
+
# Header Params
|
266
|
+
header_params = {}
|
267
|
+
header_params[:accept] = 'application/json'
|
268
|
+
header_params[:'content-type'] = 'application/json'
|
269
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
270
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
271
|
+
# rubocop:enable Style/NegatedIf
|
272
|
+
|
273
|
+
post_body = nil
|
274
|
+
|
275
|
+
# rubocop:disable Metrics/BlockLength
|
276
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BudgetClient#delete_alert_rule') do
|
277
|
+
@api_client.call_api(
|
278
|
+
:DELETE,
|
279
|
+
path,
|
280
|
+
endpoint,
|
281
|
+
header_params: header_params,
|
282
|
+
query_params: query_params,
|
283
|
+
operation_signing_strategy: operation_signing_strategy,
|
284
|
+
body: post_body
|
285
|
+
)
|
286
|
+
end
|
287
|
+
# rubocop:enable Metrics/BlockLength
|
288
|
+
end
|
289
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
290
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
291
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
292
|
+
|
293
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
294
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
295
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
296
|
+
|
297
|
+
|
298
|
+
# Deletes a specified Budget resource
|
299
|
+
# @param [String] budget_id The unique Budget OCID
|
300
|
+
# @param [Hash] opts the optional parameters
|
301
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
302
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
303
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
|
304
|
+
# for a resource, set the `if-match` parameter to the value of the
|
305
|
+
# etag from a previous GET or POST response for that resource.
|
306
|
+
# The resource will be updated or deleted only if the etag you
|
307
|
+
# provide matches the resource's current etag value.
|
308
|
+
#
|
309
|
+
# @option opts [String] :opc_request_id The client request ID for tracing.
|
310
|
+
# @return [Response] A Response object with data of type nil
|
311
|
+
def delete_budget(budget_id, opts = {})
|
312
|
+
logger.debug 'Calling operation BudgetClient#delete_budget.' if logger
|
313
|
+
|
314
|
+
raise "Missing the required parameter 'budget_id' when calling delete_budget." if budget_id.nil?
|
315
|
+
raise "Parameter value for 'budget_id' must not be blank" if OCI::Internal::Util.blank_string?(budget_id)
|
316
|
+
|
317
|
+
path = '/budgets/{budgetId}'.sub('{budgetId}', budget_id.to_s)
|
318
|
+
operation_signing_strategy = :standard
|
319
|
+
|
320
|
+
# rubocop:disable Style/NegatedIf
|
321
|
+
# Query Params
|
322
|
+
query_params = {}
|
323
|
+
|
324
|
+
# Header Params
|
325
|
+
header_params = {}
|
326
|
+
header_params[:accept] = 'application/json'
|
327
|
+
header_params[:'content-type'] = 'application/json'
|
328
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
329
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
330
|
+
# rubocop:enable Style/NegatedIf
|
331
|
+
|
332
|
+
post_body = nil
|
333
|
+
|
334
|
+
# rubocop:disable Metrics/BlockLength
|
335
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BudgetClient#delete_budget') do
|
336
|
+
@api_client.call_api(
|
337
|
+
:DELETE,
|
338
|
+
path,
|
339
|
+
endpoint,
|
340
|
+
header_params: header_params,
|
341
|
+
query_params: query_params,
|
342
|
+
operation_signing_strategy: operation_signing_strategy,
|
343
|
+
body: post_body
|
344
|
+
)
|
345
|
+
end
|
346
|
+
# rubocop:enable Metrics/BlockLength
|
347
|
+
end
|
348
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
349
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
350
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
351
|
+
|
352
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
353
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
354
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
355
|
+
|
356
|
+
|
357
|
+
# Gets an Alert Rule for a specified Budget.
|
358
|
+
# @param [String] budget_id The unique Budget OCID
|
359
|
+
# @param [String] alert_rule_id The unique Alert Rule OCID
|
360
|
+
# @param [Hash] opts the optional parameters
|
361
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
362
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
363
|
+
# @option opts [String] :opc_request_id The client request ID for tracing.
|
364
|
+
# @return [Response] A Response object with data of type {OCI::Budget::Models::AlertRule AlertRule}
|
365
|
+
def get_alert_rule(budget_id, alert_rule_id, opts = {})
|
366
|
+
logger.debug 'Calling operation BudgetClient#get_alert_rule.' if logger
|
367
|
+
|
368
|
+
raise "Missing the required parameter 'budget_id' when calling get_alert_rule." if budget_id.nil?
|
369
|
+
raise "Missing the required parameter 'alert_rule_id' when calling get_alert_rule." if alert_rule_id.nil?
|
370
|
+
raise "Parameter value for 'budget_id' must not be blank" if OCI::Internal::Util.blank_string?(budget_id)
|
371
|
+
raise "Parameter value for 'alert_rule_id' must not be blank" if OCI::Internal::Util.blank_string?(alert_rule_id)
|
372
|
+
|
373
|
+
path = '/budgets/{budgetId}/alertRules/{alertRuleId}'.sub('{budgetId}', budget_id.to_s).sub('{alertRuleId}', alert_rule_id.to_s)
|
374
|
+
operation_signing_strategy = :standard
|
375
|
+
|
376
|
+
# rubocop:disable Style/NegatedIf
|
377
|
+
# Query Params
|
378
|
+
query_params = {}
|
379
|
+
|
380
|
+
# Header Params
|
381
|
+
header_params = {}
|
382
|
+
header_params[:accept] = 'application/json'
|
383
|
+
header_params[:'content-type'] = 'application/json'
|
384
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
385
|
+
# rubocop:enable Style/NegatedIf
|
386
|
+
|
387
|
+
post_body = nil
|
388
|
+
|
389
|
+
# rubocop:disable Metrics/BlockLength
|
390
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BudgetClient#get_alert_rule') do
|
391
|
+
@api_client.call_api(
|
392
|
+
:GET,
|
393
|
+
path,
|
394
|
+
endpoint,
|
395
|
+
header_params: header_params,
|
396
|
+
query_params: query_params,
|
397
|
+
operation_signing_strategy: operation_signing_strategy,
|
398
|
+
body: post_body,
|
399
|
+
return_type: 'OCI::Budget::Models::AlertRule'
|
400
|
+
)
|
401
|
+
end
|
402
|
+
# rubocop:enable Metrics/BlockLength
|
403
|
+
end
|
404
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
405
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
406
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
407
|
+
|
408
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
409
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
410
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
411
|
+
|
412
|
+
|
413
|
+
# Gets a Budget by identifier
|
414
|
+
# @param [String] budget_id The unique Budget OCID
|
415
|
+
# @param [Hash] opts the optional parameters
|
416
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
417
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
418
|
+
# @option opts [String] :opc_request_id The client request ID for tracing.
|
419
|
+
# @return [Response] A Response object with data of type {OCI::Budget::Models::Budget Budget}
|
420
|
+
def get_budget(budget_id, opts = {})
|
421
|
+
logger.debug 'Calling operation BudgetClient#get_budget.' if logger
|
422
|
+
|
423
|
+
raise "Missing the required parameter 'budget_id' when calling get_budget." if budget_id.nil?
|
424
|
+
raise "Parameter value for 'budget_id' must not be blank" if OCI::Internal::Util.blank_string?(budget_id)
|
425
|
+
|
426
|
+
path = '/budgets/{budgetId}'.sub('{budgetId}', budget_id.to_s)
|
427
|
+
operation_signing_strategy = :standard
|
428
|
+
|
429
|
+
# rubocop:disable Style/NegatedIf
|
430
|
+
# Query Params
|
431
|
+
query_params = {}
|
432
|
+
|
433
|
+
# Header Params
|
434
|
+
header_params = {}
|
435
|
+
header_params[:accept] = 'application/json'
|
436
|
+
header_params[:'content-type'] = 'application/json'
|
437
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
438
|
+
# rubocop:enable Style/NegatedIf
|
439
|
+
|
440
|
+
post_body = nil
|
441
|
+
|
442
|
+
# rubocop:disable Metrics/BlockLength
|
443
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BudgetClient#get_budget') do
|
444
|
+
@api_client.call_api(
|
445
|
+
:GET,
|
446
|
+
path,
|
447
|
+
endpoint,
|
448
|
+
header_params: header_params,
|
449
|
+
query_params: query_params,
|
450
|
+
operation_signing_strategy: operation_signing_strategy,
|
451
|
+
body: post_body,
|
452
|
+
return_type: 'OCI::Budget::Models::Budget'
|
453
|
+
)
|
454
|
+
end
|
455
|
+
# rubocop:enable Metrics/BlockLength
|
456
|
+
end
|
457
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
458
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
459
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
460
|
+
|
461
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
462
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
463
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
464
|
+
|
465
|
+
|
466
|
+
# Returns a list of Alert Rules for a specified Budget.
|
467
|
+
#
|
468
|
+
# @param [String] budget_id The unique Budget OCID
|
469
|
+
# @param [Hash] opts the optional parameters
|
470
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
471
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
472
|
+
# @option opts [Integer] :limit The maximum number of items to return.
|
473
|
+
# @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
|
474
|
+
# @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'.
|
475
|
+
# Allowed values are: ASC, DESC
|
476
|
+
# @option opts [String] :sort_by The field to sort by. If not specified, the default is timeCreated.
|
477
|
+
# The default sort order for timeCreated is DESC.
|
478
|
+
# The default sort order for displayName is ASC in alphanumeric order.
|
479
|
+
#
|
480
|
+
# @option opts [String] :lifecycle_state The current state of the resource to filter by.
|
481
|
+
# @option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.
|
482
|
+
#
|
483
|
+
# Example: `My new resource`
|
484
|
+
#
|
485
|
+
# @option opts [String] :opc_request_id The client request ID for tracing.
|
486
|
+
# @return [Response] A Response object with data of type Array<{OCI::Budget::Models::AlertRuleSummary AlertRuleSummary}>
|
487
|
+
def list_alert_rules(budget_id, opts = {})
|
488
|
+
logger.debug 'Calling operation BudgetClient#list_alert_rules.' if logger
|
489
|
+
|
490
|
+
raise "Missing the required parameter 'budget_id' when calling list_alert_rules." if budget_id.nil?
|
491
|
+
|
492
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
493
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
494
|
+
end
|
495
|
+
|
496
|
+
if opts[:sort_by] && !OCI::Budget::Models::SORT_BY_ENUM.include?(opts[:sort_by])
|
497
|
+
raise 'Invalid value for "sort_by", must be one of the values in OCI::Budget::Models::SORT_BY_ENUM.'
|
498
|
+
end
|
499
|
+
|
500
|
+
if opts[:lifecycle_state] && !OCI::Budget::Models::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
|
501
|
+
raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Budget::Models::LIFECYCLE_STATE_ENUM.'
|
502
|
+
end
|
503
|
+
raise "Parameter value for 'budget_id' must not be blank" if OCI::Internal::Util.blank_string?(budget_id)
|
504
|
+
|
505
|
+
path = '/budgets/{budgetId}/alertRules'.sub('{budgetId}', budget_id.to_s)
|
506
|
+
operation_signing_strategy = :standard
|
507
|
+
|
508
|
+
# rubocop:disable Style/NegatedIf
|
509
|
+
# Query Params
|
510
|
+
query_params = {}
|
511
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
512
|
+
query_params[:page] = opts[:page] if opts[:page]
|
513
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
514
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
515
|
+
query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
|
516
|
+
query_params[:displayName] = opts[:display_name] if opts[:display_name]
|
517
|
+
|
518
|
+
# Header Params
|
519
|
+
header_params = {}
|
520
|
+
header_params[:accept] = 'application/json'
|
521
|
+
header_params[:'content-type'] = 'application/json'
|
522
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
523
|
+
# rubocop:enable Style/NegatedIf
|
524
|
+
|
525
|
+
post_body = nil
|
526
|
+
|
527
|
+
# rubocop:disable Metrics/BlockLength
|
528
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BudgetClient#list_alert_rules') do
|
529
|
+
@api_client.call_api(
|
530
|
+
:GET,
|
531
|
+
path,
|
532
|
+
endpoint,
|
533
|
+
header_params: header_params,
|
534
|
+
query_params: query_params,
|
535
|
+
operation_signing_strategy: operation_signing_strategy,
|
536
|
+
body: post_body,
|
537
|
+
return_type: 'Array<OCI::Budget::Models::AlertRuleSummary>'
|
538
|
+
)
|
539
|
+
end
|
540
|
+
# rubocop:enable Metrics/BlockLength
|
541
|
+
end
|
542
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
543
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
544
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
545
|
+
|
546
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
547
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
548
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
549
|
+
|
550
|
+
|
551
|
+
# Gets a list of all Budgets in a compartment.
|
552
|
+
#
|
553
|
+
# @param [String] compartment_id The ID of the compartment in which to list resources.
|
554
|
+
# @param [Hash] opts the optional parameters
|
555
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
556
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
557
|
+
# @option opts [Integer] :limit The maximum number of items to return.
|
558
|
+
# @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
|
559
|
+
# @option opts [String] :sort_order The sort order to use, either 'asc' or 'desc'.
|
560
|
+
# Allowed values are: ASC, DESC
|
561
|
+
# @option opts [String] :sort_by The field to sort by. If not specified, the default is timeCreated.
|
562
|
+
# The default sort order for timeCreated is DESC.
|
563
|
+
# The default sort order for displayName is ASC in alphanumeric order.
|
564
|
+
#
|
565
|
+
# @option opts [String] :lifecycle_state The current state of the resource to filter by.
|
566
|
+
# @option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.
|
567
|
+
#
|
568
|
+
# Example: `My new resource`
|
569
|
+
#
|
570
|
+
# @option opts [String] :opc_request_id The client request ID for tracing.
|
571
|
+
# @return [Response] A Response object with data of type Array<{OCI::Budget::Models::BudgetSummary BudgetSummary}>
|
572
|
+
def list_budgets(compartment_id, opts = {})
|
573
|
+
logger.debug 'Calling operation BudgetClient#list_budgets.' if logger
|
574
|
+
|
575
|
+
raise "Missing the required parameter 'compartment_id' when calling list_budgets." if compartment_id.nil?
|
576
|
+
|
577
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
578
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
579
|
+
end
|
580
|
+
|
581
|
+
if opts[:sort_by] && !OCI::Budget::Models::SORT_BY_ENUM.include?(opts[:sort_by])
|
582
|
+
raise 'Invalid value for "sort_by", must be one of the values in OCI::Budget::Models::SORT_BY_ENUM.'
|
583
|
+
end
|
584
|
+
|
585
|
+
if opts[:lifecycle_state] && !OCI::Budget::Models::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
|
586
|
+
raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Budget::Models::LIFECYCLE_STATE_ENUM.'
|
587
|
+
end
|
588
|
+
|
589
|
+
path = '/budgets'
|
590
|
+
operation_signing_strategy = :standard
|
591
|
+
|
592
|
+
# rubocop:disable Style/NegatedIf
|
593
|
+
# Query Params
|
594
|
+
query_params = {}
|
595
|
+
query_params[:compartmentId] = compartment_id
|
596
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
597
|
+
query_params[:page] = opts[:page] if opts[:page]
|
598
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
599
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
600
|
+
query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
|
601
|
+
query_params[:displayName] = opts[:display_name] if opts[:display_name]
|
602
|
+
|
603
|
+
# Header Params
|
604
|
+
header_params = {}
|
605
|
+
header_params[:accept] = 'application/json'
|
606
|
+
header_params[:'content-type'] = 'application/json'
|
607
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
608
|
+
# rubocop:enable Style/NegatedIf
|
609
|
+
|
610
|
+
post_body = nil
|
611
|
+
|
612
|
+
# rubocop:disable Metrics/BlockLength
|
613
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BudgetClient#list_budgets') do
|
614
|
+
@api_client.call_api(
|
615
|
+
:GET,
|
616
|
+
path,
|
617
|
+
endpoint,
|
618
|
+
header_params: header_params,
|
619
|
+
query_params: query_params,
|
620
|
+
operation_signing_strategy: operation_signing_strategy,
|
621
|
+
body: post_body,
|
622
|
+
return_type: 'Array<OCI::Budget::Models::BudgetSummary>'
|
623
|
+
)
|
624
|
+
end
|
625
|
+
# rubocop:enable Metrics/BlockLength
|
626
|
+
end
|
627
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
628
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
629
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
630
|
+
|
631
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
632
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
633
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
634
|
+
|
635
|
+
|
636
|
+
# Update an Alert Rule for the budget identified by the OCID.
|
637
|
+
# @param [String] budget_id The unique Budget OCID
|
638
|
+
# @param [String] alert_rule_id The unique Alert Rule OCID
|
639
|
+
# @param [OCI::Budget::Models::UpdateAlertRuleDetails] update_alert_rule_details The information to be updated.
|
640
|
+
# @param [Hash] opts the optional parameters
|
641
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
642
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
643
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
|
644
|
+
# for a resource, set the `if-match` parameter to the value of the
|
645
|
+
# etag from a previous GET or POST response for that resource.
|
646
|
+
# The resource will be updated or deleted only if the etag you
|
647
|
+
# provide matches the resource's current etag value.
|
648
|
+
#
|
649
|
+
# @option opts [String] :opc_request_id The client request ID for tracing.
|
650
|
+
# @return [Response] A Response object with data of type {OCI::Budget::Models::AlertRule AlertRule}
|
651
|
+
def update_alert_rule(budget_id, alert_rule_id, update_alert_rule_details, opts = {})
|
652
|
+
logger.debug 'Calling operation BudgetClient#update_alert_rule.' if logger
|
653
|
+
|
654
|
+
raise "Missing the required parameter 'budget_id' when calling update_alert_rule." if budget_id.nil?
|
655
|
+
raise "Missing the required parameter 'alert_rule_id' when calling update_alert_rule." if alert_rule_id.nil?
|
656
|
+
raise "Missing the required parameter 'update_alert_rule_details' when calling update_alert_rule." if update_alert_rule_details.nil?
|
657
|
+
raise "Parameter value for 'budget_id' must not be blank" if OCI::Internal::Util.blank_string?(budget_id)
|
658
|
+
raise "Parameter value for 'alert_rule_id' must not be blank" if OCI::Internal::Util.blank_string?(alert_rule_id)
|
659
|
+
|
660
|
+
path = '/budgets/{budgetId}/alertRules/{alertRuleId}'.sub('{budgetId}', budget_id.to_s).sub('{alertRuleId}', alert_rule_id.to_s)
|
661
|
+
operation_signing_strategy = :standard
|
662
|
+
|
663
|
+
# rubocop:disable Style/NegatedIf
|
664
|
+
# Query Params
|
665
|
+
query_params = {}
|
666
|
+
|
667
|
+
# Header Params
|
668
|
+
header_params = {}
|
669
|
+
header_params[:accept] = 'application/json'
|
670
|
+
header_params[:'content-type'] = 'application/json'
|
671
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
672
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
673
|
+
# rubocop:enable Style/NegatedIf
|
674
|
+
|
675
|
+
post_body = @api_client.object_to_http_body(update_alert_rule_details)
|
676
|
+
|
677
|
+
# rubocop:disable Metrics/BlockLength
|
678
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BudgetClient#update_alert_rule') do
|
679
|
+
@api_client.call_api(
|
680
|
+
:PUT,
|
681
|
+
path,
|
682
|
+
endpoint,
|
683
|
+
header_params: header_params,
|
684
|
+
query_params: query_params,
|
685
|
+
operation_signing_strategy: operation_signing_strategy,
|
686
|
+
body: post_body,
|
687
|
+
return_type: 'OCI::Budget::Models::AlertRule'
|
688
|
+
)
|
689
|
+
end
|
690
|
+
# rubocop:enable Metrics/BlockLength
|
691
|
+
end
|
692
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
693
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
694
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
695
|
+
|
696
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
697
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
698
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
699
|
+
|
700
|
+
|
701
|
+
# Update a Budget identified by the OCID
|
702
|
+
# @param [String] budget_id The unique Budget OCID
|
703
|
+
# @param [OCI::Budget::Models::UpdateBudgetDetails] update_budget_details The information to be updated.
|
704
|
+
# @param [Hash] opts the optional parameters
|
705
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
706
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
707
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
|
708
|
+
# for a resource, set the `if-match` parameter to the value of the
|
709
|
+
# etag from a previous GET or POST response for that resource.
|
710
|
+
# The resource will be updated or deleted only if the etag you
|
711
|
+
# provide matches the resource's current etag value.
|
712
|
+
#
|
713
|
+
# @option opts [String] :opc_request_id The client request ID for tracing.
|
714
|
+
# @return [Response] A Response object with data of type {OCI::Budget::Models::Budget Budget}
|
715
|
+
def update_budget(budget_id, update_budget_details, opts = {})
|
716
|
+
logger.debug 'Calling operation BudgetClient#update_budget.' if logger
|
717
|
+
|
718
|
+
raise "Missing the required parameter 'budget_id' when calling update_budget." if budget_id.nil?
|
719
|
+
raise "Missing the required parameter 'update_budget_details' when calling update_budget." if update_budget_details.nil?
|
720
|
+
raise "Parameter value for 'budget_id' must not be blank" if OCI::Internal::Util.blank_string?(budget_id)
|
721
|
+
|
722
|
+
path = '/budgets/{budgetId}'.sub('{budgetId}', budget_id.to_s)
|
723
|
+
operation_signing_strategy = :standard
|
724
|
+
|
725
|
+
# rubocop:disable Style/NegatedIf
|
726
|
+
# Query Params
|
727
|
+
query_params = {}
|
728
|
+
|
729
|
+
# Header Params
|
730
|
+
header_params = {}
|
731
|
+
header_params[:accept] = 'application/json'
|
732
|
+
header_params[:'content-type'] = 'application/json'
|
733
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
734
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
735
|
+
# rubocop:enable Style/NegatedIf
|
736
|
+
|
737
|
+
post_body = @api_client.object_to_http_body(update_budget_details)
|
738
|
+
|
739
|
+
# rubocop:disable Metrics/BlockLength
|
740
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BudgetClient#update_budget') do
|
741
|
+
@api_client.call_api(
|
742
|
+
:PUT,
|
743
|
+
path,
|
744
|
+
endpoint,
|
745
|
+
header_params: header_params,
|
746
|
+
query_params: query_params,
|
747
|
+
operation_signing_strategy: operation_signing_strategy,
|
748
|
+
body: post_body,
|
749
|
+
return_type: 'OCI::Budget::Models::Budget'
|
750
|
+
)
|
751
|
+
end
|
752
|
+
# rubocop:enable Metrics/BlockLength
|
753
|
+
end
|
754
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
755
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
756
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
757
|
+
|
758
|
+
private
|
759
|
+
|
760
|
+
def applicable_retry_config(opts = {})
|
761
|
+
return @retry_config unless opts.key?(:retry_config)
|
762
|
+
|
763
|
+
opts[:retry_config]
|
764
|
+
end
|
765
|
+
end
|
766
|
+
end
|
767
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|