Reference documentation and code samples for the Cloud Run V2 API class Google::Cloud::Run::V2::VolumeMount.
VolumeMount describes a mounting of a Volume within a container.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#mount_path
defmount_path()->::String
Returns
(::String) — Required. Path within the container at which the volume should be mounted.
Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must
otherwise be /cloudsql. All instances defined in the Volume will be
available as /cloudsql/[instance]. For more information on Cloud SQL
volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
#mount_path=
defmount_path=(value)->::String
Parameter
value (::String) — Required. Path within the container at which the volume should be mounted.
Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must
otherwise be /cloudsql. All instances defined in the Volume will be
available as /cloudsql/[instance]. For more information on Cloud SQL
volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
Returns
(::String) — Required. Path within the container at which the volume should be mounted.
Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must
otherwise be /cloudsql. All instances defined in the Volume will be
available as /cloudsql/[instance]. For more information on Cloud SQL
volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
#name
defname()->::String
Returns
(::String) — Required. This must match the Name of a Volume.
#name=
defname=(value)->::String
Parameter
value (::String) — Required. This must match the Name of a Volume.
Returns
(::String) — Required. This must match the Name of a Volume.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Cloud Run V2 API - Class Google::Cloud::Run::V2::VolumeMount (v0.26.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.26.0 (latest)](/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-VolumeMount)\n- [0.25.0](/ruby/docs/reference/google-cloud-run-v2/0.25.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.24.1](/ruby/docs/reference/google-cloud-run-v2/0.24.1/Google-Cloud-Run-V2-VolumeMount)\n- [0.23.0](/ruby/docs/reference/google-cloud-run-v2/0.23.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.22.1](/ruby/docs/reference/google-cloud-run-v2/0.22.1/Google-Cloud-Run-V2-VolumeMount)\n- [0.21.0](/ruby/docs/reference/google-cloud-run-v2/0.21.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.20.0](/ruby/docs/reference/google-cloud-run-v2/0.20.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.19.0](/ruby/docs/reference/google-cloud-run-v2/0.19.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.18.0](/ruby/docs/reference/google-cloud-run-v2/0.18.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.17.0](/ruby/docs/reference/google-cloud-run-v2/0.17.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.16.1](/ruby/docs/reference/google-cloud-run-v2/0.16.1/Google-Cloud-Run-V2-VolumeMount)\n- [0.15.0](/ruby/docs/reference/google-cloud-run-v2/0.15.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.14.0](/ruby/docs/reference/google-cloud-run-v2/0.14.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.13.2](/ruby/docs/reference/google-cloud-run-v2/0.13.2/Google-Cloud-Run-V2-VolumeMount)\n- [0.12.0](/ruby/docs/reference/google-cloud-run-v2/0.12.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.11.0](/ruby/docs/reference/google-cloud-run-v2/0.11.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.10.1](/ruby/docs/reference/google-cloud-run-v2/0.10.1/Google-Cloud-Run-V2-VolumeMount)\n- [0.9.1](/ruby/docs/reference/google-cloud-run-v2/0.9.1/Google-Cloud-Run-V2-VolumeMount)\n- [0.8.0](/ruby/docs/reference/google-cloud-run-v2/0.8.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.7.0](/ruby/docs/reference/google-cloud-run-v2/0.7.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.6.0](/ruby/docs/reference/google-cloud-run-v2/0.6.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.5.0](/ruby/docs/reference/google-cloud-run-v2/0.5.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.4.0](/ruby/docs/reference/google-cloud-run-v2/0.4.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.3.1](/ruby/docs/reference/google-cloud-run-v2/0.3.1/Google-Cloud-Run-V2-VolumeMount)\n- [0.2.0](/ruby/docs/reference/google-cloud-run-v2/0.2.0/Google-Cloud-Run-V2-VolumeMount)\n- [0.1.0](/ruby/docs/reference/google-cloud-run-v2/0.1.0/Google-Cloud-Run-V2-VolumeMount) \nReference documentation and code samples for the Cloud Run V2 API class Google::Cloud::Run::V2::VolumeMount.\n\nVolumeMount describes a mounting of a Volume within a container. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #mount_path\n\n def mount_path() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be `/cloudsql`. All instances defined in the Volume will be available as `/cloudsql/[instance]`. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run\n\n### #mount_path=\n\n def mount_path=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Required. Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be `/cloudsql`. All instances defined in the Volume will be available as `/cloudsql/[instance]`. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run \n**Returns**\n\n- (::String) --- Required. Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be `/cloudsql`. All instances defined in the Volume will be available as `/cloudsql/[instance]`. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. This must match the Name of a Volume.\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Required. This must match the Name of a Volume. \n**Returns**\n\n- (::String) --- Required. This must match the Name of a Volume."]]