类 CreateTemplateRequest

    • 构造器详细资料

      • CreateTemplateRequest

        public CreateTemplateRequest()
    • 方法详细资料

      • withTemplateType

        public CreateTemplateRequest withTemplateType​(String templateType)
        Configure the template type for the cluster.
        参数:
        templateType - The template type for cluster
        返回:
        CreateClusterRequest
      • withImageType

        public CreateTemplateRequest withImageType​(String imageType)
        Configure the image type for the cluster.
        参数:
        imageType - The image type for cluster's instances.
        返回:
        CreateClusterRequest
      • withImageVersion

        public CreateTemplateRequest withImageVersion​(String imageVersion)
        Configure image version for the cluster.
        参数:
        imageVersion - The image version for the cluster's instance.
        返回:
        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.
        参数:
        autoTerminate - true if the cluster should be auto terminated.
        返回:
        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.
        参数:
        logUri - The valid BOS uri for the logs.
        返回:
        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.
        参数:
        name - The name for the cluster.
        返回:
        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.
        参数:
        serviceHaEnabled - true if the serivce ha enable, default is false.
        返回:
        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.
        参数:
        safeModeEnabled - true if the safe mode enable, default is false.
        返回:
        CreateClusterRequest
      • withInstanceGroup

        public CreateTemplateRequest withInstanceGroup​(InstanceGroupConfig instanceGroup)
        Configure the instance group for the cluster.
        参数:
        instanceGroup - An InstanceGroupConfig instance.
        返回:
        CreateClusterRequest
      • withApplication

        public CreateTemplateRequest withApplication​(Application 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 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.
        参数:
        step - a StepConfig instance to be added.
        返回:
        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.
        参数:
        steps - a List of StepConfig instances to be added.
        返回:
        CreateClusterRequest
      • withAdminPassword

        public CreateTemplateRequest withAdminPassword​(String adminPassword)
        Configure request adminPassword for the request.
        参数:
        adminPassword - adminPassword for example bmrtest@123
        返回:
        CreateClusterRequest
      • withVpcId

        public CreateTemplateRequest withVpcId​(String vpcId)
        Configure request vpc network name for the request.
        参数:
        vpcId - vpcId for cluster
        返回:
        CreateClusterRequest
      • withSubnetId

        public CreateTemplateRequest withSubnetId​(String subnetId)
        Configure request subnet name for the request.
        参数:
        subnetId - subnetId for cluster
        返回:
        CreateClusterRequest
      • withAvailabilityZone

        public CreateTemplateRequest withAvailabilityZone​(String availabilityZone)
        Configure request availabilityZone of creating cluster.
        参数:
        availabilityZone - availabilityZone for cluster
        返回:
        CreateClusterRequest
      • withSecurityGroup

        public CreateTemplateRequest withSecurityGroup​(String securityGroup)
        Configure request security group for the request.
        参数:
        securityGroup - securityGroup for cluster
        返回:
        CreateClusterRequest
      • getName

        public String getName()
      • setName

        public void setName​(String name)
      • getPayType

        public String getPayType()
      • setPayType

        public void setPayType​(String payType)
      • 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)
      • getLogUri

        public String getLogUri()
      • setLogUri

        public void setLogUri​(String logUri)
      • 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)