oci 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
4
|
|
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
|
5
6
|
module OCI
|
|
6
7
|
# An UpdateNamespaceMetadataDetails is used for update NamespaceMetadata. To be able to upate the NamespaceMetadata, a user
|
|
7
8
|
# must have NAMESPACE_UPDATE permission.
|
|
8
9
|
#
|
|
9
|
-
class ObjectStorage::Models::UpdateNamespaceMetadataDetails
|
|
10
|
+
class ObjectStorage::Models::UpdateNamespaceMetadataDetails # rubocop:disable Metrics/LineLength
|
|
10
11
|
# The update compartment id for an S3 client if this field is set.
|
|
11
12
|
# @return [String]
|
|
12
13
|
attr_accessor :default_s3_compartment_id
|
|
@@ -15,6 +16,29 @@ module OCI
|
|
|
15
16
|
# @return [String]
|
|
16
17
|
attr_accessor :default_swift_compartment_id
|
|
17
18
|
|
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
|
+
def self.attribute_map
|
|
21
|
+
{
|
|
22
|
+
# rubocop:disable Style/SymbolLiteral
|
|
23
|
+
'default_s3_compartment_id': :'defaultS3CompartmentId',
|
|
24
|
+
'default_swift_compartment_id': :'defaultSwiftCompartmentId'
|
|
25
|
+
# rubocop:enable Style/SymbolLiteral
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Attribute type mapping.
|
|
30
|
+
def self.swagger_types
|
|
31
|
+
{
|
|
32
|
+
# rubocop:disable Style/SymbolLiteral
|
|
33
|
+
'default_s3_compartment_id': :'String',
|
|
34
|
+
'default_swift_compartment_id': :'String'
|
|
35
|
+
# rubocop:enable Style/SymbolLiteral
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
40
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
41
|
+
|
|
18
42
|
|
|
19
43
|
# Initializes the object
|
|
20
44
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
@@ -24,50 +48,54 @@ module OCI
|
|
|
24
48
|
return unless attributes.is_a?(Hash)
|
|
25
49
|
|
|
26
50
|
# convert string to symbol for hash key
|
|
27
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
28
52
|
|
|
29
|
-
if attributes[:'defaultS3CompartmentId']
|
|
30
|
-
self.default_s3_compartment_id = attributes[:'defaultS3CompartmentId']
|
|
31
|
-
end
|
|
53
|
+
self.default_s3_compartment_id = attributes[:'defaultS3CompartmentId'] if attributes[:'defaultS3CompartmentId']
|
|
32
54
|
|
|
33
55
|
raise 'You cannot provide both :defaultS3CompartmentId and :default_s3_compartment_id' if attributes.key?(:'defaultS3CompartmentId') && attributes.key?(:'default_s3_compartment_id')
|
|
34
56
|
|
|
35
|
-
if attributes[:'default_s3_compartment_id']
|
|
36
|
-
self.default_s3_compartment_id = attributes[:'default_s3_compartment_id']
|
|
37
|
-
end
|
|
57
|
+
self.default_s3_compartment_id = attributes[:'default_s3_compartment_id'] if attributes[:'default_s3_compartment_id']
|
|
38
58
|
|
|
39
|
-
if attributes[:'defaultSwiftCompartmentId']
|
|
40
|
-
self.default_swift_compartment_id = attributes[:'defaultSwiftCompartmentId']
|
|
41
|
-
end
|
|
59
|
+
self.default_swift_compartment_id = attributes[:'defaultSwiftCompartmentId'] if attributes[:'defaultSwiftCompartmentId']
|
|
42
60
|
|
|
43
61
|
raise 'You cannot provide both :defaultSwiftCompartmentId and :default_swift_compartment_id' if attributes.key?(:'defaultSwiftCompartmentId') && attributes.key?(:'default_swift_compartment_id')
|
|
44
62
|
|
|
45
|
-
if attributes[:'default_swift_compartment_id']
|
|
46
|
-
self.default_swift_compartment_id = attributes[:'default_swift_compartment_id']
|
|
47
|
-
end
|
|
48
|
-
|
|
63
|
+
self.default_swift_compartment_id = attributes[:'default_swift_compartment_id'] if attributes[:'default_swift_compartment_id']
|
|
49
64
|
end
|
|
65
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
66
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
67
|
+
|
|
68
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
69
|
+
|
|
50
70
|
|
|
51
71
|
# Checks equality by comparing each attribute.
|
|
52
|
-
# @param [Object]
|
|
53
|
-
def ==(
|
|
54
|
-
return true if
|
|
55
|
-
self.class ==
|
|
56
|
-
|
|
57
|
-
|
|
72
|
+
# @param [Object] other the other object to be compared
|
|
73
|
+
def ==(other)
|
|
74
|
+
return true if equal?(other)
|
|
75
|
+
self.class == other.class &&
|
|
76
|
+
default_s3_compartment_id == other.default_s3_compartment_id &&
|
|
77
|
+
default_swift_compartment_id == other.default_swift_compartment_id
|
|
58
78
|
end
|
|
79
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
59
80
|
|
|
60
81
|
# @see the `==` method
|
|
61
|
-
# @param [Object]
|
|
62
|
-
def eql?(
|
|
63
|
-
self ==
|
|
82
|
+
# @param [Object] other the other object to be compared
|
|
83
|
+
def eql?(other)
|
|
84
|
+
self == other
|
|
64
85
|
end
|
|
65
86
|
|
|
87
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
88
|
+
|
|
89
|
+
|
|
66
90
|
# Calculates hash code according to all attributes.
|
|
67
91
|
# @return [Fixnum] Hash code
|
|
68
92
|
def hash
|
|
69
93
|
[default_s3_compartment_id, default_swift_compartment_id].hash
|
|
70
94
|
end
|
|
95
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
96
|
+
|
|
97
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
98
|
+
|
|
71
99
|
|
|
72
100
|
# Builds the object from hash
|
|
73
101
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
@@ -79,15 +107,22 @@ module OCI
|
|
|
79
107
|
# check to ensure the input is an array given that the the attribute
|
|
80
108
|
# is documented as an array but the input is not
|
|
81
109
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
82
|
-
|
|
110
|
+
public_method("#{key}=").call(
|
|
111
|
+
attributes[self.class.attribute_map[key]]
|
|
112
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
113
|
+
)
|
|
83
114
|
end
|
|
84
115
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
85
|
-
|
|
86
|
-
|
|
116
|
+
public_method("#{key}=").call(
|
|
117
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
118
|
+
)
|
|
119
|
+
end
|
|
120
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
87
121
|
end
|
|
88
122
|
|
|
89
123
|
self
|
|
90
124
|
end
|
|
125
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
91
126
|
|
|
92
127
|
# Returns the string representation of the object
|
|
93
128
|
# @return [String] String presentation of the object
|
|
@@ -111,11 +146,11 @@ module OCI
|
|
|
111
146
|
|
|
112
147
|
# Outputs non-array value in the form of hash
|
|
113
148
|
# For object, use to_hash. Otherwise, just return the value
|
|
114
|
-
# @param [Object] value Any valid value
|
|
149
|
+
# @param [Object] value Any valid value
|
|
115
150
|
# @return [Hash] Returns the value in the form of hash
|
|
116
151
|
def _to_hash(value)
|
|
117
152
|
if value.is_a?(Array)
|
|
118
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
153
|
+
value.compact.map { |v| _to_hash(v) }
|
|
119
154
|
elsif value.is_a?(Hash)
|
|
120
155
|
{}.tap do |hash|
|
|
121
156
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -126,23 +161,6 @@ module OCI
|
|
|
126
161
|
value
|
|
127
162
|
end
|
|
128
163
|
end
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
133
|
-
def self.attribute_map
|
|
134
|
-
{
|
|
135
|
-
:'default_s3_compartment_id' => :'defaultS3CompartmentId',
|
|
136
|
-
:'default_swift_compartment_id' => :'defaultSwiftCompartmentId'
|
|
137
|
-
}
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
# Attribute type mapping.
|
|
141
|
-
def self.swagger_types
|
|
142
|
-
{
|
|
143
|
-
:'default_s3_compartment_id' => :'String',
|
|
144
|
-
:'default_swift_compartment_id' => :'String'
|
|
145
|
-
}
|
|
146
|
-
end
|
|
147
164
|
end
|
|
148
165
|
end
|
|
166
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
|
@@ -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
|
+
# Common set of Object and Archive Storage APIs for managing buckets and objects.
|
|
8
9
|
class ObjectStorage::ObjectStorageClient
|
|
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 ObjectStorageClient.
|
|
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,126 +84,153 @@ 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
|
# Aborts an in-progress multipart upload and deletes all parts that have been uploaded.
|
|
78
|
-
#
|
|
93
|
+
#
|
|
79
94
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
80
95
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
81
96
|
# Example: `my-new-bucket1`
|
|
82
|
-
#
|
|
97
|
+
#
|
|
83
98
|
# @param [String] object_name The name of the object. Avoid entering confidential information.
|
|
84
99
|
# Example: `test/object1.log`
|
|
85
|
-
#
|
|
100
|
+
#
|
|
86
101
|
# @param [String] upload_id The upload ID for a multipart upload.
|
|
87
102
|
# @param [Hash] opts the optional parameters
|
|
88
103
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
89
104
|
# @return [Response] A Response object with data of type nil
|
|
90
105
|
def abort_multipart_upload(namespace_name, bucket_name, object_name, upload_id, opts = {})
|
|
91
|
-
logger.debug
|
|
106
|
+
logger.debug 'Calling operation ObjectStorageClient#abort_multipart_upload.' if logger
|
|
92
107
|
|
|
93
108
|
raise "Missing the required parameter 'namespace_name' when calling abort_multipart_upload." if namespace_name.nil?
|
|
94
109
|
raise "Missing the required parameter 'bucket_name' when calling abort_multipart_upload." if bucket_name.nil?
|
|
95
110
|
raise "Missing the required parameter 'object_name' when calling abort_multipart_upload." if object_name.nil?
|
|
96
111
|
raise "Missing the required parameter 'upload_id' when calling abort_multipart_upload." if upload_id.nil?
|
|
97
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
98
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
99
|
-
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util
|
|
112
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
113
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
114
|
+
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util.blank_string?(object_name)
|
|
100
115
|
|
|
101
|
-
path =
|
|
116
|
+
path = '/n/{namespaceName}/b/{bucketName}/u/{objectName}'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s).sub('{objectName}', object_name.to_s)
|
|
117
|
+
operation_signing_strategy = :standard
|
|
102
118
|
|
|
103
119
|
# Query Params
|
|
104
120
|
query_params = {}
|
|
105
|
-
query_params[:
|
|
121
|
+
query_params[:uploadId] = upload_id
|
|
106
122
|
|
|
107
123
|
# Header Params
|
|
108
124
|
header_params = {}
|
|
109
125
|
header_params['accept'] = 'application/json'
|
|
110
126
|
header_params['content-type'] = 'application/json'
|
|
111
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
127
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
112
128
|
|
|
113
129
|
post_body = nil
|
|
114
130
|
|
|
115
|
-
|
|
131
|
+
@api_client.call_api(
|
|
116
132
|
:DELETE,
|
|
117
133
|
path,
|
|
118
134
|
endpoint,
|
|
119
|
-
:
|
|
120
|
-
:
|
|
121
|
-
:
|
|
135
|
+
header_params: header_params,
|
|
136
|
+
query_params: query_params,
|
|
137
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
138
|
+
body: post_body
|
|
139
|
+
)
|
|
122
140
|
end
|
|
141
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
142
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
143
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
144
|
+
|
|
145
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
146
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
147
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
148
|
+
|
|
123
149
|
|
|
124
150
|
# Commits a multipart upload, which involves checking part numbers and ETags of the parts, to create an aggregate object.
|
|
125
|
-
#
|
|
151
|
+
#
|
|
126
152
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
127
153
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
128
154
|
# Example: `my-new-bucket1`
|
|
129
|
-
#
|
|
155
|
+
#
|
|
130
156
|
# @param [String] object_name The name of the object. Avoid entering confidential information.
|
|
131
157
|
# Example: `test/object1.log`
|
|
132
|
-
#
|
|
158
|
+
#
|
|
133
159
|
# @param [String] upload_id The upload ID for a multipart upload.
|
|
134
|
-
# @param [CommitMultipartUploadDetails] commit_multipart_upload_details The part numbers and ETags for the parts you want to commit.
|
|
160
|
+
# @param [OCI::ObjectStorage::Models::CommitMultipartUploadDetails] commit_multipart_upload_details The part numbers and ETags for the parts you want to commit.
|
|
135
161
|
# @param [Hash] opts the optional parameters
|
|
136
162
|
# @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
|
|
137
163
|
# For uploading a part, this is the entity tag of the target part.
|
|
138
|
-
#
|
|
164
|
+
#
|
|
139
165
|
# @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
|
|
140
166
|
# For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
|
|
141
|
-
#
|
|
167
|
+
#
|
|
142
168
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
143
169
|
# @return [Response] A Response object with data of type nil
|
|
144
170
|
def commit_multipart_upload(namespace_name, bucket_name, object_name, upload_id, commit_multipart_upload_details, opts = {})
|
|
145
|
-
logger.debug
|
|
171
|
+
logger.debug 'Calling operation ObjectStorageClient#commit_multipart_upload.' if logger
|
|
146
172
|
|
|
147
173
|
raise "Missing the required parameter 'namespace_name' when calling commit_multipart_upload." if namespace_name.nil?
|
|
148
174
|
raise "Missing the required parameter 'bucket_name' when calling commit_multipart_upload." if bucket_name.nil?
|
|
149
175
|
raise "Missing the required parameter 'object_name' when calling commit_multipart_upload." if object_name.nil?
|
|
150
176
|
raise "Missing the required parameter 'upload_id' when calling commit_multipart_upload." if upload_id.nil?
|
|
151
177
|
raise "Missing the required parameter 'commit_multipart_upload_details' when calling commit_multipart_upload." if commit_multipart_upload_details.nil?
|
|
152
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
153
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
154
|
-
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util
|
|
178
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
179
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
180
|
+
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util.blank_string?(object_name)
|
|
155
181
|
|
|
156
|
-
path =
|
|
182
|
+
path = '/n/{namespaceName}/b/{bucketName}/u/{objectName}'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s).sub('{objectName}', object_name.to_s)
|
|
183
|
+
operation_signing_strategy = :standard
|
|
157
184
|
|
|
158
185
|
# Query Params
|
|
159
186
|
query_params = {}
|
|
160
|
-
query_params[:
|
|
187
|
+
query_params[:uploadId] = upload_id
|
|
161
188
|
|
|
162
189
|
# Header Params
|
|
163
190
|
header_params = {}
|
|
164
191
|
header_params['accept'] = 'application/json'
|
|
165
192
|
header_params['content-type'] = 'application/json'
|
|
166
|
-
header_params[:'if-match'] = opts[:
|
|
167
|
-
header_params[:'if-none-match'] = opts[:
|
|
168
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
193
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
194
|
+
header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
|
|
195
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
169
196
|
|
|
170
197
|
post_body = @api_client.object_to_http_body(commit_multipart_upload_details)
|
|
171
198
|
|
|
172
|
-
|
|
199
|
+
@api_client.call_api(
|
|
173
200
|
:POST,
|
|
174
201
|
path,
|
|
175
202
|
endpoint,
|
|
176
|
-
:
|
|
177
|
-
:
|
|
178
|
-
:
|
|
203
|
+
header_params: header_params,
|
|
204
|
+
query_params: query_params,
|
|
205
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
206
|
+
body: post_body
|
|
207
|
+
)
|
|
179
208
|
end
|
|
209
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
210
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
211
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
212
|
+
|
|
213
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
214
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
215
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
216
|
+
|
|
180
217
|
|
|
181
218
|
# Creates a bucket in the given namespace with a bucket name and optional user-defined metadata.
|
|
182
|
-
#
|
|
219
|
+
#
|
|
183
220
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
184
|
-
# @param [CreateBucketDetails] create_bucket_details Request object for creating a bucket.
|
|
221
|
+
# @param [OCI::ObjectStorage::Models::CreateBucketDetails] create_bucket_details Request object for creating a bucket.
|
|
185
222
|
# @param [Hash] opts the optional parameters
|
|
186
223
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
187
|
-
# @return [Response] A Response object with data of type OCI::ObjectStorage::Models::Bucket
|
|
224
|
+
# @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::Bucket Bucket}
|
|
188
225
|
def create_bucket(namespace_name, create_bucket_details, opts = {})
|
|
189
|
-
logger.debug
|
|
226
|
+
logger.debug 'Calling operation ObjectStorageClient#create_bucket.' if logger
|
|
190
227
|
|
|
191
228
|
raise "Missing the required parameter 'namespace_name' when calling create_bucket." if namespace_name.nil?
|
|
192
229
|
raise "Missing the required parameter 'create_bucket_details' when calling create_bucket." if create_bucket_details.nil?
|
|
193
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
230
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
194
231
|
|
|
195
|
-
path =
|
|
232
|
+
path = '/n/{namespaceName}/b/'.sub('{namespaceName}', namespace_name.to_s)
|
|
233
|
+
operation_signing_strategy = :standard
|
|
196
234
|
|
|
197
235
|
# Query Params
|
|
198
236
|
query_params = {}
|
|
@@ -201,46 +239,57 @@ module OCI
|
|
|
201
239
|
header_params = {}
|
|
202
240
|
header_params['accept'] = 'application/json'
|
|
203
241
|
header_params['content-type'] = 'application/json'
|
|
204
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
242
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
205
243
|
|
|
206
244
|
post_body = @api_client.object_to_http_body(create_bucket_details)
|
|
207
245
|
|
|
208
|
-
|
|
246
|
+
@api_client.call_api(
|
|
209
247
|
:POST,
|
|
210
248
|
path,
|
|
211
249
|
endpoint,
|
|
212
|
-
:
|
|
213
|
-
:
|
|
214
|
-
:
|
|
215
|
-
:
|
|
250
|
+
header_params: header_params,
|
|
251
|
+
query_params: query_params,
|
|
252
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
253
|
+
body: post_body,
|
|
254
|
+
return_type: 'OCI::ObjectStorage::Models::Bucket'
|
|
255
|
+
)
|
|
216
256
|
end
|
|
257
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
258
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
259
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
260
|
+
|
|
261
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
262
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
263
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
264
|
+
|
|
217
265
|
|
|
218
266
|
# Starts a new multipart upload to a specific object in the given bucket in the given namespace.
|
|
219
|
-
#
|
|
267
|
+
#
|
|
220
268
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
221
269
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
222
270
|
# Example: `my-new-bucket1`
|
|
223
|
-
#
|
|
224
|
-
# @param [CreateMultipartUploadDetails] create_multipart_upload_details Request object for creating a multi-part upload.
|
|
271
|
+
#
|
|
272
|
+
# @param [OCI::ObjectStorage::Models::CreateMultipartUploadDetails] create_multipart_upload_details Request object for creating a multi-part upload.
|
|
225
273
|
# @param [Hash] opts the optional parameters
|
|
226
274
|
# @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
|
|
227
275
|
# For uploading a part, this is the entity tag of the target part.
|
|
228
|
-
#
|
|
276
|
+
#
|
|
229
277
|
# @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
|
|
230
278
|
# For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
|
|
231
|
-
#
|
|
279
|
+
#
|
|
232
280
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
233
|
-
# @return [Response] A Response object with data of type OCI::ObjectStorage::Models::MultipartUpload
|
|
281
|
+
# @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::MultipartUpload MultipartUpload}
|
|
234
282
|
def create_multipart_upload(namespace_name, bucket_name, create_multipart_upload_details, opts = {})
|
|
235
|
-
logger.debug
|
|
283
|
+
logger.debug 'Calling operation ObjectStorageClient#create_multipart_upload.' if logger
|
|
236
284
|
|
|
237
285
|
raise "Missing the required parameter 'namespace_name' when calling create_multipart_upload." if namespace_name.nil?
|
|
238
286
|
raise "Missing the required parameter 'bucket_name' when calling create_multipart_upload." if bucket_name.nil?
|
|
239
287
|
raise "Missing the required parameter 'create_multipart_upload_details' when calling create_multipart_upload." if create_multipart_upload_details.nil?
|
|
240
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
241
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
288
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
289
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
242
290
|
|
|
243
|
-
path =
|
|
291
|
+
path = '/n/{namespaceName}/b/{bucketName}/u'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
|
|
292
|
+
operation_signing_strategy = :standard
|
|
244
293
|
|
|
245
294
|
# Query Params
|
|
246
295
|
query_params = {}
|
|
@@ -249,42 +298,53 @@ module OCI
|
|
|
249
298
|
header_params = {}
|
|
250
299
|
header_params['accept'] = 'application/json'
|
|
251
300
|
header_params['content-type'] = 'application/json'
|
|
252
|
-
header_params[:'if-match'] = opts[:
|
|
253
|
-
header_params[:'if-none-match'] = opts[:
|
|
254
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
301
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
302
|
+
header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
|
|
303
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
255
304
|
|
|
256
305
|
post_body = @api_client.object_to_http_body(create_multipart_upload_details)
|
|
257
306
|
|
|
258
|
-
|
|
307
|
+
@api_client.call_api(
|
|
259
308
|
:POST,
|
|
260
309
|
path,
|
|
261
310
|
endpoint,
|
|
262
|
-
:
|
|
263
|
-
:
|
|
264
|
-
:
|
|
265
|
-
:
|
|
311
|
+
header_params: header_params,
|
|
312
|
+
query_params: query_params,
|
|
313
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
314
|
+
body: post_body,
|
|
315
|
+
return_type: 'OCI::ObjectStorage::Models::MultipartUpload'
|
|
316
|
+
)
|
|
266
317
|
end
|
|
318
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
319
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
320
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
321
|
+
|
|
322
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
323
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
324
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
325
|
+
|
|
267
326
|
|
|
268
327
|
# Creates a pre-authenticated request specific to the bucket.
|
|
269
|
-
#
|
|
328
|
+
#
|
|
270
329
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
271
330
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
272
331
|
# Example: `my-new-bucket1`
|
|
273
|
-
#
|
|
274
|
-
# @param [CreatePreauthenticatedRequestDetails] create_preauthenticated_request_details Information needed to create the pre-authenticated request.
|
|
332
|
+
#
|
|
333
|
+
# @param [OCI::ObjectStorage::Models::CreatePreauthenticatedRequestDetails] create_preauthenticated_request_details Information needed to create the pre-authenticated request.
|
|
275
334
|
# @param [Hash] opts the optional parameters
|
|
276
335
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
277
|
-
# @return [Response] A Response object with data of type OCI::ObjectStorage::Models::PreauthenticatedRequest
|
|
336
|
+
# @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::PreauthenticatedRequest PreauthenticatedRequest}
|
|
278
337
|
def create_preauthenticated_request(namespace_name, bucket_name, create_preauthenticated_request_details, opts = {})
|
|
279
|
-
logger.debug
|
|
338
|
+
logger.debug 'Calling operation ObjectStorageClient#create_preauthenticated_request.' if logger
|
|
280
339
|
|
|
281
340
|
raise "Missing the required parameter 'namespace_name' when calling create_preauthenticated_request." if namespace_name.nil?
|
|
282
341
|
raise "Missing the required parameter 'bucket_name' when calling create_preauthenticated_request." if bucket_name.nil?
|
|
283
342
|
raise "Missing the required parameter 'create_preauthenticated_request_details' when calling create_preauthenticated_request." if create_preauthenticated_request_details.nil?
|
|
284
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
285
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
343
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
344
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
286
345
|
|
|
287
|
-
path =
|
|
346
|
+
path = '/n/{namespaceName}/b/{bucketName}/p/'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
|
|
347
|
+
operation_signing_strategy = :standard
|
|
288
348
|
|
|
289
349
|
# Query Params
|
|
290
350
|
query_params = {}
|
|
@@ -293,41 +353,52 @@ module OCI
|
|
|
293
353
|
header_params = {}
|
|
294
354
|
header_params['accept'] = 'application/json'
|
|
295
355
|
header_params['content-type'] = 'application/json'
|
|
296
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
356
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
297
357
|
|
|
298
358
|
post_body = @api_client.object_to_http_body(create_preauthenticated_request_details)
|
|
299
359
|
|
|
300
|
-
|
|
360
|
+
@api_client.call_api(
|
|
301
361
|
:POST,
|
|
302
362
|
path,
|
|
303
363
|
endpoint,
|
|
304
|
-
:
|
|
305
|
-
:
|
|
306
|
-
:
|
|
307
|
-
:
|
|
364
|
+
header_params: header_params,
|
|
365
|
+
query_params: query_params,
|
|
366
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
367
|
+
body: post_body,
|
|
368
|
+
return_type: 'OCI::ObjectStorage::Models::PreauthenticatedRequest'
|
|
369
|
+
)
|
|
308
370
|
end
|
|
371
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
372
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
373
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
374
|
+
|
|
375
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
376
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
377
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
378
|
+
|
|
309
379
|
|
|
310
380
|
# Deletes a bucket if it is already empty. If the bucket is not empty, use {#delete_object delete_object} first.
|
|
311
|
-
#
|
|
381
|
+
#
|
|
312
382
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
313
383
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
314
384
|
# Example: `my-new-bucket1`
|
|
315
|
-
#
|
|
385
|
+
#
|
|
316
386
|
# @param [Hash] opts the optional parameters
|
|
317
387
|
# @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
|
|
318
388
|
# For uploading a part, this is the entity tag of the target part.
|
|
319
|
-
#
|
|
389
|
+
#
|
|
320
390
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
321
391
|
# @return [Response] A Response object with data of type nil
|
|
322
392
|
def delete_bucket(namespace_name, bucket_name, opts = {})
|
|
323
|
-
logger.debug
|
|
393
|
+
logger.debug 'Calling operation ObjectStorageClient#delete_bucket.' if logger
|
|
324
394
|
|
|
325
395
|
raise "Missing the required parameter 'namespace_name' when calling delete_bucket." if namespace_name.nil?
|
|
326
396
|
raise "Missing the required parameter 'bucket_name' when calling delete_bucket." if bucket_name.nil?
|
|
327
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
328
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
397
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
398
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
329
399
|
|
|
330
|
-
path =
|
|
400
|
+
path = '/n/{namespaceName}/b/{bucketName}/'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
|
|
401
|
+
operation_signing_strategy = :standard
|
|
331
402
|
|
|
332
403
|
# Query Params
|
|
333
404
|
query_params = {}
|
|
@@ -336,46 +407,57 @@ module OCI
|
|
|
336
407
|
header_params = {}
|
|
337
408
|
header_params['accept'] = 'application/json'
|
|
338
409
|
header_params['content-type'] = 'application/json'
|
|
339
|
-
header_params[:'if-match'] = opts[:
|
|
340
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
410
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
411
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
341
412
|
|
|
342
413
|
post_body = nil
|
|
343
414
|
|
|
344
|
-
|
|
415
|
+
@api_client.call_api(
|
|
345
416
|
:DELETE,
|
|
346
417
|
path,
|
|
347
418
|
endpoint,
|
|
348
|
-
:
|
|
349
|
-
:
|
|
350
|
-
:
|
|
419
|
+
header_params: header_params,
|
|
420
|
+
query_params: query_params,
|
|
421
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
422
|
+
body: post_body
|
|
423
|
+
)
|
|
351
424
|
end
|
|
425
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
426
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
427
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
428
|
+
|
|
429
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
430
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
431
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
432
|
+
|
|
352
433
|
|
|
353
434
|
# Deletes an object.
|
|
354
|
-
#
|
|
435
|
+
#
|
|
355
436
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
356
437
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
357
438
|
# Example: `my-new-bucket1`
|
|
358
|
-
#
|
|
439
|
+
#
|
|
359
440
|
# @param [String] object_name The name of the object. Avoid entering confidential information.
|
|
360
441
|
# Example: `test/object1.log`
|
|
361
|
-
#
|
|
442
|
+
#
|
|
362
443
|
# @param [Hash] opts the optional parameters
|
|
363
444
|
# @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
|
|
364
445
|
# For uploading a part, this is the entity tag of the target part.
|
|
365
|
-
#
|
|
446
|
+
#
|
|
366
447
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
367
448
|
# @return [Response] A Response object with data of type nil
|
|
368
449
|
def delete_object(namespace_name, bucket_name, object_name, opts = {})
|
|
369
|
-
logger.debug
|
|
450
|
+
logger.debug 'Calling operation ObjectStorageClient#delete_object.' if logger
|
|
370
451
|
|
|
371
452
|
raise "Missing the required parameter 'namespace_name' when calling delete_object." if namespace_name.nil?
|
|
372
453
|
raise "Missing the required parameter 'bucket_name' when calling delete_object." if bucket_name.nil?
|
|
373
454
|
raise "Missing the required parameter 'object_name' when calling delete_object." if object_name.nil?
|
|
374
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
375
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
376
|
-
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util
|
|
455
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
456
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
457
|
+
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util.blank_string?(object_name)
|
|
377
458
|
|
|
378
|
-
path =
|
|
459
|
+
path = '/n/{namespaceName}/b/{bucketName}/o/{objectName}'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s).sub('{objectName}', object_name.to_s)
|
|
460
|
+
operation_signing_strategy = :standard
|
|
379
461
|
|
|
380
462
|
# Query Params
|
|
381
463
|
query_params = {}
|
|
@@ -384,42 +466,53 @@ module OCI
|
|
|
384
466
|
header_params = {}
|
|
385
467
|
header_params['accept'] = 'application/json'
|
|
386
468
|
header_params['content-type'] = 'application/json'
|
|
387
|
-
header_params[:'if-match'] = opts[:
|
|
388
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
469
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
470
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
389
471
|
|
|
390
472
|
post_body = nil
|
|
391
473
|
|
|
392
|
-
|
|
474
|
+
@api_client.call_api(
|
|
393
475
|
:DELETE,
|
|
394
476
|
path,
|
|
395
477
|
endpoint,
|
|
396
|
-
:
|
|
397
|
-
:
|
|
398
|
-
:
|
|
478
|
+
header_params: header_params,
|
|
479
|
+
query_params: query_params,
|
|
480
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
481
|
+
body: post_body
|
|
482
|
+
)
|
|
399
483
|
end
|
|
484
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
485
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
486
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
487
|
+
|
|
488
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
489
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
490
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
491
|
+
|
|
400
492
|
|
|
401
493
|
# Deletes the pre-authenticated request for the bucket.
|
|
402
494
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
403
495
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
404
496
|
# Example: `my-new-bucket1`
|
|
405
|
-
#
|
|
497
|
+
#
|
|
406
498
|
# @param [String] par_id The unique identifier for the pre-authenticated request. This can be used to manage operations against
|
|
407
499
|
# the pre-authenticated request, such as GET or DELETE.
|
|
408
|
-
#
|
|
500
|
+
#
|
|
409
501
|
# @param [Hash] opts the optional parameters
|
|
410
502
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
411
503
|
# @return [Response] A Response object with data of type nil
|
|
412
504
|
def delete_preauthenticated_request(namespace_name, bucket_name, par_id, opts = {})
|
|
413
|
-
logger.debug
|
|
505
|
+
logger.debug 'Calling operation ObjectStorageClient#delete_preauthenticated_request.' if logger
|
|
414
506
|
|
|
415
507
|
raise "Missing the required parameter 'namespace_name' when calling delete_preauthenticated_request." if namespace_name.nil?
|
|
416
508
|
raise "Missing the required parameter 'bucket_name' when calling delete_preauthenticated_request." if bucket_name.nil?
|
|
417
509
|
raise "Missing the required parameter 'par_id' when calling delete_preauthenticated_request." if par_id.nil?
|
|
418
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
419
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
420
|
-
raise "Parameter value for 'par_id' must not be blank" if OCI::Internal::Util
|
|
510
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
511
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
512
|
+
raise "Parameter value for 'par_id' must not be blank" if OCI::Internal::Util.blank_string?(par_id)
|
|
421
513
|
|
|
422
|
-
path =
|
|
514
|
+
path = '/n/{namespaceName}/b/{bucketName}/p/{parId}'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s).sub('{parId}', par_id.to_s)
|
|
515
|
+
operation_signing_strategy = :standard
|
|
423
516
|
|
|
424
517
|
# Query Params
|
|
425
518
|
query_params = {}
|
|
@@ -428,43 +521,54 @@ module OCI
|
|
|
428
521
|
header_params = {}
|
|
429
522
|
header_params['accept'] = 'application/json'
|
|
430
523
|
header_params['content-type'] = 'application/json'
|
|
431
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
524
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
432
525
|
|
|
433
526
|
post_body = nil
|
|
434
527
|
|
|
435
|
-
|
|
528
|
+
@api_client.call_api(
|
|
436
529
|
:DELETE,
|
|
437
530
|
path,
|
|
438
531
|
endpoint,
|
|
439
|
-
:
|
|
440
|
-
:
|
|
441
|
-
:
|
|
532
|
+
header_params: header_params,
|
|
533
|
+
query_params: query_params,
|
|
534
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
535
|
+
body: post_body
|
|
536
|
+
)
|
|
442
537
|
end
|
|
538
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
539
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
540
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
541
|
+
|
|
542
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
543
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
544
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
545
|
+
|
|
443
546
|
|
|
444
547
|
# Gets the current representation of the given bucket in the given namespace.
|
|
445
|
-
#
|
|
548
|
+
#
|
|
446
549
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
447
550
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
448
551
|
# Example: `my-new-bucket1`
|
|
449
|
-
#
|
|
552
|
+
#
|
|
450
553
|
# @param [Hash] opts the optional parameters
|
|
451
554
|
# @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
|
|
452
555
|
# For uploading a part, this is the entity tag of the target part.
|
|
453
|
-
#
|
|
556
|
+
#
|
|
454
557
|
# @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
|
|
455
558
|
# For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
|
|
456
|
-
#
|
|
559
|
+
#
|
|
457
560
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
458
|
-
# @return [Response] A Response object with data of type OCI::ObjectStorage::Models::Bucket
|
|
561
|
+
# @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::Bucket Bucket}
|
|
459
562
|
def get_bucket(namespace_name, bucket_name, opts = {})
|
|
460
|
-
logger.debug
|
|
563
|
+
logger.debug 'Calling operation ObjectStorageClient#get_bucket.' if logger
|
|
461
564
|
|
|
462
565
|
raise "Missing the required parameter 'namespace_name' when calling get_bucket." if namespace_name.nil?
|
|
463
566
|
raise "Missing the required parameter 'bucket_name' when calling get_bucket." if bucket_name.nil?
|
|
464
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
465
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
567
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
568
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
466
569
|
|
|
467
|
-
path =
|
|
570
|
+
path = '/n/{namespaceName}/b/{bucketName}/'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
|
|
571
|
+
operation_signing_strategy = :standard
|
|
468
572
|
|
|
469
573
|
# Query Params
|
|
470
574
|
query_params = {}
|
|
@@ -473,33 +577,44 @@ module OCI
|
|
|
473
577
|
header_params = {}
|
|
474
578
|
header_params['accept'] = 'application/json'
|
|
475
579
|
header_params['content-type'] = 'application/json'
|
|
476
|
-
header_params[:'if-match'] = opts[:
|
|
477
|
-
header_params[:'if-none-match'] = opts[:
|
|
478
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
580
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
581
|
+
header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
|
|
582
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
479
583
|
|
|
480
584
|
post_body = nil
|
|
481
585
|
|
|
482
|
-
|
|
586
|
+
@api_client.call_api(
|
|
483
587
|
:GET,
|
|
484
588
|
path,
|
|
485
589
|
endpoint,
|
|
486
|
-
:
|
|
487
|
-
:
|
|
488
|
-
:
|
|
489
|
-
:
|
|
590
|
+
header_params: header_params,
|
|
591
|
+
query_params: query_params,
|
|
592
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
593
|
+
body: post_body,
|
|
594
|
+
return_type: 'OCI::ObjectStorage::Models::Bucket'
|
|
595
|
+
)
|
|
490
596
|
end
|
|
597
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
598
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
599
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
600
|
+
|
|
601
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
602
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
603
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
604
|
+
|
|
491
605
|
|
|
492
606
|
# Namespaces are unique. Namespaces are either the tenancy name or a random string automatically generated during
|
|
493
607
|
# account creation. You cannot edit a namespace.
|
|
494
|
-
#
|
|
608
|
+
#
|
|
495
609
|
# @param [Hash] opts the optional parameters
|
|
496
610
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
497
611
|
# @return [Response] A Response object with data of type String
|
|
498
612
|
def get_namespace(opts = {})
|
|
499
|
-
logger.debug
|
|
613
|
+
logger.debug 'Calling operation ObjectStorageClient#get_namespace.' if logger
|
|
500
614
|
|
|
501
615
|
|
|
502
|
-
path =
|
|
616
|
+
path = '/n/'
|
|
617
|
+
operation_signing_strategy = :standard
|
|
503
618
|
|
|
504
619
|
# Query Params
|
|
505
620
|
query_params = {}
|
|
@@ -508,36 +623,47 @@ module OCI
|
|
|
508
623
|
header_params = {}
|
|
509
624
|
header_params['accept'] = 'application/json'
|
|
510
625
|
header_params['content-type'] = 'application/json'
|
|
511
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
626
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
512
627
|
|
|
513
628
|
post_body = nil
|
|
514
629
|
|
|
515
|
-
|
|
630
|
+
@api_client.call_api(
|
|
516
631
|
:GET,
|
|
517
632
|
path,
|
|
518
633
|
endpoint,
|
|
519
|
-
:
|
|
520
|
-
:
|
|
521
|
-
:
|
|
522
|
-
:
|
|
634
|
+
header_params: header_params,
|
|
635
|
+
query_params: query_params,
|
|
636
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
637
|
+
body: post_body,
|
|
638
|
+
return_type: 'String'
|
|
639
|
+
)
|
|
523
640
|
end
|
|
641
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
642
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
643
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
644
|
+
|
|
645
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
646
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
647
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
648
|
+
|
|
524
649
|
|
|
525
650
|
# Get the metadata for the namespace, which contains defaultS3CompartmentId and defaultSwiftCompartmentId.
|
|
526
651
|
# Any user with the NAMESPACE_READ permission will be able to see the current metadata. If you're not authorized,
|
|
527
652
|
# talk to an administrator. If you're an administrator who needs to write
|
|
528
653
|
# policies to give users access, see [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
|
|
529
|
-
#
|
|
654
|
+
#
|
|
530
655
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
531
656
|
# @param [Hash] opts the optional parameters
|
|
532
657
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
533
|
-
# @return [Response] A Response object with data of type OCI::ObjectStorage::Models::NamespaceMetadata
|
|
658
|
+
# @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::NamespaceMetadata NamespaceMetadata}
|
|
534
659
|
def get_namespace_metadata(namespace_name, opts = {})
|
|
535
|
-
logger.debug
|
|
660
|
+
logger.debug 'Calling operation ObjectStorageClient#get_namespace_metadata.' if logger
|
|
536
661
|
|
|
537
662
|
raise "Missing the required parameter 'namespace_name' when calling get_namespace_metadata." if namespace_name.nil?
|
|
538
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
663
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
539
664
|
|
|
540
|
-
path =
|
|
665
|
+
path = '/n/{namespaceName}'.sub('{namespaceName}', namespace_name.to_s)
|
|
666
|
+
operation_signing_strategy = :standard
|
|
541
667
|
|
|
542
668
|
# Query Params
|
|
543
669
|
query_params = {}
|
|
@@ -546,54 +672,65 @@ module OCI
|
|
|
546
672
|
header_params = {}
|
|
547
673
|
header_params['accept'] = 'application/json'
|
|
548
674
|
header_params['content-type'] = 'application/json'
|
|
549
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
675
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
550
676
|
|
|
551
677
|
post_body = nil
|
|
552
678
|
|
|
553
|
-
|
|
679
|
+
@api_client.call_api(
|
|
554
680
|
:GET,
|
|
555
681
|
path,
|
|
556
682
|
endpoint,
|
|
557
|
-
:
|
|
558
|
-
:
|
|
559
|
-
:
|
|
560
|
-
:
|
|
683
|
+
header_params: header_params,
|
|
684
|
+
query_params: query_params,
|
|
685
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
686
|
+
body: post_body,
|
|
687
|
+
return_type: 'OCI::ObjectStorage::Models::NamespaceMetadata'
|
|
688
|
+
)
|
|
561
689
|
end
|
|
690
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
691
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
692
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
693
|
+
|
|
694
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
695
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
696
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
697
|
+
|
|
562
698
|
|
|
563
699
|
# Gets the metadata and body of an object.
|
|
564
|
-
#
|
|
700
|
+
#
|
|
565
701
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
566
702
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
567
703
|
# Example: `my-new-bucket1`
|
|
568
|
-
#
|
|
704
|
+
#
|
|
569
705
|
# @param [String] object_name The name of the object. Avoid entering confidential information.
|
|
570
706
|
# Example: `test/object1.log`
|
|
571
|
-
#
|
|
707
|
+
#
|
|
572
708
|
# @param [Hash] opts the optional parameters
|
|
573
709
|
# @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
|
|
574
710
|
# For uploading a part, this is the entity tag of the target part.
|
|
575
|
-
#
|
|
711
|
+
#
|
|
576
712
|
# @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
|
|
577
713
|
# For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
|
|
578
|
-
#
|
|
714
|
+
#
|
|
579
715
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
580
716
|
# @option opts [String] :range Optional byte range to fetch, as described in [RFC 7233](https://tools.ietf.org/rfc/rfc7233), section 2.1.
|
|
581
717
|
# Note that only a single range of bytes is supported.
|
|
582
|
-
#
|
|
718
|
+
#
|
|
583
719
|
# @option opts [String, IO] :response_target Streaming http body into a file (specified by file name or File object) or IO object if the block is not given
|
|
584
720
|
# @option [Block] &block Streaming http body to the block
|
|
585
721
|
# @return [Response] A Response object with data of type String if response_target and block are not given, otherwise with nil data
|
|
586
722
|
def get_object(namespace_name, bucket_name, object_name, opts = {}, &block)
|
|
587
|
-
logger.debug
|
|
723
|
+
logger.debug 'Calling operation ObjectStorageClient#get_object.' if logger
|
|
588
724
|
|
|
589
725
|
raise "Missing the required parameter 'namespace_name' when calling get_object." if namespace_name.nil?
|
|
590
726
|
raise "Missing the required parameter 'bucket_name' when calling get_object." if bucket_name.nil?
|
|
591
727
|
raise "Missing the required parameter 'object_name' when calling get_object." if object_name.nil?
|
|
592
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
593
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
594
|
-
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util
|
|
728
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
729
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
730
|
+
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util.blank_string?(object_name)
|
|
595
731
|
|
|
596
|
-
path =
|
|
732
|
+
path = '/n/{namespaceName}/b/{bucketName}/o/{objectName}'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s).sub('{objectName}', object_name.to_s)
|
|
733
|
+
operation_signing_strategy = :standard
|
|
597
734
|
|
|
598
735
|
# Query Params
|
|
599
736
|
query_params = {}
|
|
@@ -602,85 +739,98 @@ module OCI
|
|
|
602
739
|
header_params = {}
|
|
603
740
|
header_params['accept'] = 'application/json'
|
|
604
741
|
header_params['content-type'] = 'application/json'
|
|
605
|
-
header_params[:'if-match'] = opts[:
|
|
606
|
-
header_params[:'if-none-match'] = opts[:
|
|
607
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
608
|
-
header_params[:
|
|
742
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
743
|
+
header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
|
|
744
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
745
|
+
header_params[:range] = opts[:range] if opts[:range]
|
|
609
746
|
|
|
610
747
|
post_body = nil
|
|
611
748
|
|
|
612
749
|
if !block.nil?
|
|
613
|
-
|
|
750
|
+
@api_client.call_api(
|
|
614
751
|
:GET,
|
|
615
752
|
path,
|
|
616
753
|
endpoint,
|
|
617
754
|
header_params: header_params,
|
|
618
755
|
query_params: query_params,
|
|
756
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
619
757
|
body: post_body,
|
|
620
758
|
return_type: 'Stream',
|
|
621
759
|
&block
|
|
622
760
|
)
|
|
623
761
|
elsif opts[:response_target]
|
|
624
762
|
if opts[:response_target].respond_to? :write
|
|
625
|
-
|
|
763
|
+
@api_client.call_api(
|
|
764
|
+
:GET,
|
|
765
|
+
path,
|
|
766
|
+
endpoint,
|
|
767
|
+
header_params: header_params,
|
|
768
|
+
query_params: query_params,
|
|
769
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
770
|
+
body: post_body,
|
|
771
|
+
return_type: 'Stream',
|
|
772
|
+
&proc { |chunk, _response| opts[:response_target].write(chunk) }
|
|
773
|
+
)
|
|
774
|
+
elsif opts[:response_target].is_a?(String)
|
|
775
|
+
File.open(opts[:response_target], 'wb') do |output|
|
|
776
|
+
return @api_client.call_api(
|
|
626
777
|
:GET,
|
|
627
778
|
path,
|
|
628
779
|
endpoint,
|
|
629
780
|
header_params: header_params,
|
|
630
781
|
query_params: query_params,
|
|
782
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
631
783
|
body: post_body,
|
|
632
784
|
return_type: 'Stream',
|
|
633
|
-
&proc { |chunk,
|
|
634
|
-
)
|
|
635
|
-
elsif opts[:response_target].is_a?(String)
|
|
636
|
-
open(opts[:response_target], 'wb') do |output|
|
|
637
|
-
return @api_client.call_api(
|
|
638
|
-
:GET,
|
|
639
|
-
path,
|
|
640
|
-
endpoint,
|
|
641
|
-
header_params: header_params,
|
|
642
|
-
query_params: query_params,
|
|
643
|
-
body: post_body,
|
|
644
|
-
return_type: 'Stream',
|
|
645
|
-
&proc { |chunk, response| output.write(chunk) }
|
|
785
|
+
&proc { |chunk, _response| output.write(chunk) }
|
|
646
786
|
)
|
|
647
787
|
end
|
|
648
788
|
end
|
|
649
789
|
else
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
790
|
+
@api_client.call_api(
|
|
791
|
+
:GET,
|
|
792
|
+
path,
|
|
793
|
+
endpoint,
|
|
794
|
+
header_params: header_params,
|
|
795
|
+
query_params: query_params,
|
|
796
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
797
|
+
body: post_body,
|
|
798
|
+
return_type: 'String'
|
|
658
799
|
)
|
|
659
800
|
end
|
|
660
801
|
end
|
|
802
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
803
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
804
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
805
|
+
|
|
806
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
807
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
808
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
809
|
+
|
|
661
810
|
|
|
662
811
|
# Gets the pre-authenticated request for the bucket.
|
|
663
812
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
664
813
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
665
814
|
# Example: `my-new-bucket1`
|
|
666
|
-
#
|
|
815
|
+
#
|
|
667
816
|
# @param [String] par_id The unique identifier for the pre-authenticated request. This can be used to manage operations against
|
|
668
817
|
# the pre-authenticated request, such as GET or DELETE.
|
|
669
|
-
#
|
|
818
|
+
#
|
|
670
819
|
# @param [Hash] opts the optional parameters
|
|
671
820
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
672
|
-
# @return [Response] A Response object with data of type OCI::ObjectStorage::Models::PreauthenticatedRequestSummary
|
|
821
|
+
# @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::PreauthenticatedRequestSummary PreauthenticatedRequestSummary}
|
|
673
822
|
def get_preauthenticated_request(namespace_name, bucket_name, par_id, opts = {})
|
|
674
|
-
logger.debug
|
|
823
|
+
logger.debug 'Calling operation ObjectStorageClient#get_preauthenticated_request.' if logger
|
|
675
824
|
|
|
676
825
|
raise "Missing the required parameter 'namespace_name' when calling get_preauthenticated_request." if namespace_name.nil?
|
|
677
826
|
raise "Missing the required parameter 'bucket_name' when calling get_preauthenticated_request." if bucket_name.nil?
|
|
678
827
|
raise "Missing the required parameter 'par_id' when calling get_preauthenticated_request." if par_id.nil?
|
|
679
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
680
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
681
|
-
raise "Parameter value for 'par_id' must not be blank" if OCI::Internal::Util
|
|
828
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
829
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
830
|
+
raise "Parameter value for 'par_id' must not be blank" if OCI::Internal::Util.blank_string?(par_id)
|
|
682
831
|
|
|
683
|
-
path =
|
|
832
|
+
path = '/n/{namespaceName}/b/{bucketName}/p/{parId}'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s).sub('{parId}', par_id.to_s)
|
|
833
|
+
operation_signing_strategy = :standard
|
|
684
834
|
|
|
685
835
|
# Query Params
|
|
686
836
|
query_params = {}
|
|
@@ -689,44 +839,55 @@ module OCI
|
|
|
689
839
|
header_params = {}
|
|
690
840
|
header_params['accept'] = 'application/json'
|
|
691
841
|
header_params['content-type'] = 'application/json'
|
|
692
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
842
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
693
843
|
|
|
694
844
|
post_body = nil
|
|
695
845
|
|
|
696
|
-
|
|
846
|
+
@api_client.call_api(
|
|
697
847
|
:GET,
|
|
698
848
|
path,
|
|
699
849
|
endpoint,
|
|
700
|
-
:
|
|
701
|
-
:
|
|
702
|
-
:
|
|
703
|
-
:
|
|
850
|
+
header_params: header_params,
|
|
851
|
+
query_params: query_params,
|
|
852
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
853
|
+
body: post_body,
|
|
854
|
+
return_type: 'OCI::ObjectStorage::Models::PreauthenticatedRequestSummary'
|
|
855
|
+
)
|
|
704
856
|
end
|
|
857
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
858
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
859
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
860
|
+
|
|
861
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
862
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
863
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
864
|
+
|
|
705
865
|
|
|
706
866
|
# Efficiently checks to see if a bucket exists and gets the current ETag for the bucket.
|
|
707
|
-
#
|
|
867
|
+
#
|
|
708
868
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
709
869
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
710
870
|
# Example: `my-new-bucket1`
|
|
711
|
-
#
|
|
871
|
+
#
|
|
712
872
|
# @param [Hash] opts the optional parameters
|
|
713
873
|
# @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
|
|
714
874
|
# For uploading a part, this is the entity tag of the target part.
|
|
715
|
-
#
|
|
875
|
+
#
|
|
716
876
|
# @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
|
|
717
877
|
# For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
|
|
718
|
-
#
|
|
878
|
+
#
|
|
719
879
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
720
880
|
# @return [Response] A Response object with data of type nil
|
|
721
881
|
def head_bucket(namespace_name, bucket_name, opts = {})
|
|
722
|
-
logger.debug
|
|
882
|
+
logger.debug 'Calling operation ObjectStorageClient#head_bucket.' if logger
|
|
723
883
|
|
|
724
884
|
raise "Missing the required parameter 'namespace_name' when calling head_bucket." if namespace_name.nil?
|
|
725
885
|
raise "Missing the required parameter 'bucket_name' when calling head_bucket." if bucket_name.nil?
|
|
726
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
727
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
886
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
887
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
728
888
|
|
|
729
|
-
path =
|
|
889
|
+
path = '/n/{namespaceName}/b/{bucketName}/'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
|
|
890
|
+
operation_signing_strategy = :standard
|
|
730
891
|
|
|
731
892
|
# Query Params
|
|
732
893
|
query_params = {}
|
|
@@ -735,50 +896,61 @@ module OCI
|
|
|
735
896
|
header_params = {}
|
|
736
897
|
header_params['accept'] = 'application/json'
|
|
737
898
|
header_params['content-type'] = 'application/json'
|
|
738
|
-
header_params[:'if-match'] = opts[:
|
|
739
|
-
header_params[:'if-none-match'] = opts[:
|
|
740
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
899
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
900
|
+
header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
|
|
901
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
741
902
|
|
|
742
903
|
post_body = nil
|
|
743
904
|
|
|
744
|
-
|
|
905
|
+
@api_client.call_api(
|
|
745
906
|
:HEAD,
|
|
746
907
|
path,
|
|
747
908
|
endpoint,
|
|
748
|
-
:
|
|
749
|
-
:
|
|
750
|
-
:
|
|
909
|
+
header_params: header_params,
|
|
910
|
+
query_params: query_params,
|
|
911
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
912
|
+
body: post_body
|
|
913
|
+
)
|
|
751
914
|
end
|
|
915
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
916
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
917
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
918
|
+
|
|
919
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
920
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
921
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
922
|
+
|
|
752
923
|
|
|
753
924
|
# Gets the user-defined metadata and entity tag for an object.
|
|
754
|
-
#
|
|
925
|
+
#
|
|
755
926
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
756
927
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
757
928
|
# Example: `my-new-bucket1`
|
|
758
|
-
#
|
|
929
|
+
#
|
|
759
930
|
# @param [String] object_name The name of the object. Avoid entering confidential information.
|
|
760
931
|
# Example: `test/object1.log`
|
|
761
|
-
#
|
|
932
|
+
#
|
|
762
933
|
# @param [Hash] opts the optional parameters
|
|
763
934
|
# @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
|
|
764
935
|
# For uploading a part, this is the entity tag of the target part.
|
|
765
|
-
#
|
|
936
|
+
#
|
|
766
937
|
# @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
|
|
767
938
|
# For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
|
|
768
|
-
#
|
|
939
|
+
#
|
|
769
940
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
770
941
|
# @return [Response] A Response object with data of type nil
|
|
771
942
|
def head_object(namespace_name, bucket_name, object_name, opts = {})
|
|
772
|
-
logger.debug
|
|
943
|
+
logger.debug 'Calling operation ObjectStorageClient#head_object.' if logger
|
|
773
944
|
|
|
774
945
|
raise "Missing the required parameter 'namespace_name' when calling head_object." if namespace_name.nil?
|
|
775
946
|
raise "Missing the required parameter 'bucket_name' when calling head_object." if bucket_name.nil?
|
|
776
947
|
raise "Missing the required parameter 'object_name' when calling head_object." if object_name.nil?
|
|
777
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
778
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
779
|
-
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util
|
|
948
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
949
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
950
|
+
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util.blank_string?(object_name)
|
|
780
951
|
|
|
781
|
-
path =
|
|
952
|
+
path = '/n/{namespaceName}/b/{bucketName}/o/{objectName}'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s).sub('{objectName}', object_name.to_s)
|
|
953
|
+
operation_signing_strategy = :standard
|
|
782
954
|
|
|
783
955
|
# Query Params
|
|
784
956
|
query_params = {}
|
|
@@ -787,28 +959,38 @@ module OCI
|
|
|
787
959
|
header_params = {}
|
|
788
960
|
header_params['accept'] = 'application/json'
|
|
789
961
|
header_params['content-type'] = 'application/json'
|
|
790
|
-
header_params[:'if-match'] = opts[:
|
|
791
|
-
header_params[:'if-none-match'] = opts[:
|
|
792
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
962
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
963
|
+
header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
|
|
964
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
793
965
|
|
|
794
966
|
post_body = nil
|
|
795
967
|
|
|
796
|
-
|
|
968
|
+
@api_client.call_api(
|
|
797
969
|
:HEAD,
|
|
798
970
|
path,
|
|
799
971
|
endpoint,
|
|
800
|
-
:
|
|
801
|
-
:
|
|
802
|
-
:
|
|
972
|
+
header_params: header_params,
|
|
973
|
+
query_params: query_params,
|
|
974
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
975
|
+
body: post_body
|
|
976
|
+
)
|
|
803
977
|
end
|
|
978
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
979
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
980
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
981
|
+
|
|
982
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
983
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
984
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
985
|
+
|
|
804
986
|
|
|
805
987
|
# Gets a list of all `BucketSummary`s in a compartment. A `BucketSummary` contains only summary fields for the bucket
|
|
806
988
|
# and does not contain fields like the user-defined metadata.
|
|
807
|
-
#
|
|
989
|
+
#
|
|
808
990
|
# To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized,
|
|
809
991
|
# talk to an administrator. If you're an administrator who needs to write policies to give users access, see
|
|
810
992
|
# [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
|
|
811
|
-
#
|
|
993
|
+
#
|
|
812
994
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
813
995
|
# @param [String] compartment_id The ID of the compartment in which to list buckets.
|
|
814
996
|
# @param [Hash] opts the optional parameters
|
|
@@ -817,160 +999,193 @@ module OCI
|
|
|
817
999
|
# @option opts [Array<String>] :fields Bucket summary in list of buckets includes the 'namespace', 'name', 'compartmentId', 'createdBy', 'timeCreated',
|
|
818
1000
|
# and 'etag' fields. This parameter can also include 'tags' (freeformTags and definedTags). The only supported value
|
|
819
1001
|
# of this parameter is 'tags' for now. Example 'tags'.
|
|
820
|
-
#
|
|
1002
|
+
#
|
|
821
1003
|
# Allowed values are: tags
|
|
822
1004
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
823
|
-
# @return [Response] A Response object with data of type Array<OCI::ObjectStorage::Models::BucketSummary>
|
|
1005
|
+
# @return [Response] A Response object with data of type Array<{OCI::ObjectStorage::Models::BucketSummary BucketSummary}>
|
|
824
1006
|
def list_buckets(namespace_name, compartment_id, opts = {})
|
|
825
|
-
logger.debug
|
|
1007
|
+
logger.debug 'Calling operation ObjectStorageClient#list_buckets.' if logger
|
|
826
1008
|
|
|
827
1009
|
raise "Missing the required parameter 'namespace_name' when calling list_buckets." if namespace_name.nil?
|
|
828
1010
|
raise "Missing the required parameter 'compartment_id' when calling list_buckets." if compartment_id.nil?
|
|
829
1011
|
|
|
830
|
-
|
|
831
|
-
fields_allowable_values = [
|
|
832
|
-
if opts[:
|
|
833
|
-
opts[:
|
|
1012
|
+
|
|
1013
|
+
fields_allowable_values = %w[tags]
|
|
1014
|
+
if opts[:fields] && !opts[:fields].empty?
|
|
1015
|
+
opts[:fields].each do |val_to_check|
|
|
834
1016
|
unless fields_allowable_values.include?(val_to_check)
|
|
835
1017
|
raise 'Invalid value for "fields", must be one of tags.'
|
|
836
1018
|
end
|
|
837
1019
|
end
|
|
838
1020
|
end
|
|
839
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
1021
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
840
1022
|
|
|
841
|
-
path =
|
|
1023
|
+
path = '/n/{namespaceName}/b/'.sub('{namespaceName}', namespace_name.to_s)
|
|
1024
|
+
operation_signing_strategy = :standard
|
|
842
1025
|
|
|
843
1026
|
# Query Params
|
|
844
1027
|
query_params = {}
|
|
845
|
-
query_params[:
|
|
846
|
-
query_params[:
|
|
847
|
-
query_params[:
|
|
848
|
-
query_params[:
|
|
1028
|
+
query_params[:compartmentId] = compartment_id
|
|
1029
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1030
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1031
|
+
query_params[:fields] = OCI::ApiClient.build_collection_params(opts[:fields], :csv) if opts[:fields] && !opts[:fields].empty?
|
|
849
1032
|
|
|
850
1033
|
# Header Params
|
|
851
1034
|
header_params = {}
|
|
852
1035
|
header_params['accept'] = 'application/json'
|
|
853
1036
|
header_params['content-type'] = 'application/json'
|
|
854
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
1037
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
855
1038
|
|
|
856
1039
|
post_body = nil
|
|
857
1040
|
|
|
858
|
-
|
|
1041
|
+
@api_client.call_api(
|
|
859
1042
|
:GET,
|
|
860
1043
|
path,
|
|
861
1044
|
endpoint,
|
|
862
|
-
:
|
|
863
|
-
:
|
|
864
|
-
:
|
|
865
|
-
:
|
|
1045
|
+
header_params: header_params,
|
|
1046
|
+
query_params: query_params,
|
|
1047
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1048
|
+
body: post_body,
|
|
1049
|
+
return_type: 'Array<OCI::ObjectStorage::Models::BucketSummary>'
|
|
1050
|
+
)
|
|
866
1051
|
end
|
|
1052
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1053
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1054
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1055
|
+
|
|
1056
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1057
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1058
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1059
|
+
|
|
867
1060
|
|
|
868
1061
|
# Lists the parts of an in-progress multipart upload.
|
|
869
|
-
#
|
|
1062
|
+
#
|
|
870
1063
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
871
1064
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
872
1065
|
# Example: `my-new-bucket1`
|
|
873
|
-
#
|
|
1066
|
+
#
|
|
874
1067
|
# @param [String] object_name The name of the object. Avoid entering confidential information.
|
|
875
1068
|
# Example: `test/object1.log`
|
|
876
|
-
#
|
|
1069
|
+
#
|
|
877
1070
|
# @param [String] upload_id The upload ID for a multipart upload.
|
|
878
1071
|
# @param [Hash] opts the optional parameters
|
|
879
1072
|
# @option opts [Integer] :limit The maximum number of items to return.
|
|
880
1073
|
# @option opts [String] :page The page at which to start retrieving results.
|
|
881
1074
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
882
|
-
# @return [Response] A Response object with data of type Array<OCI::ObjectStorage::Models::MultipartUploadPartSummary>
|
|
1075
|
+
# @return [Response] A Response object with data of type Array<{OCI::ObjectStorage::Models::MultipartUploadPartSummary MultipartUploadPartSummary}>
|
|
883
1076
|
def list_multipart_upload_parts(namespace_name, bucket_name, object_name, upload_id, opts = {})
|
|
884
|
-
logger.debug
|
|
1077
|
+
logger.debug 'Calling operation ObjectStorageClient#list_multipart_upload_parts.' if logger
|
|
885
1078
|
|
|
886
1079
|
raise "Missing the required parameter 'namespace_name' when calling list_multipart_upload_parts." if namespace_name.nil?
|
|
887
1080
|
raise "Missing the required parameter 'bucket_name' when calling list_multipart_upload_parts." if bucket_name.nil?
|
|
888
1081
|
raise "Missing the required parameter 'object_name' when calling list_multipart_upload_parts." if object_name.nil?
|
|
889
1082
|
raise "Missing the required parameter 'upload_id' when calling list_multipart_upload_parts." if upload_id.nil?
|
|
890
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
891
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
892
|
-
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util
|
|
1083
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
1084
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
1085
|
+
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util.blank_string?(object_name)
|
|
893
1086
|
|
|
894
|
-
path =
|
|
1087
|
+
path = '/n/{namespaceName}/b/{bucketName}/u/{objectName}'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s).sub('{objectName}', object_name.to_s)
|
|
1088
|
+
operation_signing_strategy = :standard
|
|
895
1089
|
|
|
896
1090
|
# Query Params
|
|
897
1091
|
query_params = {}
|
|
898
|
-
query_params[:
|
|
899
|
-
query_params[:
|
|
900
|
-
query_params[:
|
|
1092
|
+
query_params[:uploadId] = upload_id
|
|
1093
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1094
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
901
1095
|
|
|
902
1096
|
# Header Params
|
|
903
1097
|
header_params = {}
|
|
904
1098
|
header_params['accept'] = 'application/json'
|
|
905
1099
|
header_params['content-type'] = 'application/json'
|
|
906
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
1100
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
907
1101
|
|
|
908
1102
|
post_body = nil
|
|
909
1103
|
|
|
910
|
-
|
|
1104
|
+
@api_client.call_api(
|
|
911
1105
|
:GET,
|
|
912
1106
|
path,
|
|
913
1107
|
endpoint,
|
|
914
|
-
:
|
|
915
|
-
:
|
|
916
|
-
:
|
|
917
|
-
:
|
|
1108
|
+
header_params: header_params,
|
|
1109
|
+
query_params: query_params,
|
|
1110
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1111
|
+
body: post_body,
|
|
1112
|
+
return_type: 'Array<OCI::ObjectStorage::Models::MultipartUploadPartSummary>'
|
|
1113
|
+
)
|
|
918
1114
|
end
|
|
1115
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1116
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1117
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1118
|
+
|
|
1119
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1120
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1121
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1122
|
+
|
|
919
1123
|
|
|
920
1124
|
# Lists all in-progress multipart uploads for the given bucket in the given namespace.
|
|
921
|
-
#
|
|
1125
|
+
#
|
|
922
1126
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
923
1127
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
924
1128
|
# Example: `my-new-bucket1`
|
|
925
|
-
#
|
|
1129
|
+
#
|
|
926
1130
|
# @param [Hash] opts the optional parameters
|
|
927
1131
|
# @option opts [Integer] :limit The maximum number of items to return.
|
|
928
1132
|
# @option opts [String] :page The page at which to start retrieving results.
|
|
929
1133
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
930
|
-
# @return [Response] A Response object with data of type Array<OCI::ObjectStorage::Models::MultipartUpload>
|
|
1134
|
+
# @return [Response] A Response object with data of type Array<{OCI::ObjectStorage::Models::MultipartUpload MultipartUpload}>
|
|
931
1135
|
def list_multipart_uploads(namespace_name, bucket_name, opts = {})
|
|
932
|
-
logger.debug
|
|
1136
|
+
logger.debug 'Calling operation ObjectStorageClient#list_multipart_uploads.' if logger
|
|
933
1137
|
|
|
934
1138
|
raise "Missing the required parameter 'namespace_name' when calling list_multipart_uploads." if namespace_name.nil?
|
|
935
1139
|
raise "Missing the required parameter 'bucket_name' when calling list_multipart_uploads." if bucket_name.nil?
|
|
936
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
937
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
1140
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
1141
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
938
1142
|
|
|
939
|
-
path =
|
|
1143
|
+
path = '/n/{namespaceName}/b/{bucketName}/u'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
|
|
1144
|
+
operation_signing_strategy = :standard
|
|
940
1145
|
|
|
941
1146
|
# Query Params
|
|
942
1147
|
query_params = {}
|
|
943
|
-
query_params[:
|
|
944
|
-
query_params[:
|
|
1148
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1149
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
945
1150
|
|
|
946
1151
|
# Header Params
|
|
947
1152
|
header_params = {}
|
|
948
1153
|
header_params['accept'] = 'application/json'
|
|
949
1154
|
header_params['content-type'] = 'application/json'
|
|
950
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
1155
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
951
1156
|
|
|
952
1157
|
post_body = nil
|
|
953
1158
|
|
|
954
|
-
|
|
1159
|
+
@api_client.call_api(
|
|
955
1160
|
:GET,
|
|
956
1161
|
path,
|
|
957
1162
|
endpoint,
|
|
958
|
-
:
|
|
959
|
-
:
|
|
960
|
-
:
|
|
961
|
-
:
|
|
1163
|
+
header_params: header_params,
|
|
1164
|
+
query_params: query_params,
|
|
1165
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1166
|
+
body: post_body,
|
|
1167
|
+
return_type: 'Array<OCI::ObjectStorage::Models::MultipartUpload>'
|
|
1168
|
+
)
|
|
962
1169
|
end
|
|
1170
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1171
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1172
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1173
|
+
|
|
1174
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1175
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1176
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1177
|
+
|
|
963
1178
|
|
|
964
1179
|
# Lists the objects in a bucket.
|
|
965
|
-
#
|
|
1180
|
+
#
|
|
966
1181
|
# To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized,
|
|
967
1182
|
# talk to an administrator. If you're an administrator who needs to write policies to give users access, see
|
|
968
1183
|
# [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
|
|
969
|
-
#
|
|
1184
|
+
#
|
|
970
1185
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
971
1186
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
972
1187
|
# Example: `my-new-bucket1`
|
|
973
|
-
#
|
|
1188
|
+
#
|
|
974
1189
|
# @param [Hash] opts the optional parameters
|
|
975
1190
|
# @option opts [String] :prefix The string to use for matching against the start of object names in a list query.
|
|
976
1191
|
# @option opts [String] :start Object names returned by a list query must be greater or equal to this parameter.
|
|
@@ -981,135 +1196,159 @@ module OCI
|
|
|
981
1196
|
# Scanned objects whose names contain the delimiter have the part of their name up to the first
|
|
982
1197
|
# occurrence of the delimiter (including the optional prefix) returned as a set of prefixes.
|
|
983
1198
|
# Note that only '/' is a supported delimiter character at this time.
|
|
984
|
-
#
|
|
1199
|
+
#
|
|
985
1200
|
# @option opts [String] :fields Object summary in list of objects includes the 'name' field. This parameter can also include 'size'
|
|
986
1201
|
# (object size in bytes), 'md5', and 'timeCreated' (object creation date and time) fields.
|
|
987
1202
|
# Value of this parameter should be a comma-separated, case-insensitive list of those field names.
|
|
988
1203
|
# For example 'name,timeCreated,md5'.
|
|
989
|
-
#
|
|
1204
|
+
#
|
|
990
1205
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
991
|
-
# @return [Response] A Response object with data of type OCI::ObjectStorage::Models::ListObjects
|
|
1206
|
+
# @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::ListObjects ListObjects}
|
|
992
1207
|
def list_objects(namespace_name, bucket_name, opts = {})
|
|
993
|
-
logger.debug
|
|
1208
|
+
logger.debug 'Calling operation ObjectStorageClient#list_objects.' if logger
|
|
994
1209
|
|
|
995
1210
|
raise "Missing the required parameter 'namespace_name' when calling list_objects." if namespace_name.nil?
|
|
996
1211
|
raise "Missing the required parameter 'bucket_name' when calling list_objects." if bucket_name.nil?
|
|
997
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
998
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
1212
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
1213
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
999
1214
|
|
|
1000
|
-
path =
|
|
1215
|
+
path = '/n/{namespaceName}/b/{bucketName}/o'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
|
|
1216
|
+
operation_signing_strategy = :standard
|
|
1001
1217
|
|
|
1002
1218
|
# Query Params
|
|
1003
1219
|
query_params = {}
|
|
1004
|
-
query_params[:
|
|
1005
|
-
query_params[:
|
|
1006
|
-
query_params[:
|
|
1007
|
-
query_params[:
|
|
1008
|
-
query_params[:
|
|
1009
|
-
query_params[:
|
|
1220
|
+
query_params[:prefix] = opts[:prefix] if opts[:prefix]
|
|
1221
|
+
query_params[:start] = opts[:start] if opts[:start]
|
|
1222
|
+
query_params[:end] = opts[:_end] if opts[:_end]
|
|
1223
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1224
|
+
query_params[:delimiter] = opts[:delimiter] if opts[:delimiter]
|
|
1225
|
+
query_params[:fields] = opts[:fields] if opts[:fields]
|
|
1010
1226
|
|
|
1011
1227
|
# Header Params
|
|
1012
1228
|
header_params = {}
|
|
1013
1229
|
header_params['accept'] = 'application/json'
|
|
1014
1230
|
header_params['content-type'] = 'application/json'
|
|
1015
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
1231
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
1016
1232
|
|
|
1017
1233
|
post_body = nil
|
|
1018
1234
|
|
|
1019
|
-
|
|
1235
|
+
@api_client.call_api(
|
|
1020
1236
|
:GET,
|
|
1021
1237
|
path,
|
|
1022
1238
|
endpoint,
|
|
1023
|
-
:
|
|
1024
|
-
:
|
|
1025
|
-
:
|
|
1026
|
-
:
|
|
1239
|
+
header_params: header_params,
|
|
1240
|
+
query_params: query_params,
|
|
1241
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1242
|
+
body: post_body,
|
|
1243
|
+
return_type: 'OCI::ObjectStorage::Models::ListObjects'
|
|
1244
|
+
)
|
|
1027
1245
|
end
|
|
1246
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1247
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1248
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1249
|
+
|
|
1250
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1251
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1252
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1253
|
+
|
|
1028
1254
|
|
|
1029
1255
|
# Lists pre-authenticated requests for the bucket.
|
|
1030
|
-
#
|
|
1256
|
+
#
|
|
1031
1257
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
1032
1258
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
1033
1259
|
# Example: `my-new-bucket1`
|
|
1034
|
-
#
|
|
1260
|
+
#
|
|
1035
1261
|
# @param [Hash] opts the optional parameters
|
|
1036
1262
|
# @option opts [String] :object_name_prefix User-specified object name prefixes can be used to query and return a list of pre-authenticated requests.
|
|
1037
1263
|
# @option opts [Integer] :limit The maximum number of items to return.
|
|
1038
1264
|
# @option opts [String] :page The page at which to start retrieving results.
|
|
1039
1265
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
1040
|
-
# @return [Response] A Response object with data of type Array<OCI::ObjectStorage::Models::PreauthenticatedRequestSummary>
|
|
1266
|
+
# @return [Response] A Response object with data of type Array<{OCI::ObjectStorage::Models::PreauthenticatedRequestSummary PreauthenticatedRequestSummary}>
|
|
1041
1267
|
def list_preauthenticated_requests(namespace_name, bucket_name, opts = {})
|
|
1042
|
-
logger.debug
|
|
1268
|
+
logger.debug 'Calling operation ObjectStorageClient#list_preauthenticated_requests.' if logger
|
|
1043
1269
|
|
|
1044
1270
|
raise "Missing the required parameter 'namespace_name' when calling list_preauthenticated_requests." if namespace_name.nil?
|
|
1045
1271
|
raise "Missing the required parameter 'bucket_name' when calling list_preauthenticated_requests." if bucket_name.nil?
|
|
1046
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
1047
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
1272
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
1273
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
1048
1274
|
|
|
1049
|
-
path =
|
|
1275
|
+
path = '/n/{namespaceName}/b/{bucketName}/p/'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
|
|
1276
|
+
operation_signing_strategy = :standard
|
|
1050
1277
|
|
|
1051
1278
|
# Query Params
|
|
1052
1279
|
query_params = {}
|
|
1053
|
-
query_params[:
|
|
1054
|
-
query_params[:
|
|
1055
|
-
query_params[:
|
|
1280
|
+
query_params[:objectNamePrefix] = opts[:object_name_prefix] if opts[:object_name_prefix]
|
|
1281
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1282
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1056
1283
|
|
|
1057
1284
|
# Header Params
|
|
1058
1285
|
header_params = {}
|
|
1059
1286
|
header_params['accept'] = 'application/json'
|
|
1060
1287
|
header_params['content-type'] = 'application/json'
|
|
1061
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
1288
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
1062
1289
|
|
|
1063
1290
|
post_body = nil
|
|
1064
1291
|
|
|
1065
|
-
|
|
1292
|
+
@api_client.call_api(
|
|
1066
1293
|
:GET,
|
|
1067
1294
|
path,
|
|
1068
1295
|
endpoint,
|
|
1069
|
-
:
|
|
1070
|
-
:
|
|
1071
|
-
:
|
|
1072
|
-
:
|
|
1296
|
+
header_params: header_params,
|
|
1297
|
+
query_params: query_params,
|
|
1298
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1299
|
+
body: post_body,
|
|
1300
|
+
return_type: 'Array<OCI::ObjectStorage::Models::PreauthenticatedRequestSummary>'
|
|
1301
|
+
)
|
|
1073
1302
|
end
|
|
1303
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1304
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1305
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1306
|
+
|
|
1307
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1308
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1309
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1310
|
+
|
|
1074
1311
|
|
|
1075
1312
|
# Creates a new object or overwrites an existing one.
|
|
1076
|
-
#
|
|
1313
|
+
#
|
|
1077
1314
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
1078
1315
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
1079
1316
|
# Example: `my-new-bucket1`
|
|
1080
|
-
#
|
|
1317
|
+
#
|
|
1081
1318
|
# @param [String] object_name The name of the object. Avoid entering confidential information.
|
|
1082
1319
|
# Example: `test/object1.log`
|
|
1083
|
-
#
|
|
1320
|
+
#
|
|
1084
1321
|
# @param [String, IO] put_object_body The object to upload to the object store.
|
|
1085
1322
|
# @param [Hash] opts the optional parameters
|
|
1086
1323
|
# @option opts [Integer] :content_length The content length of the body.
|
|
1087
1324
|
# @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
|
|
1088
1325
|
# For uploading a part, this is the entity tag of the target part.
|
|
1089
|
-
#
|
|
1326
|
+
#
|
|
1090
1327
|
# @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
|
|
1091
1328
|
# For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
|
|
1092
|
-
#
|
|
1329
|
+
#
|
|
1093
1330
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
1094
1331
|
# @option opts [String] :expect 100-continue (default to 100-continue)
|
|
1095
1332
|
# @option opts [String] :content_md5 The base-64 encoded MD5 hash of the body.
|
|
1096
1333
|
# @option opts [String] :content_type The content type of the object. Defaults to 'application/octet-stream' if not overridden during the PutObject call.
|
|
1097
1334
|
# @option opts [String] :content_language The content language of the object.
|
|
1098
1335
|
# @option opts [String] :content_encoding The content encoding of the object.
|
|
1099
|
-
# @option opts [
|
|
1336
|
+
# @option opts [Hash<String, String>] :opc_meta Optional user-defined metadata key and value.
|
|
1337
|
+
# "opc-meta-" will be appended to each Hash key before it is sent to the server.
|
|
1100
1338
|
# @return [Response] A Response object with data of type nil
|
|
1101
1339
|
def put_object(namespace_name, bucket_name, object_name, put_object_body, opts = {})
|
|
1102
|
-
logger.debug
|
|
1340
|
+
logger.debug 'Calling operation ObjectStorageClient#put_object.' if logger
|
|
1103
1341
|
|
|
1104
1342
|
raise "Missing the required parameter 'namespace_name' when calling put_object." if namespace_name.nil?
|
|
1105
1343
|
raise "Missing the required parameter 'bucket_name' when calling put_object." if bucket_name.nil?
|
|
1106
1344
|
raise "Missing the required parameter 'object_name' when calling put_object." if object_name.nil?
|
|
1107
1345
|
raise "Missing the required parameter 'put_object_body' when calling put_object." if put_object_body.nil?
|
|
1108
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
1109
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
1110
|
-
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util
|
|
1346
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
1347
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
1348
|
+
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util.blank_string?(object_name)
|
|
1111
1349
|
|
|
1112
|
-
path =
|
|
1350
|
+
path = '/n/{namespaceName}/b/{bucketName}/o/{objectName}'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s).sub('{objectName}', object_name.to_s)
|
|
1351
|
+
operation_signing_strategy = :exclude_body
|
|
1113
1352
|
|
|
1114
1353
|
# Query Params
|
|
1115
1354
|
query_params = {}
|
|
@@ -1117,53 +1356,65 @@ module OCI
|
|
|
1117
1356
|
# Header Params
|
|
1118
1357
|
header_params = {}
|
|
1119
1358
|
header_params['accept'] = 'application/json'
|
|
1120
|
-
header_params[:'if-match'] = opts[:
|
|
1121
|
-
header_params[:'if-none-match'] = opts[:
|
|
1122
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
1123
|
-
header_params[:
|
|
1124
|
-
header_params[:'
|
|
1125
|
-
header_params[:'
|
|
1126
|
-
header_params[:'
|
|
1127
|
-
header_params[:'
|
|
1128
|
-
header_params[:'
|
|
1359
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
1360
|
+
header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
|
|
1361
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
1362
|
+
header_params[:expect] = opts[:expect] if opts[:expect]
|
|
1363
|
+
header_params[:'content-length'] = opts[:content_length] if opts[:content_length]
|
|
1364
|
+
header_params[:'content-md5'] = opts[:content_md5] if opts[:content_md5]
|
|
1365
|
+
header_params[:'content-type'] = opts[:content_type] if opts[:content_type]
|
|
1366
|
+
header_params[:'content-language'] = opts[:content_language] if opts[:content_language]
|
|
1367
|
+
header_params[:'content-encoding'] = opts[:content_encoding] if opts[:content_encoding]
|
|
1129
1368
|
|
|
1130
1369
|
if opts[:opc_meta]
|
|
1131
1370
|
opts[:opc_meta].each do |key, value|
|
|
1132
1371
|
header_params["opc-meta-#{key}".to_sym] = value
|
|
1133
1372
|
end
|
|
1134
1373
|
end
|
|
1374
|
+
header_params['content-type'] ||= 'application/octet-stream'
|
|
1135
1375
|
|
|
1136
1376
|
post_body = @api_client.object_to_http_body(put_object_body)
|
|
1137
1377
|
|
|
1138
|
-
|
|
1378
|
+
@api_client.call_api(
|
|
1139
1379
|
:PUT,
|
|
1140
1380
|
path,
|
|
1141
1381
|
endpoint,
|
|
1142
|
-
:
|
|
1143
|
-
:
|
|
1144
|
-
:
|
|
1382
|
+
header_params: header_params,
|
|
1383
|
+
query_params: query_params,
|
|
1384
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1385
|
+
body: post_body
|
|
1386
|
+
)
|
|
1145
1387
|
end
|
|
1388
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1389
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1390
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1391
|
+
|
|
1392
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1393
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1394
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1395
|
+
|
|
1146
1396
|
|
|
1147
1397
|
# Rename an object from source key to target key in the given namespace.
|
|
1148
|
-
#
|
|
1398
|
+
#
|
|
1149
1399
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
1150
1400
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
1151
1401
|
# Example: `my-new-bucket1`
|
|
1152
|
-
#
|
|
1153
|
-
# @param [RenameObjectDetails] rename_object_details The sourceName and newName of rename operation.
|
|
1402
|
+
#
|
|
1403
|
+
# @param [OCI::ObjectStorage::Models::RenameObjectDetails] rename_object_details The sourceName and newName of rename operation.
|
|
1154
1404
|
# @param [Hash] opts the optional parameters
|
|
1155
1405
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
1156
1406
|
# @return [Response] A Response object with data of type nil
|
|
1157
1407
|
def rename_object(namespace_name, bucket_name, rename_object_details, opts = {})
|
|
1158
|
-
logger.debug
|
|
1408
|
+
logger.debug 'Calling operation ObjectStorageClient#rename_object.' if logger
|
|
1159
1409
|
|
|
1160
1410
|
raise "Missing the required parameter 'namespace_name' when calling rename_object." if namespace_name.nil?
|
|
1161
1411
|
raise "Missing the required parameter 'bucket_name' when calling rename_object." if bucket_name.nil?
|
|
1162
1412
|
raise "Missing the required parameter 'rename_object_details' when calling rename_object." if rename_object_details.nil?
|
|
1163
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
1164
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
1413
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
1414
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
1165
1415
|
|
|
1166
|
-
path =
|
|
1416
|
+
path = '/n/{namespaceName}/b/{bucketName}/actions/renameObject'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
|
|
1417
|
+
operation_signing_strategy = :standard
|
|
1167
1418
|
|
|
1168
1419
|
# Query Params
|
|
1169
1420
|
query_params = {}
|
|
@@ -1172,40 +1423,51 @@ module OCI
|
|
|
1172
1423
|
header_params = {}
|
|
1173
1424
|
header_params['accept'] = 'application/json'
|
|
1174
1425
|
header_params['content-type'] = 'application/json'
|
|
1175
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
1426
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
1176
1427
|
|
|
1177
1428
|
post_body = @api_client.object_to_http_body(rename_object_details)
|
|
1178
1429
|
|
|
1179
|
-
|
|
1430
|
+
@api_client.call_api(
|
|
1180
1431
|
:POST,
|
|
1181
1432
|
path,
|
|
1182
1433
|
endpoint,
|
|
1183
|
-
:
|
|
1184
|
-
:
|
|
1185
|
-
:
|
|
1434
|
+
header_params: header_params,
|
|
1435
|
+
query_params: query_params,
|
|
1436
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1437
|
+
body: post_body
|
|
1438
|
+
)
|
|
1186
1439
|
end
|
|
1440
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1441
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1442
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1443
|
+
|
|
1444
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1445
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1446
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1447
|
+
|
|
1187
1448
|
|
|
1188
1449
|
# Restore one or more objects specified by objectName parameter.
|
|
1189
1450
|
# By default object will be restored for 24 hours.Duration can be configured using hours parameter.
|
|
1190
|
-
#
|
|
1451
|
+
#
|
|
1191
1452
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
1192
1453
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
1193
1454
|
# Example: `my-new-bucket1`
|
|
1194
|
-
#
|
|
1195
|
-
# @param [RestoreObjectsDetails] restore_objects_details Request to restore objects.
|
|
1455
|
+
#
|
|
1456
|
+
# @param [OCI::ObjectStorage::Models::RestoreObjectsDetails] restore_objects_details Request to restore objects.
|
|
1196
1457
|
# @param [Hash] opts the optional parameters
|
|
1197
1458
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
1198
1459
|
# @return [Response] A Response object with data of type nil
|
|
1199
1460
|
def restore_objects(namespace_name, bucket_name, restore_objects_details, opts = {})
|
|
1200
|
-
logger.debug
|
|
1461
|
+
logger.debug 'Calling operation ObjectStorageClient#restore_objects.' if logger
|
|
1201
1462
|
|
|
1202
1463
|
raise "Missing the required parameter 'namespace_name' when calling restore_objects." if namespace_name.nil?
|
|
1203
1464
|
raise "Missing the required parameter 'bucket_name' when calling restore_objects." if bucket_name.nil?
|
|
1204
1465
|
raise "Missing the required parameter 'restore_objects_details' when calling restore_objects." if restore_objects_details.nil?
|
|
1205
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
1206
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
1466
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
1467
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
1207
1468
|
|
|
1208
|
-
path =
|
|
1469
|
+
path = '/n/{namespaceName}/b/{bucketName}/actions/restoreObjects'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
|
|
1470
|
+
operation_signing_strategy = :standard
|
|
1209
1471
|
|
|
1210
1472
|
# Query Params
|
|
1211
1473
|
query_params = {}
|
|
@@ -1214,42 +1476,53 @@ module OCI
|
|
|
1214
1476
|
header_params = {}
|
|
1215
1477
|
header_params['accept'] = 'application/json'
|
|
1216
1478
|
header_params['content-type'] = 'application/json'
|
|
1217
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
1479
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
1218
1480
|
|
|
1219
1481
|
post_body = @api_client.object_to_http_body(restore_objects_details)
|
|
1220
1482
|
|
|
1221
|
-
|
|
1483
|
+
@api_client.call_api(
|
|
1222
1484
|
:POST,
|
|
1223
1485
|
path,
|
|
1224
1486
|
endpoint,
|
|
1225
|
-
:
|
|
1226
|
-
:
|
|
1227
|
-
:
|
|
1487
|
+
header_params: header_params,
|
|
1488
|
+
query_params: query_params,
|
|
1489
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1490
|
+
body: post_body
|
|
1491
|
+
)
|
|
1228
1492
|
end
|
|
1493
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1494
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1495
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1496
|
+
|
|
1497
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1498
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1499
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1500
|
+
|
|
1229
1501
|
|
|
1230
1502
|
# Performs a partial or full update of a bucket's user-defined metadata.
|
|
1231
|
-
#
|
|
1503
|
+
#
|
|
1232
1504
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
1233
1505
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
1234
1506
|
# Example: `my-new-bucket1`
|
|
1235
|
-
#
|
|
1236
|
-
# @param [UpdateBucketDetails] update_bucket_details Request object for updating a bucket.
|
|
1507
|
+
#
|
|
1508
|
+
# @param [OCI::ObjectStorage::Models::UpdateBucketDetails] update_bucket_details Request object for updating a bucket.
|
|
1237
1509
|
# @param [Hash] opts the optional parameters
|
|
1238
1510
|
# @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
|
|
1239
1511
|
# For uploading a part, this is the entity tag of the target part.
|
|
1240
|
-
#
|
|
1512
|
+
#
|
|
1241
1513
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
1242
|
-
# @return [Response] A Response object with data of type OCI::ObjectStorage::Models::Bucket
|
|
1514
|
+
# @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::Bucket Bucket}
|
|
1243
1515
|
def update_bucket(namespace_name, bucket_name, update_bucket_details, opts = {})
|
|
1244
|
-
logger.debug
|
|
1516
|
+
logger.debug 'Calling operation ObjectStorageClient#update_bucket.' if logger
|
|
1245
1517
|
|
|
1246
1518
|
raise "Missing the required parameter 'namespace_name' when calling update_bucket." if namespace_name.nil?
|
|
1247
1519
|
raise "Missing the required parameter 'bucket_name' when calling update_bucket." if bucket_name.nil?
|
|
1248
1520
|
raise "Missing the required parameter 'update_bucket_details' when calling update_bucket." if update_bucket_details.nil?
|
|
1249
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
1250
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
1521
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
1522
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
1251
1523
|
|
|
1252
|
-
path =
|
|
1524
|
+
path = '/n/{namespaceName}/b/{bucketName}/'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
|
|
1525
|
+
operation_signing_strategy = :standard
|
|
1253
1526
|
|
|
1254
1527
|
# Query Params
|
|
1255
1528
|
query_params = {}
|
|
@@ -1258,39 +1531,50 @@ module OCI
|
|
|
1258
1531
|
header_params = {}
|
|
1259
1532
|
header_params['accept'] = 'application/json'
|
|
1260
1533
|
header_params['content-type'] = 'application/json'
|
|
1261
|
-
header_params[:'if-match'] = opts[:
|
|
1262
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
1534
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
1535
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
1263
1536
|
|
|
1264
1537
|
post_body = @api_client.object_to_http_body(update_bucket_details)
|
|
1265
1538
|
|
|
1266
|
-
|
|
1539
|
+
@api_client.call_api(
|
|
1267
1540
|
:POST,
|
|
1268
1541
|
path,
|
|
1269
1542
|
endpoint,
|
|
1270
|
-
:
|
|
1271
|
-
:
|
|
1272
|
-
:
|
|
1273
|
-
:
|
|
1543
|
+
header_params: header_params,
|
|
1544
|
+
query_params: query_params,
|
|
1545
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1546
|
+
body: post_body,
|
|
1547
|
+
return_type: 'OCI::ObjectStorage::Models::Bucket'
|
|
1548
|
+
)
|
|
1274
1549
|
end
|
|
1550
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1551
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1552
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1553
|
+
|
|
1554
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1555
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1556
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1557
|
+
|
|
1275
1558
|
|
|
1276
1559
|
# Change the default Swift/S3 compartmentId of user's namespace into the user-defined compartmentId. Upon doing
|
|
1277
1560
|
# this, all subsequent bucket creations will use the new default compartment, but no previously created
|
|
1278
1561
|
# buckets will be modified. A user must have the NAMESPACE_UPDATE permission to make changes to the default
|
|
1279
1562
|
# compartments for S3 and Swift.
|
|
1280
|
-
#
|
|
1563
|
+
#
|
|
1281
1564
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
1282
|
-
# @param [UpdateNamespaceMetadataDetails] update_namespace_metadata_details Request object for update NamespaceMetadata.
|
|
1565
|
+
# @param [OCI::ObjectStorage::Models::UpdateNamespaceMetadataDetails] update_namespace_metadata_details Request object for update NamespaceMetadata.
|
|
1283
1566
|
# @param [Hash] opts the optional parameters
|
|
1284
1567
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
1285
|
-
# @return [Response] A Response object with data of type OCI::ObjectStorage::Models::NamespaceMetadata
|
|
1568
|
+
# @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::NamespaceMetadata NamespaceMetadata}
|
|
1286
1569
|
def update_namespace_metadata(namespace_name, update_namespace_metadata_details, opts = {})
|
|
1287
|
-
logger.debug
|
|
1570
|
+
logger.debug 'Calling operation ObjectStorageClient#update_namespace_metadata.' if logger
|
|
1288
1571
|
|
|
1289
1572
|
raise "Missing the required parameter 'namespace_name' when calling update_namespace_metadata." if namespace_name.nil?
|
|
1290
1573
|
raise "Missing the required parameter 'update_namespace_metadata_details' when calling update_namespace_metadata." if update_namespace_metadata_details.nil?
|
|
1291
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
1574
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
1292
1575
|
|
|
1293
|
-
path =
|
|
1576
|
+
path = '/n/{namespaceName}'.sub('{namespaceName}', namespace_name.to_s)
|
|
1577
|
+
operation_signing_strategy = :standard
|
|
1294
1578
|
|
|
1295
1579
|
# Query Params
|
|
1296
1580
|
query_params = {}
|
|
@@ -1299,29 +1583,39 @@ module OCI
|
|
|
1299
1583
|
header_params = {}
|
|
1300
1584
|
header_params['accept'] = 'application/json'
|
|
1301
1585
|
header_params['content-type'] = 'application/json'
|
|
1302
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
1586
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
1303
1587
|
|
|
1304
1588
|
post_body = @api_client.object_to_http_body(update_namespace_metadata_details)
|
|
1305
1589
|
|
|
1306
|
-
|
|
1590
|
+
@api_client.call_api(
|
|
1307
1591
|
:PUT,
|
|
1308
1592
|
path,
|
|
1309
1593
|
endpoint,
|
|
1310
|
-
:
|
|
1311
|
-
:
|
|
1312
|
-
:
|
|
1313
|
-
:
|
|
1594
|
+
header_params: header_params,
|
|
1595
|
+
query_params: query_params,
|
|
1596
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1597
|
+
body: post_body,
|
|
1598
|
+
return_type: 'OCI::ObjectStorage::Models::NamespaceMetadata'
|
|
1599
|
+
)
|
|
1314
1600
|
end
|
|
1601
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1602
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1603
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1604
|
+
|
|
1605
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1606
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1607
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1608
|
+
|
|
1315
1609
|
|
|
1316
1610
|
# Uploads a single part of a multipart upload.
|
|
1317
|
-
#
|
|
1611
|
+
#
|
|
1318
1612
|
# @param [String] namespace_name The top-level namespace used for the request.
|
|
1319
1613
|
# @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
|
|
1320
1614
|
# Example: `my-new-bucket1`
|
|
1321
|
-
#
|
|
1615
|
+
#
|
|
1322
1616
|
# @param [String] object_name The name of the object. Avoid entering confidential information.
|
|
1323
1617
|
# Example: `test/object1.log`
|
|
1324
|
-
#
|
|
1618
|
+
#
|
|
1325
1619
|
# @param [String] upload_id The upload ID for a multipart upload.
|
|
1326
1620
|
# @param [Integer] upload_part_num The part number that identifies the object part currently being uploaded.
|
|
1327
1621
|
# @param [String, IO] upload_part_body The part being uploaded to the Object Storage Service.
|
|
@@ -1330,15 +1624,15 @@ module OCI
|
|
|
1330
1624
|
# @option opts [String] :opc_client_request_id The client request ID for tracing.
|
|
1331
1625
|
# @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
|
|
1332
1626
|
# For uploading a part, this is the entity tag of the target part.
|
|
1333
|
-
#
|
|
1627
|
+
#
|
|
1334
1628
|
# @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
|
|
1335
1629
|
# For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
|
|
1336
|
-
#
|
|
1630
|
+
#
|
|
1337
1631
|
# @option opts [String] :expect 100-continue (default to 100-continue)
|
|
1338
1632
|
# @option opts [String] :content_md5 The base-64 encoded MD5 hash of the body.
|
|
1339
1633
|
# @return [Response] A Response object with data of type nil
|
|
1340
1634
|
def upload_part(namespace_name, bucket_name, object_name, upload_id, upload_part_num, upload_part_body, opts = {})
|
|
1341
|
-
logger.debug
|
|
1635
|
+
logger.debug 'Calling operation ObjectStorageClient#upload_part.' if logger
|
|
1342
1636
|
|
|
1343
1637
|
raise "Missing the required parameter 'namespace_name' when calling upload_part." if namespace_name.nil?
|
|
1344
1638
|
raise "Missing the required parameter 'bucket_name' when calling upload_part." if bucket_name.nil?
|
|
@@ -1346,36 +1640,44 @@ module OCI
|
|
|
1346
1640
|
raise "Missing the required parameter 'upload_id' when calling upload_part." if upload_id.nil?
|
|
1347
1641
|
raise "Missing the required parameter 'upload_part_num' when calling upload_part." if upload_part_num.nil?
|
|
1348
1642
|
raise "Missing the required parameter 'upload_part_body' when calling upload_part." if upload_part_body.nil?
|
|
1349
|
-
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util
|
|
1350
|
-
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util
|
|
1351
|
-
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util
|
|
1643
|
+
raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
|
|
1644
|
+
raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
|
|
1645
|
+
raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util.blank_string?(object_name)
|
|
1352
1646
|
|
|
1353
|
-
path =
|
|
1647
|
+
path = '/n/{namespaceName}/b/{bucketName}/u/{objectName}'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s).sub('{objectName}', object_name.to_s)
|
|
1648
|
+
operation_signing_strategy = :exclude_body
|
|
1354
1649
|
|
|
1355
1650
|
# Query Params
|
|
1356
1651
|
query_params = {}
|
|
1357
|
-
query_params[:
|
|
1358
|
-
query_params[:
|
|
1652
|
+
query_params[:uploadId] = upload_id
|
|
1653
|
+
query_params[:uploadPartNum] = upload_part_num
|
|
1359
1654
|
|
|
1360
1655
|
# Header Params
|
|
1361
1656
|
header_params = {}
|
|
1362
1657
|
header_params['accept'] = 'application/json'
|
|
1363
|
-
header_params[:'opc-client-request-id'] = opts[:
|
|
1364
|
-
header_params[:'if-match'] = opts[:
|
|
1365
|
-
header_params[:'if-none-match'] = opts[:
|
|
1366
|
-
header_params[:
|
|
1367
|
-
header_params[:'
|
|
1368
|
-
header_params[:'
|
|
1658
|
+
header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
|
|
1659
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
1660
|
+
header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
|
|
1661
|
+
header_params[:expect] = opts[:expect] if opts[:expect]
|
|
1662
|
+
header_params[:'content-length'] = opts[:content_length] if opts[:content_length]
|
|
1663
|
+
header_params[:'content-md5'] = opts[:content_md5] if opts[:content_md5]
|
|
1664
|
+
header_params['content-type'] ||= 'application/octet-stream'
|
|
1369
1665
|
|
|
1370
1666
|
post_body = @api_client.object_to_http_body(upload_part_body)
|
|
1371
1667
|
|
|
1372
|
-
|
|
1668
|
+
@api_client.call_api(
|
|
1373
1669
|
:PUT,
|
|
1374
1670
|
path,
|
|
1375
1671
|
endpoint,
|
|
1376
|
-
:
|
|
1377
|
-
:
|
|
1378
|
-
:
|
|
1672
|
+
header_params: header_params,
|
|
1673
|
+
query_params: query_params,
|
|
1674
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1675
|
+
body: post_body
|
|
1676
|
+
)
|
|
1379
1677
|
end
|
|
1678
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1679
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1680
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1380
1681
|
end
|
|
1381
1682
|
end
|
|
1683
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|