Class CreateScalingPolicy.Builder
- java.lang.Object
-
- org.jclouds.rackspace.autoscale.v1.domain.CreateScalingPolicy.Builder
-
- Enclosing class:
- CreateScalingPolicy
public static class CreateScalingPolicy.Builder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>
args
protected int
cooldown
protected String
name
protected String
target
protected CreateScalingPolicy.ScalingPolicyTargetType
targetType
protected CreateScalingPolicy.ScalingPolicyType
type
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateScalingPolicy.Builder
atSchedule(String at)
Optional.CreateScalingPolicy
build()
CreateScalingPolicy.Builder
cooldown(int cooldown)
Required.CreateScalingPolicy.Builder
cronSchedule(String cron)
Optional.CreateScalingPolicy.Builder
fromScalingPolicy(CreateScalingPolicy in)
CreateScalingPolicy.Builder
name(String name)
Required.CreateScalingPolicy.Builder
target(String target)
CreateScalingPolicy.Builder
targetType(CreateScalingPolicy.ScalingPolicyTargetType targetType)
CreateScalingPolicy.Builder
type(CreateScalingPolicy.ScalingPolicyType type)
Required.
-
-
-
Field Detail
-
name
protected String name
-
type
protected CreateScalingPolicy.ScalingPolicyType type
-
cooldown
protected int cooldown
-
target
protected String target
-
targetType
protected CreateScalingPolicy.ScalingPolicyTargetType targetType
-
-
Method Detail
-
name
public CreateScalingPolicy.Builder name(String name)
Required.- Parameters:
name
- The name of this ScalingPolicy.- Returns:
- The builder object.
- See Also:
CreateScalingPolicy.getName()
-
type
public CreateScalingPolicy.Builder type(CreateScalingPolicy.ScalingPolicyType type)
Required. The type of policy that will be executed for the current release, this value can be either webhook or schedule.- Parameters:
type
- The type for this ScalingPolicy.- Returns:
- The builder object.
- See Also:
CreateScalingPolicy.ScalingPolicyType
,CreateScalingPolicy.getType()
-
cooldown
public CreateScalingPolicy.Builder cooldown(int cooldown)
Required. The cooldown period, in seconds, before this particular scaling policy can be executed again. The policy cooldown period does not affect the global scaling group cooldown. The minimum value for this parameter is 0 seconds, the maximum value is 86400 seconds (24 hrs).- Parameters:
cooldown
- The cooldown of this ScalingPolicy.- Returns:
- The builder object.
- See Also:
CreateScalingPolicy.getCooldown()
-
target
public CreateScalingPolicy.Builder target(String target)
- Parameters:
target
- The target of this ScalingPolicy.- Returns:
- The builder object.
- See Also:
CreateScalingPolicy.getTarget()
-
targetType
public CreateScalingPolicy.Builder targetType(CreateScalingPolicy.ScalingPolicyTargetType targetType)
- Parameters:
targetType
- The target type of this ScalingPolicy.- Returns:
- The builder object.
- See Also:
CreateScalingPolicy.ScalingPolicyTargetType
,CreateScalingPolicy.getTargetType()
-
cronSchedule
public CreateScalingPolicy.Builder cronSchedule(String cron)
Optional.- Parameters:
cron
- This parameter specifies the recurring time when the policy will be executed as a cron entry. For example, if this is parameter is set to "1 0 * * *", the policy will be executed at one minute past midnight (00:01) every day of the month, and every day of the week. You can either provide "cron" or "at" for a given policy, but not both.- Returns:
- The builder object.
- See Also:
CreateScalingPolicy.ScalingPolicyTargetType
,CreateScalingPolicy.getTargetType()
, Cron
-
atSchedule
public CreateScalingPolicy.Builder atSchedule(String at)
Optional.- Parameters:
at
- This parameter specifies the time at which this policy will be executed. This property is mutually exclusive with the "cron" parameter. You can either provide "cron" or "at" for a given policy, but not both. Example date string: "2013-12-05T03:12:00Z"- Returns:
- The builder object.
- See Also:
CreateScalingPolicy.ScalingPolicyTargetType
,CreateScalingPolicy.getTargetType()
-
build
public CreateScalingPolicy build()
- Returns:
- A new ScalingPolicy object.
-
fromScalingPolicy
public CreateScalingPolicy.Builder fromScalingPolicy(CreateScalingPolicy in)
- Parameters:
in
- The target scaling policy- Returns:
- The scaling policy builder
-
-