Class: Google::Apis::KmsinventoryV1::KmsinventoryService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::KmsinventoryV1::KmsinventoryService
- Defined in:
- lib/google/apis/kmsinventory_v1/service.rb
Overview
KMS Inventory API
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://kmsinventory.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#get_project_location_key_ring_crypto_key_protected_resources_summary(name, fallback_scope: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1ProtectedResourcesSummary
Returns aggregate information about the resources protected by the given Cloud KMS CryptoKey.
-
#initialize ⇒ KmsinventoryService
constructor
A new instance of KmsinventoryService.
-
#list_project_crypto_keys(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1ListCryptoKeysResponse
Returns cryptographic keys managed by Cloud KMS in a given Cloud project.
-
#search_organization_protected_resources(scope, crypto_key: nil, page_size: nil, page_token: nil, resource_types: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse
Returns metadata about the resources protected by the given Cloud KMS CryptoKey in the given Cloud organization/project.
-
#search_project_protected_resources(scope, crypto_key: nil, page_size: nil, page_token: nil, resource_types: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse
Returns metadata about the resources protected by the given Cloud KMS CryptoKey in the given Cloud organization/project.
Constructor Details
#initialize ⇒ KmsinventoryService
Returns a new instance of KmsinventoryService.
47 48 49 50 51 52 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-kmsinventory_v1', client_version: Google::Apis::KmsinventoryV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
40 41 42 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 40 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
45 46 47 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#get_project_location_key_ring_crypto_key_protected_resources_summary(name, fallback_scope: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1ProtectedResourcesSummary
Returns aggregate information about the resources protected by the given Cloud
KMS CryptoKey. By default, summary of resources within the same Cloud
organization as the key will be returned, which requires the KMS organization
service account to be configured(refer https://docs.cloud.google.com/kms/docs/
view-key-usage#required-roles). If the KMS organization service account is not
configured or key's project is not part of an organization, set fallback_scope
to FALLBACK_SCOPE_PROJECT to retrieve a summary of protected resources
within the key's project.
186 187 188 189 190 191 192 193 194 195 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 186 def get_project_location_key_ring_crypto_key_protected_resources_summary(name, fallback_scope: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/protectedResourcesSummary', ) command.response_representation = Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1ProtectedResourcesSummary::Representation command.response_class = Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1ProtectedResourcesSummary command.params['name'] = name unless name.nil? command.query['fallbackScope'] = fallback_scope unless fallback_scope.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_crypto_keys(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1ListCryptoKeysResponse
Returns cryptographic keys managed by Cloud KMS in a given Cloud project. Note that this data is sourced from snapshots, meaning it may not completely reflect the actual state of key metadata at call time.
144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 144 def list_project_crypto_keys(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/cryptoKeys', ) command.response_representation = Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1ListCryptoKeysResponse::Representation command.response_class = Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1ListCryptoKeysResponse 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 |
#search_organization_protected_resources(scope, crypto_key: nil, page_size: nil, page_token: nil, resource_types: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse
Returns metadata about the resources protected by the given Cloud KMS CryptoKey in the given Cloud organization/project.
100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 100 def search_organization_protected_resources(scope, crypto_key: nil, page_size: nil, page_token: nil, resource_types: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+scope}/protectedResources:search', ) command.response_representation = Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse::Representation command.response_class = Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse command.params['scope'] = scope unless scope.nil? command.query['cryptoKey'] = crypto_key unless crypto_key.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['resourceTypes'] = resource_types unless resource_types.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#search_project_protected_resources(scope, crypto_key: nil, page_size: nil, page_token: nil, resource_types: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse
Returns metadata about the resources protected by the given Cloud KMS CryptoKey in the given Cloud organization/project.
243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 243 def search_project_protected_resources(scope, crypto_key: nil, page_size: nil, page_token: nil, resource_types: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+scope}/protectedResources:search', ) command.response_representation = Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse::Representation command.response_class = Google::Apis::KmsinventoryV1::GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse command.params['scope'] = scope unless scope.nil? command.query['cryptoKey'] = crypto_key unless crypto_key.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['resourceTypes'] = resource_types unless resource_types.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |