MCPcopy Create free account
hub / github.com/coldbrewcloud/coldbrew-cli / AttachRolePolicy

Method AttachRolePolicy

aws/iam/client.go:68–87  ·  view source on GitHub ↗
(policyARN, roleName string)

Source from the content-addressed store, hash-verified

66}
67
68func (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
89func (c *Client) ListRolePolicyNames(roleName string) ([]string, error) {
90 policyNames := []string{}

Callers 2

createECSServiceRoleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected