github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/elb/v3/security_policy/ListSystemPolicies.go (about) 1 package security_policy 2 3 import ( 4 golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 ) 7 8 func ListSystemPolicies(client *golangsdk.ServiceClient) ([]SystemPolicy, error) { 9 raw, err := client.Get(client.ServiceURL("system-security-policies"), nil, &golangsdk.RequestOpts{OkCodes: []int{200}}) 10 if err != nil { 11 return nil, err 12 } 13 14 var res []SystemPolicy 15 16 err = extract.IntoSlicePtr(raw.Body, &res, "system_security_policies") 17 return res, err 18 } 19 20 type SystemPolicy struct { 21 ProjectId string `json:"project_id"` 22 Name string `json:"name"` 23 Protocols string `json:"protocols"` 24 Ciphers string `json:"ciphers"` 25 }