/
deviceFleet.go
173 lines (144 loc) · 5.87 KB
/
deviceFleet.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
// 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 sagemaker
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource schema for AWS::SageMaker::DeviceFleet
type DeviceFleet struct {
pulumi.CustomResourceState
// Description for the edge device fleet
Description pulumi.StringPtrOutput `pulumi:"description"`
// The name of the edge device fleet
DeviceFleetName pulumi.StringOutput `pulumi:"deviceFleetName"`
// S3 bucket and an ecryption key id (if available) to store outputs for the fleet
OutputConfig DeviceFleetEdgeOutputConfigOutput `pulumi:"outputConfig"`
// Role associated with the device fleet
RoleArn pulumi.StringOutput `pulumi:"roleArn"`
// Associate tags with the resource
Tags aws.TagArrayOutput `pulumi:"tags"`
}
// NewDeviceFleet registers a new resource with the given unique name, arguments, and options.
func NewDeviceFleet(ctx *pulumi.Context,
name string, args *DeviceFleetArgs, opts ...pulumi.ResourceOption) (*DeviceFleet, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.OutputConfig == nil {
return nil, errors.New("invalid value for required argument 'OutputConfig'")
}
if args.RoleArn == nil {
return nil, errors.New("invalid value for required argument 'RoleArn'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"deviceFleetName",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource DeviceFleet
err := ctx.RegisterResource("aws-native:sagemaker:DeviceFleet", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDeviceFleet gets an existing DeviceFleet 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 GetDeviceFleet(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DeviceFleetState, opts ...pulumi.ResourceOption) (*DeviceFleet, error) {
var resource DeviceFleet
err := ctx.ReadResource("aws-native:sagemaker:DeviceFleet", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DeviceFleet resources.
type deviceFleetState struct {
}
type DeviceFleetState struct {
}
func (DeviceFleetState) ElementType() reflect.Type {
return reflect.TypeOf((*deviceFleetState)(nil)).Elem()
}
type deviceFleetArgs struct {
// Description for the edge device fleet
Description *string `pulumi:"description"`
// The name of the edge device fleet
DeviceFleetName *string `pulumi:"deviceFleetName"`
// S3 bucket and an ecryption key id (if available) to store outputs for the fleet
OutputConfig DeviceFleetEdgeOutputConfig `pulumi:"outputConfig"`
// Role associated with the device fleet
RoleArn string `pulumi:"roleArn"`
// Associate tags with the resource
Tags []aws.Tag `pulumi:"tags"`
}
// The set of arguments for constructing a DeviceFleet resource.
type DeviceFleetArgs struct {
// Description for the edge device fleet
Description pulumi.StringPtrInput
// The name of the edge device fleet
DeviceFleetName pulumi.StringPtrInput
// S3 bucket and an ecryption key id (if available) to store outputs for the fleet
OutputConfig DeviceFleetEdgeOutputConfigInput
// Role associated with the device fleet
RoleArn pulumi.StringInput
// Associate tags with the resource
Tags aws.TagArrayInput
}
func (DeviceFleetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*deviceFleetArgs)(nil)).Elem()
}
type DeviceFleetInput interface {
pulumi.Input
ToDeviceFleetOutput() DeviceFleetOutput
ToDeviceFleetOutputWithContext(ctx context.Context) DeviceFleetOutput
}
func (*DeviceFleet) ElementType() reflect.Type {
return reflect.TypeOf((**DeviceFleet)(nil)).Elem()
}
func (i *DeviceFleet) ToDeviceFleetOutput() DeviceFleetOutput {
return i.ToDeviceFleetOutputWithContext(context.Background())
}
func (i *DeviceFleet) ToDeviceFleetOutputWithContext(ctx context.Context) DeviceFleetOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeviceFleetOutput)
}
type DeviceFleetOutput struct{ *pulumi.OutputState }
func (DeviceFleetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DeviceFleet)(nil)).Elem()
}
func (o DeviceFleetOutput) ToDeviceFleetOutput() DeviceFleetOutput {
return o
}
func (o DeviceFleetOutput) ToDeviceFleetOutputWithContext(ctx context.Context) DeviceFleetOutput {
return o
}
// Description for the edge device fleet
func (o DeviceFleetOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DeviceFleet) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The name of the edge device fleet
func (o DeviceFleetOutput) DeviceFleetName() pulumi.StringOutput {
return o.ApplyT(func(v *DeviceFleet) pulumi.StringOutput { return v.DeviceFleetName }).(pulumi.StringOutput)
}
// S3 bucket and an ecryption key id (if available) to store outputs for the fleet
func (o DeviceFleetOutput) OutputConfig() DeviceFleetEdgeOutputConfigOutput {
return o.ApplyT(func(v *DeviceFleet) DeviceFleetEdgeOutputConfigOutput { return v.OutputConfig }).(DeviceFleetEdgeOutputConfigOutput)
}
// Role associated with the device fleet
func (o DeviceFleetOutput) RoleArn() pulumi.StringOutput {
return o.ApplyT(func(v *DeviceFleet) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput)
}
// Associate tags with the resource
func (o DeviceFleetOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *DeviceFleet) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DeviceFleetInput)(nil)).Elem(), &DeviceFleet{})
pulumi.RegisterOutputType(DeviceFleetOutput{})
}