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
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, 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, 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.
Constructor Details
#initialize ⇒ KmsinventoryService
Returns a new instance of KmsinventoryService.
45 46 47 48 49 50 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 45 def initialize super('https://kmsinventory.googleapis.com/', '', 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.
38 39 40 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 38 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.
43 44 45 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#get_project_location_key_ring_crypto_key_protected_resources_summary(name, 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. Only resources within the same Cloud organization as the key will be returned. The project that holds the key must be part of an organization in order for this call to succeed.
162 163 164 165 166 167 168 169 170 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 162 def get_project_location_key_ring_crypto_key_protected_resources_summary(name, 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['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.
127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 127 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, 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.
84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 84 def search_organization_protected_resources(scope, crypto_key: nil, page_size: nil, page_token: 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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |