Reference documentation and code samples for the Cloud Build V2 API class Google::Cloud::Build::V2::OAuthCredential.
Represents an OAuth token of the account that authorized the Connection,
and associated metadata.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#oauth_token_secret_version
defoauth_token_secret_version()->::String
Returns
(::String) — A SecretManager resource containing the OAuth token that authorizes
the Cloud Build connection. Format: projects/*/secrets/*/versions/*.
#oauth_token_secret_version=
defoauth_token_secret_version=(value)->::String
Parameter
value (::String) — A SecretManager resource containing the OAuth token that authorizes
the Cloud Build connection. Format: projects/*/secrets/*/versions/*.
Returns
(::String) — A SecretManager resource containing the OAuth token that authorizes
the Cloud Build connection. Format: projects/*/secrets/*/versions/*.
#username
defusername()->::String
Returns
(::String) — Output only. The username associated to this token.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Cloud Build V2 API - Class Google::Cloud::Build::V2::OAuthCredential (v0.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.10.0 (latest)](/ruby/docs/reference/google-cloud-build-v2/latest/Google-Cloud-Build-V2-OAuthCredential)\n- [0.9.1](/ruby/docs/reference/google-cloud-build-v2/0.9.1/Google-Cloud-Build-V2-OAuthCredential)\n- [0.8.0](/ruby/docs/reference/google-cloud-build-v2/0.8.0/Google-Cloud-Build-V2-OAuthCredential)\n- [0.7.2](/ruby/docs/reference/google-cloud-build-v2/0.7.2/Google-Cloud-Build-V2-OAuthCredential)\n- [0.6.0](/ruby/docs/reference/google-cloud-build-v2/0.6.0/Google-Cloud-Build-V2-OAuthCredential)\n- [0.5.2](/ruby/docs/reference/google-cloud-build-v2/0.5.2/Google-Cloud-Build-V2-OAuthCredential)\n- [0.4.0](/ruby/docs/reference/google-cloud-build-v2/0.4.0/Google-Cloud-Build-V2-OAuthCredential)\n- [0.3.0](/ruby/docs/reference/google-cloud-build-v2/0.3.0/Google-Cloud-Build-V2-OAuthCredential)\n- [0.2.0](/ruby/docs/reference/google-cloud-build-v2/0.2.0/Google-Cloud-Build-V2-OAuthCredential)\n- [0.1.0](/ruby/docs/reference/google-cloud-build-v2/0.1.0/Google-Cloud-Build-V2-OAuthCredential) \nReference documentation and code samples for the Cloud Build V2 API class Google::Cloud::Build::V2::OAuthCredential.\n\nRepresents an OAuth token of the account that authorized the Connection,\nand associated metadata. \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### #oauth_token_secret_version\n\n def oauth_token_secret_version() -\u003e ::String\n\n**Returns**\n\n- (::String) --- A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.\n\n### #oauth_token_secret_version=\n\n def oauth_token_secret_version=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`. \n**Returns**\n\n- (::String) --- A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.\n\n### #username\n\n def username() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. The username associated to this token."]]