def Run(self, args):
        """This is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      Some value that we want to have printed later.
    """
        return iam.AddDatabaseIamPolicyBinding(args.CONCEPTS.database.Parse(),
                                               args.member, args.role)
Exemplo n.º 2
0
    def Run(self, args):
        """This is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      Some value that we want to have printed later.
    """
        database_ref = resources.REGISTRY.Parse(
            args.database,
            params={'instancesId': args.instance},
            collection='spanner.projects.instances.databases')
        return iam.AddDatabaseIamPolicyBinding(database_ref, args.member,
                                               args.role)