Documentation ¶
Overview ¶
Package keys provides information and interaction with keys in the Key Management Service service. The customer master keys (CMKs) used to encrypt data encryption keys (DEKs)
Index ¶
- func DisableKeyRotation(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r golangsdk.ErrResult)
- func EnableKeyRotation(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r golangsdk.ErrResult)
- func UpdateKeyRotationInterval(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r golangsdk.ErrResult)
- type CancelDeleteOpts
- type CancelDeleteOptsBuilder
- type CancelDeleteResult
- func (r CancelDeleteResult) Extract() (*Key, error)
- func (r CancelDeleteResult) ExtractDataKey() (*DataKey, error)
- func (r CancelDeleteResult) ExtractEncryptDEK() (*EncryptDEK, error)
- func (r CancelDeleteResult) ExtractKeyInfo() (*Key, error)
- func (r CancelDeleteResult) ExtractKeyInfoInto(v interface{}) error
- func (r CancelDeleteResult) ExtractListKey() (*ListKey, error)
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- func (r CreateResult) Extract() (*Key, error)
- func (r CreateResult) ExtractDataKey() (*DataKey, error)
- func (r CreateResult) ExtractEncryptDEK() (*EncryptDEK, error)
- func (r CreateResult) ExtractKeyInfo() (*Key, error)
- func (r CreateResult) ExtractKeyInfoInto(v interface{}) error
- func (r CreateResult) ExtractListKey() (*ListKey, error)
- type DataEncryptOpts
- type DataEncryptOptsBuilder
- type DataEncryptResult
- func (r DataEncryptResult) Extract() (*Key, error)
- func (r DataEncryptResult) ExtractDataKey() (*DataKey, error)
- func (r DataEncryptResult) ExtractEncryptDEK() (*EncryptDEK, error)
- func (r DataEncryptResult) ExtractKeyInfo() (*Key, error)
- func (r DataEncryptResult) ExtractKeyInfoInto(v interface{}) error
- func (r DataEncryptResult) ExtractListKey() (*ListKey, error)
- type DataKey
- type DeleteOpts
- type DeleteOptsBuilder
- type DeleteResult
- func (r DeleteResult) Extract() (*Key, error)
- func (r DeleteResult) ExtractDataKey() (*DataKey, error)
- func (r DeleteResult) ExtractEncryptDEK() (*EncryptDEK, error)
- func (r DeleteResult) ExtractKeyInfo() (*Key, error)
- func (r DeleteResult) ExtractKeyInfoInto(v interface{}) error
- func (r DeleteResult) ExtractListKey() (*ListKey, error)
- type EncryptDEK
- type EncryptDEKOpts
- type EncryptDEKOptsBuilder
- type EncryptDEKResult
- func (r EncryptDEKResult) Extract() (*Key, error)
- func (r EncryptDEKResult) ExtractDataKey() (*DataKey, error)
- func (r EncryptDEKResult) ExtractEncryptDEK() (*EncryptDEK, error)
- func (r EncryptDEKResult) ExtractKeyInfo() (*Key, error)
- func (r EncryptDEKResult) ExtractKeyInfoInto(v interface{}) error
- func (r EncryptDEKResult) ExtractListKey() (*ListKey, error)
- type ExtractUpdateKeyStateResult
- func (r ExtractUpdateKeyStateResult) Extract() (*Key, error)
- func (r ExtractUpdateKeyStateResult) ExtractDataKey() (*DataKey, error)
- func (r ExtractUpdateKeyStateResult) ExtractEncryptDEK() (*EncryptDEK, error)
- func (r ExtractUpdateKeyStateResult) ExtractKeyInfo() (*Key, error)
- func (r ExtractUpdateKeyStateResult) ExtractKeyInfoInto(v interface{}) error
- func (r ExtractUpdateKeyStateResult) ExtractListKey() (*ListKey, error)
- type GetResult
- func (r GetResult) Extract() (*Key, error)
- func (r GetResult) ExtractDataKey() (*DataKey, error)
- func (r GetResult) ExtractEncryptDEK() (*EncryptDEK, error)
- func (r GetResult) ExtractKeyInfo() (*Key, error)
- func (r GetResult) ExtractKeyInfoInto(v interface{}) error
- func (r GetResult) ExtractListKey() (*ListKey, error)
- type GetRotationResult
- type Key
- type KeyPage
- type KeyRotationResult
- type ListKey
- type ListOpts
- type ListOptsBuilder
- type ListResult
- func (r ListResult) Extract() (*Key, error)
- func (r ListResult) ExtractDataKey() (*DataKey, error)
- func (r ListResult) ExtractEncryptDEK() (*EncryptDEK, error)
- func (r ListResult) ExtractKeyInfo() (*Key, error)
- func (r ListResult) ExtractKeyInfoInto(v interface{}) error
- func (r ListResult) ExtractListKey() (*ListKey, error)
- type RotationOpts
- type RotationOptsBuilder
- type UpdateAliasOpts
- type UpdateAliasOptsBuilder
- type UpdateAliasResult
- func (r UpdateAliasResult) Extract() (*Key, error)
- func (r UpdateAliasResult) ExtractDataKey() (*DataKey, error)
- func (r UpdateAliasResult) ExtractEncryptDEK() (*EncryptDEK, error)
- func (r UpdateAliasResult) ExtractKeyInfo() (*Key, error)
- func (r UpdateAliasResult) ExtractKeyInfoInto(v interface{}) error
- func (r UpdateAliasResult) ExtractListKey() (*ListKey, error)
- type UpdateDesOpts
- type UpdateDesOptsBuilder
- type UpdateDesResult
- func (r UpdateDesResult) Extract() (*Key, error)
- func (r UpdateDesResult) ExtractDataKey() (*DataKey, error)
- func (r UpdateDesResult) ExtractEncryptDEK() (*EncryptDEK, error)
- func (r UpdateDesResult) ExtractKeyInfo() (*Key, error)
- func (r UpdateDesResult) ExtractKeyInfoInto(v interface{}) error
- func (r UpdateDesResult) ExtractListKey() (*ListKey, error)
- type UpdateKeyState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableKeyRotation ¶ added in v0.5.13
func DisableKeyRotation(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r golangsdk.ErrResult)
func EnableKeyRotation ¶ added in v0.5.13
func EnableKeyRotation(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r golangsdk.ErrResult)
func UpdateKeyRotationInterval ¶ added in v0.5.13
func UpdateKeyRotationInterval(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r golangsdk.ErrResult)
Types ¶
type CancelDeleteOpts ¶ added in v0.5.16
type CancelDeleteOpts struct { // ID of a CMK KeyID string `json:"key_id" required:"true"` }
func (CancelDeleteOpts) ToKeyCancelDeleteMap ¶ added in v0.5.16
func (opts CancelDeleteOpts) ToKeyCancelDeleteMap() (map[string]interface{}, error)
ToKeyCancelDeleteMap assembles a request body based on the contents of a CancelDeleteOpts.
type CancelDeleteOptsBuilder ¶ added in v0.5.16
type CancelDeleteResult ¶ added in v0.5.16
type CancelDeleteResult struct {
// contains filtered or unexported fields
}
CancelDeleteResult contains the response body and error from a CancelDelete request.
func (CancelDeleteResult) ExtractDataKey ¶ added in v0.5.16
func (CancelDeleteResult) ExtractEncryptDEK ¶ added in v0.5.16
func (r CancelDeleteResult) ExtractEncryptDEK() (*EncryptDEK, error)
func (CancelDeleteResult) ExtractKeyInfo ¶ added in v0.5.16
func (CancelDeleteResult) ExtractKeyInfoInto ¶ added in v0.5.16
func (r CancelDeleteResult) ExtractKeyInfoInto(v interface{}) error
func (CancelDeleteResult) ExtractListKey ¶ added in v0.5.16
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"` }
func (CreateOpts) ToKeyCreateMap ¶
func (opts CreateOpts) ToKeyCreateMap() (map[string]interface{}, error)
ToKeyCreateMap assembles a request body based on the contents of a CreateOpts.
type CreateOptsBuilder ¶
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult contains the response body and error from a Create request.
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create will create a new key based on the values in CreateOpts. To ExtractKeyInfo the key object from the response, call the ExtractKeyInfo method on the CreateResult.
func (CreateResult) ExtractDataKey ¶
func (CreateResult) ExtractEncryptDEK ¶
func (r CreateResult) ExtractEncryptDEK() (*EncryptDEK, error)
func (CreateResult) ExtractKeyInfo ¶
func (CreateResult) ExtractKeyInfoInto ¶
func (r CreateResult) ExtractKeyInfoInto(v interface{}) error
func (CreateResult) ExtractListKey ¶
type DataEncryptOpts ¶
type DataEncryptOpts 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 DatakeyLength string `json:"datakey_length,omitempty"` }
func (DataEncryptOpts) ToDataEncryptMap ¶
func (opts DataEncryptOpts) ToDataEncryptMap() (map[string]interface{}, error)
type DataEncryptOptsBuilder ¶
type DataEncryptResult ¶
type DataEncryptResult struct {
// contains filtered or unexported fields
}
func DataEncryptGet ¶
func DataEncryptGet(client *golangsdk.ServiceClient, opts DataEncryptOptsBuilder) (r DataEncryptResult)
func DataEncryptGetWithoutPlaintext ¶
func DataEncryptGetWithoutPlaintext(client *golangsdk.ServiceClient, opts DataEncryptOptsBuilder) (r DataEncryptResult)
func (DataEncryptResult) ExtractDataKey ¶
func (DataEncryptResult) ExtractEncryptDEK ¶
func (r DataEncryptResult) ExtractEncryptDEK() (*EncryptDEK, error)
func (DataEncryptResult) ExtractKeyInfo ¶
func (DataEncryptResult) ExtractKeyInfoInto ¶
func (r DataEncryptResult) ExtractKeyInfoInto(v interface{}) error
func (DataEncryptResult) ExtractListKey ¶
type DeleteOpts ¶
type DeleteOpts struct { // ID of a CMK KeyID string `json:"key_id" required:"true"` // Number of days after which a CMK is scheduled to be deleted // (The value ranges from 7 to 1096.) PendingDays string `json:"pending_days" required:"true"` }
func (DeleteOpts) ToKeyDeleteMap ¶
func (opts DeleteOpts) ToKeyDeleteMap() (map[string]interface{}, error)
ToKeyDeleteMap assembles a request body based on the contents of a DeleteOpts.
type DeleteOptsBuilder ¶
type DeleteResult ¶
type DeleteResult struct {
// contains filtered or unexported fields
}
DeleteResult contains the response body and error from a Delete request.
func CancelDelete ¶ added in v0.5.16
func CancelDelete(client *golangsdk.ServiceClient, opts CancelDeleteOptsBuilder) (r DeleteResult)
CancelDelete will cancel the scheduled deletion for a CMK only when the CMK's status is Scheduled deletion with the provided ID.
func Delete ¶
func Delete(client *golangsdk.ServiceClient, opts DeleteOptsBuilder) (r DeleteResult)
Delete will delete the existing key with the provided ID.
func (DeleteResult) ExtractDataKey ¶
func (DeleteResult) ExtractEncryptDEK ¶
func (r DeleteResult) ExtractEncryptDEK() (*EncryptDEK, error)
func (DeleteResult) ExtractKeyInfo ¶
func (DeleteResult) ExtractKeyInfoInto ¶
func (r DeleteResult) ExtractKeyInfoInto(v interface{}) error
func (DeleteResult) ExtractListKey ¶
type EncryptDEK ¶
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"` }
func (EncryptDEKOpts) ToEncryptDEKMap ¶
func (opts EncryptDEKOpts) ToEncryptDEKMap() (map[string]interface{}, error)
type EncryptDEKOptsBuilder ¶
type EncryptDEKResult ¶
type EncryptDEKResult struct {
// contains filtered or unexported fields
}
func EncryptDEKGet ¶
func EncryptDEKGet(client *golangsdk.ServiceClient, opts EncryptDEKOptsBuilder) (r EncryptDEKResult)
func (EncryptDEKResult) ExtractDataKey ¶
func (EncryptDEKResult) ExtractEncryptDEK ¶
func (r EncryptDEKResult) ExtractEncryptDEK() (*EncryptDEK, error)
func (EncryptDEKResult) ExtractKeyInfo ¶
func (EncryptDEKResult) ExtractKeyInfoInto ¶
func (r EncryptDEKResult) ExtractKeyInfoInto(v interface{}) error
func (EncryptDEKResult) ExtractListKey ¶
type ExtractUpdateKeyStateResult ¶
type ExtractUpdateKeyStateResult struct {
// contains filtered or unexported fields
}
func DisableKey ¶
func DisableKey(client *golangsdk.ServiceClient, id string) (r ExtractUpdateKeyStateResult)
func EnableKey ¶
func EnableKey(client *golangsdk.ServiceClient, id string) (r ExtractUpdateKeyStateResult)
func (ExtractUpdateKeyStateResult) ExtractDataKey ¶
func (ExtractUpdateKeyStateResult) ExtractEncryptDEK ¶
func (r ExtractUpdateKeyStateResult) ExtractEncryptDEK() (*EncryptDEK, error)
func (ExtractUpdateKeyStateResult) ExtractKeyInfo ¶
func (ExtractUpdateKeyStateResult) ExtractKeyInfoInto ¶
func (r ExtractUpdateKeyStateResult) ExtractKeyInfoInto(v interface{}) error
func (ExtractUpdateKeyStateResult) ExtractListKey ¶
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult contains the response body and error from a Get request.
func Get ¶
Get retrieves the key with the provided ID. To extract the key object from the response, call the Extract method on the GetResult.
func (GetResult) ExtractDataKey ¶
func (GetResult) ExtractEncryptDEK ¶
func (r GetResult) ExtractEncryptDEK() (*EncryptDEK, error)
func (GetResult) ExtractKeyInfo ¶
func (GetResult) ExtractKeyInfoInto ¶
func (r GetResult) ExtractKeyInfoInto(v interface{}) error
func (GetResult) ExtractListKey ¶
type GetRotationResult ¶ added in v0.5.13
type GetRotationResult struct {
golangsdk.Result
}
GetRotationResult contains the response body and error from a Get request.
func GetKeyRotationStatus ¶ added in v0.5.13
func GetKeyRotationStatus(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r GetRotationResult)
func (GetRotationResult) ExtractResult ¶ added in v0.5.13
func (r GetRotationResult) ExtractResult() (KeyRotationResult, error)
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"` }
Key contains all the information associated with a CMK.
func ExtractKeys ¶
func ExtractKeys(r pagination.Page) ([]Key, error)
type KeyPage ¶
type KeyPage struct {
pagination.LinkedPageBase
}
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"` }
type ListOpts ¶
type ListOpts struct { // State of a CMK KeyState string `json:"key_state,omitempty"` Limit string `json:"limit,omitempty"` Marker string `json:"marker,omitempty"` }
ListOpts holds options for listing Volumes. It is passed to the volumes.List function.
func (ListOpts) ToKeyListMap ¶
type ListOptsBuilder ¶
type ListResult ¶
type ListResult struct {
// contains filtered or unexported fields
}
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) (r ListResult)
func ListAllKeys ¶
func ListAllKeys(client *golangsdk.ServiceClient, opts ListOptsBuilder) (r ListResult)
func (ListResult) ExtractDataKey ¶
func (ListResult) ExtractEncryptDEK ¶
func (r ListResult) ExtractEncryptDEK() (*EncryptDEK, error)
func (ListResult) ExtractKeyInfo ¶
func (ListResult) ExtractKeyInfoInto ¶
func (r ListResult) ExtractKeyInfoInto(v interface{}) error
func (ListResult) ExtractListKey ¶
type RotationOpts ¶ added in v0.5.13
type RotationOpts struct { // ID of a CMK KeyID string `json:"key_id" required:"true"` // Rotation interval of a CMK Interval int `json:"rotation_interval"` // 36-byte serial number of a request message Sequence string `json:"sequence,omitempty"` }
func (RotationOpts) ToKeyRotationMap ¶ added in v0.5.13
func (opts RotationOpts) ToKeyRotationMap() (map[string]interface{}, error)
ToKeyRotationMap assembles a request body based on the contents of a RotationOpts.
type RotationOptsBuilder ¶ added in v0.5.13
type UpdateAliasOpts ¶
type UpdateAliasOpts struct { // ID of a CMK KeyID string `json:"key_id" required:"true"` // CMK description KeyAlias string `json:"key_alias" required:"true"` }
func (UpdateAliasOpts) ToKeyUpdateAliasMap ¶
func (opts UpdateAliasOpts) ToKeyUpdateAliasMap() (map[string]interface{}, error)
ToKeyUpdateAliasMap assembles a request body based on the contents of a UpdateAliasOpts.
type UpdateAliasOptsBuilder ¶
type UpdateAliasResult ¶
type UpdateAliasResult struct {
// contains filtered or unexported fields
}
UpdateAliasResult contains the response body and error from a UpdateAlias request.
func UpdateAlias ¶
func UpdateAlias(client *golangsdk.ServiceClient, opts UpdateAliasOptsBuilder) (r UpdateAliasResult)
func (UpdateAliasResult) ExtractDataKey ¶
func (UpdateAliasResult) ExtractEncryptDEK ¶
func (r UpdateAliasResult) ExtractEncryptDEK() (*EncryptDEK, error)
func (UpdateAliasResult) ExtractKeyInfo ¶
func (UpdateAliasResult) ExtractKeyInfoInto ¶
func (r UpdateAliasResult) ExtractKeyInfoInto(v interface{}) error
func (UpdateAliasResult) ExtractListKey ¶
type UpdateDesOpts ¶
type UpdateDesOpts struct { // ID of a CMK KeyID string `json:"key_id" required:"true"` // CMK description KeyDescription string `json:"key_description" required:"true"` }
func (UpdateDesOpts) ToKeyUpdateDesMap ¶
func (opts UpdateDesOpts) ToKeyUpdateDesMap() (map[string]interface{}, error)
ToKeyUpdateDesMap assembles a request body based on the contents of a UpdateDesOpts.
type UpdateDesOptsBuilder ¶
type UpdateDesResult ¶
type UpdateDesResult struct {
// contains filtered or unexported fields
}
UpdateDesResult contains the response body and error from a UpdateDes request.
func UpdateDes ¶
func UpdateDes(client *golangsdk.ServiceClient, opts UpdateDesOptsBuilder) (r UpdateDesResult)
func (UpdateDesResult) ExtractDataKey ¶
func (UpdateDesResult) ExtractEncryptDEK ¶
func (r UpdateDesResult) ExtractEncryptDEK() (*EncryptDEK, error)
func (UpdateDesResult) ExtractKeyInfo ¶
func (UpdateDesResult) ExtractKeyInfoInto ¶
func (r UpdateDesResult) ExtractKeyInfoInto(v interface{}) error