Example #1
0
def _GetRemoveIamPolicyBindingArgs(parser, add_condition=False):
    iam_util.AddArgsForRemoveIamPolicyBinding(parser,
                                              add_condition=add_condition)
    flags.GetModelResourceArg(
        required=True,
        verb='for which to remove IAM policy binding from').AddToParser(parser)
    flags.GetRegionArg(include_global=True).AddToParser(parser)
    base.URI_FLAG.RemoveFromParser(parser)
Example #2
0
    def Args(parser):
        """Register flags for this command.

    Args:
      parser: An argparse.ArgumentParser-like object. It is mocked out in order
        to capture some information, but behaves like an ArgumentParser.
    """
        iam_util.AddArgsForRemoveIamPolicyBinding(parser, add_condition=True)
        flags.GetModelResourceArg(
            required=True,
            verb='for which to remove IAM policy binding from').AddToParser(
                parser)
        flags.GetRegionArg('model').AddToParser(parser)
        base.URI_FLAG.RemoveFromParser(parser)
Example #3
0
def _AddSetIamPolicyArgs(parser, hide_region_flag=True):
    flags.GetModelResourceArg(positional=True,
                              required=True,
                              verb='to set IAM policy for').AddToParser(parser)
    flags.GetRegionArg(hidden=hide_region_flag).AddToParser(parser)
    iam_util.AddArgForPolicyFile(parser)
def _AddGetIamPolicyArgs(parser, hide_region_flag=True):
    flags.GetModelResourceArg(positional=True,
                              required=True,
                              verb='to set IAM policy for').AddToParser(parser)
    flags.GetRegionArg(hidden=hide_region_flag).AddToParser(parser)
    base.URI_FLAG.RemoveFromParser(parser)
Example #5
0
def _AddGetIamPolicyArgs(parser):
    flags.GetModelResourceArg(positional=True,
                              required=True,
                              verb='to set IAM policy for').AddToParser(parser)
    flags.GetRegionArg(include_global=True).AddToParser(parser)
    base.URI_FLAG.RemoveFromParser(parser)
Example #6
0
 def Args(parser):
     flags.GetModelResourceArg(
         positional=True, required=True,
         verb='to set IAM policy for').AddToParser(parser)
     flags.GetRegionArg('model').AddToParser(parser)
     base.URI_FLAG.RemoveFromParser(parser)
Example #7
0
def _AddSetIamPolicyArgs(parser):
    flags.GetModelResourceArg(positional=True,
                              required=True,
                              verb='to set IAM policy for').AddToParser(parser)
    flags.GetRegionArg(include_global=True).AddToParser(parser)
    iam_util.AddArgForPolicyFile(parser)
Example #8
0
 def Args(parser):
   flags.GetModelResourceArg(
       positional=True, required=True,
       verb='to set IAM policy for').AddToParser(parser)
   flags.GetRegionArg('model').AddToParser(parser)
   iam_util.AddArgForPolicyFile(parser)