Class ScalingGroupState.Builder

  • Enclosing class:
    ScalingGroupState

    public static final class ScalingGroupState.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • dbInstanceIds

        public ScalingGroupState.Builder dbInstanceIds​(@Nullable
                                                       com.pulumi.core.Output<java.util.List<java.lang.String>> dbInstanceIds)
        Parameters:
        dbInstanceIds - If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. - The specified RDS instance must be in running status. - The specified RDS instance’s whitelist must have room for more IP addresses.
        Returns:
        builder
      • dbInstanceIds

        public ScalingGroupState.Builder dbInstanceIds​(java.util.List<java.lang.String> dbInstanceIds)
        Parameters:
        dbInstanceIds - If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. - The specified RDS instance must be in running status. - The specified RDS instance’s whitelist must have room for more IP addresses.
        Returns:
        builder
      • dbInstanceIds

        public ScalingGroupState.Builder dbInstanceIds​(java.lang.String... dbInstanceIds)
        Parameters:
        dbInstanceIds - If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. - The specified RDS instance must be in running status. - The specified RDS instance’s whitelist must have room for more IP addresses.
        Returns:
        builder
      • defaultCooldown

        public ScalingGroupState.Builder defaultCooldown​(@Nullable
                                                         com.pulumi.core.Output<java.lang.Integer> defaultCooldown)
        Parameters:
        defaultCooldown - Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
        Returns:
        builder
      • defaultCooldown

        public ScalingGroupState.Builder defaultCooldown​(java.lang.Integer defaultCooldown)
        Parameters:
        defaultCooldown - Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s.
        Returns:
        builder
      • desiredCapacity

        public ScalingGroupState.Builder desiredCapacity​(@Nullable
                                                         com.pulumi.core.Output<java.lang.Integer> desiredCapacity)
        Parameters:
        desiredCapacity - Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
        Returns:
        builder
      • desiredCapacity

        public ScalingGroupState.Builder desiredCapacity​(java.lang.Integer desiredCapacity)
        Parameters:
        desiredCapacity - Expected number of ECS instances in the scaling group. Value range: [min_size, max_size].
        Returns:
        builder
      • groupDeletionProtection

        public ScalingGroupState.Builder groupDeletionProtection​(@Nullable
                                                                 com.pulumi.core.Output<java.lang.Boolean> groupDeletionProtection)
        Parameters:
        groupDeletionProtection - Specifies whether the scaling group deletion protection is enabled. `true` or `false`, Default value: `false`.
        Returns:
        builder
      • groupDeletionProtection

        public ScalingGroupState.Builder groupDeletionProtection​(java.lang.Boolean groupDeletionProtection)
        Parameters:
        groupDeletionProtection - Specifies whether the scaling group deletion protection is enabled. `true` or `false`, Default value: `false`.
        Returns:
        builder
      • groupType

        public ScalingGroupState.Builder groupType​(@Nullable
                                                   com.pulumi.core.Output<java.lang.String> groupType)
        Parameters:
        groupType - Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
        Returns:
        builder
      • groupType

        public ScalingGroupState.Builder groupType​(java.lang.String groupType)
        Parameters:
        groupType - Resource type within scaling group. Optional values: ECS, ECI. Default to ECS.
        Returns:
        builder
      • healthCheckType

        public ScalingGroupState.Builder healthCheckType​(@Nullable
                                                         com.pulumi.core.Output<java.lang.String> healthCheckType)
        Parameters:
        healthCheckType - Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
        Returns:
        builder
      • healthCheckType

        public ScalingGroupState.Builder healthCheckType​(java.lang.String healthCheckType)
        Parameters:
        healthCheckType - Resource type within scaling group. Optional values: ECS, NONE. Default to ECS.
        Returns:
        builder
      • launchTemplateId

        public ScalingGroupState.Builder launchTemplateId​(@Nullable
                                                          com.pulumi.core.Output<java.lang.String> launchTemplateId)
        Parameters:
        launchTemplateId - Instance launch template ID, scaling group obtains launch configuration from instance launch template, see [Launch Template](https://www.alibabacloud.com/help/doc-detail/73916.html). Creating scaling group from launch template enable group automatically.
        Returns:
        builder
      • launchTemplateId

        public ScalingGroupState.Builder launchTemplateId​(java.lang.String launchTemplateId)
        Parameters:
        launchTemplateId - Instance launch template ID, scaling group obtains launch configuration from instance launch template, see [Launch Template](https://www.alibabacloud.com/help/doc-detail/73916.html). Creating scaling group from launch template enable group automatically.
        Returns:
        builder
      • launchTemplateVersion

        public ScalingGroupState.Builder launchTemplateVersion​(@Nullable
                                                               com.pulumi.core.Output<java.lang.String> launchTemplateVersion)
        Parameters:
        launchTemplateVersion - The version number of the launch template. Valid values are the version number, `Latest`, or `Default`, Default value: `Default`.
        Returns:
        builder
      • launchTemplateVersion

        public ScalingGroupState.Builder launchTemplateVersion​(java.lang.String launchTemplateVersion)
        Parameters:
        launchTemplateVersion - The version number of the launch template. Valid values are the version number, `Latest`, or `Default`, Default value: `Default`.
        Returns:
        builder
      • loadbalancerIds

        public ScalingGroupState.Builder loadbalancerIds​(@Nullable
                                                         com.pulumi.core.Output<java.util.List<java.lang.String>> loadbalancerIds)
        Parameters:
        loadbalancerIds - If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. - The Server Load Balancer instance must be enabled. - At least one listener must be configured for each Server Load Balancer and it HealthCheck must be on. Otherwise, creation will fail (it may be useful to add a `depends_on` argument targeting your `alicloud.slb.Listener` in order to make sure the listener with its HealthCheck configuration is ready before creating your scaling group). - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. - The default weight of an ECS instance attached to the Server Load Balancer instance is 50.
        Returns:
        builder
      • loadbalancerIds

        public ScalingGroupState.Builder loadbalancerIds​(java.util.List<java.lang.String> loadbalancerIds)
        Parameters:
        loadbalancerIds - If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. - The Server Load Balancer instance must be enabled. - At least one listener must be configured for each Server Load Balancer and it HealthCheck must be on. Otherwise, creation will fail (it may be useful to add a `depends_on` argument targeting your `alicloud.slb.Listener` in order to make sure the listener with its HealthCheck configuration is ready before creating your scaling group). - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. - The default weight of an ECS instance attached to the Server Load Balancer instance is 50.
        Returns:
        builder
      • loadbalancerIds

        public ScalingGroupState.Builder loadbalancerIds​(java.lang.String... loadbalancerIds)
        Parameters:
        loadbalancerIds - If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. - The Server Load Balancer instance must be enabled. - At least one listener must be configured for each Server Load Balancer and it HealthCheck must be on. Otherwise, creation will fail (it may be useful to add a `depends_on` argument targeting your `alicloud.slb.Listener` in order to make sure the listener with its HealthCheck configuration is ready before creating your scaling group). - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. - The default weight of an ECS instance attached to the Server Load Balancer instance is 50.
        Returns:
        builder
      • maxSize

        public ScalingGroupState.Builder maxSize​(@Nullable
                                                 com.pulumi.core.Output<java.lang.Integer> maxSize)
        Parameters:
        maxSize - Maximum number of ECS instances in the scaling group. Value range: [0, 2000]. **NOTE:** From version 1.204.1, `max_size` can be set to `2000`.
        Returns:
        builder
      • maxSize

        public ScalingGroupState.Builder maxSize​(java.lang.Integer maxSize)
        Parameters:
        maxSize - Maximum number of ECS instances in the scaling group. Value range: [0, 2000]. **NOTE:** From version 1.204.1, `max_size` can be set to `2000`.
        Returns:
        builder
      • minSize

        public ScalingGroupState.Builder minSize​(@Nullable
                                                 com.pulumi.core.Output<java.lang.Integer> minSize)
        Parameters:
        minSize - Minimum number of ECS instances in the scaling group. Value range: [0, 2000]. **NOTE:** From version 1.204.1, `min_size` can be set to `2000`.
        Returns:
        builder
      • minSize

        public ScalingGroupState.Builder minSize​(java.lang.Integer minSize)
        Parameters:
        minSize - Minimum number of ECS instances in the scaling group. Value range: [0, 2000]. **NOTE:** From version 1.204.1, `min_size` can be set to `2000`.
        Returns:
        builder
      • multiAzPolicy

        public ScalingGroupState.Builder multiAzPolicy​(@Nullable
                                                       com.pulumi.core.Output<java.lang.String> multiAzPolicy)
        Parameters:
        multiAzPolicy - Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, BALANCE or COST_OPTIMIZED(Available in 1.54.0+).
        Returns:
        builder
      • multiAzPolicy

        public ScalingGroupState.Builder multiAzPolicy​(java.lang.String multiAzPolicy)
        Parameters:
        multiAzPolicy - Multi-AZ scaling group ECS instance expansion and contraction strategy. PRIORITY, BALANCE or COST_OPTIMIZED(Available in 1.54.0+).
        Returns:
        builder
      • onDemandBaseCapacity

        public ScalingGroupState.Builder onDemandBaseCapacity​(@Nullable
                                                              com.pulumi.core.Output<java.lang.Integer> onDemandBaseCapacity)
        Parameters:
        onDemandBaseCapacity - The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales.
        Returns:
        builder
      • onDemandBaseCapacity

        public ScalingGroupState.Builder onDemandBaseCapacity​(java.lang.Integer onDemandBaseCapacity)
        Parameters:
        onDemandBaseCapacity - The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales.
        Returns:
        builder
      • onDemandPercentageAboveBaseCapacity

        public ScalingGroupState.Builder onDemandPercentageAboveBaseCapacity​(@Nullable
                                                                             com.pulumi.core.Output<java.lang.Integer> onDemandPercentageAboveBaseCapacity)
        Parameters:
        onDemandPercentageAboveBaseCapacity - Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
        Returns:
        builder
      • onDemandPercentageAboveBaseCapacity

        public ScalingGroupState.Builder onDemandPercentageAboveBaseCapacity​(java.lang.Integer onDemandPercentageAboveBaseCapacity)
        Parameters:
        onDemandPercentageAboveBaseCapacity - Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity.
        Returns:
        builder
      • protectedInstances

        public ScalingGroupState.Builder protectedInstances​(@Nullable
                                                            com.pulumi.core.Output<java.util.List<java.lang.String>> protectedInstances)
        Parameters:
        protectedInstances - Set or unset instances within group into protected status. > **NOTE:** When detach loadbalancers, instances in group will be remove from loadbalancer's `Default Server Group`; On the contrary, When attach loadbalancers, instances in group will be added to loadbalancer's `Default Server Group`. > **NOTE:** When detach dbInstances, private ip of instances in group will be remove from dbInstance's `WhiteList`; On the contrary, When attach dbInstances, private ip of instances in group will be added to dbInstance's `WhiteList`. > **NOTE:** `on_demand_base_capacity`,`on_demand_percentage_above_base_capacity`,`spot_instance_pools`,`spot_instance_remedy` are valid only if `multi_az_policy` is 'COST_OPTIMIZED'.
        Returns:
        builder
      • protectedInstances

        public ScalingGroupState.Builder protectedInstances​(java.util.List<java.lang.String> protectedInstances)
        Parameters:
        protectedInstances - Set or unset instances within group into protected status. > **NOTE:** When detach loadbalancers, instances in group will be remove from loadbalancer's `Default Server Group`; On the contrary, When attach loadbalancers, instances in group will be added to loadbalancer's `Default Server Group`. > **NOTE:** When detach dbInstances, private ip of instances in group will be remove from dbInstance's `WhiteList`; On the contrary, When attach dbInstances, private ip of instances in group will be added to dbInstance's `WhiteList`. > **NOTE:** `on_demand_base_capacity`,`on_demand_percentage_above_base_capacity`,`spot_instance_pools`,`spot_instance_remedy` are valid only if `multi_az_policy` is 'COST_OPTIMIZED'.
        Returns:
        builder
      • protectedInstances

        public ScalingGroupState.Builder protectedInstances​(java.lang.String... protectedInstances)
        Parameters:
        protectedInstances - Set or unset instances within group into protected status. > **NOTE:** When detach loadbalancers, instances in group will be remove from loadbalancer's `Default Server Group`; On the contrary, When attach loadbalancers, instances in group will be added to loadbalancer's `Default Server Group`. > **NOTE:** When detach dbInstances, private ip of instances in group will be remove from dbInstance's `WhiteList`; On the contrary, When attach dbInstances, private ip of instances in group will be added to dbInstance's `WhiteList`. > **NOTE:** `on_demand_base_capacity`,`on_demand_percentage_above_base_capacity`,`spot_instance_pools`,`spot_instance_remedy` are valid only if `multi_az_policy` is 'COST_OPTIMIZED'.
        Returns:
        builder
      • removalPolicies

        public ScalingGroupState.Builder removalPolicies​(@Nullable
                                                         com.pulumi.core.Output<java.util.List<java.lang.String>> removalPolicies)
        Parameters:
        removalPolicies - RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: - OldestInstance: removes the ECS instance that is added to the scaling group at the earliest point in time. - NewestInstance: removes the ECS instance that is added to the scaling group at the latest point in time. - OldestScalingConfiguration: removes the ECS instance that is created based on the earliest scaling configuration. - Default values: Default value of RemovalPolicy.1: OldestScalingConfiguration. Default value of RemovalPolicy.2: OldestInstance.
        Returns:
        builder
      • removalPolicies

        public ScalingGroupState.Builder removalPolicies​(java.util.List<java.lang.String> removalPolicies)
        Parameters:
        removalPolicies - RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: - OldestInstance: removes the ECS instance that is added to the scaling group at the earliest point in time. - NewestInstance: removes the ECS instance that is added to the scaling group at the latest point in time. - OldestScalingConfiguration: removes the ECS instance that is created based on the earliest scaling configuration. - Default values: Default value of RemovalPolicy.1: OldestScalingConfiguration. Default value of RemovalPolicy.2: OldestInstance.
        Returns:
        builder
      • removalPolicies

        public ScalingGroupState.Builder removalPolicies​(java.lang.String... removalPolicies)
        Parameters:
        removalPolicies - RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: - OldestInstance: removes the ECS instance that is added to the scaling group at the earliest point in time. - NewestInstance: removes the ECS instance that is added to the scaling group at the latest point in time. - OldestScalingConfiguration: removes the ECS instance that is created based on the earliest scaling configuration. - Default values: Default value of RemovalPolicy.1: OldestScalingConfiguration. Default value of RemovalPolicy.2: OldestInstance.
        Returns:
        builder
      • scalingGroupName

        public ScalingGroupState.Builder scalingGroupName​(@Nullable
                                                          com.pulumi.core.Output<java.lang.String> scalingGroupName)
        Parameters:
        scalingGroupName - Name shown for the scaling group, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain numbers, underscores `_`, hyphens `-`, and decimal points `.`. If this parameter is not specified, the default value is ScalingGroupId.
        Returns:
        builder
      • scalingGroupName

        public ScalingGroupState.Builder scalingGroupName​(java.lang.String scalingGroupName)
        Parameters:
        scalingGroupName - Name shown for the scaling group, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain numbers, underscores `_`, hyphens `-`, and decimal points `.`. If this parameter is not specified, the default value is ScalingGroupId.
        Returns:
        builder
      • spotInstancePools

        public ScalingGroupState.Builder spotInstancePools​(@Nullable
                                                           com.pulumi.core.Output<java.lang.Integer> spotInstancePools)
        Parameters:
        spotInstancePools - The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
        Returns:
        builder
      • spotInstancePools

        public ScalingGroupState.Builder spotInstancePools​(java.lang.Integer spotInstancePools)
        Parameters:
        spotInstancePools - The number of Spot pools to use to allocate your Spot capacity. The Spot pools is composed of instance types of lowest price.
        Returns:
        builder
      • spotInstanceRemedy

        public ScalingGroupState.Builder spotInstanceRemedy​(@Nullable
                                                            com.pulumi.core.Output<java.lang.Boolean> spotInstanceRemedy)
        Parameters:
        spotInstanceRemedy - Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
        Returns:
        builder
      • spotInstanceRemedy

        public ScalingGroupState.Builder spotInstanceRemedy​(java.lang.Boolean spotInstanceRemedy)
        Parameters:
        spotInstanceRemedy - Whether to replace spot instances with newly created spot/onDemand instance when receive a spot recycling message.
        Returns:
        builder
      • tags

        public ScalingGroupState.Builder tags​(@Nullable
                                              com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.Object>> tags)
        Parameters:
        tags - A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
        Returns:
        builder
      • tags

        public ScalingGroupState.Builder tags​(java.util.Map<java.lang.String,​java.lang.Object> tags)
        Parameters:
        tags - A mapping of tags to assign to the resource. - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
        Returns:
        builder
      • vswitchId

        @Deprecated
        public ScalingGroupState.Builder vswitchId​(@Nullable
                                                   com.pulumi.core.Output<java.lang.String> vswitchId)
        Deprecated.
        Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
        Parameters:
        vswitchId - It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
        Returns:
        builder
      • vswitchId

        @Deprecated
        public ScalingGroupState.Builder vswitchId​(java.lang.String vswitchId)
        Deprecated.
        Field 'vswitch_id' has been deprecated from provider version 1.7.1, and new field 'vswitch_ids' can replace it.
        Parameters:
        vswitchId - It has been deprecated from version 1.7.1 and new field 'vswitch_ids' replaces it.
        Returns:
        builder
      • vswitchIds

        public ScalingGroupState.Builder vswitchIds​(@Nullable
                                                    com.pulumi.core.Output<java.util.List<java.lang.String>> vswitchIds)
        Parameters:
        vswitchIds - List of virtual switch IDs in which the ecs instances to be launched.
        Returns:
        builder
      • vswitchIds

        public ScalingGroupState.Builder vswitchIds​(java.util.List<java.lang.String> vswitchIds)
        Parameters:
        vswitchIds - List of virtual switch IDs in which the ecs instances to be launched.
        Returns:
        builder
      • vswitchIds

        public ScalingGroupState.Builder vswitchIds​(java.lang.String... vswitchIds)
        Parameters:
        vswitchIds - List of virtual switch IDs in which the ecs instances to be launched.
        Returns:
        builder