github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/verifiedaccess/trustProvider.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 verifiedaccess 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 // Resource for managing a Verified Access Trust Provider. 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/verifiedaccess" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // _, err := verifiedaccess.NewTrustProvider(ctx, "example", &verifiedaccess.TrustProviderArgs{ 33 // PolicyReferenceName: pulumi.String("example"), 34 // TrustProviderType: pulumi.String("user"), 35 // UserTrustProviderType: pulumi.String("iam-identity-center"), 36 // }) 37 // if err != nil { 38 // return err 39 // } 40 // return nil 41 // }) 42 // } 43 // 44 // ``` 45 // <!--End PulumiCodeChooser --> 46 // 47 // ## Import 48 // 49 // Using `pulumi import`, import Transfer Workflows using the `id`. For example: 50 // 51 // ```sh 52 // $ pulumi import aws:verifiedaccess/trustProvider:TrustProvider example vatp-8012925589 53 // ``` 54 type TrustProvider struct { 55 pulumi.CustomResourceState 56 57 // A description for the AWS Verified Access trust provider. 58 Description pulumi.StringPtrOutput `pulumi:"description"` 59 // A block of options for device identity based trust providers. 60 DeviceOptions TrustProviderDeviceOptionsPtrOutput `pulumi:"deviceOptions"` 61 // The type of device-based trust provider. 62 DeviceTrustProviderType pulumi.StringPtrOutput `pulumi:"deviceTrustProviderType"` 63 // The OpenID Connect details for an oidc-type, user-identity based trust provider. 64 OidcOptions TrustProviderOidcOptionsPtrOutput `pulumi:"oidcOptions"` 65 // The identifier to be used when working with policy rules. 66 PolicyReferenceName pulumi.StringOutput `pulumi:"policyReferenceName"` 67 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 68 Tags pulumi.StringMapOutput `pulumi:"tags"` 69 // Deprecated: Please use `tags` instead. 70 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 71 // The type of trust provider can be either user or device-based. 72 // 73 // The following arguments are optional: 74 TrustProviderType pulumi.StringOutput `pulumi:"trustProviderType"` 75 // The type of user-based trust provider. 76 UserTrustProviderType pulumi.StringPtrOutput `pulumi:"userTrustProviderType"` 77 } 78 79 // NewTrustProvider registers a new resource with the given unique name, arguments, and options. 80 func NewTrustProvider(ctx *pulumi.Context, 81 name string, args *TrustProviderArgs, opts ...pulumi.ResourceOption) (*TrustProvider, error) { 82 if args == nil { 83 return nil, errors.New("missing one or more required arguments") 84 } 85 86 if args.PolicyReferenceName == nil { 87 return nil, errors.New("invalid value for required argument 'PolicyReferenceName'") 88 } 89 if args.TrustProviderType == nil { 90 return nil, errors.New("invalid value for required argument 'TrustProviderType'") 91 } 92 opts = internal.PkgResourceDefaultOpts(opts) 93 var resource TrustProvider 94 err := ctx.RegisterResource("aws:verifiedaccess/trustProvider:TrustProvider", name, args, &resource, opts...) 95 if err != nil { 96 return nil, err 97 } 98 return &resource, nil 99 } 100 101 // GetTrustProvider gets an existing TrustProvider resource's state with the given name, ID, and optional 102 // state properties that are used to uniquely qualify the lookup (nil if not required). 103 func GetTrustProvider(ctx *pulumi.Context, 104 name string, id pulumi.IDInput, state *TrustProviderState, opts ...pulumi.ResourceOption) (*TrustProvider, error) { 105 var resource TrustProvider 106 err := ctx.ReadResource("aws:verifiedaccess/trustProvider:TrustProvider", name, id, state, &resource, opts...) 107 if err != nil { 108 return nil, err 109 } 110 return &resource, nil 111 } 112 113 // Input properties used for looking up and filtering TrustProvider resources. 114 type trustProviderState struct { 115 // A description for the AWS Verified Access trust provider. 116 Description *string `pulumi:"description"` 117 // A block of options for device identity based trust providers. 118 DeviceOptions *TrustProviderDeviceOptions `pulumi:"deviceOptions"` 119 // The type of device-based trust provider. 120 DeviceTrustProviderType *string `pulumi:"deviceTrustProviderType"` 121 // The OpenID Connect details for an oidc-type, user-identity based trust provider. 122 OidcOptions *TrustProviderOidcOptions `pulumi:"oidcOptions"` 123 // The identifier to be used when working with policy rules. 124 PolicyReferenceName *string `pulumi:"policyReferenceName"` 125 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 126 Tags map[string]string `pulumi:"tags"` 127 // Deprecated: Please use `tags` instead. 128 TagsAll map[string]string `pulumi:"tagsAll"` 129 // The type of trust provider can be either user or device-based. 130 // 131 // The following arguments are optional: 132 TrustProviderType *string `pulumi:"trustProviderType"` 133 // The type of user-based trust provider. 134 UserTrustProviderType *string `pulumi:"userTrustProviderType"` 135 } 136 137 type TrustProviderState struct { 138 // A description for the AWS Verified Access trust provider. 139 Description pulumi.StringPtrInput 140 // A block of options for device identity based trust providers. 141 DeviceOptions TrustProviderDeviceOptionsPtrInput 142 // The type of device-based trust provider. 143 DeviceTrustProviderType pulumi.StringPtrInput 144 // The OpenID Connect details for an oidc-type, user-identity based trust provider. 145 OidcOptions TrustProviderOidcOptionsPtrInput 146 // The identifier to be used when working with policy rules. 147 PolicyReferenceName pulumi.StringPtrInput 148 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 149 Tags pulumi.StringMapInput 150 // Deprecated: Please use `tags` instead. 151 TagsAll pulumi.StringMapInput 152 // The type of trust provider can be either user or device-based. 153 // 154 // The following arguments are optional: 155 TrustProviderType pulumi.StringPtrInput 156 // The type of user-based trust provider. 157 UserTrustProviderType pulumi.StringPtrInput 158 } 159 160 func (TrustProviderState) ElementType() reflect.Type { 161 return reflect.TypeOf((*trustProviderState)(nil)).Elem() 162 } 163 164 type trustProviderArgs struct { 165 // A description for the AWS Verified Access trust provider. 166 Description *string `pulumi:"description"` 167 // A block of options for device identity based trust providers. 168 DeviceOptions *TrustProviderDeviceOptions `pulumi:"deviceOptions"` 169 // The type of device-based trust provider. 170 DeviceTrustProviderType *string `pulumi:"deviceTrustProviderType"` 171 // The OpenID Connect details for an oidc-type, user-identity based trust provider. 172 OidcOptions *TrustProviderOidcOptions `pulumi:"oidcOptions"` 173 // The identifier to be used when working with policy rules. 174 PolicyReferenceName string `pulumi:"policyReferenceName"` 175 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 176 Tags map[string]string `pulumi:"tags"` 177 // The type of trust provider can be either user or device-based. 178 // 179 // The following arguments are optional: 180 TrustProviderType string `pulumi:"trustProviderType"` 181 // The type of user-based trust provider. 182 UserTrustProviderType *string `pulumi:"userTrustProviderType"` 183 } 184 185 // The set of arguments for constructing a TrustProvider resource. 186 type TrustProviderArgs struct { 187 // A description for the AWS Verified Access trust provider. 188 Description pulumi.StringPtrInput 189 // A block of options for device identity based trust providers. 190 DeviceOptions TrustProviderDeviceOptionsPtrInput 191 // The type of device-based trust provider. 192 DeviceTrustProviderType pulumi.StringPtrInput 193 // The OpenID Connect details for an oidc-type, user-identity based trust provider. 194 OidcOptions TrustProviderOidcOptionsPtrInput 195 // The identifier to be used when working with policy rules. 196 PolicyReferenceName pulumi.StringInput 197 // Key-value mapping of resource tags. 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 // The type of trust provider can be either user or device-based. 200 // 201 // The following arguments are optional: 202 TrustProviderType pulumi.StringInput 203 // The type of user-based trust provider. 204 UserTrustProviderType pulumi.StringPtrInput 205 } 206 207 func (TrustProviderArgs) ElementType() reflect.Type { 208 return reflect.TypeOf((*trustProviderArgs)(nil)).Elem() 209 } 210 211 type TrustProviderInput interface { 212 pulumi.Input 213 214 ToTrustProviderOutput() TrustProviderOutput 215 ToTrustProviderOutputWithContext(ctx context.Context) TrustProviderOutput 216 } 217 218 func (*TrustProvider) ElementType() reflect.Type { 219 return reflect.TypeOf((**TrustProvider)(nil)).Elem() 220 } 221 222 func (i *TrustProvider) ToTrustProviderOutput() TrustProviderOutput { 223 return i.ToTrustProviderOutputWithContext(context.Background()) 224 } 225 226 func (i *TrustProvider) ToTrustProviderOutputWithContext(ctx context.Context) TrustProviderOutput { 227 return pulumi.ToOutputWithContext(ctx, i).(TrustProviderOutput) 228 } 229 230 // TrustProviderArrayInput is an input type that accepts TrustProviderArray and TrustProviderArrayOutput values. 231 // You can construct a concrete instance of `TrustProviderArrayInput` via: 232 // 233 // TrustProviderArray{ TrustProviderArgs{...} } 234 type TrustProviderArrayInput interface { 235 pulumi.Input 236 237 ToTrustProviderArrayOutput() TrustProviderArrayOutput 238 ToTrustProviderArrayOutputWithContext(context.Context) TrustProviderArrayOutput 239 } 240 241 type TrustProviderArray []TrustProviderInput 242 243 func (TrustProviderArray) ElementType() reflect.Type { 244 return reflect.TypeOf((*[]*TrustProvider)(nil)).Elem() 245 } 246 247 func (i TrustProviderArray) ToTrustProviderArrayOutput() TrustProviderArrayOutput { 248 return i.ToTrustProviderArrayOutputWithContext(context.Background()) 249 } 250 251 func (i TrustProviderArray) ToTrustProviderArrayOutputWithContext(ctx context.Context) TrustProviderArrayOutput { 252 return pulumi.ToOutputWithContext(ctx, i).(TrustProviderArrayOutput) 253 } 254 255 // TrustProviderMapInput is an input type that accepts TrustProviderMap and TrustProviderMapOutput values. 256 // You can construct a concrete instance of `TrustProviderMapInput` via: 257 // 258 // TrustProviderMap{ "key": TrustProviderArgs{...} } 259 type TrustProviderMapInput interface { 260 pulumi.Input 261 262 ToTrustProviderMapOutput() TrustProviderMapOutput 263 ToTrustProviderMapOutputWithContext(context.Context) TrustProviderMapOutput 264 } 265 266 type TrustProviderMap map[string]TrustProviderInput 267 268 func (TrustProviderMap) ElementType() reflect.Type { 269 return reflect.TypeOf((*map[string]*TrustProvider)(nil)).Elem() 270 } 271 272 func (i TrustProviderMap) ToTrustProviderMapOutput() TrustProviderMapOutput { 273 return i.ToTrustProviderMapOutputWithContext(context.Background()) 274 } 275 276 func (i TrustProviderMap) ToTrustProviderMapOutputWithContext(ctx context.Context) TrustProviderMapOutput { 277 return pulumi.ToOutputWithContext(ctx, i).(TrustProviderMapOutput) 278 } 279 280 type TrustProviderOutput struct{ *pulumi.OutputState } 281 282 func (TrustProviderOutput) ElementType() reflect.Type { 283 return reflect.TypeOf((**TrustProvider)(nil)).Elem() 284 } 285 286 func (o TrustProviderOutput) ToTrustProviderOutput() TrustProviderOutput { 287 return o 288 } 289 290 func (o TrustProviderOutput) ToTrustProviderOutputWithContext(ctx context.Context) TrustProviderOutput { 291 return o 292 } 293 294 // A description for the AWS Verified Access trust provider. 295 func (o TrustProviderOutput) Description() pulumi.StringPtrOutput { 296 return o.ApplyT(func(v *TrustProvider) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 297 } 298 299 // A block of options for device identity based trust providers. 300 func (o TrustProviderOutput) DeviceOptions() TrustProviderDeviceOptionsPtrOutput { 301 return o.ApplyT(func(v *TrustProvider) TrustProviderDeviceOptionsPtrOutput { return v.DeviceOptions }).(TrustProviderDeviceOptionsPtrOutput) 302 } 303 304 // The type of device-based trust provider. 305 func (o TrustProviderOutput) DeviceTrustProviderType() pulumi.StringPtrOutput { 306 return o.ApplyT(func(v *TrustProvider) pulumi.StringPtrOutput { return v.DeviceTrustProviderType }).(pulumi.StringPtrOutput) 307 } 308 309 // The OpenID Connect details for an oidc-type, user-identity based trust provider. 310 func (o TrustProviderOutput) OidcOptions() TrustProviderOidcOptionsPtrOutput { 311 return o.ApplyT(func(v *TrustProvider) TrustProviderOidcOptionsPtrOutput { return v.OidcOptions }).(TrustProviderOidcOptionsPtrOutput) 312 } 313 314 // The identifier to be used when working with policy rules. 315 func (o TrustProviderOutput) PolicyReferenceName() pulumi.StringOutput { 316 return o.ApplyT(func(v *TrustProvider) pulumi.StringOutput { return v.PolicyReferenceName }).(pulumi.StringOutput) 317 } 318 319 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 320 func (o TrustProviderOutput) Tags() pulumi.StringMapOutput { 321 return o.ApplyT(func(v *TrustProvider) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 322 } 323 324 // Deprecated: Please use `tags` instead. 325 func (o TrustProviderOutput) TagsAll() pulumi.StringMapOutput { 326 return o.ApplyT(func(v *TrustProvider) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 327 } 328 329 // The type of trust provider can be either user or device-based. 330 // 331 // The following arguments are optional: 332 func (o TrustProviderOutput) TrustProviderType() pulumi.StringOutput { 333 return o.ApplyT(func(v *TrustProvider) pulumi.StringOutput { return v.TrustProviderType }).(pulumi.StringOutput) 334 } 335 336 // The type of user-based trust provider. 337 func (o TrustProviderOutput) UserTrustProviderType() pulumi.StringPtrOutput { 338 return o.ApplyT(func(v *TrustProvider) pulumi.StringPtrOutput { return v.UserTrustProviderType }).(pulumi.StringPtrOutput) 339 } 340 341 type TrustProviderArrayOutput struct{ *pulumi.OutputState } 342 343 func (TrustProviderArrayOutput) ElementType() reflect.Type { 344 return reflect.TypeOf((*[]*TrustProvider)(nil)).Elem() 345 } 346 347 func (o TrustProviderArrayOutput) ToTrustProviderArrayOutput() TrustProviderArrayOutput { 348 return o 349 } 350 351 func (o TrustProviderArrayOutput) ToTrustProviderArrayOutputWithContext(ctx context.Context) TrustProviderArrayOutput { 352 return o 353 } 354 355 func (o TrustProviderArrayOutput) Index(i pulumi.IntInput) TrustProviderOutput { 356 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TrustProvider { 357 return vs[0].([]*TrustProvider)[vs[1].(int)] 358 }).(TrustProviderOutput) 359 } 360 361 type TrustProviderMapOutput struct{ *pulumi.OutputState } 362 363 func (TrustProviderMapOutput) ElementType() reflect.Type { 364 return reflect.TypeOf((*map[string]*TrustProvider)(nil)).Elem() 365 } 366 367 func (o TrustProviderMapOutput) ToTrustProviderMapOutput() TrustProviderMapOutput { 368 return o 369 } 370 371 func (o TrustProviderMapOutput) ToTrustProviderMapOutputWithContext(ctx context.Context) TrustProviderMapOutput { 372 return o 373 } 374 375 func (o TrustProviderMapOutput) MapIndex(k pulumi.StringInput) TrustProviderOutput { 376 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TrustProvider { 377 return vs[0].(map[string]*TrustProvider)[vs[1].(string)] 378 }).(TrustProviderOutput) 379 } 380 381 func init() { 382 pulumi.RegisterInputType(reflect.TypeOf((*TrustProviderInput)(nil)).Elem(), &TrustProvider{}) 383 pulumi.RegisterInputType(reflect.TypeOf((*TrustProviderArrayInput)(nil)).Elem(), TrustProviderArray{}) 384 pulumi.RegisterInputType(reflect.TypeOf((*TrustProviderMapInput)(nil)).Elem(), TrustProviderMap{}) 385 pulumi.RegisterOutputType(TrustProviderOutput{}) 386 pulumi.RegisterOutputType(TrustProviderArrayOutput{}) 387 pulumi.RegisterOutputType(TrustProviderMapOutput{}) 388 }