类 CreateClusterRequest
- java.lang.Object
-
- com.baidubce.model.AbstractBceRequest
-
- com.baidubce.services.bmr.model.CreateClusterRequest
-
public class CreateClusterRequest extends AbstractBceRequest
Provides options for creating a BMR cluster.The essential options are imageType, imageVersion, instanceGroups, and the optional ones are clientToken, name, autoTerminate, logUri, applications and steps.
-
-
构造器概要
构造器 构造器 说明 CreateClusterRequest()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetAdminPassword()List<ApplicationConfig>getApplications()booleangetAutoTerminate()StringgetAvailabilityZone()StringgetClientToken()StringgetImageType()StringgetImageVersion()List<InstanceGroupConfig>getInstanceGroups()StringgetLogUri()StringgetName()booleangetSafeModeEnabled()StringgetSecurityGroup()booleangetServiceHaEnabled()List<StepConfig>getSteps()StringgetSubnetId()StringgetVpcId()voidsetAdminPassword(String adminPassword)voidsetApplications(List<ApplicationConfig> applications)voidsetAutoTerminate(boolean autoTerminate)voidsetAvailabilityZone(String availabilityZone)voidsetClientToken(String clientToken)voidsetImageType(String imageType)voidsetImageVersion(String imageVersion)voidsetInstanceGroups(List<InstanceGroupConfig> instanceGroups)voidsetLogUri(String logUri)voidsetName(String name)voidsetSafeModeEnabled(boolean safeModeEnabled)voidsetSecurityGroup(String securityGroup)voidsetServiceHaEnabled(boolean serviceHaEnabled)voidsetSteps(List<StepConfig> steps)voidsetSubnetId(String subnetId)voidsetVpcId(String vpcId)CreateClusterRequestwithAdminPassword(String adminPassword)Configure request adminPassword for the request.CreateClusterRequestwithApplication(ApplicationConfig application)Configure optional application for the cluster.CreateClusterRequestwithAutoTerminate(boolean autoTerminate)Configure auto-terminate property for the cluster.CreateClusterRequestwithAvailabilityZone(String availabilityZone)Configure request availabilityZone of creating cluster.CreateClusterRequestwithClientToken(String clientToken)Configure optional client token for the request.CreateClusterRequestwithImageType(String imageType)Configure the image type for the cluster.CreateClusterRequestwithImageVersion(String imageVersion)Configure image version for the cluster.CreateClusterRequestwithInstanceGroup(InstanceGroupConfig instanceGroup)Configure the instance group for the cluster.CreateClusterRequestwithLogUri(String logUri)Configure optional BOS uri for logs of steps.CreateClusterRequestwithName(String name)Configure optional name of the cluster.If not set, then the name of the cluster will be "my-cluster" by default.CreateClusterRequestwithRequestCredentials(BceCredentials credentials)Configure request credential for the request.CreateClusterRequestwithSafeModeEnabled(boolean safeModeEnabled)Configure optional safe mode enable of the cluster.CreateClusterRequestwithSecurityGroup(String securityGroup)Configure request security group for the request.CreateClusterRequestwithServiceHaEnabled(boolean serviceHaEnabled)Configure optional service HA enable of the cluster.CreateClusterRequestwithStep(StepConfig step)Configure optional step for the cluster.CreateClusterRequestwithSteps(List<StepConfig> steps)Configure the steps to be added.CreateClusterRequestwithSubnetId(String subnetId)Configure request subnet name for the request.CreateClusterRequestwithVpcId(String vpcId)Configure request vpc network name for the request.-
从类继承的方法 com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
-
-
-
-
方法详细资料
-
getImageType
public String getImageType()
-
setImageType
public void setImageType(String imageType)
-
getImageVersion
public String getImageVersion()
-
setImageVersion
public void setImageVersion(String imageVersion)
-
getClientToken
public String getClientToken()
-
setClientToken
public void setClientToken(String clientToken)
-
getAutoTerminate
public boolean getAutoTerminate()
-
setAutoTerminate
public void setAutoTerminate(boolean autoTerminate)
-
getLogUri
public String getLogUri()
-
setLogUri
public void setLogUri(String logUri)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getServiceHaEnabled
public boolean getServiceHaEnabled()
-
setServiceHaEnabled
public void setServiceHaEnabled(boolean serviceHaEnabled)
-
getSafeModeEnabled
public boolean getSafeModeEnabled()
-
setSafeModeEnabled
public void setSafeModeEnabled(boolean safeModeEnabled)
-
getInstanceGroups
public List<InstanceGroupConfig> getInstanceGroups()
-
setInstanceGroups
public void setInstanceGroups(List<InstanceGroupConfig> instanceGroups)
-
getApplications
public List<ApplicationConfig> getApplications()
-
setApplications
public void setApplications(List<ApplicationConfig> applications)
-
getSteps
public List<StepConfig> getSteps()
-
setSteps
public void setSteps(List<StepConfig> steps)
-
getAdminPassword
public String getAdminPassword()
-
setAdminPassword
public void setAdminPassword(String adminPassword)
-
getSecurityGroup
public String getSecurityGroup()
-
setSecurityGroup
public void setSecurityGroup(String securityGroup)
-
getVpcId
public String getVpcId()
-
setVpcId
public void setVpcId(String vpcId)
-
getSubnetId
public String getSubnetId()
-
setSubnetId
public void setSubnetId(String subnetId)
-
getAvailabilityZone
public String getAvailabilityZone()
-
setAvailabilityZone
public void setAvailabilityZone(String availabilityZone)
-
withImageType
public CreateClusterRequest withImageType(String imageType)
Configure the image type for the cluster.- 参数:
imageType- The image type for cluster's instances.- 返回:
- CreateClusterRequest
-
withImageVersion
public CreateClusterRequest withImageVersion(String imageVersion)
Configure image version for the cluster.- 参数:
imageVersion- The image version for the cluster's instance.- 返回:
- CreateClusterRequest
-
withAutoTerminate
public CreateClusterRequest 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.- 参数:
autoTerminate- true if the cluster should be auto terminated.- 返回:
- CreateClusterRequest
-
withLogUri
public CreateClusterRequest 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.- 参数:
logUri- The valid BOS uri for the logs.- 返回:
- CreateClusterRequest
-
withName
public CreateClusterRequest withName(String name)
Configure optional name of the cluster.If not set, then the name of the cluster will be "my-cluster" by default.- 参数:
name- The name for the cluster.- 返回:
- CreateClusterRequest
-
withServiceHaEnabled
public CreateClusterRequest withServiceHaEnabled(boolean serviceHaEnabled)
Configure optional service HA enable of the cluster. If true will create a ha cluster, default is false.- 参数:
serviceHaEnabled- true if the serivce ha enable, default is false.- 返回:
- CreateClusterRequest
-
withSafeModeEnabled
public CreateClusterRequest withSafeModeEnabled(boolean safeModeEnabled)
Configure optional safe mode enable of the cluster. If true will create a cluster running as safe mode, default is false.- 参数:
safeModeEnabled- true if the safe mode enable, default is false.- 返回:
- CreateClusterRequest
-
withInstanceGroup
public CreateClusterRequest withInstanceGroup(InstanceGroupConfig instanceGroup)
Configure the instance group for the cluster.- 参数:
instanceGroup- An InstanceGroupConfig instance.- 返回:
- CreateClusterRequest
-
withApplication
public CreateClusterRequest withApplication(ApplicationConfig application)
Configure optional application for the cluster. BMR provides applications such as Hive、Pig、HBase for the cluster.- 参数:
application- An ApplicationConfig instance.- 返回:
- CreateClusterRequest
-
withStep
public CreateClusterRequest 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.- 参数:
step- a StepConfig instance to be added.- 返回:
- CreateClusterRequest
-
withSteps
public CreateClusterRequest 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.- 参数:
steps- a List of StepConfig instances to be added.- 返回:
- CreateClusterRequest
-
withClientToken
public CreateClusterRequest withClientToken(String clientToken)
Configure optional client token for the request. The request will be idempotent if client token is provided.- 参数:
clientToken- An ASCII string whose length is less than 64.- 返回:
- CreateClusterRequest
-
withRequestCredentials
public CreateClusterRequest withRequestCredentials(BceCredentials credentials)
Configure request credential for the request.- 指定者:
withRequestCredentials在类中AbstractBceRequest- 参数:
credentials- a valid instance of BceCredentials.- 返回:
- CreateClusterRequest
-
withAdminPassword
public CreateClusterRequest withAdminPassword(String adminPassword)
Configure request adminPassword for the request.- 参数:
adminPassword- an password for cluster for example bmrtest@123- 返回:
- CreateClusterRequest
-
withVpcId
public CreateClusterRequest withVpcId(String vpcId)
Configure request vpc network name for the request.- 参数:
vpcId- vpcId for create cluster- 返回:
- CreateClusterRequest
-
withSubnetId
public CreateClusterRequest withSubnetId(String subnetId)
Configure request subnet name for the request.- 参数:
subnetId- subnetId for cluster- 返回:
- CreateClusterRequest
-
withAvailabilityZone
public CreateClusterRequest withAvailabilityZone(String availabilityZone)
Configure request availabilityZone of creating cluster.- 参数:
availabilityZone- cluster availabilityZone- 返回:
- CreateClusterRequest
-
withSecurityGroup
public CreateClusterRequest withSecurityGroup(String securityGroup)
Configure request security group for the request.- 参数:
securityGroup- securityGroup for cluster- 返回:
- CreateClusterRequest
-
-