(policyARN, roleName string)
| 66 | } |
| 67 | |
| 68 | func (c *Client) AttachRolePolicy(policyARN, roleName string) error { |
| 69 | if policyARN == "" { |
| 70 | return errors.New("policyARN is empty") |
| 71 | } |
| 72 | if roleName == "" { |
| 73 | return errors.New("roleName is empty") |
| 74 | } |
| 75 | |
| 76 | params := &_iam.AttachRolePolicyInput{ |
| 77 | PolicyArn: _aws.String(policyARN), |
| 78 | RoleName: _aws.String(roleName), |
| 79 | } |
| 80 | |
| 81 | _, err := c.svc.AttachRolePolicy(params) |
| 82 | if err != nil { |
| 83 | return err |
| 84 | } |
| 85 | |
| 86 | return nil |
| 87 | } |
| 88 | |
| 89 | func (c *Client) ListRolePolicyNames(roleName string) ([]string, error) { |
| 90 | policyNames := []string{} |
no outgoing calls
no test coverage detected