Documentation ¶
Index ¶
- func GenReqDefForBatchCreateClusterTags() *def.HttpRequestDef
- func GenReqDefForBatchDeleteClusterTags() *def.HttpRequestDef
- func GenReqDefForCreateAndExecuteJob() *def.HttpRequestDef
- func GenReqDefForCreateCluster() *def.HttpRequestDef
- func GenReqDefForCreateClusterTag() *def.HttpRequestDef
- func GenReqDefForCreateScalingPolicy() *def.HttpRequestDef
- func GenReqDefForDeleteCluster() *def.HttpRequestDef
- func GenReqDefForDeleteClusterTag() *def.HttpRequestDef
- func GenReqDefForDeleteJobExecution() *def.HttpRequestDef
- func GenReqDefForListAllTags() *def.HttpRequestDef
- func GenReqDefForListClusterTags() *def.HttpRequestDef
- func GenReqDefForListClusters() *def.HttpRequestDef
- func GenReqDefForListClustersByTags() *def.HttpRequestDef
- func GenReqDefForListExecuteJob() *def.HttpRequestDef
- func GenReqDefForListHosts() *def.HttpRequestDef
- func GenReqDefForShowClusterDetails() *def.HttpRequestDef
- func GenReqDefForShowJobExes() *def.HttpRequestDef
- func GenReqDefForUpdateClusterScaling() *def.HttpRequestDef
- func MrsClientBuilder() *http_client.HcHttpClientBuilder
- type MrsClient
- func (c *MrsClient) BatchCreateClusterTags(request *model.BatchCreateClusterTagsRequest) (*model.BatchCreateClusterTagsResponse, error)
- func (c *MrsClient) BatchDeleteClusterTags(request *model.BatchDeleteClusterTagsRequest) (*model.BatchDeleteClusterTagsResponse, error)
- func (c *MrsClient) CreateAndExecuteJob(request *model.CreateAndExecuteJobRequest) (*model.CreateAndExecuteJobResponse, error)
- func (c *MrsClient) CreateCluster(request *model.CreateClusterRequest) (*model.CreateClusterResponse, error)
- func (c *MrsClient) CreateClusterTag(request *model.CreateClusterTagRequest) (*model.CreateClusterTagResponse, error)
- func (c *MrsClient) CreateScalingPolicy(request *model.CreateScalingPolicyRequest) (*model.CreateScalingPolicyResponse, error)
- func (c *MrsClient) DeleteCluster(request *model.DeleteClusterRequest) (*model.DeleteClusterResponse, error)
- func (c *MrsClient) DeleteClusterTag(request *model.DeleteClusterTagRequest) (*model.DeleteClusterTagResponse, error)
- func (c *MrsClient) DeleteJobExecution(request *model.DeleteJobExecutionRequest) (*model.DeleteJobExecutionResponse, error)
- func (c *MrsClient) ListAllTags(request *model.ListAllTagsRequest) (*model.ListAllTagsResponse, error)
- func (c *MrsClient) ListClusterTags(request *model.ListClusterTagsRequest) (*model.ListClusterTagsResponse, error)
- func (c *MrsClient) ListClusters(request *model.ListClustersRequest) (*model.ListClustersResponse, error)
- func (c *MrsClient) ListClustersByTags(request *model.ListClustersByTagsRequest) (*model.ListClustersByTagsResponse, error)
- func (c *MrsClient) ListExecuteJob(request *model.ListExecuteJobRequest) (*model.ListExecuteJobResponse, error)
- func (c *MrsClient) ListHosts(request *model.ListHostsRequest) (*model.ListHostsResponse, error)
- func (c *MrsClient) ShowClusterDetails(request *model.ShowClusterDetailsRequest) (*model.ShowClusterDetailsResponse, error)
- func (c *MrsClient) ShowJobExes(request *model.ShowJobExesRequest) (*model.ShowJobExesResponse, error)
- func (c *MrsClient) UpdateClusterScaling(request *model.UpdateClusterScalingRequest) (*model.UpdateClusterScalingResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenReqDefForBatchCreateClusterTags ¶
func GenReqDefForBatchCreateClusterTags() *def.HttpRequestDef
func GenReqDefForBatchDeleteClusterTags ¶
func GenReqDefForBatchDeleteClusterTags() *def.HttpRequestDef
func GenReqDefForCreateAndExecuteJob ¶ added in v0.0.73
func GenReqDefForCreateAndExecuteJob() *def.HttpRequestDef
func GenReqDefForCreateCluster ¶
func GenReqDefForCreateCluster() *def.HttpRequestDef
func GenReqDefForCreateClusterTag ¶
func GenReqDefForCreateClusterTag() *def.HttpRequestDef
func GenReqDefForCreateScalingPolicy ¶ added in v0.0.73
func GenReqDefForCreateScalingPolicy() *def.HttpRequestDef
func GenReqDefForDeleteCluster ¶
func GenReqDefForDeleteCluster() *def.HttpRequestDef
func GenReqDefForDeleteClusterTag ¶
func GenReqDefForDeleteClusterTag() *def.HttpRequestDef
func GenReqDefForDeleteJobExecution ¶ added in v0.0.73
func GenReqDefForDeleteJobExecution() *def.HttpRequestDef
func GenReqDefForListAllTags ¶
func GenReqDefForListAllTags() *def.HttpRequestDef
func GenReqDefForListClusterTags ¶
func GenReqDefForListClusterTags() *def.HttpRequestDef
func GenReqDefForListClusters ¶ added in v0.0.51
func GenReqDefForListClusters() *def.HttpRequestDef
func GenReqDefForListClustersByTags ¶
func GenReqDefForListClustersByTags() *def.HttpRequestDef
func GenReqDefForListExecuteJob ¶ added in v0.0.73
func GenReqDefForListExecuteJob() *def.HttpRequestDef
func GenReqDefForListHosts ¶ added in v0.0.73
func GenReqDefForListHosts() *def.HttpRequestDef
func GenReqDefForShowClusterDetails ¶ added in v0.0.73
func GenReqDefForShowClusterDetails() *def.HttpRequestDef
func GenReqDefForShowJobExes ¶ added in v0.0.73
func GenReqDefForShowJobExes() *def.HttpRequestDef
func GenReqDefForUpdateClusterScaling ¶ added in v0.0.73
func GenReqDefForUpdateClusterScaling() *def.HttpRequestDef
func MrsClientBuilder ¶
func MrsClientBuilder() *http_client.HcHttpClientBuilder
Types ¶
type MrsClient ¶
type MrsClient struct {
HcClient *http_client.HcHttpClient
}
func NewMrsClient ¶
func NewMrsClient(hcClient *http_client.HcHttpClient) *MrsClient
func (*MrsClient) BatchCreateClusterTags ¶
func (c *MrsClient) BatchCreateClusterTags(request *model.BatchCreateClusterTagsRequest) (*model.BatchCreateClusterTagsResponse, error)
为指定集群批量添加标签。 一个集群上最多有10个标签。 此接口为幂等接口: - 创建时,同一个集群不允许重复key,如果数据库存在就覆盖。
func (*MrsClient) BatchDeleteClusterTags ¶
func (c *MrsClient) BatchDeleteClusterTags(request *model.BatchDeleteClusterTagsRequest) (*model.BatchDeleteClusterTagsResponse, error)
为指定集群批量删除标签。 一个集群上最多有10个标签。 此接口为幂等接口: - 删除时,如果删除的标签不存在,默认处理成功,删除时不对标签字符集范围做校验。Key长度36个unicode字符,value为43个unicode字符。删除时tags结构体不能缺失,key不能为空,或者空字符串。
func (*MrsClient) CreateAndExecuteJob ¶ added in v0.0.73
func (c *MrsClient) CreateAndExecuteJob(request *model.CreateAndExecuteJobRequest) (*model.CreateAndExecuteJobResponse, error)
在MRS集群中新增一个作业,并执行作业。该接口不兼容Sahara。 集群ID可参考[查询集群列表](https://support.huaweicloud.com/api-mrs/ListClusters.html)接口获取。
func (*MrsClient) CreateCluster ¶
func (c *MrsClient) CreateCluster(request *model.CreateClusterRequest) (*model.CreateClusterResponse, error)
创建一个MRS集群,并在集群中提交一个作业。该接口不兼容Sahara。 支持同一时间并发创建10个集群。 使用接口前,您需要先获取下的资源信息。 - 通过VPC创建或查询VPC、子网 - 通过ECS创建或查询密钥对 - 通过[终端节点](https://support.huaweicloud.com/api-mrs/mrs_02_0003.html)获取区域信息 - 参考[MRS服务支持的组件](https://support.huaweicloud.com/api-mrs/mrs_02_9001.html)获取MRS版本及对应版本支持的组件信息
func (*MrsClient) CreateClusterTag ¶
func (c *MrsClient) CreateClusterTag(request *model.CreateClusterTagRequest) (*model.CreateClusterTagResponse, error)
为特定的集群添加一个tag。 一个集群上最多有10个标签,此接口为幂等接口。添加标签时,如果创建的标签已经存在(key相同),则覆盖。
func (*MrsClient) CreateScalingPolicy ¶ added in v0.0.73
func (c *MrsClient) CreateScalingPolicy(request *model.CreateScalingPolicyRequest) (*model.CreateScalingPolicyResponse, error)
对弹性伸缩规则进行编辑。 在创建集群并执行作业接口中也可以创建弹性伸缩规则。
func (*MrsClient) DeleteCluster ¶
func (c *MrsClient) DeleteCluster(request *model.DeleteClusterRequest) (*model.DeleteClusterResponse, error)
数据完成处理分析后或者集群运行异常无法提供服务时可删除集群服务。该接口兼容Sahara。 处于如下状态的集群不允许删除: - scaling-out:扩容中 - scaling-in:缩容中 - starting:启动中 - terminating:删除中 - terminated:已删除 - failed:失败
func (*MrsClient) DeleteClusterTag ¶
func (c *MrsClient) DeleteClusterTag(request *model.DeleteClusterTagRequest) (*model.DeleteClusterTagResponse, error)
删除特定集群的标签。
func (*MrsClient) DeleteJobExecution ¶ added in v0.0.73
func (c *MrsClient) DeleteJobExecution(request *model.DeleteJobExecutionRequest) (*model.DeleteJobExecutionResponse, error)
删除指定的作业执行对象。该接口兼容Sahara。
func (*MrsClient) ListAllTags ¶
func (c *MrsClient) ListAllTags(request *model.ListAllTagsRequest) (*model.ListAllTagsResponse, error)
查询租户在指定Region下的所有标签集合 。
func (*MrsClient) ListClusterTags ¶
func (c *MrsClient) ListClusterTags(request *model.ListClusterTagsRequest) (*model.ListClusterTagsResponse, error)
查询指定集群的标签信息。
func (*MrsClient) ListClusters ¶ added in v0.0.51
func (c *MrsClient) ListClusters(request *model.ListClustersRequest) (*model.ListClustersResponse, error)
查看用户创建的集群列表信息。该接口不兼容Sahara。
func (*MrsClient) ListClustersByTags ¶
func (c *MrsClient) ListClustersByTags(request *model.ListClustersByTagsRequest) (*model.ListClustersByTagsResponse, error)
使用标签过滤集群。 集群默认按照创建时间倒序,集群tag也按照创建时间倒序。
func (*MrsClient) ListExecuteJob ¶ added in v0.0.73
func (c *MrsClient) ListExecuteJob(request *model.ListExecuteJobRequest) (*model.ListExecuteJobResponse, error)
查询所有作业的exe对象列表。该接口不兼容Sahara。
func (*MrsClient) ListHosts ¶ added in v0.0.73
func (c *MrsClient) ListHosts(request *model.ListHostsRequest) (*model.ListHostsResponse, error)
该接口用于查询输入集群的主机列表详情。
func (*MrsClient) ShowClusterDetails ¶ added in v0.0.73
func (c *MrsClient) ShowClusterDetails(request *model.ShowClusterDetailsRequest) (*model.ShowClusterDetailsResponse, error)
查看指定集群的详细信息。该接口不兼容Sahara。
func (*MrsClient) ShowJobExes ¶ added in v0.0.73
func (c *MrsClient) ShowJobExes(request *model.ShowJobExesRequest) (*model.ShowJobExesResponse, error)
查询指定作业的exe对象详细信息。该接口不兼容Sahara。
func (*MrsClient) UpdateClusterScaling ¶ added in v0.0.73
func (c *MrsClient) UpdateClusterScaling(request *model.UpdateClusterScalingRequest) (*model.UpdateClusterScalingResponse, error)
创建集群后,扩容/缩容集群Core节点或者Task节点。MRS集群创建成功后不支持调整Master节点数量,即不支持扩缩容Master节点。该接口不兼容Sahara。 处于running状态的集群才允许扩容/缩容,其他状态则不允许扩容/缩容。 集群状态和集群ID可参考[查询集群列表](https://support.huaweicloud.com/api-mrs/ListClusters.html)接口获取。