Module: Google::Cloud::OsLogin::V1::OsLoginService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/os_login/v1/os_login_service/paths.rb
Overview
Path helper methods for the OsLoginService API.
Instance Method Summary collapse
-
#posix_account_path(user:, project:) ⇒ ::String
Create a fully-qualified PosixAccount resource string.
-
#ssh_public_key_path(user:, fingerprint:) ⇒ ::String
Create a fully-qualified SshPublicKey resource string.
-
#user_path(user:) ⇒ ::String
Create a fully-qualified User resource string.
Instance Method Details
#posix_account_path(user:, project:) ⇒ ::String
Create a fully-qualified PosixAccount resource string.
The resource will be in the following format:
users/{user}/projects/{project}
38 39 40 41 42 |
# File 'lib/google/cloud/os_login/v1/os_login_service/paths.rb', line 38 def posix_account_path user:, project: raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/" "users/#{user}/projects/#{project}" end |
#ssh_public_key_path(user:, fingerprint:) ⇒ ::String
Create a fully-qualified SshPublicKey resource string.
The resource will be in the following format:
users/{user}/sshPublicKeys/{fingerprint}
55 56 57 58 59 |
# File 'lib/google/cloud/os_login/v1/os_login_service/paths.rb', line 55 def ssh_public_key_path user:, fingerprint: raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/" "users/#{user}/sshPublicKeys/#{fingerprint}" end |
#user_path(user:) ⇒ ::String
Create a fully-qualified User resource string.
The resource will be in the following format:
users/{user}
71 72 73 |
# File 'lib/google/cloud/os_login/v1/os_login_service/paths.rb', line 71 def user_path user: "users/#{user}" end |