-
Notifications
You must be signed in to change notification settings - Fork 51
/
clusterCustomerManagedKey.go
117 lines (104 loc) · 4.53 KB
/
clusterCustomerManagedKey.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// *** 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 kusto
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Manages a Customer Managed Key for a Kusto Cluster.
type ClusterCustomerManagedKey struct {
pulumi.CustomResourceState
// The ID of the Kusto Cluster. Changing this forces a new resource to be created.
ClusterId pulumi.StringOutput `pulumi:"clusterId"`
// The name of Key Vault Key.
KeyName pulumi.StringOutput `pulumi:"keyName"`
// The ID of the Key Vault. Changing this forces a new resource to be created.
KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"`
// The version of Key Vault Key.
KeyVersion pulumi.StringOutput `pulumi:"keyVersion"`
}
// NewClusterCustomerManagedKey registers a new resource with the given unique name, arguments, and options.
func NewClusterCustomerManagedKey(ctx *pulumi.Context,
name string, args *ClusterCustomerManagedKeyArgs, opts ...pulumi.ResourceOption) (*ClusterCustomerManagedKey, error) {
if args == nil || args.ClusterId == nil {
return nil, errors.New("missing required argument 'ClusterId'")
}
if args == nil || args.KeyName == nil {
return nil, errors.New("missing required argument 'KeyName'")
}
if args == nil || args.KeyVaultId == nil {
return nil, errors.New("missing required argument 'KeyVaultId'")
}
if args == nil || args.KeyVersion == nil {
return nil, errors.New("missing required argument 'KeyVersion'")
}
if args == nil {
args = &ClusterCustomerManagedKeyArgs{}
}
var resource ClusterCustomerManagedKey
err := ctx.RegisterResource("azure:kusto/clusterCustomerManagedKey:ClusterCustomerManagedKey", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetClusterCustomerManagedKey gets an existing ClusterCustomerManagedKey resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetClusterCustomerManagedKey(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ClusterCustomerManagedKeyState, opts ...pulumi.ResourceOption) (*ClusterCustomerManagedKey, error) {
var resource ClusterCustomerManagedKey
err := ctx.ReadResource("azure:kusto/clusterCustomerManagedKey:ClusterCustomerManagedKey", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ClusterCustomerManagedKey resources.
type clusterCustomerManagedKeyState struct {
// The ID of the Kusto Cluster. Changing this forces a new resource to be created.
ClusterId *string `pulumi:"clusterId"`
// The name of Key Vault Key.
KeyName *string `pulumi:"keyName"`
// The ID of the Key Vault. Changing this forces a new resource to be created.
KeyVaultId *string `pulumi:"keyVaultId"`
// The version of Key Vault Key.
KeyVersion *string `pulumi:"keyVersion"`
}
type ClusterCustomerManagedKeyState struct {
// The ID of the Kusto Cluster. Changing this forces a new resource to be created.
ClusterId pulumi.StringPtrInput
// The name of Key Vault Key.
KeyName pulumi.StringPtrInput
// The ID of the Key Vault. Changing this forces a new resource to be created.
KeyVaultId pulumi.StringPtrInput
// The version of Key Vault Key.
KeyVersion pulumi.StringPtrInput
}
func (ClusterCustomerManagedKeyState) ElementType() reflect.Type {
return reflect.TypeOf((*clusterCustomerManagedKeyState)(nil)).Elem()
}
type clusterCustomerManagedKeyArgs struct {
// The ID of the Kusto Cluster. Changing this forces a new resource to be created.
ClusterId string `pulumi:"clusterId"`
// The name of Key Vault Key.
KeyName string `pulumi:"keyName"`
// The ID of the Key Vault. Changing this forces a new resource to be created.
KeyVaultId string `pulumi:"keyVaultId"`
// The version of Key Vault Key.
KeyVersion string `pulumi:"keyVersion"`
}
// The set of arguments for constructing a ClusterCustomerManagedKey resource.
type ClusterCustomerManagedKeyArgs struct {
// The ID of the Kusto Cluster. Changing this forces a new resource to be created.
ClusterId pulumi.StringInput
// The name of Key Vault Key.
KeyName pulumi.StringInput
// The ID of the Key Vault. Changing this forces a new resource to be created.
KeyVaultId pulumi.StringInput
// The version of Key Vault Key.
KeyVersion pulumi.StringInput
}
func (ClusterCustomerManagedKeyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*clusterCustomerManagedKeyArgs)(nil)).Elem()
}