This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
workspace.go
215 lines (202 loc) · 9.03 KB
/
workspace.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package latest
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Information about workspace.
type Workspace struct {
pulumi.CustomResourceState
// The workspace provider authorizations.
Authorizations WorkspaceProviderAuthorizationResponseArrayOutput `pulumi:"authorizations"`
// Indicates the Object ID, PUID and Application ID of entity that created the workspace.
CreatedBy CreatedByResponsePtrOutput `pulumi:"createdBy"`
// Specifies the date and time when the workspace is created.
CreatedDateTime pulumi.StringOutput `pulumi:"createdDateTime"`
// The geo-location where the resource lives
Location pulumi.StringOutput `pulumi:"location"`
// The managed resource group Id.
ManagedResourceGroupId pulumi.StringOutput `pulumi:"managedResourceGroupId"`
// The name of the resource
Name pulumi.StringOutput `pulumi:"name"`
// The workspace's custom parameters.
Parameters WorkspaceCustomParametersResponsePtrOutput `pulumi:"parameters"`
// The workspace provisioning state.
ProvisioningState pulumi.StringOutput `pulumi:"provisioningState"`
// The SKU of the resource.
Sku SkuResponsePtrOutput `pulumi:"sku"`
// The details of Managed Identity of Storage Account
StorageAccountIdentity ManagedIdentityConfigurationResponsePtrOutput `pulumi:"storageAccountIdentity"`
// Resource tags.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
Type pulumi.StringOutput `pulumi:"type"`
// The blob URI where the UI definition file is located.
UiDefinitionUri pulumi.StringPtrOutput `pulumi:"uiDefinitionUri"`
// Indicates the Object ID, PUID and Application ID of entity that last updated the workspace.
UpdatedBy CreatedByResponsePtrOutput `pulumi:"updatedBy"`
// The unique identifier of the databricks workspace in databricks control plane.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
// The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net'
WorkspaceUrl pulumi.StringOutput `pulumi:"workspaceUrl"`
}
// NewWorkspace registers a new resource with the given unique name, arguments, and options.
func NewWorkspace(ctx *pulumi.Context,
name string, args *WorkspaceArgs, opts ...pulumi.ResourceOption) (*Workspace, error) {
if args == nil || args.Location == nil {
return nil, errors.New("missing required argument 'Location'")
}
if args == nil || args.ManagedResourceGroupId == nil {
return nil, errors.New("missing required argument 'ManagedResourceGroupId'")
}
if args == nil || args.ResourceGroupName == nil {
return nil, errors.New("missing required argument 'ResourceGroupName'")
}
if args == nil || args.WorkspaceName == nil {
return nil, errors.New("missing required argument 'WorkspaceName'")
}
if args == nil {
args = &WorkspaceArgs{}
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:databricks/v20180401:Workspace"),
},
})
opts = append(opts, aliases)
var resource Workspace
err := ctx.RegisterResource("azure-nextgen:databricks/latest:Workspace", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspace gets an existing Workspace 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 GetWorkspace(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspaceState, opts ...pulumi.ResourceOption) (*Workspace, error) {
var resource Workspace
err := ctx.ReadResource("azure-nextgen:databricks/latest:Workspace", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Workspace resources.
type workspaceState struct {
// The workspace provider authorizations.
Authorizations []WorkspaceProviderAuthorizationResponse `pulumi:"authorizations"`
// Indicates the Object ID, PUID and Application ID of entity that created the workspace.
CreatedBy *CreatedByResponse `pulumi:"createdBy"`
// Specifies the date and time when the workspace is created.
CreatedDateTime *string `pulumi:"createdDateTime"`
// The geo-location where the resource lives
Location *string `pulumi:"location"`
// The managed resource group Id.
ManagedResourceGroupId *string `pulumi:"managedResourceGroupId"`
// The name of the resource
Name *string `pulumi:"name"`
// The workspace's custom parameters.
Parameters *WorkspaceCustomParametersResponse `pulumi:"parameters"`
// The workspace provisioning state.
ProvisioningState *string `pulumi:"provisioningState"`
// The SKU of the resource.
Sku *SkuResponse `pulumi:"sku"`
// The details of Managed Identity of Storage Account
StorageAccountIdentity *ManagedIdentityConfigurationResponse `pulumi:"storageAccountIdentity"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
Type *string `pulumi:"type"`
// The blob URI where the UI definition file is located.
UiDefinitionUri *string `pulumi:"uiDefinitionUri"`
// Indicates the Object ID, PUID and Application ID of entity that last updated the workspace.
UpdatedBy *CreatedByResponse `pulumi:"updatedBy"`
// The unique identifier of the databricks workspace in databricks control plane.
WorkspaceId *string `pulumi:"workspaceId"`
// The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net'
WorkspaceUrl *string `pulumi:"workspaceUrl"`
}
type WorkspaceState struct {
// The workspace provider authorizations.
Authorizations WorkspaceProviderAuthorizationResponseArrayInput
// Indicates the Object ID, PUID and Application ID of entity that created the workspace.
CreatedBy CreatedByResponsePtrInput
// Specifies the date and time when the workspace is created.
CreatedDateTime pulumi.StringPtrInput
// The geo-location where the resource lives
Location pulumi.StringPtrInput
// The managed resource group Id.
ManagedResourceGroupId pulumi.StringPtrInput
// The name of the resource
Name pulumi.StringPtrInput
// The workspace's custom parameters.
Parameters WorkspaceCustomParametersResponsePtrInput
// The workspace provisioning state.
ProvisioningState pulumi.StringPtrInput
// The SKU of the resource.
Sku SkuResponsePtrInput
// The details of Managed Identity of Storage Account
StorageAccountIdentity ManagedIdentityConfigurationResponsePtrInput
// Resource tags.
Tags pulumi.StringMapInput
// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
Type pulumi.StringPtrInput
// The blob URI where the UI definition file is located.
UiDefinitionUri pulumi.StringPtrInput
// Indicates the Object ID, PUID and Application ID of entity that last updated the workspace.
UpdatedBy CreatedByResponsePtrInput
// The unique identifier of the databricks workspace in databricks control plane.
WorkspaceId pulumi.StringPtrInput
// The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net'
WorkspaceUrl pulumi.StringPtrInput
}
func (WorkspaceState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceState)(nil)).Elem()
}
type workspaceArgs struct {
// The workspace provider authorizations.
Authorizations []WorkspaceProviderAuthorization `pulumi:"authorizations"`
// The geo-location where the resource lives
Location string `pulumi:"location"`
// The managed resource group Id.
ManagedResourceGroupId string `pulumi:"managedResourceGroupId"`
// The workspace's custom parameters.
Parameters *WorkspaceCustomParameters `pulumi:"parameters"`
// The name of the resource group. The name is case insensitive.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The SKU of the resource.
Sku *Sku `pulumi:"sku"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
// The blob URI where the UI definition file is located.
UiDefinitionUri *string `pulumi:"uiDefinitionUri"`
// The name of the workspace.
WorkspaceName string `pulumi:"workspaceName"`
}
// The set of arguments for constructing a Workspace resource.
type WorkspaceArgs struct {
// The workspace provider authorizations.
Authorizations WorkspaceProviderAuthorizationArrayInput
// The geo-location where the resource lives
Location pulumi.StringInput
// The managed resource group Id.
ManagedResourceGroupId pulumi.StringInput
// The workspace's custom parameters.
Parameters WorkspaceCustomParametersPtrInput
// The name of the resource group. The name is case insensitive.
ResourceGroupName pulumi.StringInput
// The SKU of the resource.
Sku SkuPtrInput
// Resource tags.
Tags pulumi.StringMapInput
// The blob URI where the UI definition file is located.
UiDefinitionUri pulumi.StringPtrInput
// The name of the workspace.
WorkspaceName pulumi.StringInput
}
func (WorkspaceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceArgs)(nil)).Elem()
}