def Args(cls, parser): flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument( parser, operation_type='update') flags.AddDescription(parser) cls.HEALTH_CHECK_ARG = flags.HealthCheckArgument() cls.HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HEALTH_CHECK') cls.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument() cls.HTTP_HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HTTP_HEALTH_CHECK') cls.HTTPS_HEALTH_CHECK_ARG = flags.HttpsHealthCheckArgument() cls.HTTPS_HEALTH_CHECK_ARG.AddArgument( parser, cust_metavar='HTTPS_HEALTH_CHECK') flags.AddTimeout(parser, default=None) flags.AddPortName(parser) flags.AddProtocol(parser, default=None) flags.AddEnableCdn(parser, default=None) flags.AddSessionAffinity(parser, internal_lb=True) flags.AddAffinityCookieTtl(parser) flags.AddConnectionDrainingTimeout(parser) flags.AddCacheKeyIncludeProtocol(parser, default=None) flags.AddCacheKeyIncludeHost(parser, default=None) flags.AddCacheKeyIncludeQueryString(parser, default=None) flags.AddCacheKeyQueryStringList(parser) signed_url_flags.AddSignedUrlCacheMaxAge(parser, required=False, unspecified_help='') AddIapFlag(parser)
def Args(cls, parser): flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument( parser, operation_type='update') flags.AddDescription(parser) cls.HEALTH_CHECK_ARG = flags.HealthCheckArgument() cls.HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HEALTH_CHECK') cls.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument() cls.HTTP_HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HTTP_HEALTH_CHECK') cls.HTTPS_HEALTH_CHECK_ARG = flags.HttpsHealthCheckArgument() cls.HTTPS_HEALTH_CHECK_ARG.AddArgument( parser, cust_metavar='HTTPS_HEALTH_CHECK') cls.SECURITY_POLICY_ARG = ( security_policy_flags.SecurityPolicyArgumentForTargetResource( resource='backend service')) cls.SECURITY_POLICY_ARG.AddArgument(parser) flags.AddTimeout(parser, default=None) flags.AddPortName(parser) flags.AddProtocol(parser, default=None) flags.AddConnectionDrainingTimeout(parser) flags.AddEnableCdn(parser, default=None) flags.AddSessionAffinity(parser, internal_lb=True) flags.AddAffinityCookieTtl(parser) AddIapFlag(parser) flags.AddCacheKeyIncludeProtocol(parser, default=None) flags.AddCacheKeyIncludeHost(parser, default=None) flags.AddCacheKeyIncludeQueryString(parser, default=None) flags.AddCacheKeyQueryStringList(parser)
def Args(cls, parser): parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT) flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument( parser, operation_type='create') flags.AddDescription(parser) cls.HEALTH_CHECK_ARG = flags.HealthCheckArgument() cls.HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HEALTH_CHECK') cls.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument() cls.HTTP_HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HTTP_HEALTH_CHECK') cls.HTTPS_HEALTH_CHECK_ARG = flags.HttpsHealthCheckArgument() cls.HTTPS_HEALTH_CHECK_ARG.AddArgument( parser, cust_metavar='HTTPS_HEALTH_CHECK') flags.AddTimeout(parser) flags.AddPortName(parser) flags.AddProtocol(parser, default=None) flags.AddEnableCdn(parser, default=False) flags.AddSessionAffinity(parser) flags.AddAffinityCookieTtl(parser) flags.AddConnectionDrainingTimeout(parser) flags.AddLoadBalancingScheme(parser, include_l7_ilb=False, include_traffic_director=True) flags.AddCustomRequestHeaders(parser, remove_all_flag=False) flags.AddCacheKeyIncludeProtocol(parser, default=True) flags.AddCacheKeyIncludeHost(parser, default=True) flags.AddCacheKeyIncludeQueryString(parser, default=True) flags.AddCacheKeyQueryStringList(parser) flags.AddConnectionDrainOnFailover(parser, default=None) flags.AddDropTrafficIfUnhealthy(parser, default=None) flags.AddFailoverRatio(parser) flags.AddEnableLogging(parser, default=None) flags.AddLoggingSampleRate(parser) signed_url_flags.AddSignedUrlCacheMaxAge(parser, required=False) AddIapFlag(parser)
def Args(cls, parser): parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT) flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument( parser, operation_type='create') flags.AddDescription(parser) cls.HEALTH_CHECK_ARG = flags.HealthCheckArgument() cls.HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HEALTH_CHECK') cls.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument() cls.HTTP_HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HTTP_HEALTH_CHECK') cls.HTTPS_HEALTH_CHECK_ARG = flags.HttpsHealthCheckArgument() cls.HTTPS_HEALTH_CHECK_ARG.AddArgument( parser, cust_metavar='HTTPS_HEALTH_CHECK') flags.AddTimeout(parser) flags.AddPortName(parser) flags.AddProtocol(parser, default=None) flags.AddEnableCdn(parser, default=False) flags.AddSessionAffinity(parser) flags.AddAffinityCookieTtl(parser) flags.AddConnectionDrainingTimeout(parser) flags.AddLoadBalancingScheme(parser) flags.AddCacheKeyIncludeProtocol(parser, default=True) flags.AddCacheKeyIncludeHost(parser, default=True) flags.AddCacheKeyIncludeQueryString(parser, default=True) flags.AddCacheKeyQueryStringList(parser) AddIapFlag(parser) parser.display_info.AddCacheUpdater(flags.BackendServicesCompleter) signed_url_flags.AddSignedUrlCacheMaxAge(parser, required=False)
def Args(cls, parser): parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT) flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument(parser) flags.AddDescription(parser) cls.HEALTH_CHECK_ARG = flags.HealthCheckArgument() cls.HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HEALTH_CHECK') cls.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument() cls.HTTP_HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HTTP_HEALTH_CHECK') cls.HTTPS_HEALTH_CHECK_ARG = flags.HttpsHealthCheckArgument() cls.HTTPS_HEALTH_CHECK_ARG.AddArgument( parser, cust_metavar='HTTPS_HEALTH_CHECK') flags.AddTimeout(parser) flags.AddPortName(parser) flags.AddProtocol(parser, default=None) flags.AddEnableCdn(parser, default=False) flags.AddSessionAffinity(parser, internal_lb=False) flags.AddAffinityCookieTtl(parser) flags.AddConnectionDrainingTimeout(parser) flags.AddLoadBalancingScheme(parser) flags.AddCacheKeyIncludeProtocol(parser, default=True) flags.AddCacheKeyIncludeHost(parser, default=True) flags.AddCacheKeyIncludeQueryString(parser, default=True) flags.AddCacheKeyQueryStringList(parser) AddIapFlag(parser)
def Args(cls, parser): flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument( parser, operation_type='update') flags.AddDescription(parser) cls.HEALTH_CHECK_ARG = flags.HealthCheckArgument() cls.HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HEALTH_CHECK') cls.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument() cls.HTTP_HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HTTP_HEALTH_CHECK') cls.HTTPS_HEALTH_CHECK_ARG = flags.HttpsHealthCheckArgument() cls.HTTPS_HEALTH_CHECK_ARG.AddArgument( parser, cust_metavar='HTTPS_HEALTH_CHECK') cls.SECURITY_POLICY_ARG = ( security_policy_flags.SecurityPolicyArgumentForTargetResource( resource='backend service')) cls.SECURITY_POLICY_ARG.AddArgument(parser) flags.AddTimeout(parser, default=None) flags.AddPortName(parser) flags.AddProtocol(parser, default=None) flags.AddEnableCdn(parser, default=None) flags.AddSessionAffinity(parser) flags.AddAffinityCookieTtl(parser) flags.AddConnectionDrainingTimeout(parser) flags.AddCacheKeyIncludeProtocol(parser, default=None) flags.AddCacheKeyIncludeHost(parser, default=None) flags.AddCacheKeyIncludeQueryString(parser, default=None) flags.AddCacheKeyQueryStringList(parser) signed_url_flags.AddSignedUrlCacheMaxAge(parser, required=False, unspecified_help='') AddIapFlag(parser) flags.AddCustomRequestHeaders(parser, remove_all_flag=True, default=None)
def Args(cls, parser): parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT) cls.BACKUP_POOL_ARG = flags.BackupPoolArgument(required=False) cls.HTTP_HEALTH_CHECK_ARG = ( http_health_check_flags.HttpHealthCheckArgumentForTargetPoolCreate( required=False)) cls.HTTP_HEALTH_CHECK_ARG.AddArgument(parser) cls.TARGET_POOL_ARG = flags.TargetPoolArgument() cls.TARGET_POOL_ARG.AddArgument(parser, operation_type='create') parser.display_info.AddCacheUpdater(flags.TargetPoolsCompleter) parser.add_argument( '--backup-pool', help="""\ Together with ``--failover-ratio'', this flag defines the fallback behavior of the target pool (primary pool) to be created by this command. If the ratio of the healthy instances in the primary pool is at or below the specified ``--failover-ratio value'', then traffic arriving at the load-balanced IP address will be directed to the backup pool. If this flag is provided, then ``--failover-ratio'' is required. """) parser.add_argument( '--description', help='An optional description of this target pool.') parser.add_argument( '--failover-ratio', type=float, help="""\ Together with ``--backup-pool'', defines the fallback behavior of the target pool (primary pool) to be created by this command. If the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP address will be directed to the backup pool. For example, if 0.4 is chosen as the failover ratio, then traffic will fail over to the backup pool if more than 40% of the instances become unhealthy. If not set, the traffic will be directed the instances in this pool in the ``force'' mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. If this flag is provided, then ``--backup-pool'' is required. """) parser.add_argument( '--health-check', metavar='HEALTH_CHECK', help="""\ DEPRECATED, use --http-health-check. Specifies an HTTP health check resource to use to determine the health of instances in this pool. If no health check is specified, traffic will be sent to all instances in this target pool as if the instances were healthy, but the health status of this pool will appear as unhealthy as a warning that this target pool does not have a health check. """) backend_services_flags.AddSessionAffinity(parser, target_pools=True)
def Args(parser): _ArgsGA(parser) flags.AddConnectionDrainingTimeout(parser) flags.AddEnableCdn(parser) flags.AddHealthChecks(parser) flags.AddSessionAffinity(parser, default=None) flags.AddAffinityCookieTtl(parser, default=None)
def Args(cls, parser, support_l7_internal_load_balancer, support_failover, support_logging, support_multinic, support_client_only, support_grpc_protocol, support_all_protocol, support_subsetting, support_flexible_cache_step_one): """Add flags to create a backend service to the parser.""" parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT) flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument( parser, operation_type='create') flags.AddDescription(parser) cls.HEALTH_CHECK_ARG = flags.HealthCheckArgument( support_regional_health_check=support_l7_internal_load_balancer) cls.HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HEALTH_CHECK') cls.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument() cls.HTTP_HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HTTP_HEALTH_CHECK') cls.HTTPS_HEALTH_CHECK_ARG = flags.HttpsHealthCheckArgument() cls.HTTPS_HEALTH_CHECK_ARG.AddArgument( parser, cust_metavar='HTTPS_HEALTH_CHECK') flags.AddTimeout(parser) flags.AddPortName(parser) flags.AddProtocol(parser, default=None, support_grpc_protocol=support_grpc_protocol, support_all_protocol=support_all_protocol) flags.AddEnableCdn(parser) flags.AddSessionAffinity(parser, support_client_only=support_client_only) flags.AddAffinityCookieTtl(parser) flags.AddConnectionDrainingTimeout(parser) flags.AddLoadBalancingScheme( parser, include_l7_ilb=support_l7_internal_load_balancer) flags.AddCustomRequestHeaders(parser, remove_all_flag=False) flags.AddCacheKeyIncludeProtocol(parser, default=True) flags.AddCacheKeyIncludeHost(parser, default=True) flags.AddCacheKeyIncludeQueryString(parser, default=True) flags.AddCacheKeyQueryStringList(parser) AddIapFlag(parser) parser.display_info.AddCacheUpdater(flags.BackendServicesCompleter) signed_url_flags.AddSignedUrlCacheMaxAge(parser, required=False) if support_subsetting: flags.AddSubsettingPolicy(parser) if support_failover: flags.AddConnectionDrainOnFailover(parser, default=None) flags.AddDropTrafficIfUnhealthy(parser, default=None) flags.AddFailoverRatio(parser) if support_logging: flags.AddEnableLogging(parser) flags.AddLoggingSampleRate(parser) if support_multinic: flags.AddNetwork(parser) if support_flexible_cache_step_one: cdn_flags.AddFlexibleCacheStepOne(parser, 'backend service')
def Args(parser): flags.GLOBAL_BACKEND_SERVICE_ARG.AddArgument(parser) flags.AddDescription(parser) flags.AddHttpHealthChecks(parser) flags.AddHttpsHealthChecks(parser) flags.AddTimeout(parser) flags.AddPortName(parser) flags.AddProtocol(parser) flags.AddEnableCdn(parser, default=False) flags.AddSessionAffinity(parser, internal_lb=False) flags.AddAffinityCookieTtl(parser)
def Args(parser): flags.AddBackendServiceName(parser) flags.AddDescription(parser) flags.AddHttpHealthChecks(parser) flags.AddHttpsHealthChecks(parser) flags.AddTimeout(parser, default=None) flags.AddPortName(parser) flags.AddProtocol(parser, default=None) flags.AddConnectionDrainingTimeout(parser) flags.AddEnableCdn(parser) flags.AddHealthChecks(parser) flags.AddSessionAffinity(parser, default=None) flags.AddAffinityCookieTtl(parser, default=None)
def Args(parser): flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument(parser) flags.AddDescription(parser) flags.AddHealthChecks(parser) flags.AddHttpHealthChecks(parser) flags.AddHttpsHealthChecks(parser) flags.AddTimeout(parser) flags.AddPortName(parser) flags.AddProtocol(parser, default=None) flags.AddEnableCdn(parser, default=False) flags.AddSessionAffinity(parser, internal_lb=False) flags.AddAffinityCookieTtl(parser) flags.AddConnectionDrainingTimeout(parser) flags.AddLoadBalancingScheme(parser)
def Args(cls, parser, support_l7_internal_load_balancer, support_failover, support_logging, support_client_only): """Add all arguments for updating a backend service.""" flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument( parser, operation_type='update') flags.AddDescription(parser) cls.HEALTH_CHECK_ARG = flags.HealthCheckArgument( support_regional_health_check=support_l7_internal_load_balancer) cls.HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HEALTH_CHECK') cls.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument() cls.HTTP_HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HTTP_HEALTH_CHECK') cls.HTTPS_HEALTH_CHECK_ARG = flags.HttpsHealthCheckArgument() cls.HTTPS_HEALTH_CHECK_ARG.AddArgument( parser, cust_metavar='HTTPS_HEALTH_CHECK') flags.AddNoHealthChecks(parser) cls.SECURITY_POLICY_ARG = ( security_policy_flags.SecurityPolicyArgumentForTargetResource( resource='backend service')) cls.SECURITY_POLICY_ARG.AddArgument(parser) flags.AddTimeout(parser, default=None) flags.AddPortName(parser) flags.AddProtocol(parser, default=None) flags.AddConnectionDrainingTimeout(parser) flags.AddEnableCdn(parser) flags.AddCacheKeyIncludeProtocol(parser, default=None) flags.AddCacheKeyIncludeHost(parser, default=None) flags.AddCacheKeyIncludeQueryString(parser, default=None) flags.AddCacheKeyQueryStringList(parser) flags.AddSessionAffinity(parser, support_client_only=support_client_only) flags.AddAffinityCookieTtl(parser) signed_url_flags.AddSignedUrlCacheMaxAge(parser, required=False, unspecified_help='') if support_failover: flags.AddConnectionDrainOnFailover(parser, default=None) flags.AddDropTrafficIfUnhealthy(parser, default=None) flags.AddFailoverRatio(parser) if support_logging: flags.AddEnableLogging(parser, default=None) flags.AddLoggingSampleRate(parser) AddIapFlag(parser) flags.AddCustomRequestHeaders(parser, remove_all_flag=True, default=None)
def Args(parser): flags.GLOBAL_BACKEND_SERVICE_ARG.AddArgument(parser) flags.AddDescription(parser) flags.AddHttpHealthChecks(parser) flags.AddHttpsHealthChecks(parser) flags.AddTimeout(parser) flags.AddPortName(parser) flags.AddProtocol(parser) flags.AddEnableCdn(parser, default=False) flags.AddSessionAffinity(parser) flags.AddAffinityCookieTtl(parser) # These are added for beta flags.AddConnectionDrainingTimeout(parser) flags.AddHealthChecks(parser)
def Args(parser): flags.AddBackendServiceName(parser) flags.AddDescription(parser) flags.AddHttpHealthChecks(parser) flags.AddHttpsHealthChecks(parser) flags.AddTimeout(parser) flags.AddPortName(parser) flags.AddProtocol(parser) # These are in beta flags.AddEnableCdn(parser) # These are added for alpha flags.AddConnectionDrainingTimeout(parser) flags.AddHealthChecks(parser) flags.AddSessionAffinity(parser) flags.AddAffinityCookieTtl(parser)
def Args(cls, parser): flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument(parser) flags.AddDescription(parser) cls.HEALTH_CHECK_ARG = flags.HealthCheckArgument() cls.HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HEALTH_CHECK') cls.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument() cls.HTTP_HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HTTP_HEALTH_CHECK') cls.HTTPS_HEALTH_CHECK_ARG = flags.HttpsHealthCheckArgument() cls.HTTPS_HEALTH_CHECK_ARG.AddArgument( parser, cust_metavar='HTTPS_HEALTH_CHECK') flags.AddTimeout(parser, default=None) flags.AddPortName(parser) flags.AddProtocol(parser, default=None) flags.AddEnableCdn(parser, default=None) flags.AddSessionAffinity(parser, internal_lb=True) flags.AddAffinityCookieTtl(parser) flags.AddConnectionDrainingTimeout(parser)
def Args(parser): flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument(parser) flags.AddDescription(parser) flags.AddHealthChecks(parser) flags.AddHttpHealthChecks(parser) flags.AddHttpsHealthChecks(parser) flags.AddTimeout(parser, default=None) flags.AddPortName(parser) flags.AddProtocol(parser, default=None) flags.AddConnectionDrainingTimeout(parser) flags.AddEnableCdn(parser, default=None) flags.AddCacheKeyIncludeProtocol(parser, default=None) flags.AddCacheKeyIncludeHost(parser, default=None) flags.AddCacheKeyIncludeQueryString(parser, default=None) flags.AddCacheKeyQueryStringList(parser) flags.AddSessionAffinity(parser, internal_lb=True) flags.AddAffinityCookieTtl(parser) flags.AddIap(parser)
def testSessionAffinityChoices_InternalLb(self): expected_choices = set(beta_messages.BackendService. SessionAffinityValueValuesEnum.names()) flags.AddSessionAffinity(self.parser) self.assertTrue(self.choices.issubset(expected_choices))
def Args(cls, parser, support_l7_internal_load_balancer, support_failover, support_logging, support_tcp_ssl_logging, support_client_only, support_grpc_protocol, support_subsetting, support_subsetting_subset_size, support_unspecified_protocol, support_strong_session_affinity, support_advanced_load_balancing, support_dynamic_compression, support_weighted_lb): """Add all arguments for updating a backend service.""" flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument( parser, operation_type='update') flags.AddDescription(parser) cls.HEALTH_CHECK_ARG = flags.HealthCheckArgument( support_regional_health_check=support_l7_internal_load_balancer) cls.HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HEALTH_CHECK') cls.HTTP_HEALTH_CHECK_ARG = flags.HttpHealthCheckArgument() cls.HTTP_HEALTH_CHECK_ARG.AddArgument(parser, cust_metavar='HTTP_HEALTH_CHECK') cls.HTTPS_HEALTH_CHECK_ARG = flags.HttpsHealthCheckArgument() cls.HTTPS_HEALTH_CHECK_ARG.AddArgument( parser, cust_metavar='HTTPS_HEALTH_CHECK') flags.AddNoHealthChecks(parser) cls.SECURITY_POLICY_ARG = ( security_policy_flags.SecurityPolicyArgumentForTargetResource( resource='backend service')) cls.SECURITY_POLICY_ARG.AddArgument(parser) cls.EDGE_SECURITY_POLICY_ARG = ( security_policy_flags.EdgeSecurityPolicyArgumentForTargetResource( resource='backend service')) cls.EDGE_SECURITY_POLICY_ARG.AddArgument(parser) flags.AddTimeout(parser, default=None) flags.AddPortName(parser) flags.AddProtocol( parser, default=None, support_grpc_protocol=support_grpc_protocol, support_unspecified_protocol=support_unspecified_protocol) flags.AddConnectionDrainingTimeout(parser) flags.AddEnableCdn(parser) flags.AddCacheKeyIncludeProtocol(parser, default=None) flags.AddCacheKeyIncludeHost(parser, default=None) flags.AddCacheKeyIncludeQueryString(parser, default=None) flags.AddCacheKeyQueryStringList(parser) flags.AddCacheKeyExtendedCachingArgs(parser) flags.AddSessionAffinity(parser, support_client_only=support_client_only) flags.AddAffinityCookieTtl(parser) signed_url_flags.AddSignedUrlCacheMaxAge(parser, required=False, unspecified_help='') if support_subsetting: flags.AddSubsettingPolicy(parser) if support_subsetting_subset_size: flags.AddSubsettingSubsetSize(parser) if support_failover: flags.AddConnectionDrainOnFailover(parser, default=None) flags.AddDropTrafficIfUnhealthy(parser, default=None) flags.AddFailoverRatio(parser) if support_logging: if support_tcp_ssl_logging: flags.AddEnableLoggingProtocols(parser) flags.AddLoggingSampleRateProtocols(parser) else: flags.AddEnableLogging(parser) flags.AddLoggingSampleRate(parser) AddIapFlag(parser) flags.AddCustomRequestHeaders(parser, remove_all_flag=True, default=None) cdn_flags.AddCdnPolicyArgs(parser, 'backend service', update_command=True) flags.AddConnectionTrackingPolicy(parser) if support_strong_session_affinity: flags.AddStrongSessionAffinity(parser) if support_dynamic_compression: flags.AddCompressionMode(parser) if support_advanced_load_balancing: flags.AddServiceLoadBalancingPolicy(parser, required=False, is_update=True) flags.AddServiceBindings(parser, required=False, is_update=True) if support_weighted_lb: flags.AddLocalityLbPolicy(parser)