def Run(self, args): messages = cloudkms_base.GetMessagesModule() policy = iam_util.ParseJsonPolicyFile(args.policy_file, messages.Policy) return iam.SetKeyRingIamPolicy(flags.ParseKeyRingName(args), policy)
def Run(self, args): messages = cloudkms_base.GetMessagesModule() policy, update_mask = iam_util.ParseYamlOrJsonPolicyFile( args.policy_file, messages.Policy) keyring_ref = flags.ParseKeyRingName(args) result = iam.SetKeyRingIamPolicy(keyring_ref, policy, update_mask) iam_util.LogSetIamPolicy(keyring_ref.Name(), 'keyring') return result