Class: Google::Apis::SecretmanagerV1beta1::SecretManagerService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::SecretmanagerV1beta1::SecretManagerService
- Defined in:
- lib/google/apis/secretmanager_v1beta1/service.rb
Overview
Secret Manager API
Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://secretmanager.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#access_project_secret_version(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::AccessSecretVersionResponse
Accesses a SecretVersion.
-
#add_project_secret_version(parent, add_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::SecretVersion
Creates a new SecretVersion containing secret data and attaches it to an existing Secret.
-
#cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Empty
Starts asynchronous cancellation on a long-running operation.
-
#create_project_secret(parent, secret_object = nil, secret_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Secret
Creates a new Secret containing no SecretVersions.
-
#delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Empty
Deletes a long-running operation.
-
#delete_project_secret(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Empty
Deletes a Secret.
-
#destroy_secret_version(name, destroy_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::SecretVersion
Destroys a SecretVersion.
-
#disable_secret_version(name, disable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::SecretVersion
Disables a SecretVersion.
-
#enable_secret_version(name, enable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::SecretVersion
Enables a SecretVersion.
-
#get_project_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Location
Gets information about a location.
-
#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Operation
Gets the latest state of a long-running operation.
-
#get_project_secret(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Secret
Gets metadata for a given Secret.
-
#get_project_secret_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Policy
Gets the access control policy for a secret.
-
#get_project_secret_version(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::SecretVersion
Gets metadata for a SecretVersion.
-
#initialize ⇒ SecretManagerService
constructor
A new instance of SecretManagerService.
-
#list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::ListLocationsResponse
Lists information about the supported locations for this service.
-
#list_project_secret_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::ListSecretVersionsResponse
Lists SecretVersions.
-
#list_project_secrets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::ListSecretsResponse
Lists Secrets.
-
#patch_project_secret(name, secret_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Secret
Updates metadata of an existing Secret.
-
#set_secret_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Policy
Sets the access control policy on the specified secret.
-
#test_secret_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::TestIamPermissionsResponse
Returns permissions that a caller has for the specified secret.
Constructor Details
#initialize ⇒ SecretManagerService
Returns a new instance of SecretManagerService.
48 49 50 51 52 53 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-secretmanager_v1beta1', client_version: Google::Apis::SecretmanagerV1beta1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
41 42 43 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 41 def key @key end |
#quota_user ⇒ String
Returns 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.
46 47 48 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#access_project_secret_version(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::AccessSecretVersionResponse
Accesses a SecretVersion. This call returns the secret data. projects/*/
secrets/*/versions/latest is an alias to the latest SecretVersion.
642 643 644 645 646 647 648 649 650 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 642 def access_project_secret_version(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}:access', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::AccessSecretVersionResponse::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::AccessSecretVersionResponse command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#add_project_secret_version(parent, add_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::SecretVersion
Creates a new SecretVersion containing secret data and attaches it to an existing Secret.
309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 309 def add_project_secret_version(parent, add_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+parent}:addVersion', ) command.request_representation = Google::Apis::SecretmanagerV1beta1::AddSecretVersionRequest::Representation command.request_object = add_secret_version_request_object command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Empty
Starts asynchronous cancellation on a long-running operation. The server makes
a best effort to cancel the operation, but success is not guaranteed. If the
server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
Clients can use Operations.GetOperation or other methods to check whether the
cancellation succeeded or whether the operation completed despite cancellation.
On successful cancellation, the operation is not deleted; instead, it becomes
an operation with an Operation.error value with a google.rpc.Status.code of 1
, corresponding to Code.CANCELLED.
163 164 165 166 167 168 169 170 171 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 163 def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+name}:cancel', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::Empty::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_secret(parent, secret_object = nil, secret_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Secret
Creates a new Secret containing no SecretVersions.
347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 347 def create_project_secret(parent, secret_object = nil, secret_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+parent}/secrets', ) command.request_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation command.request_object = secret_object command.response_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::Secret command.params['parent'] = parent unless parent.nil? command.query['secretId'] = secret_id unless secret_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Empty
Deletes a long-running operation. This method indicates that the client is no
longer interested in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns google.rpc.Code.
UNIMPLEMENTED.
196 197 198 199 200 201 202 203 204 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 196 def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta1/{+name}', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::Empty::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_secret(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Empty
Deletes a Secret.
381 382 383 384 385 386 387 388 389 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 381 def delete_project_secret(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta1/{+name}', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::Empty::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#destroy_secret_version(name, destroy_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::SecretVersion
Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.
675 676 677 678 679 680 681 682 683 684 685 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 675 def destroy_secret_version(name, destroy_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+name}:destroy', ) command.request_representation = Google::Apis::SecretmanagerV1beta1::DestroySecretVersionRequest::Representation command.request_object = destroy_secret_version_request_object command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#disable_secret_version(name, disable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::SecretVersion
Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.
709 710 711 712 713 714 715 716 717 718 719 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 709 def disable_secret_version(name, disable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+name}:disable', ) command.request_representation = Google::Apis::SecretmanagerV1beta1::DisableSecretVersionRequest::Representation command.request_object = disable_secret_version_request_object command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#enable_secret_version(name, enable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::SecretVersion
Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.
743 744 745 746 747 748 749 750 751 752 753 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 743 def enable_secret_version(name, enable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+name}:enable', ) command.request_representation = Google::Apis::SecretmanagerV1beta1::EnableSecretVersionRequest::Representation command.request_object = enable_secret_version_request_object command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Location
Gets information about a location.
75 76 77 78 79 80 81 82 83 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 75 def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::Location::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::Location command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
227 228 229 230 231 232 233 234 235 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 227 def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::Operation::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_secret(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Secret
Gets metadata for a given Secret.
412 413 414 415 416 417 418 419 420 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 412 def get_project_secret(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::Secret command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_secret_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Policy
Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.
456 457 458 459 460 461 462 463 464 465 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 456 def get_project_secret_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::Policy::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::Policy command.params['resource'] = resource unless resource.nil? command.query['options.requestedPolicyVersion'] = unless .nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_secret_version(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::SecretVersion
Gets metadata for a SecretVersion. projects/*/secrets/*/versions/latest is
an alias to the latest SecretVersion.
778 779 780 781 782 783 784 785 786 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 778 def get_project_secret_version(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::SecretVersion::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::SecretVersion command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::ListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED.
272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 272 def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}/operations', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::ListOperationsResponse::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::ListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['returnPartialSuccess'] = return_partial_success unless return_partial_success.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::ListLocationsResponse
Lists information about the supported locations for this service. This method
can be called in two ways: * List all public locations: Use the path GET /
v1/locations. * List project-visible locations: Use the path GET /v1/
projects/project_id/locations. This may include public locations as well as
private or other locations specifically visible to the project.
122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 122 def list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}/locations', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::ListLocationsResponse::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::ListLocationsResponse command.params['name'] = name unless name.nil? command.query['extraLocationTypes'] = extra_location_types unless extra_location_types.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_secret_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::ListSecretVersionsResponse
Lists SecretVersions. This call does not return secret data.
816 817 818 819 820 821 822 823 824 825 826 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 816 def list_project_secret_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+parent}/versions', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::ListSecretVersionsResponse::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::ListSecretVersionsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_secrets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::ListSecretsResponse
Lists Secrets.
495 496 497 498 499 500 501 502 503 504 505 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 495 def list_project_secrets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+parent}/secrets', ) command.response_representation = Google::Apis::SecretmanagerV1beta1::ListSecretsResponse::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::ListSecretsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_secret(name, secret_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Secret
Updates metadata of an existing Secret.
531 532 533 534 535 536 537 538 539 540 541 542 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 531 def patch_project_secret(name, secret_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1beta1/{+name}', ) command.request_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation command.request_object = secret_object command.response_representation = Google::Apis::SecretmanagerV1beta1::Secret::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::Secret command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_secret_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::Policy
Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret.
569 570 571 572 573 574 575 576 577 578 579 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 569 def set_secret_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::SecretmanagerV1beta1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::SecretmanagerV1beta1::Policy::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_secret_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SecretmanagerV1beta1::TestIamPermissionsResponse
Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission- aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
608 609 610 611 612 613 614 615 616 617 618 |
# File 'lib/google/apis/secretmanager_v1beta1/service.rb', line 608 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::SecretmanagerV1beta1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::SecretmanagerV1beta1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::SecretmanagerV1beta1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |