Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateGrant ¶
type CreateGrant struct {
GrantID string `json:"grant_id"`
}
type CreateOpts ¶
type CreateOpts struct { // 36-byte ID of a CMK that matches the // regular expression ^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$ KeyID string `json:"key_id" required:"true"` // Indicates the ID of the authorized user. // The value is between 1 to 64 bytes and meets the regular expression "^[a-zA-Z0-9]{1,64}$". GranteePrincipal string `json:"grantee_principal" required:"true"` // Permissions that can be granted Operations []string `json:"operations" required:"true"` // Name of a grant which can be 1 to 255 characters in // length and matches the regular expression ^[a-zA-Z0-9:/_-]{1,255}$ Name string `json:"name,omitempty"` // Indicates the ID of the retiring user. The value is between 1 to 64 // bytes and meets the regular expression "^[a-zA-Z0-9]{1,64}$". RetiringPrincipal string `json:"retiring_principal,omitempty"` // Sequence represents 36-byte serial number of a request message Sequence string `json:"sequence,omitempty"` }
func (CreateOpts) ToGrantCreateMap ¶
func (opts CreateOpts) ToGrantCreateMap() (map[string]interface{}, error)
ToGrantCreateMap assembles a request body based on the contents of a CreateOpts.
type CreateOptsBuilder ¶
type CreateResult ¶
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 Grant based on the values in CreateOpts. To extract the Grant object from the response, call the Extract method on the CreateResult.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*CreateGrant, error)
type DeleteOpts ¶
type DeleteOpts struct { // 36-byte ID of a CMK that matches the regular // expression ^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$ KeyID string `json:"key_id" required:"true"` // 64-byte ID of a grant that meets the regular // expression ^[A-Fa-f0-9]{64}$ GrantID string `json:"grant_id" required:"true"` // Sequence represents 36-byte serial number of a request message Sequence string `json:"sequence,omitempty"` }
func (DeleteOpts) ToGrantDeleteMap ¶
func (opts DeleteOpts) ToGrantDeleteMap() (map[string]interface{}, error)
ToGrantDeleteMap assembles a request body based on the contents of a DeleteOpts.
type DeleteOptsBuilder ¶
type DeleteResult ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, opts DeleteOptsBuilder) (r DeleteResult)
Delete will delete the existing Grant based on the values in DeleteOpts. To extract result call the ExtractErr method on the DeleteResult.
type Grant ¶
type Grant struct { KeyID string `json:"key_id"` GrantID string `json:"grant_id"` GranteePrincipal string `json:"grantee_principal"` Operations []string `json:"operations"` IssuingPrincipal string `json:"issuing_principal"` CreationDate string `json:"creation_date"` Name string `json:"name"` RetiringPrincipal string `json:"retiring_principal"` }
type ListOpts ¶
type ListOpts struct { KeyID string `json:"key_id,omitempty"` Limit string `json:"limit,omitempty"` Marker string `json:"marker,omitempty"` Sequence string `json:"sequence,omitempty"` }
func (ListOpts) ToGrantListMap ¶
type ListOptsBuilder ¶
type ListResult ¶
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) (r ListResult)
List will return a collection of Grants on a CMK.
func (ListResult) Extract ¶
func (r ListResult) Extract() (*ListGrant, error)
Click to show internal directories.
Click to hide internal directories.