Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient) pagination.Pager
List retrieves all custom policies.
Types ¶
type CreateOpts ¶
type CreateOpts struct { Name string `json:"display_name" required:"true"` Type string `json:"type" required:"true"` Description string `json:"description" required:"true"` Policy Policy `json:"policy" required:"true"` }
CreateOpts provides options used to create a policy.
func (CreateOpts) ToPolicyCreateMap ¶
func (opts CreateOpts) ToPolicyCreateMap() (map[string]interface{}, error)
ToPolicyCreateMap formats a CreateOpts into a create request.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult is the response from a Create operation. Call its Extract method to interpret it as a Role
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create creates a new Policy.
type DeleteResult ¶
DeleteResult is the response from a Delete operation. Call its ExtractErr to determine if the request succeeded or failed.
func Delete ¶
func Delete(client *golangsdk.ServiceClient, roleID string) (r DeleteResult)
Delete deletes a policy.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult is the response from a Get operation. Call its Extract method to interpret it as a Role.
type Policy ¶
type Policy struct { Version string `json:"Version" required:"true"` Statement []Statement `json:"Statement" required:"true"` }
Policy contains the content of a custom policy.
type Role ¶
type Role struct { ID string `json:"id"` Name string `json:"display_name"` Catalog string `json:"catalog"` Description string `json:"description"` Type string `json:"type"` Policy Policy `json:"policy" required:"true"` DomainId string `json:"domain_id"` References int `json:"references"` }
func ExtractPageRoles ¶
func ExtractPageRoles(r pagination.Page) ([]Role, error)
type Statement ¶
type Statement struct { Action []string `json:"Action" required:"true"` Effect string `json:"Effect" required:"true"` Condition map[string]interface{} `json:"Condition,omitempty"` Resource interface{} `json:"Resource,omitempty"` }
Statement represents the Statement of a custom policy.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult is the response from an Update operation. Call its Extract method to interpret it as a Role.
func Update ¶
func Update(client *golangsdk.ServiceClient, roleID string, opts CreateOptsBuilder) (r UpdateResult)
Update updates an existing Policy.