Documentation
¶
Index ¶
- func DeleteCMKImport(client *golangsdk.ServiceClient, opts DeleteCMKImportOpts) error
- func DisableKeyRotation(client *golangsdk.ServiceClient, keyID string) error
- func EnableKeyRotation(client *golangsdk.ServiceClient, keyID string) error
- func ImportCMKMaterial(client *golangsdk.ServiceClient, opts ImportCMKOpts) error
- func UpdateKeyRotationInterval(client *golangsdk.ServiceClient, opts RotationOpts) error
- type CMKImport
- type CreateOpts
- type DataEncryptOpts
- type DataKey
- type DecryptDataOpts
- type DecryptResp
- type DeleteCMKImportOpts
- type DeleteOpts
- type EncryptDEK
- type EncryptDEKOpts
- type EncryptDataOpts
- type EncryptResp
- type GetCMKImportOpts
- type ImportCMKOpts
- type Key
- type KeyRotationResult
- type ListKey
- type ListOpts
- type RotationOpts
- type RotationOptsBuilder
- type UpdateAliasOpts
- type UpdateDesOpts
- type UpdateKeyAlias
- type UpdateKeyDes
- type UpdateKeyState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteCMKImport ¶ added in v0.9.4
func DeleteCMKImport(client *golangsdk.ServiceClient, opts DeleteCMKImportOpts) error
func DisableKeyRotation ¶ added in v0.5.13
func DisableKeyRotation(client *golangsdk.ServiceClient, keyID string) error
func EnableKeyRotation ¶ added in v0.5.13
func EnableKeyRotation(client *golangsdk.ServiceClient, keyID string) error
func ImportCMKMaterial ¶ added in v0.9.4
func ImportCMKMaterial(client *golangsdk.ServiceClient, opts ImportCMKOpts) error
func UpdateKeyRotationInterval ¶ added in v0.5.13
func UpdateKeyRotationInterval(client *golangsdk.ServiceClient, opts RotationOpts) error
Types ¶
type CMKImport ¶ added in v0.9.4
type CMKImport struct {
KeyId string `json:"key_id"`
ImportToken string `json:"import_token"`
ExpirationTime int `json:"expiration_time"`
PublicKey string `json:"public_key"`
}
func GetCMKImport ¶ added in v0.9.4
func GetCMKImport(client *golangsdk.ServiceClient, opts GetCMKImportOpts) (*CMKImport, error)
type CreateOpts ¶
type CreateOpts struct {
// Alias of a CMK
KeyAlias string `json:"key_alias" required:"true"`
// CMK description
KeyDescription string `json:"key_description,omitempty"`
// Region where a CMK resides
Realm string `json:"realm,omitempty"`
// Purpose of a CMK (The default value is Encrypt_Decrypt)
KeyUsage string `json:"key_usage,omitempty"`
// Origin of a CMK. The default value is kms. Possible values: `kms` / `external`
Origin string `json:"origin,omitempty"`
}
type DataEncryptOpts ¶
type DataKey ¶
type DataKey struct {
// Current ID of a CMK
KeyID string `json:"key_id"`
PlainText string `json:"plain_text"`
CipherText string `json:"cipher_text"`
}
func DataEncryptGet ¶
func DataEncryptGet(client *golangsdk.ServiceClient, opts DataEncryptOpts) (*DataKey, error)
type DecryptDataOpts ¶ added in v0.9.2
type DecryptResp ¶ added in v0.9.2
type DecryptResp struct {
KeyID string `json:"key_id"`
PlainText string `json:"plain_text"`
PlainTextBase64 string `json:"plain_text_base64"`
}
func DecryptData ¶ added in v0.9.2
func DecryptData(client *golangsdk.ServiceClient, opts DecryptDataOpts) (*DecryptResp, error)
type DeleteCMKImportOpts ¶ added in v0.9.4
type DeleteOpts ¶
type EncryptDEK ¶
type EncryptDEK struct {
KeyID string `json:"key_id"`
DataKeyLength string `json:"datakey_length"`
CipherText string `json:"cipher_text"`
}
func EncryptDEKGet ¶
func EncryptDEKGet(client *golangsdk.ServiceClient, opts EncryptDEKOpts) (*EncryptDEK, error)
type EncryptDEKOpts ¶
type EncryptDEKOpts struct {
// ID of a CMK
KeyID string `json:"key_id" required:"true"`
// CMK description
EncryptionContext string `json:"encryption_context,omitempty"`
// 36-byte serial number of a request message
DataKeyPlainLength string `json:"datakey_plain_length,omitempty"`
// Both the plaintext (64 bytes) of a DEK and the SHA-256 hash value (32 bytes)
// of the plaintext are expressed as a hexadecimal character string.
PlainText string `json:"plain_text" required:"true"`
}
type EncryptDataOpts ¶ added in v0.9.2
type EncryptResp ¶ added in v0.9.2
func EncryptData ¶ added in v0.9.2
func EncryptData(client *golangsdk.ServiceClient, opts EncryptDataOpts) (*EncryptResp, error)
type GetCMKImportOpts ¶ added in v0.9.4
type ImportCMKOpts ¶ added in v0.9.4
type ImportCMKOpts struct {
KeyId string `json:"key_id" required:"true"`
ImportToken string `json:"import_token" required:"true"`
EncryptedKeyMaterial string `json:"encrypted_key_material" required:"true"`
ExpirationTime string `json:"expiration_time,omitempty"`
Sequence string `json:"sequence,omitempty"`
}
type Key ¶
type Key struct {
// Current ID of a CMK
KeyID string `json:"key_id"`
// ID of a user domain for the key.
DomainID string `json:"domain_id"`
// Alias of a CMK
KeyAlias string `json:"key_alias"`
// Region where a CMK resides
Realm string `json:"realm"`
// Description of a CMK
KeyDescription string `json:"key_description"`
// Creation time (time stamp) of a CMK
CreationDate string `json:"creation_date"`
// Scheduled deletion time (time stamp) of a CMK
ScheduledDeletionDate string `json:"scheduled_deletion_date"`
// State of a CMK
KeyState string `json:"key_state"`
// Identification of a Master Key. The value 1 indicates a Default
// Master Key, and the value 0 indicates a CMK
DefaultKeyFlag string `json:"default_key_flag"`
// Expiration time
ExpirationTime string `json:"expiration_time"`
// Origin of a CMK. The default value is kms. The following values
// are enumerated: kms indicates that the CMK material is generated by KMS.
Origin string `json:"origin"`
}
func CancelDelete ¶ added in v0.5.16
func CancelDelete(client *golangsdk.ServiceClient, keyID string) (*Key, error)
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*Key, error)
type KeyRotationResult ¶ added in v0.5.13
type KeyRotationResult struct {
// Key rotation status. The default value is false, indicating that key rotation is disabled.
Enabled bool `json:"key_rotation_enabled"`
// Rotation interval. The value is an integer in the range 30 to 365.
Interval int `json:"rotation_interval"`
// Last key rotation time. The timestamp indicates the total microseconds past the start of the epoch date (January 1, 1970).
LastRotationTime string `json:"last_rotation_time"`
// Number of key rotations.
NumberOfRotations int `json:"number_of_rotations"`
}
func GetKeyRotationStatus ¶ added in v0.5.13
func GetKeyRotationStatus(client *golangsdk.ServiceClient, opts RotationOpts) (*KeyRotationResult, error)
type ListKey ¶
type RotationOpts ¶ added in v0.5.13
type RotationOptsBuilder ¶ added in v0.5.13
type UpdateAliasOpts ¶
type UpdateDesOpts ¶
type UpdateKeyAlias ¶ added in v0.9.4
func UpdateAlias ¶
func UpdateAlias(client *golangsdk.ServiceClient, opts UpdateAliasOpts) (*UpdateKeyAlias, error)
type UpdateKeyDes ¶ added in v0.9.4
func UpdateDes ¶
func UpdateDes(client *golangsdk.ServiceClient, opts UpdateDesOpts) (*UpdateKeyDes, error)
type UpdateKeyState ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, opts DeleteOpts) (*UpdateKeyState, error)
func DisableKey ¶
func DisableKey(client *golangsdk.ServiceClient, keyID string) (*UpdateKeyState, error)
func EnableKey ¶
func EnableKey(client *golangsdk.ServiceClient, keyID string) (*UpdateKeyState, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.