Documentation ¶
Index ¶
- func Disable(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r golangsdk.ErrResult)
- func Enable(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r golangsdk.ErrResult)
- func Update(client *golangsdk.ServiceClient, opts UpdateOptsBuilder) (r golangsdk.ErrResult)
- type GetResult
- type IntervalOpts
- type Rotation
- type RotationOpts
- type RotationOptsBuilder
- type UpdateOptsBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Disable ¶
func Disable(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r golangsdk.ErrResult)
Disable will disable rotation for a CMK based on the values in RotationOpts.
func Enable ¶
func Enable(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r golangsdk.ErrResult)
Enable will enable rotation for a CMK based on the values in RotationOpts. The default rotation interval is 365 days. CMKs created using imported key materials and Default Master Keys do not support rotation.
func Update ¶
func Update(client *golangsdk.ServiceClient, opts UpdateOptsBuilder) (r golangsdk.ErrResult)
Update will change the rotation interval for a CMK
Types ¶
type GetResult ¶
GetResult contains the response body and error from a Get request.
func Get ¶
func Get(client *golangsdk.ServiceClient, opts RotationOptsBuilder) (r GetResult)
Get retrieves the key with the provided ID. To extract the key object from the response, call the Extract method on the GetResult.
type IntervalOpts ¶
type IntervalOpts struct { // ID of a CMK KeyID string `json:"key_id" required:"true"` // Rotation interval. The value is an integer in the range 30 to 365. // Set the interval based on how often a CMK is used. // If it is frequently used, set a short interval; otherwise, set a long one. Interval int `json:"rotation_interval" required:"true"` // 36-byte sequence number of a request message Sequence string `json:"sequence,omitempty"` }
func (IntervalOpts) ToKeyRotationIntervalMap ¶
func (opts IntervalOpts) ToKeyRotationIntervalMap() (map[string]interface{}, error)
ToKeyRotationIntervalMap assembles a request body based on the contents of a IntervalOpts.
type Rotation ¶
type Rotation 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"` }
Rotation is the response body of Get method
type RotationOpts ¶
type RotationOpts struct { // ID of a CMK KeyID string `json:"key_id" required:"true"` // 36-byte sequence number of a request message Sequence string `json:"sequence,omitempty"` }
func (RotationOpts) ToKeyRotationMap ¶
func (opts RotationOpts) ToKeyRotationMap() (map[string]interface{}, error)
ToKeyRotationMap assembles a request body based on the contents of a RotationOpts.