/
licenseEndpoint.go
168 lines (136 loc) · 5.91 KB
/
licenseEndpoint.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
// 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 deadline
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Definition of AWS::Deadline::LicenseEndpoint Resource Type
type LicenseEndpoint struct {
pulumi.CustomResourceState
Arn pulumi.StringOutput `pulumi:"arn"`
DnsName pulumi.StringOutput `pulumi:"dnsName"`
LicenseEndpointId pulumi.StringOutput `pulumi:"licenseEndpointId"`
SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
Status LicenseEndpointStatusOutput `pulumi:"status"`
StatusMessage pulumi.StringOutput `pulumi:"statusMessage"`
SubnetIds pulumi.StringArrayOutput `pulumi:"subnetIds"`
VpcId pulumi.StringOutput `pulumi:"vpcId"`
}
// NewLicenseEndpoint registers a new resource with the given unique name, arguments, and options.
func NewLicenseEndpoint(ctx *pulumi.Context,
name string, args *LicenseEndpointArgs, opts ...pulumi.ResourceOption) (*LicenseEndpoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SecurityGroupIds == nil {
return nil, errors.New("invalid value for required argument 'SecurityGroupIds'")
}
if args.SubnetIds == nil {
return nil, errors.New("invalid value for required argument 'SubnetIds'")
}
if args.VpcId == nil {
return nil, errors.New("invalid value for required argument 'VpcId'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"securityGroupIds[*]",
"subnetIds[*]",
"vpcId",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource LicenseEndpoint
err := ctx.RegisterResource("aws-native:deadline:LicenseEndpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLicenseEndpoint gets an existing LicenseEndpoint 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 GetLicenseEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LicenseEndpointState, opts ...pulumi.ResourceOption) (*LicenseEndpoint, error) {
var resource LicenseEndpoint
err := ctx.ReadResource("aws-native:deadline:LicenseEndpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LicenseEndpoint resources.
type licenseEndpointState struct {
}
type LicenseEndpointState struct {
}
func (LicenseEndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*licenseEndpointState)(nil)).Elem()
}
type licenseEndpointArgs struct {
SecurityGroupIds []string `pulumi:"securityGroupIds"`
SubnetIds []string `pulumi:"subnetIds"`
VpcId string `pulumi:"vpcId"`
}
// The set of arguments for constructing a LicenseEndpoint resource.
type LicenseEndpointArgs struct {
SecurityGroupIds pulumi.StringArrayInput
SubnetIds pulumi.StringArrayInput
VpcId pulumi.StringInput
}
func (LicenseEndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*licenseEndpointArgs)(nil)).Elem()
}
type LicenseEndpointInput interface {
pulumi.Input
ToLicenseEndpointOutput() LicenseEndpointOutput
ToLicenseEndpointOutputWithContext(ctx context.Context) LicenseEndpointOutput
}
func (*LicenseEndpoint) ElementType() reflect.Type {
return reflect.TypeOf((**LicenseEndpoint)(nil)).Elem()
}
func (i *LicenseEndpoint) ToLicenseEndpointOutput() LicenseEndpointOutput {
return i.ToLicenseEndpointOutputWithContext(context.Background())
}
func (i *LicenseEndpoint) ToLicenseEndpointOutputWithContext(ctx context.Context) LicenseEndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(LicenseEndpointOutput)
}
type LicenseEndpointOutput struct{ *pulumi.OutputState }
func (LicenseEndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LicenseEndpoint)(nil)).Elem()
}
func (o LicenseEndpointOutput) ToLicenseEndpointOutput() LicenseEndpointOutput {
return o
}
func (o LicenseEndpointOutput) ToLicenseEndpointOutputWithContext(ctx context.Context) LicenseEndpointOutput {
return o
}
func (o LicenseEndpointOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *LicenseEndpoint) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
func (o LicenseEndpointOutput) DnsName() pulumi.StringOutput {
return o.ApplyT(func(v *LicenseEndpoint) pulumi.StringOutput { return v.DnsName }).(pulumi.StringOutput)
}
func (o LicenseEndpointOutput) LicenseEndpointId() pulumi.StringOutput {
return o.ApplyT(func(v *LicenseEndpoint) pulumi.StringOutput { return v.LicenseEndpointId }).(pulumi.StringOutput)
}
func (o LicenseEndpointOutput) SecurityGroupIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LicenseEndpoint) pulumi.StringArrayOutput { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
}
func (o LicenseEndpointOutput) Status() LicenseEndpointStatusOutput {
return o.ApplyT(func(v *LicenseEndpoint) LicenseEndpointStatusOutput { return v.Status }).(LicenseEndpointStatusOutput)
}
func (o LicenseEndpointOutput) StatusMessage() pulumi.StringOutput {
return o.ApplyT(func(v *LicenseEndpoint) pulumi.StringOutput { return v.StatusMessage }).(pulumi.StringOutput)
}
func (o LicenseEndpointOutput) SubnetIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LicenseEndpoint) pulumi.StringArrayOutput { return v.SubnetIds }).(pulumi.StringArrayOutput)
}
func (o LicenseEndpointOutput) VpcId() pulumi.StringOutput {
return o.ApplyT(func(v *LicenseEndpoint) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LicenseEndpointInput)(nil)).Elem(), &LicenseEndpoint{})
pulumi.RegisterOutputType(LicenseEndpointOutput{})
}