Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api_names_out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86053,6 +86053,8 @@
"/cloudshell:v1/Environment/webHost": web_host
"/cloudshell:v1/Environment/webPorts": web_ports
"/cloudshell:v1/Environment/webPorts/web_port": web_port
"/cloudshell:v1/GenerateAccessTokenResponse": generate_access_token_response
"/cloudshell:v1/GenerateAccessTokenResponse/accessToken": access_token
"/cloudshell:v1/ListOperationsResponse": list_operations_response
"/cloudshell:v1/ListOperationsResponse/nextPageToken": next_page_token
"/cloudshell:v1/ListOperationsResponse/operations": operations
Expand Down Expand Up @@ -86105,6 +86107,10 @@
"/cloudshell:v1/cloudshell.users.environments.addPublicKey/environment": environment
"/cloudshell:v1/cloudshell.users.environments.authorize": authorize_environment
"/cloudshell:v1/cloudshell.users.environments.authorize/name": name
"/cloudshell:v1/cloudshell.users.environments.generateAccessToken": generate_user_environment_access_token
"/cloudshell:v1/cloudshell.users.environments.generateAccessToken/environment": environment
"/cloudshell:v1/cloudshell.users.environments.generateAccessToken/expireTime": expire_time
"/cloudshell:v1/cloudshell.users.environments.generateAccessToken/ttl": ttl
"/cloudshell:v1/cloudshell.users.environments.get": get_user_environment
"/cloudshell:v1/cloudshell.users.environments.get/name": name
"/cloudshell:v1/cloudshell.users.environments.removePublicKey": remove_environment_public_key
Expand Down
4 changes: 4 additions & 0 deletions generated/google-apis-cloudshell_v1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release history for google-apis-cloudshell_v1

### v0.26.0 (2025-11-09)

* Regenerated from discovery document revision 20251105

### v0.25.0 (2025-10-05)

* Regenerated from discovery document revision 20250930
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,25 @@ def update!(**args)
end
end

# Response message for GenerateAccessToken.
class GenerateAccessTokenResponse
include Google::Apis::Core::Hashable

# The access token.
# Corresponds to the JSON property `accessToken`
# @return [String]
attr_accessor :access_token

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@access_token = args[:access_token] if args.key?(:access_token)
end
end

# The response message for Operations.ListOperations.
class ListOperationsResponse
include Google::Apis::Core::Hashable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ module Google
module Apis
module CloudshellV1
# Version of the google-apis-cloudshell_v1 gem
GEM_VERSION = "0.25.0"
GEM_VERSION = "0.26.0"

# Version of the code generator used to generate this client
GENERATOR_VERSION = "0.18.0"

# Revision of the discovery document this client was generated from
REVISION = "20250930"
REVISION = "20251105"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end

class GenerateAccessTokenResponse
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class ListOperationsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end

Expand Down Expand Up @@ -222,6 +228,13 @@ class Representation < Google::Apis::Core::JsonRepresentation
end
end

class GenerateAccessTokenResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :access_token, as: 'accessToken'
end
end

class ListOperationsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,46 @@ def authorize_environment(name, authorize_environment_request_object = nil, fiel
execute_or_queue_command(command, &block)
end

# Generates an access token for the user's environment.
# @param [String] environment
# Required. The environment to generate the access token for.
# @param [String] expire_time
# Desired expiration time of the access token. This value must be at most 24
# hours in the future. If a value is not specified, the token's expiration time
# will be set to a default value of 1 hour in the future.
# @param [String] ttl
# Desired lifetime duration of the access token. This value must be at most 24
# hours. If a value is not specified, the token's lifetime will be set to a
# default value of 1 hour.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::CloudshellV1::GenerateAccessTokenResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudshellV1::GenerateAccessTokenResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def generate_user_environment_access_token(environment, expire_time: nil, ttl: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+environment}:generateAccessToken', options)
command.response_representation = Google::Apis::CloudshellV1::GenerateAccessTokenResponse::Representation
command.response_class = Google::Apis::CloudshellV1::GenerateAccessTokenResponse
command.params['environment'] = environment unless environment.nil?
command.query['expireTime'] = expire_time unless expire_time.nil?
command.query['ttl'] = ttl unless ttl.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end

# Gets an environment. Returns NOT_FOUND if the environment does not exist.
# @param [String] name
# Required. Name of the requested resource, for example `users/me/environments/
Expand Down