-
Notifications
You must be signed in to change notification settings - Fork 17
/
inferenceComponent.go
194 lines (158 loc) · 8.21 KB
/
inferenceComponent.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
// 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 Type definition for AWS::SageMaker::InferenceComponent
type InferenceComponent struct {
pulumi.CustomResourceState
CreationTime pulumi.StringOutput `pulumi:"creationTime"`
EndpointArn pulumi.StringPtrOutput `pulumi:"endpointArn"`
EndpointName pulumi.StringOutput `pulumi:"endpointName"`
FailureReason pulumi.StringOutput `pulumi:"failureReason"`
InferenceComponentArn pulumi.StringOutput `pulumi:"inferenceComponentArn"`
InferenceComponentName pulumi.StringPtrOutput `pulumi:"inferenceComponentName"`
InferenceComponentStatus InferenceComponentStatusOutput `pulumi:"inferenceComponentStatus"`
LastModifiedTime pulumi.StringOutput `pulumi:"lastModifiedTime"`
RuntimeConfig InferenceComponentRuntimeConfigOutput `pulumi:"runtimeConfig"`
Specification InferenceComponentSpecificationOutput `pulumi:"specification"`
Tags aws.TagArrayOutput `pulumi:"tags"`
VariantName pulumi.StringOutput `pulumi:"variantName"`
}
// NewInferenceComponent registers a new resource with the given unique name, arguments, and options.
func NewInferenceComponent(ctx *pulumi.Context,
name string, args *InferenceComponentArgs, opts ...pulumi.ResourceOption) (*InferenceComponent, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EndpointName == nil {
return nil, errors.New("invalid value for required argument 'EndpointName'")
}
if args.RuntimeConfig == nil {
return nil, errors.New("invalid value for required argument 'RuntimeConfig'")
}
if args.Specification == nil {
return nil, errors.New("invalid value for required argument 'Specification'")
}
if args.VariantName == nil {
return nil, errors.New("invalid value for required argument 'VariantName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource InferenceComponent
err := ctx.RegisterResource("aws-native:sagemaker:InferenceComponent", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInferenceComponent gets an existing InferenceComponent 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 GetInferenceComponent(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InferenceComponentState, opts ...pulumi.ResourceOption) (*InferenceComponent, error) {
var resource InferenceComponent
err := ctx.ReadResource("aws-native:sagemaker:InferenceComponent", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering InferenceComponent resources.
type inferenceComponentState struct {
}
type InferenceComponentState struct {
}
func (InferenceComponentState) ElementType() reflect.Type {
return reflect.TypeOf((*inferenceComponentState)(nil)).Elem()
}
type inferenceComponentArgs struct {
EndpointArn *string `pulumi:"endpointArn"`
EndpointName string `pulumi:"endpointName"`
InferenceComponentName *string `pulumi:"inferenceComponentName"`
RuntimeConfig InferenceComponentRuntimeConfig `pulumi:"runtimeConfig"`
Specification InferenceComponentSpecification `pulumi:"specification"`
Tags []aws.Tag `pulumi:"tags"`
VariantName string `pulumi:"variantName"`
}
// The set of arguments for constructing a InferenceComponent resource.
type InferenceComponentArgs struct {
EndpointArn pulumi.StringPtrInput
EndpointName pulumi.StringInput
InferenceComponentName pulumi.StringPtrInput
RuntimeConfig InferenceComponentRuntimeConfigInput
Specification InferenceComponentSpecificationInput
Tags aws.TagArrayInput
VariantName pulumi.StringInput
}
func (InferenceComponentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*inferenceComponentArgs)(nil)).Elem()
}
type InferenceComponentInput interface {
pulumi.Input
ToInferenceComponentOutput() InferenceComponentOutput
ToInferenceComponentOutputWithContext(ctx context.Context) InferenceComponentOutput
}
func (*InferenceComponent) ElementType() reflect.Type {
return reflect.TypeOf((**InferenceComponent)(nil)).Elem()
}
func (i *InferenceComponent) ToInferenceComponentOutput() InferenceComponentOutput {
return i.ToInferenceComponentOutputWithContext(context.Background())
}
func (i *InferenceComponent) ToInferenceComponentOutputWithContext(ctx context.Context) InferenceComponentOutput {
return pulumi.ToOutputWithContext(ctx, i).(InferenceComponentOutput)
}
type InferenceComponentOutput struct{ *pulumi.OutputState }
func (InferenceComponentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**InferenceComponent)(nil)).Elem()
}
func (o InferenceComponentOutput) ToInferenceComponentOutput() InferenceComponentOutput {
return o
}
func (o InferenceComponentOutput) ToInferenceComponentOutputWithContext(ctx context.Context) InferenceComponentOutput {
return o
}
func (o InferenceComponentOutput) CreationTime() pulumi.StringOutput {
return o.ApplyT(func(v *InferenceComponent) pulumi.StringOutput { return v.CreationTime }).(pulumi.StringOutput)
}
func (o InferenceComponentOutput) EndpointArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InferenceComponent) pulumi.StringPtrOutput { return v.EndpointArn }).(pulumi.StringPtrOutput)
}
func (o InferenceComponentOutput) EndpointName() pulumi.StringOutput {
return o.ApplyT(func(v *InferenceComponent) pulumi.StringOutput { return v.EndpointName }).(pulumi.StringOutput)
}
func (o InferenceComponentOutput) FailureReason() pulumi.StringOutput {
return o.ApplyT(func(v *InferenceComponent) pulumi.StringOutput { return v.FailureReason }).(pulumi.StringOutput)
}
func (o InferenceComponentOutput) InferenceComponentArn() pulumi.StringOutput {
return o.ApplyT(func(v *InferenceComponent) pulumi.StringOutput { return v.InferenceComponentArn }).(pulumi.StringOutput)
}
func (o InferenceComponentOutput) InferenceComponentName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InferenceComponent) pulumi.StringPtrOutput { return v.InferenceComponentName }).(pulumi.StringPtrOutput)
}
func (o InferenceComponentOutput) InferenceComponentStatus() InferenceComponentStatusOutput {
return o.ApplyT(func(v *InferenceComponent) InferenceComponentStatusOutput { return v.InferenceComponentStatus }).(InferenceComponentStatusOutput)
}
func (o InferenceComponentOutput) LastModifiedTime() pulumi.StringOutput {
return o.ApplyT(func(v *InferenceComponent) pulumi.StringOutput { return v.LastModifiedTime }).(pulumi.StringOutput)
}
func (o InferenceComponentOutput) RuntimeConfig() InferenceComponentRuntimeConfigOutput {
return o.ApplyT(func(v *InferenceComponent) InferenceComponentRuntimeConfigOutput { return v.RuntimeConfig }).(InferenceComponentRuntimeConfigOutput)
}
func (o InferenceComponentOutput) Specification() InferenceComponentSpecificationOutput {
return o.ApplyT(func(v *InferenceComponent) InferenceComponentSpecificationOutput { return v.Specification }).(InferenceComponentSpecificationOutput)
}
func (o InferenceComponentOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *InferenceComponent) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
func (o InferenceComponentOutput) VariantName() pulumi.StringOutput {
return o.ApplyT(func(v *InferenceComponent) pulumi.StringOutput { return v.VariantName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InferenceComponentInput)(nil)).Elem(), &InferenceComponent{})
pulumi.RegisterOutputType(InferenceComponentOutput{})
}