github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/opensearch/serverlessSecurityConfig.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 opensearch 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 an AWS OpenSearch Serverless Security Config. 16 // 17 // ## Example Usage 18 // 19 // ## Import 20 // 21 // Using `pulumi import`, import OpenSearchServerless Access Policy using the `name` argument prefixed with the string `saml/account_id/`. For example: 22 // 23 // ```sh 24 // $ pulumi import aws:opensearch/serverlessSecurityConfig:ServerlessSecurityConfig example saml/123456789012/example 25 // ``` 26 type ServerlessSecurityConfig struct { 27 pulumi.CustomResourceState 28 29 // Version of the configuration. 30 ConfigVersion pulumi.StringOutput `pulumi:"configVersion"` 31 // Description of the security configuration. 32 Description pulumi.StringPtrOutput `pulumi:"description"` 33 // Name of the policy. 34 Name pulumi.StringOutput `pulumi:"name"` 35 // Configuration block for SAML options. 36 SamlOptions ServerlessSecurityConfigSamlOptionsPtrOutput `pulumi:"samlOptions"` 37 // Type of configuration. Must be `saml`. 38 // 39 // The following arguments are optional: 40 Type pulumi.StringOutput `pulumi:"type"` 41 } 42 43 // NewServerlessSecurityConfig registers a new resource with the given unique name, arguments, and options. 44 func NewServerlessSecurityConfig(ctx *pulumi.Context, 45 name string, args *ServerlessSecurityConfigArgs, opts ...pulumi.ResourceOption) (*ServerlessSecurityConfig, error) { 46 if args == nil { 47 return nil, errors.New("missing one or more required arguments") 48 } 49 50 if args.Type == nil { 51 return nil, errors.New("invalid value for required argument 'Type'") 52 } 53 opts = internal.PkgResourceDefaultOpts(opts) 54 var resource ServerlessSecurityConfig 55 err := ctx.RegisterResource("aws:opensearch/serverlessSecurityConfig:ServerlessSecurityConfig", name, args, &resource, opts...) 56 if err != nil { 57 return nil, err 58 } 59 return &resource, nil 60 } 61 62 // GetServerlessSecurityConfig gets an existing ServerlessSecurityConfig resource's state with the given name, ID, and optional 63 // state properties that are used to uniquely qualify the lookup (nil if not required). 64 func GetServerlessSecurityConfig(ctx *pulumi.Context, 65 name string, id pulumi.IDInput, state *ServerlessSecurityConfigState, opts ...pulumi.ResourceOption) (*ServerlessSecurityConfig, error) { 66 var resource ServerlessSecurityConfig 67 err := ctx.ReadResource("aws:opensearch/serverlessSecurityConfig:ServerlessSecurityConfig", name, id, state, &resource, opts...) 68 if err != nil { 69 return nil, err 70 } 71 return &resource, nil 72 } 73 74 // Input properties used for looking up and filtering ServerlessSecurityConfig resources. 75 type serverlessSecurityConfigState struct { 76 // Version of the configuration. 77 ConfigVersion *string `pulumi:"configVersion"` 78 // Description of the security configuration. 79 Description *string `pulumi:"description"` 80 // Name of the policy. 81 Name *string `pulumi:"name"` 82 // Configuration block for SAML options. 83 SamlOptions *ServerlessSecurityConfigSamlOptions `pulumi:"samlOptions"` 84 // Type of configuration. Must be `saml`. 85 // 86 // The following arguments are optional: 87 Type *string `pulumi:"type"` 88 } 89 90 type ServerlessSecurityConfigState struct { 91 // Version of the configuration. 92 ConfigVersion pulumi.StringPtrInput 93 // Description of the security configuration. 94 Description pulumi.StringPtrInput 95 // Name of the policy. 96 Name pulumi.StringPtrInput 97 // Configuration block for SAML options. 98 SamlOptions ServerlessSecurityConfigSamlOptionsPtrInput 99 // Type of configuration. Must be `saml`. 100 // 101 // The following arguments are optional: 102 Type pulumi.StringPtrInput 103 } 104 105 func (ServerlessSecurityConfigState) ElementType() reflect.Type { 106 return reflect.TypeOf((*serverlessSecurityConfigState)(nil)).Elem() 107 } 108 109 type serverlessSecurityConfigArgs struct { 110 // Description of the security configuration. 111 Description *string `pulumi:"description"` 112 // Name of the policy. 113 Name *string `pulumi:"name"` 114 // Configuration block for SAML options. 115 SamlOptions *ServerlessSecurityConfigSamlOptions `pulumi:"samlOptions"` 116 // Type of configuration. Must be `saml`. 117 // 118 // The following arguments are optional: 119 Type string `pulumi:"type"` 120 } 121 122 // The set of arguments for constructing a ServerlessSecurityConfig resource. 123 type ServerlessSecurityConfigArgs struct { 124 // Description of the security configuration. 125 Description pulumi.StringPtrInput 126 // Name of the policy. 127 Name pulumi.StringPtrInput 128 // Configuration block for SAML options. 129 SamlOptions ServerlessSecurityConfigSamlOptionsPtrInput 130 // Type of configuration. Must be `saml`. 131 // 132 // The following arguments are optional: 133 Type pulumi.StringInput 134 } 135 136 func (ServerlessSecurityConfigArgs) ElementType() reflect.Type { 137 return reflect.TypeOf((*serverlessSecurityConfigArgs)(nil)).Elem() 138 } 139 140 type ServerlessSecurityConfigInput interface { 141 pulumi.Input 142 143 ToServerlessSecurityConfigOutput() ServerlessSecurityConfigOutput 144 ToServerlessSecurityConfigOutputWithContext(ctx context.Context) ServerlessSecurityConfigOutput 145 } 146 147 func (*ServerlessSecurityConfig) ElementType() reflect.Type { 148 return reflect.TypeOf((**ServerlessSecurityConfig)(nil)).Elem() 149 } 150 151 func (i *ServerlessSecurityConfig) ToServerlessSecurityConfigOutput() ServerlessSecurityConfigOutput { 152 return i.ToServerlessSecurityConfigOutputWithContext(context.Background()) 153 } 154 155 func (i *ServerlessSecurityConfig) ToServerlessSecurityConfigOutputWithContext(ctx context.Context) ServerlessSecurityConfigOutput { 156 return pulumi.ToOutputWithContext(ctx, i).(ServerlessSecurityConfigOutput) 157 } 158 159 // ServerlessSecurityConfigArrayInput is an input type that accepts ServerlessSecurityConfigArray and ServerlessSecurityConfigArrayOutput values. 160 // You can construct a concrete instance of `ServerlessSecurityConfigArrayInput` via: 161 // 162 // ServerlessSecurityConfigArray{ ServerlessSecurityConfigArgs{...} } 163 type ServerlessSecurityConfigArrayInput interface { 164 pulumi.Input 165 166 ToServerlessSecurityConfigArrayOutput() ServerlessSecurityConfigArrayOutput 167 ToServerlessSecurityConfigArrayOutputWithContext(context.Context) ServerlessSecurityConfigArrayOutput 168 } 169 170 type ServerlessSecurityConfigArray []ServerlessSecurityConfigInput 171 172 func (ServerlessSecurityConfigArray) ElementType() reflect.Type { 173 return reflect.TypeOf((*[]*ServerlessSecurityConfig)(nil)).Elem() 174 } 175 176 func (i ServerlessSecurityConfigArray) ToServerlessSecurityConfigArrayOutput() ServerlessSecurityConfigArrayOutput { 177 return i.ToServerlessSecurityConfigArrayOutputWithContext(context.Background()) 178 } 179 180 func (i ServerlessSecurityConfigArray) ToServerlessSecurityConfigArrayOutputWithContext(ctx context.Context) ServerlessSecurityConfigArrayOutput { 181 return pulumi.ToOutputWithContext(ctx, i).(ServerlessSecurityConfigArrayOutput) 182 } 183 184 // ServerlessSecurityConfigMapInput is an input type that accepts ServerlessSecurityConfigMap and ServerlessSecurityConfigMapOutput values. 185 // You can construct a concrete instance of `ServerlessSecurityConfigMapInput` via: 186 // 187 // ServerlessSecurityConfigMap{ "key": ServerlessSecurityConfigArgs{...} } 188 type ServerlessSecurityConfigMapInput interface { 189 pulumi.Input 190 191 ToServerlessSecurityConfigMapOutput() ServerlessSecurityConfigMapOutput 192 ToServerlessSecurityConfigMapOutputWithContext(context.Context) ServerlessSecurityConfigMapOutput 193 } 194 195 type ServerlessSecurityConfigMap map[string]ServerlessSecurityConfigInput 196 197 func (ServerlessSecurityConfigMap) ElementType() reflect.Type { 198 return reflect.TypeOf((*map[string]*ServerlessSecurityConfig)(nil)).Elem() 199 } 200 201 func (i ServerlessSecurityConfigMap) ToServerlessSecurityConfigMapOutput() ServerlessSecurityConfigMapOutput { 202 return i.ToServerlessSecurityConfigMapOutputWithContext(context.Background()) 203 } 204 205 func (i ServerlessSecurityConfigMap) ToServerlessSecurityConfigMapOutputWithContext(ctx context.Context) ServerlessSecurityConfigMapOutput { 206 return pulumi.ToOutputWithContext(ctx, i).(ServerlessSecurityConfigMapOutput) 207 } 208 209 type ServerlessSecurityConfigOutput struct{ *pulumi.OutputState } 210 211 func (ServerlessSecurityConfigOutput) ElementType() reflect.Type { 212 return reflect.TypeOf((**ServerlessSecurityConfig)(nil)).Elem() 213 } 214 215 func (o ServerlessSecurityConfigOutput) ToServerlessSecurityConfigOutput() ServerlessSecurityConfigOutput { 216 return o 217 } 218 219 func (o ServerlessSecurityConfigOutput) ToServerlessSecurityConfigOutputWithContext(ctx context.Context) ServerlessSecurityConfigOutput { 220 return o 221 } 222 223 // Version of the configuration. 224 func (o ServerlessSecurityConfigOutput) ConfigVersion() pulumi.StringOutput { 225 return o.ApplyT(func(v *ServerlessSecurityConfig) pulumi.StringOutput { return v.ConfigVersion }).(pulumi.StringOutput) 226 } 227 228 // Description of the security configuration. 229 func (o ServerlessSecurityConfigOutput) Description() pulumi.StringPtrOutput { 230 return o.ApplyT(func(v *ServerlessSecurityConfig) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 231 } 232 233 // Name of the policy. 234 func (o ServerlessSecurityConfigOutput) Name() pulumi.StringOutput { 235 return o.ApplyT(func(v *ServerlessSecurityConfig) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 236 } 237 238 // Configuration block for SAML options. 239 func (o ServerlessSecurityConfigOutput) SamlOptions() ServerlessSecurityConfigSamlOptionsPtrOutput { 240 return o.ApplyT(func(v *ServerlessSecurityConfig) ServerlessSecurityConfigSamlOptionsPtrOutput { return v.SamlOptions }).(ServerlessSecurityConfigSamlOptionsPtrOutput) 241 } 242 243 // Type of configuration. Must be `saml`. 244 // 245 // The following arguments are optional: 246 func (o ServerlessSecurityConfigOutput) Type() pulumi.StringOutput { 247 return o.ApplyT(func(v *ServerlessSecurityConfig) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) 248 } 249 250 type ServerlessSecurityConfigArrayOutput struct{ *pulumi.OutputState } 251 252 func (ServerlessSecurityConfigArrayOutput) ElementType() reflect.Type { 253 return reflect.TypeOf((*[]*ServerlessSecurityConfig)(nil)).Elem() 254 } 255 256 func (o ServerlessSecurityConfigArrayOutput) ToServerlessSecurityConfigArrayOutput() ServerlessSecurityConfigArrayOutput { 257 return o 258 } 259 260 func (o ServerlessSecurityConfigArrayOutput) ToServerlessSecurityConfigArrayOutputWithContext(ctx context.Context) ServerlessSecurityConfigArrayOutput { 261 return o 262 } 263 264 func (o ServerlessSecurityConfigArrayOutput) Index(i pulumi.IntInput) ServerlessSecurityConfigOutput { 265 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServerlessSecurityConfig { 266 return vs[0].([]*ServerlessSecurityConfig)[vs[1].(int)] 267 }).(ServerlessSecurityConfigOutput) 268 } 269 270 type ServerlessSecurityConfigMapOutput struct{ *pulumi.OutputState } 271 272 func (ServerlessSecurityConfigMapOutput) ElementType() reflect.Type { 273 return reflect.TypeOf((*map[string]*ServerlessSecurityConfig)(nil)).Elem() 274 } 275 276 func (o ServerlessSecurityConfigMapOutput) ToServerlessSecurityConfigMapOutput() ServerlessSecurityConfigMapOutput { 277 return o 278 } 279 280 func (o ServerlessSecurityConfigMapOutput) ToServerlessSecurityConfigMapOutputWithContext(ctx context.Context) ServerlessSecurityConfigMapOutput { 281 return o 282 } 283 284 func (o ServerlessSecurityConfigMapOutput) MapIndex(k pulumi.StringInput) ServerlessSecurityConfigOutput { 285 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServerlessSecurityConfig { 286 return vs[0].(map[string]*ServerlessSecurityConfig)[vs[1].(string)] 287 }).(ServerlessSecurityConfigOutput) 288 } 289 290 func init() { 291 pulumi.RegisterInputType(reflect.TypeOf((*ServerlessSecurityConfigInput)(nil)).Elem(), &ServerlessSecurityConfig{}) 292 pulumi.RegisterInputType(reflect.TypeOf((*ServerlessSecurityConfigArrayInput)(nil)).Elem(), ServerlessSecurityConfigArray{}) 293 pulumi.RegisterInputType(reflect.TypeOf((*ServerlessSecurityConfigMapInput)(nil)).Elem(), ServerlessSecurityConfigMap{}) 294 pulumi.RegisterOutputType(ServerlessSecurityConfigOutput{}) 295 pulumi.RegisterOutputType(ServerlessSecurityConfigArrayOutput{}) 296 pulumi.RegisterOutputType(ServerlessSecurityConfigMapOutput{}) 297 }