/
getCluster.go
83 lines (78 loc) · 2.94 KB
/
getCluster.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package hdinsight
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Use this data source to access information about an existing HDInsight Cluster.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/hdinsight"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := hdinsight.GetCluster(ctx, &hdinsight.GetClusterArgs{
// Name: "example",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("httpsEndpoint", example.HttpsEndpoint)
// return nil
// })
// }
// ```
func GetCluster(ctx *pulumi.Context, args *GetClusterArgs, opts ...pulumi.InvokeOption) (*GetClusterResult, error) {
var rv GetClusterResult
err := ctx.Invoke("azure:hdinsight/getCluster:getCluster", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCluster.
type GetClusterArgs struct {
// Specifies the name of this HDInsight Cluster.
Name string `pulumi:"name"`
// Specifies the name of the Resource Group in which this HDInsight Cluster exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getCluster.
type GetClusterResult struct {
// The version of HDInsights which is used on this HDInsight Cluster.
ClusterVersion string `pulumi:"clusterVersion"`
// A map of versions of software used on this HDInsights Cluster.
ComponentVersions map[string]string `pulumi:"componentVersions"`
// The SSH Endpoint of the Edge Node for this HDInsight Cluster, if an Edge Node exists.
EdgeSshEndpoint string `pulumi:"edgeSshEndpoint"`
// A `gateway` block as defined below.
Gateways []GetClusterGateway `pulumi:"gateways"`
// The HTTPS Endpoint for this HDInsight Cluster.
HttpsEndpoint string `pulumi:"httpsEndpoint"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Kafka Rest Proxy Endpoint for this HDInsight Cluster.
KafkaRestProxyEndpoint string `pulumi:"kafkaRestProxyEndpoint"`
// The kind of HDInsight Cluster this is, such as a Spark or Storm cluster.
Kind string `pulumi:"kind"`
// The Azure Region in which this HDInsight Cluster exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The SSH Endpoint for this HDInsight Cluster.
SshEndpoint string `pulumi:"sshEndpoint"`
// A map of tags assigned to the HDInsight Cluster.
Tags map[string]string `pulumi:"tags"`
// The SKU / Tier of this HDInsight Cluster.
Tier string `pulumi:"tier"`
// The minimal supported tls version.
TlsMinVersion string `pulumi:"tlsMinVersion"`
}