@@ -14,6 +14,7 @@ func Get(client *golangsdk.ServiceClient, id string) (r GetResult) {
1414 return
1515}
1616
17+ // List retrieves all custom policies.
1718func List (client * golangsdk.ServiceClient ) pagination.Pager {
1819 pager := pagination .NewPager (client , listURL (client ), func (r pagination.PageResult ) pagination.Page {
1920 return RolePage {pagination.LinkedPageBase {PageResult : r }}
@@ -29,16 +30,18 @@ type CreateOptsBuilder interface {
2930 ToPolicyCreateMap () (map [string ]interface {}, error )
3031}
3132
33+ // Policy contains the content of a custom policy.
3234type Policy struct {
3335 Version string `json:"Version" required:"true"`
3436 Statement []Statement `json:"Statement" required:"true"`
3537}
3638
39+ // Statement represents the Statement of a custom policy.
3740type Statement struct {
38- Action []string `json:"Action" required:"true"`
39- Effect string `json:"Effect" required:"true"`
40- Condition map [string ]map [ string ][] string `json:"Condition,omitempty"`
41- Resource [] string `json:"Resource,omitempty"`
41+ Action []string `json:"Action" required:"true"`
42+ Effect string `json:"Effect" required:"true"`
43+ Condition map [string ]interface {} `json:"Condition,omitempty"`
44+ Resource interface {} `json:"Resource,omitempty"`
4245}
4346
4447// CreateOpts provides options used to create a policy.
0 commit comments