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, 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.
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, 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.
175 176 177 178 179 180 181 182 183 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 175 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.
140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 140 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.
96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/google/apis/kmsinventory_v1/service.rb', line 96 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 |