github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/sagemaker/userProfile.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 User Profile resource. 16 // 17 // ## Example Usage 18 // 19 // ### Basic usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sagemaker" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := sagemaker.NewUserProfile(ctx, "example", &sagemaker.UserProfileArgs{ 35 // DomainId: pulumi.Any(test.Id), 36 // UserProfileName: pulumi.String("example"), 37 // }) 38 // if err != nil { 39 // return err 40 // } 41 // return nil 42 // }) 43 // } 44 // 45 // ``` 46 // <!--End PulumiCodeChooser --> 47 // 48 // ## Import 49 // 50 // Using `pulumi import`, import SageMaker User Profiles using the `arn`. For example: 51 // 52 // ```sh 53 // $ pulumi import aws:sagemaker/userProfile:UserProfile test_user_profile arn:aws:sagemaker:us-west-2:123456789012:user-profile/domain-id/profile-name 54 // ``` 55 type UserProfile struct { 56 pulumi.CustomResourceState 57 58 // The user profile Amazon Resource Name (ARN). 59 Arn pulumi.StringOutput `pulumi:"arn"` 60 // The ID of the associated Domain. 61 DomainId pulumi.StringOutput `pulumi:"domainId"` 62 // The ID of the user's profile in the Amazon Elastic File System (EFS) volume. 63 HomeEfsFileSystemUid pulumi.StringOutput `pulumi:"homeEfsFileSystemUid"` 64 // A specifier for the type of value specified in `singleSignOnUserValue`. Currently, the only supported value is `UserName`. If the Domain's AuthMode is SSO, this field is required. If the Domain's AuthMode is not SSO, this field cannot be specified. 65 SingleSignOnUserIdentifier pulumi.StringPtrOutput `pulumi:"singleSignOnUserIdentifier"` 66 // The username of the associated AWS Single Sign-On User for this User Profile. If the Domain's AuthMode is SSO, this field is required, and must match a valid username of a user in your directory. If the Domain's AuthMode is not SSO, this field cannot be specified. 67 SingleSignOnUserValue pulumi.StringPtrOutput `pulumi:"singleSignOnUserValue"` 68 // 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. 69 Tags pulumi.StringMapOutput `pulumi:"tags"` 70 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 71 // 72 // Deprecated: Please use `tags` instead. 73 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 74 // The name for the User Profile. 75 UserProfileName pulumi.StringOutput `pulumi:"userProfileName"` 76 // The user settings. See User Settings below. 77 UserSettings UserProfileUserSettingsPtrOutput `pulumi:"userSettings"` 78 } 79 80 // NewUserProfile registers a new resource with the given unique name, arguments, and options. 81 func NewUserProfile(ctx *pulumi.Context, 82 name string, args *UserProfileArgs, opts ...pulumi.ResourceOption) (*UserProfile, error) { 83 if args == nil { 84 return nil, errors.New("missing one or more required arguments") 85 } 86 87 if args.DomainId == nil { 88 return nil, errors.New("invalid value for required argument 'DomainId'") 89 } 90 if args.UserProfileName == nil { 91 return nil, errors.New("invalid value for required argument 'UserProfileName'") 92 } 93 opts = internal.PkgResourceDefaultOpts(opts) 94 var resource UserProfile 95 err := ctx.RegisterResource("aws:sagemaker/userProfile:UserProfile", name, args, &resource, opts...) 96 if err != nil { 97 return nil, err 98 } 99 return &resource, nil 100 } 101 102 // GetUserProfile gets an existing UserProfile resource's state with the given name, ID, and optional 103 // state properties that are used to uniquely qualify the lookup (nil if not required). 104 func GetUserProfile(ctx *pulumi.Context, 105 name string, id pulumi.IDInput, state *UserProfileState, opts ...pulumi.ResourceOption) (*UserProfile, error) { 106 var resource UserProfile 107 err := ctx.ReadResource("aws:sagemaker/userProfile:UserProfile", name, id, state, &resource, opts...) 108 if err != nil { 109 return nil, err 110 } 111 return &resource, nil 112 } 113 114 // Input properties used for looking up and filtering UserProfile resources. 115 type userProfileState struct { 116 // The user profile Amazon Resource Name (ARN). 117 Arn *string `pulumi:"arn"` 118 // The ID of the associated Domain. 119 DomainId *string `pulumi:"domainId"` 120 // The ID of the user's profile in the Amazon Elastic File System (EFS) volume. 121 HomeEfsFileSystemUid *string `pulumi:"homeEfsFileSystemUid"` 122 // A specifier for the type of value specified in `singleSignOnUserValue`. Currently, the only supported value is `UserName`. If the Domain's AuthMode is SSO, this field is required. If the Domain's AuthMode is not SSO, this field cannot be specified. 123 SingleSignOnUserIdentifier *string `pulumi:"singleSignOnUserIdentifier"` 124 // The username of the associated AWS Single Sign-On User for this User Profile. If the Domain's AuthMode is SSO, this field is required, and must match a valid username of a user in your directory. If the Domain's AuthMode is not SSO, this field cannot be specified. 125 SingleSignOnUserValue *string `pulumi:"singleSignOnUserValue"` 126 // 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. 127 Tags map[string]string `pulumi:"tags"` 128 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 129 // 130 // Deprecated: Please use `tags` instead. 131 TagsAll map[string]string `pulumi:"tagsAll"` 132 // The name for the User Profile. 133 UserProfileName *string `pulumi:"userProfileName"` 134 // The user settings. See User Settings below. 135 UserSettings *UserProfileUserSettings `pulumi:"userSettings"` 136 } 137 138 type UserProfileState struct { 139 // The user profile Amazon Resource Name (ARN). 140 Arn pulumi.StringPtrInput 141 // The ID of the associated Domain. 142 DomainId pulumi.StringPtrInput 143 // The ID of the user's profile in the Amazon Elastic File System (EFS) volume. 144 HomeEfsFileSystemUid pulumi.StringPtrInput 145 // A specifier for the type of value specified in `singleSignOnUserValue`. Currently, the only supported value is `UserName`. If the Domain's AuthMode is SSO, this field is required. If the Domain's AuthMode is not SSO, this field cannot be specified. 146 SingleSignOnUserIdentifier pulumi.StringPtrInput 147 // The username of the associated AWS Single Sign-On User for this User Profile. If the Domain's AuthMode is SSO, this field is required, and must match a valid username of a user in your directory. If the Domain's AuthMode is not SSO, this field cannot be specified. 148 SingleSignOnUserValue pulumi.StringPtrInput 149 // 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. 150 Tags pulumi.StringMapInput 151 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 152 // 153 // Deprecated: Please use `tags` instead. 154 TagsAll pulumi.StringMapInput 155 // The name for the User Profile. 156 UserProfileName pulumi.StringPtrInput 157 // The user settings. See User Settings below. 158 UserSettings UserProfileUserSettingsPtrInput 159 } 160 161 func (UserProfileState) ElementType() reflect.Type { 162 return reflect.TypeOf((*userProfileState)(nil)).Elem() 163 } 164 165 type userProfileArgs struct { 166 // The ID of the associated Domain. 167 DomainId string `pulumi:"domainId"` 168 // A specifier for the type of value specified in `singleSignOnUserValue`. Currently, the only supported value is `UserName`. If the Domain's AuthMode is SSO, this field is required. If the Domain's AuthMode is not SSO, this field cannot be specified. 169 SingleSignOnUserIdentifier *string `pulumi:"singleSignOnUserIdentifier"` 170 // The username of the associated AWS Single Sign-On User for this User Profile. If the Domain's AuthMode is SSO, this field is required, and must match a valid username of a user in your directory. If the Domain's AuthMode is not SSO, this field cannot be specified. 171 SingleSignOnUserValue *string `pulumi:"singleSignOnUserValue"` 172 // 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. 173 Tags map[string]string `pulumi:"tags"` 174 // The name for the User Profile. 175 UserProfileName string `pulumi:"userProfileName"` 176 // The user settings. See User Settings below. 177 UserSettings *UserProfileUserSettings `pulumi:"userSettings"` 178 } 179 180 // The set of arguments for constructing a UserProfile resource. 181 type UserProfileArgs struct { 182 // The ID of the associated Domain. 183 DomainId pulumi.StringInput 184 // A specifier for the type of value specified in `singleSignOnUserValue`. Currently, the only supported value is `UserName`. If the Domain's AuthMode is SSO, this field is required. If the Domain's AuthMode is not SSO, this field cannot be specified. 185 SingleSignOnUserIdentifier pulumi.StringPtrInput 186 // The username of the associated AWS Single Sign-On User for this User Profile. If the Domain's AuthMode is SSO, this field is required, and must match a valid username of a user in your directory. If the Domain's AuthMode is not SSO, this field cannot be specified. 187 SingleSignOnUserValue pulumi.StringPtrInput 188 // 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. 189 Tags pulumi.StringMapInput 190 // The name for the User Profile. 191 UserProfileName pulumi.StringInput 192 // The user settings. See User Settings below. 193 UserSettings UserProfileUserSettingsPtrInput 194 } 195 196 func (UserProfileArgs) ElementType() reflect.Type { 197 return reflect.TypeOf((*userProfileArgs)(nil)).Elem() 198 } 199 200 type UserProfileInput interface { 201 pulumi.Input 202 203 ToUserProfileOutput() UserProfileOutput 204 ToUserProfileOutputWithContext(ctx context.Context) UserProfileOutput 205 } 206 207 func (*UserProfile) ElementType() reflect.Type { 208 return reflect.TypeOf((**UserProfile)(nil)).Elem() 209 } 210 211 func (i *UserProfile) ToUserProfileOutput() UserProfileOutput { 212 return i.ToUserProfileOutputWithContext(context.Background()) 213 } 214 215 func (i *UserProfile) ToUserProfileOutputWithContext(ctx context.Context) UserProfileOutput { 216 return pulumi.ToOutputWithContext(ctx, i).(UserProfileOutput) 217 } 218 219 // UserProfileArrayInput is an input type that accepts UserProfileArray and UserProfileArrayOutput values. 220 // You can construct a concrete instance of `UserProfileArrayInput` via: 221 // 222 // UserProfileArray{ UserProfileArgs{...} } 223 type UserProfileArrayInput interface { 224 pulumi.Input 225 226 ToUserProfileArrayOutput() UserProfileArrayOutput 227 ToUserProfileArrayOutputWithContext(context.Context) UserProfileArrayOutput 228 } 229 230 type UserProfileArray []UserProfileInput 231 232 func (UserProfileArray) ElementType() reflect.Type { 233 return reflect.TypeOf((*[]*UserProfile)(nil)).Elem() 234 } 235 236 func (i UserProfileArray) ToUserProfileArrayOutput() UserProfileArrayOutput { 237 return i.ToUserProfileArrayOutputWithContext(context.Background()) 238 } 239 240 func (i UserProfileArray) ToUserProfileArrayOutputWithContext(ctx context.Context) UserProfileArrayOutput { 241 return pulumi.ToOutputWithContext(ctx, i).(UserProfileArrayOutput) 242 } 243 244 // UserProfileMapInput is an input type that accepts UserProfileMap and UserProfileMapOutput values. 245 // You can construct a concrete instance of `UserProfileMapInput` via: 246 // 247 // UserProfileMap{ "key": UserProfileArgs{...} } 248 type UserProfileMapInput interface { 249 pulumi.Input 250 251 ToUserProfileMapOutput() UserProfileMapOutput 252 ToUserProfileMapOutputWithContext(context.Context) UserProfileMapOutput 253 } 254 255 type UserProfileMap map[string]UserProfileInput 256 257 func (UserProfileMap) ElementType() reflect.Type { 258 return reflect.TypeOf((*map[string]*UserProfile)(nil)).Elem() 259 } 260 261 func (i UserProfileMap) ToUserProfileMapOutput() UserProfileMapOutput { 262 return i.ToUserProfileMapOutputWithContext(context.Background()) 263 } 264 265 func (i UserProfileMap) ToUserProfileMapOutputWithContext(ctx context.Context) UserProfileMapOutput { 266 return pulumi.ToOutputWithContext(ctx, i).(UserProfileMapOutput) 267 } 268 269 type UserProfileOutput struct{ *pulumi.OutputState } 270 271 func (UserProfileOutput) ElementType() reflect.Type { 272 return reflect.TypeOf((**UserProfile)(nil)).Elem() 273 } 274 275 func (o UserProfileOutput) ToUserProfileOutput() UserProfileOutput { 276 return o 277 } 278 279 func (o UserProfileOutput) ToUserProfileOutputWithContext(ctx context.Context) UserProfileOutput { 280 return o 281 } 282 283 // The user profile Amazon Resource Name (ARN). 284 func (o UserProfileOutput) Arn() pulumi.StringOutput { 285 return o.ApplyT(func(v *UserProfile) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 286 } 287 288 // The ID of the associated Domain. 289 func (o UserProfileOutput) DomainId() pulumi.StringOutput { 290 return o.ApplyT(func(v *UserProfile) pulumi.StringOutput { return v.DomainId }).(pulumi.StringOutput) 291 } 292 293 // The ID of the user's profile in the Amazon Elastic File System (EFS) volume. 294 func (o UserProfileOutput) HomeEfsFileSystemUid() pulumi.StringOutput { 295 return o.ApplyT(func(v *UserProfile) pulumi.StringOutput { return v.HomeEfsFileSystemUid }).(pulumi.StringOutput) 296 } 297 298 // A specifier for the type of value specified in `singleSignOnUserValue`. Currently, the only supported value is `UserName`. If the Domain's AuthMode is SSO, this field is required. If the Domain's AuthMode is not SSO, this field cannot be specified. 299 func (o UserProfileOutput) SingleSignOnUserIdentifier() pulumi.StringPtrOutput { 300 return o.ApplyT(func(v *UserProfile) pulumi.StringPtrOutput { return v.SingleSignOnUserIdentifier }).(pulumi.StringPtrOutput) 301 } 302 303 // The username of the associated AWS Single Sign-On User for this User Profile. If the Domain's AuthMode is SSO, this field is required, and must match a valid username of a user in your directory. If the Domain's AuthMode is not SSO, this field cannot be specified. 304 func (o UserProfileOutput) SingleSignOnUserValue() pulumi.StringPtrOutput { 305 return o.ApplyT(func(v *UserProfile) pulumi.StringPtrOutput { return v.SingleSignOnUserValue }).(pulumi.StringPtrOutput) 306 } 307 308 // 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. 309 func (o UserProfileOutput) Tags() pulumi.StringMapOutput { 310 return o.ApplyT(func(v *UserProfile) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 311 } 312 313 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 314 // 315 // Deprecated: Please use `tags` instead. 316 func (o UserProfileOutput) TagsAll() pulumi.StringMapOutput { 317 return o.ApplyT(func(v *UserProfile) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 318 } 319 320 // The name for the User Profile. 321 func (o UserProfileOutput) UserProfileName() pulumi.StringOutput { 322 return o.ApplyT(func(v *UserProfile) pulumi.StringOutput { return v.UserProfileName }).(pulumi.StringOutput) 323 } 324 325 // The user settings. See User Settings below. 326 func (o UserProfileOutput) UserSettings() UserProfileUserSettingsPtrOutput { 327 return o.ApplyT(func(v *UserProfile) UserProfileUserSettingsPtrOutput { return v.UserSettings }).(UserProfileUserSettingsPtrOutput) 328 } 329 330 type UserProfileArrayOutput struct{ *pulumi.OutputState } 331 332 func (UserProfileArrayOutput) ElementType() reflect.Type { 333 return reflect.TypeOf((*[]*UserProfile)(nil)).Elem() 334 } 335 336 func (o UserProfileArrayOutput) ToUserProfileArrayOutput() UserProfileArrayOutput { 337 return o 338 } 339 340 func (o UserProfileArrayOutput) ToUserProfileArrayOutputWithContext(ctx context.Context) UserProfileArrayOutput { 341 return o 342 } 343 344 func (o UserProfileArrayOutput) Index(i pulumi.IntInput) UserProfileOutput { 345 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *UserProfile { 346 return vs[0].([]*UserProfile)[vs[1].(int)] 347 }).(UserProfileOutput) 348 } 349 350 type UserProfileMapOutput struct{ *pulumi.OutputState } 351 352 func (UserProfileMapOutput) ElementType() reflect.Type { 353 return reflect.TypeOf((*map[string]*UserProfile)(nil)).Elem() 354 } 355 356 func (o UserProfileMapOutput) ToUserProfileMapOutput() UserProfileMapOutput { 357 return o 358 } 359 360 func (o UserProfileMapOutput) ToUserProfileMapOutputWithContext(ctx context.Context) UserProfileMapOutput { 361 return o 362 } 363 364 func (o UserProfileMapOutput) MapIndex(k pulumi.StringInput) UserProfileOutput { 365 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *UserProfile { 366 return vs[0].(map[string]*UserProfile)[vs[1].(string)] 367 }).(UserProfileOutput) 368 } 369 370 func init() { 371 pulumi.RegisterInputType(reflect.TypeOf((*UserProfileInput)(nil)).Elem(), &UserProfile{}) 372 pulumi.RegisterInputType(reflect.TypeOf((*UserProfileArrayInput)(nil)).Elem(), UserProfileArray{}) 373 pulumi.RegisterInputType(reflect.TypeOf((*UserProfileMapInput)(nil)).Elem(), UserProfileMap{}) 374 pulumi.RegisterOutputType(UserProfileOutput{}) 375 pulumi.RegisterOutputType(UserProfileArrayOutput{}) 376 pulumi.RegisterOutputType(UserProfileMapOutput{}) 377 }