com.baidubce.services.bmr.model
Class CreateTemplateRequest

java.lang.Object
  extended by com.baidubce.model.AbstractBceRequest
      extended by com.baidubce.services.bmr.model.CreateTemplateRequest

public class CreateTemplateRequest
extends AbstractBceRequest


Constructor Summary
CreateTemplateRequest()
           
 
Method Summary
 String getAdminPassword()
           
 List<Application> getApplications()
           
 Boolean getAutoTerminate()
           
 String getAvailabilityZone()
           
 String getImageType()
           
 String getImageVersion()
           
 List<InstanceGroupConfig> getInstanceGroups()
           
 String getLogUri()
           
 String getName()
           
 String getPayType()
           
 Boolean getSafeModeEnabled()
           
 Boolean getServiceHaEnabled()
           
 List<StepConfig> getSteps()
           
 String getSubnetId()
           
 String getSystemSecurityGroup()
           
 String getTemplateType()
           
 String getVpcId()
           
 void setAdminPassword(String adminPassword)
           
 void setApplications(List<Application> applications)
           
 void setAutoTerminate(Boolean autoTerminate)
           
 void setAvailabilityZone(String availabilityZone)
           
 void setImageType(String imageType)
           
 void setImageVersion(String imageVersion)
           
 void setInstanceGroups(List<InstanceGroupConfig> instanceGroups)
           
 void setLogUri(String logUri)
           
 void setName(String name)
           
 void setPayType(String payType)
           
 void setSafeModeEnabled(Boolean safeModeEnabled)
           
 void setServiceHaEnabled(Boolean serviceHaEnabled)
           
 void setSteps(List<StepConfig> steps)
           
 void setSubnetId(String subnetId)
           
 void setSystemSecurityGroup(String systemSecurityGroup)
           
 void setTemplateType(String templateType)
           
 void setVpcId(String vpcId)
           
 CreateTemplateRequest withAdminPassword(String adminPassword)
          Configure request adminPassword for the request.
 CreateTemplateRequest withApplication(Application application)
          Configure optional application for the cluster.
 CreateTemplateRequest withAutoTerminate(boolean autoTerminate)
          Configure auto-terminate property for the cluster.
 CreateTemplateRequest withAvailabilityZone(String availabilityZone)
          Configure request availabilityZone of creating cluster.
 CreateTemplateRequest withImageType(String imageType)
          Configure the image type for the cluster.
 CreateTemplateRequest withImageVersion(String imageVersion)
          Configure image version for the cluster.
 CreateTemplateRequest withInstanceGroup(InstanceGroupConfig instanceGroup)
          Configure the instance group for the cluster.
 CreateTemplateRequest withLogUri(String logUri)
          Configure optional BOS uri for logs of steps.
 CreateTemplateRequest withName(String name)
          Configure optional name of the cluster.If not set, then the name of the cluster will be "my-cluster" by default.
 AbstractBceRequest withRequestCredentials(BceCredentials credentials)
           
 CreateTemplateRequest withSafeModeEnabled(boolean safeModeEnabled)
          Configure optional safe mode enable of the cluster.
 CreateTemplateRequest withSecurityGroup(String securityGroup)
          Configure request security group for the request.
 CreateTemplateRequest withServiceHaEnabled(boolean serviceHaEnabled)
          Configure optional service HA enable of the cluster.
 CreateTemplateRequest withStep(StepConfig step)
          Configure optional step for the cluster.
 CreateTemplateRequest withSteps(List<StepConfig> steps)
          Configure the steps to be added.
 CreateTemplateRequest withSubnetId(String subnetId)
          Configure request subnet name for the request.
 CreateTemplateRequest withTemplateType(String templateType)
          Configure the template type for the cluster.
 CreateTemplateRequest withVpcId(String vpcId)
          Configure request vpc network name for the request.
 
Methods inherited from class com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateTemplateRequest

public CreateTemplateRequest()
Method Detail

withTemplateType

public CreateTemplateRequest withTemplateType(String templateType)
Configure the template type for the cluster.

Parameters:
templateType - The template type for cluster
Returns:
CreateClusterRequest

withImageType

public CreateTemplateRequest withImageType(String imageType)
Configure the image type for the cluster.

Parameters:
imageType - The image type for cluster's instances.
Returns:
CreateClusterRequest

withImageVersion

public CreateTemplateRequest withImageVersion(String imageVersion)
Configure image version for the cluster.

Parameters:
imageVersion - The image version for the cluster's instance.
Returns:
CreateClusterRequest

withAutoTerminate

public CreateTemplateRequest withAutoTerminate(boolean autoTerminate)
Configure auto-terminate property for the cluster. If set the autoTerminate as true, then the cluster will be terminated when all the steps are done. And the autoTerminate is true by default.

Parameters:
autoTerminate - true if the cluster should be auto terminated.
Returns:
CreateClusterRequest

withLogUri

public CreateTemplateRequest withLogUri(String logUri)
Configure optional BOS uri for logs of steps. If the uri is not set, then the logs for the cluster and steps are not saved in the BOS.

Parameters:
logUri - The valid BOS uri for the logs.
Returns:
CreateClusterRequest

withName

public CreateTemplateRequest withName(String name)
Configure optional name of the cluster.If not set, then the name of the cluster will be "my-cluster" by default.

