func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
CryptoKeyIterator manages a stream of *kmspb.CryptoKey.
type CryptoKeyIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*kmspb.CryptoKey, nextPageToken string, err error) // contains filtered or unexported fields }
func (it *CryptoKeyIterator) Next() (*kmspb.CryptoKey, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (it *CryptoKeyIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
KeyDashboardCallOptions contains the retry settings for each method of KeyDashboardClient.
type KeyDashboardCallOptions struct { ListCryptoKeys []gax.CallOption }
KeyDashboardClient is a client for interacting with KMS Inventory API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Provides a cross-region view of all Cloud KMS keys in a given Cloud project.
type KeyDashboardClient struct { // The call options for this service. CallOptions *KeyDashboardCallOptions // contains filtered or unexported fields }
func NewKeyDashboardClient(ctx context.Context, opts ...option.ClientOption) (*KeyDashboardClient, error)
NewKeyDashboardClient creates a new key dashboard service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Provides a cross-region view of all Cloud KMS keys in a given Cloud project.
▹ Example
func NewKeyDashboardRESTClient(ctx context.Context, opts ...option.ClientOption) (*KeyDashboardClient, error)
NewKeyDashboardRESTClient creates a new key dashboard service rest client.
Provides a cross-region view of all Cloud KMS keys in a given Cloud project.
▹ Example
func (c *KeyDashboardClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (c *KeyDashboardClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (c *KeyDashboardClient) ListCryptoKeys(ctx context.Context, req *inventorypb.ListCryptoKeysRequest, opts ...gax.CallOption) *CryptoKeyIterator
ListCryptoKeys 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.
▹ Example
KeyTrackingCallOptions contains the retry settings for each method of KeyTrackingClient.
type KeyTrackingCallOptions struct { GetProtectedResourcesSummary []gax.CallOption SearchProtectedResources []gax.CallOption }
KeyTrackingClient is a client for interacting with KMS Inventory API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Returns information about the resources in an org that are protected by a given Cloud KMS key via CMEK.
type KeyTrackingClient struct { // The call options for this service. CallOptions *KeyTrackingCallOptions // contains filtered or unexported fields }
func NewKeyTrackingClient(ctx context.Context, opts ...option.ClientOption) (*KeyTrackingClient, error)
NewKeyTrackingClient creates a new key tracking service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Returns information about the resources in an org that are protected by a given Cloud KMS key via CMEK.
▹ Example
func NewKeyTrackingRESTClient(ctx context.Context, opts ...option.ClientOption) (*KeyTrackingClient, error)
NewKeyTrackingRESTClient creates a new key tracking service rest client.
Returns information about the resources in an org that are protected by a given Cloud KMS key via CMEK.
▹ Example
func (c *KeyTrackingClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (c *KeyTrackingClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (c *KeyTrackingClient) GetProtectedResourcesSummary(ctx context.Context, req *inventorypb.GetProtectedResourcesSummaryRequest, opts ...gax.CallOption) (*inventorypb.ProtectedResourcesSummary, error)
GetProtectedResourcesSummary 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.
▹ Example
func (c *KeyTrackingClient) SearchProtectedResources(ctx context.Context, req *inventorypb.SearchProtectedResourcesRequest, opts ...gax.CallOption) *ProtectedResourceIterator
SearchProtectedResources returns metadata about the resources protected by the given Cloud KMS CryptoKey in the given Cloud organization.
▹ Example
ProtectedResourceIterator manages a stream of *inventorypb.ProtectedResource.
type ProtectedResourceIterator struct { // Response is the raw response for the current page. // It must be cast to the RPC response type. // Calling Next() or InternalFetch() updates this value. Response interface{} // InternalFetch is for use by the Google Cloud Libraries only. // It is not part of the stable interface of this package. // // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. InternalFetch func(pageSize int, pageToken string) (results []*inventorypb.ProtectedResource, nextPageToken string, err error) // contains filtered or unexported fields }
func (it *ProtectedResourceIterator) Next() (*inventorypb.ProtectedResource, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (it *ProtectedResourceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
Name | Synopsis |
---|---|
.. | |
inventorypb |