def Run(self, args): messages = cloudkms_base.GetMessagesModule() policy = iam_util.ParseJsonPolicyFile(args.policy_file, messages.Policy) return iam.SetCryptoKeyIamPolicy(flags.ParseCryptoKeyName(args), policy)
def Run(self, args): messages = cloudkms_base.GetMessagesModule() policy, update_mask = iam_util.ParseYamlOrJsonPolicyFile(args.policy_file, messages.Policy) crypto_key_ref = flags.ParseCryptoKeyName(args) result = iam.SetCryptoKeyIamPolicy(crypto_key_ref, policy, update_mask) iam_util.LogSetIamPolicy(crypto_key_ref.Name(), 'key') return result