Google Cloud C++ Client 2.10.1
C++ Client Library for Google Cloud Platform
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
google::cloud::KmsKeyName Class Reference

This class identifies a Google Cloud KMS Key. More...

#include <google/cloud/kms_key_name.h>

Public Member Functions

 KmsKeyName (std::string const &project_id, std::string const &location, std::string const &key_ring, std::string const &kms_key_name)
 Constructs a KmsKeyName object identified by the given project_id, location, key_ring, and kms_key_name. More...
 
std::string const & FullName () const
 Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>". More...
 
Copy and move
 KmsKeyName (KmsKeyName const &)=default
 
KmsKeyNameoperator= (KmsKeyName const &)=default
 
 KmsKeyName (KmsKeyName &&)=default
 
KmsKeyNameoperator= (KmsKeyName &&)=default
 

Friends

std::ostream & operator<< (std::ostream &, KmsKeyName const &)
 Output the FullName() format. More...
 
Equality operators
bool operator== (KmsKeyName const &a, KmsKeyName const &b)
 
bool operator!= (KmsKeyName const &a, KmsKeyName const &b)
 

Detailed Description

This class identifies a Google Cloud KMS Key.

A KMS key is identified by its project_id, location, key_ring, and kms_key_name.

Note
This class makes no effort to validate the components of the key, It is the application's responsibility to provide a valid project id, location, key ring, and KMS key name. Passing invalid values will not be checked until the key is used in a RPC.

See https://cloud.google.com/kms/docs for more information on KMS.

Constructor & Destructor Documentation

◆ KmsKeyName() [1/3]

google::cloud::KmsKeyName::KmsKeyName ( std::string const &  project_id,
std::string const &  location,
std::string const &  key_ring,
std::string const &  kms_key_name 
)

Constructs a KmsKeyName object identified by the given project_id, location, key_ring, and kms_key_name.

◆ KmsKeyName() [2/3]

google::cloud::KmsKeyName::KmsKeyName ( KmsKeyName const &  )
default

◆ KmsKeyName() [3/3]

google::cloud::KmsKeyName::KmsKeyName ( KmsKeyName &&  )
default

Member Function Documentation

◆ FullName()

std::string const & google::cloud::KmsKeyName::FullName ( ) const
inline

Returns the fully qualified KMS Key name as a string of the form: "projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys\ /<kms_key_name>".

◆ operator=() [1/2]

KmsKeyName & google::cloud::KmsKeyName::operator= ( KmsKeyName &&  )
default

◆ operator=() [2/2]

KmsKeyName & google::cloud::KmsKeyName::operator= ( KmsKeyName const &  )
default

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( KmsKeyName const &  a,
KmsKeyName const &  b 
)
friend

◆ operator<<

std::ostream & operator<< ( std::ostream &  ,
KmsKeyName const &   
)
friend

Output the FullName() format.

◆ operator==

bool operator== ( KmsKeyName const &  a,
KmsKeyName const &  b 
)
friend