MasterKeysFromArnString takes a comma separated list of AWS KMS ARNs, and returns a slice of new MasterKeys for those ARNs.
(arn string, context map[string]*string, awsProfile string)
| 127 | // MasterKeysFromArnString takes a comma separated list of AWS KMS ARNs, and |
| 128 | // returns a slice of new MasterKeys for those ARNs. |
| 129 | func MasterKeysFromArnString(arn string, context map[string]*string, awsProfile string) []*MasterKey { |
| 130 | var keys []*MasterKey |
| 131 | if arn == "" { |
| 132 | return keys |
| 133 | } |
| 134 | for _, s := range strings.Split(arn, ",") { |
| 135 | keys = append(keys, NewMasterKeyFromArn(s, context, awsProfile)) |
| 136 | } |
| 137 | return keys |
| 138 | } |
| 139 | |
| 140 | // ParseKMSContext takes either a KMS context map or a comma-separated list of |
| 141 | // KMS context key:value pairs, and returns a map. |