Parameters:
name - The name for the cluster.
Returns:
CreateClusterRequest

withServiceHaEnabled

public CreateTemplateRequest withServiceHaEnabled(boolean serviceHaEnabled)
Configure optional service HA enable of the cluster. If true will create a ha cluster, default is false.

Parameters:
serviceHaEnabled - true if the serivce ha enable, default is false.
Returns:
CreateClusterRequest

withSafeModeEnabled

public CreateTemplateRequest withSafeModeEnabled(boolean safeModeEnabled)
Configure optional safe mode enable of the cluster. If true will create a cluster running as safe mode, default is false.

Parameters:
safeModeEnabled - true if the safe mode enable, default is false.
Returns:
CreateClusterRequest

withInstanceGroup

public CreateTemplateRequest withInstanceGroup(InstanceGroupConfig instanceGroup)
Configure the instance group for the cluster.

Parameters:
instanceGroup - An InstanceGroupConfig instance.
Returns:
CreateClusterRequest

withApplication

public CreateTemplateRequest withApplication(Application application)
Configure optional application for the cluster. BMR provides applications such as Hive、Pig、HBase for the cluster.

Parameters:
application - An ApplicationConfig instance.
Returns:
CreateClusterRequest

withStep

public CreateTemplateRequest withStep(StepConfig step)
Configure optional step for the cluster. The step will be scheduled and executed after the cluster is ACTIVE. And the step also can be added to the cluster by sending AddStepsRequest.

Parameters:
step - a StepConfig instance to be added.
Returns:
CreateClusterRequest

withSteps

public CreateTemplateRequest withSteps(List<StepConfig> steps)
Configure the steps to be added. This method will replace the CreateClusterRequest instance's steps by the @param steps totally, thus it should be invoked ahead of withStep method if both of them are used for the same CreateClusterRequest instance.

Parameters:
steps - a List of StepConfig instances to be added.
Returns:
CreateClusterRequest

withAdminPassword

public CreateTemplateRequest withAdminPassword(String adminPassword)
Configure request adminPassword for the request.

Parameters:
adminPassword - adminPassword for example bmrtest@123
Returns:
CreateClusterRequest

withVpcId

public CreateTemplateRequest withVpcId(String vpcId)
Configure request vpc network name for the request.

Parameters:
vpcId - vpcId for cluster
Returns:
CreateClusterRequest

withSubnetId

public CreateTemplateRequest withSubnetId(String subnetId)
Configure request subnet name for the request.

Parameters:
subnetId - subnetId for cluster
Returns:
CreateClusterRequest

withAvailabilityZone

public CreateTemplateRequest withAvailabilityZone(String availabilityZone)
Configure request availabilityZone of creating cluster.

Parameters:
availabilityZone - availabilityZone for cluster
Returns:
CreateClusterRequest

withSecurityGroup

public CreateTemplateRequest withSecurityGroup(String securityGroup)
Configure request security group for the request.

Parameters:
securityGroup - securityGroup for cluster
Returns:
CreateClusterRequest

getName

public String getName()

setName

public void setName(String name)

getPayType

public String getPayType()

setPayType

public void setPayType(String payType)

getApplications

public List<Application> getApplications()

setApplications

public void setApplications(List<Application> applications)

getAutoTerminate

public Boolean getAutoTerminate()

setAutoTerminate

public void setAutoTerminate(Boolean autoTerminate)

getImageType

public String getImageType()

setImageType

public void setImageType(String imageType)

getImageVersion

public String getImageVersion()

setImageVersion

public void setImageVersion(String imageVersion)

getInstanceGroups

public List<InstanceGroupConfig> getInstanceGroups()

setInstanceGroups

public void setInstanceGroups(List<InstanceGroupConfig> instanceGroups)

getLogUri

public String getLogUri()

setLogUri

public void setLogUri(String logUri)

getSteps

public List<StepConfig> getSteps()

setSteps

public void setSteps(List<StepConfig> steps)

getAdminPassword

public String getAdminPassword()

setAdminPassword

public void setAdminPassword(String adminPassword)

getAvailabilityZone

public String getAvailabilityZone()

setAvailabilityZone

public void setAvailabilityZone(String availabilityZone)

getVpcId

public String getVpcId()

setVpcId

public void setVpcId(String vpcId)

getSubnetId

public String getSubnetId()

setSubnetId

public void setSubnetId(String subnetId)

getSystemSecurityGroup

public String getSystemSecurityGroup()

setSystemSecurityGroup

public void setSystemSecurityGroup(String systemSecurityGroup)

getServiceHaEnabled

public Boolean getServiceHaEnabled()

setServiceHaEnabled

public void setServiceHaEnabled(Boolean serviceHaEnabled)

getSafeModeEnabled

public Boolean getSafeModeEnabled()

setSafeModeEnabled

public void setSafeModeEnabled(Boolean safeModeEnabled)

getTemplateType

public String getTemplateType()

setTemplateType

public void setTemplateType(String templateType)

withRequestCredentials

public AbstractBceRequest withRequestCredentials(BceCredentials credentials)
Specified by:
withRequestCredentials in class AbstractBceRequest


Copyright © 2020. All rights reserved.