Autogenerated update (2020-02-21)
Update: - chat_v1 - cloudbuild_v1 - cloudbuild_v1alpha1 - cloudbuild_v1alpha2 - cloudtasks_v2beta3 - dataproc_v1 - dataproc_v1beta2 - driveactivity_v2 - homegraph_v1 - jobs_v3p1beta1 - prod_tt_sasportal_v1alpha1 - sasportal_v1alpha1 - script_v1
This commit is contained in:
parent
8f389e3011
commit
128b9306cb
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://developers.google.com/hangouts/chat
|
||||
module ChatV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20200209'
|
||||
REVISION = '20200219'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -390,7 +390,10 @@ module Google
|
|||
class Image
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The aspect ratio of this image (width/height).
|
||||
# The aspect ratio of this image (width/height). This field allows clients
|
||||
# to reserve the right height for the image while waiting for it to load.
|
||||
# It's not meant to override the native aspect ratio of the image.
|
||||
# If unset, server will fill it by prefetching the image.
|
||||
# Corresponds to the JSON property `aspectRatio`
|
||||
# @return [Float]
|
||||
attr_accessor :aspect_ratio
|
||||
|
@ -882,6 +885,11 @@ module Google
|
|||
# @return [String]
|
||||
attr_accessor :display_name
|
||||
|
||||
# Obfuscated domain information.
|
||||
# Corresponds to the JSON property `domainId`
|
||||
# @return [String]
|
||||
attr_accessor :domain_id
|
||||
|
||||
# Resource name, in the format "users/*".
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
|
@ -899,6 +907,7 @@ module Google
|
|||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@display_name = args[:display_name] if args.key?(:display_name)
|
||||
@domain_id = args[:domain_id] if args.key?(:domain_id)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@type = args[:type] if args.key?(:type)
|
||||
end
|
||||
|
|
|
@ -439,6 +439,7 @@ module Google
|
|||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :display_name, as: 'displayName'
|
||||
property :domain_id, as: 'domainId'
|
||||
property :name, as: 'name'
|
||||
property :type, as: 'type'
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://cloud.google.com/cloud-build/docs/
|
||||
module CloudbuildV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20200123'
|
||||
REVISION = '20200220'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://cloud.google.com/cloud-build/docs/
|
||||
module CloudbuildV1alpha1
|
||||
VERSION = 'V1alpha1'
|
||||
REVISION = '20191212'
|
||||
REVISION = '20200220'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://cloud.google.com/cloud-build/docs/
|
||||
module CloudbuildV1alpha2
|
||||
VERSION = 'V1alpha2'
|
||||
REVISION = '20200108'
|
||||
REVISION = '20200220'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://cloud.google.com/tasks/
|
||||
module CloudtasksV2beta3
|
||||
VERSION = 'V2beta3'
|
||||
REVISION = '20200117'
|
||||
REVISION = '20200210'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://cloud.google.com/dataproc/
|
||||
module DataprocV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20200117'
|
||||
REVISION = '20200213'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -1390,6 +1390,11 @@ module Google
|
|||
# @return [Google::Apis::DataprocV1::JobPlacement]
|
||||
attr_accessor :placement
|
||||
|
||||
# A Dataproc job for running Presto (https://prestosql.io/) queries
|
||||
# Corresponds to the JSON property `prestoJob`
|
||||
# @return [Google::Apis::DataprocV1::PrestoJob]
|
||||
attr_accessor :presto_job
|
||||
|
||||
# A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/
|
||||
# python-programming-guide.html) applications on YARN.
|
||||
# Corresponds to the JSON property `pysparkJob`
|
||||
|
@ -1455,6 +1460,7 @@ module Google
|
|||
@labels = args[:labels] if args.key?(:labels)
|
||||
@pig_job = args[:pig_job] if args.key?(:pig_job)
|
||||
@placement = args[:placement] if args.key?(:placement)
|
||||
@presto_job = args[:presto_job] if args.key?(:presto_job)
|
||||
@pyspark_job = args[:pyspark_job] if args.key?(:pyspark_job)
|
||||
@reference = args[:reference] if args.key?(:reference)
|
||||
@scheduling = args[:scheduling] if args.key?(:scheduling)
|
||||
|
@ -2347,6 +2353,67 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# A Dataproc job for running Presto (https://prestosql.io/) queries
|
||||
class PrestoJob
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Optional. Presto client tags to attach to this query
|
||||
# Corresponds to the JSON property `clientTags`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :client_tags
|
||||
|
||||
# Optional. Whether to continue executing queries if a query fails. The default
|
||||
# value is false. Setting to true can be useful when executing independent
|
||||
# parallel queries.
|
||||
# Corresponds to the JSON property `continueOnFailure`
|
||||
# @return [Boolean]
|
||||
attr_accessor :continue_on_failure
|
||||
alias_method :continue_on_failure?, :continue_on_failure
|
||||
|
||||
# The runtime logging config of the job.
|
||||
# Corresponds to the JSON property `loggingConfig`
|
||||
# @return [Google::Apis::DataprocV1::LoggingConfig]
|
||||
attr_accessor :logging_config
|
||||
|
||||
# Optional. The format in which query output will be displayed. See the Presto
|
||||
# documentation for supported output formats
|
||||
# Corresponds to the JSON property `outputFormat`
|
||||
# @return [String]
|
||||
attr_accessor :output_format
|
||||
|
||||
# Optional. A mapping of property names to values. Used to set Presto session
|
||||
# properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent
|
||||
# to using the --session flag in the Presto CLI
|
||||
# Corresponds to the JSON property `properties`
|
||||
# @return [Hash<String,String>]
|
||||
attr_accessor :properties
|
||||
|
||||
# The HCFS URI of the script that contains SQL queries.
|
||||
# Corresponds to the JSON property `queryFileUri`
|
||||
# @return [String]
|
||||
attr_accessor :query_file_uri
|
||||
|
||||
# A list of queries to run on a cluster.
|
||||
# Corresponds to the JSON property `queryList`
|
||||
# @return [Google::Apis::DataprocV1::QueryList]
|
||||
attr_accessor :query_list
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@client_tags = args[:client_tags] if args.key?(:client_tags)
|
||||
@continue_on_failure = args[:continue_on_failure] if args.key?(:continue_on_failure)
|
||||
@logging_config = args[:logging_config] if args.key?(:logging_config)
|
||||
@output_format = args[:output_format] if args.key?(:output_format)
|
||||
@properties = args[:properties] if args.key?(:properties)
|
||||
@query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri)
|
||||
@query_list = args[:query_list] if args.key?(:query_list)
|
||||
end
|
||||
end
|
||||
|
||||
# A Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/
|
||||
# python-programming-guide.html) applications on YARN.
|
||||
class PySparkJob
|
||||
|
|
|
@ -322,6 +322,12 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PrestoJob
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PySparkJob
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -780,6 +786,8 @@ module Google
|
|||
|
||||
property :placement, as: 'placement', class: Google::Apis::DataprocV1::JobPlacement, decorator: Google::Apis::DataprocV1::JobPlacement::Representation
|
||||
|
||||
property :presto_job, as: 'prestoJob', class: Google::Apis::DataprocV1::PrestoJob, decorator: Google::Apis::DataprocV1::PrestoJob::Representation
|
||||
|
||||
property :pyspark_job, as: 'pysparkJob', class: Google::Apis::DataprocV1::PySparkJob, decorator: Google::Apis::DataprocV1::PySparkJob::Representation
|
||||
|
||||
property :reference, as: 'reference', class: Google::Apis::DataprocV1::JobReference, decorator: Google::Apis::DataprocV1::JobReference::Representation
|
||||
|
@ -1013,6 +1021,21 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class PrestoJob
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :client_tags, as: 'clientTags'
|
||||
property :continue_on_failure, as: 'continueOnFailure'
|
||||
property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
|
||||
|
||||
property :output_format, as: 'outputFormat'
|
||||
hash :properties, as: 'properties'
|
||||
property :query_file_uri, as: 'queryFileUri'
|
||||
property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class PySparkJob
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://cloud.google.com/dataproc/
|
||||
module DataprocV1beta2
|
||||
VERSION = 'V1beta2'
|
||||
REVISION = '20200117'
|
||||
REVISION = '20200213'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://developers.google.com/drive/activity/
|
||||
module DriveactivityV2
|
||||
VERSION = 'V2'
|
||||
REVISION = '20200212'
|
||||
REVISION = '20200218'
|
||||
|
||||
# View and add to the activity record of files in your Google Drive
|
||||
AUTH_DRIVE_ACTIVITY = 'https://www.googleapis.com/auth/drive.activity'
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://developers.google.com/actions/smarthome/create-app#request-sync
|
||||
module HomegraphV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20200115'
|
||||
REVISION = '20200219'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ module Google
|
|||
# @see https://cloud.google.com/talent-solution/job-search/docs/
|
||||
module JobsV3p1beta1
|
||||
VERSION = 'V3p1beta1'
|
||||
REVISION = '20200122'
|
||||
REVISION = '20200219'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://developers.google.com/spectrum-access-system/
|
||||
module ProdTtSasportalV1alpha1
|
||||
VERSION = 'V1alpha1'
|
||||
REVISION = '20200212'
|
||||
REVISION = '20200219'
|
||||
|
||||
# View your email address
|
||||
AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://developers.google.com/spectrum-access-system/
|
||||
module SasportalV1alpha1
|
||||
VERSION = 'V1alpha1'
|
||||
REVISION = '20200212'
|
||||
REVISION = '20200220'
|
||||
|
||||
# View your email address
|
||||
AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
|
||||
|
|
|
@ -25,7 +25,7 @@ module Google
|
|||
# @see https://developers.google.com/apps-script/api/
|
||||
module ScriptV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20200211'
|
||||
REVISION = '20200215'
|
||||
|
||||
# Read, compose, send, and permanently delete all your email from Gmail
|
||||
AUTH_SCOPE = 'https://mail.google.com/'
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'google/apis/secretmanager_v1/service.rb'
|
||||
require 'google/apis/secretmanager_v1/classes.rb'
|
||||
require 'google/apis/secretmanager_v1/representations.rb'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
# Secret Manager API
|
||||
#
|
||||
# Stores and manages access to application secrets. Provides convenience while
|
||||
# improving security.
|
||||
#
|
||||
# @see https://cloud.google.com/secret-manager/
|
||||
module SecretmanagerV1
|
||||
VERSION = 'V1'
|
||||
REVISION = '20200208'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,970 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'date'
|
||||
require 'google/apis/core/base_service'
|
||||
require 'google/apis/core/json_representation'
|
||||
require 'google/apis/core/hashable'
|
||||
require 'google/apis/errors'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
module SecretmanagerV1
|
||||
|
||||
# Response message for SecretManagerService.AccessSecretVersion.
|
||||
class AccessSecretVersionResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The resource name of the SecretVersion in the format
|
||||
# `projects/*/secrets/*/versions/*`.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# A secret payload resource in the Secret Manager API. This contains the
|
||||
# sensitive secret data that is associated with a SecretVersion.
|
||||
# Corresponds to the JSON property `payload`
|
||||
# @return [Google::Apis::SecretmanagerV1::SecretPayload]
|
||||
attr_accessor :payload
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@payload = args[:payload] if args.key?(:payload)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message for SecretManagerService.AddSecretVersion.
|
||||
class AddSecretVersionRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A secret payload resource in the Secret Manager API. This contains the
|
||||
# sensitive secret data that is associated with a SecretVersion.
|
||||
# Corresponds to the JSON property `payload`
|
||||
# @return [Google::Apis::SecretmanagerV1::SecretPayload]
|
||||
attr_accessor :payload
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@payload = args[:payload] if args.key?(:payload)
|
||||
end
|
||||
end
|
||||
|
||||
# Specifies the audit configuration for a service.
|
||||
# The configuration determines which permission types are logged, and what
|
||||
# identities, if any, are exempted from logging.
|
||||
# An AuditConfig must have one or more AuditLogConfigs.
|
||||
# If there are AuditConfigs for both `allServices` and a specific service,
|
||||
# the union of the two AuditConfigs is used for that service: the log_types
|
||||
# specified in each AuditConfig are enabled, and the exempted_members in each
|
||||
# AuditLogConfig are exempted.
|
||||
# Example Policy with multiple AuditConfigs:
|
||||
# `
|
||||
# "audit_configs": [
|
||||
# `
|
||||
# "service": "allServices"
|
||||
# "audit_log_configs": [
|
||||
# `
|
||||
# "log_type": "DATA_READ",
|
||||
# "exempted_members": [
|
||||
# "user:jose@example.com"
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "log_type": "DATA_WRITE",
|
||||
# `,
|
||||
# `
|
||||
# "log_type": "ADMIN_READ",
|
||||
# `
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "service": "sampleservice.googleapis.com"
|
||||
# "audit_log_configs": [
|
||||
# `
|
||||
# "log_type": "DATA_READ",
|
||||
# `,
|
||||
# `
|
||||
# "log_type": "DATA_WRITE",
|
||||
# "exempted_members": [
|
||||
# "user:aliya@example.com"
|
||||
# ]
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
|
||||
# logging. It also exempts jose@example.com from DATA_READ logging, and
|
||||
# aliya@example.com from DATA_WRITE logging.
|
||||
class AuditConfig
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The configuration for logging of each type of permission.
|
||||
# Corresponds to the JSON property `auditLogConfigs`
|
||||
# @return [Array<Google::Apis::SecretmanagerV1::AuditLogConfig>]
|
||||
attr_accessor :audit_log_configs
|
||||
|
||||
# Specifies a service that will be enabled for audit logging.
|
||||
# For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
|
||||
# `allServices` is a special value that covers all services.
|
||||
# Corresponds to the JSON property `service`
|
||||
# @return [String]
|
||||
attr_accessor :service
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
|
||||
@service = args[:service] if args.key?(:service)
|
||||
end
|
||||
end
|
||||
|
||||
# Provides the configuration for logging a type of permissions.
|
||||
# Example:
|
||||
# `
|
||||
# "audit_log_configs": [
|
||||
# `
|
||||
# "log_type": "DATA_READ",
|
||||
# "exempted_members": [
|
||||
# "user:jose@example.com"
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "log_type": "DATA_WRITE",
|
||||
# `
|
||||
# ]
|
||||
# `
|
||||
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
|
||||
# jose@example.com from DATA_READ logging.
|
||||
class AuditLogConfig
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Specifies the identities that do not cause logging for this type of
|
||||
# permission.
|
||||
# Follows the same format of Binding.members.
|
||||
# Corresponds to the JSON property `exemptedMembers`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :exempted_members
|
||||
|
||||
# The log type that this config enables.
|
||||
# Corresponds to the JSON property `logType`
|
||||
# @return [String]
|
||||
attr_accessor :log_type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
|
||||
@log_type = args[:log_type] if args.key?(:log_type)
|
||||
end
|
||||
end
|
||||
|
||||
# A replication policy that replicates the Secret payload without any
|
||||
# restrictions.
|
||||
class Automatic
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# Associates `members` with a `role`.
|
||||
class Binding
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Represents a textual expression in the Common Expression Language (CEL)
|
||||
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL
|
||||
# are documented at https://github.com/google/cel-spec.
|
||||
# Example (Comparison):
|
||||
# title: "Summary size limit"
|
||||
# description: "Determines if a summary is less than 100 chars"
|
||||
# expression: "document.summary.size() < 100"
|
||||
# Example (Equality):
|
||||
# title: "Requestor is owner"
|
||||
# description: "Determines if requestor is the document owner"
|
||||
# expression: "document.owner == request.auth.claims.email"
|
||||
# Example (Logic):
|
||||
# title: "Public documents"
|
||||
# description: "Determine whether the document should be publicly visible"
|
||||
# expression: "document.type != 'private' && document.type != 'internal'"
|
||||
# Example (Data Manipulation):
|
||||
# title: "Notification string"
|
||||
# description: "Create a notification string with a timestamp."
|
||||
# expression: "'New message received at ' + string(document.create_time)"
|
||||
# The exact variables and functions that may be referenced within an expression
|
||||
# are determined by the service that evaluates it. See the service
|
||||
# documentation for additional information.
|
||||
# Corresponds to the JSON property `condition`
|
||||
# @return [Google::Apis::SecretmanagerV1::Expr]
|
||||
attr_accessor :condition
|
||||
|
||||
# Specifies the identities requesting access for a Cloud Platform resource.
|
||||
# `members` can have the following values:
|
||||
# * `allUsers`: A special identifier that represents anyone who is
|
||||
# on the internet; with or without a Google account.
|
||||
# * `allAuthenticatedUsers`: A special identifier that represents anyone
|
||||
# who is authenticated with a Google account or a service account.
|
||||
# * `user:`emailid``: An email address that represents a specific Google
|
||||
# account. For example, `alice@example.com` .
|
||||
# * `serviceAccount:`emailid``: An email address that represents a service
|
||||
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
|
||||
# * `group:`emailid``: An email address that represents a Google group.
|
||||
# For example, `admins@example.com`.
|
||||
# * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
|
||||
# identifier) representing a user that has been recently deleted. For
|
||||
# example, `alice@example.com?uid=123456789012345678901`. If the user is
|
||||
# recovered, this value reverts to `user:`emailid`` and the recovered user
|
||||
# retains the role in the binding.
|
||||
# * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus
|
||||
# unique identifier) representing a service account that has been recently
|
||||
# deleted. For example,
|
||||
# `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
|
||||
# If the service account is undeleted, this value reverts to
|
||||
# `serviceAccount:`emailid`` and the undeleted service account retains the
|
||||
# role in the binding.
|
||||
# * `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
|
||||
# identifier) representing a Google group that has been recently
|
||||
# deleted. For example, `admins@example.com?uid=123456789012345678901`. If
|
||||
# the group is recovered, this value reverts to `group:`emailid`` and the
|
||||
# recovered group retains the role in the binding.
|
||||
# * `domain:`domain``: The G Suite domain (primary) that represents all the
|
||||
# users of that domain. For example, `google.com` or `example.com`.
|
||||
# Corresponds to the JSON property `members`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :members
|
||||
|
||||
# Role that is assigned to `members`.
|
||||
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
||||
# Corresponds to the JSON property `role`
|
||||
# @return [String]
|
||||
attr_accessor :role
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@condition = args[:condition] if args.key?(:condition)
|
||||
@members = args[:members] if args.key?(:members)
|
||||
@role = args[:role] if args.key?(:role)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message for SecretManagerService.DestroySecretVersion.
|
||||
class DestroySecretVersionRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message for SecretManagerService.DisableSecretVersion.
|
||||
class DisableSecretVersionRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# A generic empty message that you can re-use to avoid defining duplicated
|
||||
# empty messages in your APIs. A typical example is to use it as the request
|
||||
# or the response type of an API method. For instance:
|
||||
# service Foo `
|
||||
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
# `
|
||||
# The JSON representation for `Empty` is empty JSON object ````.
|
||||
class Empty
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message for SecretManagerService.EnableSecretVersion.
|
||||
class EnableSecretVersionRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# Represents a textual expression in the Common Expression Language (CEL)
|
||||
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL
|
||||
# are documented at https://github.com/google/cel-spec.
|
||||
# Example (Comparison):
|
||||
# title: "Summary size limit"
|
||||
# description: "Determines if a summary is less than 100 chars"
|
||||
# expression: "document.summary.size() < 100"
|
||||
# Example (Equality):
|
||||
# title: "Requestor is owner"
|
||||
# description: "Determines if requestor is the document owner"
|
||||
# expression: "document.owner == request.auth.claims.email"
|
||||
# Example (Logic):
|
||||
# title: "Public documents"
|
||||
# description: "Determine whether the document should be publicly visible"
|
||||
# expression: "document.type != 'private' && document.type != 'internal'"
|
||||
# Example (Data Manipulation):
|
||||
# title: "Notification string"
|
||||
# description: "Create a notification string with a timestamp."
|
||||
# expression: "'New message received at ' + string(document.create_time)"
|
||||
# The exact variables and functions that may be referenced within an expression
|
||||
# are determined by the service that evaluates it. See the service
|
||||
# documentation for additional information.
|
||||
class Expr
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Optional. Description of the expression. This is a longer text which
|
||||
# describes the expression, e.g. when hovered over it in a UI.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
# Textual representation of an expression in Common Expression Language
|
||||
# syntax.
|
||||
# Corresponds to the JSON property `expression`
|
||||
# @return [String]
|
||||
attr_accessor :expression
|
||||
|
||||
# Optional. String indicating the location of the expression for error
|
||||
# reporting, e.g. a file name and a position in the file.
|
||||
# Corresponds to the JSON property `location`
|
||||
# @return [String]
|
||||
attr_accessor :location
|
||||
|
||||
# Optional. Title for the expression, i.e. a short string describing
|
||||
# its purpose. This can be used e.g. in UIs which allow to enter the
|
||||
# expression.
|
||||
# Corresponds to the JSON property `title`
|
||||
# @return [String]
|
||||
attr_accessor :title
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@expression = args[:expression] if args.key?(:expression)
|
||||
@location = args[:location] if args.key?(:location)
|
||||
@title = args[:title] if args.key?(:title)
|
||||
end
|
||||
end
|
||||
|
||||
# The response message for Locations.ListLocations.
|
||||
class ListLocationsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of locations that matches the specified filter in the request.
|
||||
# Corresponds to the JSON property `locations`
|
||||
# @return [Array<Google::Apis::SecretmanagerV1::Location>]
|
||||
attr_accessor :locations
|
||||
|
||||
# The standard List next-page token.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@locations = args[:locations] if args.key?(:locations)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
end
|
||||
end
|
||||
|
||||
# Response message for SecretManagerService.ListSecretVersions.
|
||||
class ListSecretVersionsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A token to retrieve the next page of results. Pass this value in
|
||||
# ListSecretVersionsRequest.page_token to retrieve the next page.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
# The total number of SecretVersions.
|
||||
# Corresponds to the JSON property `totalSize`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :total_size
|
||||
|
||||
# The list of SecretVersions sorted in reverse by
|
||||
# create_time (newest first).
|
||||
# Corresponds to the JSON property `versions`
|
||||
# @return [Array<Google::Apis::SecretmanagerV1::SecretVersion>]
|
||||
attr_accessor :versions
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
@total_size = args[:total_size] if args.key?(:total_size)
|
||||
@versions = args[:versions] if args.key?(:versions)
|
||||
end
|
||||
end
|
||||
|
||||
# Response message for SecretManagerService.ListSecrets.
|
||||
class ListSecretsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A token to retrieve the next page of results. Pass this value in
|
||||
# ListSecretsRequest.page_token to retrieve the next page.
|
||||
# Corresponds to the JSON property `nextPageToken`
|
||||
# @return [String]
|
||||
attr_accessor :next_page_token
|
||||
|
||||
# The list of Secrets sorted in reverse by create_time (newest
|
||||
# first).
|
||||
# Corresponds to the JSON property `secrets`
|
||||
# @return [Array<Google::Apis::SecretmanagerV1::Secret>]
|
||||
attr_accessor :secrets
|
||||
|
||||
# The total number of Secrets.
|
||||
# Corresponds to the JSON property `totalSize`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :total_size
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
||||
@secrets = args[:secrets] if args.key?(:secrets)
|
||||
@total_size = args[:total_size] if args.key?(:total_size)
|
||||
end
|
||||
end
|
||||
|
||||
# A resource that represents Google Cloud Platform location.
|
||||
class Location
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The friendly name for this location, typically a nearby city name.
|
||||
# For example, "Tokyo".
|
||||
# Corresponds to the JSON property `displayName`
|
||||
# @return [String]
|
||||
attr_accessor :display_name
|
||||
|
||||
# Cross-service attributes for the location. For example
|
||||
# `"cloud.googleapis.com/region": "us-east1"`
|
||||
# Corresponds to the JSON property `labels`
|
||||
# @return [Hash<String,String>]
|
||||
attr_accessor :labels
|
||||
|
||||
# The canonical id for this location. For example: `"us-east1"`.
|
||||
# Corresponds to the JSON property `locationId`
|
||||
# @return [String]
|
||||
attr_accessor :location_id
|
||||
|
||||
# Service-specific metadata. For example the available capacity at the given
|
||||
# location.
|
||||
# Corresponds to the JSON property `metadata`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :metadata
|
||||
|
||||
# Resource name for the location, which may vary between implementations.
|
||||
# For example: `"projects/example-project/locations/us-east1"`
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@display_name = args[:display_name] if args.key?(:display_name)
|
||||
@labels = args[:labels] if args.key?(:labels)
|
||||
@location_id = args[:location_id] if args.key?(:location_id)
|
||||
@metadata = args[:metadata] if args.key?(:metadata)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
end
|
||||
end
|
||||
|
||||
# An Identity and Access Management (IAM) policy, which specifies access
|
||||
# controls for Google Cloud resources.
|
||||
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
|
||||
# `members` to a single `role`. Members can be user accounts, service accounts,
|
||||
# Google groups, and domains (such as G Suite). A `role` is a named list of
|
||||
# permissions; each `role` can be an IAM predefined role or a user-created
|
||||
# custom role.
|
||||
# Optionally, a `binding` can specify a `condition`, which is a logical
|
||||
# expression that allows access to a resource only if the expression evaluates
|
||||
# to `true`. A condition can add constraints based on attributes of the
|
||||
# request, the resource, or both.
|
||||
# **JSON example:**
|
||||
# `
|
||||
# "bindings": [
|
||||
# `
|
||||
# "role": "roles/resourcemanager.organizationAdmin",
|
||||
# "members": [
|
||||
# "user:mike@example.com",
|
||||
# "group:admins@example.com",
|
||||
# "domain:google.com",
|
||||
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "role": "roles/resourcemanager.organizationViewer",
|
||||
# "members": ["user:eve@example.com"],
|
||||
# "condition": `
|
||||
# "title": "expirable access",
|
||||
# "description": "Does not grant access after Sep 2020",
|
||||
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
|
||||
# ",
|
||||
# `
|
||||
# `
|
||||
# ],
|
||||
# "etag": "BwWWja0YfJA=",
|
||||
# "version": 3
|
||||
# `
|
||||
# **YAML example:**
|
||||
# bindings:
|
||||
# - members:
|
||||
# - user:mike@example.com
|
||||
# - group:admins@example.com
|
||||
# - domain:google.com
|
||||
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
||||
# role: roles/resourcemanager.organizationAdmin
|
||||
# - members:
|
||||
# - user:eve@example.com
|
||||
# role: roles/resourcemanager.organizationViewer
|
||||
# condition:
|
||||
# title: expirable access
|
||||
# description: Does not grant access after Sep 2020
|
||||
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
|
||||
# - etag: BwWWja0YfJA=
|
||||
# - version: 3
|
||||
# For a description of IAM and its features, see the
|
||||
# [IAM documentation](https://cloud.google.com/iam/docs/).
|
||||
class Policy
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Specifies cloud audit logging configuration for this policy.
|
||||
# Corresponds to the JSON property `auditConfigs`
|
||||
# @return [Array<Google::Apis::SecretmanagerV1::AuditConfig>]
|
||||
attr_accessor :audit_configs
|
||||
|
||||
# Associates a list of `members` to a `role`. Optionally, may specify a
|
||||
# `condition` that determines how and when the `bindings` are applied. Each
|
||||
# of the `bindings` must contain at least one member.
|
||||
# Corresponds to the JSON property `bindings`
|
||||
# @return [Array<Google::Apis::SecretmanagerV1::Binding>]
|
||||
attr_accessor :bindings
|
||||
|
||||
# `etag` is used for optimistic concurrency control as a way to help
|
||||
# prevent simultaneous updates of a policy from overwriting each other.
|
||||
# It is strongly suggested that systems make use of the `etag` in the
|
||||
# read-modify-write cycle to perform policy updates in order to avoid race
|
||||
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
|
||||
# systems are expected to put that etag in the request to `setIamPolicy` to
|
||||
# ensure that their change will be applied to the same version of the policy.
|
||||
# **Important:** If you use IAM Conditions, you must include the `etag` field
|
||||
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
|
||||
# you to overwrite a version `3` policy with a version `1` policy, and all of
|
||||
# the conditions in the version `3` policy are lost.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# Specifies the format of the policy.
|
||||
# Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
|
||||
# are rejected.
|
||||
# Any operation that affects conditional role bindings must specify version
|
||||
# `3`. This requirement applies to the following operations:
|
||||
# * Getting a policy that includes a conditional role binding
|
||||
# * Adding a conditional role binding to a policy
|
||||
# * Changing a conditional role binding in a policy
|
||||
# * Removing any role binding, with or without a condition, from a policy
|
||||
# that includes conditions
|
||||
# **Important:** If you use IAM Conditions, you must include the `etag` field
|
||||
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows
|
||||
# you to overwrite a version `3` policy with a version `1` policy, and all of
|
||||
# the conditions in the version `3` policy are lost.
|
||||
# If a policy does not include any conditions, operations on that policy may
|
||||
# specify any valid version or leave the field unset.
|
||||
# Corresponds to the JSON property `version`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :version
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
|
||||
@bindings = args[:bindings] if args.key?(:bindings)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@version = args[:version] if args.key?(:version)
|
||||
end
|
||||
end
|
||||
|
||||
# Represents a Replica for this Secret.
|
||||
class Replica
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The canonical IDs of the location to replicate data.
|
||||
# For example: `"us-east1"`.
|
||||
# Corresponds to the JSON property `location`
|
||||
# @return [String]
|
||||
attr_accessor :location
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@location = args[:location] if args.key?(:location)
|
||||
end
|
||||
end
|
||||
|
||||
# A policy that defines the replication configuration of data.
|
||||
class Replication
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A replication policy that replicates the Secret payload without any
|
||||
# restrictions.
|
||||
# Corresponds to the JSON property `automatic`
|
||||
# @return [Google::Apis::SecretmanagerV1::Automatic]
|
||||
attr_accessor :automatic
|
||||
|
||||
# A replication policy that replicates the Secret payload into the
|
||||
# locations specified in Secret.replication.user_managed.replicas
|
||||
# Corresponds to the JSON property `userManaged`
|
||||
# @return [Google::Apis::SecretmanagerV1::UserManaged]
|
||||
attr_accessor :user_managed
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@automatic = args[:automatic] if args.key?(:automatic)
|
||||
@user_managed = args[:user_managed] if args.key?(:user_managed)
|
||||
end
|
||||
end
|
||||
|
||||
# A Secret is a logical secret whose value and versions can
|
||||
# be accessed.
|
||||
# A Secret is made up of zero or more SecretVersions that
|
||||
# represent the secret data.
|
||||
class Secret
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Output only. The time at which the Secret was created.
|
||||
# Corresponds to the JSON property `createTime`
|
||||
# @return [String]
|
||||
attr_accessor :create_time
|
||||
|
||||
# The labels assigned to this Secret.
|
||||
# Label keys must be between 1 and 63 characters long, have a UTF-8 encoding
|
||||
# of maximum 128 bytes, and must conform to the following PCRE regular
|
||||
# expression: `\p`Ll`\p`Lo``0,62``
|
||||
# Label values must be between 0 and 63 characters long, have a UTF-8
|
||||
# encoding of maximum 128 bytes, and must conform to the following PCRE
|
||||
# regular expression: `[\p`Ll`\p`Lo`\p`N`_-]`0,63``
|
||||
# No more than 64 labels can be assigned to a given resource.
|
||||
# Corresponds to the JSON property `labels`
|
||||
# @return [Hash<String,String>]
|
||||
attr_accessor :labels
|
||||
|
||||
# Output only. The resource name of the Secret in the format `projects/*/secrets/
|
||||
# *`.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# A policy that defines the replication configuration of data.
|
||||
# Corresponds to the JSON property `replication`
|
||||
# @return [Google::Apis::SecretmanagerV1::Replication]
|
||||
attr_accessor :replication
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@create_time = args[:create_time] if args.key?(:create_time)
|
||||
@labels = args[:labels] if args.key?(:labels)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@replication = args[:replication] if args.key?(:replication)
|
||||
end
|
||||
end
|
||||
|
||||
# A secret payload resource in the Secret Manager API. This contains the
|
||||
# sensitive secret data that is associated with a SecretVersion.
|
||||
class SecretPayload
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The secret data. Must be no larger than 64KiB.
|
||||
# Corresponds to the JSON property `data`
|
||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||
# @return [String]
|
||||
attr_accessor :data
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@data = args[:data] if args.key?(:data)
|
||||
end
|
||||
end
|
||||
|
||||
# A secret version resource in the Secret Manager API.
|
||||
class SecretVersion
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Output only. The time at which the SecretVersion was created.
|
||||
# Corresponds to the JSON property `createTime`
|
||||
# @return [String]
|
||||
attr_accessor :create_time
|
||||
|
||||
# Output only. The time this SecretVersion was destroyed.
|
||||
# Only present if state is
|
||||
# DESTROYED.
|
||||
# Corresponds to the JSON property `destroyTime`
|
||||
# @return [String]
|
||||
attr_accessor :destroy_time
|
||||
|
||||
# Output only. The resource name of the SecretVersion in the
|
||||
# format `projects/*/secrets/*/versions/*`.
|
||||
# SecretVersion IDs in a Secret start at 1 and
|
||||
# are incremented for each subsequent version of the secret.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
# Output only. The current state of the SecretVersion.
|
||||
# Corresponds to the JSON property `state`
|
||||
# @return [String]
|
||||
attr_accessor :state
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@create_time = args[:create_time] if args.key?(:create_time)
|
||||
@destroy_time = args[:destroy_time] if args.key?(:destroy_time)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@state = args[:state] if args.key?(:state)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message for `SetIamPolicy` method.
|
||||
class SetIamPolicyRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# An Identity and Access Management (IAM) policy, which specifies access
|
||||
# controls for Google Cloud resources.
|
||||
# A `Policy` is a collection of `bindings`. A `binding` binds one or more
|
||||
# `members` to a single `role`. Members can be user accounts, service accounts,
|
||||
# Google groups, and domains (such as G Suite). A `role` is a named list of
|
||||
# permissions; each `role` can be an IAM predefined role or a user-created
|
||||
# custom role.
|
||||
# Optionally, a `binding` can specify a `condition`, which is a logical
|
||||
# expression that allows access to a resource only if the expression evaluates
|
||||
# to `true`. A condition can add constraints based on attributes of the
|
||||
# request, the resource, or both.
|
||||
# **JSON example:**
|
||||
# `
|
||||
# "bindings": [
|
||||
# `
|
||||
# "role": "roles/resourcemanager.organizationAdmin",
|
||||
# "members": [
|
||||
# "user:mike@example.com",
|
||||
# "group:admins@example.com",
|
||||
# "domain:google.com",
|
||||
# "serviceAccount:my-project-id@appspot.gserviceaccount.com"
|
||||
# ]
|
||||
# `,
|
||||
# `
|
||||
# "role": "roles/resourcemanager.organizationViewer",
|
||||
# "members": ["user:eve@example.com"],
|
||||
# "condition": `
|
||||
# "title": "expirable access",
|
||||
# "description": "Does not grant access after Sep 2020",
|
||||
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')
|
||||
# ",
|
||||
# `
|
||||
# `
|
||||
# ],
|
||||
# "etag": "BwWWja0YfJA=",
|
||||
# "version": 3
|
||||
# `
|
||||
# **YAML example:**
|
||||
# bindings:
|
||||
# - members:
|
||||
# - user:mike@example.com
|
||||
# - group:admins@example.com
|
||||
# - domain:google.com
|
||||
# - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
||||
# role: roles/resourcemanager.organizationAdmin
|
||||
# - members:
|
||||
# - user:eve@example.com
|
||||
# role: roles/resourcemanager.organizationViewer
|
||||
# condition:
|
||||
# title: expirable access
|
||||
# description: Does not grant access after Sep 2020
|
||||
# expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
|
||||
# - etag: BwWWja0YfJA=
|
||||
# - version: 3
|
||||
# For a description of IAM and its features, see the
|
||||
# [IAM documentation](https://cloud.google.com/iam/docs/).
|
||||
# Corresponds to the JSON property `policy`
|
||||
# @return [Google::Apis::SecretmanagerV1::Policy]
|
||||
attr_accessor :policy
|
||||
|
||||
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
||||
# the fields in the mask will be modified. If no mask is provided, the
|
||||
# following default mask is used:
|
||||
# paths: "bindings, etag"
|
||||
# This field is only used by Cloud IAM.
|
||||
# Corresponds to the JSON property `updateMask`
|
||||
# @return [String]
|
||||
attr_accessor :update_mask
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@policy = args[:policy] if args.key?(:policy)
|
||||
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message for `TestIamPermissions` method.
|
||||
class TestIamPermissionsRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The set of permissions to check for the `resource`. Permissions with
|
||||
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
||||
# information see
|
||||
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
||||
# Corresponds to the JSON property `permissions`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :permissions
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@permissions = args[:permissions] if args.key?(:permissions)
|
||||
end
|
||||
end
|
||||
|
||||
# Response message for `TestIamPermissions` method.
|
||||
class TestIamPermissionsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A subset of `TestPermissionsRequest.permissions` that the caller is
|
||||
# allowed.
|
||||
# Corresponds to the JSON property `permissions`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :permissions
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@permissions = args[:permissions] if args.key?(:permissions)
|
||||
end
|
||||
end
|
||||
|
||||
# A replication policy that replicates the Secret payload into the
|
||||
# locations specified in Secret.replication.user_managed.replicas
|
||||
class UserManaged
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Required. The list of Replicas for this Secret.
|
||||
# Cannot be empty.
|
||||
# Corresponds to the JSON property `replicas`
|
||||
# @return [Array<Google::Apis::SecretmanagerV1::Replica>]
|
||||
attr_accessor :replicas
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@replicas = args[:replicas] if args.key?(:replicas)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,388 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'date'
|
||||
require 'google/apis/core/base_service'
|
||||
require 'google/apis/core/json_representation'
|
||||
require 'google/apis/core/hashable'
|
||||
require 'google/apis/errors'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
module SecretmanagerV1
|
||||
|
||||
class AccessSecretVersionResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AddSecretVersionRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuditConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuditLogConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Automatic
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Binding
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DestroySecretVersionRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class DisableSecretVersionRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Empty
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class EnableSecretVersionRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Expr
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListLocationsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListSecretVersionsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListSecretsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Location
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Policy
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Replica
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Replication
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Secret
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SecretPayload
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SecretVersion
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class UserManaged
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AccessSecretVersionResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :name, as: 'name'
|
||||
property :payload, as: 'payload', class: Google::Apis::SecretmanagerV1::SecretPayload, decorator: Google::Apis::SecretmanagerV1::SecretPayload::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class AddSecretVersionRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :payload, as: 'payload', class: Google::Apis::SecretmanagerV1::SecretPayload, decorator: Google::Apis::SecretmanagerV1::SecretPayload::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class AuditConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::SecretmanagerV1::AuditLogConfig, decorator: Google::Apis::SecretmanagerV1::AuditLogConfig::Representation
|
||||
|
||||
property :service, as: 'service'
|
||||
end
|
||||
end
|
||||
|
||||
class AuditLogConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :exempted_members, as: 'exemptedMembers'
|
||||
property :log_type, as: 'logType'
|
||||
end
|
||||
end
|
||||
|
||||
class Automatic
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class Binding
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :condition, as: 'condition', class: Google::Apis::SecretmanagerV1::Expr, decorator: Google::Apis::SecretmanagerV1::Expr::Representation
|
||||
|
||||
collection :members, as: 'members'
|
||||
property :role, as: 'role'
|
||||
end
|
||||
end
|
||||
|
||||
class DestroySecretVersionRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class DisableSecretVersionRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class Empty
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class EnableSecretVersionRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class Expr
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :description, as: 'description'
|
||||
property :expression, as: 'expression'
|
||||
property :location, as: 'location'
|
||||
property :title, as: 'title'
|
||||
end
|
||||
end
|
||||
|
||||
class ListLocationsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :locations, as: 'locations', class: Google::Apis::SecretmanagerV1::Location, decorator: Google::Apis::SecretmanagerV1::Location::Representation
|
||||
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
end
|
||||
end
|
||||
|
||||
class ListSecretVersionsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
property :total_size, as: 'totalSize'
|
||||
collection :versions, as: 'versions', class: Google::Apis::SecretmanagerV1::SecretVersion, decorator: Google::Apis::SecretmanagerV1::SecretVersion::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class ListSecretsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :next_page_token, as: 'nextPageToken'
|
||||
collection :secrets, as: 'secrets', class: Google::Apis::SecretmanagerV1::Secret, decorator: Google::Apis::SecretmanagerV1::Secret::Representation
|
||||
|
||||
property :total_size, as: 'totalSize'
|
||||
end
|
||||
end
|
||||
|
||||
class Location
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :display_name, as: 'displayName'
|
||||
hash :labels, as: 'labels'
|
||||
property :location_id, as: 'locationId'
|
||||
hash :metadata, as: 'metadata'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class Policy
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::SecretmanagerV1::AuditConfig, decorator: Google::Apis::SecretmanagerV1::AuditConfig::Representation
|
||||
|
||||
collection :bindings, as: 'bindings', class: Google::Apis::SecretmanagerV1::Binding, decorator: Google::Apis::SecretmanagerV1::Binding::Representation
|
||||
|
||||
property :etag, :base64 => true, as: 'etag'
|
||||
property :version, as: 'version'
|
||||
end
|
||||
end
|
||||
|
||||
class Replica
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :location, as: 'location'
|
||||
end
|
||||
end
|
||||
|
||||
class Replication
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :automatic, as: 'automatic', class: Google::Apis::SecretmanagerV1::Automatic, decorator: Google::Apis::SecretmanagerV1::Automatic::Representation
|
||||
|
||||
property :user_managed, as: 'userManaged', class: Google::Apis::SecretmanagerV1::UserManaged, decorator: Google::Apis::SecretmanagerV1::UserManaged::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Secret
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :create_time, as: 'createTime'
|
||||
hash :labels, as: 'labels'
|
||||
property :name, as: 'name'
|
||||
property :replication, as: 'replication', class: Google::Apis::SecretmanagerV1::Replication, decorator: Google::Apis::SecretmanagerV1::Replication::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class SecretPayload
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :data, :base64 => true, as: 'data'
|
||||
end
|
||||
end
|
||||
|
||||
class SecretVersion
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :create_time, as: 'createTime'
|
||||
property :destroy_time, as: 'destroyTime'
|
||||
property :name, as: 'name'
|
||||
property :state, as: 'state'
|
||||
end
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :policy, as: 'policy', class: Google::Apis::SecretmanagerV1::Policy, decorator: Google::Apis::SecretmanagerV1::Policy::Representation
|
||||
|
||||
property :update_mask, as: 'updateMask'
|
||||
end
|
||||
end
|
||||
|
||||
class TestIamPermissionsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class TestIamPermissionsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class UserManaged
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :replicas, as: 'replicas', class: Google::Apis::SecretmanagerV1::Replica, decorator: Google::Apis::SecretmanagerV1::Replica::Representation
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,675 @@
|
|||
# Copyright 2015 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
require 'google/apis/core/base_service'
|
||||
require 'google/apis/core/json_representation'
|
||||
require 'google/apis/core/hashable'
|
||||
require 'google/apis/errors'
|
||||
|
||||
module Google
|
||||
module Apis
|
||||
module SecretmanagerV1
|
||||
# Secret Manager API
|
||||
#
|
||||
# Stores and manages access to application secrets. Provides convenience while
|
||||
# improving security.
|
||||
#
|
||||
# @example
|
||||
# require 'google/apis/secretmanager_v1'
|
||||
#
|
||||
# Secretmanager = Google::Apis::SecretmanagerV1 # Alias the module
|
||||
# service = Secretmanager::SecretManagerService.new
|
||||
#
|
||||
# @see https://cloud.google.com/secret-manager/
|
||||
class SecretManagerService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# 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.
|
||||
attr_accessor :key
|
||||
|
||||
# @return [String]
|
||||
# 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.
|
||||
attr_accessor :quota_user
|
||||
|
||||
def initialize
|
||||
super('https://secretmanager.googleapis.com/', '')
|
||||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Gets information about a location.
|
||||
# @param [String] name
|
||||
# Resource name for the location.
|
||||
# @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::SecretmanagerV1::Location] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::Location]
|
||||
#
|
||||
# @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 get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::Location::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Lists information about the supported locations for this service.
|
||||
# @param [String] name
|
||||
# The resource that owns the locations collection, if applicable.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @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::SecretmanagerV1::ListLocationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::ListLocationsResponse]
|
||||
#
|
||||
# @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 list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}/locations', options)
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::ListLocationsResponse::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::ListLocationsResponse
|
||||
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['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Creates a new SecretVersion containing secret data and attaches
|
||||
# it to an existing Secret.
|
||||
# @param [String] parent
|
||||
# Required. The resource name of the Secret to associate with the
|
||||
# SecretVersion in the format `projects/*/secrets/*`.
|
||||
# @param [Google::Apis::SecretmanagerV1::AddSecretVersionRequest] add_secret_version_request_object
|
||||
# @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::SecretmanagerV1::SecretVersion] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::SecretVersion]
|
||||
#
|
||||
# @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 add_project_secret_version(parent, add_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+parent}:addVersion', options)
|
||||
command.request_representation = Google::Apis::SecretmanagerV1::AddSecretVersionRequest::Representation
|
||||
command.request_object = add_secret_version_request_object
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::SecretVersion::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Creates a new Secret containing no SecretVersions.
|
||||
# @param [String] parent
|
||||
# Required. The resource name of the project to associate with the
|
||||
# Secret, in the format `projects/*`.
|
||||
# @param [Google::Apis::SecretmanagerV1::Secret] secret_object
|
||||
# @param [String] secret_id
|
||||
# Required. This must be unique within the project.
|
||||
# @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::SecretmanagerV1::Secret] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::Secret]
|
||||
#
|
||||
# @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 create_project_secret(parent, secret_object = nil, secret_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+parent}/secrets', options)
|
||||
command.request_representation = Google::Apis::SecretmanagerV1::Secret::Representation
|
||||
command.request_object = secret_object
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::Secret::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Deletes a Secret.
|
||||
# @param [String] name
|
||||
# Required. The resource name of the Secret to delete in the format
|
||||
# `projects/*/secrets/*`.
|
||||
# @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::SecretmanagerV1::Empty] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::Empty]
|
||||
#
|
||||
# @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 delete_project_secret(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:delete, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::Empty::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Gets metadata for a given Secret.
|
||||
# @param [String] name
|
||||
# Required. The resource name of the Secret, in the format `projects/*/secrets/*`
|
||||
# .
|
||||
# @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::SecretmanagerV1::Secret] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::Secret]
|
||||
#
|
||||
# @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 get_project_secret(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::Secret::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Gets the access control policy for a secret.
|
||||
# Returns empty policy if the secret exists and does not have a policy set.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being requested.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [Fixnum] options_requested_policy_version
|
||||
# Optional. The policy format version to be returned.
|
||||
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
||||
# rejected.
|
||||
# Requests for policies with any conditional bindings must specify version 3.
|
||||
# Policies without any conditional bindings may specify any valid value or
|
||||
# leave the field unset.
|
||||
# @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::SecretmanagerV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::Policy]
|
||||
#
|
||||
# @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 get_project_secret_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::Policy::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists Secrets.
|
||||
# @param [String] parent
|
||||
# Required. The resource name of the project associated with the
|
||||
# Secrets, in the format `projects/*`.
|
||||
# @param [Fixnum] page_size
|
||||
# Optional. The maximum number of results to be returned in a single page. If
|
||||
# set to 0, the server decides the number of results to return. If the
|
||||
# number is greater than 25000, it is capped at 25000.
|
||||
# @param [String] page_token
|
||||
# Optional. Pagination token, returned earlier via
|
||||
# ListSecretsResponse.next_page_token.
|
||||
# @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::SecretmanagerV1::ListSecretsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::ListSecretsResponse]
|
||||
#
|
||||
# @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 list_project_secrets(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+parent}/secrets', options)
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::ListSecretsResponse::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Updates metadata of an existing Secret.
|
||||
# @param [String] name
|
||||
# Output only. The resource name of the Secret in the format `projects/*/secrets/
|
||||
# *`.
|
||||
# @param [Google::Apis::SecretmanagerV1::Secret] secret_object
|
||||
# @param [String] update_mask
|
||||
# Required. Specifies the fields to be updated.
|
||||
# @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::SecretmanagerV1::Secret] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::Secret]
|
||||
#
|
||||
# @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 patch_project_secret(name, secret_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:patch, 'v1/{+name}', options)
|
||||
command.request_representation = Google::Apis::SecretmanagerV1::Secret::Representation
|
||||
command.request_object = secret_object
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::Secret::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# 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.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being specified.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::SecretmanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
|
||||
# @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::SecretmanagerV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::Policy]
|
||||
#
|
||||
# @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 set_secret_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
||||
command.request_representation = Google::Apis::SecretmanagerV1::SetIamPolicyRequest::Representation
|
||||
command.request_object = set_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::Policy::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# 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.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy detail is being requested.
|
||||
# See the operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::SecretmanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
||||
# @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::SecretmanagerV1::TestIamPermissionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::TestIamPermissionsResponse]
|
||||
#
|
||||
# @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 test_secret_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
||||
command.request_representation = Google::Apis::SecretmanagerV1::TestIamPermissionsRequest::Representation
|
||||
command.request_object = test_iam_permissions_request_object
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::TestIamPermissionsResponse::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Accesses a SecretVersion. This call returns the secret data.
|
||||
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
|
||||
# SecretVersion.
|
||||
# @param [String] name
|
||||
# Required. The resource name of the SecretVersion in the format
|
||||
# `projects/*/secrets/*/versions/*`.
|
||||
# @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::SecretmanagerV1::AccessSecretVersionResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::AccessSecretVersionResponse]
|
||||
#
|
||||
# @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 access_project_secret_version(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}:access', options)
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::AccessSecretVersionResponse::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Destroys a SecretVersion.
|
||||
# Sets the state of the SecretVersion to
|
||||
# DESTROYED and irrevocably destroys the
|
||||
# secret data.
|
||||
# @param [String] name
|
||||
# Required. The resource name of the SecretVersion to destroy in the format
|
||||
# `projects/*/secrets/*/versions/*`.
|
||||
# @param [Google::Apis::SecretmanagerV1::DestroySecretVersionRequest] destroy_secret_version_request_object
|
||||
# @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::SecretmanagerV1::SecretVersion] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::SecretVersion]
|
||||
#
|
||||
# @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 destroy_secret_version(name, destroy_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+name}:destroy', options)
|
||||
command.request_representation = Google::Apis::SecretmanagerV1::DestroySecretVersionRequest::Representation
|
||||
command.request_object = destroy_secret_version_request_object
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::SecretVersion::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Disables a SecretVersion.
|
||||
# Sets the state of the SecretVersion to
|
||||
# DISABLED.
|
||||
# @param [String] name
|
||||
# Required. The resource name of the SecretVersion to disable in the format
|
||||
# `projects/*/secrets/*/versions/*`.
|
||||
# @param [Google::Apis::SecretmanagerV1::DisableSecretVersionRequest] disable_secret_version_request_object
|
||||
# @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::SecretmanagerV1::SecretVersion] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::SecretVersion]
|
||||
#
|
||||
# @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 disable_secret_version(name, disable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+name}:disable', options)
|
||||
command.request_representation = Google::Apis::SecretmanagerV1::DisableSecretVersionRequest::Representation
|
||||
command.request_object = disable_secret_version_request_object
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::SecretVersion::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Enables a SecretVersion.
|
||||
# Sets the state of the SecretVersion to
|
||||
# ENABLED.
|
||||
# @param [String] name
|
||||
# Required. The resource name of the SecretVersion to enable in the format
|
||||
# `projects/*/secrets/*/versions/*`.
|
||||
# @param [Google::Apis::SecretmanagerV1::EnableSecretVersionRequest] enable_secret_version_request_object
|
||||
# @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::SecretmanagerV1::SecretVersion] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::SecretVersion]
|
||||
#
|
||||
# @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 enable_secret_version(name, enable_secret_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+name}:enable', options)
|
||||
command.request_representation = Google::Apis::SecretmanagerV1::EnableSecretVersionRequest::Representation
|
||||
command.request_object = enable_secret_version_request_object
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::SecretVersion::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Gets metadata for a SecretVersion.
|
||||
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
|
||||
# SecretVersion.
|
||||
# @param [String] name
|
||||
# Required. The resource name of the SecretVersion in the format
|
||||
# `projects/*/secrets/*/versions/*`.
|
||||
# `projects/*/secrets/*/versions/latest` is an alias to the `latest`
|
||||
# SecretVersion.
|
||||
# @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::SecretmanagerV1::SecretVersion] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::SecretVersion]
|
||||
#
|
||||
# @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 get_project_secret_version(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::SecretVersion::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
# Lists SecretVersions. This call does not return secret
|
||||
# data.
|
||||
# @param [String] parent
|
||||
# Required. The resource name of the Secret associated with the
|
||||
# SecretVersions to list, in the format
|
||||
# `projects/*/secrets/*`.
|
||||
# @param [Fixnum] page_size
|
||||
# Optional. The maximum number of results to be returned in a single page. If
|
||||
# set to 0, the server decides the number of results to return. If the
|
||||
# number is greater than 25000, it is capped at 25000.
|
||||
# @param [String] page_token
|
||||
# Optional. Pagination token, returned earlier via
|
||||
# ListSecretVersionsResponse.next_page_token][].
|
||||
# @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::SecretmanagerV1::ListSecretVersionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::SecretmanagerV1::ListSecretVersionsResponse]
|
||||
#
|
||||
# @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 list_project_secret_versions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+parent}/versions', options)
|
||||
command.response_representation = Google::Apis::SecretmanagerV1::ListSecretVersionsResponse::Representation
|
||||
command.response_class = Google::Apis::SecretmanagerV1::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
|
||||
|
||||
protected
|
||||
|
||||
def apply_command_defaults(command)
|
||||
command.query['key'] = key unless key.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue