-
Notifications
You must be signed in to change notification settings - Fork 17
/
studio.go
205 lines (171 loc) · 8.17 KB
/
studio.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
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package nimblestudio
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Represents a studio that contains other Nimble Studio resources
type Studio struct {
pulumi.CustomResourceState
// <p>The IAM role that Studio Admins will assume when logging in to the Nimble Studio portal.</p>
AdminRoleArn pulumi.StringOutput `pulumi:"adminRoleArn"`
// <p>A friendly name for the studio.</p>
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// <p>The Amazon Web Services Region where the studio resource is located.</p>
HomeRegion pulumi.StringOutput `pulumi:"homeRegion"`
// <p>The Amazon Web Services SSO application client ID used to integrate with Amazon Web Services SSO to enable Amazon Web Services SSO users to log in to Nimble Studio portal.</p>
SsoClientId pulumi.StringOutput `pulumi:"ssoClientId"`
StudioEncryptionConfiguration StudioEncryptionConfigurationPtrOutput `pulumi:"studioEncryptionConfiguration"`
StudioId pulumi.StringOutput `pulumi:"studioId"`
// <p>The studio name that is used in the URL of the Nimble Studio portal when accessed by Nimble Studio users.</p>
StudioName pulumi.StringOutput `pulumi:"studioName"`
// <p>The address of the web page for the studio.</p>
StudioUrl pulumi.StringOutput `pulumi:"studioUrl"`
Tags pulumi.StringMapOutput `pulumi:"tags"`
// <p>The IAM role that Studio Users will assume when logging in to the Nimble Studio portal.</p>
UserRoleArn pulumi.StringOutput `pulumi:"userRoleArn"`
}
// NewStudio registers a new resource with the given unique name, arguments, and options.
func NewStudio(ctx *pulumi.Context,
name string, args *StudioArgs, opts ...pulumi.ResourceOption) (*Studio, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AdminRoleArn == nil {
return nil, errors.New("invalid value for required argument 'AdminRoleArn'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.UserRoleArn == nil {
return nil, errors.New("invalid value for required argument 'UserRoleArn'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"studioName",
"tags.*",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Studio
err := ctx.RegisterResource("aws-native:nimblestudio:Studio", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStudio gets an existing Studio 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 GetStudio(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StudioState, opts ...pulumi.ResourceOption) (*Studio, error) {
var resource Studio
err := ctx.ReadResource("aws-native:nimblestudio:Studio", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Studio resources.
type studioState struct {
}
type StudioState struct {
}
func (StudioState) ElementType() reflect.Type {
return reflect.TypeOf((*studioState)(nil)).Elem()
}
type studioArgs struct {
// <p>The IAM role that Studio Admins will assume when logging in to the Nimble Studio portal.</p>
AdminRoleArn string `pulumi:"adminRoleArn"`
// <p>A friendly name for the studio.</p>
DisplayName string `pulumi:"displayName"`
StudioEncryptionConfiguration *StudioEncryptionConfiguration `pulumi:"studioEncryptionConfiguration"`
// <p>The studio name that is used in the URL of the Nimble Studio portal when accessed by Nimble Studio users.</p>
StudioName *string `pulumi:"studioName"`
Tags map[string]string `pulumi:"tags"`
// <p>The IAM role that Studio Users will assume when logging in to the Nimble Studio portal.</p>
UserRoleArn string `pulumi:"userRoleArn"`
}
// The set of arguments for constructing a Studio resource.
type StudioArgs struct {
// <p>The IAM role that Studio Admins will assume when logging in to the Nimble Studio portal.</p>
AdminRoleArn pulumi.StringInput
// <p>A friendly name for the studio.</p>
DisplayName pulumi.StringInput
StudioEncryptionConfiguration StudioEncryptionConfigurationPtrInput
// <p>The studio name that is used in the URL of the Nimble Studio portal when accessed by Nimble Studio users.</p>
StudioName pulumi.StringPtrInput
Tags pulumi.StringMapInput
// <p>The IAM role that Studio Users will assume when logging in to the Nimble Studio portal.</p>
UserRoleArn pulumi.StringInput
}
func (StudioArgs) ElementType() reflect.Type {
return reflect.TypeOf((*studioArgs)(nil)).Elem()
}
type StudioInput interface {
pulumi.Input
ToStudioOutput() StudioOutput
ToStudioOutputWithContext(ctx context.Context) StudioOutput
}
func (*Studio) ElementType() reflect.Type {
return reflect.TypeOf((**Studio)(nil)).Elem()
}
func (i *Studio) ToStudioOutput() StudioOutput {
return i.ToStudioOutputWithContext(context.Background())
}
func (i *Studio) ToStudioOutputWithContext(ctx context.Context) StudioOutput {
return pulumi.ToOutputWithContext(ctx, i).(StudioOutput)
}
type StudioOutput struct{ *pulumi.OutputState }
func (StudioOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Studio)(nil)).Elem()
}
func (o StudioOutput) ToStudioOutput() StudioOutput {
return o
}
func (o StudioOutput) ToStudioOutputWithContext(ctx context.Context) StudioOutput {
return o
}
// <p>The IAM role that Studio Admins will assume when logging in to the Nimble Studio portal.</p>
func (o StudioOutput) AdminRoleArn() pulumi.StringOutput {
return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.AdminRoleArn }).(pulumi.StringOutput)
}
// <p>A friendly name for the studio.</p>
func (o StudioOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// <p>The Amazon Web Services Region where the studio resource is located.</p>
func (o StudioOutput) HomeRegion() pulumi.StringOutput {
return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.HomeRegion }).(pulumi.StringOutput)
}
// <p>The Amazon Web Services SSO application client ID used to integrate with Amazon Web Services SSO to enable Amazon Web Services SSO users to log in to Nimble Studio portal.</p>
func (o StudioOutput) SsoClientId() pulumi.StringOutput {
return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.SsoClientId }).(pulumi.StringOutput)
}
func (o StudioOutput) StudioEncryptionConfiguration() StudioEncryptionConfigurationPtrOutput {
return o.ApplyT(func(v *Studio) StudioEncryptionConfigurationPtrOutput { return v.StudioEncryptionConfiguration }).(StudioEncryptionConfigurationPtrOutput)
}
func (o StudioOutput) StudioId() pulumi.StringOutput {
return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.StudioId }).(pulumi.StringOutput)
}
// <p>The studio name that is used in the URL of the Nimble Studio portal when accessed by Nimble Studio users.</p>
func (o StudioOutput) StudioName() pulumi.StringOutput {
return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.StudioName }).(pulumi.StringOutput)
}
// <p>The address of the web page for the studio.</p>
func (o StudioOutput) StudioUrl() pulumi.StringOutput {
return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.StudioUrl }).(pulumi.StringOutput)
}
func (o StudioOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Studio) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// <p>The IAM role that Studio Users will assume when logging in to the Nimble Studio portal.</p>
func (o StudioOutput) UserRoleArn() pulumi.StringOutput {
return o.ApplyT(func(v *Studio) pulumi.StringOutput { return v.UserRoleArn }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*StudioInput)(nil)).Elem(), &Studio{})
pulumi.RegisterOutputType(StudioOutput{})
}