def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument() cls.SECURITY_POLICY_ARG.AddArgument(parser, operation_type='update') parser.add_argument( '--description', help=('An optional, textual description for the security policy.')) parser.add_argument( '--enable-layer7-ddos-defense', action='store_true', default=None, help=('Whether to enable Cloud Armor Layer 7 DDoS Defense Adaptive ' 'Protection.')) parser.add_argument( '--layer7-ddos-defense-rule-visibility', choices=['STANDARD', 'PREMIUM'], type=lambda x: x.upper(), metavar='VISIBILITY_TYPE', help=('The visibility type indicates whether the rules are opaque or ' 'transparent.')) parser.add_argument( '--enable-ml', action='store_true', default=None, help=('Whether to enable Cloud Armor Adaptive Protection'))
def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument() cls.SECURITY_POLICY_ARG.AddArgument(parser, operation_type='create') group = parser.add_group(mutex=True, help='Creation options.') group.add_argument( '--type', choices=['CLOUD_ARMOR', 'CLOUD_ARMOR_EDGE'], type=lambda x: x.upper(), metavar='SECURITY_POLICY_TYPE', help=( 'The type indicates the intended use of the security policy.')) group.add_argument( '--file-name', help=( 'The name of the JSON or YAML file to create a security policy ' 'config from.')) parser.add_argument( '--file-format', choices=['json', 'yaml'], help= ('The format of the file to create the security policy config from. ' 'Specify either yaml or json. Defaults to yaml if not specified. ' 'Will be ignored if --file-name is not specified.')) parser.add_argument( '--description', help=('An optional, textual description for the security policy.')) parser.display_info.AddCacheUpdater( flags.GlobalSecurityPoliciesCompleter)
def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument() cls.SECURITY_POLICY_ARG.AddArgument(parser) parser.add_argument( '--description', help='An optional, textual description for the security policy.')
def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument() cls.SECURITY_POLICY_ARG.AddArgument(parser) parser.add_argument( '--file-name', required=True, help=('The name of the JSON or YAML file to import the security policy ' 'config from.'))
def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument() cls.SECURITY_POLICY_ARG.AddArgument(parser, operation_type='create') parser.add_argument( '--description', help='An optional, textual description for the security policy.') parser.display_info.AddCacheUpdater(completers.RoutesCompleter)
def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument() cls.SECURITY_POLICY_ARG.AddArgument(parser, operation_type='update') parser.add_argument( '--description', help=('An optional, textual description for the security policy.')) flags.AddCloudArmorAdaptiveProtection(parser) flags.AddAdvancedOptions(parser) flags.AddRecaptchaOptions(parser)
def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument() cls.SECURITY_POLICY_ARG.AddArgument(parser, operation_type='update') parser.add_argument( '--description', help=('An optional, textual description for the security policy.')) parser.add_argument( '--enable-ml', action='store_true', default=None, help=('Whether to enable Cloud Armor Adaptive Protection'))
def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument() cls.SECURITY_POLICY_ARG.AddArgument(parser, operation_type='export') parser.add_argument( '--file-name', required=True, help='The name of the file to export the security policy config to.') parser.add_argument( '--file-format', choices=['json', 'yaml'], help=( 'The format of the file to export the security policy config to. ' 'Specify either yaml or json. Defaults to yaml if not specified.'))
def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument(plural=True) cls.SECURITY_POLICY_ARG.AddArgument(parser, operation_type='delete') parser.display_info.AddCacheUpdater(flags.SecurityPoliciesCompleter)
def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument() cls.SECURITY_POLICY_ARG.AddArgument(parser, operation_type='describe')
def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument(plural=True) cls.SECURITY_POLICY_ARG.AddArgument(parser)
def Args(cls, parser): cls.SECURITY_POLICY_ARG = flags.SecurityPolicyArgument(plural=True) cls.SECURITY_POLICY_ARG.AddArgument(parser, operation_type='delete')