github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/sagemaker/deviceFleet.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package sagemaker 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a SageMaker Device Fleet resource. 16 // 17 // ## Example Usage 18 // 19 // ### Basic usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "fmt" 28 // 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sagemaker" 30 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 31 // 32 // ) 33 // 34 // func main() { 35 // pulumi.Run(func(ctx *pulumi.Context) error { 36 // _, err := sagemaker.NewDeviceFleet(ctx, "example", &sagemaker.DeviceFleetArgs{ 37 // DeviceFleetName: pulumi.String("example"), 38 // RoleArn: pulumi.Any(test.Arn), 39 // OutputConfig: &sagemaker.DeviceFleetOutputConfigArgs{ 40 // S3OutputLocation: pulumi.String(fmt.Sprintf("s3://%v/prefix/", exampleAwsS3Bucket.Bucket)), 41 // }, 42 // }) 43 // if err != nil { 44 // return err 45 // } 46 // return nil 47 // }) 48 // } 49 // 50 // ``` 51 // <!--End PulumiCodeChooser --> 52 // 53 // ## Import 54 // 55 // Using `pulumi import`, import SageMaker Device Fleets using the `name`. For example: 56 // 57 // ```sh 58 // $ pulumi import aws:sagemaker/deviceFleet:DeviceFleet example my-fleet 59 // ``` 60 type DeviceFleet struct { 61 pulumi.CustomResourceState 62 63 // The Amazon Resource Name (ARN) assigned by AWS to this Device Fleet. 64 Arn pulumi.StringOutput `pulumi:"arn"` 65 // A description of the fleet. 66 Description pulumi.StringPtrOutput `pulumi:"description"` 67 // The name of the Device Fleet (must be unique). 68 DeviceFleetName pulumi.StringOutput `pulumi:"deviceFleetName"` 69 // Whether to create an AWS IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName}". 70 EnableIotRoleAlias pulumi.BoolPtrOutput `pulumi:"enableIotRoleAlias"` 71 IotRoleAlias pulumi.StringOutput `pulumi:"iotRoleAlias"` 72 // Specifies details about the repository. see Output Config details below. 73 OutputConfig DeviceFleetOutputConfigOutput `pulumi:"outputConfig"` 74 // The Amazon Resource Name (ARN) that has access to AWS Internet of Things (IoT). 75 RoleArn pulumi.StringOutput `pulumi:"roleArn"` 76 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 77 Tags pulumi.StringMapOutput `pulumi:"tags"` 78 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 79 // 80 // Deprecated: Please use `tags` instead. 81 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 82 } 83 84 // NewDeviceFleet registers a new resource with the given unique name, arguments, and options. 85 func NewDeviceFleet(ctx *pulumi.Context, 86 name string, args *DeviceFleetArgs, opts ...pulumi.ResourceOption) (*DeviceFleet, error) { 87 if args == nil { 88 return nil, errors.New("missing one or more required arguments") 89 } 90 91 if args.DeviceFleetName == nil { 92 return nil, errors.New("invalid value for required argument 'DeviceFleetName'") 93 } 94 if args.OutputConfig == nil { 95 return nil, errors.New("invalid value for required argument 'OutputConfig'") 96 } 97 if args.RoleArn == nil { 98 return nil, errors.New("invalid value for required argument 'RoleArn'") 99 } 100 opts = internal.PkgResourceDefaultOpts(opts) 101 var resource DeviceFleet 102 err := ctx.RegisterResource("aws:sagemaker/deviceFleet:DeviceFleet", name, args, &resource, opts...) 103 if err != nil { 104 return nil, err 105 } 106 return &resource, nil 107 } 108 109 // GetDeviceFleet gets an existing DeviceFleet resource's state with the given name, ID, and optional 110 // state properties that are used to uniquely qualify the lookup (nil if not required). 111 func GetDeviceFleet(ctx *pulumi.Context, 112 name string, id pulumi.IDInput, state *DeviceFleetState, opts ...pulumi.ResourceOption) (*DeviceFleet, error) { 113 var resource DeviceFleet 114 err := ctx.ReadResource("aws:sagemaker/deviceFleet:DeviceFleet", name, id, state, &resource, opts...) 115 if err != nil { 116 return nil, err 117 } 118 return &resource, nil 119 } 120 121 // Input properties used for looking up and filtering DeviceFleet resources. 122 type deviceFleetState struct { 123 // The Amazon Resource Name (ARN) assigned by AWS to this Device Fleet. 124 Arn *string `pulumi:"arn"` 125 // A description of the fleet. 126 Description *string `pulumi:"description"` 127 // The name of the Device Fleet (must be unique). 128 DeviceFleetName *string `pulumi:"deviceFleetName"` 129 // Whether to create an AWS IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName}". 130 EnableIotRoleAlias *bool `pulumi:"enableIotRoleAlias"` 131 IotRoleAlias *string `pulumi:"iotRoleAlias"` 132 // Specifies details about the repository. see Output Config details below. 133 OutputConfig *DeviceFleetOutputConfig `pulumi:"outputConfig"` 134 // The Amazon Resource Name (ARN) that has access to AWS Internet of Things (IoT). 135 RoleArn *string `pulumi:"roleArn"` 136 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 137 Tags map[string]string `pulumi:"tags"` 138 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 139 // 140 // Deprecated: Please use `tags` instead. 141 TagsAll map[string]string `pulumi:"tagsAll"` 142 } 143 144 type DeviceFleetState struct { 145 // The Amazon Resource Name (ARN) assigned by AWS to this Device Fleet. 146 Arn pulumi.StringPtrInput 147 // A description of the fleet. 148 Description pulumi.StringPtrInput 149 // The name of the Device Fleet (must be unique). 150 DeviceFleetName pulumi.StringPtrInput 151 // Whether to create an AWS IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName}". 152 EnableIotRoleAlias pulumi.BoolPtrInput 153 IotRoleAlias pulumi.StringPtrInput 154 // Specifies details about the repository. see Output Config details below. 155 OutputConfig DeviceFleetOutputConfigPtrInput 156 // The Amazon Resource Name (ARN) that has access to AWS Internet of Things (IoT). 157 RoleArn pulumi.StringPtrInput 158 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 159 Tags pulumi.StringMapInput 160 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 161 // 162 // Deprecated: Please use `tags` instead. 163 TagsAll pulumi.StringMapInput 164 } 165 166 func (DeviceFleetState) ElementType() reflect.Type { 167 return reflect.TypeOf((*deviceFleetState)(nil)).Elem() 168 } 169 170 type deviceFleetArgs struct { 171 // A description of the fleet. 172 Description *string `pulumi:"description"` 173 // The name of the Device Fleet (must be unique). 174 DeviceFleetName string `pulumi:"deviceFleetName"` 175 // Whether to create an AWS IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName}". 176 EnableIotRoleAlias *bool `pulumi:"enableIotRoleAlias"` 177 // Specifies details about the repository. see Output Config details below. 178 OutputConfig DeviceFleetOutputConfig `pulumi:"outputConfig"` 179 // The Amazon Resource Name (ARN) that has access to AWS Internet of Things (IoT). 180 RoleArn string `pulumi:"roleArn"` 181 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 182 Tags map[string]string `pulumi:"tags"` 183 } 184 185 // The set of arguments for constructing a DeviceFleet resource. 186 type DeviceFleetArgs struct { 187 // A description of the fleet. 188 Description pulumi.StringPtrInput 189 // The name of the Device Fleet (must be unique). 190 DeviceFleetName pulumi.StringInput 191 // Whether to create an AWS IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName}". 192 EnableIotRoleAlias pulumi.BoolPtrInput 193 // Specifies details about the repository. see Output Config details below. 194 OutputConfig DeviceFleetOutputConfigInput 195 // The Amazon Resource Name (ARN) that has access to AWS Internet of Things (IoT). 196 RoleArn pulumi.StringInput 197 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 198 Tags pulumi.StringMapInput 199 } 200 201 func (DeviceFleetArgs) ElementType() reflect.Type { 202 return reflect.TypeOf((*deviceFleetArgs)(nil)).Elem() 203 } 204 205 type DeviceFleetInput interface { 206 pulumi.Input 207 208 ToDeviceFleetOutput() DeviceFleetOutput 209 ToDeviceFleetOutputWithContext(ctx context.Context) DeviceFleetOutput 210 } 211 212 func (*DeviceFleet) ElementType() reflect.Type { 213 return reflect.TypeOf((**DeviceFleet)(nil)).Elem() 214 } 215 216 func (i *DeviceFleet) ToDeviceFleetOutput() DeviceFleetOutput { 217 return i.ToDeviceFleetOutputWithContext(context.Background()) 218 } 219 220 func (i *DeviceFleet) ToDeviceFleetOutputWithContext(ctx context.Context) DeviceFleetOutput { 221 return pulumi.ToOutputWithContext(ctx, i).(DeviceFleetOutput) 222 } 223 224 // DeviceFleetArrayInput is an input type that accepts DeviceFleetArray and DeviceFleetArrayOutput values. 225 // You can construct a concrete instance of `DeviceFleetArrayInput` via: 226 // 227 // DeviceFleetArray{ DeviceFleetArgs{...} } 228 type DeviceFleetArrayInput interface { 229 pulumi.Input 230 231 ToDeviceFleetArrayOutput() DeviceFleetArrayOutput 232 ToDeviceFleetArrayOutputWithContext(context.Context) DeviceFleetArrayOutput 233 } 234 235 type DeviceFleetArray []DeviceFleetInput 236 237 func (DeviceFleetArray) ElementType() reflect.Type { 238 return reflect.TypeOf((*[]*DeviceFleet)(nil)).Elem() 239 } 240 241 func (i DeviceFleetArray) ToDeviceFleetArrayOutput() DeviceFleetArrayOutput { 242 return i.ToDeviceFleetArrayOutputWithContext(context.Background()) 243 } 244 245 func (i DeviceFleetArray) ToDeviceFleetArrayOutputWithContext(ctx context.Context) DeviceFleetArrayOutput { 246 return pulumi.ToOutputWithContext(ctx, i).(DeviceFleetArrayOutput) 247 } 248 249 // DeviceFleetMapInput is an input type that accepts DeviceFleetMap and DeviceFleetMapOutput values. 250 // You can construct a concrete instance of `DeviceFleetMapInput` via: 251 // 252 // DeviceFleetMap{ "key": DeviceFleetArgs{...} } 253 type DeviceFleetMapInput interface { 254 pulumi.Input 255 256 ToDeviceFleetMapOutput() DeviceFleetMapOutput 257 ToDeviceFleetMapOutputWithContext(context.Context) DeviceFleetMapOutput 258 } 259 260 type DeviceFleetMap map[string]DeviceFleetInput 261 262 func (DeviceFleetMap) ElementType() reflect.Type { 263 return reflect.TypeOf((*map[string]*DeviceFleet)(nil)).Elem() 264 } 265 266 func (i DeviceFleetMap) ToDeviceFleetMapOutput() DeviceFleetMapOutput { 267 return i.ToDeviceFleetMapOutputWithContext(context.Background()) 268 } 269 270 func (i DeviceFleetMap) ToDeviceFleetMapOutputWithContext(ctx context.Context) DeviceFleetMapOutput { 271 return pulumi.ToOutputWithContext(ctx, i).(DeviceFleetMapOutput) 272 } 273 274 type DeviceFleetOutput struct{ *pulumi.OutputState } 275 276 func (DeviceFleetOutput) ElementType() reflect.Type { 277 return reflect.TypeOf((**DeviceFleet)(nil)).Elem() 278 } 279 280 func (o DeviceFleetOutput) ToDeviceFleetOutput() DeviceFleetOutput { 281 return o 282 } 283 284 func (o DeviceFleetOutput) ToDeviceFleetOutputWithContext(ctx context.Context) DeviceFleetOutput { 285 return o 286 } 287 288 // The Amazon Resource Name (ARN) assigned by AWS to this Device Fleet. 289 func (o DeviceFleetOutput) Arn() pulumi.StringOutput { 290 return o.ApplyT(func(v *DeviceFleet) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 291 } 292 293 // A description of the fleet. 294 func (o DeviceFleetOutput) Description() pulumi.StringPtrOutput { 295 return o.ApplyT(func(v *DeviceFleet) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 296 } 297 298 // The name of the Device Fleet (must be unique). 299 func (o DeviceFleetOutput) DeviceFleetName() pulumi.StringOutput { 300 return o.ApplyT(func(v *DeviceFleet) pulumi.StringOutput { return v.DeviceFleetName }).(pulumi.StringOutput) 301 } 302 303 // Whether to create an AWS IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName}". 304 func (o DeviceFleetOutput) EnableIotRoleAlias() pulumi.BoolPtrOutput { 305 return o.ApplyT(func(v *DeviceFleet) pulumi.BoolPtrOutput { return v.EnableIotRoleAlias }).(pulumi.BoolPtrOutput) 306 } 307 308 func (o DeviceFleetOutput) IotRoleAlias() pulumi.StringOutput { 309 return o.ApplyT(func(v *DeviceFleet) pulumi.StringOutput { return v.IotRoleAlias }).(pulumi.StringOutput) 310 } 311 312 // Specifies details about the repository. see Output Config details below. 313 func (o DeviceFleetOutput) OutputConfig() DeviceFleetOutputConfigOutput { 314 return o.ApplyT(func(v *DeviceFleet) DeviceFleetOutputConfigOutput { return v.OutputConfig }).(DeviceFleetOutputConfigOutput) 315 } 316 317 // The Amazon Resource Name (ARN) that has access to AWS Internet of Things (IoT). 318 func (o DeviceFleetOutput) RoleArn() pulumi.StringOutput { 319 return o.ApplyT(func(v *DeviceFleet) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput) 320 } 321 322 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 323 func (o DeviceFleetOutput) Tags() pulumi.StringMapOutput { 324 return o.ApplyT(func(v *DeviceFleet) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 325 } 326 327 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 328 // 329 // Deprecated: Please use `tags` instead. 330 func (o DeviceFleetOutput) TagsAll() pulumi.StringMapOutput { 331 return o.ApplyT(func(v *DeviceFleet) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 332 } 333 334 type DeviceFleetArrayOutput struct{ *pulumi.OutputState } 335 336 func (DeviceFleetArrayOutput) ElementType() reflect.Type { 337 return reflect.TypeOf((*[]*DeviceFleet)(nil)).Elem() 338 } 339 340 func (o DeviceFleetArrayOutput) ToDeviceFleetArrayOutput() DeviceFleetArrayOutput { 341 return o 342 } 343 344 func (o DeviceFleetArrayOutput) ToDeviceFleetArrayOutputWithContext(ctx context.Context) DeviceFleetArrayOutput { 345 return o 346 } 347 348 func (o DeviceFleetArrayOutput) Index(i pulumi.IntInput) DeviceFleetOutput { 349 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DeviceFleet { 350 return vs[0].([]*DeviceFleet)[vs[1].(int)] 351 }).(DeviceFleetOutput) 352 } 353 354 type DeviceFleetMapOutput struct{ *pulumi.OutputState } 355 356 func (DeviceFleetMapOutput) ElementType() reflect.Type { 357 return reflect.TypeOf((*map[string]*DeviceFleet)(nil)).Elem() 358 } 359 360 func (o DeviceFleetMapOutput) ToDeviceFleetMapOutput() DeviceFleetMapOutput { 361 return o 362 } 363 364 func (o DeviceFleetMapOutput) ToDeviceFleetMapOutputWithContext(ctx context.Context) DeviceFleetMapOutput { 365 return o 366 } 367 368 func (o DeviceFleetMapOutput) MapIndex(k pulumi.StringInput) DeviceFleetOutput { 369 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DeviceFleet { 370 return vs[0].(map[string]*DeviceFleet)[vs[1].(string)] 371 }).(DeviceFleetOutput) 372 } 373 374 func init() { 375 pulumi.RegisterInputType(reflect.TypeOf((*DeviceFleetInput)(nil)).Elem(), &DeviceFleet{}) 376 pulumi.RegisterInputType(reflect.TypeOf((*DeviceFleetArrayInput)(nil)).Elem(), DeviceFleetArray{}) 377 pulumi.RegisterInputType(reflect.TypeOf((*DeviceFleetMapInput)(nil)).Elem(), DeviceFleetMap{}) 378 pulumi.RegisterOutputType(DeviceFleetOutput{}) 379 pulumi.RegisterOutputType(DeviceFleetArrayOutput{}) 380 pulumi.RegisterOutputType(DeviceFleetMapOutput{}) 381 }