oci 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -3
- data/lib/oci.rb +6 -0
- data/lib/oci/api_client.rb +159 -134
- data/lib/oci/audit/audit.rb +3 -0
- data/lib/oci/audit/audit_client.rb +88 -40
- data/lib/oci/audit/audit_client_composite_operations.rb +64 -0
- data/lib/oci/audit/models/audit_event.rb +151 -200
- data/lib/oci/audit/models/configuration.rb +61 -38
- data/lib/oci/audit/models/update_configuration_details.rb +61 -38
- data/lib/oci/auth/util.rb +1 -1
- data/lib/oci/base_signer.rb +20 -29
- data/lib/oci/config.rb +9 -3
- data/lib/oci/core/blockstorage_client.rb +512 -269
- data/lib/oci/core/blockstorage_client_composite_operations.rb +342 -0
- data/lib/oci/core/compute_client.rb +959 -536
- data/lib/oci/core/compute_client_composite_operations.rb +738 -0
- data/lib/oci/core/core.rb +5 -0
- data/lib/oci/core/models/attach_boot_volume_details.rb +72 -57
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +76 -53
- data/lib/oci/core/models/attach_paravirtualized_volume_details.rb +69 -45
- data/lib/oci/core/models/attach_vnic_details.rb +79 -68
- data/lib/oci/core/models/attach_volume_details.rb +83 -74
- data/lib/oci/core/models/boot_volume.rb +119 -120
- data/lib/oci/core/models/boot_volume_attachment.rb +114 -111
- data/lib/oci/core/models/bulk_add_virtual_circuit_public_prefixes_details.rb +61 -38
- data/lib/oci/core/models/bulk_delete_virtual_circuit_public_prefixes_details.rb +61 -38
- data/lib/oci/core/models/capture_console_history_details.rb +81 -70
- data/lib/oci/core/models/connect_local_peering_gateways_details.rb +60 -38
- data/lib/oci/core/models/connect_remote_peering_connections_details.rb +67 -49
- data/lib/oci/core/models/console_history.rb +122 -123
- data/lib/oci/core/models/cpe.rb +82 -74
- data/lib/oci/core/models/create_cpe_details.rb +73 -58
- data/lib/oci/core/models/create_cross_connect_details.rb +98 -99
- data/lib/oci/core/models/create_cross_connect_group_details.rb +67 -48
- data/lib/oci/core/models/create_dhcp_details.rb +89 -84
- data/lib/oci/core/models/create_drg_attachment_details.rb +71 -56
- data/lib/oci/core/models/create_drg_details.rb +66 -47
- data/lib/oci/core/models/create_image_details.rb +108 -110
- data/lib/oci/core/models/create_instance_console_connection_details.rb +79 -69
- data/lib/oci/core/models/create_internet_gateway_details.rb +76 -65
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +83 -76
- data/lib/oci/core/models/create_local_peering_gateway_details.rb +72 -57
- data/lib/oci/core/models/create_private_ip_details.rb +97 -94
- data/lib/oci/core/models/create_public_ip_details.rb +90 -77
- data/lib/oci/core/models/create_remote_peering_connection_details.rb +72 -57
- data/lib/oci/core/models/create_route_table_details.rb +90 -87
- data/lib/oci/core/models/create_security_list_details.rb +95 -96
- data/lib/oci/core/models/create_subnet_details.rb +133 -154
- data/lib/oci/core/models/create_vcn_details.rb +96 -93
- data/lib/oci/core/models/create_virtual_circuit_details.rb +136 -153
- data/lib/oci/core/models/create_virtual_circuit_public_prefix_details.rb +62 -39
- data/lib/oci/core/models/create_vnic_details.rb +99 -97
- data/lib/oci/core/models/create_volume_backup_details.rb +94 -85
- data/lib/oci/core/models/create_volume_backup_policy_assignment_details.rb +66 -47
- data/lib/oci/core/models/create_volume_details.rb +117 -130
- data/lib/oci/core/models/cross_connect.rb +120 -121
- data/lib/oci/core/models/cross_connect_group.rb +97 -82
- data/lib/oci/core/models/cross_connect_location.rb +65 -43
- data/lib/oci/core/models/cross_connect_mapping.rb +89 -81
- data/lib/oci/core/models/cross_connect_port_speed_shape.rb +68 -48
- data/lib/oci/core/models/cross_connect_status.rb +110 -87
- data/lib/oci/core/models/delete_virtual_circuit_public_prefix_details.rb +61 -38
- data/lib/oci/core/models/dhcp_dns_option.rb +85 -60
- data/lib/oci/core/models/dhcp_option.rb +62 -38
- data/lib/oci/core/models/dhcp_options.rb +119 -118
- data/lib/oci/core/models/dhcp_search_domain_option.rb +66 -44
- data/lib/oci/core/models/drg.rb +96 -81
- data/lib/oci/core/models/drg_attachment.rb +106 -99
- data/lib/oci/core/models/egress_security_rule.rb +89 -83
- data/lib/oci/core/models/export_image_details.rb +63 -41
- data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +74 -59
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +65 -42
- data/lib/oci/core/models/fast_connect_provider_service.rb +155 -126
- data/lib/oci/core/models/get_public_ip_by_ip_address_details.rb +61 -39
- data/lib/oci/core/models/get_public_ip_by_private_ip_id_details.rb +61 -39
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +117 -105
- data/lib/oci/core/models/icmp_options.rb +63 -41
- data/lib/oci/core/models/image.rb +170 -185
- data/lib/oci/core/models/image_source_details.rb +79 -60
- data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +77 -62
- data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +67 -44
- data/lib/oci/core/models/ingress_security_rule.rb +89 -83
- data/lib/oci/core/models/instance.rb +190 -211
- data/lib/oci/core/models/instance_console_connection.rb +118 -117
- data/lib/oci/core/models/instance_credentials.rb +63 -41
- data/lib/oci/core/models/instance_source_details.rb +64 -41
- data/lib/oci/core/models/instance_source_via_boot_volume_details.rb +64 -41
- data/lib/oci/core/models/instance_source_via_image_details.rb +70 -51
- data/lib/oci/core/models/internet_gateway.rb +107 -100
- data/lib/oci/core/models/ip_sec_connection.rb +113 -110
- data/lib/oci/core/models/ip_sec_connection_device_config.rb +73 -59
- data/lib/oci/core/models/ip_sec_connection_device_status.rb +75 -61
- data/lib/oci/core/models/launch_instance_details.rb +163 -189
- data/lib/oci/core/models/launch_options.rb +130 -93
- data/lib/oci/core/models/letter_of_authority.rb +105 -100
- data/lib/oci/core/models/local_peering_gateway.rb +141 -140
- data/lib/oci/core/models/paravirtualized_volume_attachment.rb +83 -60
- data/lib/oci/core/models/peer_region_for_remote_peering.rb +61 -37
- data/lib/oci/core/models/port_range.rb +65 -42
- data/lib/oci/core/models/private_ip.rb +131 -151
- data/lib/oci/core/models/public_ip.rb +160 -149
- data/lib/oci/core/models/remote_peering_connection.rb +148 -151
- data/lib/oci/core/models/route_rule.rb +68 -50
- data/lib/oci/core/models/route_table.rb +120 -121
- data/lib/oci/core/models/security_list.rb +125 -130
- data/lib/oci/core/models/shape.rb +60 -36
- data/lib/oci/core/models/subnet.rb +183 -220
- data/lib/oci/core/models/tcp_options.rb +67 -49
- data/lib/oci/core/models/tunnel_config.rb +76 -62
- data/lib/oci/core/models/tunnel_status.rb +94 -77
- data/lib/oci/core/models/udp_options.rb +67 -49
- data/lib/oci/core/models/update_boot_volume_details.rb +62 -39
- data/lib/oci/core/models/update_console_history_details.rb +76 -61
- data/lib/oci/core/models/update_cpe_details.rb +62 -39
- data/lib/oci/core/models/update_cross_connect_details.rb +68 -50
- data/lib/oci/core/models/update_cross_connect_group_details.rb +62 -39
- data/lib/oci/core/models/update_dhcp_details.rb +80 -67
- data/lib/oci/core/models/update_drg_attachment_details.rb +62 -39
- data/lib/oci/core/models/update_drg_details.rb +62 -39
- data/lib/oci/core/models/update_image_details.rb +77 -62
- data/lib/oci/core/models/update_instance_details.rb +77 -62
- data/lib/oci/core/models/update_internet_gateway_details.rb +67 -48
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +62 -39
- data/lib/oci/core/models/update_local_peering_gateway_details.rb +62 -39
- data/lib/oci/core/models/update_private_ip_details.rb +90 -83
- data/lib/oci/core/models/update_public_ip_details.rb +68 -49
- data/lib/oci/core/models/update_remote_peering_connection_details.rb +62 -39
- data/lib/oci/core/models/update_route_table_details.rb +81 -70
- data/lib/oci/core/models/update_security_list_details.rb +86 -79
- data/lib/oci/core/models/update_subnet_details.rb +76 -61
- data/lib/oci/core/models/update_vcn_details.rb +76 -61
- data/lib/oci/core/models/update_virtual_circuit_details.rb +114 -115
- data/lib/oci/core/models/update_vnic_details.rb +75 -60
- data/lib/oci/core/models/update_volume_backup_details.rb +76 -61
- data/lib/oci/core/models/update_volume_details.rb +76 -61
- data/lib/oci/core/models/vcn.rb +150 -167
- data/lib/oci/core/models/virtual_circuit.rb +254 -269
- data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +68 -48
- data/lib/oci/core/models/virtual_circuit_public_prefix.rb +79 -54
- data/lib/oci/core/models/vnic.rb +149 -166
- data/lib/oci/core/models/vnic_attachment.rb +132 -141
- data/lib/oci/core/models/volume.rb +138 -151
- data/lib/oci/core/models/volume_attachment.rb +126 -131
- data/lib/oci/core/models/volume_backup.rb +185 -200
- data/lib/oci/core/models/volume_backup_policy.rb +75 -61
- data/lib/oci/core/models/volume_backup_policy_assignment.rb +75 -63
- data/lib/oci/core/models/volume_backup_schedule.rb +101 -76
- data/lib/oci/core/models/volume_source_details.rb +62 -37
- data/lib/oci/core/models/volume_source_from_volume_backup_details.rb +62 -38
- data/lib/oci/core/models/volume_source_from_volume_details.rb +62 -38
- data/lib/oci/core/virtual_network_client.rb +2683 -1457
- data/lib/oci/core/virtual_network_client_composite_operations.rb +1849 -0
- data/lib/oci/database/database.rb +3 -0
- data/lib/oci/database/database_client.rb +894 -454
- data/lib/oci/database/database_client_composite_operations.rb +462 -0
- data/lib/oci/database/models/backup.rb +131 -128
- data/lib/oci/database/models/backup_summary.rb +131 -128
- data/lib/oci/database/models/create_backup_details.rb +66 -47
- data/lib/oci/database/models/create_data_guard_association_details.rb +112 -102
- data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +73 -51
- data/lib/oci/database/models/create_database_details.rb +140 -105
- data/lib/oci/database/models/create_database_from_backup_details.rb +71 -56
- data/lib/oci/database/models/create_db_home_details.rb +70 -53
- data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +83 -67
- data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +74 -53
- data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +69 -44
- data/lib/oci/database/models/data_guard_association.rb +205 -204
- data/lib/oci/database/models/data_guard_association_summary.rb +205 -204
- data/lib/oci/database/models/database.rb +175 -156
- data/lib/oci/database/models/database_summary.rb +175 -156
- data/lib/oci/database/models/db_backup_config.rb +60 -38
- data/lib/oci/database/models/db_home.rb +110 -107
- data/lib/oci/database/models/db_home_summary.rb +110 -107
- data/lib/oci/database/models/db_node.rb +113 -108
- data/lib/oci/database/models/db_node_summary.rb +113 -108
- data/lib/oci/database/models/db_system.rb +299 -314
- data/lib/oci/database/models/db_system_shape_summary.rb +88 -86
- data/lib/oci/database/models/db_system_summary.rb +299 -314
- data/lib/oci/database/models/db_version_summary.rb +64 -44
- data/lib/oci/database/models/failover_data_guard_association_details.rb +60 -38
- data/lib/oci/database/models/launch_db_system_details.rb +231 -234
- data/lib/oci/database/models/patch.rb +136 -113
- data/lib/oci/database/models/patch_details.rb +73 -53
- data/lib/oci/database/models/patch_history_entry.rb +114 -99
- data/lib/oci/database/models/patch_history_entry_summary.rb +114 -99
- data/lib/oci/database/models/patch_summary.rb +136 -113
- data/lib/oci/database/models/reinstate_data_guard_association_details.rb +60 -38
- data/lib/oci/database/models/restore_database_details.rb +72 -53
- data/lib/oci/database/models/switchover_data_guard_association_details.rb +60 -38
- data/lib/oci/database/models/update_database_details.rb +97 -38
- data/lib/oci/database/models/update_db_home_details.rb +60 -38
- data/lib/oci/database/models/update_db_system_details.rb +112 -64
- data/lib/oci/dns/dns.rb +3 -0
- data/lib/oci/dns/dns_client.rb +489 -302
- data/lib/oci/dns/dns_client_composite_operations.rb +143 -0
- data/lib/oci/dns/models/create_zone_details.rb +84 -72
- data/lib/oci/dns/models/external_master.rb +67 -47
- data/lib/oci/dns/models/patch_domain_records_details.rb +60 -35
- data/lib/oci/dns/models/patch_rr_set_details.rb +60 -35
- data/lib/oci/dns/models/patch_zone_records_details.rb +60 -35
- data/lib/oci/dns/models/record.rb +92 -86
- data/lib/oci/dns/models/record_collection.rb +59 -35
- data/lib/oci/dns/models/record_details.rb +92 -86
- data/lib/oci/dns/models/record_operation.rb +113 -110
- data/lib/oci/dns/models/rr_set.rb +59 -35
- data/lib/oci/dns/models/sort_order.rb +0 -2
- data/lib/oci/dns/models/tsig.rb +68 -48
- data/lib/oci/dns/models/update_domain_records_details.rb +60 -35
- data/lib/oci/dns/models/update_rr_set_details.rb +60 -35
- data/lib/oci/dns/models/update_zone_details.rb +60 -38
- data/lib/oci/dns/models/update_zone_records_details.rb +60 -35
- data/lib/oci/dns/models/zone.rb +133 -126
- data/lib/oci/dns/models/zone_summary.rb +108 -99
- data/lib/oci/email/email.rb +3 -0
- data/lib/oci/email/email_client.rb +223 -112
- data/lib/oci/email/email_client_composite_operations.rb +103 -0
- data/lib/oci/email/models/create_sender_details.rb +65 -47
- data/lib/oci/email/models/create_suppression_details.rb +66 -48
- data/lib/oci/email/models/sender.rb +97 -84
- data/lib/oci/email/models/sender_summary.rb +89 -70
- data/lib/oci/email/models/suppression.rb +90 -69
- data/lib/oci/email/models/suppression_summary.rb +90 -69
- data/lib/oci/errors.rb +16 -0
- data/lib/oci/file_storage/file_storage.rb +3 -0
- data/lib/oci/file_storage/file_storage_client.rb +587 -333
- data/lib/oci/file_storage/file_storage_client_composite_operations.rb +460 -0
- data/lib/oci/file_storage/models/create_export_details.rb +73 -56
- data/lib/oci/file_storage/models/create_file_system_details.rb +75 -60
- data/lib/oci/file_storage/models/create_mount_target_details.rb +96 -93
- data/lib/oci/file_storage/models/create_snapshot_details.rb +68 -47
- data/lib/oci/file_storage/models/export.rb +102 -89
- data/lib/oci/file_storage/models/export_set.rb +121 -122
- data/lib/oci/file_storage/models/export_set_summary.rb +109 -102
- data/lib/oci/file_storage/models/export_summary.rb +102 -89
- data/lib/oci/file_storage/models/file_system.rb +110 -103
- data/lib/oci/file_storage/models/file_system_summary.rb +110 -103
- data/lib/oci/file_storage/models/mount_target.rb +126 -131
- data/lib/oci/file_storage/models/mount_target_summary.rb +121 -122
- data/lib/oci/file_storage/models/snapshot.rb +98 -81
- data/lib/oci/file_storage/models/snapshot_summary.rb +98 -81
- data/lib/oci/file_storage/models/update_export_set_details.rb +75 -60
- data/lib/oci/file_storage/models/update_file_system_details.rb +63 -40
- data/lib/oci/file_storage/models/update_mount_target_details.rb +63 -40
- data/lib/oci/identity/identity.rb +3 -0
- data/lib/oci/identity/identity_client.rb +1671 -872
- data/lib/oci/identity/identity_client_composite_operations.rb +818 -0
- data/lib/oci/identity/models/add_user_to_group_details.rb +66 -47
- data/lib/oci/identity/models/api_key.rb +108 -101
- data/lib/oci/identity/models/availability_domain.rb +64 -44
- data/lib/oci/identity/models/compartment.rb +118 -115
- data/lib/oci/identity/models/create_api_key_details.rb +60 -35
- data/lib/oci/identity/models/create_compartment_details.rb +83 -72
- data/lib/oci/identity/models/create_customer_secret_key_details.rb +62 -39
- data/lib/oci/identity/models/create_dynamic_group_details.rb +75 -61
- data/lib/oci/identity/models/create_group_details.rb +82 -71
- data/lib/oci/identity/models/create_identity_provider_details.rb +115 -110
- data/lib/oci/identity/models/create_idp_group_mapping_details.rb +67 -48
- data/lib/oci/identity/models/create_policy_details.rb +94 -89
- data/lib/oci/identity/models/create_region_subscription_details.rb +64 -41
- data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +88 -67
- data/lib/oci/identity/models/create_smtp_credential_details.rb +61 -36
- data/lib/oci/identity/models/create_swift_password_details.rb +61 -36
- data/lib/oci/identity/models/create_tag_details.rb +77 -62
- data/lib/oci/identity/models/create_tag_namespace_details.rb +82 -71
- data/lib/oci/identity/models/create_user_details.rb +82 -71
- data/lib/oci/identity/models/customer_secret_key.rb +114 -109
- data/lib/oci/identity/models/customer_secret_key_summary.rb +109 -102
- data/lib/oci/identity/models/dynamic_group.rb +112 -105
- data/lib/oci/identity/models/group.rb +118 -115
- data/lib/oci/identity/models/identity_provider.rb +135 -138
- data/lib/oci/identity/models/idp_group_mapping.rb +112 -109
- data/lib/oci/identity/models/policy.rb +129 -132
- data/lib/oci/identity/models/region.rb +67 -45
- data/lib/oci/identity/models/region_subscription.rb +90 -71
- data/lib/oci/identity/models/saml2_identity_provider.rb +106 -92
- data/lib/oci/identity/models/smtp_credential.rb +118 -113
- data/lib/oci/identity/models/smtp_credential_summary.rb +113 -106
- data/lib/oci/identity/models/swift_password.rb +113 -106
- data/lib/oci/identity/models/tag.rb +108 -116
- data/lib/oci/identity/models/tag_namespace.rb +97 -97
- data/lib/oci/identity/models/tag_namespace_summary.rb +97 -97
- data/lib/oci/identity/models/tag_summary.rb +97 -97
- data/lib/oci/identity/models/tenancy.rb +86 -78
- data/lib/oci/identity/models/ui_password.rb +97 -82
- data/lib/oci/identity/models/update_compartment_details.rb +77 -62
- data/lib/oci/identity/models/update_customer_secret_key_details.rb +61 -38
- data/lib/oci/identity/models/update_dynamic_group_details.rb +65 -45
- data/lib/oci/identity/models/update_group_details.rb +72 -55
- data/lib/oci/identity/models/update_identity_provider_details.rb +89 -74
- data/lib/oci/identity/models/update_idp_group_mapping_details.rb +66 -47
- data/lib/oci/identity/models/update_policy_details.rb +83 -72
- data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +79 -58
- data/lib/oci/identity/models/update_smtp_credential_details.rb +60 -35
- data/lib/oci/identity/models/update_state_details.rb +61 -36
- data/lib/oci/identity/models/update_swift_password_details.rb +60 -35
- data/lib/oci/identity/models/update_tag_details.rb +78 -65
- data/lib/oci/identity/models/update_tag_namespace_details.rb +78 -65
- data/lib/oci/identity/models/update_user_details.rb +72 -55
- data/lib/oci/identity/models/user.rb +120 -117
- data/lib/oci/identity/models/user_group_membership.rb +107 -100
- data/lib/oci/load_balancer/load_balancer.rb +3 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +918 -500
- data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +795 -0
- data/lib/oci/load_balancer/models/backend.rb +101 -94
- data/lib/oci/load_balancer/models/backend_details.rb +95 -86
- data/lib/oci/load_balancer/models/backend_health.rb +84 -57
- data/lib/oci/load_balancer/models/backend_set.rb +87 -79
- data/lib/oci/load_balancer/models/backend_set_details.rb +80 -70
- data/lib/oci/load_balancer/models/backend_set_health.rb +106 -91
- data/lib/oci/load_balancer/models/certificate.rb +78 -64
- data/lib/oci/load_balancer/models/certificate_details.rb +92 -84
- data/lib/oci/load_balancer/models/connection_configuration.rb +73 -51
- data/lib/oci/load_balancer/models/create_backend_details.rb +95 -86
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +87 -79
- data/lib/oci/load_balancer/models/create_certificate_details.rb +92 -84
- data/lib/oci/load_balancer/models/create_listener_details.rb +97 -93
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +109 -117
- data/lib/oci/load_balancer/models/create_path_route_set_details.rb +66 -46
- data/lib/oci/load_balancer/models/health_check_result.rb +98 -79
- data/lib/oci/load_balancer/models/health_checker.rb +108 -108
- data/lib/oci/load_balancer/models/health_checker_details.rb +108 -108
- data/lib/oci/load_balancer/models/ip_address.rb +70 -52
- data/lib/oci/load_balancer/models/listener.rb +97 -93
- data/lib/oci/load_balancer/models/listener_details.rb +91 -85
- data/lib/oci/load_balancer/models/load_balancer.rb +144 -157
- data/lib/oci/load_balancer/models/load_balancer_health.rb +110 -95
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +88 -61
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +59 -35
- data/lib/oci/load_balancer/models/load_balancer_protocol.rb +59 -35
- data/lib/oci/load_balancer/models/load_balancer_shape.rb +59 -35
- data/lib/oci/load_balancer/models/path_match_type.rb +80 -51
- data/lib/oci/load_balancer/models/path_route.rb +76 -60
- data/lib/oci/load_balancer/models/path_route_set.rb +66 -46
- data/lib/oci/load_balancer/models/path_route_set_details.rb +60 -38
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +71 -55
- data/lib/oci/load_balancer/models/ssl_configuration.rb +78 -66
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +78 -66
- data/lib/oci/load_balancer/models/update_backend_details.rb +82 -67
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +80 -70
- data/lib/oci/load_balancer/models/update_health_checker_details.rb +108 -108
- data/lib/oci/load_balancer/models/update_listener_details.rb +91 -85
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +62 -40
- data/lib/oci/load_balancer/models/update_path_route_set_details.rb +60 -38
- data/lib/oci/load_balancer/models/work_request.rb +115 -108
- data/lib/oci/load_balancer/models/work_request_error.rb +76 -49
- data/lib/oci/object_storage/models/bucket.rb +136 -133
- data/lib/oci/object_storage/models/bucket_summary.rb +95 -95
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +66 -48
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +64 -44
- data/lib/oci/object_storage/models/create_bucket_details.rb +113 -111
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +80 -70
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +87 -74
- data/lib/oci/object_storage/models/list_objects.rb +71 -53
- data/lib/oci/object_storage/models/multipart_upload.rb +77 -65
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +72 -56
- data/lib/oci/object_storage/models/namespace_metadata.rb +69 -53
- data/lib/oci/object_storage/models/object_summary.rb +73 -57
- data/lib/oci/object_storage/models/preauthenticated_request.rb +105 -96
- data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +99 -86
- data/lib/oci/object_storage/models/rename_object_details.rb +80 -74
- data/lib/oci/object_storage/models/restore_objects_details.rb +66 -45
- data/lib/oci/object_storage/models/update_bucket_details.rb +101 -97
- data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +65 -47
- data/lib/oci/object_storage/object_storage.rb +2 -0
- data/lib/oci/object_storage/object_storage_client.rb +737 -435
- data/lib/oci/object_storage/object_storage_client_composite_operations.rb +24 -0
- data/lib/oci/signer.rb +20 -7
- data/lib/oci/version.rb +1 -1
- metadata +13 -2
@@ -2,12 +2,35 @@
|
|
2
2
|
|
3
3
|
require 'date'
|
4
4
|
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
5
6
|
module OCI
|
6
|
-
|
7
|
+
# Configuration model.
|
8
|
+
class Audit::Models::Configuration # rubocop:disable Metrics/LineLength
|
7
9
|
# The retention period days
|
8
10
|
# @return [Integer]
|
9
11
|
attr_accessor :retention_period_days
|
10
12
|
|
13
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
14
|
+
def self.attribute_map
|
15
|
+
{
|
16
|
+
# rubocop:disable Style/SymbolLiteral
|
17
|
+
'retention_period_days': :'retentionPeriodDays'
|
18
|
+
# rubocop:enable Style/SymbolLiteral
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# Attribute type mapping.
|
23
|
+
def self.swagger_types
|
24
|
+
{
|
25
|
+
# rubocop:disable Style/SymbolLiteral
|
26
|
+
'retention_period_days': :'Integer'
|
27
|
+
# rubocop:enable Style/SymbolLiteral
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
32
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
33
|
+
|
11
34
|
|
12
35
|
# Initializes the object
|
13
36
|
# @param [Hash] attributes Model attributes in the form of hash
|
@@ -16,39 +39,47 @@ module OCI
|
|
16
39
|
return unless attributes.is_a?(Hash)
|
17
40
|
|
18
41
|
# convert string to symbol for hash key
|
19
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
20
43
|
|
21
|
-
if attributes[:'retentionPeriodDays']
|
22
|
-
self.retention_period_days = attributes[:'retentionPeriodDays']
|
23
|
-
end
|
44
|
+
self.retention_period_days = attributes[:'retentionPeriodDays'] if attributes[:'retentionPeriodDays']
|
24
45
|
|
25
46
|
raise 'You cannot provide both :retentionPeriodDays and :retention_period_days' if attributes.key?(:'retentionPeriodDays') && attributes.key?(:'retention_period_days')
|
26
47
|
|
27
|
-
if attributes[:'retention_period_days']
|
28
|
-
self.retention_period_days = attributes[:'retention_period_days']
|
29
|
-
end
|
30
|
-
|
48
|
+
self.retention_period_days = attributes[:'retention_period_days'] if attributes[:'retention_period_days']
|
31
49
|
end
|
50
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
51
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
52
|
+
|
53
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
54
|
+
|
32
55
|
|
33
56
|
# Checks equality by comparing each attribute.
|
34
|
-
# @param [Object]
|
35
|
-
def ==(
|
36
|
-
return true if
|
37
|
-
self.class ==
|
38
|
-
|
57
|
+
# @param [Object] other the other object to be compared
|
58
|
+
def ==(other)
|
59
|
+
return true if equal?(other)
|
60
|
+
self.class == other.class &&
|
61
|
+
retention_period_days == other.retention_period_days
|
39
62
|
end
|
63
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
40
64
|
|
41
65
|
# @see the `==` method
|
42
|
-
# @param [Object]
|
43
|
-
def eql?(
|
44
|
-
self ==
|
66
|
+
# @param [Object] other the other object to be compared
|
67
|
+
def eql?(other)
|
68
|
+
self == other
|
45
69
|
end
|
46
70
|
|
71
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
72
|
+
|
73
|
+
|
47
74
|
# Calculates hash code according to all attributes.
|
48
75
|
# @return [Fixnum] Hash code
|
49
76
|
def hash
|
50
77
|
[retention_period_days].hash
|
51
78
|
end
|
79
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
80
|
+
|
81
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
82
|
+
|
52
83
|
|
53
84
|
# Builds the object from hash
|
54
85
|
# @param [Hash] attributes Model attributes in the form of hash
|
@@ -60,15 +91,22 @@ module OCI
|
|
60
91
|
# check to ensure the input is an array given that the the attribute
|
61
92
|
# is documented as an array but the input is not
|
62
93
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
63
|
-
|
94
|
+
public_method("#{key}=").call(
|
95
|
+
attributes[self.class.attribute_map[key]]
|
96
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
97
|
+
)
|
64
98
|
end
|
65
99
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
66
|
-
|
67
|
-
|
100
|
+
public_method("#{key}=").call(
|
101
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
102
|
+
)
|
103
|
+
end
|
104
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
68
105
|
end
|
69
106
|
|
70
107
|
self
|
71
108
|
end
|
109
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
72
110
|
|
73
111
|
# Returns the string representation of the object
|
74
112
|
# @return [String] String presentation of the object
|
@@ -92,11 +130,11 @@ module OCI
|
|
92
130
|
|
93
131
|
# Outputs non-array value in the form of hash
|
94
132
|
# For object, use to_hash. Otherwise, just return the value
|
95
|
-
# @param [Object] value Any valid value
|
133
|
+
# @param [Object] value Any valid value
|
96
134
|
# @return [Hash] Returns the value in the form of hash
|
97
135
|
def _to_hash(value)
|
98
136
|
if value.is_a?(Array)
|
99
|
-
value.compact.map{ |v| _to_hash(v) }
|
137
|
+
value.compact.map { |v| _to_hash(v) }
|
100
138
|
elsif value.is_a?(Hash)
|
101
139
|
{}.tap do |hash|
|
102
140
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -107,21 +145,6 @@ module OCI
|
|
107
145
|
value
|
108
146
|
end
|
109
147
|
end
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
114
|
-
def self.attribute_map
|
115
|
-
{
|
116
|
-
:'retention_period_days' => :'retentionPeriodDays'
|
117
|
-
}
|
118
|
-
end
|
119
|
-
|
120
|
-
# Attribute type mapping.
|
121
|
-
def self.swagger_types
|
122
|
-
{
|
123
|
-
:'retention_period_days' => :'Integer'
|
124
|
-
}
|
125
|
-
end
|
126
148
|
end
|
127
149
|
end
|
150
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
@@ -2,12 +2,35 @@
|
|
2
2
|
|
3
3
|
require 'date'
|
4
4
|
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
5
6
|
module OCI
|
6
|
-
|
7
|
+
# UpdateConfigurationDetails model.
|
8
|
+
class Audit::Models::UpdateConfigurationDetails # rubocop:disable Metrics/LineLength
|
7
9
|
# The retention period days
|
8
10
|
# @return [Integer]
|
9
11
|
attr_accessor :retention_period_days
|
10
12
|
|
13
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
14
|
+
def self.attribute_map
|
15
|
+
{
|
16
|
+
# rubocop:disable Style/SymbolLiteral
|
17
|
+
'retention_period_days': :'retentionPeriodDays'
|
18
|
+
# rubocop:enable Style/SymbolLiteral
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# Attribute type mapping.
|
23
|
+
def self.swagger_types
|
24
|
+
{
|
25
|
+
# rubocop:disable Style/SymbolLiteral
|
26
|
+
'retention_period_days': :'Integer'
|
27
|
+
# rubocop:enable Style/SymbolLiteral
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
32
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
33
|
+
|
11
34
|
|
12
35
|
# Initializes the object
|
13
36
|
# @param [Hash] attributes Model attributes in the form of hash
|
@@ -16,39 +39,47 @@ module OCI
|
|
16
39
|
return unless attributes.is_a?(Hash)
|
17
40
|
|
18
41
|
# convert string to symbol for hash key
|
19
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
20
43
|
|
21
|
-
if attributes[:'retentionPeriodDays']
|
22
|
-
self.retention_period_days = attributes[:'retentionPeriodDays']
|
23
|
-
end
|
44
|
+
self.retention_period_days = attributes[:'retentionPeriodDays'] if attributes[:'retentionPeriodDays']
|
24
45
|
|
25
46
|
raise 'You cannot provide both :retentionPeriodDays and :retention_period_days' if attributes.key?(:'retentionPeriodDays') && attributes.key?(:'retention_period_days')
|
26
47
|
|
27
|
-
if attributes[:'retention_period_days']
|
28
|
-
self.retention_period_days = attributes[:'retention_period_days']
|
29
|
-
end
|
30
|
-
|
48
|
+
self.retention_period_days = attributes[:'retention_period_days'] if attributes[:'retention_period_days']
|
31
49
|
end
|
50
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
51
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
52
|
+
|
53
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
54
|
+
|
32
55
|
|
33
56
|
# Checks equality by comparing each attribute.
|
34
|
-
# @param [Object]
|
35
|
-
def ==(
|
36
|
-
return true if
|
37
|
-
self.class ==
|
38
|
-
|
57
|
+
# @param [Object] other the other object to be compared
|
58
|
+
def ==(other)
|
59
|
+
return true if equal?(other)
|
60
|
+
self.class == other.class &&
|
61
|
+
retention_period_days == other.retention_period_days
|
39
62
|
end
|
63
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
40
64
|
|
41
65
|
# @see the `==` method
|
42
|
-
# @param [Object]
|
43
|
-
def eql?(
|
44
|
-
self ==
|
66
|
+
# @param [Object] other the other object to be compared
|
67
|
+
def eql?(other)
|
68
|
+
self == other
|
45
69
|
end
|
46
70
|
|
71
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
72
|
+
|
73
|
+
|
47
74
|
# Calculates hash code according to all attributes.
|
48
75
|
# @return [Fixnum] Hash code
|
49
76
|
def hash
|
50
77
|
[retention_period_days].hash
|
51
78
|
end
|
79
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
80
|
+
|
81
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
82
|
+
|
52
83
|
|
53
84
|
# Builds the object from hash
|
54
85
|
# @param [Hash] attributes Model attributes in the form of hash
|
@@ -60,15 +91,22 @@ module OCI
|
|
60
91
|
# check to ensure the input is an array given that the the attribute
|
61
92
|
# is documented as an array but the input is not
|
62
93
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
63
|
-
|
94
|
+
public_method("#{key}=").call(
|
95
|
+
attributes[self.class.attribute_map[key]]
|
96
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
97
|
+
)
|
64
98
|
end
|
65
99
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
66
|
-
|
67
|
-
|
100
|
+
public_method("#{key}=").call(
|
101
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
102
|
+
)
|
103
|
+
end
|
104
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
68
105
|
end
|
69
106
|
|
70
107
|
self
|
71
108
|
end
|
109
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
72
110
|
|
73
111
|
# Returns the string representation of the object
|
74
112
|
# @return [String] String presentation of the object
|
@@ -92,11 +130,11 @@ module OCI
|
|
92
130
|
|
93
131
|
# Outputs non-array value in the form of hash
|
94
132
|
# For object, use to_hash. Otherwise, just return the value
|
95
|
-
# @param [Object] value Any valid value
|
133
|
+
# @param [Object] value Any valid value
|
96
134
|
# @return [Hash] Returns the value in the form of hash
|
97
135
|
def _to_hash(value)
|
98
136
|
if value.is_a?(Array)
|
99
|
-
value.compact.map{ |v| _to_hash(v) }
|
137
|
+
value.compact.map { |v| _to_hash(v) }
|
100
138
|
elsif value.is_a?(Hash)
|
101
139
|
{}.tap do |hash|
|
102
140
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -107,21 +145,6 @@ module OCI
|
|
107
145
|
value
|
108
146
|
end
|
109
147
|
end
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
114
|
-
def self.attribute_map
|
115
|
-
{
|
116
|
-
:'retention_period_days' => :'retentionPeriodDays'
|
117
|
-
}
|
118
|
-
end
|
119
|
-
|
120
|
-
# Attribute type mapping.
|
121
|
-
def self.swagger_types
|
122
|
-
{
|
123
|
-
:'retention_period_days' => :'Integer'
|
124
|
-
}
|
125
|
-
end
|
126
148
|
end
|
127
149
|
end
|
150
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
data/lib/oci/auth/util.rb
CHANGED
data/lib/oci/base_signer.rb
CHANGED
@@ -64,52 +64,47 @@ module OCI
|
|
64
64
|
# @param [String] uri The URI, such as 'https://iaas.us-phoenix-1.oraclecloud.com/20160918/volumeAttachments/'
|
65
65
|
# @param [Hash] headers A hash of headers
|
66
66
|
# @param [String] body The request body
|
67
|
-
|
67
|
+
# @param [String] operation_signing_strategy the signing strategy for the operation. Default is :standard
|
68
|
+
def sign(method, uri, headers, body, operation_signing_strategy = :standard)
|
68
69
|
method = method.to_sym.downcase
|
69
70
|
uri = URI(uri)
|
70
71
|
path = uri.query.nil? ? uri.path : "#{uri.path}?#{uri.query}"
|
71
|
-
inject_missing_headers(method, headers, body, uri)
|
72
|
-
signature = compute_signature(headers, method, path)
|
73
|
-
inject_authorization_header(headers, method, signature) unless signature.nil?
|
72
|
+
inject_missing_headers(method, headers, body, uri, operation_signing_strategy)
|
73
|
+
signature = compute_signature(headers, method, path, operation_signing_strategy)
|
74
|
+
inject_authorization_header(headers, method, signature, operation_signing_strategy) unless signature.nil?
|
74
75
|
end
|
75
76
|
|
76
77
|
private
|
77
78
|
|
78
|
-
def inject_missing_headers(method, headers, body, uri)
|
79
|
+
def inject_missing_headers(method, headers, body, uri, operation_signing_strategy)
|
79
80
|
headers['date'] ||= Time.now.utc.httpdate
|
80
81
|
headers['accept'] ||= '*/*'
|
81
82
|
headers['host'] ||= uri.host if @headers_to_sign_all_requests.include?(:host)
|
82
83
|
|
83
|
-
# For object storage service's put method, we don't need to set content type
|
84
|
-
if method != :put || @signing_strategy != OBJECT_STORAGE
|
85
|
-
headers['content-type'] ||= 'application/json'
|
86
|
-
else
|
87
|
-
headers[:'Content-Type'] ||= 'application/octet-stream'
|
88
|
-
end
|
89
|
-
|
90
84
|
return unless %i[put post patch].include?(method)
|
91
85
|
|
92
86
|
body ||= ''
|
93
87
|
|
94
88
|
# For object storage service's put method, we don't need to set content length and x-content sha256
|
95
|
-
if
|
96
|
-
headers['content-length'] ||= body.
|
97
|
-
headers['x-content-sha256'] ||= OpenSSL::Digest::SHA256.new.update(body).base64digest
|
98
|
-
else
|
99
|
-
headers['Content-Length'] ||= if body.respond_to?(:read) && body.respond_to?(:write)
|
89
|
+
if operation_signing_strategy == :exclude_body
|
90
|
+
headers['content-length'] ||= if body.respond_to?(:read) && body.respond_to?(:write)
|
100
91
|
body.respond_to?('size') ? body.size : body.stat.size
|
101
92
|
else
|
102
93
|
body.length.to_s
|
103
94
|
end
|
95
|
+
else
|
96
|
+
headers['content-length'] ||= body.length.to_s
|
97
|
+
headers['x-content-sha256'] ||= OpenSSL::Digest::SHA256.new.update(body).base64digest
|
104
98
|
end
|
105
99
|
end
|
106
100
|
|
107
|
-
def
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
101
|
+
def fetch_header_mapping(method, operation_signing_strategy)
|
102
|
+
return @headers_to_sign_all_requests if operation_signing_strategy == :exclude_body
|
103
|
+
@operation_header_mapping[method]
|
104
|
+
end
|
105
|
+
|
106
|
+
def inject_authorization_header(headers, method, signature, operation_signing_strategy)
|
107
|
+
header_mapping = fetch_header_mapping(method, operation_signing_strategy)
|
113
108
|
|
114
109
|
signed_headers = header_mapping.map(&:to_s).join(' ')
|
115
110
|
headers['authorization'] = [
|
@@ -121,12 +116,8 @@ module OCI
|
|
121
116
|
].join(',')
|
122
117
|
end
|
123
118
|
|
124
|
-
def compute_signature(headers, method, path)
|
125
|
-
header_mapping =
|
126
|
-
@headers_to_sign_all_requests
|
127
|
-
else
|
128
|
-
@operation_header_mapping[method]
|
129
|
-
end
|
119
|
+
def compute_signature(headers, method, path, operation_signing_strategy)
|
120
|
+
header_mapping = fetch_header_mapping(method, operation_signing_strategy)
|
130
121
|
|
131
122
|
return if header_mapping.empty?
|
132
123
|
signing_string = header_mapping.map do |header|
|
data/lib/oci/config.rb
CHANGED
@@ -62,9 +62,7 @@ module OCI
|
|
62
62
|
# Defines the logger used for debugging.
|
63
63
|
# For example, log to STDOUT by setting this to Logger.new(STDOUT).
|
64
64
|
# This property cannot be set from a config file.
|
65
|
-
|
66
|
-
# @return [Logger]
|
67
|
-
attr_accessor :logger
|
65
|
+
attr_writer :logger
|
68
66
|
|
69
67
|
# Whether to log detailed request and response
|
70
68
|
# data. This will always write to STDOUT.
|
@@ -98,6 +96,14 @@ module OCI
|
|
98
96
|
@key_content = nil
|
99
97
|
end
|
100
98
|
|
99
|
+
# Gets the logger used for debugging. If nil, then {OCI#logger} will be returned instead.
|
100
|
+
#
|
101
|
+
# @return [Logger]
|
102
|
+
def logger
|
103
|
+
return OCI.logger if @logger.nil?
|
104
|
+
@logger
|
105
|
+
end
|
106
|
+
|
101
107
|
def validate
|
102
108
|
%w[user fingerprint tenancy region].each do |name|
|
103
109
|
if !instance_variable_defined?("@#{name}") || instance_variable_get("@#{name}").nil?
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'uri'
|
4
|
+
require 'logger'
|
5
5
|
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
6
7
|
module OCI
|
7
|
-
|
8
|
+
# APIs for Networking Service, Compute Service, and Block Volume Service.
|
8
9
|
class Core::BlockstorageClient
|
9
|
-
|
10
10
|
# Client used to make HTTP requests.
|
11
11
|
# @return [OCI::ApiClient]
|
12
12
|
attr_reader :api_client
|
@@ -17,7 +17,10 @@ module OCI
|
|
17
17
|
|
18
18
|
# The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}.
|
19
19
|
# @return [String]
|
20
|
-
|
20
|
+
attr_reader :region
|
21
|
+
|
22
|
+
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines
|
23
|
+
|
21
24
|
|
22
25
|
# Creates a new BlockstorageClient.
|
23
26
|
# If a config is not specified, then the global OCI.config will be used.
|
@@ -46,15 +49,23 @@ module OCI
|
|
46
49
|
config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
47
50
|
|
48
51
|
if signer.nil?
|
49
|
-
signer = Signer.new(
|
52
|
+
signer = OCI::Signer.new(
|
53
|
+
config.user,
|
54
|
+
config.fingerprint,
|
55
|
+
config.tenancy,
|
56
|
+
config.key_file,
|
57
|
+
pass_phrase: config.pass_phrase,
|
58
|
+
private_key_content: config.key_content
|
59
|
+
)
|
50
60
|
end
|
51
61
|
|
52
|
-
@api_client = ApiClient.new(config, signer, proxy_settings: proxy_settings)
|
62
|
+
@api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
|
53
63
|
|
54
64
|
region ||= config.region
|
55
65
|
region ||= signer.region if signer.respond_to?(:region)
|
56
66
|
self.region = region
|
57
67
|
end
|
68
|
+
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines
|
58
69
|
|
59
70
|
# Set the region that will be used to determine the service endpoint.
|
60
71
|
# This will usually correspond to a value in {OCI::Regions::REGION_ENUM},
|
@@ -73,37 +84,42 @@ module OCI
|
|
73
84
|
@api_client.config.logger
|
74
85
|
end
|
75
86
|
|
87
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
88
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
89
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
90
|
+
|
76
91
|
|
77
92
|
# Creates a new volume in the specified compartment. Volumes can be created in sizes ranging from
|
78
93
|
# 50 GB (51200 MB) to 16 TB (16777216 MB), in 1 GB (1024 MB) increments. By default, volumes are 1 TB (1048576 MB).
|
79
94
|
# For general information about block volumes, see
|
80
95
|
# [Overview of Block Volume Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/overview.htm).
|
81
|
-
#
|
96
|
+
#
|
82
97
|
# A volume and instance can be in separate compartments but must be in the same Availability Domain.
|
83
98
|
# For information about access control and compartments, see
|
84
99
|
# [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about
|
85
100
|
# Availability Domains, see [Regions and Availability Domains](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm).
|
86
101
|
# To get a list of Availability Domains, use the `ListAvailabilityDomains` operation
|
87
102
|
# in the Identity and Access Management Service API.
|
88
|
-
#
|
103
|
+
#
|
89
104
|
# You may optionally specify a *display name* for the volume, which is simply a friendly name or
|
90
105
|
# description. It does not have to be unique, and you can change it. Avoid entering confidential information.
|
91
|
-
#
|
92
|
-
# @param [CreateVolumeDetails] create_volume_details Request to create a new volume.
|
106
|
+
#
|
107
|
+
# @param [OCI::Core::Models::CreateVolumeDetails] create_volume_details Request to create a new volume.
|
93
108
|
# @param [Hash] opts the optional parameters
|
94
109
|
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
95
110
|
# server error without risk of executing that same action again. Retry tokens expire after 24
|
96
111
|
# hours, but can be invalidated before then due to conflicting operations (for example, if a resource
|
97
112
|
# has been deleted and purged from the system, then a retry of the original creation request
|
98
113
|
# may be rejected).
|
99
|
-
#
|
100
|
-
# @return [Response] A Response object with data of type OCI::Core::Models::Volume
|
114
|
+
#
|
115
|
+
# @return [Response] A Response object with data of type {OCI::Core::Models::Volume Volume}
|
101
116
|
def create_volume(create_volume_details, opts = {})
|
102
|
-
logger.debug
|
117
|
+
logger.debug 'Calling operation BlockstorageClient#create_volume.' if logger
|
103
118
|
|
104
119
|
raise "Missing the required parameter 'create_volume_details' when calling create_volume." if create_volume_details.nil?
|
105
120
|
|
106
|
-
path =
|
121
|
+
path = '/volumes'
|
122
|
+
operation_signing_strategy = :standard
|
107
123
|
|
108
124
|
# Query Params
|
109
125
|
query_params = {}
|
@@ -112,42 +128,53 @@ module OCI
|
|
112
128
|
header_params = {}
|
113
129
|
header_params['accept'] = 'application/json'
|
114
130
|
header_params['content-type'] = 'application/json'
|
115
|
-
header_params[:'opc-retry-token'] = opts[:
|
131
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
116
132
|
|
117
133
|
post_body = @api_client.object_to_http_body(create_volume_details)
|
118
134
|
|
119
|
-
|
135
|
+
@api_client.call_api(
|
120
136
|
:POST,
|
121
137
|
path,
|
122
138
|
endpoint,
|
123
|
-
:
|
124
|
-
:
|
125
|
-
:
|
126
|
-
:
|
139
|
+
header_params: header_params,
|
140
|
+
query_params: query_params,
|
141
|
+
operation_signing_strategy: operation_signing_strategy,
|
142
|
+
body: post_body,
|
143
|
+
return_type: 'OCI::Core::Models::Volume'
|
144
|
+
)
|
127
145
|
end
|
146
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
147
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
148
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
149
|
+
|
150
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
151
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
152
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
153
|
+
|
128
154
|
|
129
155
|
# Creates a new backup of the specified volume. For general information about volume backups,
|
130
156
|
# see [Overview of Block Volume Service Backups](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/blockvolumebackups.htm)
|
131
|
-
#
|
157
|
+
#
|
132
158
|
# When the request is received, the backup object is in a REQUEST_RECEIVED state.
|
133
159
|
# When the data is imaged, it goes into a CREATING state.
|
134
160
|
# After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state.
|
135
|
-
#
|
136
|
-
# @param [CreateVolumeBackupDetails] create_volume_backup_details Request to create a new backup of given volume.
|
161
|
+
#
|
162
|
+
# @param [OCI::Core::Models::CreateVolumeBackupDetails] create_volume_backup_details Request to create a new backup of given volume.
|
137
163
|
# @param [Hash] opts the optional parameters
|
138
164
|
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
139
165
|
# server error without risk of executing that same action again. Retry tokens expire after 24
|
140
166
|
# hours, but can be invalidated before then due to conflicting operations (for example, if a resource
|
141
167
|
# has been deleted and purged from the system, then a retry of the original creation request
|
142
168
|
# may be rejected).
|
143
|
-
#
|
144
|
-
# @return [Response] A Response object with data of type OCI::Core::Models::VolumeBackup
|
169
|
+
#
|
170
|
+
# @return [Response] A Response object with data of type {OCI::Core::Models::VolumeBackup VolumeBackup}
|
145
171
|
def create_volume_backup(create_volume_backup_details, opts = {})
|
146
|
-
logger.debug
|
172
|
+
logger.debug 'Calling operation BlockstorageClient#create_volume_backup.' if logger
|
147
173
|
|
148
174
|
raise "Missing the required parameter 'create_volume_backup_details' when calling create_volume_backup." if create_volume_backup_details.nil?
|
149
175
|
|
150
|
-
path =
|
176
|
+
path = '/volumeBackups'
|
177
|
+
operation_signing_strategy = :standard
|
151
178
|
|
152
179
|
# Query Params
|
153
180
|
query_params = {}
|
@@ -156,33 +183,45 @@ module OCI
|
|
156
183
|
header_params = {}
|
157
184
|
header_params['accept'] = 'application/json'
|
158
185
|
header_params['content-type'] = 'application/json'
|
159
|
-
header_params[:'opc-retry-token'] = opts[:
|
186
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
160
187
|
|
161
188
|
post_body = @api_client.object_to_http_body(create_volume_backup_details)
|
162
189
|
|
163
|
-
|
190
|
+
@api_client.call_api(
|
164
191
|
:POST,
|
165
192
|
path,
|
166
193
|
endpoint,
|
167
|
-
:
|
168
|
-
:
|
169
|
-
:
|
170
|
-
:
|
194
|
+
header_params: header_params,
|
195
|
+
query_params: query_params,
|
196
|
+
operation_signing_strategy: operation_signing_strategy,
|
197
|
+
body: post_body,
|
198
|
+
return_type: 'OCI::Core::Models::VolumeBackup'
|
199
|
+
)
|
171
200
|
end
|
201
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
202
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
203
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
204
|
+
|
205
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
206
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
207
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
208
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
209
|
+
|
172
210
|
|
173
211
|
# Assigns a policy to the specified asset, such as a volume. Note that a given asset can
|
174
212
|
# only have one policy assigned to it; if this method is called for an asset that previously
|
175
213
|
# has a different policy assigned, the prior assignment will be silently deleted.
|
176
|
-
#
|
177
|
-
# @param [CreateVolumeBackupPolicyAssignmentDetails] create_volume_backup_policy_assignment_details Request to assign a specified policy to a particular asset.
|
214
|
+
#
|
215
|
+
# @param [OCI::Core::Models::CreateVolumeBackupPolicyAssignmentDetails] create_volume_backup_policy_assignment_details Request to assign a specified policy to a particular asset.
|
178
216
|
# @param [Hash] opts the optional parameters
|
179
|
-
# @return [Response] A Response object with data of type OCI::Core::Models::VolumeBackupPolicyAssignment
|
217
|
+
# @return [Response] A Response object with data of type {OCI::Core::Models::VolumeBackupPolicyAssignment VolumeBackupPolicyAssignment}
|
180
218
|
def create_volume_backup_policy_assignment(create_volume_backup_policy_assignment_details, opts = {})
|
181
|
-
logger.debug
|
219
|
+
logger.debug 'Calling operation BlockstorageClient#create_volume_backup_policy_assignment.' if logger
|
182
220
|
|
183
221
|
raise "Missing the required parameter 'create_volume_backup_policy_assignment_details' when calling create_volume_backup_policy_assignment." if create_volume_backup_policy_assignment_details.nil?
|
184
222
|
|
185
|
-
path =
|
223
|
+
path = '/volumeBackupPolicyAssignments'
|
224
|
+
operation_signing_strategy = :standard
|
186
225
|
|
187
226
|
# Query Params
|
188
227
|
query_params = {}
|
@@ -194,35 +233,47 @@ module OCI
|
|
194
233
|
|
195
234
|
post_body = @api_client.object_to_http_body(create_volume_backup_policy_assignment_details)
|
196
235
|
|
197
|
-
|
236
|
+
@api_client.call_api(
|
198
237
|
:POST,
|
199
238
|
path,
|
200
239
|
endpoint,
|
201
|
-
:
|
202
|
-
:
|
203
|
-
:
|
204
|
-
:
|
240
|
+
header_params: header_params,
|
241
|
+
query_params: query_params,
|
242
|
+
operation_signing_strategy: operation_signing_strategy,
|
243
|
+
body: post_body,
|
244
|
+
return_type: 'OCI::Core::Models::VolumeBackupPolicyAssignment'
|
245
|
+
)
|
205
246
|
end
|
247
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
248
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
249
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
250
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
251
|
+
|
252
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
253
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
254
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
255
|
+
|
206
256
|
|
207
257
|
# Deletes the specified boot volume. The volume cannot have an active connection to an instance.
|
208
258
|
# To disconnect the boot volume from a connected instance, see
|
209
259
|
# [Disconnecting From a Boot Volume](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/deletingbootvolume.htm).
|
210
260
|
# **Warning:** All data on the boot volume will be permanently lost when the boot volume is deleted.
|
211
|
-
#
|
261
|
+
#
|
212
262
|
# @param [String] boot_volume_id The OCID of the boot volume.
|
213
263
|
# @param [Hash] opts the optional parameters
|
214
264
|
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
215
265
|
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
216
266
|
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
217
|
-
#
|
267
|
+
#
|
218
268
|
# @return [Response] A Response object with data of type nil
|
219
269
|
def delete_boot_volume(boot_volume_id, opts = {})
|
220
|
-
logger.debug
|
270
|
+
logger.debug 'Calling operation BlockstorageClient#delete_boot_volume.' if logger
|
221
271
|
|
222
272
|
raise "Missing the required parameter 'boot_volume_id' when calling delete_boot_volume." if boot_volume_id.nil?
|
223
|
-
raise "Parameter value for 'boot_volume_id' must not be blank" if OCI::Internal::Util
|
273
|
+
raise "Parameter value for 'boot_volume_id' must not be blank" if OCI::Internal::Util.blank_string?(boot_volume_id)
|
224
274
|
|
225
|
-
path =
|
275
|
+
path = '/bootVolumes/{bootVolumeId}'.sub('{bootVolumeId}', boot_volume_id.to_s)
|
276
|
+
operation_signing_strategy = :standard
|
226
277
|
|
227
278
|
# Query Params
|
228
279
|
query_params = {}
|
@@ -231,38 +282,49 @@ module OCI
|
|
231
282
|
header_params = {}
|
232
283
|
header_params['accept'] = 'application/json'
|
233
284
|
header_params['content-type'] = 'application/json'
|
234
|
-
header_params[:'if-match'] = opts[:
|
285
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
235
286
|
|
236
287
|
post_body = nil
|
237
288
|
|
238
|
-
|
289
|
+
@api_client.call_api(
|
239
290
|
:DELETE,
|
240
291
|
path,
|
241
292
|
endpoint,
|
242
|
-
:
|
243
|
-
:
|
244
|
-
:
|
293
|
+
header_params: header_params,
|
294
|
+
query_params: query_params,
|
295
|
+
operation_signing_strategy: operation_signing_strategy,
|
296
|
+
body: post_body
|
297
|
+
)
|
245
298
|
end
|
299
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
300
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
301
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
302
|
+
|
303
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
304
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
305
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
306
|
+
|
246
307
|
|
247
308
|
# Deletes the specified volume. The volume cannot have an active connection to an instance.
|
248
309
|
# To disconnect the volume from a connected instance, see
|
249
310
|
# [Disconnecting From a Volume](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/disconnectingfromavolume.htm).
|
250
311
|
# **Warning:** All data on the volume will be permanently lost when the volume is deleted.
|
251
|
-
#
|
312
|
+
#
|
252
313
|
# @param [String] volume_id The OCID of the volume.
|
253
314
|
# @param [Hash] opts the optional parameters
|
254
315
|
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
255
316
|
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
256
317
|
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
257
|
-
#
|
318
|
+
#
|
258
319
|
# @return [Response] A Response object with data of type nil
|
259
320
|
def delete_volume(volume_id, opts = {})
|
260
|
-
logger.debug
|
321
|
+
logger.debug 'Calling operation BlockstorageClient#delete_volume.' if logger
|
261
322
|
|
262
323
|
raise "Missing the required parameter 'volume_id' when calling delete_volume." if volume_id.nil?
|
263
|
-
raise "Parameter value for 'volume_id' must not be blank" if OCI::Internal::Util
|
324
|
+
raise "Parameter value for 'volume_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_id)
|
264
325
|
|
265
|
-
path =
|
326
|
+
path = '/volumes/{volumeId}'.sub('{volumeId}', volume_id.to_s)
|
327
|
+
operation_signing_strategy = :standard
|
266
328
|
|
267
329
|
# Query Params
|
268
330
|
query_params = {}
|
@@ -271,18 +333,28 @@ module OCI
|
|
271
333
|
header_params = {}
|
272
334
|
header_params['accept'] = 'application/json'
|
273
335
|
header_params['content-type'] = 'application/json'
|
274
|
-
header_params[:'if-match'] = opts[:
|
336
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
275
337
|
|
276
338
|
post_body = nil
|
277
339
|
|
278
|
-
|
340
|
+
@api_client.call_api(
|
279
341
|
:DELETE,
|
280
342
|
path,
|
281
343
|
endpoint,
|
282
|
-
:
|
283
|
-
:
|
284
|
-
:
|
344
|
+
header_params: header_params,
|
345
|
+
query_params: query_params,
|
346
|
+
operation_signing_strategy: operation_signing_strategy,
|
347
|
+
body: post_body
|
348
|
+
)
|
285
349
|
end
|
350
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
351
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
352
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
353
|
+
|
354
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
355
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
356
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
357
|
+
|
286
358
|
|
287
359
|
# Deletes a volume backup.
|
288
360
|
# @param [String] volume_backup_id The OCID of the volume backup.
|
@@ -290,15 +362,16 @@ module OCI
|
|
290
362
|
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
291
363
|
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
292
364
|
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
293
|
-
#
|
365
|
+
#
|
294
366
|
# @return [Response] A Response object with data of type nil
|
295
367
|
def delete_volume_backup(volume_backup_id, opts = {})
|
296
|
-
logger.debug
|
368
|
+
logger.debug 'Calling operation BlockstorageClient#delete_volume_backup.' if logger
|
297
369
|
|
298
370
|
raise "Missing the required parameter 'volume_backup_id' when calling delete_volume_backup." if volume_backup_id.nil?
|
299
|
-
raise "Parameter value for 'volume_backup_id' must not be blank" if OCI::Internal::Util
|
371
|
+
raise "Parameter value for 'volume_backup_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_backup_id)
|
300
372
|
|
301
|
-
path =
|
373
|
+
path = '/volumeBackups/{volumeBackupId}'.sub('{volumeBackupId}', volume_backup_id.to_s)
|
374
|
+
operation_signing_strategy = :standard
|
302
375
|
|
303
376
|
# Query Params
|
304
377
|
query_params = {}
|
@@ -307,18 +380,28 @@ module OCI
|
|
307
380
|
header_params = {}
|
308
381
|
header_params['accept'] = 'application/json'
|
309
382
|
header_params['content-type'] = 'application/json'
|
310
|
-
header_params[:'if-match'] = opts[:
|
383
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
311
384
|
|
312
385
|
post_body = nil
|
313
386
|
|
314
|
-
|
387
|
+
@api_client.call_api(
|
315
388
|
:DELETE,
|
316
389
|
path,
|
317
390
|
endpoint,
|
318
|
-
:
|
319
|
-
:
|
320
|
-
:
|
391
|
+
header_params: header_params,
|
392
|
+
query_params: query_params,
|
393
|
+
operation_signing_strategy: operation_signing_strategy,
|
394
|
+
body: post_body
|
395
|
+
)
|
321
396
|
end
|
397
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
398
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
399
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
400
|
+
|
401
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
402
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
403
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
404
|
+
|
322
405
|
|
323
406
|
# Deletes a volume backup policy assignment (i.e. unassigns the policy from an asset).
|
324
407
|
# @param [String] policy_assignment_id The OCID of the volume backup policy assignment.
|
@@ -326,15 +409,16 @@ module OCI
|
|
326
409
|
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
327
410
|
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
328
411
|
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
329
|
-
#
|
412
|
+
#
|
330
413
|
# @return [Response] A Response object with data of type nil
|
331
414
|
def delete_volume_backup_policy_assignment(policy_assignment_id, opts = {})
|
332
|
-
logger.debug
|
415
|
+
logger.debug 'Calling operation BlockstorageClient#delete_volume_backup_policy_assignment.' if logger
|
333
416
|
|
334
417
|
raise "Missing the required parameter 'policy_assignment_id' when calling delete_volume_backup_policy_assignment." if policy_assignment_id.nil?
|
335
|
-
raise "Parameter value for 'policy_assignment_id' must not be blank" if OCI::Internal::Util
|
418
|
+
raise "Parameter value for 'policy_assignment_id' must not be blank" if OCI::Internal::Util.blank_string?(policy_assignment_id)
|
336
419
|
|
337
|
-
path =
|
420
|
+
path = '/volumeBackupPolicyAssignments/{policyAssignmentId}'.sub('{policyAssignmentId}', policy_assignment_id.to_s)
|
421
|
+
operation_signing_strategy = :standard
|
338
422
|
|
339
423
|
# Query Params
|
340
424
|
query_params = {}
|
@@ -343,30 +427,42 @@ module OCI
|
|
343
427
|
header_params = {}
|
344
428
|
header_params['accept'] = 'application/json'
|
345
429
|
header_params['content-type'] = 'application/json'
|
346
|
-
header_params[:'if-match'] = opts[:
|
430
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
347
431
|
|
348
432
|
post_body = nil
|
349
433
|
|
350
|
-
|
434
|
+
@api_client.call_api(
|
351
435
|
:DELETE,
|
352
436
|
path,
|
353
437
|
endpoint,
|
354
|
-
:
|
355
|
-
:
|
356
|
-
:
|
438
|
+
header_params: header_params,
|
439
|
+
query_params: query_params,
|
440
|
+
operation_signing_strategy: operation_signing_strategy,
|
441
|
+
body: post_body
|
442
|
+
)
|
357
443
|
end
|
444
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
445
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
446
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
447
|
+
|
448
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
449
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
450
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
451
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
452
|
+
|
358
453
|
|
359
454
|
# Gets information for the specified boot volume.
|
360
455
|
# @param [String] boot_volume_id The OCID of the boot volume.
|
361
456
|
# @param [Hash] opts the optional parameters
|
362
|
-
# @return [Response] A Response object with data of type OCI::Core::Models::BootVolume
|
457
|
+
# @return [Response] A Response object with data of type {OCI::Core::Models::BootVolume BootVolume}
|
363
458
|
def get_boot_volume(boot_volume_id, opts = {})
|
364
|
-
logger.debug
|
459
|
+
logger.debug 'Calling operation BlockstorageClient#get_boot_volume.' if logger
|
365
460
|
|
366
461
|
raise "Missing the required parameter 'boot_volume_id' when calling get_boot_volume." if boot_volume_id.nil?
|
367
|
-
raise "Parameter value for 'boot_volume_id' must not be blank" if OCI::Internal::Util
|
462
|
+
raise "Parameter value for 'boot_volume_id' must not be blank" if OCI::Internal::Util.blank_string?(boot_volume_id)
|
368
463
|
|
369
|
-
path =
|
464
|
+
path = '/bootVolumes/{bootVolumeId}'.sub('{bootVolumeId}', boot_volume_id.to_s)
|
465
|
+
operation_signing_strategy = :standard
|
370
466
|
|
371
467
|
# Query Params
|
372
468
|
query_params = {}
|
@@ -378,27 +474,40 @@ module OCI
|
|
378
474
|
|
379
475
|
post_body = nil
|
380
476
|
|
381
|
-
|
477
|
+
@api_client.call_api(
|
382
478
|
:GET,
|
383
479
|
path,
|
384
480
|
endpoint,
|
385
|
-
:
|
386
|
-
:
|
387
|
-
:
|
388
|
-
:
|
481
|
+
header_params: header_params,
|
482
|
+
query_params: query_params,
|
483
|
+
operation_signing_strategy: operation_signing_strategy,
|
484
|
+
body: post_body,
|
485
|
+
return_type: 'OCI::Core::Models::BootVolume'
|
486
|
+
)
|
389
487
|
end
|
488
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
489
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
490
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
491
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
492
|
+
|
493
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
494
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
495
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
496
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
497
|
+
|
390
498
|
|
391
499
|
# Gets information for the specified volume.
|
392
500
|
# @param [String] volume_id The OCID of the volume.
|
393
501
|
# @param [Hash] opts the optional parameters
|
394
|
-
# @return [Response] A Response object with data of type OCI::Core::Models::Volume
|
502
|
+
# @return [Response] A Response object with data of type {OCI::Core::Models::Volume Volume}
|
395
503
|
def get_volume(volume_id, opts = {})
|
396
|
-
logger.debug
|
504
|
+
logger.debug 'Calling operation BlockstorageClient#get_volume.' if logger
|
397
505
|
|
398
506
|
raise "Missing the required parameter 'volume_id' when calling get_volume." if volume_id.nil?
|
399
|
-
raise "Parameter value for 'volume_id' must not be blank" if OCI::Internal::Util
|
507
|
+
raise "Parameter value for 'volume_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_id)
|
400
508
|
|
401
|
-
path =
|
509
|
+
path = '/volumes/{volumeId}'.sub('{volumeId}', volume_id.to_s)
|
510
|
+
operation_signing_strategy = :standard
|
402
511
|
|
403
512
|
# Query Params
|
404
513
|
query_params = {}
|
@@ -410,27 +519,40 @@ module OCI
|
|
410
519
|
|
411
520
|
post_body = nil
|
412
521
|
|
413
|
-
|
522
|
+
@api_client.call_api(
|
414
523
|
:GET,
|
415
524
|
path,
|
416
525
|
endpoint,
|
417
|
-
:
|
418
|
-
:
|
419
|
-
:
|
420
|
-
:
|
526
|
+
header_params: header_params,
|
527
|
+
query_params: query_params,
|
528
|
+
operation_signing_strategy: operation_signing_strategy,
|
529
|
+
body: post_body,
|
530
|
+
return_type: 'OCI::Core::Models::Volume'
|
531
|
+
)
|
421
532
|
end
|
533
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
534
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
535
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
536
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
537
|
+
|
538
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
539
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
540
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
541
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
542
|
+
|
422
543
|
|
423
544
|
# Gets information for the specified volume backup.
|
424
545
|
# @param [String] volume_backup_id The OCID of the volume backup.
|
425
546
|
# @param [Hash] opts the optional parameters
|
426
|
-
# @return [Response] A Response object with data of type OCI::Core::Models::VolumeBackup
|
547
|
+
# @return [Response] A Response object with data of type {OCI::Core::Models::VolumeBackup VolumeBackup}
|
427
548
|
def get_volume_backup(volume_backup_id, opts = {})
|
428
|
-
logger.debug
|
549
|
+
logger.debug 'Calling operation BlockstorageClient#get_volume_backup.' if logger
|
429
550
|
|
430
551
|
raise "Missing the required parameter 'volume_backup_id' when calling get_volume_backup." if volume_backup_id.nil?
|
431
|
-
raise "Parameter value for 'volume_backup_id' must not be blank" if OCI::Internal::Util
|
552
|
+
raise "Parameter value for 'volume_backup_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_backup_id)
|
432
553
|
|
433
|
-
path =
|
554
|
+
path = '/volumeBackups/{volumeBackupId}'.sub('{volumeBackupId}', volume_backup_id.to_s)
|
555
|
+
operation_signing_strategy = :standard
|
434
556
|
|
435
557
|
# Query Params
|
436
558
|
query_params = {}
|
@@ -442,27 +564,40 @@ module OCI
|
|
442
564
|
|
443
565
|
post_body = nil
|
444
566
|
|
445
|
-
|
567
|
+
@api_client.call_api(
|
446
568
|
:GET,
|
447
569
|
path,
|
448
570
|
endpoint,
|
449
|
-
:
|
450
|
-
:
|
451
|
-
:
|
452
|
-
:
|
571
|
+
header_params: header_params,
|
572
|
+
query_params: query_params,
|
573
|
+
operation_signing_strategy: operation_signing_strategy,
|
574
|
+
body: post_body,
|
575
|
+
return_type: 'OCI::Core::Models::VolumeBackup'
|
576
|
+
)
|
453
577
|
end
|
578
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
579
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
580
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
581
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
582
|
+
|
583
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
584
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
585
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
586
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
587
|
+
|
454
588
|
|
455
589
|
# Gets information for the specified volume backup policy.
|
456
590
|
# @param [String] policy_id The OCID of the volume backup policy.
|
457
591
|
# @param [Hash] opts the optional parameters
|
458
|
-
# @return [Response] A Response object with data of type OCI::Core::Models::VolumeBackupPolicy
|
592
|
+
# @return [Response] A Response object with data of type {OCI::Core::Models::VolumeBackupPolicy VolumeBackupPolicy}
|
459
593
|
def get_volume_backup_policy(policy_id, opts = {})
|
460
|
-
logger.debug
|
594
|
+
logger.debug 'Calling operation BlockstorageClient#get_volume_backup_policy.' if logger
|
461
595
|
|
462
596
|
raise "Missing the required parameter 'policy_id' when calling get_volume_backup_policy." if policy_id.nil?
|
463
|
-
raise "Parameter value for 'policy_id' must not be blank" if OCI::Internal::Util
|
597
|
+
raise "Parameter value for 'policy_id' must not be blank" if OCI::Internal::Util.blank_string?(policy_id)
|
464
598
|
|
465
|
-
path =
|
599
|
+
path = '/volumeBackupPolicies/{policyId}'.sub('{policyId}', policy_id.to_s)
|
600
|
+
operation_signing_strategy = :standard
|
466
601
|
|
467
602
|
# Query Params
|
468
603
|
query_params = {}
|
@@ -474,41 +609,53 @@ module OCI
|
|
474
609
|
|
475
610
|
post_body = nil
|
476
611
|
|
477
|
-
|
612
|
+
@api_client.call_api(
|
478
613
|
:GET,
|
479
614
|
path,
|
480
615
|
endpoint,
|
481
|
-
:
|
482
|
-
:
|
483
|
-
:
|
484
|
-
:
|
616
|
+
header_params: header_params,
|
617
|
+
query_params: query_params,
|
618
|
+
operation_signing_strategy: operation_signing_strategy,
|
619
|
+
body: post_body,
|
620
|
+
return_type: 'OCI::Core::Models::VolumeBackupPolicy'
|
621
|
+
)
|
485
622
|
end
|
623
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
624
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
625
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
626
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
627
|
+
|
628
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
629
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
630
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
631
|
+
|
486
632
|
|
487
633
|
# Gets the volume backup policy assignment for the specified asset. Note that the
|
488
634
|
# assetId query parameter is required, and that the returned list will contain at most
|
489
635
|
# one item (since any given asset can only have one policy assigned to it).
|
490
|
-
#
|
636
|
+
#
|
491
637
|
# @param [String] asset_id The OCID of an asset (e.g. a volume).
|
492
638
|
# @param [Hash] opts the optional parameters
|
493
639
|
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
494
|
-
#
|
640
|
+
#
|
495
641
|
# Example: `500`
|
496
|
-
#
|
642
|
+
#
|
497
643
|
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
498
|
-
#
|
499
|
-
# @return [Response] A Response object with data of type Array<OCI::Core::Models::VolumeBackupPolicyAssignment>
|
644
|
+
#
|
645
|
+
# @return [Response] A Response object with data of type Array<{OCI::Core::Models::VolumeBackupPolicyAssignment VolumeBackupPolicyAssignment}>
|
500
646
|
def get_volume_backup_policy_asset_assignment(asset_id, opts = {})
|
501
|
-
logger.debug
|
647
|
+
logger.debug 'Calling operation BlockstorageClient#get_volume_backup_policy_asset_assignment.' if logger
|
502
648
|
|
503
649
|
raise "Missing the required parameter 'asset_id' when calling get_volume_backup_policy_asset_assignment." if asset_id.nil?
|
504
650
|
|
505
|
-
path =
|
651
|
+
path = '/volumeBackupPolicyAssignments'
|
652
|
+
operation_signing_strategy = :standard
|
506
653
|
|
507
654
|
# Query Params
|
508
655
|
query_params = {}
|
509
|
-
query_params[:
|
510
|
-
query_params[:
|
511
|
-
query_params[:
|
656
|
+
query_params[:assetId] = asset_id
|
657
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
658
|
+
query_params[:page] = opts[:page] if opts[:page]
|
512
659
|
|
513
660
|
# Header Params
|
514
661
|
header_params = {}
|
@@ -517,27 +664,39 @@ module OCI
|
|
517
664
|
|
518
665
|
post_body = nil
|
519
666
|
|
520
|
-
|
667
|
+
@api_client.call_api(
|
521
668
|
:GET,
|
522
669
|
path,
|
523
670
|
endpoint,
|
524
|
-
:
|
525
|
-
:
|
526
|
-
:
|
527
|
-
:
|
671
|
+
header_params: header_params,
|
672
|
+
query_params: query_params,
|
673
|
+
operation_signing_strategy: operation_signing_strategy,
|
674
|
+
body: post_body,
|
675
|
+
return_type: 'Array<OCI::Core::Models::VolumeBackupPolicyAssignment>'
|
676
|
+
)
|
528
677
|
end
|
678
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
679
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
680
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
681
|
+
|
682
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
683
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
684
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
685
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
686
|
+
|
529
687
|
|
530
688
|
# Gets information for the specified volume backup policy assignment.
|
531
689
|
# @param [String] policy_assignment_id The OCID of the volume backup policy assignment.
|
532
690
|
# @param [Hash] opts the optional parameters
|
533
|
-
# @return [Response] A Response object with data of type OCI::Core::Models::VolumeBackupPolicyAssignment
|
691
|
+
# @return [Response] A Response object with data of type {OCI::Core::Models::VolumeBackupPolicyAssignment VolumeBackupPolicyAssignment}
|
534
692
|
def get_volume_backup_policy_assignment(policy_assignment_id, opts = {})
|
535
|
-
logger.debug
|
693
|
+
logger.debug 'Calling operation BlockstorageClient#get_volume_backup_policy_assignment.' if logger
|
536
694
|
|
537
695
|
raise "Missing the required parameter 'policy_assignment_id' when calling get_volume_backup_policy_assignment." if policy_assignment_id.nil?
|
538
|
-
raise "Parameter value for 'policy_assignment_id' must not be blank" if OCI::Internal::Util
|
696
|
+
raise "Parameter value for 'policy_assignment_id' must not be blank" if OCI::Internal::Util.blank_string?(policy_assignment_id)
|
539
697
|
|
540
|
-
path =
|
698
|
+
path = '/volumeBackupPolicyAssignments/{policyAssignmentId}'.sub('{policyAssignmentId}', policy_assignment_id.to_s)
|
699
|
+
operation_signing_strategy = :standard
|
541
700
|
|
542
701
|
# Query Params
|
543
702
|
query_params = {}
|
@@ -549,45 +708,57 @@ module OCI
|
|
549
708
|
|
550
709
|
post_body = nil
|
551
710
|
|
552
|
-
|
711
|
+
@api_client.call_api(
|
553
712
|
:GET,
|
554
713
|
path,
|
555
714
|
endpoint,
|
556
|
-
:
|
557
|
-
:
|
558
|
-
:
|
559
|
-
:
|
715
|
+
header_params: header_params,
|
716
|
+
query_params: query_params,
|
717
|
+
operation_signing_strategy: operation_signing_strategy,
|
718
|
+
body: post_body,
|
719
|
+
return_type: 'OCI::Core::Models::VolumeBackupPolicyAssignment'
|
720
|
+
)
|
560
721
|
end
|
722
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
723
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
724
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
725
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
726
|
+
|
727
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
728
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
729
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
730
|
+
|
561
731
|
|
562
732
|
# Lists the boot volumes in the specified compartment and Availability Domain.
|
563
|
-
#
|
733
|
+
#
|
564
734
|
# @param [String] availability_domain The name of the Availability Domain.
|
565
|
-
#
|
735
|
+
#
|
566
736
|
# Example: `Uocm:PHX-AD-1`
|
567
|
-
#
|
737
|
+
#
|
568
738
|
# @param [String] compartment_id The OCID of the compartment.
|
569
739
|
# @param [Hash] opts the optional parameters
|
570
740
|
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
571
|
-
#
|
741
|
+
#
|
572
742
|
# Example: `500`
|
573
|
-
#
|
743
|
+
#
|
574
744
|
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
575
|
-
#
|
576
|
-
# @return [Response] A Response object with data of type Array<OCI::Core::Models::BootVolume>
|
745
|
+
#
|
746
|
+
# @return [Response] A Response object with data of type Array<{OCI::Core::Models::BootVolume BootVolume}>
|
577
747
|
def list_boot_volumes(availability_domain, compartment_id, opts = {})
|
578
|
-
logger.debug
|
748
|
+
logger.debug 'Calling operation BlockstorageClient#list_boot_volumes.' if logger
|
579
749
|
|
580
750
|
raise "Missing the required parameter 'availability_domain' when calling list_boot_volumes." if availability_domain.nil?
|
581
751
|
raise "Missing the required parameter 'compartment_id' when calling list_boot_volumes." if compartment_id.nil?
|
582
752
|
|
583
|
-
path =
|
753
|
+
path = '/bootVolumes'
|
754
|
+
operation_signing_strategy = :standard
|
584
755
|
|
585
756
|
# Query Params
|
586
757
|
query_params = {}
|
587
|
-
query_params[:
|
588
|
-
query_params[:
|
589
|
-
query_params[:
|
590
|
-
query_params[:
|
758
|
+
query_params[:availabilityDomain] = availability_domain
|
759
|
+
query_params[:compartmentId] = compartment_id
|
760
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
761
|
+
query_params[:page] = opts[:page] if opts[:page]
|
591
762
|
|
592
763
|
# Header Params
|
593
764
|
header_params = {}
|
@@ -596,35 +767,46 @@ module OCI
|
|
596
767
|
|
597
768
|
post_body = nil
|
598
769
|
|
599
|
-
|
770
|
+
@api_client.call_api(
|
600
771
|
:GET,
|
601
772
|
path,
|
602
773
|
endpoint,
|
603
|
-
:
|
604
|
-
:
|
605
|
-
:
|
606
|
-
:
|
774
|
+
header_params: header_params,
|
775
|
+
query_params: query_params,
|
776
|
+
operation_signing_strategy: operation_signing_strategy,
|
777
|
+
body: post_body,
|
778
|
+
return_type: 'Array<OCI::Core::Models::BootVolume>'
|
779
|
+
)
|
607
780
|
end
|
781
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
782
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
783
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
784
|
+
|
785
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
786
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
787
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
788
|
+
|
608
789
|
|
609
790
|
# Lists all volume backup policies available to the caller.
|
610
791
|
# @param [Hash] opts the optional parameters
|
611
792
|
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
612
|
-
#
|
793
|
+
#
|
613
794
|
# Example: `500`
|
614
|
-
#
|
795
|
+
#
|
615
796
|
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
616
|
-
#
|
617
|
-
# @return [Response] A Response object with data of type Array<OCI::Core::Models::VolumeBackupPolicy>
|
797
|
+
#
|
798
|
+
# @return [Response] A Response object with data of type Array<{OCI::Core::Models::VolumeBackupPolicy VolumeBackupPolicy}>
|
618
799
|
def list_volume_backup_policies(opts = {})
|
619
|
-
logger.debug
|
800
|
+
logger.debug 'Calling operation BlockstorageClient#list_volume_backup_policies.' if logger
|
620
801
|
|
621
802
|
|
622
|
-
path =
|
803
|
+
path = '/volumeBackupPolicies'
|
804
|
+
operation_signing_strategy = :standard
|
623
805
|
|
624
806
|
# Query Params
|
625
807
|
query_params = {}
|
626
|
-
query_params[:
|
627
|
-
query_params[:
|
808
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
809
|
+
query_params[:page] = opts[:page] if opts[:page]
|
628
810
|
|
629
811
|
# Header Params
|
630
812
|
header_params = {}
|
@@ -633,75 +815,86 @@ module OCI
|
|
633
815
|
|
634
816
|
post_body = nil
|
635
817
|
|
636
|
-
|
818
|
+
@api_client.call_api(
|
637
819
|
:GET,
|
638
820
|
path,
|
639
821
|
endpoint,
|
640
|
-
:
|
641
|
-
:
|
642
|
-
:
|
643
|
-
:
|
822
|
+
header_params: header_params,
|
823
|
+
query_params: query_params,
|
824
|
+
operation_signing_strategy: operation_signing_strategy,
|
825
|
+
body: post_body,
|
826
|
+
return_type: 'Array<OCI::Core::Models::VolumeBackupPolicy>'
|
827
|
+
)
|
644
828
|
end
|
829
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
830
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
831
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
832
|
+
|
833
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
834
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
835
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
836
|
+
|
645
837
|
|
646
838
|
# Lists the volume backups in the specified compartment. You can filter the results by volume.
|
647
|
-
#
|
839
|
+
#
|
648
840
|
# @param [String] compartment_id The OCID of the compartment.
|
649
841
|
# @param [Hash] opts the optional parameters
|
650
842
|
# @option opts [String] :volume_id The OCID of the volume.
|
651
843
|
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
652
|
-
#
|
844
|
+
#
|
653
845
|
# Example: `500`
|
654
|
-
#
|
846
|
+
#
|
655
847
|
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
656
|
-
#
|
848
|
+
#
|
657
849
|
# @option opts [String] :display_name A filter to return only resources that match the given display name exactly.
|
658
|
-
#
|
850
|
+
#
|
659
851
|
# @option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for
|
660
852
|
# TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
|
661
853
|
# sort order is case sensitive.
|
662
|
-
#
|
854
|
+
#
|
663
855
|
# **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
|
664
856
|
# optionally filter by Availability Domain if the scope of the resource type is within a
|
665
857
|
# single Availability Domain. If you call one of these \"List\" operations without specifying
|
666
858
|
# an Availability Domain, the resources are grouped by Availability Domain, then sorted.
|
667
|
-
#
|
859
|
+
#
|
668
860
|
# Allowed values are: TIMECREATED, DISPLAYNAME
|
669
861
|
# @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
|
670
862
|
# is case sensitive.
|
671
|
-
#
|
863
|
+
#
|
672
864
|
# Allowed values are: ASC, DESC
|
673
865
|
# @option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
|
674
|
-
#
|
675
|
-
# @return [Response] A Response object with data of type Array<OCI::Core::Models::VolumeBackup>
|
866
|
+
#
|
867
|
+
# @return [Response] A Response object with data of type Array<{OCI::Core::Models::VolumeBackup VolumeBackup}>
|
676
868
|
def list_volume_backups(compartment_id, opts = {})
|
677
|
-
logger.debug
|
869
|
+
logger.debug 'Calling operation BlockstorageClient#list_volume_backups.' if logger
|
678
870
|
|
679
871
|
raise "Missing the required parameter 'compartment_id' when calling list_volume_backups." if compartment_id.nil?
|
680
872
|
|
681
|
-
if opts[:
|
873
|
+
if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
|
682
874
|
raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
|
683
875
|
end
|
684
876
|
|
685
|
-
if opts[:
|
877
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
686
878
|
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
687
879
|
end
|
688
880
|
|
689
|
-
if opts[:
|
881
|
+
if opts[:lifecycle_state] && !OCI::Core::Models::VolumeBackup::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
|
690
882
|
raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::VolumeBackup::LIFECYCLE_STATE_ENUM.'
|
691
883
|
end
|
692
884
|
|
693
|
-
path =
|
885
|
+
path = '/volumeBackups'
|
886
|
+
operation_signing_strategy = :standard
|
694
887
|
|
695
888
|
# Query Params
|
696
889
|
query_params = {}
|
697
|
-
query_params[:
|
698
|
-
query_params[:
|
699
|
-
query_params[:
|
700
|
-
query_params[:
|
701
|
-
query_params[:
|
702
|
-
query_params[:
|
703
|
-
query_params[:
|
704
|
-
query_params[:
|
890
|
+
query_params[:compartmentId] = compartment_id
|
891
|
+
query_params[:volumeId] = opts[:volume_id] if opts[:volume_id]
|
892
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
893
|
+
query_params[:page] = opts[:page] if opts[:page]
|
894
|
+
query_params[:displayName] = opts[:display_name] if opts[:display_name]
|
895
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
896
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
897
|
+
query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
|
705
898
|
|
706
899
|
# Header Params
|
707
900
|
header_params = {}
|
@@ -710,78 +903,89 @@ module OCI
|
|
710
903
|
|
711
904
|
post_body = nil
|
712
905
|
|
713
|
-
|
906
|
+
@api_client.call_api(
|
714
907
|
:GET,
|
715
908
|
path,
|
716
909
|
endpoint,
|
717
|
-
:
|
718
|
-
:
|
719
|
-
:
|
720
|
-
:
|
910
|
+
header_params: header_params,
|
911
|
+
query_params: query_params,
|
912
|
+
operation_signing_strategy: operation_signing_strategy,
|
913
|
+
body: post_body,
|
914
|
+
return_type: 'Array<OCI::Core::Models::VolumeBackup>'
|
915
|
+
)
|
721
916
|
end
|
917
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
918
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
919
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
920
|
+
|
921
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
922
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
923
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
924
|
+
|
722
925
|
|
723
926
|
# Lists the volumes in the specified compartment and Availability Domain.
|
724
|
-
#
|
927
|
+
#
|
725
928
|
# @param [String] compartment_id The OCID of the compartment.
|
726
929
|
# @param [Hash] opts the optional parameters
|
727
930
|
# @option opts [String] :availability_domain The name of the Availability Domain.
|
728
|
-
#
|
931
|
+
#
|
729
932
|
# Example: `Uocm:PHX-AD-1`
|
730
|
-
#
|
933
|
+
#
|
731
934
|
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
732
|
-
#
|
935
|
+
#
|
733
936
|
# Example: `500`
|
734
|
-
#
|
937
|
+
#
|
735
938
|
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
736
|
-
#
|
939
|
+
#
|
737
940
|
# @option opts [String] :display_name A filter to return only resources that match the given display name exactly.
|
738
|
-
#
|
941
|
+
#
|
739
942
|
# @option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for
|
740
943
|
# TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
|
741
944
|
# sort order is case sensitive.
|
742
|
-
#
|
945
|
+
#
|
743
946
|
# **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
|
744
947
|
# optionally filter by Availability Domain if the scope of the resource type is within a
|
745
948
|
# single Availability Domain. If you call one of these \"List\" operations without specifying
|
746
949
|
# an Availability Domain, the resources are grouped by Availability Domain, then sorted.
|
747
|
-
#
|
950
|
+
#
|
748
951
|
# Allowed values are: TIMECREATED, DISPLAYNAME
|
749
952
|
# @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
|
750
953
|
# is case sensitive.
|
751
|
-
#
|
954
|
+
#
|
752
955
|
# Allowed values are: ASC, DESC
|
753
956
|
# @option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
|
754
|
-
#
|
755
|
-
# @return [Response] A Response object with data of type Array<OCI::Core::Models::Volume>
|
957
|
+
#
|
958
|
+
# @return [Response] A Response object with data of type Array<{OCI::Core::Models::Volume Volume}>
|
756
959
|
def list_volumes(compartment_id, opts = {})
|
757
|
-
logger.debug
|
960
|
+
logger.debug 'Calling operation BlockstorageClient#list_volumes.' if logger
|
758
961
|
|
759
962
|
raise "Missing the required parameter 'compartment_id' when calling list_volumes." if compartment_id.nil?
|
760
963
|
|
761
|
-
if opts[:
|
964
|
+
if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
|
762
965
|
raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
|
763
966
|
end
|
764
967
|
|
765
|
-
if opts[:
|
968
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
766
969
|
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
767
970
|
end
|
768
971
|
|
769
|
-
if opts[:
|
972
|
+
if opts[:lifecycle_state] && !OCI::Core::Models::Volume::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
|
770
973
|
raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::Volume::LIFECYCLE_STATE_ENUM.'
|
771
974
|
end
|
772
975
|
|
773
|
-
path =
|
976
|
+
path = '/volumes'
|
977
|
+
operation_signing_strategy = :standard
|
774
978
|
|
775
979
|
# Query Params
|
776
980
|
query_params = {}
|
777
|
-
query_params[:
|
778
|
-
query_params[:
|
779
|
-
query_params[:
|
780
|
-
query_params[:
|
781
|
-
query_params[:
|
782
|
-
query_params[:
|
783
|
-
query_params[:
|
784
|
-
query_params[:
|
981
|
+
query_params[:compartmentId] = compartment_id
|
982
|
+
query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain]
|
983
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
984
|
+
query_params[:page] = opts[:page] if opts[:page]
|
985
|
+
query_params[:displayName] = opts[:display_name] if opts[:display_name]
|
986
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
987
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
988
|
+
query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
|
785
989
|
|
786
990
|
# Header Params
|
787
991
|
header_params = {}
|
@@ -790,33 +994,44 @@ module OCI
|
|
790
994
|
|
791
995
|
post_body = nil
|
792
996
|
|
793
|
-
|
997
|
+
@api_client.call_api(
|
794
998
|
:GET,
|
795
999
|
path,
|
796
1000
|
endpoint,
|
797
|
-
:
|
798
|
-
:
|
799
|
-
:
|
800
|
-
:
|
1001
|
+
header_params: header_params,
|
1002
|
+
query_params: query_params,
|
1003
|
+
operation_signing_strategy: operation_signing_strategy,
|
1004
|
+
body: post_body,
|
1005
|
+
return_type: 'Array<OCI::Core::Models::Volume>'
|
1006
|
+
)
|
801
1007
|
end
|
1008
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1009
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1010
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
1011
|
+
|
1012
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1013
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
1014
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
1015
|
+
|
802
1016
|
|
803
1017
|
# Updates the specified boot volume's display name.
|
804
1018
|
# @param [String] boot_volume_id The OCID of the boot volume.
|
805
|
-
# @param [UpdateBootVolumeDetails] update_boot_volume_details Update boot volume's display name.
|
1019
|
+
# @param [OCI::Core::Models::UpdateBootVolumeDetails] update_boot_volume_details Update boot volume's display name.
|
806
1020
|
# @param [Hash] opts the optional parameters
|
807
1021
|
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
808
1022
|
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
809
1023
|
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
810
|
-
#
|
811
|
-
# @return [Response] A Response object with data of type OCI::Core::Models::BootVolume
|
1024
|
+
#
|
1025
|
+
# @return [Response] A Response object with data of type {OCI::Core::Models::BootVolume BootVolume}
|
812
1026
|
def update_boot_volume(boot_volume_id, update_boot_volume_details, opts = {})
|
813
|
-
logger.debug
|
1027
|
+
logger.debug 'Calling operation BlockstorageClient#update_boot_volume.' if logger
|
814
1028
|
|
815
1029
|
raise "Missing the required parameter 'boot_volume_id' when calling update_boot_volume." if boot_volume_id.nil?
|
816
1030
|
raise "Missing the required parameter 'update_boot_volume_details' when calling update_boot_volume." if update_boot_volume_details.nil?
|
817
|
-
raise "Parameter value for 'boot_volume_id' must not be blank" if OCI::Internal::Util
|
1031
|
+
raise "Parameter value for 'boot_volume_id' must not be blank" if OCI::Internal::Util.blank_string?(boot_volume_id)
|
818
1032
|
|
819
|
-
path =
|
1033
|
+
path = '/bootVolumes/{bootVolumeId}'.sub('{bootVolumeId}', boot_volume_id.to_s)
|
1034
|
+
operation_signing_strategy = :standard
|
820
1035
|
|
821
1036
|
# Query Params
|
822
1037
|
query_params = {}
|
@@ -825,39 +1040,50 @@ module OCI
|
|
825
1040
|
header_params = {}
|
826
1041
|
header_params['accept'] = 'application/json'
|
827
1042
|
header_params['content-type'] = 'application/json'
|
828
|
-
header_params[:'if-match'] = opts[:
|
1043
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
829
1044
|
|
830
1045
|
post_body = @api_client.object_to_http_body(update_boot_volume_details)
|
831
1046
|
|
832
|
-
|
1047
|
+
@api_client.call_api(
|
833
1048
|
:PUT,
|
834
1049
|
path,
|
835
1050
|
endpoint,
|
836
|
-
:
|
837
|
-
:
|
838
|
-
:
|
839
|
-
:
|
1051
|
+
header_params: header_params,
|
1052
|
+
query_params: query_params,
|
1053
|
+
operation_signing_strategy: operation_signing_strategy,
|
1054
|
+
body: post_body,
|
1055
|
+
return_type: 'OCI::Core::Models::BootVolume'
|
1056
|
+
)
|
840
1057
|
end
|
1058
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1059
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1060
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
1061
|
+
|
1062
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1063
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
1064
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
1065
|
+
|
841
1066
|
|
842
1067
|
# Updates the specified volume's display name.
|
843
1068
|
# Avoid entering confidential information.
|
844
|
-
#
|
1069
|
+
#
|
845
1070
|
# @param [String] volume_id The OCID of the volume.
|
846
|
-
# @param [UpdateVolumeDetails] update_volume_details Update volume's display name. Avoid entering confidential information.
|
1071
|
+
# @param [OCI::Core::Models::UpdateVolumeDetails] update_volume_details Update volume's display name. Avoid entering confidential information.
|
847
1072
|
# @param [Hash] opts the optional parameters
|
848
1073
|
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
849
1074
|
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
850
1075
|
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
851
|
-
#
|
852
|
-
# @return [Response] A Response object with data of type OCI::Core::Models::Volume
|
1076
|
+
#
|
1077
|
+
# @return [Response] A Response object with data of type {OCI::Core::Models::Volume Volume}
|
853
1078
|
def update_volume(volume_id, update_volume_details, opts = {})
|
854
|
-
logger.debug
|
1079
|
+
logger.debug 'Calling operation BlockstorageClient#update_volume.' if logger
|
855
1080
|
|
856
1081
|
raise "Missing the required parameter 'volume_id' when calling update_volume." if volume_id.nil?
|
857
1082
|
raise "Missing the required parameter 'update_volume_details' when calling update_volume." if update_volume_details.nil?
|
858
|
-
raise "Parameter value for 'volume_id' must not be blank" if OCI::Internal::Util
|
1083
|
+
raise "Parameter value for 'volume_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_id)
|
859
1084
|
|
860
|
-
path =
|
1085
|
+
path = '/volumes/{volumeId}'.sub('{volumeId}', volume_id.to_s)
|
1086
|
+
operation_signing_strategy = :standard
|
861
1087
|
|
862
1088
|
# Query Params
|
863
1089
|
query_params = {}
|
@@ -866,39 +1092,50 @@ module OCI
|
|
866
1092
|
header_params = {}
|
867
1093
|
header_params['accept'] = 'application/json'
|
868
1094
|
header_params['content-type'] = 'application/json'
|
869
|
-
header_params[:'if-match'] = opts[:
|
1095
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
870
1096
|
|
871
1097
|
post_body = @api_client.object_to_http_body(update_volume_details)
|
872
1098
|
|
873
|
-
|
1099
|
+
@api_client.call_api(
|
874
1100
|
:PUT,
|
875
1101
|
path,
|
876
1102
|
endpoint,
|
877
|
-
:
|
878
|
-
:
|
879
|
-
:
|
880
|
-
:
|
1103
|
+
header_params: header_params,
|
1104
|
+
query_params: query_params,
|
1105
|
+
operation_signing_strategy: operation_signing_strategy,
|
1106
|
+
body: post_body,
|
1107
|
+
return_type: 'OCI::Core::Models::Volume'
|
1108
|
+
)
|
881
1109
|
end
|
1110
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1111
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1112
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
1113
|
+
|
1114
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1115
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
1116
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
1117
|
+
|
882
1118
|
|
883
1119
|
# Updates the display name for the specified volume backup.
|
884
1120
|
# Avoid entering confidential information.
|
885
|
-
#
|
1121
|
+
#
|
886
1122
|
# @param [String] volume_backup_id The OCID of the volume backup.
|
887
|
-
# @param [UpdateVolumeBackupDetails] update_volume_backup_details Update volume backup fields
|
1123
|
+
# @param [OCI::Core::Models::UpdateVolumeBackupDetails] update_volume_backup_details Update volume backup fields
|
888
1124
|
# @param [Hash] opts the optional parameters
|
889
1125
|
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
890
1126
|
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
891
1127
|
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
892
|
-
#
|
893
|
-
# @return [Response] A Response object with data of type OCI::Core::Models::VolumeBackup
|
1128
|
+
#
|
1129
|
+
# @return [Response] A Response object with data of type {OCI::Core::Models::VolumeBackup VolumeBackup}
|
894
1130
|
def update_volume_backup(volume_backup_id, update_volume_backup_details, opts = {})
|
895
|
-
logger.debug
|
1131
|
+
logger.debug 'Calling operation BlockstorageClient#update_volume_backup.' if logger
|
896
1132
|
|
897
1133
|
raise "Missing the required parameter 'volume_backup_id' when calling update_volume_backup." if volume_backup_id.nil?
|
898
1134
|
raise "Missing the required parameter 'update_volume_backup_details' when calling update_volume_backup." if update_volume_backup_details.nil?
|
899
|
-
raise "Parameter value for 'volume_backup_id' must not be blank" if OCI::Internal::Util
|
1135
|
+
raise "Parameter value for 'volume_backup_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_backup_id)
|
900
1136
|
|
901
|
-
path =
|
1137
|
+
path = '/volumeBackups/{volumeBackupId}'.sub('{volumeBackupId}', volume_backup_id.to_s)
|
1138
|
+
operation_signing_strategy = :standard
|
902
1139
|
|
903
1140
|
# Query Params
|
904
1141
|
query_params = {}
|
@@ -907,18 +1144,24 @@ module OCI
|
|
907
1144
|
header_params = {}
|
908
1145
|
header_params['accept'] = 'application/json'
|
909
1146
|
header_params['content-type'] = 'application/json'
|
910
|
-
header_params[:'if-match'] = opts[:
|
1147
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
911
1148
|
|
912
1149
|
post_body = @api_client.object_to_http_body(update_volume_backup_details)
|
913
1150
|
|
914
|
-
|
1151
|
+
@api_client.call_api(
|
915
1152
|
:PUT,
|
916
1153
|
path,
|
917
1154
|
endpoint,
|
918
|
-
:
|
919
|
-
:
|
920
|
-
:
|
921
|
-
:
|
1155
|
+
header_params: header_params,
|
1156
|
+
query_params: query_params,
|
1157
|
+
operation_signing_strategy: operation_signing_strategy,
|
1158
|
+
body: post_body,
|
1159
|
+
return_type: 'OCI::Core::Models::VolumeBackup'
|
1160
|
+
)
|
922
1161
|
end
|
1162
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1163
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1164
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
923
1165
|
end
|
924
1166
|
end
|
1167
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|